From d99eadbea7a3e4879470f42f4ac71beb382c81ce Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Wed, 29 Jul 2015 07:44:03 -0400 Subject: [PATCH 01/33] Test Commit --- .../java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index 21a183b9..74b2efe3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -300,7 +300,7 @@ import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v1.3.3", guiFactory = "WayofTime.alchemicalWizardry.client.gui.ConfigGuiFactory") public class AlchemicalWizardry { - public static boolean parseTextFiles = false; + public static boolean parseTextFiles = false; public static boolean doMeteorsDestroyBlocks = true; public static String[] diamondMeteorArray; From c5681dc8313c4158258498a27e372ba9593e0d6c Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Wed, 29 Jul 2015 08:23:01 -0400 Subject: [PATCH 02/33] Initial commit of BM 1.8 --- build.gradle | 12 +- build.properties | 4 +- .../forestry/api/apiculture/BeeManager.java | 49 - .../api/apiculture/EnumBeeChromosome.java | 102 - .../forestry/api/apiculture/EnumBeeType.java | 24 - .../api/apiculture/FlowerManager.java | 39 - .../api/apiculture/IAlleleBeeEffect.java | 36 - .../api/apiculture/IAlleleBeeSpecies.java | 69 - .../apiculture/IAlleleBeeSpeciesCustom.java | 40 - .../api/apiculture/IAlvearyComponent.java | 32 - .../api/apiculture/IApiaristTracker.java | 57 - .../api/apiculture/IArmorApiarist.java | 29 - .../java/forestry/api/apiculture/IBee.java | 88 - .../forestry/api/apiculture/IBeeFactory.java | 39 - .../forestry/api/apiculture/IBeeGenome.java | 48 - .../forestry/api/apiculture/IBeeHousing.java | 27 - .../api/apiculture/IBeeIconProvider.java | 14 - .../forestry/api/apiculture/IBeeListener.java | 46 - .../forestry/api/apiculture/IBeeModifier.java | 71 - .../forestry/api/apiculture/IBeeMutation.java | 29 - .../api/apiculture/IBeeMutationCustom.java | 12 - .../api/apiculture/IBeeMutationFactory.java | 23 - .../forestry/api/apiculture/IBeeRoot.java | 128 -- .../api/apiculture/IBeekeepingLogic.java | 27 - .../api/apiculture/IBeekeepingMode.java | 70 - .../forestry/api/apiculture/IHiveDrop.java | 38 - .../forestry/api/apiculture/IHiveFrame.java | 27 - .../api/apiculture/IJubilanceFactory.java | 16 - .../api/apiculture/IJubilanceProvider.java | 15 - .../api/apiculture/hives/HiveManager.java | 13 - .../apiculture/hives/IHiveDescription.java | 48 - .../api/apiculture/hives/IHiveGen.java | 29 - .../api/apiculture/hives/IHiveGenHelper.java | 23 - .../api/apiculture/hives/IHiveRegistry.java | 33 - .../api/apiculture/hives/package-info.java | 8 - .../forestry/api/apiculture/package-info.java | 8 - .../api/arboriculture/EnumGermlingType.java | 23 - .../arboriculture/EnumGrowthConditions.java | 10 - .../api/arboriculture/EnumTreeChromosome.java | 96 - .../api/arboriculture/IAlleleFruit.java | 17 - .../api/arboriculture/IAlleleGrowth.java | 17 - .../api/arboriculture/IAlleleLeafEffect.java | 20 - .../api/arboriculture/IAlleleTreeSpecies.java | 69 - .../api/arboriculture/IArboristTracker.java | 12 - .../api/arboriculture/IFruitProvider.java | 74 - .../api/arboriculture/IGrowthProvider.java | 38 - .../api/arboriculture/ILeafTickHandler.java | 12 - .../api/arboriculture/IToolGrafter.java | 24 - .../forestry/api/arboriculture/ITree.java | 100 - .../api/arboriculture/ITreeGenome.java | 46 - .../api/arboriculture/ITreeModifier.java | 45 - .../api/arboriculture/ITreeMutation.java | 34 - .../forestry/api/arboriculture/ITreeRoot.java | 113 -- .../api/arboriculture/ITreekeepingMode.java | 22 - .../api/arboriculture/package-info.java | 8 - .../forestry/api/circuits/ChipsetManager.java | 13 - .../java/forestry/api/circuits/ICircuit.java | 32 - .../forestry/api/circuits/ICircuitBoard.java | 32 - .../forestry/api/circuits/ICircuitLayout.java | 16 - .../api/circuits/ICircuitLibrary.java | 10 - .../api/circuits/ICircuitRegistry.java | 37 - .../forestry/api/circuits/ISolderManager.java | 14 - .../forestry/api/circuits/package-info.java | 8 - .../java/forestry/api/core/BiomeHelper.java | 36 - .../java/forestry/api/core/EnumHumidity.java | 43 - .../forestry/api/core/EnumTemperature.java | 71 - .../forestry/api/core/ErrorStateRegistry.java | 77 - .../java/forestry/api/core/ForestryAPI.java | 52 - .../java/forestry/api/core/ForestryEvent.java | 60 - .../forestry/api/core/IArmorNaturalist.java | 25 - .../java/forestry/api/core/IErrorState.java | 41 - .../forestry/api/core/IForestryConstants.java | 24 - src/api/java/forestry/api/core/IGameMode.java | 41 - .../java/forestry/api/core/IIconProvider.java | 25 - .../java/forestry/api/core/INBTTagable.java | 14 - .../forestry/api/core/IStructureLogic.java | 20 - .../forestry/api/core/ITextureManager.java | 21 - .../forestry/api/core/ITileStructure.java | 63 - .../java/forestry/api/core/IToolPipette.java | 54 - .../java/forestry/api/core/IToolScoop.java | 13 - src/api/java/forestry/api/core/Tabs.java | 19 - .../java/forestry/api/core/package-info.java | 8 - .../java/forestry/api/farming/Farmables.java | 20 - src/api/java/forestry/api/farming/ICrop.java | 21 - .../forestry/api/farming/IFarmComponent.java | 17 - .../forestry/api/farming/IFarmHousing.java | 74 - .../forestry/api/farming/IFarmInterface.java | 20 - .../forestry/api/farming/IFarmListener.java | 77 - .../java/forestry/api/farming/IFarmLogic.java | 43 - .../java/forestry/api/farming/IFarmable.java | 60 - .../forestry/api/farming/package-info.java | 8 - .../forestry/api/food/BeverageManager.java | 13 - .../forestry/api/food/IBeverageEffect.java | 17 - .../forestry/api/food/IInfuserManager.java | 24 - .../forestry/api/food/IIngredientManager.java | 16 - .../java/forestry/api/food/package-info.java | 8 - .../forestry/api/fuels/EngineBronzeFuel.java | 34 - .../forestry/api/fuels/EngineCopperFuel.java | 31 - .../forestry/api/fuels/FermenterFuel.java | 29 - .../java/forestry/api/fuels/FuelManager.java | 40 - .../forestry/api/fuels/GeneratorFuel.java | 31 - .../forestry/api/fuels/MoistenerFuel.java | 34 - .../forestry/api/fuels/RainSubstrate.java | 40 - .../java/forestry/api/fuels/package-info.java | 8 - .../forestry/api/genetics/AlleleManager.java | 36 - .../forestry/api/genetics/EnumTolerance.java | 16 - .../java/forestry/api/genetics/IAllele.java | 39 - .../forestry/api/genetics/IAlleleArea.java | 15 - .../forestry/api/genetics/IAlleleBoolean.java | 16 - .../forestry/api/genetics/IAlleleEffect.java | 26 - .../forestry/api/genetics/IAlleleFactory.java | 80 - .../forestry/api/genetics/IAlleleFloat.java | 15 - .../forestry/api/genetics/IAlleleFlowers.java | 16 - .../forestry/api/genetics/IAlleleHandler.java | 41 - .../forestry/api/genetics/IAlleleInteger.java | 15 - .../api/genetics/IAllelePlantType.java | 16 - .../api/genetics/IAlleleRegistry.java | 218 --- .../forestry/api/genetics/IAlleleSpecies.java | 115 -- .../api/genetics/IAlleleSpeciesCustom.java | 23 - .../api/genetics/IAlleleTolerance.java | 15 - .../api/genetics/IBreedingTracker.java | 93 - .../forestry/api/genetics/IChromosome.java | 25 - .../api/genetics/IChromosomeType.java | 24 - .../api/genetics/IClassification.java | 107 -- .../forestry/api/genetics/IClimateHelper.java | 53 - .../forestry/api/genetics/IEffectData.java | 27 - .../java/forestry/api/genetics/IFlower.java | 20 - .../api/genetics/IFlowerGrowthRule.java | 15 - .../api/genetics/IFlowerProvider.java | 43 - .../api/genetics/IFlowerRegistry.java | 43 - .../forestry/api/genetics/IFruitBearer.java | 50 - .../forestry/api/genetics/IFruitFamily.java | 32 - .../java/forestry/api/genetics/IGenome.java | 30 - .../java/forestry/api/genetics/IHousing.java | 57 - .../forestry/api/genetics/IIndividual.java | 53 - .../api/genetics/IIndividualLiving.java | 45 - .../forestry/api/genetics/ILegacyHandler.java | 17 - .../java/forestry/api/genetics/IMutation.java | 68 - .../api/genetics/IMutationCondition.java | 23 - .../api/genetics/IMutationCustom.java | 47 - .../forestry/api/genetics/IPollinatable.java | 48 - .../forestry/api/genetics/ISpeciesRoot.java | 163 -- .../forestry/api/genetics/package-info.java | 8 - .../EnumButterflyChromosome.java | 98 - .../api/lepidopterology/EnumFlutterType.java | 15 - .../IAlleleButterflyEffect.java | 21 - .../IAlleleButterflySpecies.java | 59 - .../api/lepidopterology/IButterfly.java | 77 - .../api/lepidopterology/IButterflyGenome.java | 42 - .../lepidopterology/IButterflyMutation.java | 14 - .../lepidopterology/IButterflyNursery.java | 21 - .../api/lepidopterology/IButterflyRoot.java | 74 - .../api/lepidopterology/IEntityButterfly.java | 29 - .../ILepidopteristTracker.java | 14 - .../api/lepidopterology/package-info.java | 8 - .../java/forestry/api/mail/EnumAddressee.java | 26 - .../java/forestry/api/mail/EnumPostage.java | 20 - src/api/java/forestry/api/mail/ILetter.java | 59 - .../forestry/api/mail/ILetterHandler.java | 13 - .../java/forestry/api/mail/IMailAddress.java | 23 - .../java/forestry/api/mail/IPostOffice.java | 30 - .../java/forestry/api/mail/IPostRegistry.java | 58 - .../forestry/api/mail/IPostalCarrier.java | 48 - .../java/forestry/api/mail/IPostalState.java | 14 - src/api/java/forestry/api/mail/IStamps.java | 14 - .../java/forestry/api/mail/ITradeStation.java | 24 - .../java/forestry/api/mail/PostManager.java | 11 - .../forestry/api/mail/TradeStationInfo.java | 29 - .../java/forestry/api/mail/package-info.java | 8 - .../api/recipes/ICarpenterManager.java | 67 - .../api/recipes/ICentrifugeManager.java | 79 - .../api/recipes/ICraftingProvider.java | 17 - .../api/recipes/IFabricatorManager.java | 18 - .../api/recipes/IFermenterManager.java | 53 - .../api/recipes/IMoistenerManager.java | 33 - .../api/recipes/ISqueezerManager.java | 51 - .../forestry/api/recipes/IStillManager.java | 34 - .../api/recipes/IVariableFermentable.java | 21 - .../forestry/api/recipes/RecipeManagers.java | 45 - .../forestry/api/recipes/package-info.java | 8 - .../forestry/api/storage/BackpackEvent.java | 25 - .../forestry/api/storage/BackpackManager.java | 27 - .../api/storage/BackpackResupplyEvent.java | 24 - .../api/storage/BackpackStowEvent.java | 27 - .../api/storage/EnumBackpackType.java | 10 - .../api/storage/IBackpackDefinition.java | 47 - .../api/storage/IBackpackInterface.java | 22 - .../forestry/api/storage/ICrateRegistry.java | 32 - .../forestry/api/storage/StorageManager.java | 12 - .../forestry/api/storage/package-info.java | 8 - .../java/forestry/api/world/ITreeGenData.java | 30 - .../api/world/IWorldGenInterface.java | 22 - .../forestry/api/world/WorldGenManager.java | 10 - .../java/forestry/api/world/package-info.java | 8 - .../api/IHeatExchangerLogic.java | 77 - .../pneumaticCraft/api/PneumaticRegistry.java | 158 -- .../api/actuator/IActuator.java | 32 - .../api/block/BlockSupplier.java | 77 - .../api/block/IPneumaticWrenchable.java | 14 - .../api/client/GuiAnimatedStatSupplier.java | 49 - .../api/client/GuiElementRenderer.java | 32 - .../api/client/IGuiAnimatedStat.java | 179 -- .../AssemblyRenderOverriding.java | 55 - .../pneumaticHelmet/IBlockTrackEntry.java | 80 - .../pneumaticHelmet/IEntityTrackEntry.java | 49 - .../client/pneumaticHelmet/IGuiScreen.java | 15 - .../pneumaticHelmet/IHackableBlock.java | 69 - .../pneumaticHelmet/IHackableEntity.java | 59 - .../client/pneumaticHelmet/IOptionPage.java | 46 - .../IUpgradeRenderHandler.java | 92 - .../RenderHandlerRegistry.java | 10 - .../api/drone/DroneConstructingEvent.java | 11 - .../api/drone/IBlockInteractHandler.java | 26 - .../api/drone/ICustomBlockInteract.java | 45 - .../java/pneumaticCraft/api/drone/IDrone.java | 61 - .../api/drone/IPathNavigator.java | 11 - .../api/drone/IPathfindHandler.java | 26 - .../drone/SpecialVariableRetrievalEvent.java | 60 - .../api/item/IInventoryItem.java | 20 - .../api/item/IPressurizable.java | 35 - .../api/item/IProgrammable.java | 34 - .../pneumaticCraft/api/item/ItemSupplier.java | 47 - .../java/pneumaticCraft/api/package-info.java | 5 - .../api/recipe/AssemblyRecipe.java | 49 - .../api/recipe/IPressureChamberRecipe.java | 34 - .../api/recipe/PressureChamberRecipe.java | 24 - .../api/tileentity/AirHandlerSupplier.java | 51 - .../api/tileentity/IAirHandler.java | 114 -- .../api/tileentity/IHeatExchanger.java | 24 - .../api/tileentity/IManoMeasurable.java | 14 - .../api/tileentity/IPneumaticMachine.java | 30 - .../api/universalSensor/EntityPollSensor.java | 31 - .../IBlockAndCoordinateEventSensor.java | 59 - .../IBlockAndCoordinatePollSensor.java | 63 - .../universalSensor/IEventSensorSetting.java | 23 - .../universalSensor/IPollSensorSetting.java | 27 - .../api/universalSensor/ISensorSetting.java | 59 - .../universalSensor/PlayerEventSensor.java | 33 - .../universalSensor/SensorRegistrator.java | 33 - src/api/java/thaumcraft/api/IGoggles.java | 22 - src/api/java/thaumcraft/api/IRepairable.java | 13 - .../thaumcraft/api/IRepairableExtended.java | 17 - src/api/java/thaumcraft/api/IRunicArmor.java | 22 - src/api/java/thaumcraft/api/IScribeTools.java | 14 - .../java/thaumcraft/api/IVisDiscountGear.java | 20 - src/api/java/thaumcraft/api/ItemApi.java | 70 - src/api/java/thaumcraft/api/ItemRunic.java | 21 - .../java/thaumcraft/api/ThaumcraftApi.java | 507 ----- .../thaumcraft/api/ThaumcraftApiHelper.java | 269 --- .../java/thaumcraft/api/TileThaumcraft.java | 63 - .../java/thaumcraft/api/WorldCoordinates.java | 117 -- .../java/thaumcraft/api/aspects/Aspect.java | 201 -- .../thaumcraft/api/aspects/AspectList.java | 256 --- .../api/aspects/AspectSourceHelper.java | 58 - .../api/aspects/IAspectContainer.java | 80 - .../thaumcraft/api/aspects/IAspectSource.java | 16 - .../api/aspects/IEssentiaContainerItem.java | 36 - .../api/aspects/IEssentiaTransport.java | 100 - .../api/crafting/CrucibleRecipe.java | 95 - .../api/crafting/IArcaneRecipe.java | 35 - .../api/crafting/IInfusionStabiliser.java | 19 - .../crafting/InfusionEnchantmentRecipe.java | 156 -- .../api/crafting/InfusionRecipe.java | 128 -- .../api/crafting/ShapedArcaneRecipe.java | 261 --- .../api/crafting/ShapelessArcaneRecipe.java | 157 -- .../DamageSourceIndirectThaumcraftEntity.java | 32 - .../damagesource/DamageSourceThaumcraft.java | 46 - .../thaumcraft/api/entities/ITaintedMob.java | 5 - src/api/java/thaumcraft/api/nodes/INode.java | 53 - .../java/thaumcraft/api/nodes/IRevealer.java | 22 - .../thaumcraft/api/nodes/NodeModifier.java | 6 - .../java/thaumcraft/api/nodes/NodeType.java | 6 - src/api/java/thaumcraft/api/package-info.java | 4 - .../api/potions/PotionFluxTaint.java | 67 - .../api/research/IScanEventHandler.java | 9 - .../api/research/ResearchCategories.java | 101 - .../api/research/ResearchCategoryList.java | 37 - .../thaumcraft/api/research/ResearchItem.java | 367 ---- .../thaumcraft/api/research/ResearchPage.java | 193 -- .../thaumcraft/api/research/ScanResult.java | 39 - .../thaumcraft/api/visnet/TileVisNode.java | 188 -- .../thaumcraft/api/visnet/VisNetHandler.java | 284 --- .../java/thaumcraft/api/wands/IWandFocus.java | 64 - .../api/wands/IWandRodOnUpdate.java | 16 - .../api/wands/IWandTriggerManager.java | 12 - .../java/thaumcraft/api/wands/IWandable.java | 25 - .../thaumcraft/api/wands/ItemFocusBasic.java | 166 -- .../java/thaumcraft/api/wands/StaffRod.java | 48 - .../java/thaumcraft/api/wands/WandCap.java | 129 -- .../java/thaumcraft/api/wands/WandRod.java | 158 -- .../api/wands/WandTriggerRegistry.java | 72 - .../java/vazkii/botania/api/BotaniaAPI.java | 363 ---- .../api/internal/DummyManaNetwork.java | 51 - .../api/internal/DummyMethodHandler.java | 135 -- .../botania/api/internal/DummyPage.java | 35 - .../botania/api/internal/DummySubTile.java | 18 - .../api/internal/IGuiLexiconEntry.java | 57 - .../api/internal/IInternalMethodHandler.java | 81 - .../botania/api/internal/IManaBurst.java | 62 - .../botania/api/internal/IManaNetwork.java | 68 - .../botania/api/item/IExoflameHeatable.java | 44 - .../api/item/IExtendedPlayerController.java | 29 - .../botania/api/item/IPetalApothecary.java | 30 - .../botania/api/item/IPixieSpawner.java | 30 - .../botania/api/lexicon/IAddonEntry.java | 29 - .../vazkii/botania/api/lexicon/ILexicon.java | 21 - .../botania/api/lexicon/ILexiconable.java | 29 - .../api/lexicon/IRecipeKeyProvider.java | 24 - .../botania/api/lexicon/KnowledgeType.java | 20 - .../botania/api/lexicon/LexiconCategory.java | 32 - .../botania/api/lexicon/LexiconEntry.java | 97 - .../botania/api/lexicon/LexiconPage.java | 67 - .../api/lexicon/LexiconRecipeMappings.java | 66 - .../botania/api/mana/BurstProperties.java | 37 - .../botania/api/mana/IClientManaHandler.java | 21 - .../api/mana/ICreativeManaProvider.java | 26 - .../vazkii/botania/api/mana/IKeyLocked.java | 30 - .../botania/api/mana/ILaputaImmobile.java | 23 - .../java/vazkii/botania/api/mana/ILens.java | 43 - .../vazkii/botania/api/mana/ILensEffect.java | 49 - .../vazkii/botania/api/mana/IManaBlock.java | 26 - .../botania/api/mana/IManaCollector.java | 43 - .../botania/api/mana/IManaCollisionGhost.java | 22 - .../vazkii/botania/api/mana/IManaItem.java | 69 - .../vazkii/botania/api/mana/IManaPool.java | 31 - .../botania/api/mana/IManaReceiver.java | 35 - .../vazkii/botania/api/mana/IManaTrigger.java | 24 - .../botania/api/mana/IManaUsingItem.java | 26 - .../api/mana/IPoolOverlayProvider.java | 26 - .../botania/api/mana/ITinyPlanetExcempt.java | 24 - .../botania/api/mana/ManaItemHandler.java | 201 -- .../botania/api/mana/ManaNetworkEvent.java | 57 - .../botania/api/mana/TileSignature.java | 15 - .../api/mana/spark/ISparkAttachable.java | 54 - .../botania/api/mana/spark/ISparkEntity.java | 65 - .../botania/api/mana/spark/SparkHelper.java | 33 - .../java/vazkii/botania/api/package-info.java | 4 - .../vazkii/botania/api/recipe/IElvenItem.java | 14 - .../botania/api/recipe/IFlowerComponent.java | 26 - .../botania/api/recipe/RecipeElvenTrade.java | 94 - .../api/recipe/RecipeManaInfusion.java | 81 - .../botania/api/recipe/RecipePetals.java | 97 - .../botania/api/recipe/RecipeRuneAltar.java | 31 - .../botania/api/subtile/ISpecialFlower.java | 21 - .../api/subtile/ISubTileContainer.java | 30 - .../botania/api/subtile/SubTileEntity.java | 126 -- .../api/subtile/SubTileFunctional.java | 212 --- .../api/subtile/SubTileGenerating.java | 245 --- .../botania/api/wand/ICoordBoundItem.java | 18 - .../vazkii/botania/api/wand/ITileBound.java | 31 - .../botania/api/wand/IWandBindable.java | 36 - .../vazkii/botania/api/wand/IWandHUD.java | 26 - .../vazkii/botania/api/wand/IWandable.java | 29 - .../api/wand/IWireframeAABBProvider.java | 25 - .../botania/api/wiki/IWikiProvider.java | 39 - .../botania/api/wiki/SimpleWikiProvider.java | 73 - .../vazkii/botania/api/wiki/WikiHooks.java | 43 - .../AlchemicalWizardry.java | 97 +- .../BloodMagicConfiguration.java | 230 ++- .../alchemicalWizardry/ModBlocks.java | 2 +- .../alchemicalWizardry/ModItems.java | 6 +- .../api/alchemy/energy/IReagentHandler.java | 14 +- .../alchemy/energy/TileReagentHandler.java | 14 +- .../energy/TileSegmentedReagentHandler.java | 24 +- .../api/altarRecipeRegistry/AltarRecipe.java | 2 +- .../api/event/AddToNetworkEvent.java | 5 +- .../api/event/ItemBindEvent.java | 4 +- .../api/event/ItemDrainInContainerEvent.java | 2 +- .../api/event/RitualActivatedEvent.java | 2 +- .../api/event/RitualEvent.java | 2 +- .../api/event/RitualRunEvent.java | 5 +- .../api/event/SoulNetworkEvent.java | 3 +- .../api/event/TeleposeEvent.java | 46 +- .../api/guide/OrbRecipeRenderer.java | 270 +-- .../api/guide/PageAltarRecipe.java | 138 +- .../api/guide/PageMultiBlock.java | 290 +-- .../api/guide/PageRitualMultiBlock.java | 175 +- .../api/harvest/HarvestRegistry.java | 16 +- .../api/harvest/IHarvestHandler.java | 8 +- .../api/items/ItemSpellMultiTool.java | 78 +- .../api/items/ShapedBloodOrbRecipe.java | 20 +- .../api/items/ShapelessBloodOrbRecipe.java | 6 + .../api/renderer/MRSRenderer.java | 12 +- .../api/rituals/IMasterRitualStone.java | 13 +- .../api/rituals/IRitualStone.java | 10 +- .../api/rituals/LocalRitualStorage.java | 26 +- .../api/rituals/RitualEffect.java | 6 +- .../api/rituals/Rituals.java | 27 +- .../api/sacrifice/PlayerSacrificeHandler.java | 17 +- .../soulNetwork/ComplexNetworkHandler.java | 31 - .../api/soulNetwork/SoulNetworkHandler.java | 8 +- .../api/spell/APISpellHelper.java | 41 +- .../api/spell/EntitySpellProjectile.java | 120 +- .../spell/ExtrapolatedMeleeEntityEffect.java | 2 +- .../api/spell/IOnBreakBlock.java | 6 +- .../spell/MeleeSpellCenteredWorldEffect.java | 13 +- .../api/spell/SpellParadigmTool.java | 8 +- .../api/tile/ISpellTile.java | 4 +- .../client/ClientEventHandler.java | 50 +- .../client/ClientProxy.java | 10 +- .../client/ClientUtils.java | 348 ---- .../client/KeyBindings.java | 1 - .../client/POVArmourModelWrapper.java | 47 - .../client/gui/ConfigGui.java | 32 +- .../client/nei/NEIAlchemyRecipeHandler.java | 356 ++-- .../client/nei/NEIAltarRecipeHandler.java | 374 ++-- .../client/nei/NEIBindingRitualHandler.java | 272 +-- .../client/nei/NEIBloodOrbShapedHandler.java | 284 +-- .../nei/NEIBloodOrbShapelessHandler.java | 270 +-- .../client/nei/NEIConfig.java | 70 +- .../client/renderer/HUDElement.java | 30 +- .../client/renderer/HUDUtils.java | 36 +- .../client/renderer/RenderFakeBlocks.java | 69 +- .../client/renderer/RenderHelper.java | 36 +- .../client/renderer/RitualDivinerRender.java | 31 +- .../common/AlchemicalWizardryEventHooks.java | 72 +- .../common/AlchemicalWizardryFuelHandler.java | 8 +- .../common/CoordAndRange.java | 12 + .../common/EntityAITargetAggro.java | 2 +- .../alchemicalWizardry/common/ItemType.java | 4 +- .../common/LifeBucketHandler.java | 16 +- .../common/LifeEssence.java | 3 +- .../common/NewPacketHandler.java | 380 ++-- .../achievements/AchievementTrigger.java | 21 +- .../achievements/AchievementsRegistry.java | 75 +- .../achievements/ICraftAchievement.java | 11 + .../achievements/IPickupAchievement.java | 11 + .../common/achievements/ModAchievements.java | 53 +- .../common/block/ArmourForge.java | 2 +- .../common/block/BlockHomHeart.java | 2 +- .../common/block/BlockSpellParadigm.java | 2 +- .../common/block/BlockTeleposer.java | 137 +- .../common/block/IOrientable.java | 10 +- .../bloodAltarUpgrade/AltarComponent.java | 6 + .../bloodAltarUpgrade/UpgradedAltars.java | 164 +- .../common/book/BloodMagicGuide.java | 1672 ++++++++--------- .../common/commands/CommandBind.java | 76 - .../common/commands/CommandSN.java | 137 -- .../common/commands/CommandUnbind.java | 52 - .../compress/StorageBlockCraftingManager.java | 4 +- .../common/demonVillage/BlockSet.java | 20 +- .../demonVillage/BuildingSchematic.java | 16 +- .../common/demonVillage/DemonBuilding.java | 14 +- .../common/demonVillage/DemonVillagePath.java | 96 +- .../common/demonVillage/GridSpaceHolder.java | 20 +- .../ai/EntityAIOccasionalRangedAttack.java | 3 +- .../ai/EntityDemonAIHurtByTarget.java | 8 +- .../demon/EntityMinorDemonGrunt.java | 61 +- .../demonHoard/demon/IHoardDemon.java | 8 +- .../loot/DemonVillageLootRegistry.java | 14 +- .../tileEntity/BlockDemonChest.java | 19 +- .../demonVillage/tileEntity/TEDemonChest.java | 24 +- .../tileEntity/TEDemonPortal.java | 180 +- .../common/entity/mob/BookEntityItem.java | 2 +- .../common/entity/mob/EntityBileDemon.java | 368 +--- .../common/entity/mob/EntityBoulderFist.java | 359 +--- .../common/entity/mob/EntityDemon.java | 410 +++- .../common/entity/mob/EntityElemental.java | 247 ++- .../common/entity/mob/EntityFallenAngel.java | 353 +--- .../common/entity/mob/EntityIceDemon.java | 351 ---- .../entity/mob/EntityLowerGuardian.java | 368 +--- .../common/entity/mob/EntityShade.java | 352 +--- .../entity/mob/EntitySmallEarthGolem.java | 352 +--- .../entity/mob/EntityWingedFireDemon.java | 360 +--- .../entity/mob/MailOrderEntityItem.java | 19 +- .../projectile/EnergyBlastProjectile.java | 2 +- ...ntityEnergyBazookaSecondaryProjectile.java | 2 +- .../entity/projectile/HolyProjectile.java | 8 +- .../entity/projectile/IceProjectile.java | 4 +- .../projectile/LightningBoltProjectile.java | 4 +- .../entity/projectile/MudProjectile.java | 4 +- .../entity/projectile/TeleportProjectile.java | 4 +- .../entity/projectile/WaterProjectile.java | 4 +- .../entity/projectile/WindGustProjectile.java | 4 +- .../harvest/AgriCraftCropHarvestHandler.java | 83 - .../harvest/BloodMagicHarvestHandler.java | 22 +- .../harvest/CactusReedHarvestHandler.java | 10 +- .../GenericItemStackHarvestHandler.java | 36 +- ...GenericPamSeedlessFruitHarvestHandler.java | 18 +- .../harvest/GenericSeededHarvestHandler.java | 29 +- .../common/harvest/GourdHarvestHandler.java | 8 +- .../common/items/BoundAxe.java | 7 +- .../common/items/BoundPickaxe.java | 5 - .../common/items/BoundShovel.java | 5 - .../common/items/CheatyItem.java | 2 +- .../common/items/DaggerOfSacrifice.java | 2 +- .../common/items/DemonPlacer.java | 29 +- .../common/items/EnergyBattery.java | 2 +- .../common/items/EnergyItems.java | 2 +- .../common/items/EnergySword.java | 1 - .../common/items/ItemDiabloKey.java | 2 +- .../common/items/ItemRitualDismantler.java | 38 +- .../common/items/TelepositionFocus.java | 16 +- .../common/items/armour/BoundArmour.java | 7 +- .../common/items/armour/OmegaArmour.java | 2 +- .../items/energy/ItemAttunedCrystal.java | 4 +- .../common/items/sigil/SigilOfMagnetism.java | 8 +- .../common/items/sigil/SigilOfTheBridge.java | 2 +- .../items/sigil/holding/InventoryHolding.java | 45 +- .../items/sigil/holding/ScrollHelper.java | 10 +- .../items/sigil/holding/SigilOfHolding.java | 52 +- .../common/omega/OmegaParadigmEarth.java | 5 +- .../common/omega/OmegaParadigmFire.java | 12 +- .../common/omega/OmegaParadigmWater.java | 11 +- .../common/omega/OmegaParadigmWind.java | 2 +- .../renderer/AlchemyCircleRenderer.java | 18 +- .../common/renderer/BeamRenderer.java | 48 +- .../block/RenderAlchemicCalcinator.java | 2 +- .../common/renderer/block/ShaderHelper.java | 196 ++ .../renderer/model/ModelBloodAltar.java | 20 +- .../common/renderer/model/ModelElemental.java | 12 +- .../common/rituals/LocalStorageAlphaPact.java | 50 +- .../common/rituals/RitualEffectAlphaPact.java | 357 ++-- .../rituals/RitualEffectAnimalGrowth.java | 9 +- .../rituals/RitualEffectApiaryOverclock.java | 7 +- .../rituals/RitualEffectAutoAlchemy.java | 7 +- .../common/rituals/RitualEffectBinding.java | 19 +- .../rituals/RitualEffectBiomeChanger.java | 8 +- .../rituals/RitualEffectContainment.java | 7 +- .../common/rituals/RitualEffectCrafting.java | 7 +- .../common/rituals/RitualEffectCrushing.java | 7 +- .../rituals/RitualEffectDemonPortal.java | 7 +- .../common/rituals/RitualEffectEllipsoid.java | 7 +- .../rituals/RitualEffectEvaporation.java | 7 +- .../common/rituals/RitualEffectExpulsion.java | 7 +- .../rituals/RitualEffectFeatheredEarth.java | 9 +- .../rituals/RitualEffectFeatheredKnife.java | 7 +- .../common/rituals/RitualEffectFlight.java | 9 +- .../rituals/RitualEffectFullStomach.java | 7 +- .../common/rituals/RitualEffectGrowth.java | 9 +- .../common/rituals/RitualEffectHarvest.java | 8 +- .../common/rituals/RitualEffectHealing.java | 7 +- .../rituals/RitualEffectInterdiction.java | 9 +- .../rituals/RitualEffectItemRouting.java | 7 +- .../rituals/RitualEffectItemSuction.java | 9 +- .../common/rituals/RitualEffectJumping.java | 7 +- .../common/rituals/RitualEffectLava.java | 55 +- .../common/rituals/RitualEffectLeap.java | 7 +- .../rituals/RitualEffectLifeConduit.java | 7 +- .../common/rituals/RitualEffectMagnetic.java | 7 +- .../rituals/RitualEffectOmegaStalling.java | 7 +- .../common/rituals/RitualEffectOmegaTest.java | 7 +- .../common/rituals/RitualEffectSpawnWard.java | 9 +- .../rituals/RitualEffectSphereCreator.java | 26 +- .../rituals/RitualEffectSummonMeteor.java | 11 +- .../rituals/RitualEffectSupression.java | 40 +- .../common/rituals/RitualEffectUnbinding.java | 15 +- .../rituals/RitualEffectVeilOfEvil.java | 23 +- .../common/rituals/RitualEffectWater.java | 64 +- .../rituals/RitualEffectWellOfSuffering.java | 30 +- .../routing/RoutingFocusLogicModItems.java | 2 +- .../common/spell/complex/SpellModifier.java | 21 + .../spell/complex/SpellModifierDefault.java | 9 + .../spell/complex/SpellModifierDefensive.java | 9 + .../complex/SpellModifierEnvironmental.java | 9 + .../spell/complex/SpellModifierOffensive.java | 9 + .../spell/complex/effect/SpellHelper.java | 227 ++- .../cse/earth/CSEMeleeDefaultEarth.java | 1 + .../cse/earth/CSEMeleeDefensiveEarth.java | 1 + .../cse/earth/CSEMeleeEnvironmentalEarth.java | 1 + .../cse/earth/CSEMeleeOffensiveEarth.java | 1 + .../cse/earth/CSEProjectileDefaultEarth.java | 1 + .../CSEProjectileEnvironmentalEarth.java | 1 + .../earth/CSEProjectileOffensiveEarth.java | 1 + .../effect/cse/earth/CSESelfDefaultEarth.java | 1 + .../cse/earth/CSESelfDefensiveEarth.java | 1 + .../cse/earth/CSESelfOffensiveEarth.java | 1 + .../effect/cse/earth/CSEToolDefaultEarth.java | 4 + .../cse/earth/CSEToolEnvironmentalEarth.java | 1 + .../cse/earth/CSEToolOffensiveEarth.java | 1 + .../cse/ice/CSEMeleeEnvironmentalIce.java | 2 +- .../effect/cse/wind/CSEMeleeDefaultWind.java | 1 + .../cse/wind/CSEProjectileDefensiveWind.java | 2 +- .../earth/MeleeDefaultEarth.java | 17 +- .../earth/MeleeDefensiveEarth.java | 17 +- .../earth/MeleeEnvironmentalEarth.java | 22 +- .../earth/MeleeOffensiveEarth.java | 10 +- .../earth/ProjectileDefaultEarth.java | 24 +- .../earth/ProjectileDefensiveEarth.java | 24 +- .../earth/ProjectileEnvironmentalEarth.java | 34 +- .../earth/ProjectileOffensiveEarth.java | 26 +- .../impactEffects/earth/SelfDefaultEarth.java | 20 +- .../earth/SelfDefensiveEarth.java | 2 +- .../earth/SelfOffensiveEarth.java | 16 +- .../earth/ToolEnvironmentalEarth.java | 26 +- .../earth/ToolOffensiveEarth.java | 7 +- .../fire/MeleeDefensiveFire.java | 25 +- .../fire/MeleeEnvironmentalFire.java | 10 +- .../fire/ProjectileDefaultFire.java | 30 +- .../fire/ProjectileDefensiveFire.java | 19 +- .../fire/ProjectileEnvironmentalFire.java | 18 +- .../fire/ProjectileOffensiveFire.java | 20 +- .../impactEffects/fire/SelfDefensiveFire.java | 21 +- .../fire/SelfEnvironmentalFire.java | 21 +- .../impactEffects/fire/ToolDefaultFire.java | 3 +- .../fire/ToolEnvironmentalFire.java | 18 +- .../impactEffects/ice/MeleeDefaultIce.java | 1 + .../impactEffects/ice/MeleeDefensiveIce.java | 27 +- .../impactEffects/ice/MeleeOffensiveIce.java | 19 +- .../ice/ProjectileDefaultIce.java | 19 +- .../ice/ProjectileDefensiveIce.java | 16 +- .../ice/ProjectileEnvironmentalIce.java | 14 +- .../ice/ProjectileOffensiveIce.java | 2 +- .../impactEffects/ice/SelfDefaultIce.java | 17 +- .../ice/SelfEnvironmentalIce.java | 25 +- .../impactEffects/ice/ToolDefaultIce.java | 5 + .../impactEffects/ice/ToolDefensiveIce.java | 31 +- .../impactEffects/tool/DigAreaEffect.java | 96 +- .../impactEffects/tool/DigAreaTunnel.java | 40 +- .../impactEffects/tool/RightClickTunnel.java | 40 +- .../wind/MeleeEnvironmentalWind.java | 17 +- .../wind/ProjectileDefaultWind.java | 5 +- .../wind/ProjectileEnvironmentalWind.java | 14 +- .../wind/ProjectileOffensiveWind.java | 6 +- .../impactEffects/wind/ToolDefensiveWind.java | 5 +- .../wind/ToolEnvironmentalWind.java | 20 +- .../impactEffects/wind/ToolOffensiveWind.java | 2 +- .../spell/simple/HomSpellComponent.java | 1 + .../common/spell/simple/ISimpleSpell.java | 8 +- .../common/spell/simple/SpellEarthBender.java | 126 +- .../common/spell/simple/SpellFireBurst.java | 93 +- .../common/spell/simple/SpellFrozenWater.java | 117 +- .../common/spell/simple/SpellHolyBlast.java | 9 +- .../spell/simple/SpellLightningBolt.java | 5 +- .../common/spell/simple/SpellTeleport.java | 111 +- .../common/spell/simple/SpellWateryGrave.java | 29 +- .../common/spell/simple/SpellWindGust.java | 14 +- .../summoning/meteor/MeteorParadigm.java | 26 +- .../common/thread/GAPIChecker.java | 25 +- .../common/thread/ThreadDownloadGAPI.java | 2 +- .../tileEntity/TEAlchemicCalcinator.java | 93 +- .../common/tileEntity/TEAltar.java | 82 +- .../common/tileEntity/TEBellJar.java | 30 +- .../common/tileEntity/TEConduit.java | 7 - .../common/tileEntity/TECrucible.java | 50 +- .../common/tileEntity/TEHomHeart.java | 79 +- .../common/tileEntity/TEInventory.java | 39 +- .../common/tileEntity/TEMasterStone.java | 91 +- .../common/tileEntity/TEMimicBlock.java | 50 +- .../common/tileEntity/TEOrientable.java | 34 +- .../common/tileEntity/TEPedestal.java | 15 +- .../common/tileEntity/TEPlinth.java | 40 +- .../common/tileEntity/TEReagentConduit.java | 94 +- .../common/tileEntity/TESchematicSaver.java | 42 +- .../common/tileEntity/TESocket.java | 9 +- .../common/tileEntity/TESpectralBlock.java | 25 +- .../tileEntity/TESpectralContainer.java | 30 +- .../common/tileEntity/TESpellBlock.java | 16 +- .../common/tileEntity/TESpellEffectBlock.java | 2 +- .../tileEntity/TESpellEnhancementBlock.java | 6 +- .../tileEntity/TESpellModifierBlock.java | 2 +- .../tileEntity/TESpellParadigmBlock.java | 10 +- .../common/tileEntity/TETeleposer.java | 41 +- .../common/tileEntity/TEWritingTable.java | 64 +- .../common/tileEntity/gui/GuiHandler.java | 18 +- .../common/tileEntity/gui/GuiTeleposer.java | 1 + .../assets/alchemicalwizardry/lang/en_US.lang | 54 +- .../assets/alchemicalwizardry/lang/zh_CN.lang | 268 +-- .../bloodutils/textures/blocks/area_air.png | Bin 0 -> 1405 bytes .../textures/blocks/area_air.png.mcmeta | 16 + .../textures/blocks/area_darkness.png | Bin 0 -> 1581 bytes .../textures/blocks/area_darkness.png.mcmeta | 16 + .../bloodutils/textures/blocks/area_earth.png | Bin 0 -> 1492 bytes .../textures/blocks/area_earth.png.mcmeta | 16 + .../bloodutils/textures/blocks/area_fire.png | Bin 0 -> 1274 bytes .../textures/blocks/area_fire.png.mcmeta | 16 + .../bloodutils/textures/blocks/area_light.png | Bin 0 -> 1495 bytes .../textures/blocks/area_light.png.mcmeta | 16 + .../textures/blocks/area_rainbow.png | Bin 0 -> 1608 bytes .../textures/blocks/area_rainbow.png.mcmeta | 16 + .../bloodutils/textures/blocks/area_water.png | Bin 0 -> 1295 bytes .../textures/blocks/area_water.png.mcmeta | 16 + .../textures/blocks/block_bloodDiamond.png | Bin 0 -> 281 bytes .../textures/blocks/block_bloodIron.png | Bin 0 -> 194 bytes .../bloodutils/textures/blocks/builder.png | Bin 0 -> 821 bytes .../bloodutils/textures/blocks/discoball.png | Bin 0 -> 244 bytes .../textures/blocks/discoball.png.mcmeta | 22 + .../textures/blocks/essence_darkness.png | Bin 0 -> 167 bytes .../textures/blocks/essence_light.png | Bin 0 -> 168 bytes .../textures/blocks/essence_rainbow.png | Bin 0 -> 188 bytes .../blocks/essence_rainbow.png.mcmeta | 16 + .../bloodutils/textures/blocks/progress.png | Bin 0 -> 799 bytes .../assets/bloodutils/textures/gui/altar.png | Bin 0 -> 3371 bytes .../bloodutils/textures/gui/crafting.png | Bin 0 -> 551 bytes .../assets/bloodutils/textures/gui/front.png | Bin 0 -> 2881 bytes .../assets/bloodutils/textures/gui/guide.png | Bin 0 -> 8642 bytes .../textures/items/bloodShard_royal.png | Bin 0 -> 400 bytes .../textures/items/diamond_blood.png | Bin 0 -> 316 bytes .../bloodutils/textures/items/gem_air.png | Bin 0 -> 525 bytes .../textures/items/gem_air.png.mcmeta | 16 + .../textures/items/gem_darkness.png | Bin 0 -> 499 bytes .../textures/items/gem_darkness.png.mcmeta | 16 + .../bloodutils/textures/items/gem_earth.png | Bin 0 -> 508 bytes .../textures/items/gem_earth.png.mcmeta | 16 + .../bloodutils/textures/items/gem_empty.png | Bin 0 -> 315 bytes .../bloodutils/textures/items/gem_fire.png | Bin 0 -> 464 bytes .../textures/items/gem_fire.png.mcmeta | 16 + .../bloodutils/textures/items/gem_light.png | Bin 0 -> 502 bytes .../textures/items/gem_light.png.mcmeta | 16 + .../bloodutils/textures/items/gem_rainbow.png | Bin 0 -> 422 bytes .../textures/items/gem_rainbow.png.mcmeta | 16 + .../bloodutils/textures/items/gem_water.png | Bin 0 -> 484 bytes .../textures/items/gem_water.png.mcmeta | 16 + .../bloodutils/textures/items/guide.png | Bin 0 -> 421 bytes .../bloodutils/textures/items/iron_blood.png | Bin 0 -> 286 bytes .../items/sigil_advancedDivination.png | Bin 0 -> 616 bytes .../textures/items/sigil_ritual.png | Bin 0 -> 587 bytes .../textures/items/tool_creative.png | Bin 0 -> 214 bytes .../textures/misc/screenshots/t1.png | Bin 0 -> 53606 bytes .../assets/bloodutils/textures/misc/tab.png | Bin 0 -> 277 bytes .../textures/models/model_guide.png | Bin 0 -> 322 bytes .../textures/models/model_reviver.png | Bin 0 -> 1058 bytes .../creative_inventory/tab_blood.png | Bin 0 -> 1023 bytes 713 files changed, 6502 insertions(+), 27334 deletions(-) delete mode 100644 src/api/java/forestry/api/apiculture/BeeManager.java delete mode 100644 src/api/java/forestry/api/apiculture/EnumBeeChromosome.java delete mode 100644 src/api/java/forestry/api/apiculture/EnumBeeType.java delete mode 100644 src/api/java/forestry/api/apiculture/FlowerManager.java delete mode 100644 src/api/java/forestry/api/apiculture/IAlleleBeeEffect.java delete mode 100644 src/api/java/forestry/api/apiculture/IAlleleBeeSpecies.java delete mode 100644 src/api/java/forestry/api/apiculture/IAlleleBeeSpeciesCustom.java delete mode 100644 src/api/java/forestry/api/apiculture/IAlvearyComponent.java delete mode 100644 src/api/java/forestry/api/apiculture/IApiaristTracker.java delete mode 100644 src/api/java/forestry/api/apiculture/IArmorApiarist.java delete mode 100644 src/api/java/forestry/api/apiculture/IBee.java delete mode 100644 src/api/java/forestry/api/apiculture/IBeeFactory.java delete mode 100644 src/api/java/forestry/api/apiculture/IBeeGenome.java delete mode 100644 src/api/java/forestry/api/apiculture/IBeeHousing.java delete mode 100644 src/api/java/forestry/api/apiculture/IBeeIconProvider.java delete mode 100644 src/api/java/forestry/api/apiculture/IBeeListener.java delete mode 100644 src/api/java/forestry/api/apiculture/IBeeModifier.java delete mode 100644 src/api/java/forestry/api/apiculture/IBeeMutation.java delete mode 100644 src/api/java/forestry/api/apiculture/IBeeMutationCustom.java delete mode 100644 src/api/java/forestry/api/apiculture/IBeeMutationFactory.java delete mode 100644 src/api/java/forestry/api/apiculture/IBeeRoot.java delete mode 100644 src/api/java/forestry/api/apiculture/IBeekeepingLogic.java delete mode 100644 src/api/java/forestry/api/apiculture/IBeekeepingMode.java delete mode 100644 src/api/java/forestry/api/apiculture/IHiveDrop.java delete mode 100644 src/api/java/forestry/api/apiculture/IHiveFrame.java delete mode 100644 src/api/java/forestry/api/apiculture/IJubilanceFactory.java delete mode 100644 src/api/java/forestry/api/apiculture/IJubilanceProvider.java delete mode 100644 src/api/java/forestry/api/apiculture/hives/HiveManager.java delete mode 100644 src/api/java/forestry/api/apiculture/hives/IHiveDescription.java delete mode 100644 src/api/java/forestry/api/apiculture/hives/IHiveGen.java delete mode 100644 src/api/java/forestry/api/apiculture/hives/IHiveGenHelper.java delete mode 100644 src/api/java/forestry/api/apiculture/hives/IHiveRegistry.java delete mode 100644 src/api/java/forestry/api/apiculture/hives/package-info.java delete mode 100644 src/api/java/forestry/api/apiculture/package-info.java delete mode 100644 src/api/java/forestry/api/arboriculture/EnumGermlingType.java delete mode 100644 src/api/java/forestry/api/arboriculture/EnumGrowthConditions.java delete mode 100644 src/api/java/forestry/api/arboriculture/EnumTreeChromosome.java delete mode 100644 src/api/java/forestry/api/arboriculture/IAlleleFruit.java delete mode 100644 src/api/java/forestry/api/arboriculture/IAlleleGrowth.java delete mode 100644 src/api/java/forestry/api/arboriculture/IAlleleLeafEffect.java delete mode 100644 src/api/java/forestry/api/arboriculture/IAlleleTreeSpecies.java delete mode 100644 src/api/java/forestry/api/arboriculture/IArboristTracker.java delete mode 100644 src/api/java/forestry/api/arboriculture/IFruitProvider.java delete mode 100644 src/api/java/forestry/api/arboriculture/IGrowthProvider.java delete mode 100644 src/api/java/forestry/api/arboriculture/ILeafTickHandler.java delete mode 100644 src/api/java/forestry/api/arboriculture/IToolGrafter.java delete mode 100644 src/api/java/forestry/api/arboriculture/ITree.java delete mode 100644 src/api/java/forestry/api/arboriculture/ITreeGenome.java delete mode 100644 src/api/java/forestry/api/arboriculture/ITreeModifier.java delete mode 100644 src/api/java/forestry/api/arboriculture/ITreeMutation.java delete mode 100644 src/api/java/forestry/api/arboriculture/ITreeRoot.java delete mode 100644 src/api/java/forestry/api/arboriculture/ITreekeepingMode.java delete mode 100644 src/api/java/forestry/api/arboriculture/package-info.java delete mode 100644 src/api/java/forestry/api/circuits/ChipsetManager.java delete mode 100644 src/api/java/forestry/api/circuits/ICircuit.java delete mode 100644 src/api/java/forestry/api/circuits/ICircuitBoard.java delete mode 100644 src/api/java/forestry/api/circuits/ICircuitLayout.java delete mode 100644 src/api/java/forestry/api/circuits/ICircuitLibrary.java delete mode 100644 src/api/java/forestry/api/circuits/ICircuitRegistry.java delete mode 100644 src/api/java/forestry/api/circuits/ISolderManager.java delete mode 100644 src/api/java/forestry/api/circuits/package-info.java delete mode 100644 src/api/java/forestry/api/core/BiomeHelper.java delete mode 100644 src/api/java/forestry/api/core/EnumHumidity.java delete mode 100644 src/api/java/forestry/api/core/EnumTemperature.java delete mode 100644 src/api/java/forestry/api/core/ErrorStateRegistry.java delete mode 100644 src/api/java/forestry/api/core/ForestryAPI.java delete mode 100644 src/api/java/forestry/api/core/ForestryEvent.java delete mode 100644 src/api/java/forestry/api/core/IArmorNaturalist.java delete mode 100644 src/api/java/forestry/api/core/IErrorState.java delete mode 100644 src/api/java/forestry/api/core/IForestryConstants.java delete mode 100644 src/api/java/forestry/api/core/IGameMode.java delete mode 100644 src/api/java/forestry/api/core/IIconProvider.java delete mode 100644 src/api/java/forestry/api/core/INBTTagable.java delete mode 100644 src/api/java/forestry/api/core/IStructureLogic.java delete mode 100644 src/api/java/forestry/api/core/ITextureManager.java delete mode 100644 src/api/java/forestry/api/core/ITileStructure.java delete mode 100644 src/api/java/forestry/api/core/IToolPipette.java delete mode 100644 src/api/java/forestry/api/core/IToolScoop.java delete mode 100644 src/api/java/forestry/api/core/Tabs.java delete mode 100644 src/api/java/forestry/api/core/package-info.java delete mode 100644 src/api/java/forestry/api/farming/Farmables.java delete mode 100644 src/api/java/forestry/api/farming/ICrop.java delete mode 100644 src/api/java/forestry/api/farming/IFarmComponent.java delete mode 100644 src/api/java/forestry/api/farming/IFarmHousing.java delete mode 100644 src/api/java/forestry/api/farming/IFarmInterface.java delete mode 100644 src/api/java/forestry/api/farming/IFarmListener.java delete mode 100644 src/api/java/forestry/api/farming/IFarmLogic.java delete mode 100644 src/api/java/forestry/api/farming/IFarmable.java delete mode 100644 src/api/java/forestry/api/farming/package-info.java delete mode 100644 src/api/java/forestry/api/food/BeverageManager.java delete mode 100644 src/api/java/forestry/api/food/IBeverageEffect.java delete mode 100644 src/api/java/forestry/api/food/IInfuserManager.java delete mode 100644 src/api/java/forestry/api/food/IIngredientManager.java delete mode 100644 src/api/java/forestry/api/food/package-info.java delete mode 100644 src/api/java/forestry/api/fuels/EngineBronzeFuel.java delete mode 100644 src/api/java/forestry/api/fuels/EngineCopperFuel.java delete mode 100644 src/api/java/forestry/api/fuels/FermenterFuel.java delete mode 100644 src/api/java/forestry/api/fuels/FuelManager.java delete mode 100644 src/api/java/forestry/api/fuels/GeneratorFuel.java delete mode 100644 src/api/java/forestry/api/fuels/MoistenerFuel.java delete mode 100644 src/api/java/forestry/api/fuels/RainSubstrate.java delete mode 100644 src/api/java/forestry/api/fuels/package-info.java delete mode 100644 src/api/java/forestry/api/genetics/AlleleManager.java delete mode 100644 src/api/java/forestry/api/genetics/EnumTolerance.java delete mode 100644 src/api/java/forestry/api/genetics/IAllele.java delete mode 100644 src/api/java/forestry/api/genetics/IAlleleArea.java delete mode 100644 src/api/java/forestry/api/genetics/IAlleleBoolean.java delete mode 100644 src/api/java/forestry/api/genetics/IAlleleEffect.java delete mode 100644 src/api/java/forestry/api/genetics/IAlleleFactory.java delete mode 100644 src/api/java/forestry/api/genetics/IAlleleFloat.java delete mode 100644 src/api/java/forestry/api/genetics/IAlleleFlowers.java delete mode 100644 src/api/java/forestry/api/genetics/IAlleleHandler.java delete mode 100644 src/api/java/forestry/api/genetics/IAlleleInteger.java delete mode 100644 src/api/java/forestry/api/genetics/IAllelePlantType.java delete mode 100644 src/api/java/forestry/api/genetics/IAlleleRegistry.java delete mode 100644 src/api/java/forestry/api/genetics/IAlleleSpecies.java delete mode 100644 src/api/java/forestry/api/genetics/IAlleleSpeciesCustom.java delete mode 100644 src/api/java/forestry/api/genetics/IAlleleTolerance.java delete mode 100644 src/api/java/forestry/api/genetics/IBreedingTracker.java delete mode 100644 src/api/java/forestry/api/genetics/IChromosome.java delete mode 100644 src/api/java/forestry/api/genetics/IChromosomeType.java delete mode 100644 src/api/java/forestry/api/genetics/IClassification.java delete mode 100644 src/api/java/forestry/api/genetics/IClimateHelper.java delete mode 100644 src/api/java/forestry/api/genetics/IEffectData.java delete mode 100644 src/api/java/forestry/api/genetics/IFlower.java delete mode 100644 src/api/java/forestry/api/genetics/IFlowerGrowthRule.java delete mode 100644 src/api/java/forestry/api/genetics/IFlowerProvider.java delete mode 100644 src/api/java/forestry/api/genetics/IFlowerRegistry.java delete mode 100644 src/api/java/forestry/api/genetics/IFruitBearer.java delete mode 100644 src/api/java/forestry/api/genetics/IFruitFamily.java delete mode 100644 src/api/java/forestry/api/genetics/IGenome.java delete mode 100644 src/api/java/forestry/api/genetics/IHousing.java delete mode 100644 src/api/java/forestry/api/genetics/IIndividual.java delete mode 100644 src/api/java/forestry/api/genetics/IIndividualLiving.java delete mode 100644 src/api/java/forestry/api/genetics/ILegacyHandler.java delete mode 100644 src/api/java/forestry/api/genetics/IMutation.java delete mode 100644 src/api/java/forestry/api/genetics/IMutationCondition.java delete mode 100644 src/api/java/forestry/api/genetics/IMutationCustom.java delete mode 100644 src/api/java/forestry/api/genetics/IPollinatable.java delete mode 100644 src/api/java/forestry/api/genetics/ISpeciesRoot.java delete mode 100644 src/api/java/forestry/api/genetics/package-info.java delete mode 100644 src/api/java/forestry/api/lepidopterology/EnumButterflyChromosome.java delete mode 100644 src/api/java/forestry/api/lepidopterology/EnumFlutterType.java delete mode 100644 src/api/java/forestry/api/lepidopterology/IAlleleButterflyEffect.java delete mode 100644 src/api/java/forestry/api/lepidopterology/IAlleleButterflySpecies.java delete mode 100644 src/api/java/forestry/api/lepidopterology/IButterfly.java delete mode 100644 src/api/java/forestry/api/lepidopterology/IButterflyGenome.java delete mode 100644 src/api/java/forestry/api/lepidopterology/IButterflyMutation.java delete mode 100644 src/api/java/forestry/api/lepidopterology/IButterflyNursery.java delete mode 100644 src/api/java/forestry/api/lepidopterology/IButterflyRoot.java delete mode 100644 src/api/java/forestry/api/lepidopterology/IEntityButterfly.java delete mode 100644 src/api/java/forestry/api/lepidopterology/ILepidopteristTracker.java delete mode 100644 src/api/java/forestry/api/lepidopterology/package-info.java delete mode 100644 src/api/java/forestry/api/mail/EnumAddressee.java delete mode 100644 src/api/java/forestry/api/mail/EnumPostage.java delete mode 100644 src/api/java/forestry/api/mail/ILetter.java delete mode 100644 src/api/java/forestry/api/mail/ILetterHandler.java delete mode 100644 src/api/java/forestry/api/mail/IMailAddress.java delete mode 100644 src/api/java/forestry/api/mail/IPostOffice.java delete mode 100644 src/api/java/forestry/api/mail/IPostRegistry.java delete mode 100644 src/api/java/forestry/api/mail/IPostalCarrier.java delete mode 100644 src/api/java/forestry/api/mail/IPostalState.java delete mode 100644 src/api/java/forestry/api/mail/IStamps.java delete mode 100644 src/api/java/forestry/api/mail/ITradeStation.java delete mode 100644 src/api/java/forestry/api/mail/PostManager.java delete mode 100644 src/api/java/forestry/api/mail/TradeStationInfo.java delete mode 100644 src/api/java/forestry/api/mail/package-info.java delete mode 100644 src/api/java/forestry/api/recipes/ICarpenterManager.java delete mode 100644 src/api/java/forestry/api/recipes/ICentrifugeManager.java delete mode 100644 src/api/java/forestry/api/recipes/ICraftingProvider.java delete mode 100644 src/api/java/forestry/api/recipes/IFabricatorManager.java delete mode 100644 src/api/java/forestry/api/recipes/IFermenterManager.java delete mode 100644 src/api/java/forestry/api/recipes/IMoistenerManager.java delete mode 100644 src/api/java/forestry/api/recipes/ISqueezerManager.java delete mode 100644 src/api/java/forestry/api/recipes/IStillManager.java delete mode 100644 src/api/java/forestry/api/recipes/IVariableFermentable.java delete mode 100644 src/api/java/forestry/api/recipes/RecipeManagers.java delete mode 100644 src/api/java/forestry/api/recipes/package-info.java delete mode 100644 src/api/java/forestry/api/storage/BackpackEvent.java delete mode 100644 src/api/java/forestry/api/storage/BackpackManager.java delete mode 100644 src/api/java/forestry/api/storage/BackpackResupplyEvent.java delete mode 100644 src/api/java/forestry/api/storage/BackpackStowEvent.java delete mode 100644 src/api/java/forestry/api/storage/EnumBackpackType.java delete mode 100644 src/api/java/forestry/api/storage/IBackpackDefinition.java delete mode 100644 src/api/java/forestry/api/storage/IBackpackInterface.java delete mode 100644 src/api/java/forestry/api/storage/ICrateRegistry.java delete mode 100644 src/api/java/forestry/api/storage/StorageManager.java delete mode 100644 src/api/java/forestry/api/storage/package-info.java delete mode 100644 src/api/java/forestry/api/world/ITreeGenData.java delete mode 100644 src/api/java/forestry/api/world/IWorldGenInterface.java delete mode 100644 src/api/java/forestry/api/world/WorldGenManager.java delete mode 100644 src/api/java/forestry/api/world/package-info.java delete mode 100644 src/api/java/pneumaticCraft/api/IHeatExchangerLogic.java delete mode 100644 src/api/java/pneumaticCraft/api/PneumaticRegistry.java delete mode 100644 src/api/java/pneumaticCraft/api/actuator/IActuator.java delete mode 100644 src/api/java/pneumaticCraft/api/block/BlockSupplier.java delete mode 100644 src/api/java/pneumaticCraft/api/block/IPneumaticWrenchable.java delete mode 100644 src/api/java/pneumaticCraft/api/client/GuiAnimatedStatSupplier.java delete mode 100644 src/api/java/pneumaticCraft/api/client/GuiElementRenderer.java delete mode 100644 src/api/java/pneumaticCraft/api/client/IGuiAnimatedStat.java delete mode 100644 src/api/java/pneumaticCraft/api/client/assemblymachine/AssemblyRenderOverriding.java delete mode 100644 src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IBlockTrackEntry.java delete mode 100644 src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IEntityTrackEntry.java delete mode 100644 src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IGuiScreen.java delete mode 100644 src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableBlock.java delete mode 100644 src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableEntity.java delete mode 100644 src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IOptionPage.java delete mode 100644 src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IUpgradeRenderHandler.java delete mode 100644 src/api/java/pneumaticCraft/api/client/pneumaticHelmet/RenderHandlerRegistry.java delete mode 100644 src/api/java/pneumaticCraft/api/drone/DroneConstructingEvent.java delete mode 100644 src/api/java/pneumaticCraft/api/drone/IBlockInteractHandler.java delete mode 100644 src/api/java/pneumaticCraft/api/drone/ICustomBlockInteract.java delete mode 100644 src/api/java/pneumaticCraft/api/drone/IDrone.java delete mode 100644 src/api/java/pneumaticCraft/api/drone/IPathNavigator.java delete mode 100644 src/api/java/pneumaticCraft/api/drone/IPathfindHandler.java delete mode 100644 src/api/java/pneumaticCraft/api/drone/SpecialVariableRetrievalEvent.java delete mode 100644 src/api/java/pneumaticCraft/api/item/IInventoryItem.java delete mode 100644 src/api/java/pneumaticCraft/api/item/IPressurizable.java delete mode 100644 src/api/java/pneumaticCraft/api/item/IProgrammable.java delete mode 100644 src/api/java/pneumaticCraft/api/item/ItemSupplier.java delete mode 100644 src/api/java/pneumaticCraft/api/package-info.java delete mode 100644 src/api/java/pneumaticCraft/api/recipe/AssemblyRecipe.java delete mode 100644 src/api/java/pneumaticCraft/api/recipe/IPressureChamberRecipe.java delete mode 100644 src/api/java/pneumaticCraft/api/recipe/PressureChamberRecipe.java delete mode 100644 src/api/java/pneumaticCraft/api/tileentity/AirHandlerSupplier.java delete mode 100644 src/api/java/pneumaticCraft/api/tileentity/IAirHandler.java delete mode 100644 src/api/java/pneumaticCraft/api/tileentity/IHeatExchanger.java delete mode 100644 src/api/java/pneumaticCraft/api/tileentity/IManoMeasurable.java delete mode 100644 src/api/java/pneumaticCraft/api/tileentity/IPneumaticMachine.java delete mode 100644 src/api/java/pneumaticCraft/api/universalSensor/EntityPollSensor.java delete mode 100644 src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinateEventSensor.java delete mode 100644 src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinatePollSensor.java delete mode 100644 src/api/java/pneumaticCraft/api/universalSensor/IEventSensorSetting.java delete mode 100644 src/api/java/pneumaticCraft/api/universalSensor/IPollSensorSetting.java delete mode 100644 src/api/java/pneumaticCraft/api/universalSensor/ISensorSetting.java delete mode 100644 src/api/java/pneumaticCraft/api/universalSensor/PlayerEventSensor.java delete mode 100644 src/api/java/pneumaticCraft/api/universalSensor/SensorRegistrator.java delete mode 100644 src/api/java/thaumcraft/api/IGoggles.java delete mode 100644 src/api/java/thaumcraft/api/IRepairable.java delete mode 100644 src/api/java/thaumcraft/api/IRepairableExtended.java delete mode 100644 src/api/java/thaumcraft/api/IRunicArmor.java delete mode 100644 src/api/java/thaumcraft/api/IScribeTools.java delete mode 100644 src/api/java/thaumcraft/api/IVisDiscountGear.java delete mode 100644 src/api/java/thaumcraft/api/ItemApi.java delete mode 100644 src/api/java/thaumcraft/api/ItemRunic.java delete mode 100644 src/api/java/thaumcraft/api/ThaumcraftApi.java delete mode 100644 src/api/java/thaumcraft/api/ThaumcraftApiHelper.java delete mode 100644 src/api/java/thaumcraft/api/TileThaumcraft.java delete mode 100644 src/api/java/thaumcraft/api/WorldCoordinates.java delete mode 100644 src/api/java/thaumcraft/api/aspects/Aspect.java delete mode 100644 src/api/java/thaumcraft/api/aspects/AspectList.java delete mode 100644 src/api/java/thaumcraft/api/aspects/AspectSourceHelper.java delete mode 100644 src/api/java/thaumcraft/api/aspects/IAspectContainer.java delete mode 100644 src/api/java/thaumcraft/api/aspects/IAspectSource.java delete mode 100644 src/api/java/thaumcraft/api/aspects/IEssentiaContainerItem.java delete mode 100644 src/api/java/thaumcraft/api/aspects/IEssentiaTransport.java delete mode 100644 src/api/java/thaumcraft/api/crafting/CrucibleRecipe.java delete mode 100644 src/api/java/thaumcraft/api/crafting/IArcaneRecipe.java delete mode 100644 src/api/java/thaumcraft/api/crafting/IInfusionStabiliser.java delete mode 100644 src/api/java/thaumcraft/api/crafting/InfusionEnchantmentRecipe.java delete mode 100644 src/api/java/thaumcraft/api/crafting/InfusionRecipe.java delete mode 100644 src/api/java/thaumcraft/api/crafting/ShapedArcaneRecipe.java delete mode 100644 src/api/java/thaumcraft/api/crafting/ShapelessArcaneRecipe.java delete mode 100644 src/api/java/thaumcraft/api/damagesource/DamageSourceIndirectThaumcraftEntity.java delete mode 100644 src/api/java/thaumcraft/api/damagesource/DamageSourceThaumcraft.java delete mode 100644 src/api/java/thaumcraft/api/entities/ITaintedMob.java delete mode 100644 src/api/java/thaumcraft/api/nodes/INode.java delete mode 100644 src/api/java/thaumcraft/api/nodes/IRevealer.java delete mode 100644 src/api/java/thaumcraft/api/nodes/NodeModifier.java delete mode 100644 src/api/java/thaumcraft/api/nodes/NodeType.java delete mode 100644 src/api/java/thaumcraft/api/package-info.java delete mode 100644 src/api/java/thaumcraft/api/potions/PotionFluxTaint.java delete mode 100644 src/api/java/thaumcraft/api/research/IScanEventHandler.java delete mode 100644 src/api/java/thaumcraft/api/research/ResearchCategories.java delete mode 100644 src/api/java/thaumcraft/api/research/ResearchCategoryList.java delete mode 100644 src/api/java/thaumcraft/api/research/ResearchItem.java delete mode 100644 src/api/java/thaumcraft/api/research/ResearchPage.java delete mode 100644 src/api/java/thaumcraft/api/research/ScanResult.java delete mode 100644 src/api/java/thaumcraft/api/visnet/TileVisNode.java delete mode 100644 src/api/java/thaumcraft/api/visnet/VisNetHandler.java delete mode 100644 src/api/java/thaumcraft/api/wands/IWandFocus.java delete mode 100644 src/api/java/thaumcraft/api/wands/IWandRodOnUpdate.java delete mode 100644 src/api/java/thaumcraft/api/wands/IWandTriggerManager.java delete mode 100644 src/api/java/thaumcraft/api/wands/IWandable.java delete mode 100644 src/api/java/thaumcraft/api/wands/ItemFocusBasic.java delete mode 100644 src/api/java/thaumcraft/api/wands/StaffRod.java delete mode 100644 src/api/java/thaumcraft/api/wands/WandCap.java delete mode 100644 src/api/java/thaumcraft/api/wands/WandRod.java delete mode 100644 src/api/java/thaumcraft/api/wands/WandTriggerRegistry.java delete mode 100644 src/api/java/vazkii/botania/api/BotaniaAPI.java delete mode 100644 src/api/java/vazkii/botania/api/internal/DummyManaNetwork.java delete mode 100644 src/api/java/vazkii/botania/api/internal/DummyMethodHandler.java delete mode 100644 src/api/java/vazkii/botania/api/internal/DummyPage.java delete mode 100644 src/api/java/vazkii/botania/api/internal/DummySubTile.java delete mode 100644 src/api/java/vazkii/botania/api/internal/IGuiLexiconEntry.java delete mode 100644 src/api/java/vazkii/botania/api/internal/IInternalMethodHandler.java delete mode 100644 src/api/java/vazkii/botania/api/internal/IManaBurst.java delete mode 100644 src/api/java/vazkii/botania/api/internal/IManaNetwork.java delete mode 100644 src/api/java/vazkii/botania/api/item/IExoflameHeatable.java delete mode 100644 src/api/java/vazkii/botania/api/item/IExtendedPlayerController.java delete mode 100644 src/api/java/vazkii/botania/api/item/IPetalApothecary.java delete mode 100644 src/api/java/vazkii/botania/api/item/IPixieSpawner.java delete mode 100644 src/api/java/vazkii/botania/api/lexicon/IAddonEntry.java delete mode 100644 src/api/java/vazkii/botania/api/lexicon/ILexicon.java delete mode 100644 src/api/java/vazkii/botania/api/lexicon/ILexiconable.java delete mode 100644 src/api/java/vazkii/botania/api/lexicon/IRecipeKeyProvider.java delete mode 100644 src/api/java/vazkii/botania/api/lexicon/KnowledgeType.java delete mode 100644 src/api/java/vazkii/botania/api/lexicon/LexiconCategory.java delete mode 100644 src/api/java/vazkii/botania/api/lexicon/LexiconEntry.java delete mode 100644 src/api/java/vazkii/botania/api/lexicon/LexiconPage.java delete mode 100644 src/api/java/vazkii/botania/api/lexicon/LexiconRecipeMappings.java delete mode 100644 src/api/java/vazkii/botania/api/mana/BurstProperties.java delete mode 100644 src/api/java/vazkii/botania/api/mana/IClientManaHandler.java delete mode 100644 src/api/java/vazkii/botania/api/mana/ICreativeManaProvider.java delete mode 100644 src/api/java/vazkii/botania/api/mana/IKeyLocked.java delete mode 100644 src/api/java/vazkii/botania/api/mana/ILaputaImmobile.java delete mode 100644 src/api/java/vazkii/botania/api/mana/ILens.java delete mode 100644 src/api/java/vazkii/botania/api/mana/ILensEffect.java delete mode 100644 src/api/java/vazkii/botania/api/mana/IManaBlock.java delete mode 100644 src/api/java/vazkii/botania/api/mana/IManaCollector.java delete mode 100644 src/api/java/vazkii/botania/api/mana/IManaCollisionGhost.java delete mode 100644 src/api/java/vazkii/botania/api/mana/IManaItem.java delete mode 100644 src/api/java/vazkii/botania/api/mana/IManaPool.java delete mode 100644 src/api/java/vazkii/botania/api/mana/IManaReceiver.java delete mode 100644 src/api/java/vazkii/botania/api/mana/IManaTrigger.java delete mode 100644 src/api/java/vazkii/botania/api/mana/IManaUsingItem.java delete mode 100644 src/api/java/vazkii/botania/api/mana/IPoolOverlayProvider.java delete mode 100644 src/api/java/vazkii/botania/api/mana/ITinyPlanetExcempt.java delete mode 100644 src/api/java/vazkii/botania/api/mana/ManaItemHandler.java delete mode 100644 src/api/java/vazkii/botania/api/mana/ManaNetworkEvent.java delete mode 100644 src/api/java/vazkii/botania/api/mana/TileSignature.java delete mode 100644 src/api/java/vazkii/botania/api/mana/spark/ISparkAttachable.java delete mode 100644 src/api/java/vazkii/botania/api/mana/spark/ISparkEntity.java delete mode 100644 src/api/java/vazkii/botania/api/mana/spark/SparkHelper.java delete mode 100644 src/api/java/vazkii/botania/api/package-info.java delete mode 100644 src/api/java/vazkii/botania/api/recipe/IElvenItem.java delete mode 100644 src/api/java/vazkii/botania/api/recipe/IFlowerComponent.java delete mode 100644 src/api/java/vazkii/botania/api/recipe/RecipeElvenTrade.java delete mode 100644 src/api/java/vazkii/botania/api/recipe/RecipeManaInfusion.java delete mode 100644 src/api/java/vazkii/botania/api/recipe/RecipePetals.java delete mode 100644 src/api/java/vazkii/botania/api/recipe/RecipeRuneAltar.java delete mode 100644 src/api/java/vazkii/botania/api/subtile/ISpecialFlower.java delete mode 100644 src/api/java/vazkii/botania/api/subtile/ISubTileContainer.java delete mode 100644 src/api/java/vazkii/botania/api/subtile/SubTileEntity.java delete mode 100644 src/api/java/vazkii/botania/api/subtile/SubTileFunctional.java delete mode 100644 src/api/java/vazkii/botania/api/subtile/SubTileGenerating.java delete mode 100644 src/api/java/vazkii/botania/api/wand/ICoordBoundItem.java delete mode 100644 src/api/java/vazkii/botania/api/wand/ITileBound.java delete mode 100644 src/api/java/vazkii/botania/api/wand/IWandBindable.java delete mode 100644 src/api/java/vazkii/botania/api/wand/IWandHUD.java delete mode 100644 src/api/java/vazkii/botania/api/wand/IWandable.java delete mode 100644 src/api/java/vazkii/botania/api/wand/IWireframeAABBProvider.java delete mode 100644 src/api/java/vazkii/botania/api/wiki/IWikiProvider.java delete mode 100644 src/api/java/vazkii/botania/api/wiki/SimpleWikiProvider.java delete mode 100644 src/api/java/vazkii/botania/api/wiki/WikiHooks.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/ClientUtils.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/POVArmourModelWrapper.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/achievements/ICraftAchievement.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/achievements/IPickupAchievement.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandBind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandSN.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandUnbind.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/harvest/AgriCraftCropHarvestHandler.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/ShaderHelper.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifier.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefault.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefensive.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierEnvironmental.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierOffensive.java create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_air.png create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_air.png.mcmeta create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_darkness.png create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_darkness.png.mcmeta create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_earth.png create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_earth.png.mcmeta create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_fire.png create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_fire.png.mcmeta create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_light.png create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_light.png.mcmeta create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_rainbow.png create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_rainbow.png.mcmeta create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_water.png create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_water.png.mcmeta create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/block_bloodDiamond.png create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/block_bloodIron.png create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/builder.png create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/discoball.png create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/discoball.png.mcmeta create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/essence_darkness.png create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/essence_light.png create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/essence_rainbow.png create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/essence_rainbow.png.mcmeta create mode 100644 src/main/resources/assets/bloodutils/textures/blocks/progress.png create mode 100644 src/main/resources/assets/bloodutils/textures/gui/altar.png create mode 100644 src/main/resources/assets/bloodutils/textures/gui/crafting.png create mode 100644 src/main/resources/assets/bloodutils/textures/gui/front.png create mode 100644 src/main/resources/assets/bloodutils/textures/gui/guide.png create mode 100644 src/main/resources/assets/bloodutils/textures/items/bloodShard_royal.png create mode 100644 src/main/resources/assets/bloodutils/textures/items/diamond_blood.png create mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_air.png create mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_air.png.mcmeta create mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_darkness.png create mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_darkness.png.mcmeta create mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_earth.png create mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_earth.png.mcmeta create mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_empty.png create mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_fire.png create mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_fire.png.mcmeta create mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_light.png create mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_light.png.mcmeta create mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_rainbow.png create mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_rainbow.png.mcmeta create mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_water.png create mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_water.png.mcmeta create mode 100644 src/main/resources/assets/bloodutils/textures/items/guide.png create mode 100644 src/main/resources/assets/bloodutils/textures/items/iron_blood.png create mode 100644 src/main/resources/assets/bloodutils/textures/items/sigil_advancedDivination.png create mode 100644 src/main/resources/assets/bloodutils/textures/items/sigil_ritual.png create mode 100644 src/main/resources/assets/bloodutils/textures/items/tool_creative.png create mode 100644 src/main/resources/assets/bloodutils/textures/misc/screenshots/t1.png create mode 100644 src/main/resources/assets/bloodutils/textures/misc/tab.png create mode 100644 src/main/resources/assets/bloodutils/textures/models/model_guide.png create mode 100644 src/main/resources/assets/bloodutils/textures/models/model_reviver.png create mode 100644 src/main/resources/assets/minecraft/textures/gui/container/creative_inventory/tab_blood.png diff --git a/build.gradle b/build.gradle index 35d2e817..dca746fd 100644 --- a/build.gradle +++ b/build.gradle @@ -51,12 +51,12 @@ repositories { } dependencies { - compile "codechicken:CodeChickenLib:1.7.10-1.1.1.99:dev" - compile "codechicken:CodeChickenCore:" + config.mc_version + "-" + config.ccc_version + ":dev" - compile "codechicken:NotEnoughItems:" + config.mc_version + "-" + config.nei_version + ":dev" - compile name: 'MineTweaker3', version: config.minetweaker_version, ext: 'jar' - compile "codechicken:ForgeMultipart:1.7.10-1.1.0.314:dev" - compile "info.amerifrance.guideapi:Guide-API:" + config.mc_version + "-" + config.guideapi_version + ":deobf" +// compile "codechicken:CodeChickenLib:1.7.10-1.1.1.99:dev" +// compile "codechicken:CodeChickenCore:" + config.mc_version + "-" + config.ccc_version + ":dev" +// compile "codechicken:NotEnoughItems:" + config.mc_version + "-" + config.nei_version + ":dev" +// compile name: 'MineTweaker3', version: config.minetweaker_version, ext: 'jar' +// compile "codechicken:ForgeMultipart:1.7.10-1.1.0.314:dev" +// compile "info.amerifrance.guideapi:Guide-API:" + config.mc_version + "-" + config.guideapi_version + ":deobf" } minecraft { diff --git a/build.properties b/build.properties index 2498a91e..5c65da81 100644 --- a/build.properties +++ b/build.properties @@ -1,7 +1,7 @@ # #Mon Jul 20 20:59:46 EDT 2015 mod_name=BloodMagic -forge_version=10.13.4.1448-1.7.10 +forge_version=11.14.1.1334 ccc_version=1.0.4.29 nei_version=1.0.3.64 //=Dependency Information @@ -10,4 +10,4 @@ package_group=com.wayoftime.bloodmagic mod_version=1.3.3 minetweaker_version=Dev-1.7.10-3.0.9B build_number=12 -mc_version=1.7.10 +mc_version=1.8 diff --git a/src/api/java/forestry/api/apiculture/BeeManager.java b/src/api/java/forestry/api/apiculture/BeeManager.java deleted file mode 100644 index 80b03a46..00000000 --- a/src/api/java/forestry/api/apiculture/BeeManager.java +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import java.util.ArrayList; -import java.util.HashMap; - -import net.minecraft.item.ItemStack; -/** - * - * Some miscellaneous lists and settings for bees. - * - * @author SirSengir - */ -public class BeeManager { - - /** - * 0 - Common Village Bees 1 - Uncommon Village Bees (20 % of spawns) - */ - public static ArrayList<IBeeGenome>[] villageBees; - - /** - * List of items that can induce swarming. Integer denotes x in 1000 chance. - */ - public static HashMap<ItemStack, Integer> inducers = new HashMap<ItemStack, Integer>(); - - /** - * Convenient access to AlleleManager.alleleRegistry.getSpeciesRoot("rootBees") - */ - public static IBeeRoot beeRoot; - - /** - * Used to create new bees. - */ - public static IBeeFactory beeFactory; - - /** - * Used to create new bee mutations. - */ - public static IBeeMutationFactory beeMutationFactory; - - /** - * Used to get Forestry's jubilance implementations. - */ - public static IJubilanceFactory jubilanceFactory; -} diff --git a/src/api/java/forestry/api/apiculture/EnumBeeChromosome.java b/src/api/java/forestry/api/apiculture/EnumBeeChromosome.java deleted file mode 100644 index 165247ef..00000000 --- a/src/api/java/forestry/api/apiculture/EnumBeeChromosome.java +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import forestry.api.genetics.IAllele; -import forestry.api.genetics.IAlleleArea; -import forestry.api.genetics.IAlleleBoolean; -import forestry.api.genetics.IAlleleFloat; -import forestry.api.genetics.IAlleleFlowers; -import forestry.api.genetics.IAlleleInteger; -import forestry.api.genetics.IAlleleTolerance; -import forestry.api.genetics.IChromosomeType; -import forestry.api.genetics.ISpeciesRoot; - -/** - * Enum representing the order of chromosomes in a bee's genome and what they control. - * - * @author SirSengir - */ -public enum EnumBeeChromosome implements IChromosomeType { - /** - * Species of the bee. Alleles here must implement {@link IAlleleBeeSpecies}. - */ - SPECIES(IAlleleBeeSpecies.class), - /** - * (Production) Speed of the bee. - */ - SPEED(IAlleleFloat.class), - /** - * Lifespan of the bee. - */ - LIFESPAN(IAlleleInteger.class), - /** - * Fertility of the bee. Determines number of offspring. - */ - FERTILITY(IAlleleInteger.class), - /** - * Temperature difference to its native supported one the bee can tolerate. - */ - TEMPERATURE_TOLERANCE(IAlleleTolerance.class), - /** - * Slightly incorrectly named. If true, a naturally dirunal bee can work during the night. If true, a naturally nocturnal bee can work during the day. - */ - NOCTURNAL(IAlleleBoolean.class), - /** - * Not used / superseded by fixed values for the species. Probably going to be replaced with a boolean for FIRE_RESIST. - */ - @Deprecated - HUMIDITY(IAllele.class), - /** - * Humidity difference to its native supported one the bee can tolerate. - */ - HUMIDITY_TOLERANCE(IAlleleTolerance.class), - /** - * If true the bee can work during rain. - */ - TOLERANT_FLYER(IAlleleBoolean.class), - /** - * If true, the bee can work without a clear view of the sky. - */ - CAVE_DWELLING(IAlleleBoolean.class), - /** - * Contains the supported flower provider. - */ - FLOWER_PROVIDER(IAlleleFlowers.class), - /** - * Determines pollination speed. - */ - FLOWERING(IAlleleInteger.class), - /** - * Determines the size of the bee's territory. - */ - TERRITORY(IAlleleArea.class), - /** - * Determines the bee's effect. - */ - EFFECT(IAlleleBeeEffect.class); - - Class<? extends IAllele> clss; - - EnumBeeChromosome(Class<? extends IAllele> clss) { - this.clss = clss; - } - - @Override - public Class<? extends IAllele> getAlleleClass() { - return clss; - } - - @Override - public String getName() { - return this.toString().toLowerCase(); - } - - @Override - public ISpeciesRoot getSpeciesRoot() { - return BeeManager.beeRoot; - } -} diff --git a/src/api/java/forestry/api/apiculture/EnumBeeType.java b/src/api/java/forestry/api/apiculture/EnumBeeType.java deleted file mode 100644 index e3e45c2b..00000000 --- a/src/api/java/forestry/api/apiculture/EnumBeeType.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import java.util.Locale; - -public enum EnumBeeType { - DRONE, PRINCESS, QUEEN, LARVAE, NONE; - - public static final EnumBeeType[] VALUES = values(); - - String name; - - private EnumBeeType() { - this.name = this.toString().toLowerCase(Locale.ENGLISH); - } - - public String getName() { - return name; - } -} diff --git a/src/api/java/forestry/api/apiculture/FlowerManager.java b/src/api/java/forestry/api/apiculture/FlowerManager.java deleted file mode 100644 index 667b4489..00000000 --- a/src/api/java/forestry/api/apiculture/FlowerManager.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import java.util.ArrayList; - -import net.minecraft.item.ItemStack; - -import forestry.api.genetics.IFlowerProvider; -import forestry.api.genetics.IFlowerRegistry; - -public class FlowerManager { - /** - * ItemStacks representing simple flower blocks. Meta-sensitive, processed by the basic {@link IFlowerProvider}. - * - * @deprecated since Forestry 3.4. Use {@link #IFlowerRegistry.registerPlantableFlower(ItemStack flower, double weight, String... flowerTypes)} instead. - * <blockquote><pre>e.g. FlowerManager.flowerRegister.registerPlantableFlower(new ItemStack(Blocks.red_flower), 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow);</pre></blockquote> - */ - @Deprecated - public static ArrayList<ItemStack> plainFlowers = new ArrayList<ItemStack>(); - - /** - * <blockquote><pre>e.g. FlowerManager.flowerRegister.registerPlantableFlower(new ItemStack(Blocks.red_flower), 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow);</pre></blockquote> - */ - public static IFlowerRegistry flowerRegistry; - - public static final String FlowerTypeVanilla = "flowersVanilla"; - public static final String FlowerTypeNether = "flowersNether"; - public static final String FlowerTypeCacti = "flowersCacti"; - public static final String FlowerTypeMushrooms = "flowersMushrooms"; - public static final String FlowerTypeEnd = "flowersEnd"; - public static final String FlowerTypeJungle = "flowersJungle"; - public static final String FlowerTypeSnow = "flowersSnow"; - public static final String FlowerTypeWheat = "flowersWheat"; - public static final String FlowerTypeGourd = "flowersGourd"; -} diff --git a/src/api/java/forestry/api/apiculture/IAlleleBeeEffect.java b/src/api/java/forestry/api/apiculture/IAlleleBeeEffect.java deleted file mode 100644 index b2dddb31..00000000 --- a/src/api/java/forestry/api/apiculture/IAlleleBeeEffect.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import forestry.api.genetics.IAlleleEffect; -import forestry.api.genetics.IEffectData; - -public interface IAlleleBeeEffect extends IAlleleEffect { - - /** - * Called by apiaries to cause an effect in the world. - * - * @param genome - * Genome of the bee queen causing this effect - * @param storedData - * Object containing the stored effect data for the apiary/hive the bee is in. - * @param housing {@link IBeeHousing} the bee currently resides in. - * @return storedData, may have been manipulated. - */ - IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing); - - /** - * Is called to produce bee effects. - * - * @param genome - * @param storedData - * Object containing the stored effect data for the apiary/hive the bee is in. - * @param housing {@link IBeeHousing} the bee currently resides in. - * @return storedData, may have been manipulated. - */ - IEffectData doFX(IBeeGenome genome, IEffectData storedData, IBeeHousing housing); - -} diff --git a/src/api/java/forestry/api/apiculture/IAlleleBeeSpecies.java b/src/api/java/forestry/api/apiculture/IAlleleBeeSpecies.java deleted file mode 100644 index 86346639..00000000 --- a/src/api/java/forestry/api/apiculture/IAlleleBeeSpecies.java +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import java.util.Map; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import forestry.api.genetics.IAlleleSpecies; - -public interface IAlleleBeeSpecies extends IAlleleSpecies { - - /** - * @return the IBeeRoot - */ - IBeeRoot getRoot(); - - /** - * @return true if this species is only active at night. - */ - boolean isNocturnal(); - - /** - * @return Map of possible products with the chance for drop each bee cycle. (0 - 1] - */ - Map<ItemStack, Float> getProductChances(); - - /** - * @return Map of possible specialities with the chance for drop each bee cycle. (0 - 1] - */ - Map<ItemStack, Float> getSpecialtyChances(); - - /** - * Only jubilant bees produce specialities. - * @return true if the bee is jubilant, false otherwise. - */ - boolean isJubilant(IBeeGenome genome, IBeeHousing housing); - - @SideOnly(Side.CLIENT) - IIcon getIcon(EnumBeeType type, int renderPass); - - /** - * @deprecated since Forestry 3.6. - * @return Path of the texture to use for entity rendering. - */ - @Deprecated - String getEntityTexture(); - - /** - * @deprecated Since Forestry 3.6 use getProductChances() - * @return Map of possible products with the chance for drop each bee cycle. (0 - 100) - */ - @Deprecated - Map<ItemStack, Integer> getProducts(); - - /** - * @deprecated Since Forestry 3.6 use getSpecialtyChances() - * @return Map of possible specialities with the chance for drop each bee cycle. (0 - 100) - */ - @Deprecated - Map<ItemStack, Integer> getSpecialty(); -} diff --git a/src/api/java/forestry/api/apiculture/IAlleleBeeSpeciesCustom.java b/src/api/java/forestry/api/apiculture/IAlleleBeeSpeciesCustom.java deleted file mode 100644 index 06664b2f..00000000 --- a/src/api/java/forestry/api/apiculture/IAlleleBeeSpeciesCustom.java +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import net.minecraft.item.ItemStack; - -import forestry.api.genetics.IAlleleSpeciesCustom; - -public interface IAlleleBeeSpeciesCustom extends IAlleleBeeSpecies, IAlleleSpeciesCustom { - - /** - * Add a product for this bee species. - * Chance is between 0 and 1. - */ - IAlleleBeeSpeciesCustom addProduct(ItemStack product, Float chance); - - /** - * Add a specialty product for this bee species. - * Bees only produce their specialty when they are Jubilant (see IJubilanceProvider) - * Chance is between 0 and 1. - */ - IAlleleBeeSpeciesCustom addSpecialty(ItemStack specialty, Float chance); - - /** - * Set the Jubilance Provider for this bee species. - * Bees only produce their specialty when they are Jubilant (see IJubilanceProvider) - */ - IAlleleBeeSpeciesCustom setJubilanceProvider(IJubilanceProvider provider); - - /** - * Make this species only active at night. - */ - IAlleleBeeSpeciesCustom setNocturnal(); - - /** Use this if you have custom icons for bees. */ - IAlleleBeeSpeciesCustom setCustomBeeIconProvider(IBeeIconProvider beeIconProvider); -} diff --git a/src/api/java/forestry/api/apiculture/IAlvearyComponent.java b/src/api/java/forestry/api/apiculture/IAlvearyComponent.java deleted file mode 100644 index 80cf98b1..00000000 --- a/src/api/java/forestry/api/apiculture/IAlvearyComponent.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import forestry.api.core.ITileStructure; - -/** - * Needs to be implemented by TileEntities that want to be part of an alveary. - */ -public interface IAlvearyComponent extends ITileStructure { - - void registerBeeModifier(IBeeModifier modifier); - - void removeBeeModifier(IBeeModifier modifier); - - void registerBeeListener(IBeeListener event); - - void removeBeeListener(IBeeListener event); - - void addTemperatureChange(float change, float boundaryDown, float boundaryUp); - - void addHumidityChange(float change, float boundaryDown, float boundaryUp); - - /** - * @return true if this TE has a function other than a plain alveary block. Returning true prevents the TE from becoming master. - */ - boolean hasFunction(); - -} diff --git a/src/api/java/forestry/api/apiculture/IApiaristTracker.java b/src/api/java/forestry/api/apiculture/IApiaristTracker.java deleted file mode 100644 index 0c65f56b..00000000 --- a/src/api/java/forestry/api/apiculture/IApiaristTracker.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import forestry.api.genetics.IBreedingTracker; -import forestry.api.genetics.IIndividual; - -/** - * Can be used to garner information on bee breeding. See {@link forestry.api.genetics.ISpeciesRoot} for retrieval functions. - * - * @author SirSengir - */ -public interface IApiaristTracker extends IBreedingTracker { - - /** - * Register the birth of a queen. Will mark species as discovered. - * - * @param queen - * Created queen. - */ - void registerQueen(IIndividual queen); - - /** - * @return Amount of queens bred with this tracker. - */ - int getQueenCount(); - - /** - * Register the birth of a princess. Will mark species as discovered. - * - * @param princess - * Created princess. - */ - void registerPrincess(IIndividual princess); - - /** - * @return Amount of princesses bred with this tracker. - */ - int getPrincessCount(); - - /** - * Register the birth of a drone. Will mark species as discovered. - * - * @param drone - * Created drone. - */ - void registerDrone(IIndividual drone); - - /** - * @return Amount of drones bred with this tracker. - */ - int getDroneCount(); - -} diff --git a/src/api/java/forestry/api/apiculture/IArmorApiarist.java b/src/api/java/forestry/api/apiculture/IArmorApiarist.java deleted file mode 100644 index fef81eb5..00000000 --- a/src/api/java/forestry/api/apiculture/IArmorApiarist.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -/** - * When implemented by armor piece items, allows them to act as apiarist's armor. - */ -public interface IArmorApiarist { - /** - * Called when the apiarist's armor acts as protection against an attack. - * - * @param player - * Player being attacked - * @param armor - * Armor item - * @param cause - * Optional cause of attack, such as a bee effect identifier - * @param doProtect - * Whether or not to actually do the side effects of protection - * @return Whether or not the armor should protect the player from that attack - */ - public boolean protectPlayer(EntityPlayer player, ItemStack armor, String cause, boolean doProtect); -} diff --git a/src/api/java/forestry/api/apiculture/IBee.java b/src/api/java/forestry/api/apiculture/IBee.java deleted file mode 100644 index b77b752e..00000000 --- a/src/api/java/forestry/api/apiculture/IBee.java +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import java.util.ArrayList; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.biome.BiomeGenBase; - -import forestry.api.core.IErrorState; -import forestry.api.genetics.IEffectData; -import forestry.api.genetics.IIndividual; -import forestry.api.genetics.IIndividualLiving; - -/** - * Other implementations than Forestry's default one are not supported. - * - * @author SirSengir - */ -public interface IBee extends IIndividualLiving { - - /** - * @return Bee's genetic information. - */ - IBeeGenome getGenome(); - - /** - * @return Genetic information of the bee's mate, null if unmated. - */ - IBeeGenome getMate(); - - /** - * @return true if the individual is originally of natural origin. - */ - boolean isNatural(); - - /** - * @return generation this individual is removed from the original individual. - */ - int getGeneration(); - - /** - * Set the natural flag on this bee. - * @param flag - */ - void setIsNatural(boolean flag); - - IEffectData[] doEffect(IEffectData[] storedData, IBeeHousing housing); - - IEffectData[] doFX(IEffectData[] storedData, IBeeHousing housing); - - /** - * @return true if the bee may spawn offspring - */ - boolean canSpawn(); - - /** - * Determines whether the queen can work. - * - * @param housing the {@link IBeeHousing} the bee currently resides in. - * @return the error code encountered. - */ - IErrorState canWork(IBeeHousing housing); - - boolean hasFlower(IBeeHousing housing); - - ArrayList<BiomeGenBase> getSuitableBiomes(); - - ItemStack[] getProduceList(); - - ItemStack[] getSpecialtyList(); - - ItemStack[] produceStacks(IBeeHousing housing); - - IBee spawnPrincess(IBeeHousing housing); - - IBee[] spawnDrones(IBeeHousing housing); - - void plantFlowerRandom(IBeeHousing housing); - - IIndividual retrievePollen(IBeeHousing housing); - - boolean pollinateRandom(IBeeHousing housing, IIndividual pollen); - -} diff --git a/src/api/java/forestry/api/apiculture/IBeeFactory.java b/src/api/java/forestry/api/apiculture/IBeeFactory.java deleted file mode 100644 index c164731c..00000000 --- a/src/api/java/forestry/api/apiculture/IBeeFactory.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import forestry.api.genetics.IClassification; - -public interface IBeeFactory { - - /** - * Creates a new bee species. - * Automatically registered with AlleleManager.alleleRegistry.registerAllele() - * See IAlleleBeeSpeciesCustom and IAlleleSpeciesCustom for adding additional properties to the returned species. - * - * @param uid Unique Identifier for this species - * @param dominant Whether this species is genetically dominant (false means it is recessive) - * @param authority Authority for the binomial name, e.g. "Sengir" on species of base Forestry. - * @param unlocalizedName Unlocalized name for this species - * @param unlocalizedDescription Unlocalized description for this species - * @param branch Classification of this species - * @param binomial Binomial name of the species sans genus ("Apis"). "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun names or null. - * @param primaryColor The outline color of this species - * @param secondaryColor The body color of this species - * @return a new bee species allele. - */ - IAlleleBeeSpeciesCustom createSpecies(String uid, boolean dominant, String authority, String unlocalizedName, String unlocalizedDescription, IClassification branch, String binomial, int primaryColor, int secondaryColor); - - /** - * Creates a new bee branch. - * Must be registered with AlleleManager.alleleRegistry.getClassification("family.apidae").addMemberGroup(); - * - * @param uid Unique Identifier for this branch - * @param scientific approximates a "genus" in real life. Real life examples: "Micrapis", "Megapis" - * @return a new bee branch - */ - IClassification createBranch(String uid, String scientific); -} diff --git a/src/api/java/forestry/api/apiculture/IBeeGenome.java b/src/api/java/forestry/api/apiculture/IBeeGenome.java deleted file mode 100644 index 642eeeb5..00000000 --- a/src/api/java/forestry/api/apiculture/IBeeGenome.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import forestry.api.genetics.EnumTolerance; -import forestry.api.genetics.IFlowerProvider; -import forestry.api.genetics.IGenome; - -/** - * Only the default implementation is supported. - * - * @author SirSengir - * - */ -public interface IBeeGenome extends IGenome { - - IAlleleBeeSpecies getPrimary(); - - IAlleleBeeSpecies getSecondary(); - - float getSpeed(); - - int getLifespan(); - - int getFertility(); - - EnumTolerance getToleranceTemp(); - - EnumTolerance getToleranceHumid(); - - boolean getNocturnal(); - - boolean getTolerantFlyer(); - - boolean getCaveDwelling(); - - IFlowerProvider getFlowerProvider(); - - int getFlowering(); - - int[] getTerritory(); - - IAlleleBeeEffect getEffect(); - -} diff --git a/src/api/java/forestry/api/apiculture/IBeeHousing.java b/src/api/java/forestry/api/apiculture/IBeeHousing.java deleted file mode 100644 index 5d795a3b..00000000 --- a/src/api/java/forestry/api/apiculture/IBeeHousing.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import net.minecraft.item.ItemStack; - -import forestry.api.genetics.IHousing; - -public interface IBeeHousing extends IBeeModifier, IBeeListener, IHousing { - - ItemStack getQueen(); - - ItemStack getDrone(); - - void setQueen(ItemStack itemstack); - - void setDrone(ItemStack itemstack); - - /** - * @return true if princesses and drones can (currently) mate in this housing to generate queens. - */ - boolean canBreed(); - -} diff --git a/src/api/java/forestry/api/apiculture/IBeeIconProvider.java b/src/api/java/forestry/api/apiculture/IBeeIconProvider.java deleted file mode 100644 index d29a722b..00000000 --- a/src/api/java/forestry/api/apiculture/IBeeIconProvider.java +++ /dev/null @@ -1,14 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.util.IIcon; - -public interface IBeeIconProvider { - void registerIcons(IIconRegister register); - IIcon getIcon(EnumBeeType type, int renderPass); -} diff --git a/src/api/java/forestry/api/apiculture/IBeeListener.java b/src/api/java/forestry/api/apiculture/IBeeListener.java deleted file mode 100644 index 7fd5865c..00000000 --- a/src/api/java/forestry/api/apiculture/IBeeListener.java +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import net.minecraft.item.ItemStack; - -import forestry.api.genetics.IIndividual; - -public interface IBeeListener { - - /** - * Called on queen update. - * - * @param queen - */ - void onQueenChange(ItemStack queen); - - /** - * Called when the bees wear out the housing's equipment. - * - * @param amount - * Integer indicating the amount worn out. - */ - void wearOutEquipment(int amount); - - /** - * Called just before the children are generated, and the queen removed. - * - * @param queen - */ - void onQueenDeath(IBee queen); - - /** - * Called after the children have been spawned, but before the queen appears - * - * @param queen - */ - void onPostQueenDeath(IBee queen); - - boolean onPollenRetrieved(IBee queen, IIndividual pollen, boolean isHandled); - - boolean onEggLaid(IBee queen); -} diff --git a/src/api/java/forestry/api/apiculture/IBeeModifier.java b/src/api/java/forestry/api/apiculture/IBeeModifier.java deleted file mode 100644 index 4f9f7bbe..00000000 --- a/src/api/java/forestry/api/apiculture/IBeeModifier.java +++ /dev/null @@ -1,71 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -public interface IBeeModifier { - - /** - * @param genome Genome of the bee this modifier is called for. - * @param currentModifier Current modifier. - * @return Float used to modify the base territory. - */ - float getTerritoryModifier(IBeeGenome genome, float currentModifier); - - /** - * @param genome Genome of the bee this modifier is called for. - * @param mate - * @param currentModifier Current modifier. - * @return Float used to modify the base mutation chance. - */ - float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier); - - /** - * @param genome Genome of the bee this modifier is called for. - * @param currentModifier Current modifier. - * @return Float used to modify the life span of queens. - */ - float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier); - - /** - * @param genome Genome of the bee this modifier is called for. - * @param currentModifier Current modifier. - * @return Float modifying the production speed of queens. - */ - float getProductionModifier(IBeeGenome genome, float currentModifier); - - /** - * @param genome Genome of the bee this modifier is called for. - * @return Float modifying the flowering of queens. - */ - float getFloweringModifier(IBeeGenome genome, float currentModifier); - - /** - * @param genome Genome of the bee this modifier is called for. - * @return Float modifying the chance for a swarmer queen to die off. - */ - float getGeneticDecay(IBeeGenome genome, float currentModifier); - - /** - * @return Boolean indicating if housing can ignore rain - */ - boolean isSealed(); - - /** - * @return Boolean indicating if housing can ignore darkness/night - */ - boolean isSelfLighted(); - - /** - * @return Boolean indicating if housing can ignore not seeing the sky - */ - boolean isSunlightSimulated(); - - /** - * @return Boolean indicating whether this housing simulates the nether - */ - boolean isHellish(); - -} diff --git a/src/api/java/forestry/api/apiculture/IBeeMutation.java b/src/api/java/forestry/api/apiculture/IBeeMutation.java deleted file mode 100644 index 6421c8f6..00000000 --- a/src/api/java/forestry/api/apiculture/IBeeMutation.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import forestry.api.genetics.IAllele; -import forestry.api.genetics.IGenome; -import forestry.api.genetics.IMutation; - -public interface IBeeMutation extends IMutation { - - IBeeRoot getRoot(); - - /** - * @param housing - * @param allele0 - * @param allele1 - * @param genome0 - * @param genome1 - * @return float representing the chance for mutation to occur. note that this is 0 - 100 based, since it was an integer previously! - * @deprecated since Forestry 3.6, use the IAlleleBeeSpecies / IBeeGenome version - */ - @Deprecated - float getChance(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1); - - float getChance(IBeeHousing housing, IAlleleBeeSpecies allele0, IAlleleBeeSpecies allele1, IBeeGenome genome0, IBeeGenome genome1); -} diff --git a/src/api/java/forestry/api/apiculture/IBeeMutationCustom.java b/src/api/java/forestry/api/apiculture/IBeeMutationCustom.java deleted file mode 100644 index d97a839a..00000000 --- a/src/api/java/forestry/api/apiculture/IBeeMutationCustom.java +++ /dev/null @@ -1,12 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import forestry.api.genetics.IMutationCustom; - -public interface IBeeMutationCustom extends IBeeMutation, IMutationCustom { - -} diff --git a/src/api/java/forestry/api/apiculture/IBeeMutationFactory.java b/src/api/java/forestry/api/apiculture/IBeeMutationFactory.java deleted file mode 100644 index 315a4c6f..00000000 --- a/src/api/java/forestry/api/apiculture/IBeeMutationFactory.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import forestry.api.genetics.IAllele; - -public interface IBeeMutationFactory { - /** - * Creates a new bee mutation. - * Automatically registered with BeeManager.beeRoot.registerMutation() - * See IBeeMutationCustom and IMutationCustom for adding additional properties to the returned mutation. - * - * @param parentBee0 A parent bee for this mutation - * @param parentBee1 A parent bee for this mutation - * @param result The resulting alleles for this mutation - * @param chance The chance that breeding the two parent bees will result in this mutation - * @return a new bee mutation. - */ - IBeeMutationCustom createMutation(IAlleleBeeSpecies parentBee0, IAlleleBeeSpecies parentBee1, IAllele[] result, int chance); -} diff --git a/src/api/java/forestry/api/apiculture/IBeeRoot.java b/src/api/java/forestry/api/apiculture/IBeeRoot.java deleted file mode 100644 index b4bbb291..00000000 --- a/src/api/java/forestry/api/apiculture/IBeeRoot.java +++ /dev/null @@ -1,128 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import java.util.ArrayList; -import java.util.Collection; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import com.mojang.authlib.GameProfile; - -import forestry.api.core.IStructureLogic; -import forestry.api.genetics.IAllele; -import forestry.api.genetics.ISpeciesRoot; - -public interface IBeeRoot extends ISpeciesRoot { - - /** - * @return true if passed item is a Forestry bee. Equal to getType(ItemStack stack) != EnumBeeType.NONE - */ - @Override - boolean isMember(ItemStack stack); - - /** - * @return {@link IBee} pattern parsed from the passed stack's nbt data. - */ - @Override - IBee getMember(ItemStack stack); - - @Override - IBee getMember(NBTTagCompound compound); - - /* GENOME CONVERSION */ - @Override - IBee templateAsIndividual(IAllele[] template); - - @Override - IBee templateAsIndividual(IAllele[] templateActive, IAllele[] templateInactive); - - @Override - IBeeGenome templateAsGenome(IAllele[] template); - - @Override - IBeeGenome templateAsGenome(IAllele[] templateActive, IAllele[] templateInactive); - - /* BREEDING TRACKER */ - /** - * @param world - * @return {@link IApiaristTracker} associated with the passed world. - */ - IApiaristTracker getBreedingTracker(World world, GameProfile player); - - /* BEE SPECIFIC */ - /** - * @return type of bee encoded on the itemstack. EnumBeeType.NONE if it isn't a bee. - */ - EnumBeeType getType(ItemStack stack); - - /** - * @return true if passed item is a drone. Equal to getType(ItemStack stack) == EnumBeeType.DRONE - */ - boolean isDrone(ItemStack stack); - - /** - * @return true if passed item is mated (i.e. a queen) - */ - boolean isMated(ItemStack stack); - - /** - * @param genome - * Valid {@link IBeeGenome} - * @return {@link IBee} from the passed genome - */ - IBee getBee(World world, IBeeGenome genome); - - /** - * Creates an IBee suitable for a queen containing the necessary second genome for the mate. - * - * @param genome - * Valid {@link IBeeGenome} - * @param mate - * Valid {@link IBee} representing the mate. - * @return Mated {@link IBee} from the passed genomes. - */ - IBee getBee(World world, IBeeGenome genome, IBee mate); - - /* TEMPLATES */ - @Override - ArrayList<IBee> getIndividualTemplates(); - - /* MUTATIONS */ - @Override - Collection<IBeeMutation> getMutations(boolean shuffle); - - /* GAME MODE */ - void resetBeekeepingMode(); - - ArrayList<IBeekeepingMode> getBeekeepingModes(); - - IBeekeepingMode getBeekeepingMode(World world); - - IBeekeepingMode getBeekeepingMode(String name); - - void registerBeekeepingMode(IBeekeepingMode mode); - - void setBeekeepingMode(World world, String name); - - /* MISC */ - /** - * @param housing - * Object implementing IBeeHousing. - * @return IBeekeepingLogic - */ - IBeekeepingLogic createBeekeepingLogic(IBeeHousing housing); - - /** - * TileEntities wanting to function as alveary components need to implement structure logic for validation. - * - * @return IStructureLogic for alvearies. - */ - IStructureLogic createAlvearyStructureLogic(IAlvearyComponent structure); - -} diff --git a/src/api/java/forestry/api/apiculture/IBeekeepingLogic.java b/src/api/java/forestry/api/apiculture/IBeekeepingLogic.java deleted file mode 100644 index 0a4da7b3..00000000 --- a/src/api/java/forestry/api/apiculture/IBeekeepingLogic.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import forestry.api.core.INBTTagable; -import forestry.api.genetics.IEffectData; - -public interface IBeekeepingLogic extends INBTTagable { - - /* STATE INFORMATION */ - int getBreedingTime(); - - int getTotalBreedingTime(); - - IBee getQueen(); - - IBeeHousing getHousing(); - - IEffectData[] getEffectData(); - - /* UPDATING */ - void update(); - -} diff --git a/src/api/java/forestry/api/apiculture/IBeekeepingMode.java b/src/api/java/forestry/api/apiculture/IBeekeepingMode.java deleted file mode 100644 index 80d30981..00000000 --- a/src/api/java/forestry/api/apiculture/IBeekeepingMode.java +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import java.util.ArrayList; - -import net.minecraft.world.World; - -public interface IBeekeepingMode extends IBeeModifier { - - /** - * @return Localized name of this beekeeping mode. - */ - String getName(); - - /** - * @return Localized list of strings outlining the behaviour of this beekeeping mode. - */ - ArrayList<String> getDescription(); - - /** - * @return Float used to modify the wear on comb frames. - */ - float getWearModifier(); - - /** - * @param queen - * @return fertility taking into account the birthing queen and surroundings. - */ - int getFinalFertility(IBee queen, World world, int x, int y, int z); - - /** - * @param queen - * @return true if the queen is genetically "fatigued" and should not be reproduced anymore. - */ - boolean isFatigued(IBee queen, IBeeHousing housing); - - /** - * @param queen - * @param housing - * @return true if the queen is being overworked in the bee housing (with chance). will trigger a negative effect. - */ - boolean isOverworked(IBee queen, IBeeHousing housing); - - /** - * - * @param queen - * @param offspring - * @param housing - * @return true if the genetic structure of the queen is breaking down during spawning of the offspring (with chance). will trigger a negative effect. - */ - boolean isDegenerating(IBee queen, IBee offspring, IBeeHousing housing); - - /** - * @param queen - * @return true if an offspring of this queen is considered a natural - */ - boolean isNaturalOffspring(IBee queen); - - /** - * @param queen - * @return true if this mode allows the passed queen or princess to be multiplied - */ - boolean mayMultiplyPrincess(IBee queen); - - -} diff --git a/src/api/java/forestry/api/apiculture/IHiveDrop.java b/src/api/java/forestry/api/apiculture/IHiveDrop.java deleted file mode 100644 index ea175f8b..00000000 --- a/src/api/java/forestry/api/apiculture/IHiveDrop.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import java.util.Collection; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -/** - * Bees can be seeded either as hive drops or as mutation results. - * - * Add IHiveDrops with HiveManager.get___Hive.addDrop - * - * @author SirSengir - */ -public interface IHiveDrop { - - ItemStack getPrincess(World world, int x, int y, int z, int fortune); - - Collection<ItemStack> getDrones(World world, int x, int y, int z, int fortune); - - Collection<ItemStack> getAdditional(World world, int x, int y, int z, int fortune); - - /** - * Chance to drop. Default drops have 80 (= 80 %). - * - * @param world Minecraft world this is called for. - * @param x x-Coordinate of the broken hive. - * @param y y-Coordinate of the broken hive. - * @param z z-Coordinate of the broken hive. - * @return Chance for drop as an integer of 0 - 100. - */ - int getChance(World world, int x, int y, int z); -} diff --git a/src/api/java/forestry/api/apiculture/IHiveFrame.java b/src/api/java/forestry/api/apiculture/IHiveFrame.java deleted file mode 100644 index dabc9e01..00000000 --- a/src/api/java/forestry/api/apiculture/IHiveFrame.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import net.minecraft.item.ItemStack; - -public interface IHiveFrame extends IBeeModifier { - - /** - * Wears out a frame. - * - * @param housing - * IBeeHousing the frame is contained in. - * @param frame - * ItemStack containing the actual frame. - * @param queen - * Current queen in the caller. - * @param wear - * Integer denoting the amount worn out. The wear modifier of the current beekeeping mode has already been taken into account. - * @return ItemStack containing the actual frame with adjusted damage. - */ - ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear); - -} diff --git a/src/api/java/forestry/api/apiculture/IJubilanceFactory.java b/src/api/java/forestry/api/apiculture/IJubilanceFactory.java deleted file mode 100644 index 1b81a9d0..00000000 --- a/src/api/java/forestry/api/apiculture/IJubilanceFactory.java +++ /dev/null @@ -1,16 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -import net.minecraft.block.Block; - -public interface IJubilanceFactory { - /** The default Jubilance Provider is satisfied when the humidity and temperature are ideal for the bee. */ - IJubilanceProvider getDefault(); - - /** The Requires Resource Jubilance Provider is satisfied when a specific block is under the hive. */ - IJubilanceProvider getRequiresResource(Block block, int meta); -} diff --git a/src/api/java/forestry/api/apiculture/IJubilanceProvider.java b/src/api/java/forestry/api/apiculture/IJubilanceProvider.java deleted file mode 100644 index faf34d05..00000000 --- a/src/api/java/forestry/api/apiculture/IJubilanceProvider.java +++ /dev/null @@ -1,15 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture; - -public interface IJubilanceProvider { - - /** - * Returns true when conditions are right to make this species Jubilant. - * Jubilant bees can produce their Specialty products. - */ - boolean isJubilant(IAlleleBeeSpecies species, IBeeGenome genome, IBeeHousing housing); -} diff --git a/src/api/java/forestry/api/apiculture/hives/HiveManager.java b/src/api/java/forestry/api/apiculture/hives/HiveManager.java deleted file mode 100644 index 17ca7d20..00000000 --- a/src/api/java/forestry/api/apiculture/hives/HiveManager.java +++ /dev/null @@ -1,13 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture.hives; - -public class HiveManager { - - public static IHiveRegistry hiveRegistry; - public static IHiveGenHelper genHelper; - -} diff --git a/src/api/java/forestry/api/apiculture/hives/IHiveDescription.java b/src/api/java/forestry/api/apiculture/hives/IHiveDescription.java deleted file mode 100644 index 82d761db..00000000 --- a/src/api/java/forestry/api/apiculture/hives/IHiveDescription.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture.hives; - -import net.minecraft.block.Block; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; - -import forestry.api.core.EnumHumidity; -import forestry.api.core.EnumTemperature; - -public interface IHiveDescription { - - /** - * The hive generator for this hive. - */ - IHiveGen getHiveGen(); - - /** - * The hive block to be placed in the world. - */ - Block getBlock(); - int getMeta(); - - /** - * returns true if the hive can be generated in these conditions. - * Used as a fast early-elimination check for hives that have no hope of spawning in the area. - */ - boolean isGoodBiome(BiomeGenBase biome); - boolean isGoodHumidity(EnumHumidity humidity); - boolean isGoodTemperature(EnumTemperature temperature); - - /** - * float representing the relative chance a hive will generate in a chunk. - * Default is 1.0, higher numbers result in more hives, smaller will result in fewer. - * Tree hives want around 3.0 to 4.0 since there are less locations to generate on. - */ - float getGenChance(); - - /** - * Called after successful hive generation. - * world, x, y, z give the location of the new hive. - **/ - void postGen(World world, int x, int y, int z); -} diff --git a/src/api/java/forestry/api/apiculture/hives/IHiveGen.java b/src/api/java/forestry/api/apiculture/hives/IHiveGen.java deleted file mode 100644 index 57569d26..00000000 --- a/src/api/java/forestry/api/apiculture/hives/IHiveGen.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture.hives; - -import net.minecraft.world.World; - -public interface IHiveGen { - - /** - * return a Y value that the hive should try to generate at. - * returns negative if the hive can't be placed anywhere. - */ - int getYForHive(World world, int x, int z); - - /** - * returns true if the hive can be generated at this location. - * Used for advanced conditions, like checking that the ground below the hive is a certain type. - */ - boolean isValidLocation(World world, int x, int y, int z); - - /** - * returns true if the hive can safely replace the block at this location. - */ - boolean canReplace(World world, int x, int y, int z); - -} diff --git a/src/api/java/forestry/api/apiculture/hives/IHiveGenHelper.java b/src/api/java/forestry/api/apiculture/hives/IHiveGenHelper.java deleted file mode 100644 index 0eb6400c..00000000 --- a/src/api/java/forestry/api/apiculture/hives/IHiveGenHelper.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture.hives; - -import net.minecraft.block.Block; - -public interface IHiveGenHelper { - - /** - * Returns a hiveGen for a hive that spawns on the ground. - * validGroundBlocks specifies which block materials it can spawn on. - */ - IHiveGen ground(Block... validGroundBlocks); - - /** - * Returns a hiveGen for a hive that spawns in trees. - */ - IHiveGen tree(); - -} diff --git a/src/api/java/forestry/api/apiculture/hives/IHiveRegistry.java b/src/api/java/forestry/api/apiculture/hives/IHiveRegistry.java deleted file mode 100644 index 73f3524c..00000000 --- a/src/api/java/forestry/api/apiculture/hives/IHiveRegistry.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.apiculture.hives; - -import java.util.List; - -import forestry.api.apiculture.IHiveDrop; - -public interface IHiveRegistry { - - /* Forestry Hive Names */ - public static final String forest = "Forestry:forest"; - public static final String meadows = "Forestry:meadows"; - public static final String desert = "Forestry:desert"; - public static final String jungle = "Forestry:jungle"; - public static final String end = "Forestry:end"; - public static final String snow = "Forestry:snow"; - public static final String swamp = "Forestry:swamp"; - - /** - * Adds a new hive to be generated in the world. - */ - void registerHive(String hiveName, IHiveDescription hiveDescription); - - /** - * Add drops to a registered hive. - */ - void addDrops(String hiveName, IHiveDrop... drops); - void addDrops(String hiveName, List<IHiveDrop> drop); -} diff --git a/src/api/java/forestry/api/apiculture/hives/package-info.java b/src/api/java/forestry/api/apiculture/hives/package-info.java deleted file mode 100644 index a045530c..00000000 --- a/src/api/java/forestry/api/apiculture/hives/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="4.1.0", owner="ForestryAPI|apiculture", provides="ForestryAPI|hives") -package forestry.api.apiculture.hives; -import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/apiculture/package-info.java b/src/api/java/forestry/api/apiculture/package-info.java deleted file mode 100644 index 3114e3eb..00000000 --- a/src/api/java/forestry/api/apiculture/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="3.3.0", owner="ForestryAPI|core", provides="ForestryAPI|apiculture") -package forestry.api.apiculture; -import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/arboriculture/EnumGermlingType.java b/src/api/java/forestry/api/arboriculture/EnumGermlingType.java deleted file mode 100644 index a564be0d..00000000 --- a/src/api/java/forestry/api/arboriculture/EnumGermlingType.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -public enum EnumGermlingType { - SAPLING("sapling"), BLOSSOM("blossom"), POLLEN("pollen"), GERMLING("germling"), NONE("none"); - - public static final EnumGermlingType[] VALUES = values(); - - private final String name; - - private EnumGermlingType(String name) { - this.name = name; - } - - public String getName() { - return name; - } - -} diff --git a/src/api/java/forestry/api/arboriculture/EnumGrowthConditions.java b/src/api/java/forestry/api/arboriculture/EnumGrowthConditions.java deleted file mode 100644 index 8b28601c..00000000 --- a/src/api/java/forestry/api/arboriculture/EnumGrowthConditions.java +++ /dev/null @@ -1,10 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -public enum EnumGrowthConditions { - HOSTILE, PALTRY, NORMAL, GOOD, EXCELLENT -} diff --git a/src/api/java/forestry/api/arboriculture/EnumTreeChromosome.java b/src/api/java/forestry/api/arboriculture/EnumTreeChromosome.java deleted file mode 100644 index 8f74d0c2..00000000 --- a/src/api/java/forestry/api/arboriculture/EnumTreeChromosome.java +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import forestry.api.genetics.AlleleManager; -import forestry.api.genetics.IAllele; -import forestry.api.genetics.IAlleleArea; -import forestry.api.genetics.IAlleleBoolean; -import forestry.api.genetics.IAlleleFloat; -import forestry.api.genetics.IAlleleInteger; -import forestry.api.genetics.IAllelePlantType; -import forestry.api.genetics.IChromosomeType; -import forestry.api.genetics.IFruitFamily; -import forestry.api.genetics.ISpeciesRoot; -import net.minecraftforge.common.EnumPlantType; - -public enum EnumTreeChromosome implements IChromosomeType { - - /** - * Determines the following: - WorldGen, including the used wood blocks - {@link IFruitFamily}s supported. Limits which {@link IFruitProvider} - * will actually yield fruit with this species. - Native {@link EnumPlantType} for this tree. Combines with the PLANT chromosome. - */ - SPECIES(IAlleleTreeSpecies.class), - /** - * {@link IGrowthProvider}, determines conditions required by the tree to grow. - */ - GROWTH(IAlleleGrowth.class), - /** - * A float modifying the height of the tree. Taken into account at worldgen. - */ - HEIGHT(IAlleleFloat.class), - /** - * Chance for saplings. - */ - FERTILITY(IAlleleFloat.class), - /** - * {@link IFruitProvider}, determines if and what fruits are grown on the tree. Limited by the {@link IFruitFamily}s the species supports. - */ - FRUITS(IAlleleFruit.class), - /** - * Chance for fruit leaves and/or drops. - */ - YIELD(IAlleleFloat.class), - /** - * May add additional tolerances for {@link EnumPlantTypes}. - */ - PLANT(IAllelePlantType.class), - /** - * Determines the speed at which fruit will ripen on this tree. - */ - SAPPINESS(IAlleleFloat.class), - /** - * Territory for leaf effects. Unused. - */ - TERRITORY(IAlleleArea.class), - /** - * Leaf effect. Unused. - */ - EFFECT(IAlleleLeafEffect.class), - /** - * Amount of random ticks which need to elapse before a sapling will grow into a tree. - */ - MATURATION(IAlleleInteger.class), - - GIRTH(IAlleleInteger.class), - /** - * Determines if the tree can burn. - */ - FIREPROOF(IAlleleBoolean.class), - ; - - Class<? extends IAllele> clss; - - EnumTreeChromosome(Class<? extends IAllele> clss) { - this.clss = clss; - } - - @Override - public Class<? extends IAllele> getAlleleClass() { - return clss; - } - - @Override - public String getName() { - return this.toString().toLowerCase(); - } - - @Override - public ISpeciesRoot getSpeciesRoot() { - return AlleleManager.alleleRegistry.getSpeciesRoot("rootTrees"); - } - -} diff --git a/src/api/java/forestry/api/arboriculture/IAlleleFruit.java b/src/api/java/forestry/api/arboriculture/IAlleleFruit.java deleted file mode 100644 index 0f54db51..00000000 --- a/src/api/java/forestry/api/arboriculture/IAlleleFruit.java +++ /dev/null @@ -1,17 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import forestry.api.genetics.IAllele; - -/** - * Simple allele encapsulating an {@link IFruitProvider}. - */ -public interface IAlleleFruit extends IAllele { - - IFruitProvider getProvider(); - -} diff --git a/src/api/java/forestry/api/arboriculture/IAlleleGrowth.java b/src/api/java/forestry/api/arboriculture/IAlleleGrowth.java deleted file mode 100644 index 6cb4b438..00000000 --- a/src/api/java/forestry/api/arboriculture/IAlleleGrowth.java +++ /dev/null @@ -1,17 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import forestry.api.genetics.IAllele; - -/** - * Simple allele encapsulating an {@link IGrowthProvider}. - */ -public interface IAlleleGrowth extends IAllele { - - IGrowthProvider getProvider(); - -} diff --git a/src/api/java/forestry/api/arboriculture/IAlleleLeafEffect.java b/src/api/java/forestry/api/arboriculture/IAlleleLeafEffect.java deleted file mode 100644 index d52d963a..00000000 --- a/src/api/java/forestry/api/arboriculture/IAlleleLeafEffect.java +++ /dev/null @@ -1,20 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import net.minecraft.world.World; - -import forestry.api.genetics.IAlleleEffect; -import forestry.api.genetics.IEffectData; - -/** - * Simple allele encapsulating a leaf effect. (Not implemented) - */ -public interface IAlleleLeafEffect extends IAlleleEffect { - - IEffectData doEffect(ITreeGenome genome, IEffectData storedData, World world, int x, int y, int z); - -} diff --git a/src/api/java/forestry/api/arboriculture/IAlleleTreeSpecies.java b/src/api/java/forestry/api/arboriculture/IAlleleTreeSpecies.java deleted file mode 100644 index be057254..00000000 --- a/src/api/java/forestry/api/arboriculture/IAlleleTreeSpecies.java +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import java.util.Collection; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; -import net.minecraft.world.gen.feature.WorldGenerator; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraftforge.common.EnumPlantType; - -import forestry.api.genetics.IAlleleSpecies; -import forestry.api.genetics.IFruitFamily; - -public interface IAlleleTreeSpecies extends IAlleleSpecies { - - ITreeRoot getRoot(); - - /** - * @return Native plant type of this species. - */ - EnumPlantType getPlantType(); - - /** - * @return List of all {@link IFruitFamily}s which can grow on leaves generated by this species. - */ - Collection<IFruitFamily> getSuitableFruit(); - - /** - * @param tree - * @param world - * @param x - * @param y - * @param z - * @return Tree generator for the tree at the given location. - */ - WorldGenerator getGenerator(ITree tree, World world, int x, int y, int z); - - /** - * @return All available generator classes for this species. - */ - Class<? extends WorldGenerator>[] getGeneratorClasses(); - - /* TEXTURES AND OVERRIDES */ - int getLeafColour(ITree tree); - - short getLeafIconIndex(ITree tree, boolean fancy); - - @SideOnly(Side.CLIENT) - IIcon getGermlingIcon(EnumGermlingType type, int renderPass); - - @SideOnly(Side.CLIENT) - int getGermlingColour(EnumGermlingType type, int renderPass); - - /** - * - * @return Array of ItemStacks representing logs that these tree produces, the first one being the primary one - */ - ItemStack[] getLogStacks(); - -} diff --git a/src/api/java/forestry/api/arboriculture/IArboristTracker.java b/src/api/java/forestry/api/arboriculture/IArboristTracker.java deleted file mode 100644 index 9777e876..00000000 --- a/src/api/java/forestry/api/arboriculture/IArboristTracker.java +++ /dev/null @@ -1,12 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import forestry.api.genetics.IBreedingTracker; - -public interface IArboristTracker extends IBreedingTracker { - -} diff --git a/src/api/java/forestry/api/arboriculture/IFruitProvider.java b/src/api/java/forestry/api/arboriculture/IFruitProvider.java deleted file mode 100644 index ef54fc99..00000000 --- a/src/api/java/forestry/api/arboriculture/IFruitProvider.java +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.ItemStack; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import forestry.api.genetics.IFruitFamily; - -public interface IFruitProvider { - - IFruitFamily getFamily(); - - int getColour(ITreeGenome genome, IBlockAccess world, int x, int y, int z, int ripeningTime); - - boolean markAsFruitLeaf(ITreeGenome genome, World world, int x, int y, int z); - - int getRipeningPeriod(); - - // / Products, Chance - ItemStack[] getProducts(); - - // / Specialty, Chance - ItemStack[] getSpecialty(); - - ItemStack[] getFruits(ITreeGenome genome, World world, int x, int y, int z, int ripeningTime); - - /** - * @return Short, human-readable identifier used in the treealyzer. - */ - String getDescription(); - - /* TEXTURE OVERLAY */ - /** - * @param genome - * @param world - * @param x - * @param y - * @param z - * @param ripeningTime - * Elapsed ripening time for the fruit. - * @param fancy - * @return IIcon index of the texture to overlay on the leaf block. - */ - short getIconIndex(ITreeGenome genome, IBlockAccess world, int x, int y, int z, int ripeningTime, boolean fancy); - - /** - * @return true if this fruit provider requires fruit blocks to spawn, false otherwise. - */ - boolean requiresFruitBlocks(); - - /** - * Tries to spawn a fruit block at the potential position when the tree generates. - * - * @param genome - * @param world - * @param x - * @param y - * @param z - * @return true if a fruit block was spawned, false otherwise. - */ - boolean trySpawnFruitBlock(ITreeGenome genome, World world, int x, int y, int z); - - @SideOnly(Side.CLIENT) - void registerIcons(IIconRegister register); -} diff --git a/src/api/java/forestry/api/arboriculture/IGrowthProvider.java b/src/api/java/forestry/api/arboriculture/IGrowthProvider.java deleted file mode 100644 index 92e553e0..00000000 --- a/src/api/java/forestry/api/arboriculture/IGrowthProvider.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import net.minecraft.world.World; - -public interface IGrowthProvider { - - /** - * Check to see whether a sapling at the given location with the given genome can grow into a tree. - * - * @param genome Genome of the tree this is called for. - * @param world Minecraft world the tree will inhabit. - * @param xPos x-Coordinate to attempt growth at. - * @param yPos y-Coordinate to attempt growth at. - * @param zPos z-Coordinate to attempt growth at. - * @param expectedGirth Trunk size of the tree to generate. - * @param expectedHeight Height of the tree to generate. - * @return true if the tree can grow at the given coordinates, false otherwise. - */ - boolean canGrow(ITreeGenome genome, World world, int xPos, int yPos, int zPos, int expectedGirth, int expectedHeight); - - EnumGrowthConditions getGrowthConditions(ITreeGenome genome, World world, int xPos, int yPos, int zPos); - - /** - * @return Short, human-readable identifier used in the treealyzer. - */ - String getDescription(); - - /** - * @return Detailed description of growth behaviour used in the treealyzer. - */ - String[] getInfo(); - -} diff --git a/src/api/java/forestry/api/arboriculture/ILeafTickHandler.java b/src/api/java/forestry/api/arboriculture/ILeafTickHandler.java deleted file mode 100644 index 4d7fba44..00000000 --- a/src/api/java/forestry/api/arboriculture/ILeafTickHandler.java +++ /dev/null @@ -1,12 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import net.minecraft.world.World; - -public interface ILeafTickHandler { - boolean onRandomLeafTick(ITree tree, World world, int biomeId, int x, int y, int z, boolean isDestroyed); -} diff --git a/src/api/java/forestry/api/arboriculture/IToolGrafter.java b/src/api/java/forestry/api/arboriculture/IToolGrafter.java deleted file mode 100644 index 339725e6..00000000 --- a/src/api/java/forestry/api/arboriculture/IToolGrafter.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public interface IToolGrafter { - /** - * Called by leaves to determine the increase in sapling droprate. - * - * @param stack ItemStack containing the grafter. - * @param world Minecraft world the player and the target block inhabit. - * @param x x-Coordinate of the broken leaf block. - * @param y y-Coordinate of the broken leaf block. - * @param z z-Coordinate of the broken leaf block. - * @return Float representing the factor the usual drop chance is to be multiplied by. - */ - float getSaplingModifier(ItemStack stack, World world, EntityPlayer player, int x, int y, int z); -} diff --git a/src/api/java/forestry/api/arboriculture/ITree.java b/src/api/java/forestry/api/arboriculture/ITree.java deleted file mode 100644 index 5cbd736f..00000000 --- a/src/api/java/forestry/api/arboriculture/ITree.java +++ /dev/null @@ -1,100 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import java.util.EnumSet; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraft.world.gen.feature.WorldGenerator; - -import net.minecraftforge.common.EnumPlantType; - -import forestry.api.genetics.IEffectData; -import forestry.api.genetics.IIndividual; -import forestry.api.world.ITreeGenData; - -public interface ITree extends IIndividual, ITreeGenData { - - void mate(ITree other); - - IEffectData[] doEffect(IEffectData[] storedData, World world, int biomeid, int x, int y, int z); - - IEffectData[] doFX(IEffectData[] storedData, World world, int biomeid, int x, int y, int z); - - ITreeGenome getGenome(); - - ITreeGenome getMate(); - - EnumSet<EnumPlantType> getPlantTypes(); - - ITree[] getSaplings(World world, int x, int y, int z, float modifier); - - ItemStack[] getProduceList(); - - ItemStack[] getSpecialtyList(); - - ItemStack[] produceStacks(World world, int x, int y, int z, int ripeningTime); - - /** - * - * @param world - * @param x - * @param y - * @param z - * @return Boolean indicating whether a sapling can stay planted at the given position. - */ - boolean canStay(World world, int x, int y, int z); - - /** - * - * @param world - * @param x - * @param y - * @param z - * @return Boolean indicating whether a sapling at the given position can grow into a tree. - */ - boolean canGrow(World world, int x, int y, int z, int expectedGirth, int expectedHeight); - - /** - * @return Integer denoting the maturity (block ticks) required for a sapling to attempt to grow into a tree. - */ - int getRequiredMaturity(); - - /** - * @return Integer denoting how resilient leaf blocks are against adverse influences (i.e. caterpillars). - */ - int getResilience(); - - /** - * @param world - * @param x - * @param y - * @param z - * @return Integer denoting the size of the tree trunk. - */ - int getGirth(World world, int x, int y, int z); - - - - /** - * - * @param world - * @param x - * @param y - * @param z - * @return Growth conditions at the given position. - */ - EnumGrowthConditions getGrowthCondition(World world, int x, int y, int z); - - WorldGenerator getTreeGenerator(World world, int x, int y, int z, boolean wasBonemealed); - - ITree copy(); - - boolean isPureBred(EnumTreeChromosome chromosome); - - boolean canBearFruit(); -} diff --git a/src/api/java/forestry/api/arboriculture/ITreeGenome.java b/src/api/java/forestry/api/arboriculture/ITreeGenome.java deleted file mode 100644 index ee5a1f02..00000000 --- a/src/api/java/forestry/api/arboriculture/ITreeGenome.java +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import java.util.EnumSet; - -import net.minecraftforge.common.EnumPlantType; - -import forestry.api.genetics.IGenome; - -public interface ITreeGenome extends IGenome { - - IAlleleTreeSpecies getPrimary(); - - IAlleleTreeSpecies getSecondary(); - - IFruitProvider getFruitProvider(); - - IGrowthProvider getGrowthProvider(); - - float getHeight(); - - float getFertility(); - - /** - * @return Determines either a) how many fruit leaves there are or b) the chance for any fruit leave to drop a sapling. Exact usage determined by the - * IFruitProvider - */ - float getYield(); - - float getSappiness(); - - EnumSet<EnumPlantType> getPlantTypes(); - - /** - * @return Amount of random block ticks required for a sapling to mature into a fully grown tree. - */ - int getMaturationTime(); - - int getGirth(); - - IAlleleLeafEffect getEffect(); -} diff --git a/src/api/java/forestry/api/arboriculture/ITreeModifier.java b/src/api/java/forestry/api/arboriculture/ITreeModifier.java deleted file mode 100644 index 775f91eb..00000000 --- a/src/api/java/forestry/api/arboriculture/ITreeModifier.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -public interface ITreeModifier { - - /** - * - * @param genome - * @return Float used to modify the height. - */ - float getHeightModifier(ITreeGenome genome, float currentModifier); - - /** - * - * @param genome - * @return Float used to modify the yield. - */ - float getYieldModifier(ITreeGenome genome, float currentModifier); - - /** - * - * @param genome - * @return Float used to modify the sappiness. - */ - float getSappinessModifier(ITreeGenome genome, float currentModifier); - - /** - * - * @param genome - * @return Float used to modify the maturation. - */ - float getMaturationModifier(ITreeGenome genome, float currentModifier); - - /** - * @param genome0 - * @param genome1 - * @return Float used to modify the base mutation chance. - */ - float getMutationModifier(ITreeGenome genome0, ITreeGenome genome1, float currentModifier); - -} diff --git a/src/api/java/forestry/api/arboriculture/ITreeMutation.java b/src/api/java/forestry/api/arboriculture/ITreeMutation.java deleted file mode 100644 index 65804969..00000000 --- a/src/api/java/forestry/api/arboriculture/ITreeMutation.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import net.minecraft.world.World; - -import forestry.api.genetics.IAllele; -import forestry.api.genetics.IGenome; -import forestry.api.genetics.IMutation; -import forestry.api.genetics.ISpeciesRoot; - -public interface ITreeMutation extends IMutation { - - /** - * @return {@link ISpeciesRoot} this mutation is associated with. - */ - ITreeRoot getRoot(); - - /** - * @param world - * @param x - * @param y - * @param z - * @param allele0 - * @param allele1 - * @param genome0 - * @param genome1 - * @return float representing the chance for mutation to occur. note that this is 0 - 100 based, since it was an integer previously! - */ - float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1); -} diff --git a/src/api/java/forestry/api/arboriculture/ITreeRoot.java b/src/api/java/forestry/api/arboriculture/ITreeRoot.java deleted file mode 100644 index e966ca04..00000000 --- a/src/api/java/forestry/api/arboriculture/ITreeRoot.java +++ /dev/null @@ -1,113 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import java.util.ArrayList; -import java.util.Collection; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import com.mojang.authlib.GameProfile; - -import forestry.api.genetics.IAllele; -import forestry.api.genetics.IChromosome; -import forestry.api.genetics.IIndividual; -import forestry.api.genetics.ISpeciesRoot; - -public interface ITreeRoot extends ISpeciesRoot { - - @Override - boolean isMember(ItemStack itemstack); - - @Override - ITree getMember(ItemStack itemstack); - - @Override - ITree getMember(NBTTagCompound compound); - - @Override - ITree templateAsIndividual(IAllele[] template); - - @Override - ITree templateAsIndividual(IAllele[] templateActive, IAllele[] templateInactive); - - @Override - ITreeGenome templateAsGenome(IAllele[] template); - - @Override - ITreeGenome templateAsGenome(IAllele[] templateActive, IAllele[] templateInactive); - - /** - * @param world - * @return {@link IArboristTracker} associated with the passed world. - */ - @Override - IArboristTracker getBreedingTracker(World world, GameProfile player); - - /* TREE SPECIFIC */ - /** - * Register a leaf tick handler. - * @param handler the {@link ILeafTickHandler} to register. - */ - void registerLeafTickHandler(ILeafTickHandler handler); - - Collection<ILeafTickHandler> getLeafTickHandlers(); - - /** - * @return type of tree encoded on the itemstack. EnumBeeType.NONE if it isn't a tree. - */ - EnumGermlingType getType(ItemStack stack); - - ITree getTree(World world, int x, int y, int z); - - ITree getTree(World world, ITreeGenome genome); - - boolean plantSapling(World world, ITree tree, GameProfile owner, int x, int y, int z); - - /** - * @deprecated since Forestry 3.5.0. Use ITreeGenData setLeavesDecorative. - */ - @Deprecated - // decorative=true for creative and player-placed leaves. No decay, pollination, or drops. - boolean setLeaves(World world, IIndividual tree, GameProfile owner, int x, int y, int z, boolean decorative); - - /** - * @deprecated since Forestry 3.5.0. Use ITreeGenData setLeaves. - */ - @Deprecated - // set normal leaves created as worldgen - boolean setLeaves(World world, IIndividual tree, GameProfile owner, int x, int y, int z); - - @Override - IChromosome[] templateAsChromosomes(IAllele[] template); - - @Override - IChromosome[] templateAsChromosomes(IAllele[] templateActive, IAllele[] templateInactive); - - boolean setFruitBlock(World world, IAlleleFruit allele, float sappiness, short[] indices, int x, int y, int z); - - /* GAME MODE */ - ArrayList<ITreekeepingMode> getTreekeepingModes(); - - ITreekeepingMode getTreekeepingMode(World world); - - ITreekeepingMode getTreekeepingMode(String name); - - void registerTreekeepingMode(ITreekeepingMode mode); - - void setTreekeepingMode(World world, String name); - - /* TEMPLATES */ - @Override - ArrayList<ITree> getIndividualTemplates(); - - /* MUTATIONS */ - @Override - Collection<ITreeMutation> getMutations(boolean shuffle); - -} diff --git a/src/api/java/forestry/api/arboriculture/ITreekeepingMode.java b/src/api/java/forestry/api/arboriculture/ITreekeepingMode.java deleted file mode 100644 index cc5224d8..00000000 --- a/src/api/java/forestry/api/arboriculture/ITreekeepingMode.java +++ /dev/null @@ -1,22 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.arboriculture; - -import java.util.ArrayList; - -public interface ITreekeepingMode extends ITreeModifier { - - /** - * @return Localized name of this treekeeping mode. - */ - String getName(); - - /** - * @return Localized list of strings outlining the behaviour of this treekeeping mode. - */ - ArrayList<String> getDescription(); - -} diff --git a/src/api/java/forestry/api/arboriculture/package-info.java b/src/api/java/forestry/api/arboriculture/package-info.java deleted file mode 100644 index de961141..00000000 --- a/src/api/java/forestry/api/arboriculture/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="2.3.0", owner="ForestryAPI|core", provides="ForestryAPI|arboriculture") -package forestry.api.arboriculture; -import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/circuits/ChipsetManager.java b/src/api/java/forestry/api/circuits/ChipsetManager.java deleted file mode 100644 index c5f0db5c..00000000 --- a/src/api/java/forestry/api/circuits/ChipsetManager.java +++ /dev/null @@ -1,13 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.circuits; - -public class ChipsetManager { - - public static ISolderManager solderManager; - public static ICircuitRegistry circuitRegistry; - -} diff --git a/src/api/java/forestry/api/circuits/ICircuit.java b/src/api/java/forestry/api/circuits/ICircuit.java deleted file mode 100644 index 01b7e79d..00000000 --- a/src/api/java/forestry/api/circuits/ICircuit.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.circuits; - -import java.util.List; - -import net.minecraft.tileentity.TileEntity; - -public interface ICircuit { - String getUID(); - - boolean requiresDiscovery(); - - int getLimit(); - - String getName(); - - boolean isCircuitable(TileEntity tile); - - void onInsertion(int slot, TileEntity tile); - - void onLoad(int slot, TileEntity tile); - - void onRemoval(int slot, TileEntity tile); - - void onTick(int slot, TileEntity tile); - - void addTooltip(List<String> list); -} diff --git a/src/api/java/forestry/api/circuits/ICircuitBoard.java b/src/api/java/forestry/api/circuits/ICircuitBoard.java deleted file mode 100644 index 3b424d75..00000000 --- a/src/api/java/forestry/api/circuits/ICircuitBoard.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.circuits; - -import java.util.List; - -import net.minecraft.tileentity.TileEntity; - -import forestry.api.core.INBTTagable; - -public interface ICircuitBoard extends INBTTagable { - - int getPrimaryColor(); - - int getSecondaryColor(); - - void addTooltip(List<String> list); - - void onInsertion(TileEntity tile); - - void onLoad(TileEntity tile); - - void onRemoval(TileEntity tile); - - void onTick(TileEntity tile); - - ICircuit[] getCircuits(); - -} diff --git a/src/api/java/forestry/api/circuits/ICircuitLayout.java b/src/api/java/forestry/api/circuits/ICircuitLayout.java deleted file mode 100644 index e90853b9..00000000 --- a/src/api/java/forestry/api/circuits/ICircuitLayout.java +++ /dev/null @@ -1,16 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.circuits; - -public interface ICircuitLayout { - - String getUID(); - - String getName(); - - String getUsage(); - -} diff --git a/src/api/java/forestry/api/circuits/ICircuitLibrary.java b/src/api/java/forestry/api/circuits/ICircuitLibrary.java deleted file mode 100644 index 0d65ba45..00000000 --- a/src/api/java/forestry/api/circuits/ICircuitLibrary.java +++ /dev/null @@ -1,10 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.circuits; - -public interface ICircuitLibrary { - -} diff --git a/src/api/java/forestry/api/circuits/ICircuitRegistry.java b/src/api/java/forestry/api/circuits/ICircuitRegistry.java deleted file mode 100644 index 9fb2b94d..00000000 --- a/src/api/java/forestry/api/circuits/ICircuitRegistry.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.circuits; - -import java.util.Map; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public interface ICircuitRegistry { - - /* CIRCUITS */ - Map<String, ICircuit> getRegisteredCircuits(); - - void registerCircuit(ICircuit circuit); - - ICircuit getCircuit(String uid); - - ICircuitLibrary getCircuitLibrary(World world, String playername); - - /* LAYOUTS */ - Map<String, ICircuitLayout> getRegisteredLayouts(); - - void registerLayout(ICircuitLayout layout); - - ICircuitLayout getLayout(String uid); - - ICircuitLayout getDefaultLayout(); - - ICircuitBoard getCircuitboard(ItemStack itemstack); - - boolean isChipset(ItemStack itemstack); - -} diff --git a/src/api/java/forestry/api/circuits/ISolderManager.java b/src/api/java/forestry/api/circuits/ISolderManager.java deleted file mode 100644 index af9b41f1..00000000 --- a/src/api/java/forestry/api/circuits/ISolderManager.java +++ /dev/null @@ -1,14 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.circuits; - -import net.minecraft.item.ItemStack; - -public interface ISolderManager { - - void addRecipe(ICircuitLayout layout, ItemStack resource, ICircuit circuit); - -} diff --git a/src/api/java/forestry/api/circuits/package-info.java b/src/api/java/forestry/api/circuits/package-info.java deleted file mode 100644 index 88612198..00000000 --- a/src/api/java/forestry/api/circuits/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="2.0.0", owner="ForestryAPI|core", provides="ForestryAPI|circuits") -package forestry.api.circuits; -import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/core/BiomeHelper.java b/src/api/java/forestry/api/core/BiomeHelper.java deleted file mode 100644 index bc20cd66..00000000 --- a/src/api/java/forestry/api/core/BiomeHelper.java +++ /dev/null @@ -1,36 +0,0 @@ -package forestry.api.core; - -import java.util.HashMap; -import java.util.Map; - -import net.minecraft.world.biome.BiomeGenBase; - -import net.minecraftforge.common.BiomeDictionary; - -public class BiomeHelper { - - private static final Map<BiomeGenBase, Boolean> isBiomeHellishCache = new HashMap<BiomeGenBase, Boolean>(); - - /** - * Determines if it can rain or snow in the given biome. - */ - public static boolean canRainOrSnow(BiomeGenBase biomeGenBase) { - return biomeGenBase.getEnableSnow() || biomeGenBase.canSpawnLightningBolt(); - } - - /** - * Determines if a given BiomeGenBase is of HELLISH temperature, since it is treated separately from actual temperature values. - * Uses the BiomeDictionary. - * @param biomeGen BiomeGenBase of the biome in question - * @return true, if the BiomeGenBase is a Nether-type biome; false otherwise. - */ - public static boolean isBiomeHellish(BiomeGenBase biomeGen) { - if (isBiomeHellishCache.containsKey(biomeGen)) { - return isBiomeHellishCache.get(biomeGen); - } - - boolean isBiomeHellish = BiomeDictionary.isBiomeOfType(biomeGen, BiomeDictionary.Type.NETHER); - isBiomeHellishCache.put(biomeGen, isBiomeHellish); - return isBiomeHellish; - } -} diff --git a/src/api/java/forestry/api/core/EnumHumidity.java b/src/api/java/forestry/api/core/EnumHumidity.java deleted file mode 100644 index a8743169..00000000 --- a/src/api/java/forestry/api/core/EnumHumidity.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -/** - * Many things Forestry use temperature and humidity of a biome to determine whether they can or how they can work or spawn at a given location. - * - * This enum concerns humidity. - */ -public enum EnumHumidity { - ARID("Arid"), NORMAL("Normal"), DAMP("Damp"); - - public final String name; - - private EnumHumidity(String name) { - this.name = name; - } - - public String getName() { - return this.name; - } - - /** - * Determines the EnumHumidity given a floating point representation of Minecraft Rainfall. - * To check if rainfall is possible in a biome, use BiomeHelper.canRainOrSnow(). - * @param rawHumidity raw rainfall value - * @return EnumHumidity corresponding to rainfall value - */ - public static EnumHumidity getFromValue(float rawHumidity) { - if (rawHumidity > 0.85f) { // matches BiomeGenBase.isHighHumidity() - return DAMP; - } - else if (rawHumidity >= 0.3f) { - return NORMAL; - } - else { - return ARID; - } - } -} diff --git a/src/api/java/forestry/api/core/EnumTemperature.java b/src/api/java/forestry/api/core/EnumTemperature.java deleted file mode 100644 index b0c4c889..00000000 --- a/src/api/java/forestry/api/core/EnumTemperature.java +++ /dev/null @@ -1,71 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -import net.minecraft.util.IIcon; -import net.minecraft.world.biome.BiomeGenBase; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/** - * Many things Forestry use temperature and humidity of a biome to determine whether they can or how they can work or spawn at a given location. - * - * This enum concerns temperature. - */ -public enum EnumTemperature { - NONE("None", "habitats/ocean"), ICY("Icy", "habitats/snow"), COLD("Cold", "habitats/taiga"), - NORMAL("Normal", "habitats/plains"), WARM("Warm", "habitats/jungle"), HOT("Hot", "habitats/desert"), HELLISH("Hellish", "habitats/nether"); - - public final String name; - public final String iconIndex; - - private EnumTemperature(String name, String iconIndex) { - this.name = name; - this.iconIndex = iconIndex; - } - - public String getName() { - return this.name; - } - - @SideOnly(Side.CLIENT) - public IIcon getIcon() { - return ForestryAPI.textureManager.getDefault(iconIndex); - } - - /** - * Determines the EnumTemperature given a floating point representation of - * Minecraft temperature. Hellish biomes are handled based on their biome - * type - check BiomeHelper.isBiomeHellish. - * @param rawTemp raw temperature value - * @return EnumTemperature corresponding to value of rawTemp - */ - public static EnumTemperature getFromValue(float rawTemp) { - if (rawTemp > 1.00f) { - return HOT; - } - else if (rawTemp > 0.80f) { - return WARM; - } - else if (rawTemp > 0.30f) { - return NORMAL; - } - else if (rawTemp > 0.0f) { - return COLD; - } - else { - return ICY; - } - } - - public static EnumTemperature getFromBiome(BiomeGenBase biomeGenBase) { - if (BiomeHelper.isBiomeHellish(biomeGenBase)) { - return HELLISH; - } - return getFromValue(biomeGenBase.temperature); - } -} diff --git a/src/api/java/forestry/api/core/ErrorStateRegistry.java b/src/api/java/forestry/api/core/ErrorStateRegistry.java deleted file mode 100644 index 67e5c466..00000000 --- a/src/api/java/forestry/api/core/ErrorStateRegistry.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - ******************************************************************************* - * Copyright (c) 2011-2014 SirSengir. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Lesser Public License v3 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/lgpl-3.0.txt - * - * Various Contributors including, but not limited to: - * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges - ******************************************************************************* - */ -package forestry.api.core; - -import com.google.common.collect.BiMap; -import com.google.common.collect.HashBiMap; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; - -import net.minecraft.client.renderer.texture.IIconRegister; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/** - * - * @author CovertJaguar <http://www.railcraft.info/> - */ -public class ErrorStateRegistry { - - private static final BiMap<Short, IErrorState> states = HashBiMap.create(); - private static final Map<String, IErrorState> stateNames = new HashMap<String, IErrorState>(); - private static final Set<IErrorState> stateView = Collections.unmodifiableSet(states.inverse().keySet()); - - public static void registerErrorState(IErrorState state) { - if (states.containsKey(state.getID())) - throw new RuntimeException("Forestry Error State does not possess a unique id."); - states.put(state.getID(), state); - addStateName(state, state.getUniqueName()); - } - - public static void addAlias(IErrorState state, String name) { - if (!states.values().contains(state)) - throw new RuntimeException("Forestry Error State did not exist while trying to register alias."); - addStateName(state, name); - } - - private static void addStateName(IErrorState state, String name) { - if (!name.contains(":")) - throw new RuntimeException("Forestry Error State name must be in the format <modid>:<name>."); - if (stateNames.containsKey(name)) - throw new RuntimeException("Forestry Error State does not possess a unique name."); - stateNames.put(name, state); - } - - public static IErrorState getErrorState(short id) { - return states.get(id); - } - - public static IErrorState getErrorState(String name) { - return stateNames.get(name); - } - - public static Set<IErrorState> getErrorStates() { - return stateView; - } - - @SideOnly(Side.CLIENT) - public static void initIcons(IIconRegister register) { - for (IErrorState code : states.values()) { - code.registerIcons(register); - } - } -} diff --git a/src/api/java/forestry/api/core/ForestryAPI.java b/src/api/java/forestry/api/core/ForestryAPI.java deleted file mode 100644 index 24c5b7eb..00000000 --- a/src/api/java/forestry/api/core/ForestryAPI.java +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/** - * Forestry's API is divided into several subcategories to make it easier to understand. - * - * If you need to distribute API files, try to only include the parts you are actually - * using to minimize conflicts due to API changes. - * - * .core - Miscallenous base classes and interfaces as well as some basics for tools, armor, game modes and stuff needed by biome mods. - * .fuels - Managers and classes to facilitate adding fuels to various engines and machines. - * .recipes - Managers and helpers to facilitate adding new recipes to various machines. - * .storage - Managers, events and interfaces for defining new backpacks and handling backpack behaviour. - * .mail - Anything related to handling letters and adding new mail carrier systems. - * .genetics - Shared code for all genetic subclasses. - * \ .apiculture - Bees. - * \ .arboriculture - Trees. - * \ .lepidopterology - Butterflies. - * - * Note that if Forestry is not present, all these references will be null. - */ -public class ForestryAPI { - - /** - * The main mod instance for Forestry. - */ - public static Object instance; - - /** - * A {@link ITextureManager} needed for some things in the API. - */ - @SideOnly(Side.CLIENT) - public static ITextureManager textureManager; - - /** - * The currently active {@link IGameMode}. - */ - public static IGameMode activeMode; - - /** - * Provides information on certain Forestry constants (Villager IDs, Chest gen keys, etc) - */ - public static IForestryConstants forestryConstants; - -} diff --git a/src/api/java/forestry/api/core/ForestryEvent.java b/src/api/java/forestry/api/core/ForestryEvent.java deleted file mode 100644 index 86aac9bc..00000000 --- a/src/api/java/forestry/api/core/ForestryEvent.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -import net.minecraft.entity.player.EntityPlayer; - -import com.mojang.authlib.GameProfile; - -import cpw.mods.fml.common.eventhandler.Event; - -import forestry.api.genetics.IAlleleSpecies; -import forestry.api.genetics.IBreedingTracker; -import forestry.api.genetics.IMutation; -import forestry.api.genetics.ISpeciesRoot; - -public abstract class ForestryEvent extends Event { - - private static abstract class BreedingEvent extends ForestryEvent { - public final ISpeciesRoot root; - public final IBreedingTracker tracker; - public final GameProfile username; - - private BreedingEvent(ISpeciesRoot root, GameProfile username, IBreedingTracker tracker) { - super(); - this.root = root; - this.username = username; - this.tracker = tracker; - } - } - - public static class SpeciesDiscovered extends BreedingEvent { - public final IAlleleSpecies species; - public SpeciesDiscovered(ISpeciesRoot root, GameProfile username, IAlleleSpecies species, IBreedingTracker tracker) { - super(root, username, tracker); - this.species = species; - } - } - - public static class MutationDiscovered extends BreedingEvent { - public final IMutation allele; - public MutationDiscovered(ISpeciesRoot root, GameProfile username, IMutation allele, IBreedingTracker tracker) { - super(root, username, tracker); - this.allele = allele; - } - } - - public static class SyncedBreedingTracker extends ForestryEvent { - public final IBreedingTracker tracker; - public final EntityPlayer player; - public SyncedBreedingTracker(IBreedingTracker tracker, EntityPlayer player) { - super(); - this.tracker = tracker; - this.player = player; - } - - } -} diff --git a/src/api/java/forestry/api/core/IArmorNaturalist.java b/src/api/java/forestry/api/core/IArmorNaturalist.java deleted file mode 100644 index 87400e27..00000000 --- a/src/api/java/forestry/api/core/IArmorNaturalist.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public interface IArmorNaturalist { - - /** - * Called when the naturalist's armor acts as spectacles for seeing pollinated tree leaves/flowers. - * - * @param player - * Player doing the viewing - * @param armor - * Armor item - * @param doSee - * Whether or not to actually do the side effects of viewing - * @return true if the armor actually allows the player to see pollination. - */ - public boolean canSeePollination(EntityPlayer player, ItemStack armor, boolean doSee); -} diff --git a/src/api/java/forestry/api/core/IErrorState.java b/src/api/java/forestry/api/core/IErrorState.java deleted file mode 100644 index b17305fb..00000000 --- a/src/api/java/forestry/api/core/IErrorState.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - ******************************************************************************* - * Copyright (c) 2011-2014 SirSengir. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Lesser Public License v3 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/lgpl-3.0.txt - * - * Various Contributors including, but not limited to: - * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges - ******************************************************************************* - */ -package forestry.api.core; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.util.IIcon; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/** - * - * @author CovertJaguar <http://www.railcraft.info/> - */ -public interface IErrorState { - - short getID(); - - String getUniqueName(); - - String getDescription(); - - String getHelp(); - - @SideOnly(Side.CLIENT) - void registerIcons(IIconRegister register); - - @SideOnly(value = Side.CLIENT) - IIcon getIcon(); - -} diff --git a/src/api/java/forestry/api/core/IForestryConstants.java b/src/api/java/forestry/api/core/IForestryConstants.java deleted file mode 100644 index 4cf876f6..00000000 --- a/src/api/java/forestry/api/core/IForestryConstants.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -public interface IForestryConstants { - - /** - * @return The villager ID for the Apiarist Villager. - */ - public int getApicultureVillagerID(); - - /** - * @return The villager ID for the Arborist Villager. - */ - public int getArboricultureVillagerID(); - - /** - * @return The ChestGenHooks key for adding items to the Forestry Villager chest. - */ - public String getVillagerChestGenKey(); -} diff --git a/src/api/java/forestry/api/core/IGameMode.java b/src/api/java/forestry/api/core/IGameMode.java deleted file mode 100644 index 0b2b0c55..00000000 --- a/src/api/java/forestry/api/core/IGameMode.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -import net.minecraft.item.ItemStack; - -public interface IGameMode { - - /** - * @return Human-readable identifier for the game mode. (i.e. 'EASY', 'NORMAL', 'HARD') - */ - String getIdentifier(); - - /** - * @param ident Identifier for the setting. (See the gamemode config.) - * @return Value of the requested setting, false if unknown setting. - */ - boolean getBooleanSetting(String ident); - - /** - * @param ident Identifier for the setting. (See the gamemode config.) - * @return Value of the requested setting, 0 if unknown setting. - */ - int getIntegerSetting(String ident); - - /** - * @param ident Identifier for the setting. (See the gamemode config.) - * @return Value of the requested setting, 0 if unknown setting. - */ - float getFloatSetting(String ident); - - /** - * @param ident Identifier for the setting. (See the gamemode config.) - * @return Value of the requested setting, an itemstack containing an apple if unknown setting. - */ - ItemStack getStackSetting(String ident); - -} diff --git a/src/api/java/forestry/api/core/IIconProvider.java b/src/api/java/forestry/api/core/IIconProvider.java deleted file mode 100644 index 308e3ce5..00000000 --- a/src/api/java/forestry/api/core/IIconProvider.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.util.IIcon; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/** - * Provides icons, needed in some interfaces, most notably for bees and trees. - */ -public interface IIconProvider { - - @SideOnly(Side.CLIENT) - IIcon getIcon(short texUID); - - @SideOnly(Side.CLIENT) - void registerIcons(IIconRegister register); - -} diff --git a/src/api/java/forestry/api/core/INBTTagable.java b/src/api/java/forestry/api/core/INBTTagable.java deleted file mode 100644 index 1d3f8580..00000000 --- a/src/api/java/forestry/api/core/INBTTagable.java +++ /dev/null @@ -1,14 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -import net.minecraft.nbt.NBTTagCompound; - -public interface INBTTagable { - void readFromNBT(NBTTagCompound nbttagcompound); - - void writeToNBT(NBTTagCompound nbttagcompound); -} diff --git a/src/api/java/forestry/api/core/IStructureLogic.java b/src/api/java/forestry/api/core/IStructureLogic.java deleted file mode 100644 index aa93d171..00000000 --- a/src/api/java/forestry/api/core/IStructureLogic.java +++ /dev/null @@ -1,20 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -public interface IStructureLogic extends INBTTagable { - - /** - * @return String unique to the type of structure controlled by this structure logic. - */ - String getTypeUID(); - - /** - * Called by {@link ITileStructure}'s validateStructure(). - */ - void validateStructure(); - -} diff --git a/src/api/java/forestry/api/core/ITextureManager.java b/src/api/java/forestry/api/core/ITextureManager.java deleted file mode 100644 index a259fcae..00000000 --- a/src/api/java/forestry/api/core/ITextureManager.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -import net.minecraft.util.IIcon; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public interface ITextureManager { - - void registerIconProvider(IIconProvider provider); - - IIcon getIcon(short texUID); - - IIcon getDefault(String ident); -} diff --git a/src/api/java/forestry/api/core/ITileStructure.java b/src/api/java/forestry/api/core/ITileStructure.java deleted file mode 100644 index c8c29cad..00000000 --- a/src/api/java/forestry/api/core/ITileStructure.java +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.tileentity.TileEntity; - -/** - * The basis for multiblock components. - */ -public interface ITileStructure { - - /** - * @return String unique to the type of structure controlled by this structure logic. Should map to {@link IStructureLogic} - */ - String getTypeUID(); - - /** - * Should map to {@link IStructureLogic} - */ - void validateStructure(); - - /** - * Called when the structure resets. - */ - void onStructureReset(); - - /** - * @return TileEntity that is the master in this structure, null if no structure exists. - */ - ITileStructure getCentralTE(); - - /** - * Called to set the master TileEntity. Implementing TileEntity should keep track of the master's coordinates, not refer to the TE object itself. - * - * @param tile - */ - void setCentralTE(TileEntity tile); - - /** - * @return ISidedInventory representing the inventory accessed from this block. - */ - ISidedInventory getStructureInventory(); - - /** - * Only called on Forestry's own blocks. - */ - void makeMaster(); - - /** - * @return true if this TE is the master in a structure, false otherwise. - */ - boolean isMaster(); - - /** - * @return true if the TE is master or has a master. - */ - boolean isIntegratedIntoStructure(); - -} diff --git a/src/api/java/forestry/api/core/IToolPipette.java b/src/api/java/forestry/api/core/IToolPipette.java deleted file mode 100644 index f5f1a633..00000000 --- a/src/api/java/forestry/api/core/IToolPipette.java +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011-2014 SirSengir. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Lesser Public License v3 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/lgpl-3.0.txt - * - * Various Contributors including, but not limited to: - * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges - ******************************************************************************/ -package forestry.api.core; - -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fluids.FluidStack; - -/** - * Taken from BuildCraft 5.0.x - */ -public interface IToolPipette { - - /** - * @param pipette - * ItemStack of the pipette. - * @return Capacity of the pipette. - */ - int getCapacity(ItemStack pipette); - - /** - * @param pipette - * @return true if the pipette can pipette. - */ - boolean canPipette(ItemStack pipette); - - /** - * Fills the pipette with the given liquid stack. - * - * @param pipette - * @param liquid - * @param doFill - * @return Amount of liquid used in filling the pipette. - */ - int fill(ItemStack pipette, FluidStack liquid, boolean doFill); - - /** - * Drains liquid from the pipette - * - * @param pipette - * @param maxDrain - * @param doDrain - * @return Fluid stack representing the liquid and amount drained from the pipette. - */ - FluidStack drain(ItemStack pipette, int maxDrain, boolean doDrain); -} diff --git a/src/api/java/forestry/api/core/IToolScoop.java b/src/api/java/forestry/api/core/IToolScoop.java deleted file mode 100644 index 583b6c7e..00000000 --- a/src/api/java/forestry/api/core/IToolScoop.java +++ /dev/null @@ -1,13 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -/** - * Marks a tool as a scoop. - */ -public interface IToolScoop { - -} diff --git a/src/api/java/forestry/api/core/Tabs.java b/src/api/java/forestry/api/core/Tabs.java deleted file mode 100644 index 4ce85838..00000000 --- a/src/api/java/forestry/api/core/Tabs.java +++ /dev/null @@ -1,19 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.core; - -import net.minecraft.creativetab.CreativeTabs; - -/** - * References to the specialised tabs added by Forestry to creative inventory. - */ -public class Tabs { - - public static CreativeTabs tabApiculture; - public static CreativeTabs tabArboriculture; - public static CreativeTabs tabLepidopterology; - -} diff --git a/src/api/java/forestry/api/core/package-info.java b/src/api/java/forestry/api/core/package-info.java deleted file mode 100644 index 3db8ba25..00000000 --- a/src/api/java/forestry/api/core/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="3.0.0", owner="Forestry", provides="ForestryAPI|core") -package forestry.api.core; -import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/farming/Farmables.java b/src/api/java/forestry/api/farming/Farmables.java deleted file mode 100644 index bc4c159c..00000000 --- a/src/api/java/forestry/api/farming/Farmables.java +++ /dev/null @@ -1,20 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.farming; - -import java.util.Collection; -import java.util.HashMap; - -public class Farmables { - /** - * Can be used to add IFarmables to some of the vanilla farm logics. - * - * Identifiers: farmArboreal farmWheat farmGourd farmInfernal farmPoales farmSucculentes farmVegetables farmShroom - */ - public static HashMap<String, Collection<IFarmable>> farmables = new HashMap<String, Collection<IFarmable>>(); - - public static IFarmInterface farmInterface; -} diff --git a/src/api/java/forestry/api/farming/ICrop.java b/src/api/java/forestry/api/farming/ICrop.java deleted file mode 100644 index 22575477..00000000 --- a/src/api/java/forestry/api/farming/ICrop.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.farming; - -import java.util.Collection; - -import net.minecraft.item.ItemStack; - -public interface ICrop { - - /** - * Harvests this crop. Performs the necessary manipulations to set the crop into a "harvested" state. - * - * @return Products harvested. - */ - Collection<ItemStack> harvest(); - -} diff --git a/src/api/java/forestry/api/farming/IFarmComponent.java b/src/api/java/forestry/api/farming/IFarmComponent.java deleted file mode 100644 index 3387f7a3..00000000 --- a/src/api/java/forestry/api/farming/IFarmComponent.java +++ /dev/null @@ -1,17 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.farming; - -import forestry.api.core.ITileStructure; - -public interface IFarmComponent extends ITileStructure { - - boolean hasFunction(); - - void registerListener(IFarmListener listener); - - void removeListener(IFarmListener listener); -} diff --git a/src/api/java/forestry/api/farming/IFarmHousing.java b/src/api/java/forestry/api/farming/IFarmHousing.java deleted file mode 100644 index acdd982d..00000000 --- a/src/api/java/forestry/api/farming/IFarmHousing.java +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.farming; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; - -public interface IFarmHousing { - - int[] getCoords(); - - int[] getArea(); - - int[] getOffset(); - - World getWorld(); - - /** - * Will run the work cycle on a master TE. Will do nothing on any other farm component. - * - * @return true if any work was done, false otherwise. - */ - boolean doWork(); - - boolean hasLiquid(FluidStack liquid); - - void removeLiquid(FluidStack liquid); - - boolean hasResources(ItemStack[] resources); - - void removeResources(ItemStack[] resources); - - /** - * Callback for {@link IFarmLogic}s to plant a sapling, seed, germling, stem. Will remove the appropriate germling from the farm's inventory. It's up to the - * logic to only call this on a valid location. - * - * @param farmable - * @param world - * @param x - * @param y - * @param z - * @return true if planting was successful, false otherwise. - */ - boolean plantGermling(IFarmable farmable, World world, int x, int y, int z); - - /* INTERACTION WITH HATCHES */ - boolean acceptsAsGermling(ItemStack itemstack); - - boolean acceptsAsResource(ItemStack itemstack); - - boolean acceptsAsFertilizer(ItemStack itemstack); - - /* LOGIC */ - /** - * Set a farm logic for the given direction. UP/DOWN/UNKNOWN are invalid! - * - * @param direction - * @param logic - */ - void setFarmLogic(ForgeDirection direction, IFarmLogic logic); - - /** - * Reset the farm logic for the given direction to default. UP/DOWN/UNKNOWN are invalid! - * - * @param direction - */ - void resetFarmLogic(ForgeDirection direction); -} diff --git a/src/api/java/forestry/api/farming/IFarmInterface.java b/src/api/java/forestry/api/farming/IFarmInterface.java deleted file mode 100644 index 08968747..00000000 --- a/src/api/java/forestry/api/farming/IFarmInterface.java +++ /dev/null @@ -1,20 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.farming; - -import forestry.api.core.IStructureLogic; - -public interface IFarmInterface { - - /** - * Creates {@link IStructureLogic} for use in farm components. - * - * @param structure - * {@link IFarmComponent} to create the logic for. - * @return {@link IStructureLogic} for use in farm components - */ - IStructureLogic createFarmStructureLogic(IFarmComponent structure); -} diff --git a/src/api/java/forestry/api/farming/IFarmListener.java b/src/api/java/forestry/api/farming/IFarmListener.java deleted file mode 100644 index 461525ff..00000000 --- a/src/api/java/forestry/api/farming/IFarmListener.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.farming; - -import java.util.Collection; - -import net.minecraft.item.ItemStack; - -import net.minecraftforge.common.util.ForgeDirection; - -public interface IFarmListener { - - /** - * Called before a crop is harvested. - * - * @param crop - * ICrop about to be harvested. - * @return true to cancel further processing of this crop. - */ - boolean beforeCropHarvest(ICrop crop); - - /** - * Called after a crop has been harvested, but before harvested items are stowed in the farms inventory. - * - * @param harvested - * Collection of harvested stacks. May be manipulated. Ensure removal of stacks with 0 or less items! - * @param crop - * Harvested {@link ICrop} - */ - void afterCropHarvest(Collection<ItemStack> harvested, ICrop crop); - - /** - * Called after the stack of collected items has been returned by the farm logic, but before it is added to the farm's pending queue. - * - * @param collected - * Collection of collected stacks. May be manipulated. Ensure removal of stacks with 0 or less items! - * @param logic - */ - void hasCollected(Collection<ItemStack> collected, IFarmLogic logic); - - /** - * Called after farmland has successfully been cultivated by a farm logic. - * - * @param logic - * @param x - * @param y - * @param z - * @param direction - * @param extent - */ - void hasCultivated(IFarmLogic logic, int x, int y, int z, ForgeDirection direction, int extent); - - /** - * Called after the stack of harvested crops has been returned by the farm logic, but before it is added to the farm's pending queue. - * - * @param harvested - * @param logic - * @param x - * @param y - * @param z - * @param direction - * @param extent - */ - void hasScheduledHarvest(Collection<ICrop> harvested, IFarmLogic logic, int x, int y, int z, ForgeDirection direction, int extent); - - /** - * Can be used to cancel farm task on a per side/{@link IFarmLogic} basis. - * - * @param logic - * @param direction - * @return true to skip any work action on the given logic and direction for this work cycle. - */ - boolean cancelTask(IFarmLogic logic, ForgeDirection direction); -} diff --git a/src/api/java/forestry/api/farming/IFarmLogic.java b/src/api/java/forestry/api/farming/IFarmLogic.java deleted file mode 100644 index 1c2482c0..00000000 --- a/src/api/java/forestry/api/farming/IFarmLogic.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.farming; - -import java.util.Collection; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraftforge.common.util.ForgeDirection; - -public interface IFarmLogic { - - int getFertilizerConsumption(); - - int getWaterConsumption(float hydrationModifier); - - boolean isAcceptedResource(ItemStack itemstack); - - boolean isAcceptedGermling(ItemStack itemstack); - - Collection<ItemStack> collect(); - - boolean cultivate(int x, int y, int z, ForgeDirection direction, int extent); - - Collection<ICrop> harvest(int x, int y, int z, ForgeDirection direction, int extent); - - IFarmLogic setManual(boolean manual); - - @SideOnly(Side.CLIENT) - IIcon getIcon(); - - ResourceLocation getSpriteSheet(); - - String getName(); -} diff --git a/src/api/java/forestry/api/farming/IFarmable.java b/src/api/java/forestry/api/farming/IFarmable.java deleted file mode 100644 index 440ae599..00000000 --- a/src/api/java/forestry/api/farming/IFarmable.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.farming; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -/** - * IGermling describes a crop or other harvestable object and can be used to inspect item stacks and blocks for matches. - */ -public interface IFarmable { - - /** - * @param world - * @param x - * @param y - * @param z - * @return true if the block at the given location is a "sapling" for this type, i.e. a non-harvestable immature version of the crop. - */ - boolean isSaplingAt(World world, int x, int y, int z); - - /** - * @param world - * @param x - * @param y - * @param z - * @return {@link ICrop} if the block at the given location is a harvestable and mature crop, null otherwise. - */ - ICrop getCropAt(World world, int x, int y, int z); - - /** - * @param itemstack - * @return true if the item is a valid germling (plantable sapling, seed, etc.) for this type. - */ - boolean isGermling(ItemStack itemstack); - - /** - * @param itemstack - * @return true if the item is something that can drop from this type without actually being harvested as a crop. (Apples or sapling from decaying leaves.) - */ - boolean isWindfall(ItemStack itemstack); - - /** - * Plants a sapling by manipulating the world. The {@link IFarmLogic} should have verified the given location as valid. Called by the {@link IFarmHousing} - * which handles resources. - * - * @param germling - * @param world - * @param x - * @param y - * @param z - * @return true on success, false otherwise. - */ - boolean plantSaplingAt(EntityPlayer player, ItemStack germling, World world, int x, int y, int z); - -} diff --git a/src/api/java/forestry/api/farming/package-info.java b/src/api/java/forestry/api/farming/package-info.java deleted file mode 100644 index 4460886c..00000000 --- a/src/api/java/forestry/api/farming/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="1.1.0", owner="ForestryAPI|core", provides="ForestryAPI|farming") -package forestry.api.farming; -import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/food/BeverageManager.java b/src/api/java/forestry/api/food/BeverageManager.java deleted file mode 100644 index 2b0143ab..00000000 --- a/src/api/java/forestry/api/food/BeverageManager.java +++ /dev/null @@ -1,13 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.food; - -public class BeverageManager { - public static IBeverageEffect[] effectList = new IBeverageEffect[128]; - - public static IInfuserManager infuserManager; - public static IIngredientManager ingredientManager; -} diff --git a/src/api/java/forestry/api/food/IBeverageEffect.java b/src/api/java/forestry/api/food/IBeverageEffect.java deleted file mode 100644 index 6a787411..00000000 --- a/src/api/java/forestry/api/food/IBeverageEffect.java +++ /dev/null @@ -1,17 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.food; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; - -public interface IBeverageEffect { - int getId(); - - void doEffect(World world, EntityPlayer player); - - String getDescription(); -} diff --git a/src/api/java/forestry/api/food/IInfuserManager.java b/src/api/java/forestry/api/food/IInfuserManager.java deleted file mode 100644 index d778ffa4..00000000 --- a/src/api/java/forestry/api/food/IInfuserManager.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.food; - -import net.minecraft.item.ItemStack; - -public interface IInfuserManager { - - void addMixture(int meta, ItemStack ingredient, IBeverageEffect effect); - - void addMixture(int meta, ItemStack[] ingredients, IBeverageEffect effect); - - ItemStack getSeasoned(ItemStack base, ItemStack[] ingredients); - - boolean hasMixtures(ItemStack[] ingredients); - - boolean isIngredient(ItemStack itemstack); - - ItemStack[] getRequired(ItemStack[] ingredients); - -} diff --git a/src/api/java/forestry/api/food/IIngredientManager.java b/src/api/java/forestry/api/food/IIngredientManager.java deleted file mode 100644 index fab0e012..00000000 --- a/src/api/java/forestry/api/food/IIngredientManager.java +++ /dev/null @@ -1,16 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.food; - -import net.minecraft.item.ItemStack; - -public interface IIngredientManager { - - String getDescription(ItemStack itemstack); - - void addIngredient(ItemStack ingredient, String description); - -} diff --git a/src/api/java/forestry/api/food/package-info.java b/src/api/java/forestry/api/food/package-info.java deleted file mode 100644 index 372c3016..00000000 --- a/src/api/java/forestry/api/food/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="1.1.0", owner="ForestryAPI|core", provides="ForestryAPI|food") -package forestry.api.food; -import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/fuels/EngineBronzeFuel.java b/src/api/java/forestry/api/fuels/EngineBronzeFuel.java deleted file mode 100644 index cbab0caf..00000000 --- a/src/api/java/forestry/api/fuels/EngineBronzeFuel.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.fuels; - -import net.minecraftforge.fluids.Fluid; - -public class EngineBronzeFuel { - /** - * Item that is valid fuel for a biogas engine. - */ - public final Fluid liquid; - /** - * Power produced by this fuel per work cycle of the engine. - */ - public final int powerPerCycle; - /** - * How many work cycles a single "stack" of this type lasts. - */ - public final int burnDuration; - /** - * By how much the normal heat dissipation rate of 1 is multiplied when using this fuel type. - */ - public final int dissipationMultiplier; - - public EngineBronzeFuel(Fluid liquid, int powerPerCycle, int burnDuration, int dissipationMultiplier) { - this.liquid = liquid; - this.powerPerCycle = powerPerCycle; - this.burnDuration = burnDuration; - this.dissipationMultiplier = dissipationMultiplier; - } -} diff --git a/src/api/java/forestry/api/fuels/EngineCopperFuel.java b/src/api/java/forestry/api/fuels/EngineCopperFuel.java deleted file mode 100644 index af568dd4..00000000 --- a/src/api/java/forestry/api/fuels/EngineCopperFuel.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.fuels; - -import net.minecraft.item.ItemStack; - -public class EngineCopperFuel { - - /** - * Item that is valid fuel for a peat-fired engine. - */ - public final ItemStack fuel; - /** - * Power produced by this fuel per work cycle. - */ - public final int powerPerCycle; - /** - * Amount of work cycles this item lasts before being consumed. - */ - public final int burnDuration; - - public EngineCopperFuel(ItemStack fuel, int powerPerCycle, int burnDuration) { - this.fuel = fuel; - this.powerPerCycle = powerPerCycle; - this.burnDuration = burnDuration; - } - -} diff --git a/src/api/java/forestry/api/fuels/FermenterFuel.java b/src/api/java/forestry/api/fuels/FermenterFuel.java deleted file mode 100644 index 32989a80..00000000 --- a/src/api/java/forestry/api/fuels/FermenterFuel.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.fuels; - -import net.minecraft.item.ItemStack; - -public class FermenterFuel { - /** - * Item that is a valid fuel for the fermenter (i.e. fertilizer). - */ - public final ItemStack item; - /** - * How much is fermeted per work cycle, i.e. how much biomass is produced per cycle. - */ - public final int fermentPerCycle; - /** - * Amount of work cycles a single item of this fuel lasts before expiring. - */ - public final int burnDuration; - - public FermenterFuel(ItemStack item, int fermentPerCycle, int burnDuration) { - this.item = item; - this.fermentPerCycle = fermentPerCycle; - this.burnDuration = burnDuration; - } -} diff --git a/src/api/java/forestry/api/fuels/FuelManager.java b/src/api/java/forestry/api/fuels/FuelManager.java deleted file mode 100644 index f53d6fb7..00000000 --- a/src/api/java/forestry/api/fuels/FuelManager.java +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.fuels; - -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; - -import java.util.HashMap; - - -public class FuelManager { - /** - * Add new fuels for the fermenter here (i.e. fertilizer). - */ - public static HashMap<ItemStack, FermenterFuel> fermenterFuel; - /** - * Add new resources for the moistener here (i.e. wheat) - */ - public static HashMap<ItemStack, MoistenerFuel> moistenerResource; - /** - * Add new substrates for the rainmaker here - */ - public static HashMap<ItemStack, RainSubstrate> rainSubstrate; - /** - * Add new fuels for EngineBronze (= biogas engine) here - */ - public static HashMap<Fluid, EngineBronzeFuel> bronzeEngineFuel; - /** - * Add new fuels for EngineCopper (= peat-fired engine) here - */ - public static HashMap<ItemStack, EngineCopperFuel> copperEngineFuel; - /** - * Add new fuels for Generator here - */ - public static HashMap<Fluid, GeneratorFuel> generatorFuel; - -} diff --git a/src/api/java/forestry/api/fuels/GeneratorFuel.java b/src/api/java/forestry/api/fuels/GeneratorFuel.java deleted file mode 100644 index 16e2ee4d..00000000 --- a/src/api/java/forestry/api/fuels/GeneratorFuel.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.fuels; - -import net.minecraftforge.fluids.FluidStack; - -public class GeneratorFuel { - - /** - * LiquidStack representing the fuel type and amount consumed per triggered cycle. - */ - public final FluidStack fuelConsumed; - /** - * EU emitted per tick while this fuel is being consumed in the generator (i.e. biofuel = 32, biomass = 8). - */ - public final int eu; - /** - * Rate at which the fuel is consumed. 1 - Every tick 2 - Every second tick 3 - Every third tick etc. - */ - public final int rate; - - public GeneratorFuel(FluidStack fuelConsumed, int eu, int rate) { - this.fuelConsumed = fuelConsumed; - this.eu = eu; - this.rate = rate; - } - -} diff --git a/src/api/java/forestry/api/fuels/MoistenerFuel.java b/src/api/java/forestry/api/fuels/MoistenerFuel.java deleted file mode 100644 index 4c4c7a0b..00000000 --- a/src/api/java/forestry/api/fuels/MoistenerFuel.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.fuels; - -import net.minecraft.item.ItemStack; - -public class MoistenerFuel { - /** - * The item to use - */ - public final ItemStack item; - /** - * The item that leaves the moistener's working slot (i.e. mouldy wheat, decayed wheat, mulch) - */ - public final ItemStack product; - /** - * How much this item contributes to the final product of the moistener (i.e. mycelium) - */ - public final int moistenerValue; - /** - * What stage this product represents. Resources with lower stage value will be consumed first. - */ - public final int stage; - - public MoistenerFuel(ItemStack item, ItemStack product, int stage, int moistenerValue) { - this.item = item; - this.product = product; - this.stage = stage; - this.moistenerValue = moistenerValue; - } -} diff --git a/src/api/java/forestry/api/fuels/RainSubstrate.java b/src/api/java/forestry/api/fuels/RainSubstrate.java deleted file mode 100644 index ab0deb5a..00000000 --- a/src/api/java/forestry/api/fuels/RainSubstrate.java +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.fuels; - -import net.minecraft.item.ItemStack; - -public class RainSubstrate { - /** - * Rain substrate capable of activating the rainmaker. - */ - public ItemStack item; - /** - * Duration of the rain shower triggered by this substrate in Minecraft ticks. - */ - public int duration; - /** - * Speed of activation sequence triggered. - */ - public float speed; - - public boolean reverse; - - public RainSubstrate(ItemStack item, int duration, float speed) { - this(item, duration, speed, false); - } - - public RainSubstrate(ItemStack item, float speed) { - this(item, 0, speed, true); - } - - public RainSubstrate(ItemStack item, int duration, float speed, boolean reverse) { - this.item = item; - this.duration = duration; - this.speed = speed; - this.reverse = reverse; - } -} diff --git a/src/api/java/forestry/api/fuels/package-info.java b/src/api/java/forestry/api/fuels/package-info.java deleted file mode 100644 index 748fa228..00000000 --- a/src/api/java/forestry/api/fuels/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="2.0.1", owner="ForestryAPI|core", provides="ForestryAPI|fuels") -package forestry.api.fuels; -import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/genetics/AlleleManager.java b/src/api/java/forestry/api/genetics/AlleleManager.java deleted file mode 100644 index 6e351162..00000000 --- a/src/api/java/forestry/api/genetics/AlleleManager.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import java.util.HashMap; - -import net.minecraft.item.ItemStack; - -/** - * Holds a static reference to the {@link IAlleleRegistry}. - */ -public class AlleleManager { - /** - * Main access point for all things related to genetics. See {@link IAlleleRegistry} for details. - */ - public static IAlleleRegistry alleleRegistry; - /** - * Translates plain leaf blocks into genetic data. Used by bees and butterflies to convert and pollinate foreign leaf blocks. - */ - public static HashMap<ItemStack, IIndividual> ersatzSpecimen = new HashMap<ItemStack, IIndividual>(); - /** - * Translates plain saplings into genetic data. Used by the treealyzer and the farm to convert foreign saplings. - */ - public static HashMap<ItemStack, IIndividual> ersatzSaplings = new HashMap<ItemStack, IIndividual>(); - /** - * Queryable instance of an {@link IClimateHelper} for easier implementation. - */ - public static IClimateHelper climateHelper; - /** - * Creates Forestry alleles. - */ - public static IAlleleFactory alleleFactory; -} diff --git a/src/api/java/forestry/api/genetics/EnumTolerance.java b/src/api/java/forestry/api/genetics/EnumTolerance.java deleted file mode 100644 index 6ff0085e..00000000 --- a/src/api/java/forestry/api/genetics/EnumTolerance.java +++ /dev/null @@ -1,16 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -public enum EnumTolerance { - NONE, - - BOTH_1, BOTH_2, BOTH_3, BOTH_4, BOTH_5, - - UP_1, UP_2, UP_3, UP_4, UP_5, - - DOWN_1, DOWN_2, DOWN_3, DOWN_4, DOWN_5 -} diff --git a/src/api/java/forestry/api/genetics/IAllele.java b/src/api/java/forestry/api/genetics/IAllele.java deleted file mode 100644 index 52747410..00000000 --- a/src/api/java/forestry/api/genetics/IAllele.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/** - * An {@link IIndividual}'s {@link IGenome} is composed of {@link IChromosome}s consisting each of a primary and secondary {@link IAllele}. - * - * {@link IAllele}s hold all information regarding an {@link IIndividual}'s traits, from species to size, temperature tolerances, etc. - * - * Should be extended for different types of alleles. ISpeciesAllele, IBiomeAllele, etc. - * - * @author SirSengir - */ -public interface IAllele { - - /** - * @return A unique string identifier for this allele. - */ - String getUID(); - - /** - * @return true if the allele is dominant, false otherwise. - */ - boolean isDominant(); - - /** - * @return Localized short, human-readable identifier used in tooltips and beealyzer. - */ - String getName(); - - /** - * @return The unlocalized identifier - */ - String getUnlocalizedName(); - -} diff --git a/src/api/java/forestry/api/genetics/IAlleleArea.java b/src/api/java/forestry/api/genetics/IAlleleArea.java deleted file mode 100644 index 7277ff0a..00000000 --- a/src/api/java/forestry/api/genetics/IAlleleArea.java +++ /dev/null @@ -1,15 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/** - * Simple interface to allow adding additional alleles containing float values. - */ -public interface IAlleleArea extends IAllele { - - int[] getValue(); - -} diff --git a/src/api/java/forestry/api/genetics/IAlleleBoolean.java b/src/api/java/forestry/api/genetics/IAlleleBoolean.java deleted file mode 100644 index 887da3b9..00000000 --- a/src/api/java/forestry/api/genetics/IAlleleBoolean.java +++ /dev/null @@ -1,16 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/** - * Simple interface to allow adding additional alleles containing float values. - */ -public interface IAlleleBoolean extends IAllele { - - boolean getValue(); - - -} diff --git a/src/api/java/forestry/api/genetics/IAlleleEffect.java b/src/api/java/forestry/api/genetics/IAlleleEffect.java deleted file mode 100644 index 7b94e6b1..00000000 --- a/src/api/java/forestry/api/genetics/IAlleleEffect.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/** - * Basic effect allele. - */ -public interface IAlleleEffect extends IAllele { - /** - * @return true if this effect can combine with the effect on other allele (i.e. run before or after). combination can only occur if both effects are - * combinable. - */ - boolean isCombinable(); - - /** - * Returns the passed data storage if it is valid for this effect or a new one if the passed storage object was invalid for this effect. - * - * @param storedData - * @return {@link IEffectData} for the next cycle. - */ - IEffectData validateStorage(IEffectData storedData); - -} diff --git a/src/api/java/forestry/api/genetics/IAlleleFactory.java b/src/api/java/forestry/api/genetics/IAlleleFactory.java deleted file mode 100644 index 2b390069..00000000 --- a/src/api/java/forestry/api/genetics/IAlleleFactory.java +++ /dev/null @@ -1,80 +0,0 @@ -package forestry.api.genetics; - -/** - * Creates new alleles with smart localization. - * - * - * UID is created like this: - * modId + '.' + category + WordUtils.capitalize(valueName); - * For Example: - * modId:forestry, category:height, valueName:smallest => forestry.heightSmallest - * This is mainly for legacy compatibility and may change in future major versions. - * - * - * The default localization uses: - * [modId].allele.[valueName] - * - * Languages that need category-specific names can override it by defining: - * [modId].allele.[category].[valueName] - * - * For example: - * en_US - * forestry.allele.smallest=Smallest - * ru_RU - * forestry.allele.smallest=????? ????????? - * forestry.allele.height.smallest=????? ?????? - */ -public interface IAlleleFactory { - /** - * @param modId mod prefix for uid and localization (i.e. "forestry") - * @param category allele category for uid and localization (i.e. "height") - * @param valueName allele value name for uid and localization (i.e. "smallest") - * @param value allele float value - * @param isDominant allele dominance - * @return a new IAlleleFloat - */ - IAlleleFloat createFloat(String modId, String category, String valueName, float value, boolean isDominant); - - /** - * @param modId mod prefix for uid and localization (i.e. "forestry") - * @param category allele category for uid and localization (i.e. "territory") - * @param valueName allele value name for uid and localization (i.e. "large") - * @param xDimValue allele area X Size - * @param yDimValue allele area Y Size - * @param zDimValue allele area Z Size - * @param isDominant allele dominance - * @return a new IAlleleArea - */ - IAlleleArea createArea(String modId, String category, String valueName, int xDimValue, int yDimValue, int zDimValue, boolean isDominant); - - /** - * @param modId mod prefix for uid and localization (i.e. "forestry") - * @param category allele category for uid and localization (i.e. "fertility") - * @param valueName allele value name for uid and localization (i.e. "low") - * @param value allele int value - * @param isDominant allele dominance - * @return a new IAlleleInteger - */ - IAlleleInteger createInteger(String modId, String category, String valueName, int value, boolean isDominant); - - /** - * @param modId mod prefix for uid and localization (i.e. "forestry") - * @param category allele category for uid and localization (i.e. "fireproof") - * @param value allele boolean value - * @param isDominant allele dominance - * @return a new IAlleleBoolean - * Note that valueName will always be "true" or "false" - */ - IAlleleBoolean createBoolean(String modId, String category, boolean value, boolean isDominant); - - /** - * @param modId mod prefix for uid (i.e. "forestry") - * @param category allele category for uid (i.e. "flowers") - * @param valueName allele value name for uid (i.e. "vanilla") - * @param value allele IFlowerProvider value - * @param isDominant allele dominance - * @return a new IAlleleFlowers - * IAlleleFlowers localization is handled by the IFlowerProvider.getDescription(), unlike the other alleles. - */ - IAlleleFlowers createFlowers(String modId, String category, String valueName, IFlowerProvider value, boolean isDominant); -} diff --git a/src/api/java/forestry/api/genetics/IAlleleFloat.java b/src/api/java/forestry/api/genetics/IAlleleFloat.java deleted file mode 100644 index 6ca28776..00000000 --- a/src/api/java/forestry/api/genetics/IAlleleFloat.java +++ /dev/null @@ -1,15 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/** - * Simple interface to allow adding additional alleles containing float values. - */ -public interface IAlleleFloat extends IAllele { - - float getValue(); - -} diff --git a/src/api/java/forestry/api/genetics/IAlleleFlowers.java b/src/api/java/forestry/api/genetics/IAlleleFlowers.java deleted file mode 100644 index 0368ca41..00000000 --- a/src/api/java/forestry/api/genetics/IAlleleFlowers.java +++ /dev/null @@ -1,16 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - - -public interface IAlleleFlowers extends IAllele { - - /** - * @return FlowerProvider - */ - IFlowerProvider getProvider(); - -} diff --git a/src/api/java/forestry/api/genetics/IAlleleHandler.java b/src/api/java/forestry/api/genetics/IAlleleHandler.java deleted file mode 100644 index 3d052afe..00000000 --- a/src/api/java/forestry/api/genetics/IAlleleHandler.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/** - * @author Alex Binnie - * - * Handler for events that occur in IAlleleRegistry, such as registering alleles, branches etc. Useful for handling plugin specific behavior (i.e. - * creating a list of all bee species etc.) - * - */ -public interface IAlleleHandler { - - /** - * Called when an allele is registered with {@link IAlleleRegistry}. - * - * @param allele - * Allele which was registered. - */ - public void onRegisterAllele(IAllele allele); - - /** - * Called when a classification is registered with {@link IAlleleRegistry}. - * - * @param classification - * Classification which was registered. - */ - public void onRegisterClassification(IClassification classification); - - /** - * Called when a fruit family is registered with {@link IAlleleRegistry}. - * - * @param family - * Fruit family which was registered. - */ - public void onRegisterFruitFamily(IFruitFamily family); - -} diff --git a/src/api/java/forestry/api/genetics/IAlleleInteger.java b/src/api/java/forestry/api/genetics/IAlleleInteger.java deleted file mode 100644 index 6991efe5..00000000 --- a/src/api/java/forestry/api/genetics/IAlleleInteger.java +++ /dev/null @@ -1,15 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/** - * Simple interface to allow adding additional alleles containing integer values. - */ -public interface IAlleleInteger extends IAllele { - - int getValue(); - -} diff --git a/src/api/java/forestry/api/genetics/IAllelePlantType.java b/src/api/java/forestry/api/genetics/IAllelePlantType.java deleted file mode 100644 index 211237f2..00000000 --- a/src/api/java/forestry/api/genetics/IAllelePlantType.java +++ /dev/null @@ -1,16 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import java.util.EnumSet; - -import net.minecraftforge.common.EnumPlantType; - -public interface IAllelePlantType extends IAllele { - - public EnumSet<EnumPlantType> getPlantTypes(); - -} diff --git a/src/api/java/forestry/api/genetics/IAlleleRegistry.java b/src/api/java/forestry/api/genetics/IAlleleRegistry.java deleted file mode 100644 index 9b0907b0..00000000 --- a/src/api/java/forestry/api/genetics/IAlleleRegistry.java +++ /dev/null @@ -1,218 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import java.util.Collection; -import java.util.Map; - -import net.minecraft.item.ItemStack; - -import com.mojang.authlib.GameProfile; - -import forestry.api.genetics.IClassification.EnumClassLevel; - -/** - * Manages {@link ISpeciesRoot}, {@link IAllele}s, {@link IFruitFamily}s, {@link IClassification}, the blacklist and allows creation of research notes. - * - * @author SirSengir - */ -public interface IAlleleRegistry { - - /* SPECIES ROOT CLASSES */ - /** - * Register a {@link ISpeciesRoot}. - * @param root {@link ISpeciesRoot} to register. - */ - void registerSpeciesRoot(ISpeciesRoot root); - - /** - * @return Map of all registered {@link ISpeciesRoot}. - */ - Map<String, ISpeciesRoot> getSpeciesRoot(); - - /** - * Retrieve the {@link ISpeciesRoot} with the given uid. - * @param uid Unique id for the species class, i.e. "rootBees", "rootTrees", "rootButterflies". - * @return {@link ISpeciesRoot} if it exists, null otherwise. - */ - ISpeciesRoot getSpeciesRoot(String uid); - - /** - * Retrieve a matching {@link ISpeciesRoot} for the given itemstack. - * @param stack An itemstack possibly containing NBT data which can be converted by a species root. - * @return {@link ISpeciesRoot} if found, null otherwise. - */ - ISpeciesRoot getSpeciesRoot(ItemStack stack); - - /** - * Retrieve a matching {@link ISpeciesRoot} for the given {@link IIndividual}-class. - * @param clz Class extending {@link IIndividual}. - * @return {@link ISpeciesRoot} if found, null otherwise. - */ - ISpeciesRoot getSpeciesRoot(Class<? extends IIndividual> clz); - - /* INDIVIDUAL */ - /** - * Tests the itemstack for genetic information. - * - * @param stack - * @return true if the itemstack is an individual. - */ - boolean isIndividual(ItemStack stack); - - /** - * Retrieve genetic information from an itemstack. - * - * @param stack - * Stack to retrieve genetic information for. - * @return IIndividual containing genetic information, null if none could be extracted. - */ - IIndividual getIndividual(ItemStack stack); - - /* ALLELES */ - - /** - * @return HashMap of all currently registered alleles. - */ - Map<String, IAllele> getRegisteredAlleles(); - - /** - * Registers an allele. - * - * @param allele - * IAllele to register. - */ - void registerAllele(IAllele allele); - - /** - * @return HashMap of all registered deprecated alleles and their corresponding replacements - */ - Map<String, IAllele> getDeprecatedAlleleReplacements(); - - /** - * Registers an old allele UID and the new IAllele to replace instances of it with. - * - * @param deprecatedAlleleUID - * the old allele's UID - * @param replacement - * the IAllele that the deprecated Allele will be replaced with. - */ - void registerDeprecatedAlleleReplacement(String deprecatedAlleleUID, IAllele replacement); - - /** - * Gets an allele - * - * @param uid - * String based unique identifier of the allele to retrieve. - * @return IAllele if found or a replacement is found in the Deprecated Allele map, null otherwise. - */ - IAllele getAllele(String uid); - - /* CLASSIFICATIONS */ - /** - * @return HashMap of all currently registered classifications. - */ - Map<String, IClassification> getRegisteredClassifications(); - - /** - * Registers a classification. - * - * @param classification - * IClassification to register. - */ - void registerClassification(IClassification classification); - - /** - * Creates and returns a classification. - * - * @param level - * EnumClassLevel of the classification to create. - * @param uid - * String based unique identifier. Implementation will throw an exception if the key is already taken. - * @param scientific - * Binomial for the given classification. - * @return Created {@link IClassification} for easier chaining. - */ - IClassification createAndRegisterClassification(EnumClassLevel level, String uid, String scientific); - - /** - * Gets a classification. - * - * @param uid - * String based unique identifier of the classification to retrieve. - * @return {@link IClassification} if found, null otherwise. - */ - IClassification getClassification(String uid); - - /* FRUIT FAMILIES */ - /** - * Get all registered fruit families. - * - * @return A map of registered fruit families and their UIDs. - */ - Map<String, IFruitFamily> getRegisteredFruitFamilies(); - - /** - * Registers a new fruit family. - * - * @param family - */ - void registerFruitFamily(IFruitFamily family); - - /** - * Retrieves a fruit family identified by uid. - * - * @param uid - * @return {IFruitFamily} if found, false otherwise. - */ - IFruitFamily getFruitFamily(String uid); - - /* ALLELE HANDLERS */ - /** - * Registers a new IAlleleHandler - * - * @param handler - * IAlleleHandler to register. - */ - void registerAlleleHandler(IAlleleHandler handler); - - /* BLACKLIST */ - /** - * Blacklist an allele identified by its UID from mutation. - * - * @param uid - * UID of the allele to blacklist. - */ - void blacklistAllele(String uid); - - /** - * @return Current blacklisted alleles. - */ - Collection<String> getAlleleBlacklist(); - - /** - * @param uid - * UID of the species to vet. - * @return true if the allele is blacklisted. - */ - boolean isBlacklisted(String uid); - - /* RESEARCH */ - /** - * @param researcher Username of the player who researched this note. - * @param species {@link IAlleleSpecies} to encode on the research note. - * @return An itemstack containing a research note with the given species encoded onto it. - */ - ItemStack getSpeciesNoteStack(GameProfile researcher, IAlleleSpecies species); - - /** - * @param researcher Username of the player who researched this note. - * @param mutation {@link IMutation} to encode on the research note. - * @return An itemstack containing a research note with the given mutation encoded onto it. - */ - ItemStack getMutationNoteStack(GameProfile researcher, IMutation mutation); - -} diff --git a/src/api/java/forestry/api/genetics/IAlleleSpecies.java b/src/api/java/forestry/api/genetics/IAlleleSpecies.java deleted file mode 100644 index 5a75adef..00000000 --- a/src/api/java/forestry/api/genetics/IAlleleSpecies.java +++ /dev/null @@ -1,115 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import com.mojang.authlib.GameProfile; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import forestry.api.core.EnumHumidity; -import forestry.api.core.EnumTemperature; -import forestry.api.core.IIconProvider; - -/** - * Basic species allele. - */ -public interface IAlleleSpecies extends IAllele { - - /** - * @return the {@link ISpeciesRoot} associated with this species. - */ - ISpeciesRoot getRoot(); - - /** - * @return Localized short description of this species. (May be null.) - */ - String getDescription(); - - /** - * Binomial name of the species sans genus ("Apis"). Returning "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun - * names or return null. - * - * @return flavour text (may be null) - */ - String getBinomial(); - - /** - * Authority for the binomial name, e.g. "Sengir" on species of base Forestry. - * - * @return flavour text (may be null) - */ - String getAuthority(); - - /** - * @return Branch this species is associated with. - */ - IClassification getBranch(); - - /* RESEARCH */ - /** - * Complexity determines the difficulty researching a species. The values of primary and secondary are - * added together (and rounded) to determine the amount of pairs needed for successful research. - * @return Values between 3 - 11 are useful. - */ - int getComplexity(); - - /** - * @param itemstack - * @return A float signifying the chance for the passed itemstack to yield a research success. - */ - float getResearchSuitability(ItemStack itemstack); - - /** - * @param world - * @param gameProfile - * @param individual - * @param bountyLevel - * @return Array of itemstacks representing the bounty for this research success. - */ - ItemStack[] getResearchBounty(World world, GameProfile gameProfile, IIndividual individual, int bountyLevel); - - /* CLIMATE */ - /** - * @return Preferred temperature - */ - EnumTemperature getTemperature(); - - /** - * @return Preferred humidity - */ - EnumHumidity getHumidity(); - - /* MISC */ - /** - * @return true if the species icon should have a glowing effect. - */ - boolean hasEffect(); - - /** - * @return true if the species should not be displayed in NEI or creative inventory. - */ - boolean isSecret(); - - /** - * @return true to have the species count against the species total. - */ - boolean isCounted(); - - /* APPEARANCE */ - /** - * @param renderPass Render pass to get the colour for. - * @return Colour to use for the render pass. - */ - int getIconColour(int renderPass); - - @SideOnly(Side.CLIENT) - IIconProvider getIconProvider(); - -} diff --git a/src/api/java/forestry/api/genetics/IAlleleSpeciesCustom.java b/src/api/java/forestry/api/genetics/IAlleleSpeciesCustom.java deleted file mode 100644 index ff138162..00000000 --- a/src/api/java/forestry/api/genetics/IAlleleSpeciesCustom.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import forestry.api.core.EnumHumidity; -import forestry.api.core.EnumTemperature; - -public interface IAlleleSpeciesCustom extends IAlleleSpecies { - - IAlleleSpeciesCustom setTemperature(EnumTemperature temperature); - IAlleleSpeciesCustom setHumidity(EnumHumidity humidity); - - IAlleleSpeciesCustom setHasEffect(); - - /** Secret species are not shown in creative mode. */ - IAlleleSpeciesCustom setIsSecret(); - - /** Uncounted species do not count toward total species discovered. */ - IAlleleSpeciesCustom setIsNotCounted(); -} diff --git a/src/api/java/forestry/api/genetics/IAlleleTolerance.java b/src/api/java/forestry/api/genetics/IAlleleTolerance.java deleted file mode 100644 index f5ba9e67..00000000 --- a/src/api/java/forestry/api/genetics/IAlleleTolerance.java +++ /dev/null @@ -1,15 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/** - * Simple interface to allow adding additional alleles containing float values. - */ -public interface IAlleleTolerance extends IAllele { - - EnumTolerance getValue(); - -} diff --git a/src/api/java/forestry/api/genetics/IBreedingTracker.java b/src/api/java/forestry/api/genetics/IBreedingTracker.java deleted file mode 100644 index e3614481..00000000 --- a/src/api/java/forestry/api/genetics/IBreedingTracker.java +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; - -import forestry.api.apiculture.IBeekeepingMode; - -/** - * Keeps track of who bred and/or discovered which species in a world. - * - * @author SirSengir - */ -public interface IBreedingTracker { - - /** - * @return Name of the current {@link IBeekeepingMode}. - */ - String getModeName(); - - /** - * Set the current {@link IBeekeepingMode}. - */ - void setModeName(String name); - - /** - * @return Amount of species discovered. - */ - int getSpeciesBred(); - - /** - * Register the birth of an individual. Will mark it as discovered. - * - * @param individual - */ - void registerBirth(IIndividual individual); - - /** - * Register the pickup of an individual. - * - * @param individual - */ - void registerPickup(IIndividual individual); - - /** - * Marks a species as discovered. Should only be called from registerIndividual normally. - * - * @param species - */ - void registerSpecies(IAlleleSpecies species); - - /** - * Register a successful mutation. Will mark it as discovered. - * - * @param mutation - */ - void registerMutation(IMutation mutation); - - /** - * Queries the tracker for discovered species. - * - * @param mutation - * Mutation to query for. - * @return true if the mutation has been discovered. - */ - boolean isDiscovered(IMutation mutation); - - /** - * Queries the tracker for discovered species. - * - * @param species - * Species to check. - * @return true if the species has been bred. - */ - boolean isDiscovered(IAlleleSpecies species); - - /** - * Synchronizes the tracker to the client side. Should be called before opening any gui needing that information. - * - * @param player - */ - void synchToPlayer(EntityPlayer player); - - /* LOADING & SAVING */ - void decodeFromNBT(NBTTagCompound nbttagcompound); - - void encodeToNBT(NBTTagCompound nbttagcompound); - -} diff --git a/src/api/java/forestry/api/genetics/IChromosome.java b/src/api/java/forestry/api/genetics/IChromosome.java deleted file mode 100644 index d501efba..00000000 --- a/src/api/java/forestry/api/genetics/IChromosome.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import forestry.api.core.INBTTagable; - -/** - * Implementations other than Forestry's default one are not supported! - * - * @author SirSengir - */ -public interface IChromosome extends INBTTagable { - - IAllele getPrimaryAllele(); - - IAllele getSecondaryAllele(); - - IAllele getInactiveAllele(); - - IAllele getActiveAllele(); - -} diff --git a/src/api/java/forestry/api/genetics/IChromosomeType.java b/src/api/java/forestry/api/genetics/IChromosomeType.java deleted file mode 100644 index a3b1f8e0..00000000 --- a/src/api/java/forestry/api/genetics/IChromosomeType.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/* - * Interface to be implemented by the enums representing the various chromosomes - */ -public interface IChromosomeType { - - /* - * Get class which all alleles on this chromosome must interface - */ - Class<? extends IAllele> getAlleleClass(); - - String getName(); - - ISpeciesRoot getSpeciesRoot(); - - int ordinal(); - -} diff --git a/src/api/java/forestry/api/genetics/IClassification.java b/src/api/java/forestry/api/genetics/IClassification.java deleted file mode 100644 index f365b915..00000000 --- a/src/api/java/forestry/api/genetics/IClassification.java +++ /dev/null @@ -1,107 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/** - * Biological classifications from domain down to genus. - * - * Used by the *alyzers to display hierarchies. - */ -public interface IClassification { - - public enum EnumClassLevel { - - DOMAIN(0x777fff, true), KINGDOM(0x77c3ff), PHYLUM(0x77ffb6, true), DIVISION(0x77ffb6, true), CLASS(0x7bff77), ORDER(0xbeff77), FAMILY(0xfffd77), - SUBFAMILY(0xfffd77), TRIBE(0xfffd77), GENUS(0xffba77); - - private int colour; - private boolean isDroppable; - - private EnumClassLevel(int colour) { - this(colour, false); - } - - private EnumClassLevel(int colour, boolean isDroppable) { - this.colour = colour; - this.isDroppable = isDroppable; - } - - /** - * @return Colour to use for displaying this classification. - */ - public int getColour() { - return colour; - } - - /** - * @return Indicates whether display of this classification level can be ommitted in case of space constraints. - */ - public boolean isDroppable() { - return isDroppable; - } - } - - /** - * @return Level inside the full hierarchy this particular classification is located at. - */ - EnumClassLevel getLevel(); - - /** - * @return Unique String identifier. - */ - String getUID(); - - /** - * @return Localized branch name for user display. - */ - String getName(); - - /** - * A branch approximates a "genus" in real life. Real life examples: "Micrapis", "Megapis" - * - * @return flavour text (may be null) - */ - String getScientific(); - - /** - * @return Localized description of this branch. (May be null.) - */ - String getDescription(); - - /** - * @return Member groups of this one. - */ - IClassification[] getMemberGroups(); - - /** - * Adds subgroups to this group. - */ - void addMemberGroup(IClassification group); - - /** - * @return Member species of this group. - */ - IAlleleSpecies[] getMemberSpecies(); - - /** - * Used by the allele registry to populate internal collection of branch members on the fly. - * - * @param species - */ - void addMemberSpecies(IAlleleSpecies species); - - /** - * @return Parent classification, null if this is root. - */ - IClassification getParent(); - - /** - * Only used internally by the AlleleRegistry if this classification has been added to another one. - * - * @param parent - */ - void setParent(IClassification parent); -} diff --git a/src/api/java/forestry/api/genetics/IClimateHelper.java b/src/api/java/forestry/api/genetics/IClimateHelper.java deleted file mode 100644 index 48146042..00000000 --- a/src/api/java/forestry/api/genetics/IClimateHelper.java +++ /dev/null @@ -1,53 +0,0 @@ -package forestry.api.genetics; - -import java.util.Collection; - -import forestry.api.core.EnumHumidity; -import forestry.api.core.EnumTemperature; - -public interface IClimateHelper { - /** - * Determines whether the given temperature and humidity are within the given constraints. - * @param temperature The temperature to test. - * @param humidity The humidity to test. - * @param baseTemp Base temperature for the test. - * @param tolTemp Temperature tolerance to apply. - * @param baseHumid Base humidity for the test. - * @param tolHumid Humidity tolerance to apply. - * @return true if both temperature and humidity fit the given constraints. - */ - boolean isWithinLimits(EnumTemperature temperature, EnumHumidity humidity, - EnumTemperature baseTemp, EnumTolerance tolTemp, - EnumHumidity baseHumid, EnumTolerance tolHumid); - - boolean isWithinLimits(EnumTemperature temperature, EnumTemperature baseTemp, EnumTolerance tolTemp); - boolean isWithinLimits(EnumHumidity humidity, EnumHumidity baseHumid, EnumTolerance tolHumid); - - /** - * Gets a collection of humidities which fit the given parameters. - * @param prefered Base humidity from which to measure. - * @param tolerance Tolerance to apply to the base humidity. - * @return A collection of humidities which fall within the given parameters. - */ - Collection<EnumHumidity> getToleratedHumidity(EnumHumidity prefered, EnumTolerance tolerance); - /** - * Gets a collection of temperatures which fit the given parameters. - * @param prefered Base temperature from which to measure. - * @param tolerance Tolerance to apply to the base temperatures. - * @return A collection of temperatures which fall within the given parameters. - */ - Collection<EnumTemperature> getToleratedTemperature(EnumTemperature prefered, EnumTolerance tolerance); - - /** - * Gets a localized, human readable string for the given temperature. - * @param temperature Temperature to generate the string for. - * @return A localized, human readable string for the given temperature. - */ - String toDisplay(EnumTemperature temperature); - /** - * Gets a localized, human readable string for the given humidity. - * @param humidity Humidity to generate the string for. - * @return A localized, human readable string for the given humidity. - */ - String toDisplay(EnumHumidity humidity); -} \ No newline at end of file diff --git a/src/api/java/forestry/api/genetics/IEffectData.java b/src/api/java/forestry/api/genetics/IEffectData.java deleted file mode 100644 index 909ab78d..00000000 --- a/src/api/java/forestry/api/genetics/IEffectData.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import forestry.api.core.INBTTagable; - -/** - * Container to hold some temporary data for bee, tree and butterfly effects. - * - * @author SirSengir - */ -public interface IEffectData extends INBTTagable { - void setInteger(int index, int val); - - void setFloat(int index, float val); - - void setBoolean(int index, boolean val); - - int getInteger(int index); - - float getFloat(int index); - - boolean getBoolean(int index); -} diff --git a/src/api/java/forestry/api/genetics/IFlower.java b/src/api/java/forestry/api/genetics/IFlower.java deleted file mode 100644 index 79ef8115..00000000 --- a/src/api/java/forestry/api/genetics/IFlower.java +++ /dev/null @@ -1,20 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import net.minecraft.block.Block; - -public interface IFlower extends Comparable<IFlower> { - - Block getBlock(); - int getMeta(); - - double getWeight(); - void setWeight(double weight); - - boolean isPlantable(); - -} diff --git a/src/api/java/forestry/api/genetics/IFlowerGrowthRule.java b/src/api/java/forestry/api/genetics/IFlowerGrowthRule.java deleted file mode 100644 index 55237399..00000000 --- a/src/api/java/forestry/api/genetics/IFlowerGrowthRule.java +++ /dev/null @@ -1,15 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import net.minecraft.world.World; - -/** - * Basic condition for flower growing - */ -public interface IFlowerGrowthRule { - boolean growFlower(IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y, int z); -} diff --git a/src/api/java/forestry/api/genetics/IFlowerProvider.java b/src/api/java/forestry/api/genetics/IFlowerProvider.java deleted file mode 100644 index 9849da03..00000000 --- a/src/api/java/forestry/api/genetics/IFlowerProvider.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public interface IFlowerProvider { - /** - * @return True if the block at the passed coordinates is a valid flower for the species. - */ - boolean isAcceptedFlower(World world, IIndividual individual, int x, int y, int z); - - boolean isAcceptedPollinatable(World world, IPollinatable pollinatable); - - /** - * @return True if a flower was planted. - */ - boolean growFlower(World world, IIndividual individual, int x, int y, int z); - - /** - * @return Short, human-readable identifier used in the beealyzer. - */ - String getDescription(); - - /** - * Allows the flower provider to affect the produce at the given location. - * - * @return Array of itemstacks being the (modified or unmodified) produce. - */ - ItemStack[] affectProducts(World world, IIndividual individual, int x, int y, int z, ItemStack[] products); - - /** - * @return List of valid flowers for the flower provider. The first in the array is for use as an icon. - * Returns an empty list if the flower provider does not have any valid flowers. - */ - List<IFlower> getFlowers(); -} diff --git a/src/api/java/forestry/api/genetics/IFlowerRegistry.java b/src/api/java/forestry/api/genetics/IFlowerRegistry.java deleted file mode 100644 index ce6cb42c..00000000 --- a/src/api/java/forestry/api/genetics/IFlowerRegistry.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import java.util.List; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.world.World; - -public interface IFlowerRegistry { - - List<IFlower> getAcceptableFlowers(String flowerType); - - boolean growFlower(String flowerType, World world, IIndividual individual, int x, int y, int z); - - boolean isAcceptedFlower(String flowerType, World world, IIndividual individual, int x, int y, int z); - - /** - * Registers a non-plantable flower, but bees accept them. - * - * @param flowerTypes See {@link forestry.api.apiculture.FlowerManager}.FlowerTypeXXX - */ - void registerAcceptableFlower(Block flowerBlock, String... flowerTypes); - void registerAcceptableFlower(Block flowerBlock, int flowerMeta, String... flowerTypes); - - void registerGrowthRule(IFlowerGrowthRule rule, String... flowerTypes); - - /** - * Registers a plantable flower. - * The distribution is based on its own weight and the total number of plants for this flowerType. - * - * @param weight Weight for the Flower (Vanilla = 1.0, Modded flowers < 1.0) - * @param flowerTypes See {@link forestry.api.apiculture.FlowerManager}.FlowerTypeXXX - */ - void registerPlantableFlower(Block flowerBlock, int flowerMeta, double weight, String... flowerTypes); - - IFlower getRandomPlantableFlower(String flowerType, Random rand); - -} diff --git a/src/api/java/forestry/api/genetics/IFruitBearer.java b/src/api/java/forestry/api/genetics/IFruitBearer.java deleted file mode 100644 index 5316f9eb..00000000 --- a/src/api/java/forestry/api/genetics/IFruitBearer.java +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import java.util.Collection; - -import net.minecraft.item.ItemStack; - -/** - * Can be implemented by tile entities which can bear fruit. - * - * @author SirSengir - */ -public interface IFruitBearer { - - /** - * @return true if the actual tile can bear fruits. - */ - boolean hasFruit(); - - /** - * @return Family of the potential fruits on this tile. - */ - IFruitFamily getFruitFamily(); - - /** - * Picks the fruits of this tile, resetting it to unripe fruits. - * - * @param tool - * Tool used in picking the fruits. May be null. - * @return Picked fruits. - */ - Collection<ItemStack> pickFruit(ItemStack tool); - - /** - * @return float indicating the ripeness of the fruit with >= 1.0f indicating full ripeness. - */ - float getRipeness(); - - /** - * Increases the ripeness of the fruit. - * - * @param add - * Float to add to the ripeness. Will truncate to valid values. - */ - void addRipeness(float add); -} diff --git a/src/api/java/forestry/api/genetics/IFruitFamily.java b/src/api/java/forestry/api/genetics/IFruitFamily.java deleted file mode 100644 index d48a4d8a..00000000 --- a/src/api/java/forestry/api/genetics/IFruitFamily.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -public interface IFruitFamily { - - /** - * @return Unique String identifier. - */ - String getUID(); - - /** - * @return Localized family name for user display. - */ - String getName(); - - /** - * A scientific-y name for this fruit family - * - * @return flavour text (may be null) - */ - String getScientific(); - - /** - * @return Localized description of this fruit family. (May be null.) - */ - String getDescription(); - -} diff --git a/src/api/java/forestry/api/genetics/IGenome.java b/src/api/java/forestry/api/genetics/IGenome.java deleted file mode 100644 index 0d3ad231..00000000 --- a/src/api/java/forestry/api/genetics/IGenome.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import forestry.api.core.INBTTagable; - -/** - * Holds the {@link IChromosome}s which comprise the traits of a given individual. - * - * Only the default implementation is supported. - */ -public interface IGenome extends INBTTagable { - - IAlleleSpecies getPrimary(); - - IAlleleSpecies getSecondary(); - - IChromosome[] getChromosomes(); - - IAllele getActiveAllele(IChromosomeType chromosomeType); - - IAllele getInactiveAllele(IChromosomeType chromosomeType); - - boolean isGeneticEqual(IGenome other); - - ISpeciesRoot getSpeciesRoot(); -} diff --git a/src/api/java/forestry/api/genetics/IHousing.java b/src/api/java/forestry/api/genetics/IHousing.java deleted file mode 100644 index 5a510311..00000000 --- a/src/api/java/forestry/api/genetics/IHousing.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; - -import com.mojang.authlib.GameProfile; - -import forestry.api.core.EnumHumidity; -import forestry.api.core.EnumTemperature; -import forestry.api.core.IErrorState; - -/** - * Any housing, hatchery or nest which is a fixed location in the world. - */ -public interface IHousing { - - /** - * @return String containing the login of this housing's owner. - */ - GameProfile getOwnerName(); - - World getWorld(); - - int getXCoord(); - - int getYCoord(); - - int getZCoord(); - - BiomeGenBase getBiome(); - - EnumTemperature getTemperature(); - - EnumHumidity getHumidity(); - - void setErrorState(IErrorState state); - - IErrorState getErrorState(); - - /** - * Adds products to the housing's inventory. - * - * @param product - * ItemStack with the product to add. - * @param all - * if true, success requires that all products are added - * @return Boolean indicating success or failure. - */ - boolean addProduct(ItemStack product, boolean all); - -} diff --git a/src/api/java/forestry/api/genetics/IIndividual.java b/src/api/java/forestry/api/genetics/IIndividual.java deleted file mode 100644 index f86aa582..00000000 --- a/src/api/java/forestry/api/genetics/IIndividual.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import java.util.List; - -import forestry.api.core.INBTTagable; - -/** - * An actual individual with genetic information. - * - * Only the default implementation is supported. - */ -public interface IIndividual extends INBTTagable { - - String getIdent(); - - String getDisplayName(); - - void addTooltip(List<String> list); - - /** - * Call to mark the IIndividual as analyzed. - * @return true if the IIndividual has not been analyzed previously. - */ - boolean analyze(); - - boolean isAnalyzed(); - - boolean hasEffect(); - - boolean isSecret(); - - IGenome getGenome(); - - /** - * Check whether the genetic makeup of two IIndividuals is identical. Ignores additional data like generations, irregular mating, etc.. - * @param other - * @return true if the given other IIndividual has the amount of chromosomes and their alleles are identical. - */ - boolean isGeneticEqual(IIndividual other); - - /** - * @return A deep copy of this individual. - */ - IIndividual copy(); - - boolean isPureBred(IChromosomeType chromosomeType); - -} diff --git a/src/api/java/forestry/api/genetics/IIndividualLiving.java b/src/api/java/forestry/api/genetics/IIndividualLiving.java deleted file mode 100644 index 67ce0a97..00000000 --- a/src/api/java/forestry/api/genetics/IIndividualLiving.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import net.minecraft.world.World; - -public interface IIndividualLiving extends IIndividual { - - /** - * @return Genetic information of the mate, null if unmated. - */ - IGenome getMate(); - - /** - * @return Current health of the individual. - */ - int getHealth(); - - /** - * @return Maximum health of the individual. - */ - int getMaxHealth(); - - /** - * Age the individual. - * @param world - * @param ageModifier - */ - void age(World world, float ageModifier); - - /** - * Mate with the given individual. - * @param individual the {@link IIndividual} to mate this one with. - */ - void mate(IIndividual individual); - - /** - * @return true if the individual is among the living. - */ - boolean isAlive(); - -} diff --git a/src/api/java/forestry/api/genetics/ILegacyHandler.java b/src/api/java/forestry/api/genetics/ILegacyHandler.java deleted file mode 100644 index 901afa7f..00000000 --- a/src/api/java/forestry/api/genetics/ILegacyHandler.java +++ /dev/null @@ -1,17 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -/** - * AlleleManager.alleleRegistry can be cast to this type. - * @deprecated Since Forestry 3.6. Use IAlleleRegistry. - */ -@Deprecated -public interface ILegacyHandler { - void registerLegacyMapping(int id, String uid); - - IAllele getFromLegacyMap(int id); -} diff --git a/src/api/java/forestry/api/genetics/IMutation.java b/src/api/java/forestry/api/genetics/IMutation.java deleted file mode 100644 index 8c15ca58..00000000 --- a/src/api/java/forestry/api/genetics/IMutation.java +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import java.util.Collection; - -/** - * Individuals can be seeded either as hive drops or as mutation results. - * - * {@link IAlleleRegistry} manages these. - * - * @author SirSengir - */ -public interface IMutation { - - /** - * @return {@link ISpeciesRoot} this mutation is associated with. - */ - ISpeciesRoot getRoot(); - - /** - * @return first of the alleles implementing IAlleleSpecies required for this mutation. - */ - IAllele getAllele0(); - - /** - * @return second of the alleles implementing IAlleleSpecies required for this mutation. - */ - IAllele getAllele1(); - - /** - * @return Array of {@link IAllele} representing the full default genome of the mutated side. - * - * Make sure to return a proper array for the species class. Returning an allele of the wrong type will cause cast errors on runtime. - */ - IAllele[] getTemplate(); - - /** - * @return Unmodified base chance for mutation to fire. - */ - float getBaseChance(); - - /** - * @return Collection of localized, human-readable strings describing special mutation conditions, if any. - */ - Collection<String> getSpecialConditions(); - - /** - * @param allele - * @return true if the passed allele is one of the alleles participating in this mutation. - */ - boolean isPartner(IAllele allele); - - /** - * @param allele - * @return the other allele which was not passed as argument. - */ - IAllele getPartner(IAllele allele); - - /** - * @return true if the mutation should not be displayed in the beealyzer. - */ - boolean isSecret(); - -} diff --git a/src/api/java/forestry/api/genetics/IMutationCondition.java b/src/api/java/forestry/api/genetics/IMutationCondition.java deleted file mode 100644 index ac8de0a2..00000000 --- a/src/api/java/forestry/api/genetics/IMutationCondition.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import net.minecraft.world.World; - -public interface IMutationCondition { - - /** - * Returns a float from 0 to 1 representing the chance for mutation to occur. - * Most will return 1 if the condition is met and 0 otherwise, - * but the float offers flexibility for more advanced conditions. - */ - float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1); - - /** - * A localized description of the mutation condition. (i.e. "A temperature of HOT is required.") - */ - String getDescription(); -} diff --git a/src/api/java/forestry/api/genetics/IMutationCustom.java b/src/api/java/forestry/api/genetics/IMutationCustom.java deleted file mode 100644 index f6d366cd..00000000 --- a/src/api/java/forestry/api/genetics/IMutationCustom.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import net.minecraft.block.Block; - -import net.minecraftforge.common.BiomeDictionary; - -import forestry.api.core.EnumHumidity; -import forestry.api.core.EnumTemperature; - -/** Set custom mutation requirements */ -public interface IMutationCustom extends IMutation { - - /** Prevent this mutation from being shown in the analyzers */ - IMutationCustom setIsSecret(); - - /** Require a specific temperature for this mutation to occur */ - IMutationCustom restrictTemperature(EnumTemperature temperature); - IMutationCustom restrictTemperature(EnumTemperature minTemperature, EnumTemperature maxTemperature); - - /** Require a specific humidity for this mutation to occur */ - IMutationCustom restrictHumidity(EnumHumidity humidity); - IMutationCustom restrictHumidity(EnumHumidity minHumidity, EnumHumidity maxHumidity); - - /** - * Restrict this mutation to certain types of biomes. - * @param types The types of biomes this mutation can occur. - */ - IMutationCustom restrictBiomeType(BiomeDictionary.Type... types); - - /** Restrict the days of the year that this mutation can occur */ - IMutationCustom restrictDateRange(int startMonth, int startDay, int endMonth, int endDay); - - /** Restrict the time of day that this mutation can occur */ - IMutationCustom requireDay(); - IMutationCustom requireNight(); - - /** Require a specific resource to be under the location of the mutation */ - IMutationCustom requireResource(Block block, int meta); - - /** Require some other custom mutation condition */ - IMutationCustom addMutationCondition(IMutationCondition mutationCondition); -} diff --git a/src/api/java/forestry/api/genetics/IPollinatable.java b/src/api/java/forestry/api/genetics/IPollinatable.java deleted file mode 100644 index 5b0694d7..00000000 --- a/src/api/java/forestry/api/genetics/IPollinatable.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import java.util.EnumSet; - -import net.minecraftforge.common.EnumPlantType; - -/** - * Can be implemented by tile entities, if they wish to be pollinatable. - * - * @author SirSengir - */ -public interface IPollinatable { - - /** - * @return plant types this pollinatable is classified as. (Can be used by bees to determine whether to interact or not. - */ - EnumSet<EnumPlantType> getPlantType(); - - /** - * @return IIndividual containing the genetic information of this IPollinatable - */ - IIndividual getPollen(); - - /** - * Checks whether this {@link IPollinatable} can mate with the given pollen. - * - * Must be the one to check genetic equivalency. - * - * @param pollen - * IIndividual representing the pollen. - * @return true if mating is possible, false otherwise. - */ - boolean canMateWith(IIndividual pollen); - - /** - * Pollinates this entity. - * - * @param pollen - * IIndividual representing the pollen. - */ - void mateWith(IIndividual pollen); - -} diff --git a/src/api/java/forestry/api/genetics/ISpeciesRoot.java b/src/api/java/forestry/api/genetics/ISpeciesRoot.java deleted file mode 100644 index 7424405d..00000000 --- a/src/api/java/forestry/api/genetics/ISpeciesRoot.java +++ /dev/null @@ -1,163 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.genetics; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Map; -import java.util.Random; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import com.mojang.authlib.GameProfile; - -/** - * Describes a class of species (i.e. bees, trees, butterflies), provides helper functions and access to common functionality. - */ -public interface ISpeciesRoot { - - /** - * @return A unique identifier for the species class. Should consist of "root" + a common name for the species class in camel-case, i.e. "rootBees", "rootTrees", "rootButterflies". - */ - String getUID(); - - /** - * @return Class of the sub-interface inheriting from {@link IIndividual}. - */ - Class<? extends IIndividual> getMemberClass(); - - /** - * @return Integer denoting the number of (counted) species of this type in the world. - */ - int getSpeciesCount(); - - /** - * Used to check whether a given itemstack contains genetic data corresponding to an {@link IIndividual} of this class. - * @param stack itemstack to check. - * @return true if the itemstack contains an {@link IIndividual} of this class, false otherwise. - */ - boolean isMember(ItemStack stack); - - /** - * Used to check whether a given itemstack contains genetic data corresponding to an {@link IIndividual} of this class and matches the given type. - * @param stack itemstack to check. - * @param type Integer denoting the type needed to match. (i.e. butterfly vs. butterfly serum; bee queens, princesses, drones; etc.) - * @return true if the itemstack contains an {@link IIndividual} of this class, false otherwise. - */ - boolean isMember(ItemStack stack, int type); - - /** - * Used to check whether the given {@link IIndividual} is member of this class. - * @param individual {@link IIndividual} to check. - * @return true if the individual is member of this class, false otherwise. - */ - boolean isMember(IIndividual individual); - - IIndividual getMember(ItemStack stack); - - IIndividual getMember(NBTTagCompound compound); - - ItemStack getMemberStack(IIndividual individual, int type); - - /* BREEDING TRACKER */ - IBreedingTracker getBreedingTracker(World world, GameProfile player); - - /* GENOME MANIPULATION */ - IIndividual templateAsIndividual(IAllele[] template); - - IIndividual templateAsIndividual(IAllele[] templateActive, IAllele[] templateInactive); - - IChromosome[] templateAsChromosomes(IAllele[] template); - - IChromosome[] templateAsChromosomes(IAllele[] templateActive, IAllele[] templateInactive); - - IGenome templateAsGenome(IAllele[] template); - - IGenome templateAsGenome(IAllele[] templateActive, IAllele[] templateInactive); - - /* TEMPLATES */ - /** - * Registers a bee template using the UID of the first allele as identifier. - * - * @param template - */ - void registerTemplate(IAllele[] template); - - /** - * Registers a bee template using the passed identifier. - * - * @param template - */ - void registerTemplate(String identifier, IAllele[] template); - - /** - * Retrieves a registered template using the passed identifier. - * - * @param identifier - * @return Array of {@link IAllele} representing a genome. - */ - IAllele[] getTemplate(String identifier); - - /** - * @return Default individual template for use when stuff breaks. - */ - IAllele[] getDefaultTemplate(); - - /** - * @param rand Random to use. - * @return A random template from the pool of registered species templates. - */ - IAllele[] getRandomTemplate(Random rand); - - Map<String, IAllele[]> getGenomeTemplates(); - ArrayList<? extends IIndividual> getIndividualTemplates(); - - /* MUTATIONS */ - /** - * Use to register mutations. - * - * @param mutation - */ - void registerMutation(IMutation mutation); - - /** - * @return All registered mutations. - */ - Collection<? extends IMutation> getMutations(boolean shuffle); - - /** - * @param other Allele to match mutations against. - * @return All registered mutations the given allele is part of. - */ - Collection<? extends IMutation> getCombinations(IAllele other); - - Collection<? extends IMutation> getPaths(IAllele result, IChromosomeType chromosomeType); - - /* RESEARCH */ - /** - * @return List of generic catalysts which should be accepted for research by species of this class. - */ - Map<ItemStack, Float> getResearchCatalysts(); - - /** - * Sets an item stack as a valid (generic) research catalyst for this class. - * @param itemstack ItemStack to set as suitable. - * @param suitability Float between 0 and 1 to indicate suitability. - */ - void setResearchSuitability(ItemStack itemstack, float suitability); - - /** - * @return Array of {@link IChromosomeType} which are in this species genome - */ - IChromosomeType[] getKaryotype(); - - /** - * @return {@link IChromosomeType} which is the "key" for this species class, usually the species chromosome. - */ - IChromosomeType getKaryotypeKey(); -} diff --git a/src/api/java/forestry/api/genetics/package-info.java b/src/api/java/forestry/api/genetics/package-info.java deleted file mode 100644 index fdd093bb..00000000 --- a/src/api/java/forestry/api/genetics/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="3.2.0", owner="ForestryAPI|core", provides="ForestryAPI|genetics") -package forestry.api.genetics; -import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/lepidopterology/EnumButterflyChromosome.java b/src/api/java/forestry/api/lepidopterology/EnumButterflyChromosome.java deleted file mode 100644 index 9f89f7f8..00000000 --- a/src/api/java/forestry/api/lepidopterology/EnumButterflyChromosome.java +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -import forestry.api.genetics.AlleleManager; -import forestry.api.genetics.IAllele; -import forestry.api.genetics.IAlleleArea; -import forestry.api.genetics.IAlleleBoolean; -import forestry.api.genetics.IAlleleFloat; -import forestry.api.genetics.IAlleleFlowers; -import forestry.api.genetics.IAlleleInteger; -import forestry.api.genetics.IAlleleTolerance; -import forestry.api.genetics.IChromosomeType; -import forestry.api.genetics.ISpeciesRoot; - -public enum EnumButterflyChromosome implements IChromosomeType { - /** - * Species of the bee. Alleles here must implement {@link IAlleleButterflySpecies}. - */ - SPECIES(IAlleleButterflySpecies.class), - /** - * Physical size. - */ - SIZE(IAlleleFloat.class), - /** - * Flight speed. - */ - SPEED(IAlleleFloat.class), - /** - * How long the butterfly can last without access to matching pollinatables. - */ - LIFESPAN(IAlleleInteger.class), - /** - * Species with a higher metabolism have a higher appetite and may cause more damage to their environment. - */ - METABOLISM(IAlleleInteger.class), - /** - * Determines likelyhood of caterpillars and length of caterpillar/pupation phase. Also: Number of max caterpillars after mating? - */ - FERTILITY(IAlleleInteger.class), - /** - * Not sure yet. - */ - TEMPERATURE_TOLERANCE(IAlleleTolerance.class), - /** - * Not sure yet. - */ - HUMIDITY_TOLERANCE(IAlleleTolerance.class), - /** - * Only nocturnal butterflys/moths will fly at night. Allows daylight activity for naturally nocturnal species. - */ - NOCTURNAL(IAlleleBoolean.class), - /** - * Only tolerant flyers will fly in the rain. - */ - TOLERANT_FLYER(IAlleleBoolean.class), - /** - * Fire resistance. - */ - FIRE_RESIST(IAlleleBoolean.class), - /** - * Required flowers/leaves. - */ - FLOWER_PROVIDER(IAlleleFlowers.class), - /** - * Extra effect to surroundings. (?) - */ - EFFECT(IAlleleButterflyEffect.class), - /** - * Not used yet - */ - TERRITORY(IAlleleArea.class), - ; - - Class<? extends IAllele> clss; - - EnumButterflyChromosome(Class<? extends IAllele> clss) { - this.clss = clss; - } - - @Override - public Class<? extends IAllele> getAlleleClass() { - return clss; - } - - @Override - public String getName() { - return this.toString().toLowerCase(); - } - - @Override - public ISpeciesRoot getSpeciesRoot() { - return AlleleManager.alleleRegistry.getSpeciesRoot("rootButterflies"); - } -} diff --git a/src/api/java/forestry/api/lepidopterology/EnumFlutterType.java b/src/api/java/forestry/api/lepidopterology/EnumFlutterType.java deleted file mode 100644 index f197d7b7..00000000 --- a/src/api/java/forestry/api/lepidopterology/EnumFlutterType.java +++ /dev/null @@ -1,15 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -public enum EnumFlutterType { - BUTTERFLY, - SERUM, - CATERPILLAR, - NONE; - - public static final EnumFlutterType[] VALUES = values(); -} diff --git a/src/api/java/forestry/api/lepidopterology/IAlleleButterflyEffect.java b/src/api/java/forestry/api/lepidopterology/IAlleleButterflyEffect.java deleted file mode 100644 index 6457dbe8..00000000 --- a/src/api/java/forestry/api/lepidopterology/IAlleleButterflyEffect.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -import forestry.api.genetics.IAlleleEffect; -import forestry.api.genetics.IEffectData; - -public interface IAlleleButterflyEffect extends IAlleleEffect { - - /** - * Used by butterflies to trigger effects in the world. - * @param butterfly {@link IEntityButterfly} - * @param storedData - * @return {@link forestry.api.genetics.IEffectData} for the next cycle. - */ - IEffectData doEffect(IEntityButterfly butterfly, IEffectData storedData); - -} diff --git a/src/api/java/forestry/api/lepidopterology/IAlleleButterflySpecies.java b/src/api/java/forestry/api/lepidopterology/IAlleleButterflySpecies.java deleted file mode 100644 index c1536118..00000000 --- a/src/api/java/forestry/api/lepidopterology/IAlleleButterflySpecies.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -import java.util.EnumSet; -import java.util.Map; - -import net.minecraft.item.ItemStack; - -import net.minecraftforge.common.BiomeDictionary; - -import forestry.api.genetics.IAlleleSpecies; - -public interface IAlleleButterflySpecies extends IAlleleSpecies { - - /** - * @return the IBeeRoot - */ - IButterflyRoot getRoot(); - - /** - * @return Path of the texture to use for entity rendering. - */ - String getEntityTexture(); - - /** - * Allows butterflies to restrict random spawns beyond the restrictions set by getTemperature() and getHumidity(). - * - * @return EnumSet of biome tags this butterfly species can be spawned in. - */ - EnumSet<BiomeDictionary.Type> getSpawnBiomes(); - - /** - * @return true if a prospective spawn biome must not match a biome tag outside of getSpawnBiomes. - */ - boolean strictSpawnMatch(); - - /** - * @return Float between 0 and 1 representing the rarity of the species, will affect spawn rate. - */ - float getRarity(); - - /** - * @return Float representing the distance below which this butterfly will take flight if it detects a player which is not sneaking. - */ - float getFlightDistance(); - - /** - * @return true if this species is only active at night. - */ - boolean isNocturnal(); - - Map<ItemStack, Float> getButterflyLoot(); - - Map<ItemStack, Float> getCaterpillarLoot(); -} diff --git a/src/api/java/forestry/api/lepidopterology/IButterfly.java b/src/api/java/forestry/api/lepidopterology/IButterfly.java deleted file mode 100644 index c3013247..00000000 --- a/src/api/java/forestry/api/lepidopterology/IButterfly.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import forestry.api.genetics.IIndividualLiving; - -public interface IButterfly extends IIndividualLiving { - - IButterflyGenome getGenome(); - - /** - * @return Genetic information of the mate, null if unmated. - */ - IButterflyGenome getMate(); - - /** - * @return Physical size of the butterfly. - */ - float getSize(); - - /** - * @param world - * @param x - * @param y - * @param z - * @return true if the butterfly can naturally spawn at the given location at this time. (Used to auto-spawn butterflies from tree leaves.) - */ - boolean canSpawn(World world, double x, double y, double z); - - /** - * @param world - * @param x - * @param y - * @param z - * @return true if the butterfly can take flight at the given location at this time. (Used to auto-spawn butterflies from dropped items.) - */ - boolean canTakeFlight(World world, double x, double y, double z); - - /** - * @param world - * @param x - * @param y - * @param z - * @return true if the environment (temperature, humidity) is valid for the butterfly at the given location. - */ - boolean isAcceptedEnvironment(World world, double x, double y, double z); - - IButterfly spawnCaterpillar(IButterflyNursery nursery); - - /** - * @param entity - * @param playerKill Whether or not the butterfly was killed by a player. - * @param lootLevel Loot level according to the weapon used to kill the butterfly. - * @return Array of itemstacks to drop on death of the given entity. - */ - ItemStack[] getLootDrop(IEntityButterfly entity, boolean playerKill, int lootLevel); - - /** - * @param nursery - * @param playerKill Whether or not the nursery was broken by a player. - * @param lootLevel Fortune level. - * @return Array of itemstacks to drop on breaking of the nursery. - */ - ItemStack[] getCaterpillarDrop(IButterflyNursery nursery, boolean playerKill, int lootLevel); - - /** - * Create an exact copy of this butterfly. - */ - IButterfly copy(); - -} diff --git a/src/api/java/forestry/api/lepidopterology/IButterflyGenome.java b/src/api/java/forestry/api/lepidopterology/IButterflyGenome.java deleted file mode 100644 index 93816600..00000000 --- a/src/api/java/forestry/api/lepidopterology/IButterflyGenome.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -import forestry.api.genetics.EnumTolerance; -import forestry.api.genetics.IFlowerProvider; -import forestry.api.genetics.IGenome; - -public interface IButterflyGenome extends IGenome { - - IAlleleButterflySpecies getPrimary(); - - IAlleleButterflySpecies getSecondary(); - - float getSize(); - - int getLifespan(); - - int getMetabolism(); - - int getFertility(); - - float getSpeed(); - - EnumTolerance getToleranceTemp(); - - EnumTolerance getToleranceHumid(); - - boolean getNocturnal(); - - boolean getTolerantFlyer(); - - boolean getFireResist(); - - IFlowerProvider getFlowerProvider(); - - IAlleleButterflyEffect getEffect(); - -} diff --git a/src/api/java/forestry/api/lepidopterology/IButterflyMutation.java b/src/api/java/forestry/api/lepidopterology/IButterflyMutation.java deleted file mode 100644 index 027e96eb..00000000 --- a/src/api/java/forestry/api/lepidopterology/IButterflyMutation.java +++ /dev/null @@ -1,14 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -import forestry.api.genetics.IAllele; -import forestry.api.genetics.IGenome; -import forestry.api.genetics.IMutation; - -public interface IButterflyMutation extends IMutation { - float getChance(IButterflyNursery housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1); -} diff --git a/src/api/java/forestry/api/lepidopterology/IButterflyNursery.java b/src/api/java/forestry/api/lepidopterology/IButterflyNursery.java deleted file mode 100644 index 56e42f2e..00000000 --- a/src/api/java/forestry/api/lepidopterology/IButterflyNursery.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -import forestry.api.genetics.IHousing; -import forestry.api.genetics.IIndividual; - -public interface IButterflyNursery extends IHousing { - - IButterfly getCaterpillar(); - - IIndividual getNanny(); - - void setCaterpillar(IButterfly butterfly); - - boolean canNurse(IButterfly butterfly); - -} diff --git a/src/api/java/forestry/api/lepidopterology/IButterflyRoot.java b/src/api/java/forestry/api/lepidopterology/IButterflyRoot.java deleted file mode 100644 index 7028df15..00000000 --- a/src/api/java/forestry/api/lepidopterology/IButterflyRoot.java +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -import java.util.ArrayList; -import java.util.Collection; - -import net.minecraft.entity.EntityLiving; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import com.mojang.authlib.GameProfile; - -import forestry.api.genetics.IAllele; -import forestry.api.genetics.IIndividual; -import forestry.api.genetics.ISpeciesRoot; - -public interface IButterflyRoot extends ISpeciesRoot { - - @Override - boolean isMember(ItemStack stack); - - @Override - IButterfly getMember(ItemStack stack); - - @Override - IButterfly getMember(NBTTagCompound compound); - - @Override - ItemStack getMemberStack(IIndividual butterfly, int type); - - /* GENOME CONVERSION */ - @Override - IButterfly templateAsIndividual(IAllele[] template); - - @Override - IButterfly templateAsIndividual(IAllele[] templateActive, IAllele[] templateInactive); - - @Override - IButterflyGenome templateAsGenome(IAllele[] template); - - @Override - IButterflyGenome templateAsGenome(IAllele[] templateActive, IAllele[] templateInactive); - - /* BUTTERFLY SPECIFIC */ - ILepidopteristTracker getBreedingTracker(World world, GameProfile player); - - /** - * Spawns the given butterfly in the world. - * @param butterfly - * @return butterfly entity on success, null otherwise. - */ - EntityLiving spawnButterflyInWorld(World world, IButterfly butterfly, double x, double y, double z); - - /** - * @return true if passed item is mated. - */ - boolean isMated(ItemStack stack); - - /* TEMPLATES */ - @Override - ArrayList<IButterfly> getIndividualTemplates(); - - /* MUTATIONS */ - @Override - Collection<IButterflyMutation> getMutations(boolean shuffle); - - EnumFlutterType getType(ItemStack stack); - -} diff --git a/src/api/java/forestry/api/lepidopterology/IEntityButterfly.java b/src/api/java/forestry/api/lepidopterology/IEntityButterfly.java deleted file mode 100644 index 963c7210..00000000 --- a/src/api/java/forestry/api/lepidopterology/IEntityButterfly.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -import net.minecraft.entity.EntityCreature; -import net.minecraft.entity.passive.IAnimals; - -import forestry.api.genetics.IIndividual; - -public interface IEntityButterfly extends IAnimals { - - void changeExhaustion(int change); - - int getExhaustion(); - - IButterfly getButterfly(); - - /** - * @return The entity as an EntityCreature to save casting. - */ - EntityCreature getEntity(); - - IIndividual getPollen(); - - void setPollen(IIndividual pollen); -} diff --git a/src/api/java/forestry/api/lepidopterology/ILepidopteristTracker.java b/src/api/java/forestry/api/lepidopterology/ILepidopteristTracker.java deleted file mode 100644 index 79926975..00000000 --- a/src/api/java/forestry/api/lepidopterology/ILepidopteristTracker.java +++ /dev/null @@ -1,14 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.lepidopterology; - -import forestry.api.genetics.IBreedingTracker; - -public interface ILepidopteristTracker extends IBreedingTracker { - - void registerCatch(IButterfly butterfly); - -} diff --git a/src/api/java/forestry/api/lepidopterology/package-info.java b/src/api/java/forestry/api/lepidopterology/package-info.java deleted file mode 100644 index 070b4322..00000000 --- a/src/api/java/forestry/api/lepidopterology/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="1.1", owner="ForestryAPI|core", provides="ForestryAPI|lepidopterology") -package forestry.api.lepidopterology; -import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/mail/EnumAddressee.java b/src/api/java/forestry/api/mail/EnumAddressee.java deleted file mode 100644 index 28c73847..00000000 --- a/src/api/java/forestry/api/mail/EnumAddressee.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -import java.util.Locale; - -public enum EnumAddressee { - PLAYER, TRADER; - - public static EnumAddressee fromString(String ident) { - ident = ident.toLowerCase(Locale.ENGLISH); - for(EnumAddressee addr : values()) { - if(addr.toString().equals(ident)) - return addr; - } - - return null; - } - - public String toString() { - return super.toString().toLowerCase(Locale.ENGLISH); - } -} diff --git a/src/api/java/forestry/api/mail/EnumPostage.java b/src/api/java/forestry/api/mail/EnumPostage.java deleted file mode 100644 index 772114fb..00000000 --- a/src/api/java/forestry/api/mail/EnumPostage.java +++ /dev/null @@ -1,20 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -public enum EnumPostage { - P_0(0), P_1(1), P_2(2), P_5(5), P_10(10), P_20(20), P_50(50), P_100(100), P_200(200); - - private final int value; - - private EnumPostage(int value) { - this.value = value; - } - - public int getValue() { - return this.value; - } -} diff --git a/src/api/java/forestry/api/mail/ILetter.java b/src/api/java/forestry/api/mail/ILetter.java deleted file mode 100644 index 42df8acb..00000000 --- a/src/api/java/forestry/api/mail/ILetter.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -import java.util.List; - -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; - -import forestry.api.core.INBTTagable; - -public interface ILetter extends IInventory, INBTTagable { - - ItemStack[] getPostage(); - - void setProcessed(boolean flag); - - boolean isProcessed(); - - boolean isMailable(); - - void setSender(IMailAddress address); - - IMailAddress getSender(); - - boolean hasRecipient(); - - void setRecipient(IMailAddress address); - - IMailAddress[] getRecipients(); - - String getRecipientString(); - - void setText(String text); - - String getText(); - - void addTooltip(List<String> list); - - boolean isPostPaid(); - - int requiredPostage(); - - void invalidatePostage(); - - ItemStack[] getAttachments(); - - void addAttachment(ItemStack itemstack); - - void addAttachments(ItemStack[] itemstacks); - - int countAttachments(); - - void addStamps(ItemStack stamps); - -} diff --git a/src/api/java/forestry/api/mail/ILetterHandler.java b/src/api/java/forestry/api/mail/ILetterHandler.java deleted file mode 100644 index 576a0d7d..00000000 --- a/src/api/java/forestry/api/mail/ILetterHandler.java +++ /dev/null @@ -1,13 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public interface ILetterHandler { - IPostalState handleLetter(World world, IMailAddress recipient, ItemStack letterStack, boolean doLodge); -} diff --git a/src/api/java/forestry/api/mail/IMailAddress.java b/src/api/java/forestry/api/mail/IMailAddress.java deleted file mode 100644 index 8441b09a..00000000 --- a/src/api/java/forestry/api/mail/IMailAddress.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -import com.mojang.authlib.GameProfile; - -import forestry.api.core.INBTTagable; - -public interface IMailAddress extends INBTTagable { - - EnumAddressee getType(); - String getName(); - - boolean isValid(); - - boolean isPlayer(); - boolean isTrader(); - - GameProfile getPlayerProfile(); -} diff --git a/src/api/java/forestry/api/mail/IPostOffice.java b/src/api/java/forestry/api/mail/IPostOffice.java deleted file mode 100644 index a8a14eac..00000000 --- a/src/api/java/forestry/api/mail/IPostOffice.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -import java.util.Map; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public interface IPostOffice { - - void collectPostage(ItemStack[] stamps); - - IPostalState lodgeLetter(World world, ItemStack itemstack, boolean doLodge); - - ItemStack getAnyStamp(int max); - - ItemStack getAnyStamp(EnumPostage postage, int max); - - ItemStack getAnyStamp(EnumPostage[] postages, int max); - - void registerTradeStation(ITradeStation trade); - - void deregisterTradeStation(ITradeStation trade); - - Map<IMailAddress, ITradeStation> getActiveTradeStations(World world); -} diff --git a/src/api/java/forestry/api/mail/IPostRegistry.java b/src/api/java/forestry/api/mail/IPostRegistry.java deleted file mode 100644 index f20352d9..00000000 --- a/src/api/java/forestry/api/mail/IPostRegistry.java +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -import java.util.Map; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import com.mojang.authlib.GameProfile; - -public interface IPostRegistry { - - /* POST OFFICE */ - IPostOffice getPostOffice(World world); - - /* MAIL ADDRESSES */ - IMailAddress getMailAddress(GameProfile gameProfile); - IMailAddress getMailAddress(String traderName); - - /* LETTERS */ - boolean isLetter(ItemStack itemstack); - - ILetter createLetter(IMailAddress sender, IMailAddress recipient); - - ILetter getLetter(ItemStack itemstack); - - ItemStack createLetterStack(ILetter letter); - - /* CARRIERS */ - /** - * Registers a new {@link IPostalCarrier}. See {@link IPostalCarrier} for details. - * @param carrier {@link IPostalCarrier} to register. - */ - void registerCarrier(IPostalCarrier carrier); - - IPostalCarrier getCarrier(EnumAddressee uid); - - Map<EnumAddressee, IPostalCarrier> getRegisteredCarriers(); - - /* TRADE STATIONS */ - void deleteTradeStation(World world, IMailAddress address); - - ITradeStation getOrCreateTradeStation(World world, GameProfile owner, IMailAddress address); - - ITradeStation getTradeStation(World world, IMailAddress address); - - boolean isAvailableTradeAddress(World world, IMailAddress address); - - boolean isValidTradeAddress(World world, IMailAddress address); - - /* PO BOXES */ - boolean isValidPOBox(World world, IMailAddress address); - -} diff --git a/src/api/java/forestry/api/mail/IPostalCarrier.java b/src/api/java/forestry/api/mail/IPostalCarrier.java deleted file mode 100644 index 28db78ae..00000000 --- a/src/api/java/forestry/api/mail/IPostalCarrier.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/** - * Postal Carriers are systems which can be hooked into Forestry's mail system to handle mail delivery. - * - * The two available carriers in vanilla Forestry are - * "player" - Delivers mail to individual players. - * "trader" - Handles mail addressed to trade stations. - */ -public interface IPostalCarrier { - - /** - * @return An EnumAddressee identifying the type of carrier - */ - EnumAddressee getType(); - - /** - * @return A human-readable name for this carrier. - */ - String getName(); - - @SideOnly(Side.CLIENT) - IIcon getIcon(); - - /** - * Handle delivery of a letter addressed to this carrier. - * @param world The world the {@link IPostOffice} handles. - * @param office {link @IPostOffice} which received this letter and handed it to the carrier. - * @param recipient An identifier for the recipient as typed by the player into the address field. - * @param letterstack ItemStack representing the letter. See {@link IPostRegistry} for helper functions to validate and extract it. - * @param doDeliver Whether or not the letter is supposed to actually be delivered or if delivery is only to be simulated. - * @return {link IPostalState} holding information on success or failure for delivery. - */ - IPostalState deliverLetter(World world, IPostOffice office, IMailAddress recipient, ItemStack letterstack, boolean doDeliver); - -} diff --git a/src/api/java/forestry/api/mail/IPostalState.java b/src/api/java/forestry/api/mail/IPostalState.java deleted file mode 100644 index bc843621..00000000 --- a/src/api/java/forestry/api/mail/IPostalState.java +++ /dev/null @@ -1,14 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -public interface IPostalState { - boolean isOk(); - - String getIdentifier(); - - int ordinal(); -} diff --git a/src/api/java/forestry/api/mail/IStamps.java b/src/api/java/forestry/api/mail/IStamps.java deleted file mode 100644 index 4332a811..00000000 --- a/src/api/java/forestry/api/mail/IStamps.java +++ /dev/null @@ -1,14 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -import net.minecraft.item.ItemStack; - -public interface IStamps { - - EnumPostage getPostage(ItemStack itemstack); - -} diff --git a/src/api/java/forestry/api/mail/ITradeStation.java b/src/api/java/forestry/api/mail/ITradeStation.java deleted file mode 100644 index 78a498a0..00000000 --- a/src/api/java/forestry/api/mail/ITradeStation.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -import net.minecraft.inventory.IInventory; - -public interface ITradeStation extends ILetterHandler, IInventory { - - IMailAddress getAddress(); - - boolean isValid(); - - void invalidate(); - - void setVirtual(boolean isVirtual); - - boolean isVirtual(); - - TradeStationInfo getTradeInfo(); - -} diff --git a/src/api/java/forestry/api/mail/PostManager.java b/src/api/java/forestry/api/mail/PostManager.java deleted file mode 100644 index c3f0e45b..00000000 --- a/src/api/java/forestry/api/mail/PostManager.java +++ /dev/null @@ -1,11 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - - -public class PostManager { - public static IPostRegistry postRegistry; -} diff --git a/src/api/java/forestry/api/mail/TradeStationInfo.java b/src/api/java/forestry/api/mail/TradeStationInfo.java deleted file mode 100644 index 14424bed..00000000 --- a/src/api/java/forestry/api/mail/TradeStationInfo.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.mail; - -import java.lang.IllegalArgumentException; -import net.minecraft.item.ItemStack; -import com.mojang.authlib.GameProfile; - -public class TradeStationInfo { - public final IMailAddress address; - public final GameProfile owner; - public final ItemStack tradegood; - public final ItemStack[] required; - public final IPostalState state; - - public TradeStationInfo(IMailAddress address, GameProfile owner, ItemStack tradegood, ItemStack[] required, IPostalState state) { - if (!address.isTrader()) { - throw new IllegalArgumentException("TradeStation address must be a trader"); - } - this.address = address; - this.owner = owner; - this.tradegood = tradegood; - this.required = required; - this.state = state; - } -} diff --git a/src/api/java/forestry/api/mail/package-info.java b/src/api/java/forestry/api/mail/package-info.java deleted file mode 100644 index a1050727..00000000 --- a/src/api/java/forestry/api/mail/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="3.0.0", owner="ForestryAPI|core", provides="ForestryAPI|mail") -package forestry.api.mail; -import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/recipes/ICarpenterManager.java b/src/api/java/forestry/api/recipes/ICarpenterManager.java deleted file mode 100644 index 8e3eabbe..00000000 --- a/src/api/java/forestry/api/recipes/ICarpenterManager.java +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.ShapedRecipes; - -import net.minecraftforge.fluids.FluidStack; - -/** - * Provides an interface to the recipe manager of the carpenter. - * - * The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even - * if your mod loads before Forestry. - * - * Accessible via {@link RecipeManagers} - * - * Only shaped recipes can be added currently. - * - * @author SirSengir - */ -public interface ICarpenterManager extends ICraftingProvider { - /** - * Add a shaped recipe to the carpenter. - * - * @param box - * ItemStack of one item representing the required box (carton, crate) for this recipe. May be null. - * @param product - * Crafting result. - * @param materials - * Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}. Notation is the same. - */ - public void addRecipe(ItemStack box, ItemStack product, Object... materials); - - /** - * Add a shaped recipe to the carpenter. - * - * @param packagingTime - * Number of work cycles required to craft the recipe once. - * @param box - * ItemStack of one item representing the required box (carton, crate) for this recipe. May be null. - * @param product - * Crafting result. - * @param materials - * Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}. Notation is the same. - */ - public void addRecipe(int packagingTime, ItemStack box, ItemStack product, Object... materials); - - /** - * Add a shaped recipe to the carpenter. - * - * @param packagingTime - * Number of work cycles required to craft the recipe once. - * @param liquid - * Liquid required in carpenter's tank. - * @param box - * ItemStack of one item representing the required box (carton, crate) for this recipe. May be null. - * @param product - * Crafting result. - * @param materials - * Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}. Notation is the same. - */ - public void addRecipe(int packagingTime, FluidStack liquid, ItemStack box, ItemStack product, Object... materials); -} diff --git a/src/api/java/forestry/api/recipes/ICentrifugeManager.java b/src/api/java/forestry/api/recipes/ICentrifugeManager.java deleted file mode 100644 index 910bd32c..00000000 --- a/src/api/java/forestry/api/recipes/ICentrifugeManager.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import java.util.HashMap; - -import net.minecraft.item.ItemStack; - -/** - * Provides an interface to the recipe manager of the centrifuge. - * - * The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even - * if your mod loads before Forestry. - * - * Accessible via {@link RecipeManagers} - * - * @author SirSengir - */ -public interface ICentrifugeManager extends ICraftingProvider { - - /** - * Add a recipe to the centrifuge - * - * @param timePerItem - * Time to centrifugate one item of the given type - * @param resource - * ItemStack containing information on item id and damage. Stack size will be ignored. - * @param products - * HashMap<ItemStack, Integer> specifying the possible products and the chances of them resulting from centrifugation. - */ - public void addRecipe(int timePerItem, ItemStack resource, HashMap<ItemStack, Integer> products); - - /** - * Add a recipe to the centrifuge - * - * @param timePerItem - * Time to centrifugate one item of the given type - * @param resource - * ItemStack containing information on item id and damage. Stack size will be ignored. - * @param produce - * Array of ItemStacks that can be the result of this recipe. - * @param chances - * Array of integers corresponding and matching to produce providing the chance (0-100) for the ItemStack at the given index to be - * produced. - */ - public void addRecipe(int timePerItem, ItemStack resource, ItemStack[] produce, int[] chances); - - /** - * Add a recipe to the centrifuge - * - * @param timePerItem - * Time to centrifugate one item of the given type - * @param resource - * ItemStack containing information on item id and damage. Stack size will be ignored. - * @param primary - * Primary product produced by centrifugating one item. Yield 100 %. - * @param secondary - * Secondary product that may be produced when centrifugating the given item. May be null. - * @param chance - * Chance (1 - 100) for centrifugation to yield the secondary product. - */ - public void addRecipe(int timePerItem, ItemStack resource, ItemStack primary, ItemStack secondary, int chance); - - /** - * Add a recipe to the centrifuge - * - * @param timePerItem - * Time to centrifugate one item of the given type - * @param resource - * ItemStack containing information on item id and damage. Stack size will be ignored. - * @param primary - * Primary product produced by centrifugating one item. Yield 100 %. - */ - public void addRecipe(int timePerItem, ItemStack resource, ItemStack primary); - -} diff --git a/src/api/java/forestry/api/recipes/ICraftingProvider.java b/src/api/java/forestry/api/recipes/ICraftingProvider.java deleted file mode 100644 index 502dffb4..00000000 --- a/src/api/java/forestry/api/recipes/ICraftingProvider.java +++ /dev/null @@ -1,17 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import java.util.Map; - -public interface ICraftingProvider { - /** - * Access to the full list of recipes contained in the crafting provider. - * - * @return List of the given format where the first array represents inputs and the second outputs. Objects can be either ItemStack or LiquidStack. - */ - public Map<Object[], Object[]> getRecipes(); -} diff --git a/src/api/java/forestry/api/recipes/IFabricatorManager.java b/src/api/java/forestry/api/recipes/IFabricatorManager.java deleted file mode 100644 index a01f0da4..00000000 --- a/src/api/java/forestry/api/recipes/IFabricatorManager.java +++ /dev/null @@ -1,18 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fluids.FluidStack; - -public interface IFabricatorManager extends ICraftingProvider { - - void addRecipe(ItemStack plan, FluidStack molten, ItemStack result, Object[] pattern); - - void addSmelting(ItemStack resource, FluidStack molten, int meltingPoint); - -} diff --git a/src/api/java/forestry/api/recipes/IFermenterManager.java b/src/api/java/forestry/api/recipes/IFermenterManager.java deleted file mode 100644 index 92c903bb..00000000 --- a/src/api/java/forestry/api/recipes/IFermenterManager.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fluids.FluidStack; - -/** - * Provides an interface to the recipe manager of the fermenter. - * - * The manager is initialized at the beginning of Forestry's BaseMod.load() - * cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be - * null even if your mod loads before Forestry. - * - * Accessible via {@link RecipeManagers} - * - * @author SirSengir - */ -public interface IFermenterManager extends ICraftingProvider { - - /** - * Add a recipe to the fermenter - * - * @param resource ItemStack representing the resource. - * @param fermentationValue Value of the given resource, i.e. how much needs - * to be fermented for the output to be deposited into the product tank. - * @param modifier Modifies the amount of liquid output per work cycle. - * (water = 1.0f, honey = 1.5f) - * @param output LiquidStack representing output liquid. Amount is - * determined by fermentationValue*modifier. - * @param liquid LiquidStack representing resource liquid and amount. - * @throws NullPointerException if resource, output or liquid is null - */ - public void addRecipe(ItemStack resource, int fermentationValue, float modifier, FluidStack output, FluidStack liquid); - - /** - * Add a recipe to the fermenter. Defaults to water as input liquid. - * - * @param resource ItemStack representing the resource. - * @param modifier Modifies the amount of liquid output per work cycle. - * (water = 1.0f, honey = 1.5f) - * @param fermentationValue Value of the given resource, i.e. how much needs - * to be fermented for the output to be deposited into the product tank. - * @param output LiquidStack representing output liquid. Amount is - * determined by fermentationValue*modifier. - * @throws NullPointerException if resource, output or liquid is null - */ - public void addRecipe(ItemStack resource, int fermentationValue, float modifier, FluidStack output); -} diff --git a/src/api/java/forestry/api/recipes/IMoistenerManager.java b/src/api/java/forestry/api/recipes/IMoistenerManager.java deleted file mode 100644 index 711264b4..00000000 --- a/src/api/java/forestry/api/recipes/IMoistenerManager.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import net.minecraft.item.ItemStack; - -/** - * Provides an interface to the recipe manager of the moistener. - * - * The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even - * if your mod loads before Forestry. - * - * Accessible via {@link RecipeManagers} - * - * @author SirSengir - */ -public interface IMoistenerManager extends ICraftingProvider { - - /** - * Add a recipe to the moistener - * - * @param resource - * Item required in resource stack. Will be reduced by one per produced item. - * @param product - * Item to produce per resource processed. - * @param timePerItem - * Moistener runs at 1 - 4 time ticks per ingame tick depending on light level. For mycelium this value is currently 5000. - */ - public void addRecipe(ItemStack resource, ItemStack product, int timePerItem); -} diff --git a/src/api/java/forestry/api/recipes/ISqueezerManager.java b/src/api/java/forestry/api/recipes/ISqueezerManager.java deleted file mode 100644 index 0a63b731..00000000 --- a/src/api/java/forestry/api/recipes/ISqueezerManager.java +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fluids.FluidStack; - -/** - * Provides an interface to the recipe manager of the suqeezer. - * - * The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even - * if your mod loads before Forestry. - * - * Accessible via {@link RecipeManagers} - * - * @author SirSengir - */ -public interface ISqueezerManager extends ICraftingProvider { - - /** - * Add a recipe to the squeezer. - * - * @param timePerItem - * Number of work cycles required to squeeze one set of resources. - * @param resources - * Array of item stacks representing the required resources for one process. Stack size will be taken into account. - * @param liquid - * {@link FluidStack} representing the output of this recipe. - * @param remnants - * Item stack representing the possible remnants from this recipe. - * @param chance - * Chance remnants will be produced by a single recipe cycle. - */ - public void addRecipe(int timePerItem, ItemStack[] resources, FluidStack liquid, ItemStack remnants, int chance); - - /** - * Add a recipe to the squeezer. - * - * @param timePerItem - * Number of work cycles required to squeeze one set of resources. - * @param resources - * Array of item stacks representing the required resources for one process. Stack size will be taken into account. - * @param liquid - * {@link FluidStack} representing the output of this recipe. - */ - public void addRecipe(int timePerItem, ItemStack[] resources, FluidStack liquid); -} diff --git a/src/api/java/forestry/api/recipes/IStillManager.java b/src/api/java/forestry/api/recipes/IStillManager.java deleted file mode 100644 index 47fd4215..00000000 --- a/src/api/java/forestry/api/recipes/IStillManager.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import net.minecraftforge.fluids.FluidStack; - -/** - * Provides an interface to the recipe manager of the still. - * - * The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even - * if your mod loads before Forestry. - * - * Accessible via {@link RecipeManagers} - * - * Note that this is untested with anything other than biomass->biofuel conversion. - * - * @author SirSengir - */ -public interface IStillManager extends ICraftingProvider { - /** - * Add a recipe to the still - * - * @param cyclesPerUnit - * Amount of work cycles required to run through the conversion once. - * @param input - * ItemStack representing the input liquid. - * @param output - * ItemStack representing the output liquid - */ - public void addRecipe(int cyclesPerUnit, FluidStack input, FluidStack output); -} diff --git a/src/api/java/forestry/api/recipes/IVariableFermentable.java b/src/api/java/forestry/api/recipes/IVariableFermentable.java deleted file mode 100644 index f0997f53..00000000 --- a/src/api/java/forestry/api/recipes/IVariableFermentable.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import net.minecraft.item.ItemStack; - -/** - * Fermenter checks any valid fermentation item for an implementation of this interface. - * This does not supersede adding a proper recipe to the fermenter! - */ -public interface IVariableFermentable { - - /** - * @param itemstack - * @return Float representing the modification to be applied to the matching recipe's biomass output. - */ - float getFermentationModifier(ItemStack itemstack); -} diff --git a/src/api/java/forestry/api/recipes/RecipeManagers.java b/src/api/java/forestry/api/recipes/RecipeManagers.java deleted file mode 100644 index 403bd5b5..00000000 --- a/src/api/java/forestry/api/recipes/RecipeManagers.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.recipes; - -import java.util.Collection; - -/** - * Contains all available recipe managers for Forestry machines and items. - * - * @author SirSengir - */ -public class RecipeManagers { - - public static Collection<ICraftingProvider> craftingProviders; - - /** - * Allows you to add recipes to the carpenter. See {@link ICarpenterManager} for details. - */ - public static ICarpenterManager carpenterManager; - /** - * Allows you to add recipes to the centrifuge. See {@link ICentrifugeManager} for details. - */ - public static ICentrifugeManager centrifugeManager; - /** - * Allows you to add recipes to the fermenter. See {@link IFermenterManager} for details. - */ - public static IFermenterManager fermenterManager; - /** - * Allows you to add recipes to the moistener. See {@link IMoistenerManager} for details. - */ - public static IMoistenerManager moistenerManager; - /** - * Allows you to add recipes to the squeezer. See {@link ISqueezerManager} for details. - */ - public static ISqueezerManager squeezerManager; - /** - * Allows you to add recipes to the still. See {@link IStillManager} for details. - */ - public static IStillManager stillManager; - - public static IFabricatorManager fabricatorManager; -} diff --git a/src/api/java/forestry/api/recipes/package-info.java b/src/api/java/forestry/api/recipes/package-info.java deleted file mode 100644 index c76d83b9..00000000 --- a/src/api/java/forestry/api/recipes/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="3.0.0", owner="ForestryAPI|core", provides="ForestryAPI|recipes") -package forestry.api.recipes; -import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/storage/BackpackEvent.java b/src/api/java/forestry/api/storage/BackpackEvent.java deleted file mode 100644 index 37427788..00000000 --- a/src/api/java/forestry/api/storage/BackpackEvent.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.storage; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; - -import cpw.mods.fml.common.eventhandler.Event; - - -public abstract class BackpackEvent extends Event { - - public final EntityPlayer player; - public final IBackpackDefinition backpackDefinition; - public final IInventory backpackInventory; - - public BackpackEvent(EntityPlayer player, IBackpackDefinition backpackDefinition, IInventory backpackInventory) { - this.player = player; - this.backpackDefinition = backpackDefinition; - this.backpackInventory = backpackInventory; - } -} diff --git a/src/api/java/forestry/api/storage/BackpackManager.java b/src/api/java/forestry/api/storage/BackpackManager.java deleted file mode 100644 index 8805904d..00000000 --- a/src/api/java/forestry/api/storage/BackpackManager.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.storage; - -import java.util.ArrayList; -import java.util.HashMap; - -import net.minecraft.item.ItemStack; - -public class BackpackManager { - /** - * 0 - Miner's Backpack 1 - Digger's Backpack 2 - Forester's Backpack 3 - Hunter's Backpack 4 - Adventurer's Backpack - * - * Use IMC messages to achieve the same effect! - */ - public static ArrayList<ItemStack>[] backpackItems; - - public static IBackpackInterface backpackInterface; - - /** - * Only use this if you know what you are doing. Prefer backpackInterface. - */ - public static HashMap<String, IBackpackDefinition> definitions = new HashMap<String, IBackpackDefinition>(); -} diff --git a/src/api/java/forestry/api/storage/BackpackResupplyEvent.java b/src/api/java/forestry/api/storage/BackpackResupplyEvent.java deleted file mode 100644 index e6e5e119..00000000 --- a/src/api/java/forestry/api/storage/BackpackResupplyEvent.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.storage; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; - -import cpw.mods.fml.common.eventhandler.Cancelable; - -/** - * Use @SubscribeEvent on a method taking this event as an argument. Will fire whenever a backpack tries to resupply to a player inventory. Processing will stop - * if the event is canceled. - */ -@Cancelable -public class BackpackResupplyEvent extends BackpackEvent { - - public BackpackResupplyEvent(EntityPlayer player, IBackpackDefinition backpackDefinition, IInventory backpackInventory) { - super(player, backpackDefinition, backpackInventory); - } - -} diff --git a/src/api/java/forestry/api/storage/BackpackStowEvent.java b/src/api/java/forestry/api/storage/BackpackStowEvent.java deleted file mode 100644 index 3afbf7a1..00000000 --- a/src/api/java/forestry/api/storage/BackpackStowEvent.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.storage; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; - -import cpw.mods.fml.common.eventhandler.Cancelable; - -/** - * Use @SubscribeEvent on a method taking this event as an argument. Will fire whenever a backpack tries to store an item. Processing will stop if the stacksize - * of stackToStow drops to 0 or less or the event is canceled. - */ -@Cancelable -public class BackpackStowEvent extends BackpackEvent { - - public final ItemStack stackToStow; - - public BackpackStowEvent(EntityPlayer player, IBackpackDefinition backpackDefinition, IInventory backpackInventory, ItemStack stackToStow) { - super(player, backpackDefinition, backpackInventory); - this.stackToStow = stackToStow; - } -} diff --git a/src/api/java/forestry/api/storage/EnumBackpackType.java b/src/api/java/forestry/api/storage/EnumBackpackType.java deleted file mode 100644 index 48ad7ee0..00000000 --- a/src/api/java/forestry/api/storage/EnumBackpackType.java +++ /dev/null @@ -1,10 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.storage; - -public enum EnumBackpackType { - APIARIST, T1, T2 -} diff --git a/src/api/java/forestry/api/storage/IBackpackDefinition.java b/src/api/java/forestry/api/storage/IBackpackDefinition.java deleted file mode 100644 index 31c66631..00000000 --- a/src/api/java/forestry/api/storage/IBackpackDefinition.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.storage; - -import java.util.List; - -import net.minecraft.item.ItemStack; - -public interface IBackpackDefinition { - - /** - * @return A unique string identifier - */ - String getKey(); - - /** - * @return Human-readable name of the backpack. - */ - String getName(ItemStack backpack); - - /** - * @return Primary colour for the backpack icon. - */ - int getPrimaryColour(); - - /** - * @return Secondary colour for backpack icon. - */ - int getSecondaryColour(); - - /** - * Adds an item as valid for this backpack. - * - * @param validItem - */ - void addValidItem(ItemStack validItem); - void addValidItems(List<ItemStack> validItems); - - /** - * Returns true if the itemstack is a valid item for this backpack type. - */ - boolean isValidItem(ItemStack itemstack); - -} diff --git a/src/api/java/forestry/api/storage/IBackpackInterface.java b/src/api/java/forestry/api/storage/IBackpackInterface.java deleted file mode 100644 index 27a2eba5..00000000 --- a/src/api/java/forestry/api/storage/IBackpackInterface.java +++ /dev/null @@ -1,22 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.storage; - -import net.minecraft.item.Item; - -public interface IBackpackInterface { - - /** - * Adds a backpack with the given definition and type, returning the item. - * - * @param definition - * Definition of backpack behaviour. - * @param type - * Type of backpack. (T1 or T2 (= Woven) - * @return Created backpack item. - */ - Item addBackpack(IBackpackDefinition definition, EnumBackpackType type); -} diff --git a/src/api/java/forestry/api/storage/ICrateRegistry.java b/src/api/java/forestry/api/storage/ICrateRegistry.java deleted file mode 100644 index 868511e3..00000000 --- a/src/api/java/forestry/api/storage/ICrateRegistry.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.storage; - -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public interface ICrateRegistry { - - /** - * Makes a new crate, registers it with the game registry with uid, - * and creates crating and uncrating recipes for the Carpenter. - * The icon is rendered automatically from the contained item. - * - * Can only be called during the Init stage. - */ - void registerCrate(Item item, String uid); - void registerCrate(Block block, String uid); - void registerCrate(ItemStack stack, String uid); - - /** - * Same as the above, but uses the ore dictionary for the Carpenter crating recipe. - */ - void registerCrateUsingOreDict(Item item, String uid); - void registerCrateUsingOreDict(Block block, String uid); - void registerCrateUsingOreDict(ItemStack stack, String uid); - -} diff --git a/src/api/java/forestry/api/storage/StorageManager.java b/src/api/java/forestry/api/storage/StorageManager.java deleted file mode 100644 index ef4ec4cf..00000000 --- a/src/api/java/forestry/api/storage/StorageManager.java +++ /dev/null @@ -1,12 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.storage; - -public class StorageManager { - - public static ICrateRegistry crateRegistry; - -} diff --git a/src/api/java/forestry/api/storage/package-info.java b/src/api/java/forestry/api/storage/package-info.java deleted file mode 100644 index 3d0c1e9d..00000000 --- a/src/api/java/forestry/api/storage/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="3.0.0", owner="ForestryAPI|core", provides="ForestryAPI|storage") -package forestry.api.storage; -import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/world/ITreeGenData.java b/src/api/java/forestry/api/world/ITreeGenData.java deleted file mode 100644 index bf59c5e5..00000000 --- a/src/api/java/forestry/api/world/ITreeGenData.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.world; - -import net.minecraft.world.World; - -import com.mojang.authlib.GameProfile; - -import forestry.api.arboriculture.ITreeGenome; - -public interface ITreeGenData { - - int getGirth(World world, int x, int y, int z); - - float getHeightModifier(); - - boolean canGrow(World world, int x, int y, int z, int expectedGirth, int expectedHeight); - - void setLeaves(World world, GameProfile owner, int x, int y, int z); - void setLeavesDecorative(World world, GameProfile owner, int x, int y, int z); - - boolean allowsFruitBlocks(); - - boolean trySpawnFruitBlock(World world, int x, int y, int z); - - ITreeGenome getGenome(); -} diff --git a/src/api/java/forestry/api/world/IWorldGenInterface.java b/src/api/java/forestry/api/world/IWorldGenInterface.java deleted file mode 100644 index b7b5555f..00000000 --- a/src/api/java/forestry/api/world/IWorldGenInterface.java +++ /dev/null @@ -1,22 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.world; - -import net.minecraft.world.gen.feature.WorldGenerator; - -public interface IWorldGenInterface { - - /** - * Retrieves generators for trees identified by a given string. - * - * Returned generator classes take an {@link ITreeGenData} in the constructor. - * - * @param ident - * Unique identifier for tree type. Forestry's convention is 'treeSpecies', i.e. 'treeBaobab', 'treeSequoia'. - * @return All generators matching the given ident. - */ - Class<? extends WorldGenerator>[] getTreeGenerators(String ident); -} diff --git a/src/api/java/forestry/api/world/WorldGenManager.java b/src/api/java/forestry/api/world/WorldGenManager.java deleted file mode 100644 index a2a5b4f8..00000000 --- a/src/api/java/forestry/api/world/WorldGenManager.java +++ /dev/null @@ -1,10 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -package forestry.api.world; - -public class WorldGenManager { - public static IWorldGenInterface worldgenInterface; -} diff --git a/src/api/java/forestry/api/world/package-info.java b/src/api/java/forestry/api/world/package-info.java deleted file mode 100644 index c7e60f4e..00000000 --- a/src/api/java/forestry/api/world/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/******************************************************************************* - * Copyright 2011-2014 SirSengir - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. - ******************************************************************************/ -@API(apiVersion="1.1.0", owner="ForestryAPI|core", provides="ForestryAPI|world") -package forestry.api.world; -import cpw.mods.fml.common.API; diff --git a/src/api/java/pneumaticCraft/api/IHeatExchangerLogic.java b/src/api/java/pneumaticCraft/api/IHeatExchangerLogic.java deleted file mode 100644 index 78f8dbec..00000000 --- a/src/api/java/pneumaticCraft/api/IHeatExchangerLogic.java +++ /dev/null @@ -1,77 +0,0 @@ -package pneumaticCraft.api; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -/** - * DO NOT IMPLEMENT THIS CLASS YOURSELF! Use PneumaticRegistry.getInstance().getHeatExchangerLogic() ! - * @author MineMaarten - * www.minemaarten.com - */ -public interface IHeatExchangerLogic{ - - /** - * Call this to tick this logic, and make the heat disperse itself. - */ - public void update(); - - /** - * When called (preferably on tile entity load and neighbor block/tile entity change) this will add all IHeatExchanger neighbor TileEntities as connected heat exchangers. - * It will also take care of blocks like Lava. - * - * You don't _have_ to call this method, if this heat exchanger is not connected to the outside world (for example the heat of the liquid - * plastic in the Plastic Mixer). - * @param world - * @param x - * @param y - * @param z - * @param validSides Can be left out as vararg, meaning every side can be connected. When one or more sides are specified this will constrain - * this heat exchanger to only connect to other heat exchangers on these sides. - */ - public void initializeAsHull(World world, int x, int y, int z, ForgeDirection... validSides); - - /** - * When called, this will connect these two heat exchangers. You should only call this on one of the two heat exchangers. - * @param exchanger - */ - public void addConnectedExchanger(IHeatExchangerLogic exchanger); - - public void removeConnectedExchanger(IHeatExchangerLogic exchanger); - - /** - * A heat exchanger starts with 295 degrees Kelvin (20 degrees Celcius) by default. - * @param temperature in degrees Kelvin - */ - public void setTemperature(double temperature); - - public double getTemperature(); - - /** - * The higher the thermal resistance, the slower the heat disperses. - * @param thermalResistance By default it's 1. - */ - public void setThermalResistance(double thermalResistance); - - public double getThermalResistance(); - - /** - * The higher the capacity, the more heat can be 'stored'. This means that an object with a high capacity can heat up an object with a lower - * capacity without losing any significant amount of temperature. - * @param capacity - */ - public void setThermalCapacity(double capacity); - - public double getThermalCapacity(); - - public void writeToNBT(NBTTagCompound tag); - - public void readFromNBT(NBTTagCompound tag); - - /** - * Adds heat (= deltaT * Thermal Capacity) to this exchanger. negative values will remove heat. - * @param amount - */ - public void addHeat(double amount); - -} diff --git a/src/api/java/pneumaticCraft/api/PneumaticRegistry.java b/src/api/java/pneumaticCraft/api/PneumaticRegistry.java deleted file mode 100644 index f3254829..00000000 --- a/src/api/java/pneumaticCraft/api/PneumaticRegistry.java +++ /dev/null @@ -1,158 +0,0 @@ -package pneumaticCraft.api; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityCreature; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraftforge.fluids.Fluid; -import pneumaticCraft.api.client.pneumaticHelmet.IBlockTrackEntry; -import pneumaticCraft.api.client.pneumaticHelmet.IEntityTrackEntry; -import pneumaticCraft.api.client.pneumaticHelmet.IHackableBlock; -import pneumaticCraft.api.client.pneumaticHelmet.IHackableEntity; -import pneumaticCraft.api.drone.ICustomBlockInteract; -import pneumaticCraft.api.drone.IPathfindHandler; -import pneumaticCraft.api.item.IInventoryItem; - -/** - * This class can be used to register and access various things to and from the mod. - */ -public class PneumaticRegistry{ - /** - * This field, which is initialized in PneumaticCraft's preInit, will give you access to various registration and access options. - * @deprecated This field isn't going to be removed, but it'll be marked private. use getInstance(). - */ - @Deprecated - public static IPneumaticCraftInterface instance; - - public static IPneumaticCraftInterface getInstance(){ - return instance; - } - - public static void init(IPneumaticCraftInterface inter){ - if(instance == null) instance = inter;//only allow initialization once; by PneumaticCraft - } - - public static interface IPneumaticCraftInterface{ - - /* - * ------------- Pneumatic Helmet -------------- - */ - - public void registerEntityTrackEntry(Class<? extends IEntityTrackEntry> entry); - - public void registerBlockTrackEntry(IBlockTrackEntry entry); - - public void addHackable(Class<? extends Entity> entityClazz, Class<? extends IHackableEntity> iHackable); - - public void addHackable(Block block, Class<? extends IHackableBlock> iHackable); - - /** - * Returns a list of all current successful hacks of a given entity. This is used for example in Enderman hacking, so the user - * can only hack an enderman once (more times wouldn't have any effect). This is mostly used for display purposes. - * @param entity - * @return empty list if no hacks. - */ - public List<IHackableEntity> getCurrentEntityHacks(Entity entity); - - /* - * ------------- Drones -------------- - */ - - /** - * Normally drones will pathfind through any block that doesn't have any collisions (Block#getBlocksMovement returns true). - * With this method you can register custom blocks to allow the drone to pathfind through them. If the block requires any special - * handling, like allow pathfinding on certain conditions, you can pass a IPathFindHandler with the registry. - * @param block - * @param handler can be null, to always allow pathfinding through this block. - */ - public void addPathfindableBlock(Block block, IPathfindHandler handler); - - /** - * This will add a puzzle piece that has only a Area white- and blacklist parameter (similar to a GoTo piece). - * It will do the specified behaviour. This can be used to create energy import/export widgets. - * @param interactor - */ - public void registerCustomBlockInteractor(ICustomBlockInteract interactor); - - /** - * Will spawn in a Drone a distance away from the given coordinate. The drone is programmed to travel to go to 5 blocks above the specified - * y level, and drop the deliveredStacks. When there isn't a clear path for the items to fall these 5 blocks the Drone will deliver at a - * y level above the specified y that _is_ clear. If no clear blocks can be found (when there are only solid blocks), the Drone will - * drop the items very high up in the air instead, and drop them there. - * - * When the Drone is tried to be catched by a player (by wrenching it), the drone will only the drop the items that it was delivering (or - * none if it dropped those items already). The Drone itself never will be dropped. - * - * @param x - * @param y - * @param z - * @param deliveredStacks stacks that are delivered by the drone. When no stacks, or more than 65 stacks are given, this will generate a IllegalArgumentException. - * @return the drone. You can use this to set a custom name for example (defaults to "Amazon Delivery Drone"). - */ - public EntityCreature deliverItemsAmazonStyle(World world, int x, int y, int z, ItemStack... deliveredStacks); - - /* - * --------------- Items ------------------- - */ - /** - * See {@link pneumaticCraft.api.item.IInventoryItem} - * @param handler - */ - public void registerInventoryItem(IInventoryItem handler); - - /* - * ----------------- Heat System -------------- - */ - public IHeatExchangerLogic getHeatExchangerLogic(); - - public void registerBlockExchanger(Block block, double temperature, double thermalResistance); - - /* - * ---------------- Power Generation ----------- - */ - - /** - * Adds a burnable liquid to the Liquid Compressor's available burnable fuels. - * @param fluid - * @param mLPerBucket the amount of mL generated for 1000mB of the fuel. As comparison, one piece of coal generates 16000mL in an Air Compressor. - */ - public void registerFuel(Fluid fluid, int mLPerBucket); - - /* - * --------------- Misc ------------------- - */ - - /** - * Returns the amount of Security Stations that disallow interaction with the given coordinate for the given player. - * Usually you'd disallow interaction when this returns > 0. - * @param world - * @param x - * @param y - * @param z - * @param player - * @param showRangeLines When true, any Security Station that prevents interaction will show the line grid (server --> client update is handled internally). - * @return The amount of Security Stations that disallow interaction for the given player. - * This method throws an IllegalArgumentException when tried to be called from the client side! - */ - public int getProtectingSecurityStations(World world, int x, int y, int z, EntityPlayer player, boolean showRangeLines); - - /** - * Use this to register ISimpleBlockRenderHandler render id's of full blocks, those of which should be able to be used for the Pneumatic Door Base camouflage. - * @param id - */ - public void registerConcealableRenderId(int id); - - /** - * Used to register a liquid that represents liquid XP (like MFR mob essence, OpenBlocks liquid XP). - * This is used in the Aerial Interface to pump XP in/out of the player. - * @param fluid - * @param liquidToPointRatio The amount of liquid (in mB) used to get one XP point. In OpenBlocks this is 20 (mB/point). - */ - public void registerXPLiquid(Fluid fluid, int liquidToPointRatio); - - } -} diff --git a/src/api/java/pneumaticCraft/api/actuator/IActuator.java b/src/api/java/pneumaticCraft/api/actuator/IActuator.java deleted file mode 100644 index 93ea61a2..00000000 --- a/src/api/java/pneumaticCraft/api/actuator/IActuator.java +++ /dev/null @@ -1,32 +0,0 @@ -package pneumaticCraft.api.actuator; - -import java.util.List; - -import net.minecraft.tileentity.TileEntity; - -public interface IActuator{ - /** - * Same as {@link pneumaticCraft.api.universalSensor.ISensorSetting#getSensorPath()} - * @return - */ - public String getSensorPath(); - - /** - * When returned true, the GUI will enable the textbox writing, otherwise not. - * @return - */ - public boolean needsTextBox(); - - /** - * Should return the description of this sensor displayed in the GUI stat. Information should at least include - * when this sensor emits redstone and how (analog (1 through 15), or digital). - * @return - */ - public List<String> getDescription(); - - /** - * - * @param universalActuator - */ - public void actuate(TileEntity universalActuator); -} diff --git a/src/api/java/pneumaticCraft/api/block/BlockSupplier.java b/src/api/java/pneumaticCraft/api/block/BlockSupplier.java deleted file mode 100644 index 0e35540d..00000000 --- a/src/api/java/pneumaticCraft/api/block/BlockSupplier.java +++ /dev/null @@ -1,77 +0,0 @@ -package pneumaticCraft.api.block; - -import net.minecraft.block.Block; -import cpw.mods.fml.common.registry.GameRegistry; - -public class BlockSupplier{ - // private static Class blockClass; - - /** - * @param blockName - * @return - */ - public static Block getBlock(String blockName){ - return GameRegistry.findBlock("PneumaticCraft", blockName); - /*try { - if(blockClass == null) blockClass = Class.forName("pneumaticCraft.common.block.Blockss"); - return (Block)blockClass.getField(blockName).get(null); - } catch(Exception e) { - System.err.println("[PneumaticCraft API] Block supply failed for block: " + blockName); - return null; - }*/ - } - - /* - The following is a list of all the block names that can be passed as argument in getBlock(String) to get a PneumaticCraft block. - - - pressureTube meta = tube type - airCompressor - airCannon - pressureChamberWall meta < 6 ? wall : window - pressureChamberValve - pressureChamberInterface - squidPlant - fireFlower - creeperPlant - slimePlant - rainPlant - enderPlant - lightningPlant - adrenalinePlant - burstPlant - potionPlant - repulsionPlant - heliumPlant - flyingFlower - musicPlant - propulsionPlant - chopperPlant - chargingStation - elevatorBase - elevatorFrame - vacuumPump - pneumaticDoorBase - pneumaticDoor - assemblyPlatform - assemblyIOUnit - assemblyDrill - assemblyLaser - assemblyController - advancedPressureTube meta = tube type (like 'pressureTube') - compressedIron - uvLightBox - etchingAcid - securityStation - universalSensor - pneumaticGenerator - electricCompressor - pneumaticEngine - kineticCompressor - aerialInterface - electrostaticCompressor - aphorismTile - omnidirectionalHopper - - */ -} diff --git a/src/api/java/pneumaticCraft/api/block/IPneumaticWrenchable.java b/src/api/java/pneumaticCraft/api/block/IPneumaticWrenchable.java deleted file mode 100644 index 5b666d49..00000000 --- a/src/api/java/pneumaticCraft/api/block/IPneumaticWrenchable.java +++ /dev/null @@ -1,14 +0,0 @@ -package pneumaticCraft.api.block; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -/** - * Should be implemented by any block that allows to be rotated by a Pneumatic Wrench. It uses almost the same - * rotate method as the Vanilla (Forge) method. However it uses energy to rotate (when rotateBlock() return true). - */ -public interface IPneumaticWrenchable{ - - public boolean rotateBlock(World world, EntityPlayer player, int x, int y, int z, ForgeDirection side); -} diff --git a/src/api/java/pneumaticCraft/api/client/GuiAnimatedStatSupplier.java b/src/api/java/pneumaticCraft/api/client/GuiAnimatedStatSupplier.java deleted file mode 100644 index 4f88f0f2..00000000 --- a/src/api/java/pneumaticCraft/api/client/GuiAnimatedStatSupplier.java +++ /dev/null @@ -1,49 +0,0 @@ -package pneumaticCraft.api.client; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.item.ItemStack; - -/** - * With this class you can retrieve new instances of the PneumaticCraft's IGuiAnimatedStat implementation. You can use these in Gui's as - * well as anywhere you like. When you use these in Gui's you need to pass a valid GuiScreen instance, if you don't you can just pass - * null. - */ -public class GuiAnimatedStatSupplier{ - private static Class animatedStatClass; - - public static IGuiAnimatedStat getAnimatedStat(GuiScreen gui, int backgroundColor){ - return getAnimatedStat(new Class[]{GuiScreen.class, int.class}, gui, backgroundColor); - } - - /** - * Returns a GuiAnimatedStat which uses an itemstack as static icon. - * @param gui - * @param iconStack - * @param backgroundColor - * @return - */ - public static IGuiAnimatedStat getAnimatedStat(GuiScreen gui, ItemStack iconStack, int backgroundColor){ - return getAnimatedStat(new Class[]{GuiScreen.class, int.class, ItemStack.class}, gui, backgroundColor, iconStack); - } - - /** - * Returns a GuiAnimatedStat which uses a texture location as static icon. - * @param gui - * @param iconTexture / text - * @param backgroundColor - * @return - */ - public static IGuiAnimatedStat getAnimatedStat(GuiScreen gui, String iconTexture, int backgroundColor){ - return getAnimatedStat(new Class[]{GuiScreen.class, int.class, String.class}, gui, backgroundColor, iconTexture); - } - - private static IGuiAnimatedStat getAnimatedStat(Class[] constructorClasses, Object... constructorParameters){ - try { - if(animatedStatClass == null) animatedStatClass = Class.forName("pneumaticCraft.client.gui.widget.GuiAnimatedStat"); - return (IGuiAnimatedStat)animatedStatClass.getConstructor(constructorClasses).newInstance(constructorParameters); - } catch(Exception e) { - System.err.println("Failed to retrieve an GuiAnimatedStat instance from PneumaticCraft."); - } - return null; - } -} diff --git a/src/api/java/pneumaticCraft/api/client/GuiElementRenderer.java b/src/api/java/pneumaticCraft/api/client/GuiElementRenderer.java deleted file mode 100644 index ff590de2..00000000 --- a/src/api/java/pneumaticCraft/api/client/GuiElementRenderer.java +++ /dev/null @@ -1,32 +0,0 @@ -package pneumaticCraft.api.client; - -import java.lang.reflect.Method; - -import net.minecraft.client.gui.FontRenderer; - -public class GuiElementRenderer{ - private static Method drawGaugeMethod; - - /** - * Draws a Pressure Gauge, the same which is also used in many PneumaticCraft applications. - * @param fontRenderer fontrenderer used to draw the numbers of the pressure gauge. - * @param minPressure The minimal pressure that needs to be displayed (this is -1 in most applications). - * @param maxPressure The maximal pressure that needs to be rendererd (this is 7 for tier one machines, and 25 for tier two). - * @param dangerPressure The transition pressure from green to red (this is 5 for tier one, and 29 for tier two machines). - * @param minWorkingPressure The transition pressure from yellow to green (variates per machine). - * @param currentPressure The pressure that the needle should point to. - * @param xPos x position of the gauge. - * @param yPos y position of the gauge. - * @param zLevel z position of the gauge (Gui#zLevel, -90, for in normal GUI's). - */ - public static void drawPressureGauge(FontRenderer fontRenderer, float minPressure, float maxPressure, float dangerPressure, float minWorkingPressure, float currentPressure, int xPos, int yPos, float zLevel){ - try { - if(drawGaugeMethod == null) { - drawGaugeMethod = Class.forName("pneumaticCraft.client.gui.GuiUtils").getMethod("drawPressureGauge", FontRenderer.class, float.class, float.class, float.class, float.class, float.class, int.class, int.class, float.class); - } - drawGaugeMethod.invoke(null, fontRenderer, minPressure, maxPressure, dangerPressure, minWorkingPressure, currentPressure, xPos, yPos, zLevel); - } catch(Exception e) { - System.err.println("Failed to render a Pressure Gauge from PneumaticCraft."); - } - } -} diff --git a/src/api/java/pneumaticCraft/api/client/IGuiAnimatedStat.java b/src/api/java/pneumaticCraft/api/client/IGuiAnimatedStat.java deleted file mode 100644 index 15d55c71..00000000 --- a/src/api/java/pneumaticCraft/api/client/IGuiAnimatedStat.java +++ /dev/null @@ -1,179 +0,0 @@ -package pneumaticCraft.api.client; - -import java.awt.Rectangle; -import java.util.List; - -/** - * This interface doesn't have to be implemented. In PneumaticCraft there already is one class which implements this interface - * which is used many times in PneumaticCraft (GUI stats, Pneumatic Helmet 2D and 3D stats). You can get an instance of this - * class as well. Information about this you can find in GuiAnimatedStatSupplier.java. Implementing your own version of - * animated stats can be implemented as well via this interface, and they will interact with the PneumaticCraft GuiAnimatedStats - * if you implement it correctly. - */ - -public interface IGuiAnimatedStat{ - - /** - * When you call this method with a set of coordinates representing the button location and dimensions, you'll get - * these parameters back scaled to the GuiAnimatedStat's scale. - * @param origX Button start X. - * @param origY Button start Y. - * @param width Button width. - * @param height Button height. - * @return rectangle containing the new location and dimensions. - */ - public Rectangle getButtonScaledRectangle(int origX, int origY, int width, int height); - - /** - * When passed 0.5F for example, the text of the stat will be half as big (so more text can fit into a certain area). - * @param scale - */ - public void scaleTextSize(float scale); - - /** - * Returns true if the statistic expands to the left. - * @return - */ - public boolean isLeftSided(); - - /** - * Returns true if the statistic is done with expanding (when text will be displayed). - * @return - */ - public boolean isDoneExpanding(); - - /** - * Pass true if the statistic should expand to the left, otherwise false. - * @param leftSided - */ - public void setLeftSided(boolean leftSided); - - /** - * Sets the main text of this stat. Every line should be stored in a seperate list element. Upon rendering, - * EnumChatFormattings will be respected. When you call this method, Too long lines will be divided into multiple shorter ones - * to fit in the GUI. - * @param text - * @return this, so you can chain calls. - */ - public IGuiAnimatedStat setText(List<String> text); - - /** - * Sets the line to a single line. Upon rendering, - * EnumChatFormattings will be respected. When you call this method, Too long lines will be divided into multiple shorter ones - * to fit in the GUI. - * @param text - * @return this, so you can chain calls. - */ - public IGuiAnimatedStat setText(String text); - - /** - * Sets the main text of this stat. Every line should be stored in a seperate list element. Upon rendering, - * EnumChatFormattings will be respected. This version of the text setting doesn't handle too long lines. - * @param text - */ - public void setTextWithoutCuttingString(List<String> text); - - /** - * Sets the title of this stat. It will automatically get the yellow color assigned. - * @param title - */ - public void setTitle(String title); - - /** - * Returns the title of this stat (obviously without color prefix). - * @return - */ - public String getTitle(); - - /** - * Defines what dimensions the stat should have when it is not expanded (default 17x17) and resets the stat to these dimensions. - * Used in PneumaticCraft by the block/entity tracker stats, they are 0x0 when not expanded so it looks like they expand - * (and appear) from nothing. - * @param minWidth - * @param minHeight - */ - public void setMinDimensionsAndReset(int minWidth, int minHeight); - - /** - * When this stat gets a parent stat assigned, the y of this stat will be the same as the parent's plus this stat's - * baseY. This will cause this stat to move up and down when the parent's stat expands/moves. - * @param stat - */ - public void setParentStat(IGuiAnimatedStat stat); - - /** - * Sets the x location of this stat. - * @param x - */ - public void setBaseX(int x); - - /** - * Sets the base Y of this stat. - * @param y - */ - public void setBaseY(int y); - - /** - * Returns the real Y of this stat. This is the same as getBaseY when there is no parent stat, but if there is this method - * returns the value described in setParentStat(IGuiAnimatedStat stat). - * @return - */ - public int getAffectedY(); - - public int getBaseX(); - - public int getBaseY(); - - /** - * Returns the Y size of this stat. - * @return - */ - public int getHeight(); - - /** - * Returns the X size of this stat. - * @return - */ - public int getWidth(); - - public Rectangle getBounds(); - - /** - * This method should be called every game tick to update the logic of the stat (expanding of the stat). - */ - public void update(); - - /** - * Should be called every render tick when and where you want to render the stat. - * @param mouseX - * @param mouseY - * @param partialTicks - */ - public void render(int mouseX, int mouseY, float partialTicks); - - /** - * This method will handle mouse clicks. This will handle open/closing of the stat when the mouse clicks it. - * @param x - * @param y - * @param button - * @return - */ - public void onMouseClicked(int x, int y, int button); - - /** - * Forces the stat to close. - */ - public void closeWindow(); - - /** - * Forces the stat to expand. - */ - public void openWindow(); - - /** - * Returns true if the stat is expanding. - * @return - */ - public boolean isClicked(); - -} diff --git a/src/api/java/pneumaticCraft/api/client/assemblymachine/AssemblyRenderOverriding.java b/src/api/java/pneumaticCraft/api/client/assemblymachine/AssemblyRenderOverriding.java deleted file mode 100644 index 1816dc5b..00000000 --- a/src/api/java/pneumaticCraft/api/client/assemblymachine/AssemblyRenderOverriding.java +++ /dev/null @@ -1,55 +0,0 @@ -package pneumaticCraft.api.client.assemblymachine; - -import java.util.HashMap; - -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public class AssemblyRenderOverriding{ - public static final HashMap<Integer, IAssemblyRenderOverriding> renderOverrides = new HashMap<Integer, IAssemblyRenderOverriding>(); - - public static void addRenderOverride(Block block, IAssemblyRenderOverriding renderOverride){ - renderOverrides.put(Block.getIdFromBlock(block), renderOverride); - } - - public static void addRenderOverride(Item item, IAssemblyRenderOverriding renderOverride){ - renderOverrides.put(Item.getIdFromItem(item), renderOverride); - } - - public static interface IAssemblyRenderOverriding{ - /** - * This method will be called just before the IO Unit's held stack is being rendered. You can insert GL11 calls here to - * rotate the model for example. push and pop matrices are not needed, this is done for you. - * You can also choose to do the whole rendering yourself, you'll need to return false then to indicate that - * PneumaticCraft shouldn't render the item. - * @param renderedStack itemStack that is being rendered - * @return true if PneumaticCraft should render the item (after your changes), or false to cancel rendering. - */ - public boolean applyRenderChangeIOUnit(ItemStack renderedStack); - - /** - * Same deal as with the applyRenderChangeIOUnit(), but now for the Assembly Platform. - * @param renderedStack itemStack that is being rendered - * @return true if PneumaticCraft should render the item (after your changes), or false to cancel rendering. - */ - public boolean applyRenderChangePlatform(ItemStack renderedStack); - - /** - * Should return the distance the claw travels before it is gripped to the stack. - * By default it's 0.0875F for items and 0.00625F for blocks, 0.09375 when the claw is completely closed. - * @param renderedStack - * @return - */ - public float getIOUnitClawShift(ItemStack renderedStack); - - /** - * Should return the distance the claw travels before it is gripped to the stack. - * By default it's 0.0875F for items and 0.00625F for blocks, 0.09375 when the claw is completely closed. - * @param renderedStack - * @return - */ - public float getPlatformClawShift(ItemStack renderedStack); - - } -} diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IBlockTrackEntry.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IBlockTrackEntry.java deleted file mode 100644 index 6d9e1fe0..00000000 --- a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IBlockTrackEntry.java +++ /dev/null @@ -1,80 +0,0 @@ -package pneumaticCraft.api.client.pneumaticHelmet; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -public interface IBlockTrackEntry{ - /** - * This method should return true if the coordinate checked is one that - * should be tracked. Most entries will just return true when the blockID is - * the one that they track. - * - * @param world - * The world that is examined. - * @param x - * The x coordinate of the block examined. - * @param y - * The y coordinate of the block examined. - * @param z - * The z coordinate of the block examined. - * @param block - * The block of the current coordinate. This will save you a - * call to World.getBlock(). - * @param te The TileEntity at this x,y,z. - * @return true if the coordinate should be tracked by this BlockTrackEntry. - */ - public boolean shouldTrackWithThisEntry(IBlockAccess world, int x, int y, int z, Block block, TileEntity te); - - /** - * This method defines if the block should be updated by the server (each 5 - * seconds). This is specifically aimed at Tile Entities, as the server will - * send an NBT packet. This method returns true at for instance Chests and - * Mob Spawners, to get the inventory at the client side and the time to the - * next spawn respectively. - * @param te The TileEntity at the currently checked location. - * - * @return true if the Tile Entity should be updated, or false when it - * doesn't have to. - */ - public boolean shouldBeUpdatedFromServer(TileEntity te); - - /** - * The return of this method defines at how many tracked blocks of this type - * the HUD should stop displaying text at the tracked blocks of this type. - * - * @return amount of blocks the HUD should stop displaying the block info. - */ - public int spamThreshold(); - - /** - * This method is called each render tick to retrieve the blocks additional - * information. The method behaves the same as the addInformation method in - * the Item class. This method only will be called if - * shouldTrackWithThisEntry() returned true and the player hovers over the - * coordinate. - * - * @param world - * The world the block is in. - * @param x - * The x coordinate the block is at. - * @param y - * The y coordinate the block is at. - * @param z - * The z coordinate the block is at. - * @param te The TileEntity at the x,y,z. - * @param infoList - * The list of lines to display. - */ - public void addInformation(World world, int x, int y, int z, TileEntity te, List<String> infoList); - - /** - * This method is called when displaying the currently tracked blocks. - * Will be tried to be mapped to the localization file first. - * @return the name of the group of this entry. - */ - public String getEntryName(); -} diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IEntityTrackEntry.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IEntityTrackEntry.java deleted file mode 100644 index 65c2b79e..00000000 --- a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IEntityTrackEntry.java +++ /dev/null @@ -1,49 +0,0 @@ -package pneumaticCraft.api.client.pneumaticHelmet; - -import java.util.List; - -import net.minecraft.entity.Entity; - -/** - * Implement this class and register it by adding it to the entityTrackEntries class. - * There needs to be a parameterless constructor. For every entity that's applicable for this definition, an instance is created. - */ -public interface IEntityTrackEntry{ - /** - * Return true if you want to add a tooltip for the given entity. - * @param entity - * @return - */ - public boolean isApplicable(Entity entity); - - /** - * Add info to the tab. This is only called when isApplicable returned true. - * @param entity - * @param curInfo - */ - public void addInfo(Entity entity, List<String> curInfo); - - /** - * Update is called every (client) tick, and can be used to update something like a timer (used for the Creeper countdown). - * @param entity - */ - public void update(Entity entity); - - /** - * Called every render tick, this method can be used to render additional info. Used for Drone AI visualisation. - * @param entity - * @param partialTicks TODO - */ - public void render(Entity entity, float partialTicks); - - /** - * Just a basic implementation class that can be used if an update and render method isn't needed. - */ - public static abstract class EntityTrackEntry implements IEntityTrackEntry{ - @Override - public void update(Entity entity){} - - @Override - public void render(Entity entity, float partialTicks){} - } -} diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IGuiScreen.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IGuiScreen.java deleted file mode 100644 index 8f98938d..00000000 --- a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IGuiScreen.java +++ /dev/null @@ -1,15 +0,0 @@ -package pneumaticCraft.api.client.pneumaticHelmet; - -import java.util.List; - -import net.minecraft.client.gui.FontRenderer; - -/** - * Just an interface to give access to GuiSreen#buttonList and GuiScreen#fontRenderer. An instance of this class can - * safely be casted to GuiSreen if needed. - */ -public interface IGuiScreen{ - public List getButtonList(); - - public FontRenderer getFontRenderer(); -} diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableBlock.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableBlock.java deleted file mode 100644 index 9dc7863d..00000000 --- a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableBlock.java +++ /dev/null @@ -1,69 +0,0 @@ -package pneumaticCraft.api.client.pneumaticHelmet; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -/** -Use this interface to specify any hackable block. When it's your block, you can simply implement this interface in the -block's class. If you don't have access to the class (vanilla blocks), you can implement this interface in a separate class -and register it using PneumaticRegistry.registry.addHackable(blockClass, IHackableBlockClass). With the former way there will be one instance only per type. In the latter, there will -be an IHackableBlock instance for every block. -*/ -public interface IHackableBlock{ - /** - * Should return a unique id to represent this hackable. Used in NBT saving to be able to trigger the afterHackTime after a server restart. - * Null is a valid return: afterHackTick will not be triggered at all in that case. - * - * CURRENTLY THIS ISN'T IMPLEMENTED. - * @return - */ - public String getId(); - - /** - Returning true will allow the player to hack this block. This can be used to only allow hacking on certain conditions. - */ - public boolean canHack(IBlockAccess world, int x, int y, int z, EntityPlayer player); - - /** - Add info that is displayed on the tracker tooltip here. Text like "Hack to explode" can be added. - This method is only called when canHack(World, int, int, int) returned true. - The added lines automatically will be tried to get localized. - */ - public void addInfo(World world, int x, int y, int z, List<String> curInfo, EntityPlayer player); - - /** - * Add info that is being displayed after hacking, as long as 'afterHackTick' is returning true. - * Things like "Neutralized". - * The added lines automatically will be tried to get localized. - * @param entity - * @param curInfo - * @param player - */ - public void addPostHackInfo(World world, int x, int y, int z, List<String> curInfo, EntityPlayer player); - - /** - Return the time it takes to hack this block in ticks. For more powerful hacks, a longer required hacking time is adviced. - */ - public int getHackTime(IBlockAccess world, int x, int y, int z, EntityPlayer player); - - /** - When the player hacked the block for getHackTime(World, int, int, int) ticks this will be called on both server and client side. - */ - public void onHackFinished(World world, int x, int y, int z, EntityPlayer player); - - /** - * Called every tick after the hacking finished (on both server and client side). Returning true will keep this going (for mob spawners, to keep them neutralized), - * or false to stop ticking (for door/lever hacking). - * - * CURRENTLY THIS METHOD WILL STOP GETTING INVOKED AFTER A SERVER RESTART! - * @param world - * @param x - * @param y - * @param z - * @return - */ - public boolean afterHackTick(World world, int x, int y, int z); -} diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableEntity.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableEntity.java deleted file mode 100644 index e8aa236c..00000000 --- a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableEntity.java +++ /dev/null @@ -1,59 +0,0 @@ -package pneumaticCraft.api.client.pneumaticHelmet; - -import java.util.List; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; - -/** -Use this interface to specify any hackable entity. When it's your entity, you can simply implement this interface in the -entity's class. If you don't have access to the class (vanilla entities), you can implement this interface in a separate class -and register it using PneumaticRegistry.registry.addHackable(entityClass, IHackableEntityClass). In both ways there will be an IHackableEntity instance for every entity. -*/ -public interface IHackableEntity{ - - /** - * Should return a unique id to represent this hackable. Used in NBT saving to be able to trigger the afterHackTime after a server restart. - * Null is a valid return: afterHackTick will not be triggered at all in that case. - * @return - */ - public String getId(); - - /** - Returning true will allow the player to hack this entity. This can be used to only allow hacking on certain conditions. - */ - public boolean canHack(Entity entity, EntityPlayer player); - - /** - Add info that is displayed on the tracker tooltip here. Text like "Hack to explode" can be added. - This method is only called when canHack(Entity) returned true. - The added lines automatically will be tried to get localized. - */ - public void addInfo(Entity entity, List<String> curInfo, EntityPlayer player); - - /** - * Add info that is being displayed after hacking, as long as 'afterHackTick' is returning true. - * Things like "Neutralized". - * The added lines automatically will be tried to get localized. - * @param entity - * @param curInfo - * @param player - */ - public void addPostHackInfo(Entity entity, List<String> curInfo, EntityPlayer player); - - /** - Return the time it takes to hack this entity in ticks. For more powerful hacks, a longer required hacking time is adviced. - */ - public int getHackTime(Entity entity, EntityPlayer player); - - /** - When the player hacked the entity for getHackTime(Entity) ticks this will be called on both client and server side. - */ - public void onHackFinished(Entity entity, EntityPlayer player); - - /** - * Called every tick after the hacking finished. Returning true will keep this going (for mob spawners, to keep them neutralized), - * or false to stop ticking (for door/lever hacking). - */ - public boolean afterHackTick(Entity entity); -} diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IOptionPage.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IOptionPage.java deleted file mode 100644 index 2212749e..00000000 --- a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IOptionPage.java +++ /dev/null @@ -1,46 +0,0 @@ -package pneumaticCraft.api.client.pneumaticHelmet; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; - -/** - * The Option Page is the page you see when you press 'F' (by default) with a Pneumatic Helmet equipped. You can register this class - * by returning a new instance of this class at {@link IUpgradeRenderHandler#getGuiOptionsPage()} - */ -public interface IOptionPage{ - - /** - * This string is used in the text of the button of this page. - * @return - */ - public String getPageName(); - - /** - * Here you can initialize your buttons and stuff like with a GuiScreen. For buttons, don't use button id 100 and up, as they - * will be used as selection buttons for other option pages in the main GuiScreen. - * @param gui - */ - public void initGui(IGuiScreen gui); - - /** - * Same as GuiScreen#actionPerformed(GuiButton). - * @param button - */ - public void actionPerformed(GuiButton button); - - /** - * Same as {@link GuiScreen#drawScreen(int, int, float)} - * Here you can render additional things like text. - * @param x - * @param y - * @param partialTicks - */ - public void drawScreen(int x, int y, float partialTicks); - - /** - * Same as GuiScreen#keyTyped(char, int). - * @param ch - * @param key - */ - public void keyTyped(char ch, int key); -} diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IUpgradeRenderHandler.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IUpgradeRenderHandler.java deleted file mode 100644 index d273baf3..00000000 --- a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IUpgradeRenderHandler.java +++ /dev/null @@ -1,92 +0,0 @@ -package pneumaticCraft.api.client.pneumaticHelmet; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.config.Configuration; -import pneumaticCraft.api.client.IGuiAnimatedStat; - -/** - * To add upgrades for in the Pneumatic Helmet implement this interface. You can add members to this class, however these can only - * be client sided members as this class will be used as singleton. Therefore, only one of these instances exist at the server side - * so any member that is used server side will affect every player. - * - */ -public interface IUpgradeRenderHandler{ - - /** - * Return here the name of the upgrade. This is displayed in the formatting [upgradeName] + " " + "found"/"not found" on - * initialization of the helmet. - * @return - */ - public String getUpgradeName(); - - /** - * Being called from PneumaticCraft's config handler, you can use this method to read settings like stat positions - * @param config PneumaticCraft's config file. - */ - public void initConfig(Configuration config); - - /** - * When called this should save the settings to the config file. Called when changed a setting. When you want to use - * PneumaticCraft's config file, save a reference of it somewhere in this class when the config gets passed in the - * initConfig() method (this always will be called first). - */ - public void saveToConfig(); - - /** - * This method will be called every client tick, and should be used to update logic like the tracking and velocities of stuff. - * @param player - * @param rangeUpgrades amount of range upgrades installed in the helmet. - */ - public void update(EntityPlayer player, int rangeUpgrades); - - /** - * Called in the 3D render stage (renderWorldLastEvent) - * @param partialTicks - */ - public void render3D(float partialTicks); - - /** - * Called in the 2D render stage (Render Tick Handler) - * @param partialTicks - * @param helmetEnabled is true when isEnabled() returned true earlier. Can be used to close AnimatedStats for instance. - * However this is already handled if you return an AnimatedStat in getAnimatedStat(). - */ - public void render2D(float partialTicks, boolean helmetEnabled); - - /** - * You can return a GuiAnimatedStat here, that the HUDHandler will pick up and render. It also automatically opens and closes - * the stat when needed. The GuiMoveStat uses this method to retrieve the to be moved stat. - * @return null if no stat used. - */ - public IGuiAnimatedStat getAnimatedStat(); - - /** - * Should return true if this upgrade handler is enabled for the given stacks placed in the helmet. - * @param upgradeStacks - * @return - */ - public boolean isEnabled(ItemStack[] upgradeStacks); - - /** - * Returns the usage in mL/tick when this upgrade handler is enabled. - * @param rangeUpgrades amount of range upgrades installed in the helmet. - * @param player - * @return usage in mL/tick - */ - public float getEnergyUsage(int rangeUpgrades, EntityPlayer player); - - /** - * Called when (re-)equipped the helmet this method should be used to clear information like current tracked entities. - * So clearing lists and other references as this handler should re-acquire when reinstalled. - */ - public void reset(); - - /** - * When you have some options for your upgrade handler you could return a new instance of an IOptionsPage. - * When you do so, it will automatically get picked up by the options handler, and it will be added to the - * options GUI when this upgrade returns true when calling isEnabled(). Returning null is valid. - * @return - */ - public IOptionPage getGuiOptionsPage(); -} diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/RenderHandlerRegistry.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/RenderHandlerRegistry.java deleted file mode 100644 index acb1cdc5..00000000 --- a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/RenderHandlerRegistry.java +++ /dev/null @@ -1,10 +0,0 @@ -package pneumaticCraft.api.client.pneumaticHelmet; - -import java.util.List; - -public class RenderHandlerRegistry{ - /** - * With this field you can register your render handlers. This field is initialized in the PreInit phase of PneumaticCraft's loading phase. - */ - public static List<IUpgradeRenderHandler> renderHandlers; -} diff --git a/src/api/java/pneumaticCraft/api/drone/DroneConstructingEvent.java b/src/api/java/pneumaticCraft/api/drone/DroneConstructingEvent.java deleted file mode 100644 index 801c55a4..00000000 --- a/src/api/java/pneumaticCraft/api/drone/DroneConstructingEvent.java +++ /dev/null @@ -1,11 +0,0 @@ -package pneumaticCraft.api.drone; - -import cpw.mods.fml.common.eventhandler.Event; - -public class DroneConstructingEvent extends Event{ - public IDrone drone; - - public DroneConstructingEvent(IDrone drone){ - this.drone = drone; - } -} diff --git a/src/api/java/pneumaticCraft/api/drone/IBlockInteractHandler.java b/src/api/java/pneumaticCraft/api/drone/IBlockInteractHandler.java deleted file mode 100644 index 5e4eb245..00000000 --- a/src/api/java/pneumaticCraft/api/drone/IBlockInteractHandler.java +++ /dev/null @@ -1,26 +0,0 @@ -package pneumaticCraft.api.drone; - -/** - * DON'T IMPLEMENT, just use - */ -public interface IBlockInteractHandler{ - - /** - * Returns a boolean[6] of all sides. when true, this side is accessible - * @return - */ - public boolean[] getSides(); - - public boolean useCount(); - - public void decreaseCount(int count); - - public int getRemainingCount(); - - /** - * When invoked, the drone will abort searching the area. Could be used to abort early when full of RF energy for example, when importing RF. - * (It's useless to search any further) - */ - public void abort(); - -} diff --git a/src/api/java/pneumaticCraft/api/drone/ICustomBlockInteract.java b/src/api/java/pneumaticCraft/api/drone/ICustomBlockInteract.java deleted file mode 100644 index 2960425e..00000000 --- a/src/api/java/pneumaticCraft/api/drone/ICustomBlockInteract.java +++ /dev/null @@ -1,45 +0,0 @@ -package pneumaticCraft.api.drone; - -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.ChunkPosition; - -/** - * Implement this and register it to PneumaticRegistry.registerCustomBlockInteractor(). - * This will add a puzzle piece that has only a Area white- and blacklist parameter (similar to a GoTo piece). - * It will do the specified behaviour. This can be used to create energy import/export widgets. - */ -public interface ICustomBlockInteract{ - - /** - * Should return a unique Id, used in NBT saving and localization. - */ - public String getName(); - - /** - * Should return the puzzle piece texture. Should be a multiple of 80x64 (width x height). I'd recommend starting out with copying the Go To widget texture. - * @return - */ - public ResourceLocation getTexture(); - - /** - * The actual interaction. - * - * For every position in the selected area the drone will visit every block (ordered from closest to furthest). It will call this method with 'simulate = true'. If this method returns true, the drone will navigate to this location, and call this method again with 'simulate = false' It will keep doing this until this method returns false. - * - * When interactHandler.useCount() returns true: - * In the interface of the puzzle piece users can specify a 'use count' and fill in the maximum count they want to use. When not simulating, you should only import/export up to interactHandler.getRemainingCount(), and you should notify the removed/added count by doing interactHandler.decreaseCount(int count). - * - * @param pos current visited location - * @param drone - * @param interactHandler object you can use to use to get accessible sides and give feedback about counts. - * @param simulate will be true when trying to figure out whether or not the drone should navigate to this block, false when next to this block. - * @return - */ - public boolean doInteract(ChunkPosition pos, IDrone drone, IBlockInteractHandler interactHandler, boolean simulate); - - /** - * Used for crafting, categorizes the puzzle piece. - * @return - */ - public int getCraftingColorIndex(); -} diff --git a/src/api/java/pneumaticCraft/api/drone/IDrone.java b/src/api/java/pneumaticCraft/api/drone/IDrone.java deleted file mode 100644 index 306bc6c0..00000000 --- a/src/api/java/pneumaticCraft/api/drone/IDrone.java +++ /dev/null @@ -1,61 +0,0 @@ -package pneumaticCraft.api.drone; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.ai.EntityAITasks; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; -import net.minecraftforge.common.IExtendedEntityProperties; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.IFluidTank; -import pneumaticCraft.api.item.IPressurizable; - -public interface IDrone extends IPressurizable{ - /** - * - * @param upgradeIndex metadata value of the upgrade item - * @return amount of inserted upgrades in the drone - */ - public int getUpgrades(int upgradeIndex); - - public World getWorld(); - - public IFluidTank getTank(); - - public IInventory getInventory(); - - public Vec3 getPosition(); - - public IPathNavigator getPathNavigator(); - - public void sendWireframeToClient(int x, int y, int z); - - public EntityPlayerMP getFakePlayer(); - - public boolean isBlockValidPathfindBlock(int x, int y, int z); - - public void dropItem(ItemStack stack); - - public void setDugBlock(int x, int y, int z); - - public EntityAITasks getTargetAI(); - - public IExtendedEntityProperties getProperty(String key); - - public void setProperty(String key, IExtendedEntityProperties property); - - public void setEmittingRedstone(ForgeDirection orientation, int emittingRedstone); - - public void setName(String string); - - public void setCarryingEntity(Entity entity); - - public Entity getCarryingEntity(); - - public boolean isAIOverriden(); - - public void onItemPickupEvent(EntityItem curPickingUpEntity, int stackSize); -} diff --git a/src/api/java/pneumaticCraft/api/drone/IPathNavigator.java b/src/api/java/pneumaticCraft/api/drone/IPathNavigator.java deleted file mode 100644 index f089bae5..00000000 --- a/src/api/java/pneumaticCraft/api/drone/IPathNavigator.java +++ /dev/null @@ -1,11 +0,0 @@ -package pneumaticCraft.api.drone; - -import net.minecraft.entity.Entity; - -public interface IPathNavigator{ - public boolean moveToXYZ(double x, double y, double z); - - public boolean moveToEntity(Entity entity); - - public boolean hasNoPath(); -} diff --git a/src/api/java/pneumaticCraft/api/drone/IPathfindHandler.java b/src/api/java/pneumaticCraft/api/drone/IPathfindHandler.java deleted file mode 100644 index a5bcfabb..00000000 --- a/src/api/java/pneumaticCraft/api/drone/IPathfindHandler.java +++ /dev/null @@ -1,26 +0,0 @@ -package pneumaticCraft.api.drone; - -import net.minecraft.world.World; - -public interface IPathfindHandler{ - /** - * When returned true, the drone can pathfind through this block. When false it can't. - * @param world - * @param x - * @param y - * @param z - * @return - */ - public boolean canPathfindThrough(World world, int x, int y, int z); - - /** - * CURRENTLY NOT IMPLEMENTED! - * Will be called every tick as long as the drone is < 1 block away from the given coordinate. - * can be used to open a door for a drone for example. - * @param world - * @param x - * @param y - * @param z - */ - public void onPathingThrough(World world, int x, int y, int z); -} diff --git a/src/api/java/pneumaticCraft/api/drone/SpecialVariableRetrievalEvent.java b/src/api/java/pneumaticCraft/api/drone/SpecialVariableRetrievalEvent.java deleted file mode 100644 index 83581c81..00000000 --- a/src/api/java/pneumaticCraft/api/drone/SpecialVariableRetrievalEvent.java +++ /dev/null @@ -1,60 +0,0 @@ -package pneumaticCraft.api.drone; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.ChunkPosition; -import cpw.mods.fml.common.eventhandler.Event; - -/** - * Fired when a Drone is trying to get a special coordinate, by accessing a variable with '$' prefix. - * These event are posted on the MinecraftForge.EVENT_BUS. - */ -public abstract class SpecialVariableRetrievalEvent extends Event{ - - /** - * The special variable name, with the '$' stripped away. - */ - public final String specialVarName; - - /** - * The returning coordinate - */ - - public SpecialVariableRetrievalEvent(String specialVarName){ - - this.specialVarName = specialVarName; - } - - public static abstract class CoordinateVariable extends SpecialVariableRetrievalEvent{ - public ChunkPosition coordinate; - - public CoordinateVariable(String specialVarName){ - super(specialVarName); - } - - public static class Drone extends CoordinateVariable{ - public final IDrone drone; - - public Drone(IDrone drone, String specialVarName){ - super(specialVarName); - this.drone = drone; - } - } - } - - public static abstract class ItemVariable extends SpecialVariableRetrievalEvent{ - public ItemStack item; - - public ItemVariable(String specialVarName){ - super(specialVarName); - } - - public static class Drone extends ItemVariable{ - public final IDrone drone; - - public Drone(IDrone drone, String specialVarName){ - super(specialVarName); - this.drone = drone; - } - } - } -} diff --git a/src/api/java/pneumaticCraft/api/item/IInventoryItem.java b/src/api/java/pneumaticCraft/api/item/IInventoryItem.java deleted file mode 100644 index b153e022..00000000 --- a/src/api/java/pneumaticCraft/api/item/IInventoryItem.java +++ /dev/null @@ -1,20 +0,0 @@ -package pneumaticCraft.api.item; - -import java.util.List; - -import net.minecraft.item.ItemStack; - -/** - * Implement this interface for your items that have an inventory. When you don't have access to the item, just create any old class - * that implements this interface and register an instance of it in PneumaticRegistry. - * This will then will be used in the Pneumatic Helmet's item search. - * - */ -public interface IInventoryItem{ - - /** - * @parm stack: Item that potentially has an inventory. - * @parm curStacks: List of all currently added stacks for this item. Add more stacks in here in your implementation when found the right item. - */ - public void getStacksInItem(ItemStack stack, List<ItemStack> curStacks); -} diff --git a/src/api/java/pneumaticCraft/api/item/IPressurizable.java b/src/api/java/pneumaticCraft/api/item/IPressurizable.java deleted file mode 100644 index 027aaad1..00000000 --- a/src/api/java/pneumaticCraft/api/item/IPressurizable.java +++ /dev/null @@ -1,35 +0,0 @@ -package pneumaticCraft.api.item; - -import net.minecraft.item.ItemStack; - -/** - * Any item implementing this interface will be able to (dis)charge in a Charging Station. - */ -public interface IPressurizable{ - /** - * This method should return the current pressure of the ItemStack given. - * - * @param iStack Stack the pressure is asked from. - * @return Pressure in bar. - */ - public float getPressure(ItemStack iStack); - - /** - * this method is used to charge or discharge a pneumatic item. when the - * value is negative the item should be discharging - * - * @param iStack the ItemStack which has to be (dis)charged. - * @param amount amount in mL that the item is (dis)charging. - */ - public void addAir(ItemStack iStack, int amount); - - /** - * This method should return the maximum pressure of a pneumatic item. If it - * has reached this maximum, it won't explode, but it wouldn't (try to) - * charge either. - * - * @param iStack the stack from which the maximum pressure is asked. - * @return maximum pressure in bar. - */ - public float maxPressure(ItemStack iStack); -} diff --git a/src/api/java/pneumaticCraft/api/item/IProgrammable.java b/src/api/java/pneumaticCraft/api/item/IProgrammable.java deleted file mode 100644 index d00d94c3..00000000 --- a/src/api/java/pneumaticCraft/api/item/IProgrammable.java +++ /dev/null @@ -1,34 +0,0 @@ -package pneumaticCraft.api.item; - -import net.minecraft.item.ItemStack; - -/** - * Implement this for items that can get programmed in a Programmer. - * For now the only thing you can do with this is make program storages, later more interaction with programming puzzles is planned. - * Puzzle pieces will be written onto the implementer's itemstack NBT, using the "progWidget" tag. - */ -public interface IProgrammable{ - - /** - * When returned true, this stack is allowed to be programmed. - * Used to allow certain damage values to be programmed while others can't. - * @param stack - * @return - */ - public boolean canProgram(ItemStack stack); - - /** - * When returned true, Programming Puzzles are needed to program this item. When returned false, it's free to program. - * Drones and Network API's return true in PneumaticCraft, Network Storages return false. - * @param stack - * @return - */ - public boolean usesPieces(ItemStack stack); - - /** - * When returned true, the implementing item will get a tooltip added of the summary of puzzles used in the stored program. - * @return - */ - public boolean showProgramTooltip(); - -} diff --git a/src/api/java/pneumaticCraft/api/item/ItemSupplier.java b/src/api/java/pneumaticCraft/api/item/ItemSupplier.java deleted file mode 100644 index 93c13fb5..00000000 --- a/src/api/java/pneumaticCraft/api/item/ItemSupplier.java +++ /dev/null @@ -1,47 +0,0 @@ -package pneumaticCraft.api.item; - -import net.minecraft.item.Item; -import cpw.mods.fml.common.registry.GameRegistry; - -public class ItemSupplier{ - public static Item getItem(String itemName){ - return GameRegistry.findItem("PneumaticCraft", itemName); - } - - /* - The following is a list of all the item names that can be passed as argument in getItem(String) to get a PneumaticCraft item. - - GPSTool Currently tracked coordinated is stored in NBT, with 'x', 'y', 'z' being the tag names for the x,y and z positions respectively. - machineUpgrade damage value = upgrade type. - ingotIronCompressed - pressureGauge - stoneBase - cannonBarrel - turbineBlade - plasticPlant damage value = plant type. Mapped the same as Vanilla dye in terms of color. - plastic damage value = plastic type. Mapped the same as Vanilla dye in terms of color. - airCanister implements IPressurizable - vortexCannon implements IPressurizable - pneumaticCylinder - pneumaticHelmet implements IPressurizable - manometer implements IPressurizable - turbineRotor - assemblyProgram damage value = program type. - emptyPCB - unassembledPCB - PCBBlueprint - bucketEtchingAcid - transistor - capacitor - printedCircuitBoard - failedPCB - networkComponent damage value = network component type. - stopWorm - nukeVirus - compressedIronGear - pneumaticWrench implements IPressurizable - - - - */ -} diff --git a/src/api/java/pneumaticCraft/api/package-info.java b/src/api/java/pneumaticCraft/api/package-info.java deleted file mode 100644 index 55919456..00000000 --- a/src/api/java/pneumaticCraft/api/package-info.java +++ /dev/null @@ -1,5 +0,0 @@ -@API(apiVersion = "1.0", owner = "PneumaticCraft", provides = "PneumaticCraftApi") -package pneumaticCraft.api; - -import cpw.mods.fml.common.API; - diff --git a/src/api/java/pneumaticCraft/api/recipe/AssemblyRecipe.java b/src/api/java/pneumaticCraft/api/recipe/AssemblyRecipe.java deleted file mode 100644 index 8c74b4bb..00000000 --- a/src/api/java/pneumaticCraft/api/recipe/AssemblyRecipe.java +++ /dev/null @@ -1,49 +0,0 @@ -package pneumaticCraft.api.recipe; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public class AssemblyRecipe{ - public static List<AssemblyRecipe> drillRecipes = new ArrayList<AssemblyRecipe>(); - public static List<AssemblyRecipe> laserRecipes = new ArrayList<AssemblyRecipe>(); - public static List<AssemblyRecipe> drillLaserRecipes = new ArrayList<AssemblyRecipe>(); - - private final ItemStack input; - private final ItemStack output; - - public AssemblyRecipe(ItemStack input, ItemStack output){ - this.input = input; - this.output = output; - } - - public ItemStack getInput(){ - return input; - } - - public ItemStack getOutput(){ - return output; - } - - public static void addDrillRecipe(Object input, Object output){ - drillRecipes.add(new AssemblyRecipe(getStackFromObject(input), getStackFromObject(output))); - } - - public static void addLaserRecipe(Object input, Object output){ - laserRecipes.add(new AssemblyRecipe(getStackFromObject(input), getStackFromObject(output))); - } - - private static ItemStack getStackFromObject(Object object){ - if(object instanceof Block) { - return new ItemStack((Block)object); - } else if(object instanceof Item) { - return new ItemStack((Item)object); - } else { - return (ItemStack)object; - } - } - -} diff --git a/src/api/java/pneumaticCraft/api/recipe/IPressureChamberRecipe.java b/src/api/java/pneumaticCraft/api/recipe/IPressureChamberRecipe.java deleted file mode 100644 index 93eba67c..00000000 --- a/src/api/java/pneumaticCraft/api/recipe/IPressureChamberRecipe.java +++ /dev/null @@ -1,34 +0,0 @@ -package pneumaticCraft.api.recipe; - -import net.minecraft.item.ItemStack; - -public interface IPressureChamberRecipe{ - - /** - * Returns the threshold which is minimal to craft the recipe. Negative pressures also work. - * @return threshold pressure - */ - public float getCraftingPressure(); - - /** - * This method should return the used items in the recipe when the right items are provided to craft this recipe. - * @param inputStacks - * @return usedStacks, return null when the inputStacks aren't valid for this recipe. - */ - public ItemStack[] isValidRecipe(ItemStack[] inputStacks); - - /** - * When returned true, only the exact same references of the stacks returned by isValidRecipe() will be removed. This is useful - * to remove stacks with a certain NBT value (like Enchanted Books). Return false for normal behaviour. - * @return true if exact stacks should be removed only. - */ - public boolean shouldRemoveExactStacks(); - - /** - * This method will be called when the recipe should output its items. the stacks the recipe output, may be dependent on the input stacks. - * @param removedStacks same reference to the stacks returned by isValidRecipe. - * @param inputStacks. These stacks can be modified (like adding/removing NBT data eg.) - * @return outputStacks. Stacks that will pop 'out of the chamber' - */ - public ItemStack[] craftRecipe(ItemStack[] inputStacks, ItemStack[] removedStacks); -} diff --git a/src/api/java/pneumaticCraft/api/recipe/PressureChamberRecipe.java b/src/api/java/pneumaticCraft/api/recipe/PressureChamberRecipe.java deleted file mode 100644 index 5d6b29e5..00000000 --- a/src/api/java/pneumaticCraft/api/recipe/PressureChamberRecipe.java +++ /dev/null @@ -1,24 +0,0 @@ -package pneumaticCraft.api.recipe; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.item.ItemStack; - -public class PressureChamberRecipe{ - public static List<PressureChamberRecipe> chamberRecipes = new ArrayList<PressureChamberRecipe>(); - public static List<IPressureChamberRecipe> specialRecipes = new ArrayList<IPressureChamberRecipe>(); - - public final ItemStack[] input; - public final ItemStack[] output; - public final float pressure; - public final boolean outputAsBlock; - - public PressureChamberRecipe(ItemStack[] input, float pressureRequired, ItemStack[] output, boolean outputAsBlock){ - this.input = input; - this.output = output; - pressure = pressureRequired; - this.outputAsBlock = outputAsBlock; - } - -} diff --git a/src/api/java/pneumaticCraft/api/tileentity/AirHandlerSupplier.java b/src/api/java/pneumaticCraft/api/tileentity/AirHandlerSupplier.java deleted file mode 100644 index 1bf1be74..00000000 --- a/src/api/java/pneumaticCraft/api/tileentity/AirHandlerSupplier.java +++ /dev/null @@ -1,51 +0,0 @@ -package pneumaticCraft.api.tileentity; - -import java.lang.reflect.Constructor; - -public class AirHandlerSupplier{ - private static Constructor airHandlerConstructor; - - public static IAirHandler getTierOneAirHandler(int volume){ - return getAirHandler(5F, 7F, volume); - } - - public static IAirHandler getTierTwoAirHandler(int volume){ - return getAirHandler(20F, 25F, volume); - } - - /** - * Returns a new instance of an IAirHandler. This handler handles everything pressurized air related: Air dispersion, - * blowing up when the pressure gets too high, providing a method for releasing air into the atmosphere... - * PROVIDED THAT THE FOLLOWING METHODS ARE FORWARDED TO THIS INSTANCE: - * {@link net.minecraft.tileentity.TileEntity#updateEntity()}, - * {@link net.minecraft.tileentity.TileEntity#writeToNBT(net.minecraft.nbt.NBTTagCompound)} - * {@link net.minecraft.tileentity.TileEntity#readFromNBT(net.minecraft.nbt.NBTTagCompound)} - * {@link net.minecraft.tileentity.TileEntity#validate()} - * @param dangerPressure minimal pressure on which this machine can explode (the yellow to red transition) - * @param criticalPressure the absolute maximum pressure the machine can take 7 bar in tier 1 machines. - * @param maxFlow maximum mL/tick that this machine can disperse. Tier one machines do 50mL/tick while Tier two have 200mL/tick. - * @param volume Volume of the machine's internal storage. These vary from 1000mL for small machines to 10,000mL for the big ones. - * The higher the volume the slower the machine will charge/discharge. - * @return - */ - public static IAirHandler getAirHandler(float dangerPressure, float criticalPressure, int volume){ - IAirHandler airHandler = null; - try { - if(airHandlerConstructor == null) airHandlerConstructor = Class.forName("pneumaticCraft.common.tileentity.TileEntityPneumaticBase").getConstructor(float.class, float.class, int.class); - airHandler = (IAirHandler)airHandlerConstructor.newInstance(dangerPressure, criticalPressure, volume); - } catch(Exception e) { - System.err.println("[PneumaticCraft API] An error has occured whilst trying to get an AirHandler. Here's a stacktrace:"); - e.printStackTrace(); - } - return airHandler; - } - - /** - * Use the version with integer parameters - */ - @Deprecated - public static IAirHandler getAirHandler(float dangerPressure, float criticalPressure, float maxFlow, float volume){ - return getAirHandler(dangerPressure, criticalPressure, (int)volume); - } - -} diff --git a/src/api/java/pneumaticCraft/api/tileentity/IAirHandler.java b/src/api/java/pneumaticCraft/api/tileentity/IAirHandler.java deleted file mode 100644 index 72929e90..00000000 --- a/src/api/java/pneumaticCraft/api/tileentity/IAirHandler.java +++ /dev/null @@ -1,114 +0,0 @@ -package pneumaticCraft.api.tileentity; - -import java.util.List; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; - -import org.apache.commons.lang3.tuple.Pair; - -/** - * A way for you to access about everything you need from a pneumatic machine. - * DO NOT IMPLEMENT THIS YOURSELF! Use AirHandlerSupplier to get an instance for your TileEntity, and implement IPneumaticMachine instead. - */ - -public interface IAirHandler extends IManoMeasurable{ - - /** - * -----------Needs to be forwarded by the implementing TileEntity's updateEntity() method. - * Updates the pneumatic machine's logic like air dispersion and checking if it needs to explode. - */ - public void updateEntityI(); - - /** - * -----------Needs to be forwarded by the implementing TileEntity. - * @param nbt - */ - public void readFromNBTI(NBTTagCompound nbt); - - /** - * -----------Needs to be forwarded by the implementing TileEntity. - * @param nbt - */ - public void writeToNBTI(NBTTagCompound nbt); - - /** - * -----------Needs to be forwarded by the implementing TileEntity with itself as parameter. - * @param parent TileEntity that is referencing this air handler. - */ - public void validateI(TileEntity parent); - - /** - * Method to release air in the air. It takes air from a specific side, plays a sound effect, and spawns smoke particles. - * It automatically detects if it needs to release air (when under pressure), suck air (when in vacuum) or do nothing. - * @param side - */ - public void airLeak(ForgeDirection side); - - /** - * Returns a list of all the connecting pneumatics. It takes sides in account. - */ - public List<Pair<ForgeDirection, IPneumaticMachine>> getConnectedPneumatics(); - - /** - * Adds air to the tank of the given side of this TE. It also updates clients where needed (when they have a GUI opened). - * Deprecated: use the version with the integer parameter now. - * @param amount - * @param side - */ - @Deprecated - public void addAir(float amount, ForgeDirection side); - - public void addAir(int amount, ForgeDirection side); - - /** - * Sets the volume of this TE's air tank. When the volume decreases the pressure will remain the same, meaning air will - * be lost. When the volume increases, the air remains the same, meaning the pressure will drop. - * Used in the Volume Upgrade calculations. - * Deprecated: use the version with the integer parameter now. - * @param newVolume - */ - @Deprecated - public void setVolume(float newVolume); - - public void setVolume(int newVolume); - - public int getVolume(); - - /** - * Returns the pressure at which this TE will explode. - * @return - */ - public float getMaxPressure(); - - public float getPressure(ForgeDirection sideRequested); - - /** - * Returns the amount of air (that has a relation to the pressure: air = pressure * volume) - * @param sideRequested - * @return - */ - public int getCurrentAir(ForgeDirection sideRequested); - - /** - * When your TileEntity is implementing IInventory and has slots that accept PneumaticCraft upgrades, register these slots - * to the air handler by calling this method once on initialization of the TileEntity. Then they'll automatically be used to get Volume/Security upgrades. - * @param upgradeSlots all upgrade slots stored in an array. - */ - public void setUpgradeSlots(int... upgradeSlots); - - public int[] getUpgradeSlots(); - - public int getXCoord(); - - public int getYCoord(); - - public int getZCoord(); - - /** - * Needs to be forwarded from the implementing _Block_! Forward the Block's "onNeighborChange" method to this handler. - */ - public void onNeighborChange(); - -} diff --git a/src/api/java/pneumaticCraft/api/tileentity/IHeatExchanger.java b/src/api/java/pneumaticCraft/api/tileentity/IHeatExchanger.java deleted file mode 100644 index 60df395c..00000000 --- a/src/api/java/pneumaticCraft/api/tileentity/IHeatExchanger.java +++ /dev/null @@ -1,24 +0,0 @@ -package pneumaticCraft.api.tileentity; - -import net.minecraftforge.common.util.ForgeDirection; -import pneumaticCraft.api.IHeatExchangerLogic; - -/** - * Implemented by TileEntities or Blocks which transport heat. Keep in mind that when a Block is implementing it you only can give off a constant - * resistance/temperature (like Lava and Ice). - * @author MineMaarten - * www.minemaarten.com - */ -public interface IHeatExchanger{ - - /** - * Get an instance of IHeatExchangerLogic from PneumaticRegistry.getInstance().getHeatExchangerLogic() and keep a global reference. - * Then return it in this method. You can return different exchanger logics for different sides. Keep in mind that when you change - * a returned logic, you need to create a neighbor block change to notify the differences. You can return null to indicate no heat can - * be exchanged on that side. - * @param side - * @return - */ - public IHeatExchangerLogic getHeatExchangerLogic(ForgeDirection side); - -} diff --git a/src/api/java/pneumaticCraft/api/tileentity/IManoMeasurable.java b/src/api/java/pneumaticCraft/api/tileentity/IManoMeasurable.java deleted file mode 100644 index c5178abe..00000000 --- a/src/api/java/pneumaticCraft/api/tileentity/IManoMeasurable.java +++ /dev/null @@ -1,14 +0,0 @@ -package pneumaticCraft.api.tileentity; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; - -public interface IManoMeasurable{ - /** - * This method is invoked by the Manometer when a player right-clicks a TE or Entity with this interface implemented. - * @param player that rightclicks the measurable TE, and therefore needs to get the message - * @param curInfo list you can append info to. If you don't append any info no air will be used. - */ - public void printManometerMessage(EntityPlayer player, List<String> curInfo); -} diff --git a/src/api/java/pneumaticCraft/api/tileentity/IPneumaticMachine.java b/src/api/java/pneumaticCraft/api/tileentity/IPneumaticMachine.java deleted file mode 100644 index 0e283115..00000000 --- a/src/api/java/pneumaticCraft/api/tileentity/IPneumaticMachine.java +++ /dev/null @@ -1,30 +0,0 @@ -package pneumaticCraft.api.tileentity; - -import net.minecraftforge.common.util.ForgeDirection; - -public interface IPneumaticMachine{ - - /** - * In your TileEntity class which is implementing this interface you should keep a reference of an IAirHandler. - * You can retrieve one by calling {@link AirHandlerSupplier#getAirHandler(net.minecraft.tileentity.TileEntity, float, float, float, float)}. - * Do this when your TileEntity is initialized, i.e. xCoord,yCoord,zCoord and worldObj have a value. - * In this method you need to return this reference. - * - * IMPORTANT: You need to forward the {@link net.minecraft.tileentity.TileEntity#updateEntity()}, - * {@link net.minecraft.tileentity.TileEntity#writeToNBT(net.minecraft.nbt.NBTTagCompound)} , - * {@link net.minecraft.tileentity.TileEntity#readFromNBT(net.minecraft.nbt.NBTTagCompound)} and - * {@link net.minecraft.tileentity.TileEntity#validate()} (with the implementing TileEntity as additional parameter) - * to the IAirHandler. - * Apart from that you'll need to forward {@link net.minecraft.block.Block#onNeighborChange(net.minecraft.world.IBlockAccess, int, int, int, int, int, int)} - * from the implementing block to the IAirHandler. - * @return - */ - public IAirHandler getAirHandler(); - - /** - * Returns true if the pneumatic logic is connected to the given side. - * @param side - * @return - */ - public boolean isConnectedTo(ForgeDirection side); -} diff --git a/src/api/java/pneumaticCraft/api/universalSensor/EntityPollSensor.java b/src/api/java/pneumaticCraft/api/universalSensor/EntityPollSensor.java deleted file mode 100644 index 0419911f..00000000 --- a/src/api/java/pneumaticCraft/api/universalSensor/EntityPollSensor.java +++ /dev/null @@ -1,31 +0,0 @@ -package pneumaticCraft.api.universalSensor; - -import java.util.List; - -import net.minecraft.entity.Entity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.world.World; - -public abstract class EntityPollSensor implements IPollSensorSetting{ - - @Override - public String getSensorPath(){ - return "entityTracker"; - } - - @Override - public int getPollFrequency(){ - return 1; - } - - @Override - public int getRedstoneValue(World world, int x, int y, int z, int sensorRange, String textBoxText){ - AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(x - sensorRange, y - sensorRange, z - sensorRange, x + 1 + sensorRange, y + 1 + sensorRange, z + 1 + sensorRange); - return getRedstoneValue(world.getEntitiesWithinAABB(getEntityTracked(), aabb), textBoxText); - } - - public abstract Class getEntityTracked(); - - public abstract int getRedstoneValue(List<Entity> entities, String textBoxText); - -} diff --git a/src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinateEventSensor.java b/src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinateEventSensor.java deleted file mode 100644 index 2f225c5a..00000000 --- a/src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinateEventSensor.java +++ /dev/null @@ -1,59 +0,0 @@ -package pneumaticCraft.api.universalSensor; - -import java.util.List; - -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.tileentity.TileEntity; - -import org.lwjgl.util.Rectangle; - -import cpw.mods.fml.common.eventhandler.Event; - -public interface IBlockAndCoordinateEventSensor{ - /** - * See {@link ISensorSetting#getSensorPath()} - * @return - */ - public String getSensorPath(); - - /** - * Extended version of the normal emitRedstoneOnEvent. This method will only invoke with a valid GPS tool, and when the coordinate is within range. - * @param event - * @param sensor - * @param range - * @param toolX - * @param toolY - * @param toolZ - * @return - */ - public int emitRedstoneOnEvent(Event event, TileEntity sensor, int range, int toolX, int toolY, int toolZ); - - /** - * See {@link IEventSensorSetting#getRedstonePulseLength()} - * @return - */ - public int getRedstonePulseLength(); - - /** - * See {@link ISensorSetting#needsTextBox()} - * @return - */ - public boolean needsTextBox(); - - /** - * See {@link ISensorSetting#needsSlot()} - */ - public Rectangle needsSlot(); - - /** - * See {@link ISensorSetting#getDescription()} - * @return - */ - public List<String> getDescription(); - - /** - * Called by GuiScreen#drawScreen this method can be used to render additional things like status/info text. - * @param fontRenderer - */ - public void drawAdditionalInfo(FontRenderer fontRenderer); -} diff --git a/src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinatePollSensor.java b/src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinatePollSensor.java deleted file mode 100644 index e7bc329e..00000000 --- a/src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinatePollSensor.java +++ /dev/null @@ -1,63 +0,0 @@ -package pneumaticCraft.api.universalSensor; - -import java.util.List; - -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.world.World; - -import org.lwjgl.util.Rectangle; - -public interface IBlockAndCoordinatePollSensor{ - /** - * See {@link ISensorSetting#getSensorPath()} - * @return - */ - public String getSensorPath(); - - /** - * See {@link ISensorSetting#needsTextBox()} - * @return - */ - public boolean needsTextBox(); - - /** - * See {@link ISensorSetting#needsSlot()} - * @return - */ - public Rectangle needsSlot(); - - /** - * See {@link ISensorSetting#getDescription()} - * @return - */ - public List<String> getDescription(); - - /** - * See {@link IPollSensorSetting#getRedstoneValue(World, int, int, int, int, String)} , but this has the GPS tracked coordinates - * as extra parameters. This method will only be called when the coordinate is within the Universal Sensor's range. - * @param world - * @param x - * @param y - * @param z - * @param sensorRange - * @param textBoxText - * @param toolX - * @param toolY - * @param toolZ - * @return - */ - public int getRedstoneValue(World world, int x, int y, int z, int sensorRange, String textBoxText, int toolX, int toolY, int toolZ); - - /** - * See {@link IPollSensorSetting#getPollFrequency()} - * @return - */ - public int getPollFrequency(); - - /** - * Called by GuiScreen#drawScreen this method can be used to render additional things like status/info text. - * @param fontRenderer - */ - public void drawAdditionalInfo(FontRenderer fontRenderer); - -} diff --git a/src/api/java/pneumaticCraft/api/universalSensor/IEventSensorSetting.java b/src/api/java/pneumaticCraft/api/universalSensor/IEventSensorSetting.java deleted file mode 100644 index bce3017a..00000000 --- a/src/api/java/pneumaticCraft/api/universalSensor/IEventSensorSetting.java +++ /dev/null @@ -1,23 +0,0 @@ -package pneumaticCraft.api.universalSensor; - -import net.minecraft.tileentity.TileEntity; -import cpw.mods.fml.common.eventhandler.Event; - -public interface IEventSensorSetting extends ISensorSetting{ - - /** - * This method is only invoked when a subscribed event is triggered. - * @param event - * @param sensor - * @param range - * @param textboxText - * @return Redstone strength for the given event. - */ - public int emitRedstoneOnEvent(Event event, TileEntity sensor, int range, String textboxText); - - /** - * Should return how long a pulse should hold in ticks. By default this is 5 ticks (1/4 second). - * @return - */ - public int getRedstonePulseLength(); -} diff --git a/src/api/java/pneumaticCraft/api/universalSensor/IPollSensorSetting.java b/src/api/java/pneumaticCraft/api/universalSensor/IPollSensorSetting.java deleted file mode 100644 index 50cf8305..00000000 --- a/src/api/java/pneumaticCraft/api/universalSensor/IPollSensorSetting.java +++ /dev/null @@ -1,27 +0,0 @@ -package pneumaticCraft.api.universalSensor; - -import net.minecraft.world.World; - -public interface IPollSensorSetting extends ISensorSetting{ - - /** - * The value returned here is the interval between every check in ticks (the interval of calling getRedstoneValue()). - * Consider increasing the interval when your sensor method is resource intensive. - * @return - */ - public int getPollFrequency(); - - /** - * The base method. This method should return the outputted redstone value 0-15 of this sensor. When this sensor is - * digital, just return 0 or 15. - * @param world - * @param x - * @param y - * @param z - * @param sensorRange Range of the sensor, based on the amount of Range Upgrades inserted in the Universal Sensor. - * @param textBoxText The text typed in the textbox of the Universal Sensor. - * @return - */ - public int getRedstoneValue(World world, int x, int y, int z, int sensorRange, String textBoxText); - -} diff --git a/src/api/java/pneumaticCraft/api/universalSensor/ISensorSetting.java b/src/api/java/pneumaticCraft/api/universalSensor/ISensorSetting.java deleted file mode 100644 index bfbf3468..00000000 --- a/src/api/java/pneumaticCraft/api/universalSensor/ISensorSetting.java +++ /dev/null @@ -1,59 +0,0 @@ -package pneumaticCraft.api.universalSensor; - -import java.util.List; - -import net.minecraft.client.gui.FontRenderer; - -import org.lwjgl.util.Rectangle; - -public interface ISensorSetting{ - /** - * Should return the button path the player has to follow in which this setting is stored. - * For instance, when the sensor should be located in player and is called speed, you should return "entityTracker/player/speed". - * "entityTracker" indicates that this sensor needs an Entity Tracker upgrade to run. You can choose from the following upgrades: - * - * -entityTracker - * -blockTracker - * -gpsTool (so you can use a certain coordinate (within range) to measure on) - * -volume - * -dispenser - * -speed - * -itemLife - * -itemSearch - * -coordinateTracker - * -range - * -security - * - * You can allow only sensors to work by more than one upgrade, by seperating the upgrades with a '_'. For example, - * "entityTracker_speed" will only let the sensor be chosen when both an Entity Tracker and a Speed Upgrade are inserted. - * @return - */ - public String getSensorPath(); - - /** - * When returned true, the GUI will enable the textbox writing, otherwise not. - * @return - */ - public boolean needsTextBox(); - - /** - * Called by GuiScreen#drawScreen this method can be used to render additional things like status/info text. - * @param fontRenderer - */ - public void drawAdditionalInfo(FontRenderer fontRenderer); - - /** - * Should return the description of this sensor displayed in the GUI stat. Information should at least include - * when this sensor emits redstone and how (analog (1 through 15), or digital). - * @return - */ - public List<String> getDescription(); - - /** - * Not being used at the moment, I recommend returning null for now. It is going to be used to allow sensors to decide their - * status on a item which can be inserted in a slot in the GUI if this method returns a rectangle with the coordinates of - * the slot. - * @return - */ - public Rectangle needsSlot(); -} diff --git a/src/api/java/pneumaticCraft/api/universalSensor/PlayerEventSensor.java b/src/api/java/pneumaticCraft/api/universalSensor/PlayerEventSensor.java deleted file mode 100644 index 19bda915..00000000 --- a/src/api/java/pneumaticCraft/api/universalSensor/PlayerEventSensor.java +++ /dev/null @@ -1,33 +0,0 @@ -package pneumaticCraft.api.universalSensor; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.event.entity.player.PlayerEvent; -import cpw.mods.fml.common.eventhandler.Event; - -public abstract class PlayerEventSensor implements IEventSensorSetting{ - - @Override - public String getSensorPath(){ - return "entityTracker/Player"; - } - - @Override - public int emitRedstoneOnEvent(Event event, TileEntity sensor, int range, String textboxText){ - if(event instanceof PlayerEvent) { - EntityPlayer player = ((PlayerEvent)event).entityPlayer; - if(Math.abs(player.posX - sensor.xCoord + 0.5D) < range + 0.5D && Math.abs(player.posY - sensor.yCoord + 0.5D) < range + 0.5D && Math.abs(player.posZ - sensor.zCoord + 0.5D) < range + 0.5D) { - return emitRedstoneOnEvent((PlayerEvent)event, sensor, range); - } - } - return 0; - } - - public abstract int emitRedstoneOnEvent(PlayerEvent event, TileEntity sensor, int range); - - @Override - public int getRedstonePulseLength(){ - return 5; - } - -} diff --git a/src/api/java/pneumaticCraft/api/universalSensor/SensorRegistrator.java b/src/api/java/pneumaticCraft/api/universalSensor/SensorRegistrator.java deleted file mode 100644 index f76c0732..00000000 --- a/src/api/java/pneumaticCraft/api/universalSensor/SensorRegistrator.java +++ /dev/null @@ -1,33 +0,0 @@ -package pneumaticCraft.api.universalSensor; - -/** - * With this class you can register your own sensors. - */ -public class SensorRegistrator{ - /** - * This field will be initialized in the PreInit phase of PneumaticCraft's loading phase. - * With this field you can register every Universal Sensor sensor you want. Just pass a new instance - * to one of the registerSensor methods. Sensors are singletons. - */ - public static ISensorRegistrator sensorRegistrator; - - public static interface ISensorRegistrator{ - /** - * Registry for IPollSensorSetting, EntityPollSensor and IEventSensorSetting, and any other instance of ISensorSetting. - * @param sensor - */ - public void registerSensor(ISensorSetting sensor); - - /** - * Registry for IBlockAndCoordinateEventSensor - * @param sensor - */ - public void registerSensor(IBlockAndCoordinateEventSensor sensor); - - /** - * Registry for IBlockAndCoordinatePollSensor - * @param sensor - */ - public void registerSensor(IBlockAndCoordinatePollSensor sensor); - } -} diff --git a/src/api/java/thaumcraft/api/IGoggles.java b/src/api/java/thaumcraft/api/IGoggles.java deleted file mode 100644 index 2f53d816..00000000 --- a/src/api/java/thaumcraft/api/IGoggles.java +++ /dev/null @@ -1,22 +0,0 @@ -package thaumcraft.api; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; - -/** - * - * @author Azanor - * - * Equipped head slot items that extend this class will be able to perform most functions that - * goggles of revealing can apart from view nodes which is handled by IRevealer. - * - */ - -public interface IGoggles { - - /* - * If this method returns true things like block essentia contents will be shown. - */ - public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player); - -} diff --git a/src/api/java/thaumcraft/api/IRepairable.java b/src/api/java/thaumcraft/api/IRepairable.java deleted file mode 100644 index 48c6dff9..00000000 --- a/src/api/java/thaumcraft/api/IRepairable.java +++ /dev/null @@ -1,13 +0,0 @@ -package thaumcraft.api; - - - -/** - * @author Azanor - * Items, armor and tools with this interface can receive the Repair enchantment. - * Repairs 1 point of durability every 10 seconds (2 for repair II) - */ -public interface IRepairable { - - -} diff --git a/src/api/java/thaumcraft/api/IRepairableExtended.java b/src/api/java/thaumcraft/api/IRepairableExtended.java deleted file mode 100644 index 33827124..00000000 --- a/src/api/java/thaumcraft/api/IRepairableExtended.java +++ /dev/null @@ -1,17 +0,0 @@ -package thaumcraft.api; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - - - -/** - * @author Azanor - * Items, armor and tools with this interface can receive the Repair enchantment. - * Repairs 1 point of durability every 10 seconds (2 for repair II) - */ -public interface IRepairableExtended extends IRepairable { - - public boolean doRepair(ItemStack stack, EntityPlayer player, int enchantlevel); - -} diff --git a/src/api/java/thaumcraft/api/IRunicArmor.java b/src/api/java/thaumcraft/api/IRunicArmor.java deleted file mode 100644 index 5dd31100..00000000 --- a/src/api/java/thaumcraft/api/IRunicArmor.java +++ /dev/null @@ -1,22 +0,0 @@ -package thaumcraft.api; - -import net.minecraft.item.ItemStack; - -/** - * - * @author Azanor - * - * Armor or bauble slot items that implement this interface can provide runic shielding. - * Recharging, hardening, etc. is handled internally by thaumcraft. - * - */ - -public interface IRunicArmor { - - /** - * returns how much charge this item can provide. This is the base shielding value - any hardening is stored and calculated internally. - */ - public int getRunicCharge(ItemStack itemstack); - - -} diff --git a/src/api/java/thaumcraft/api/IScribeTools.java b/src/api/java/thaumcraft/api/IScribeTools.java deleted file mode 100644 index 8800fa57..00000000 --- a/src/api/java/thaumcraft/api/IScribeTools.java +++ /dev/null @@ -1,14 +0,0 @@ -package thaumcraft.api; - - -/** - * - * @author Azanor - * - * Interface used to identify scribing tool items used in research table - * - */ - -public interface IScribeTools { - -} diff --git a/src/api/java/thaumcraft/api/IVisDiscountGear.java b/src/api/java/thaumcraft/api/IVisDiscountGear.java deleted file mode 100644 index 3793ea3e..00000000 --- a/src/api/java/thaumcraft/api/IVisDiscountGear.java +++ /dev/null @@ -1,20 +0,0 @@ -package thaumcraft.api; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import thaumcraft.api.aspects.Aspect; - - - - -/** - * @author Azanor - * ItemArmor with this interface will grant a discount to the vis cost of actions the wearer performs with casting wands. - * The amount returned is the percentage by which the cost is discounted. There is a built-int max discount of 50%, but - * individual items really shouldn't have a discount more than 5% - */ -public interface IVisDiscountGear { - - int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect); - -} diff --git a/src/api/java/thaumcraft/api/ItemApi.java b/src/api/java/thaumcraft/api/ItemApi.java deleted file mode 100644 index 25dda282..00000000 --- a/src/api/java/thaumcraft/api/ItemApi.java +++ /dev/null @@ -1,70 +0,0 @@ -package thaumcraft.api; - -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import cpw.mods.fml.common.FMLLog; - -/** - * @author Azanor - * - * This is used to gain access to the items in my mod. - * I only give some examples and it will probably still - * require a bit of work for you to get hold of everything you need. - * - */ -public class ItemApi { - - public static ItemStack getItem(String itemString, int meta) { - ItemStack item = null; - - try { - String itemClass = "thaumcraft.common.config.ConfigItems"; - Object obj = Class.forName(itemClass).getField(itemString).get(null); - if (obj instanceof Item) { - item = new ItemStack((Item) obj,1,meta); - } else if (obj instanceof ItemStack) { - item = (ItemStack) obj; - } - } catch (Exception ex) { - FMLLog.warning("[Thaumcraft] Could not retrieve item identified by: " + itemString); - } - - return item; - } - - public static ItemStack getBlock(String itemString, int meta) { - ItemStack item = null; - - try { - String itemClass = "thaumcraft.common.config.ConfigBlocks"; - Object obj = Class.forName(itemClass).getField(itemString).get(null); - if (obj instanceof Block) { - item = new ItemStack((Block) obj,1,meta); - } else if (obj instanceof ItemStack) { - item = (ItemStack) obj; - } - } catch (Exception ex) { - FMLLog.warning("[Thaumcraft] Could not retrieve block identified by: " + itemString); - } - - return item; - } - - /** - * - * Some examples - * - * Casting Wands: - * itemWandCasting - * - * Resources: - * itemEssence, itemWispEssence, itemResource, itemShard, itemNugget, - * itemNuggetChicken, itemNuggetBeef, itemNuggetPork, itemTripleMeatTreat - * - * Research: - * itemResearchNotes, itemInkwell, itemThaumonomicon - * - */ - -} diff --git a/src/api/java/thaumcraft/api/ItemRunic.java b/src/api/java/thaumcraft/api/ItemRunic.java deleted file mode 100644 index 80251f59..00000000 --- a/src/api/java/thaumcraft/api/ItemRunic.java +++ /dev/null @@ -1,21 +0,0 @@ -package thaumcraft.api; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public class ItemRunic extends Item implements IRunicArmor { - - int charge; - - public ItemRunic (int charge) - { - super(); - this.charge = charge; - } - - @Override - public int getRunicCharge(ItemStack itemstack) { - return charge; - } - -} diff --git a/src/api/java/thaumcraft/api/ThaumcraftApi.java b/src/api/java/thaumcraft/api/ThaumcraftApi.java deleted file mode 100644 index 0b135d31..00000000 --- a/src/api/java/thaumcraft/api/ThaumcraftApi.java +++ /dev/null @@ -1,507 +0,0 @@ -package thaumcraft.api; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.concurrent.ConcurrentHashMap; - -import net.minecraft.block.Block; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.Item.ToolMaterial; -import net.minecraft.item.ItemArmor.ArmorMaterial; -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.EnumHelper; -import net.minecraftforge.oredict.OreDictionary; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.aspects.AspectList; -import thaumcraft.api.crafting.CrucibleRecipe; -import thaumcraft.api.crafting.InfusionEnchantmentRecipe; -import thaumcraft.api.crafting.InfusionRecipe; -import thaumcraft.api.crafting.ShapedArcaneRecipe; -import thaumcraft.api.crafting.ShapelessArcaneRecipe; -import thaumcraft.api.research.IScanEventHandler; -import thaumcraft.api.research.ResearchCategories; -import thaumcraft.api.research.ResearchCategoryList; -import thaumcraft.api.research.ResearchItem; -import thaumcraft.api.research.ResearchPage; - - -/** - * @author Azanor - * - * - * IMPORTANT: If you are adding your own aspects to items it is a good idea to do it AFTER Thaumcraft adds its aspects, otherwise odd things may happen. - * - */ -public class ThaumcraftApi { - - //Materials - public static ToolMaterial toolMatThaumium = EnumHelper.addToolMaterial("THAUMIUM", 3, 400, 7F, 2, 22); - public static ToolMaterial toolMatElemental = EnumHelper.addToolMaterial("THAUMIUM_ELEMENTAL", 3, 1500, 10F, 3, 18); - public static ArmorMaterial armorMatThaumium = EnumHelper.addArmorMaterial("THAUMIUM", 25, new int[] { 2, 6, 5, 2 }, 25); - public static ArmorMaterial armorMatSpecial = EnumHelper.addArmorMaterial("SPECIAL", 25, new int[] { 1, 3, 2, 1 }, 25); - - //Enchantment references - public static int enchantFrugal; - public static int enchantPotency; - public static int enchantWandFortune; - public static int enchantHaste; - public static int enchantRepair; - - //Miscellaneous - /** - * Portable Hole Block-id Blacklist. - * Simply add the block-id's of blocks you don't want the portable hole to go through. - */ - public static ArrayList<Block> portableHoleBlackList = new ArrayList<Block>(); - - - //RESEARCH///////////////////////////////////////// - public static ArrayList<IScanEventHandler> scanEventhandlers = new ArrayList<IScanEventHandler>(); - public static ArrayList<EntityTags> scanEntities = new ArrayList<EntityTags>(); - public static class EntityTagsNBT { - public EntityTagsNBT(String name, Object value) { - this.name = name; - this.value = value; - } - public String name; - public Object value; - } - public static class EntityTags { - public EntityTags(String entityName, AspectList aspects, EntityTagsNBT... nbts) { - this.entityName = entityName; - this.nbts = nbts; - this.aspects = aspects; - } - public String entityName; - public EntityTagsNBT[] nbts; - public AspectList aspects; - } - - /** - * not really working atm, so ignore it for now - * @param scanEventHandler - */ - public static void registerScanEventhandler(IScanEventHandler scanEventHandler) { - scanEventhandlers.add(scanEventHandler); - } - - /** - * This is used to add aspects to entities which you can then scan using a thaumometer. - * Also used to calculate vis drops from mobs. - * @param entityName - * @param aspects - * @param nbt you can specify certain nbt keys and their values - * to differentiate between mobs. <br>For example the normal and wither skeleton: - * <br>ThaumcraftApi.registerEntityTag("Skeleton", (new AspectList()).add(Aspect.DEATH, 5)); - * <br>ThaumcraftApi.registerEntityTag("Skeleton", (new AspectList()).add(Aspect.DEATH, 8), new NBTTagByte("SkeletonType",(byte) 1)); - */ - public static void registerEntityTag(String entityName, AspectList aspects, EntityTagsNBT... nbt ) { - scanEntities.add(new EntityTags(entityName,aspects,nbt)); - } - - //RECIPES///////////////////////////////////////// - private static ArrayList craftingRecipes = new ArrayList(); - private static HashMap<Object,ItemStack> smeltingBonus = new HashMap<Object,ItemStack>(); - - /** - * This method is used to determine what bonus items are generated when the infernal furnace smelts items - * @param in The input of the smelting operation. e.g. new ItemStack(Block.oreGold) - * @param out The bonus item that can be produced from the smelting operation e.g. new ItemStack(nuggetGold,0,0). - * Stacksize should be 0 unless you want to guarantee that at least 1 item is always produced. - */ - public static void addSmeltingBonus(ItemStack in, ItemStack out) { - smeltingBonus.put( - Arrays.asList(in.getItem(),in.getItemDamage()), - new ItemStack(out.getItem(),0,out.getItemDamage())); - } - - /** - * This method is used to determine what bonus items are generated when the infernal furnace smelts items - * @param in The ore dictionary input of the smelting operation. e.g. "oreGold" - * @param out The bonus item that can be produced from the smelting operation e.g. new ItemStack(nuggetGold,0,0). - * Stacksize should be 0 unless you want to guarantee that at least 1 item is always produced. - */ - public static void addSmeltingBonus(String in, ItemStack out) { - smeltingBonus.put( in, new ItemStack(out.getItem(),0,out.getItemDamage())); - } - - /** - * Returns the bonus item produced from a smelting operation in the infernal furnace - * @param in The input of the smelting operation. e.g. new ItemStack(oreGold) - * @return the The bonus item that can be produced - */ - public static ItemStack getSmeltingBonus(ItemStack in) { - ItemStack out = smeltingBonus.get(Arrays.asList(in.getItem(),in.getItemDamage())); - if (out==null) { - out = smeltingBonus.get(Arrays.asList(in.getItem(),OreDictionary.WILDCARD_VALUE)); - } - if (out==null) { - String od = OreDictionary.getOreName( OreDictionary.getOreID(in)); - out = smeltingBonus.get(od); - } - return out; - } - - public static List getCraftingRecipes() { - return craftingRecipes; - } - - /** - * @param research the research key required for this recipe to work. Leave blank if it will work without research - * @param result the recipe output - * @param aspects the vis cost per aspect. - * @param recipe The recipe. Format is exactly the same as vanilla recipes. Input itemstacks are NBT sensitive. - */ - public static ShapedArcaneRecipe addArcaneCraftingRecipe(String research, ItemStack result, AspectList aspects, Object ... recipe) - { - ShapedArcaneRecipe r= new ShapedArcaneRecipe(research, result, aspects, recipe); - craftingRecipes.add(r); - return r; - } - - /** - * @param research the research key required for this recipe to work. Leave blank if it will work without research - * @param result the recipe output - * @param aspects the vis cost per aspect - * @param recipe The recipe. Format is exactly the same as vanilla shapeless recipes. Input itemstacks are NBT sensitive. - */ - public static ShapelessArcaneRecipe addShapelessArcaneCraftingRecipe(String research, ItemStack result, AspectList aspects, Object ... recipe) - { - ShapelessArcaneRecipe r = new ShapelessArcaneRecipe(research, result, aspects, recipe); - craftingRecipes.add(r); - return r; - } - - /** - * @param research the research key required for this recipe to work. Leave blank if it will work without research - * @param result the recipe output. It can either be an itemstack or an nbt compound tag that will be added to the central item - * @param instability a number that represents the N in 1000 chance for the infusion altar to spawn an - * instability effect each second while the crafting is in progress - * @param aspects the essentia cost per aspect. - * @param aspects input the central item to be infused - * @param recipe An array of items required to craft this. Input itemstacks are NBT sensitive. - * Infusion crafting components are automatically "fuzzy" and the oredict will be checked for possible matches. - * - */ - public static InfusionRecipe addInfusionCraftingRecipe(String research, Object result, int instability, AspectList aspects, ItemStack input,ItemStack[] recipe) - { - if (!(result instanceof ItemStack || result instanceof Object[])) return null; - InfusionRecipe r= new InfusionRecipe(research, result, instability, aspects, input, recipe); - craftingRecipes.add(r); - return r; - } - - /** - * @param research the research key required for this recipe to work. Leave blank if it will work without research - * @param enchantment the enchantment that will be applied to the item - * @param instability a number that represents the N in 1000 chance for the infusion altar to spawn an - * instability effect each second while the crafting is in progress - * @param aspects the essentia cost per aspect. - * @param recipe An array of items required to craft this. Input itemstacks are NBT sensitive. - * Infusion crafting components are automatically "fuzzy" and the oredict will be checked for possible matches. - * - */ - public static InfusionEnchantmentRecipe addInfusionEnchantmentRecipe(String research, Enchantment enchantment, int instability, AspectList aspects, ItemStack[] recipe) - { - InfusionEnchantmentRecipe r= new InfusionEnchantmentRecipe(research, enchantment, instability, aspects, recipe); - craftingRecipes.add(r); - return r; - } - - /** - * @param stack the recipe result - * @return the recipe - */ - public static InfusionRecipe getInfusionRecipe(ItemStack res) { - for (Object r:getCraftingRecipes()) { - if (r instanceof InfusionRecipe) { - if (((InfusionRecipe)r).getRecipeOutput() instanceof ItemStack) { - if (((ItemStack) ((InfusionRecipe)r).getRecipeOutput()).isItemEqual(res)) - return (InfusionRecipe)r; - } - } - } - return null; - } - - - /** - * @param key the research key required for this recipe to work. - * @param result the output result - * @param catalyst an itemstack of the catalyst or a string if it is an ore dictionary item - * @param cost the vis cost - * @param tags the aspects required to craft this - */ - public static CrucibleRecipe addCrucibleRecipe(String key, ItemStack result, Object catalyst, AspectList tags) { - CrucibleRecipe rc = new CrucibleRecipe(key, result, catalyst, tags); - getCraftingRecipes().add(rc); - return rc; - } - - - /** - * @param stack the recipe result - * @return the recipe - */ - public static CrucibleRecipe getCrucibleRecipe(ItemStack stack) { - for (Object r:getCraftingRecipes()) { - if (r instanceof CrucibleRecipe) { - if (((CrucibleRecipe)r).getRecipeOutput().isItemEqual(stack)) - return (CrucibleRecipe)r; - } - } - return null; - } - - /** - * Used by the thaumonomicon drilldown feature. - * @param stack the item - * @return the thaumcraft recipe key that produces that item. - */ - private static HashMap<int[],Object[]> keyCache = new HashMap<int[],Object[]>(); - - public static Object[] getCraftingRecipeKey(EntityPlayer player, ItemStack stack) { - int[] key = new int[] {Item.getIdFromItem(stack.getItem()),stack.getItemDamage()}; - if (keyCache.containsKey(key)) { - if (keyCache.get(key)==null) return null; - if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), (String)(keyCache.get(key))[0])) - return keyCache.get(key); - else - return null; - } - for (ResearchCategoryList rcl:ResearchCategories.researchCategories.values()) { - for (ResearchItem ri:rcl.research.values()) { - if (ri.getPages()==null) continue; - for (int a=0;a<ri.getPages().length;a++) { - ResearchPage page = ri.getPages()[a]; - if (page.recipeOutput!=null && stack !=null && page.recipeOutput.isItemEqual(stack)) { - keyCache.put(key,new Object[] {ri.key,a}); - if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), ri.key)) - return new Object[] {ri.key,a}; - else - return null; - } - } - } - } - keyCache.put(key,null); - return null; - } - - //ASPECTS//////////////////////////////////////// - - public static ConcurrentHashMap<List,AspectList> objectTags = new ConcurrentHashMap<List,AspectList>(); - - /** - * Checks to see if the passed item/block already has aspects associated with it. - * @param id - * @param meta - * @return - */ - public static boolean exists(Item item, int meta) { - AspectList tmp = ThaumcraftApi.objectTags.get(Arrays.asList(item,meta)); - if (tmp==null) { - tmp = ThaumcraftApi.objectTags.get(Arrays.asList(item,OreDictionary.WILDCARD_VALUE)); - if (meta==OreDictionary.WILDCARD_VALUE && tmp==null) { - int index=0; - do { - tmp = ThaumcraftApi.objectTags.get(Arrays.asList(item,index)); - index++; - } while (index<16 && tmp==null); - } - if (tmp==null) return false; - } - - return true; - } - - /** - * Used to assign apsects to the given item/block. Here is an example of the declaration for cobblestone:<p> - * <i>ThaumcraftApi.registerObjectTag(new ItemStack(Blocks.cobblestone), (new AspectList()).add(Aspect.ENTROPY, 1).add(Aspect.EARTH, 1));</i> - * @param item the item passed. Pass OreDictionary.WILDCARD_VALUE if all damage values of this item/block should have the same aspects - * @param aspects A ObjectTags object of the associated aspects - */ - public static void registerObjectTag(ItemStack item, AspectList aspects) { - if (aspects==null) aspects=new AspectList(); - try { - objectTags.put(Arrays.asList(item.getItem(),item.getItemDamage()), aspects); - } catch (Exception e) {} - } - - - /** - * Used to assign apsects to the given item/block. Here is an example of the declaration for cobblestone:<p> - * <i>ThaumcraftApi.registerObjectTag(new ItemStack(Blocks.cobblestone), new int[]{0,1}, (new AspectList()).add(Aspect.ENTROPY, 1).add(Aspect.EARTH, 1));</i> - * @param item - * @param meta A range of meta values if you wish to lump several item meta's together as being the "same" item (i.e. stair orientations) - * @param aspects A ObjectTags object of the associated aspects - */ - public static void registerObjectTag(ItemStack item, int[] meta, AspectList aspects) { - if (aspects==null) aspects=new AspectList(); - try { - objectTags.put(Arrays.asList(item.getItem(),meta), aspects); - } catch (Exception e) {} - } - - /** - * Used to assign apsects to the given ore dictionary item. - * @param oreDict the ore dictionary name - * @param aspects A ObjectTags object of the associated aspects - */ - public static void registerObjectTag(String oreDict, AspectList aspects) { - if (aspects==null) aspects=new AspectList(); - ArrayList<ItemStack> ores = OreDictionary.getOres(oreDict); - if (ores!=null && ores.size()>0) { - for (ItemStack ore:ores) { - try { - objectTags.put(Arrays.asList(ore.getItem(), ore.getItemDamage()), aspects); - } catch (Exception e) {} - } - } - } - - /** - * Used to assign aspects to the given item/block. - * Attempts to automatically generate aspect tags by checking registered recipes. - * Here is an example of the declaration for pistons:<p> - * <i>ThaumcraftApi.registerComplexObjectTag(new ItemStack(Blocks.cobblestone), (new AspectList()).add(Aspect.MECHANISM, 2).add(Aspect.MOTION, 4));</i> - * @param item, pass OreDictionary.WILDCARD_VALUE to meta if all damage values of this item/block should have the same aspects - * @param aspects A ObjectTags object of the associated aspects - */ - public static void registerComplexObjectTag(ItemStack item, AspectList aspects ) { - if (!exists(item.getItem(),item.getItemDamage())) { - AspectList tmp = ThaumcraftApiHelper.generateTags(item.getItem(), item.getItemDamage()); - if (tmp != null && tmp.size()>0) { - for(Aspect tag:tmp.getAspects()) { - aspects.add(tag, tmp.getAmount(tag)); - } - } - registerObjectTag(item,aspects); - } else { - AspectList tmp = ThaumcraftApiHelper.getObjectAspects(item); - for(Aspect tag:aspects.getAspects()) { - tmp.merge(tag, tmp.getAmount(tag)); - } - registerObjectTag(item,tmp); - } - } - - //WARP /////////////////////////////////////////////////////////////////////////////////////// - private static HashMap<Object,Integer> warpMap = new HashMap<Object,Integer>(); - - /** - * This method is used to determine how much warp is gained if the item is crafted - * @param craftresult The item crafted - * @param amount how much warp is gained - */ - public static void addWarpToItem(ItemStack craftresult, int amount) { - warpMap.put(Arrays.asList(craftresult.getItem(),craftresult.getItemDamage()),amount); - } - - /** - * This method is used to determine how much warp is gained if the sent item is crafted - * @param in The item crafted - * @param amount how much warp is gained - */ - public static void addWarpToResearch(String research, int amount) { - warpMap.put(research, amount); - } - - /** - * Returns how much warp is gained from the item or research passed in - * @param in itemstack or string - * @return how much warp it will give - */ - public static int getWarp(Object in) { - if (in==null) return 0; - if (in instanceof ItemStack && warpMap.containsKey(Arrays.asList(((ItemStack)in).getItem(),((ItemStack)in).getItemDamage()))) { - return warpMap.get(Arrays.asList(((ItemStack)in).getItem(),((ItemStack)in).getItemDamage())); - } else - if (in instanceof String && warpMap.containsKey((String)in)) { - return warpMap.get((String)in); - } - return 0; - } - - //CROPS ////////////////////////////////////////////////////////////////////////////////////////// - - /** - * To define mod crops you need to use FMLInterModComms in your @Mod.Init method. - * There are two 'types' of crops you can add. Standard crops and clickable crops. - * - * Standard crops work like normal vanilla crops - they grow until a certain metadata - * value is reached and you harvest them by destroying the block and collecting the blocks. - * You need to create and ItemStack that tells the golem what block id and metadata represents - * the crop when fully grown. Sending a metadata of [OreDictionary.WILDCARD_VALUE] will mean the metadata won't get - * checked. - * Example for vanilla wheat: - * FMLInterModComms.sendMessage("Thaumcraft", "harvestStandardCrop", new ItemStack(Block.crops,1,7)); - * - * Clickable crops are crops that you right click to gather their bounty instead of destroying them. - * As for standard crops, you need to create and ItemStack that tells the golem what block id - * and metadata represents the crop when fully grown. The golem will trigger the blocks onBlockActivated method. - * Sending a metadata of [OreDictionary.WILDCARD_VALUE] will mean the metadata won't get checked. - * Example (this will technically do nothing since clicking wheat does nothing, but you get the idea): - * FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(Block.crops,1,7)); - * - * Stacked crops (like reeds) are crops that you wish the bottom block should remain after harvesting. - * As for standard crops, you need to create and ItemStack that tells the golem what block id - * and metadata represents the crop when fully grown. Sending a metadata of [OreDictionary.WILDCARD_VALUE] will mean the actualy md won't get - * checked. If it has the order upgrade it will only harvest if the crop is more than one block high. - * Example: - * FMLInterModComms.sendMessage("Thaumcraft", "harvestStackedCrop", new ItemStack(Block.reed,1,7)); - */ - - //NATIVE CLUSTERS ////////////////////////////////////////////////////////////////////////////////// - - /** - * You can define certain ores that will have a chance to produce native clusters via FMLInterModComms - * in your @Mod.Init method using the "nativeCluster" string message. - * The format should be: - * "[ore item/block id],[ore item/block metadata],[cluster item/block id],[cluster item/block metadata],[chance modifier float]" - * - * NOTE: The chance modifier is a multiplier applied to the default chance for that cluster to be produced (default 27.5% for a pickaxe of the core) - * - * Example for vanilla iron ore to produce one of my own native iron clusters (assuming default id's) at double the default chance: - * FMLInterModComms.sendMessage("Thaumcraft", "nativeCluster","15,0,25016,16,2.0"); - */ - - //LAMP OF GROWTH BLACKLIST /////////////////////////////////////////////////////////////////////////// - /** - * You can blacklist crops that should not be effected by the Lamp of Growth via FMLInterModComms - * in your @Mod.Init method using the "lampBlacklist" itemstack message. - * Sending a metadata of [OreDictionary.WILDCARD_VALUE] will mean the metadata won't get checked. - * Example for vanilla wheat: - * FMLInterModComms.sendMessage("Thaumcraft", "lampBlacklist", new ItemStack(Block.crops,1,OreDictionary.WILDCARD_VALUE)); - */ - - //DIMENSION BLACKLIST /////////////////////////////////////////////////////////////////////////// - /** - * You can blacklist a dimension to not spawn certain thaumcraft features - * in your @Mod.Init method using the "dimensionBlacklist" string message in the format "[dimension]:[level]" - * The level values are as follows: - * [0] stop all tc spawning and generation - * [1] allow ore and node generation - * [2] allow mob spawning - * [3] allow ore and node gen + mob spawning - * Example: - * FMLInterModComms.sendMessage("Thaumcraft", "dimensionBlacklist", "15:1"); - */ - - //BIOME BLACKLIST /////////////////////////////////////////////////////////////////////////// - /** - * You can blacklist a biome to not spawn certain thaumcraft features - * in your @Mod.Init method using the "biomeBlacklist" string message in the format "[biome id]:[level]" - * The level values are as follows: - * [0] stop all tc spawning and generation - * [1] allow ore and node generation - * [2] allow mob spawning - * [3] allow ore and node gen + mob spawning - * Example: - * FMLInterModComms.sendMessage("Thaumcraft", "biomeBlacklist", "180:2"); - */ -} diff --git a/src/api/java/thaumcraft/api/ThaumcraftApiHelper.java b/src/api/java/thaumcraft/api/ThaumcraftApiHelper.java deleted file mode 100644 index a4b6d42a..00000000 --- a/src/api/java/thaumcraft/api/ThaumcraftApiHelper.java +++ /dev/null @@ -1,269 +0,0 @@ -package thaumcraft.api; - -import java.lang.reflect.Method; -import java.util.HashMap; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.oredict.OreDictionary; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.aspects.AspectList; -import thaumcraft.api.aspects.IEssentiaTransport; -import cpw.mods.fml.common.FMLLog; - -public class ThaumcraftApiHelper { - - public static AspectList cullTags(AspectList temp) { - AspectList temp2 = new AspectList(); - for (Aspect tag:temp.getAspects()) { - if (tag!=null) - temp2.add(tag, temp.getAmount(tag)); - } - while (temp2!=null && temp2.size()>10) { - Aspect lowest = null; - int low = Integer.MAX_VALUE; - for (Aspect tag:temp2.getAspects()) { - if (tag==null) continue; - if (temp2.getAmount(tag)<low) { - low = temp2.getAmount(tag); - lowest = tag; - } - } - temp2.aspects.remove(lowest); - } - return temp2; - } - - public static boolean areItemsEqual(ItemStack s1,ItemStack s2) - { - if (s1.isItemStackDamageable() && s2.isItemStackDamageable()) - { - return s1.getItem() == s2.getItem(); - } else - return s1.getItem() == s2.getItem() && s1.getItemDamage() == s2.getItemDamage(); - } - - static Method isResearchComplete; - static Method getObjectTags; - static Method getBonusTags; - static Method generateTags; - public static boolean isResearchComplete(String username, String researchkey) { - boolean ot = false; - try { - if(isResearchComplete == null) { - Class fake = Class.forName("thaumcraft.common.lib.research.ResearchManager"); - isResearchComplete = fake.getMethod("isResearchComplete", String.class, String.class); - } - ot = (Boolean) isResearchComplete.invoke(null, username, researchkey); - } catch(Exception ex) { - FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.research.ResearchManager method isResearchComplete"); - } - return ot; - } - - public static ItemStack getStackInRowAndColumn(Object instance, int row, int column) { - ItemStack ot = null; - try { - Class fake = Class.forName("thaumcraft.common.tiles.TileMagicWorkbench"); - Method getStackInRowAndColumn = fake.getMethod("getStackInRowAndColumn", int.class, int.class); - ot = (ItemStack) getStackInRowAndColumn.invoke(instance, row, column); - } catch(Exception ex) { - FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.tiles.TileMagicWorkbench method getStackInRowAndColumn"); - } - return ot; - } - - public static AspectList getObjectAspects(ItemStack is) { - AspectList ot = null; - try { - if(getObjectTags == null) { - Class fake = Class.forName("thaumcraft.common.lib.crafting.ThaumcraftCraftingManager"); - getObjectTags = fake.getMethod("getObjectTags", ItemStack.class); - } - ot = (AspectList) getObjectTags.invoke(null, is); - } catch(Exception ex) { - FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.crafting.ThaumcraftCraftingManager method getObjectTags"); - } - return ot; - } - - public static AspectList getBonusObjectTags(ItemStack is,AspectList ot) { - - try { - if(getBonusTags == null) { - Class fake = Class.forName("thaumcraft.common.lib.crafting.ThaumcraftCraftingManager"); - getBonusTags = fake.getMethod("getBonusTags", ItemStack.class, AspectList.class); - } - ot = (AspectList) getBonusTags.invoke(null, is, ot); - } catch(Exception ex) { - FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.crafting.ThaumcraftCraftingManager method getBonusTags"); - } - return ot; - } - - public static AspectList generateTags(Item item, int meta) { - try { - if(generateTags == null) { - Class fake = Class.forName("thaumcraft.common.lib.crafting.ThaumcraftCraftingManager"); - generateTags = fake.getMethod("generateTags", Item.class, int.class); - } - return (AspectList) generateTags.invoke(null, item, meta); - } catch(Exception ex) { - FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.crafting.ThaumcraftCraftingManager method generateTags"); - } - return null; - } - - public static boolean containsMatch(boolean strict, ItemStack[] inputs, ItemStack... targets) - { - for (ItemStack input : inputs) - { - for (ItemStack target : targets) - { - if (itemMatches(target, input, strict)) - { - return true; - } - } - } - return false; - } - - public static boolean itemMatches(ItemStack target, ItemStack input, boolean strict) - { - if (input == null && target != null || input != null && target == null) - { - return false; - } - return (target.getItem() == input.getItem() && - ((target.getItemDamage() == OreDictionary.WILDCARD_VALUE && !strict) || target.getItemDamage() == input.getItemDamage())); - } - - - public static TileEntity getConnectableTile(World world, int x, int y, int z, ForgeDirection face) { - TileEntity te = world.getTileEntity(x+face.offsetX, y+face.offsetY, z+face.offsetZ); - if (te instanceof IEssentiaTransport && ((IEssentiaTransport)te).isConnectable(face.getOpposite())) - return te; - else - return null; - } - - public static TileEntity getConnectableTile(IBlockAccess world, int x, int y, int z, ForgeDirection face) { - TileEntity te = world.getTileEntity(x+face.offsetX, y+face.offsetY, z+face.offsetZ); - if (te instanceof IEssentiaTransport && ((IEssentiaTransport)te).isConnectable(face.getOpposite())) - return te; - else - return null; - } - - private static HashMap<Integer, AspectList> allAspects= new HashMap<Integer, AspectList>(); - private static HashMap<Integer, AspectList> allCompoundAspects= new HashMap<Integer, AspectList>(); - - public static AspectList getAllAspects(int amount) { - if (allAspects.get(amount)==null) { - AspectList al = new AspectList(); - for (Aspect aspect:Aspect.aspects.values()) { - al.add(aspect, amount); - } - allAspects.put(amount, al); - } - return allAspects.get(amount); - } - - public static AspectList getAllCompoundAspects(int amount) { - if (allCompoundAspects.get(amount)==null) { - AspectList al = new AspectList(); - for (Aspect aspect:Aspect.getCompoundAspects()) { - al.add(aspect, amount); - } - allCompoundAspects.put(amount, al); - } - return allCompoundAspects.get(amount); - } - - static Method consumeVisFromWand; - /** - * Use to subtract vis from a wand for most operations - * Wands store vis differently so "real" vis costs need to be multiplied by 100 before calling this method - * @param wand the wand itemstack - * @param player the player using the wand - * @param cost the cost of the operation. - * @param doit actually subtract the vis from the wand if true - if false just simulate the result - * @param crafting is this a crafting operation or not - if - * false then things like frugal and potency will apply to the costs - * @return was the vis successfully subtracted - */ - public static boolean consumeVisFromWand(ItemStack wand, EntityPlayer player, - AspectList cost, boolean doit, boolean crafting) { - boolean ot = false; - try { - if(consumeVisFromWand == null) { - Class fake = Class.forName("thaumcraft.common.items.wands.ItemWandCasting"); - consumeVisFromWand = fake.getMethod("consumeAllVis", - ItemStack.class, EntityPlayer.class, AspectList.class, boolean.class, boolean.class); - } - ot = (Boolean) consumeVisFromWand.invoke( - consumeVisFromWand.getDeclaringClass().cast(wand.getItem()), wand, player, cost, doit, crafting); - } catch(Exception ex) { - FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.items.wands.ItemWandCasting method consumeAllVis"); - } - return ot; - } - - static Method consumeVisFromWandCrafting; - /** - * Subtract vis for use by a crafting mechanic. Costs are calculated slightly - * differently and things like the frugal enchant is ignored - * Must NOT be multiplied by 100 - send the actual vis cost - * @param wand the wand itemstack - * @param player the player using the wand - * @param cost the cost of the operation. - * @param doit actually subtract the vis from the wand if true - if false just simulate the result - * @return was the vis successfully subtracted - */ - public static boolean consumeVisFromWandCrafting(ItemStack wand, EntityPlayer player, - AspectList cost, boolean doit) { - boolean ot = false; - try { - if(consumeVisFromWandCrafting == null) { - Class fake = Class.forName("thaumcraft.common.items.wands.ItemWandCasting"); - consumeVisFromWandCrafting = fake.getMethod("consumeAllVisCrafting", - ItemStack.class, EntityPlayer.class, AspectList.class, boolean.class); - } - ot = (Boolean) consumeVisFromWandCrafting.invoke( - consumeVisFromWandCrafting.getDeclaringClass().cast(wand.getItem()), wand, player, cost, doit); - } catch(Exception ex) { - FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.items.wands.ItemWandCasting method consumeAllVisCrafting"); - } - return ot; - } - - static Method consumeVisFromInventory; - /** - * Subtract vis from a wand the player is carrying. Works like consumeVisFromWand in that actual vis - * costs should be multiplied by 100. The costs are handled like crafting however and things like - * frugal don't effect them - * @param player the player using the wand - * @param cost the cost of the operation. - * @return was the vis successfully subtracted - */ - public static boolean consumeVisFromInventory(EntityPlayer player, AspectList cost) { - boolean ot = false; - try { - if(consumeVisFromInventory == null) { - Class fake = Class.forName("thaumcraft.common.items.wands.WandManager"); - consumeVisFromInventory = fake.getMethod("consumeVisFromInventory", - EntityPlayer.class, AspectList.class); - } - ot = (Boolean) consumeVisFromInventory.invoke(null, player, cost); - } catch(Exception ex) { - FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.items.wands.WandManager method consumeVisFromInventory"); - } - return ot; - } -} diff --git a/src/api/java/thaumcraft/api/TileThaumcraft.java b/src/api/java/thaumcraft/api/TileThaumcraft.java deleted file mode 100644 index 56ccae87..00000000 --- a/src/api/java/thaumcraft/api/TileThaumcraft.java +++ /dev/null @@ -1,63 +0,0 @@ -package thaumcraft.api; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.NetworkManager; -import net.minecraft.network.Packet; -import net.minecraft.network.play.server.S35PacketUpdateTileEntity; -import net.minecraft.tileentity.TileEntity; - -/** - * - * @author azanor - * - * Custom tile entity class I use for most of my tile entities. Setup in such a way that only - * the nbt data within readCustomNBT / writeCustomNBT will be sent to the client when the tile - * updates. Apart from all the normal TE data that gets sent that is. - * - */ -public class TileThaumcraft extends TileEntity { - - //NBT stuff - - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) - { - super.readFromNBT(nbttagcompound); - readCustomNBT(nbttagcompound); - } - - public void readCustomNBT(NBTTagCompound nbttagcompound) - { - //TODO - } - - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) - { - super.writeToNBT(nbttagcompound); - writeCustomNBT(nbttagcompound); - } - - public void writeCustomNBT(NBTTagCompound nbttagcompound) - { - //TODO - } - - //Client Packet stuff - @Override - public Packet getDescriptionPacket() { - NBTTagCompound nbttagcompound = new NBTTagCompound(); - this.writeCustomNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, -999, nbttagcompound); - } - - @Override - public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { - super.onDataPacket(net, pkt); - this.readCustomNBT(pkt.func_148857_g()); - } - - - - -} diff --git a/src/api/java/thaumcraft/api/WorldCoordinates.java b/src/api/java/thaumcraft/api/WorldCoordinates.java deleted file mode 100644 index 6c620af5..00000000 --- a/src/api/java/thaumcraft/api/WorldCoordinates.java +++ /dev/null @@ -1,117 +0,0 @@ -package thaumcraft.api; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; - -public class WorldCoordinates implements Comparable -{ - public int x; - - /** the y coordinate */ - public int y; - - /** the z coordinate */ - public int z; - - public int dim; - - public WorldCoordinates() {} - - public WorldCoordinates(int par1, int par2, int par3, int d) - { - this.x = par1; - this.y = par2; - this.z = par3; - this.dim = d; - } - - public WorldCoordinates(TileEntity tile) - { - this.x = tile.xCoord; - this.y = tile.yCoord; - this.z = tile.zCoord; - this.dim = tile.getWorldObj().provider.dimensionId; - } - - public WorldCoordinates(WorldCoordinates par1ChunkCoordinates) - { - this.x = par1ChunkCoordinates.x; - this.y = par1ChunkCoordinates.y; - this.z = par1ChunkCoordinates.z; - this.dim = par1ChunkCoordinates.dim; - } - - public boolean equals(Object par1Obj) - { - if (!(par1Obj instanceof WorldCoordinates)) - { - return false; - } - else - { - WorldCoordinates coordinates = (WorldCoordinates)par1Obj; - return this.x == coordinates.x && this.y == coordinates.y && this.z == coordinates.z && this.dim == coordinates.dim ; - } - } - - public int hashCode() - { - return this.x + this.y << 8 + this.z << 16 + this.dim << 24; - } - - /** - * Compare the coordinate with another coordinate - */ - public int compareWorldCoordinate(WorldCoordinates par1) - { - return this.dim == par1.dim ? ( - this.y == par1.y ? (this.z == par1.z ? this.x - par1.x : this.z - par1.z) : this.y - par1.y) : -1; - } - - public void set(int par1, int par2, int par3, int d) - { - this.x = par1; - this.y = par2; - this.z = par3; - this.dim = d; - } - - /** - * Returns the squared distance between this coordinates and the coordinates given as argument. - */ - public float getDistanceSquared(int par1, int par2, int par3) - { - float f = (float)(this.x - par1); - float f1 = (float)(this.y - par2); - float f2 = (float)(this.z - par3); - return f * f + f1 * f1 + f2 * f2; - } - - /** - * Return the squared distance between this coordinates and the ChunkCoordinates given as argument. - */ - public float getDistanceSquaredToWorldCoordinates(WorldCoordinates par1ChunkCoordinates) - { - return this.getDistanceSquared(par1ChunkCoordinates.x, par1ChunkCoordinates.y, par1ChunkCoordinates.z); - } - - public int compareTo(Object par1Obj) - { - return this.compareWorldCoordinate((WorldCoordinates)par1Obj); - } - - public void readNBT(NBTTagCompound nbt) { - this.x = nbt.getInteger("w_x"); - this.y = nbt.getInteger("w_y"); - this.z = nbt.getInteger("w_z"); - this.dim = nbt.getInteger("w_d"); - } - - public void writeNBT(NBTTagCompound nbt) { - nbt.setInteger("w_x",x); - nbt.setInteger("w_y",y); - nbt.setInteger("w_z",z); - nbt.setInteger("w_d",dim); - } - -} diff --git a/src/api/java/thaumcraft/api/aspects/Aspect.java b/src/api/java/thaumcraft/api/aspects/Aspect.java deleted file mode 100644 index 3c33a4a7..00000000 --- a/src/api/java/thaumcraft/api/aspects/Aspect.java +++ /dev/null @@ -1,201 +0,0 @@ -package thaumcraft.api.aspects; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.LinkedHashMap; - -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; - -import org.apache.commons.lang3.text.WordUtils; - -public class Aspect { - - String tag; - Aspect[] components; - int color; - private String chatcolor; - ResourceLocation image; - int blend; - - /** - * Use this constructor to register your own aspects. - * @param tag the key that will be used to reference this aspect, as well as its latin display name - * @param color color to display the tag in - * @param components the aspects this one is formed from - * @param image ResourceLocation pointing to a 32x32 icon of the aspect - * @param blend GL11 blendmode (1 or 771). Used for rendering nodes. Default is 1 - */ - public Aspect(String tag, int color, Aspect[] components, ResourceLocation image, int blend) { - if (aspects.containsKey(tag)) throw new IllegalArgumentException(tag+" already registered!"); - this.tag = tag; - this.components = components; - this.color = color; - this.image = image; - this.blend = blend; - aspects.put(tag, this); - } - - /** - * Shortcut constructor I use for the default aspects - you shouldn't be using this. - */ - public Aspect(String tag, int color, Aspect[] components) { - this(tag,color,components,new ResourceLocation("thaumcraft","textures/aspects/"+tag.toLowerCase()+".png"),1); - } - - /** - * Shortcut constructor I use for the default aspects - you shouldn't be using this. - */ - public Aspect(String tag, int color, Aspect[] components, int blend) { - this(tag,color,components,new ResourceLocation("thaumcraft","textures/aspects/"+tag.toLowerCase()+".png"),blend); - } - - /** - * Shortcut constructor I use for the primal aspects - - * you shouldn't use this as making your own primal aspects will break all the things. - */ - public Aspect(String tag, int color, String chatcolor, int blend) { - this(tag,color,(Aspect[])null, blend); - this.setChatcolor(chatcolor); - } - - public int getColor() { - return color; - } - - public String getName() { - return WordUtils.capitalizeFully(tag); - } - - public String getLocalizedDescription() { - return StatCollector.translateToLocal("tc.aspect."+tag); - } - - public String getTag() { - return tag; - } - - public void setTag(String tag) { - this.tag = tag; - } - - public Aspect[] getComponents() { - return components; - } - - public void setComponents(Aspect[] components) { - this.components = components; - } - - public ResourceLocation getImage() { - return image; - } - - public static Aspect getAspect(String tag) { - return aspects.get(tag); - } - - public int getBlend() { - return blend; - } - - public void setBlend(int blend) { - this.blend = blend; - } - - public boolean isPrimal() { - return getComponents()==null || getComponents().length!=2; - } - - /////////////////////////////// - public static ArrayList<Aspect> getPrimalAspects() { - ArrayList<Aspect> primals = new ArrayList<Aspect>(); - Collection<Aspect> pa = aspects.values(); - for (Aspect aspect:pa) { - if (aspect.isPrimal()) primals.add(aspect); - } - return primals; - } - - public static ArrayList<Aspect> getCompoundAspects() { - ArrayList<Aspect> compounds = new ArrayList<Aspect>(); - Collection<Aspect> pa = aspects.values(); - for (Aspect aspect:pa) { - if (!aspect.isPrimal()) compounds.add(aspect); - } - return compounds; - } - - public String getChatcolor() { - return chatcolor; - } - - public void setChatcolor(String chatcolor) { - this.chatcolor = chatcolor; - } - - - /////////////////////////////// - public static LinkedHashMap<String,Aspect> aspects = new LinkedHashMap<String,Aspect>(); - - //PRIMAL - public static final Aspect AIR = new Aspect("aer",0xffff7e,"e",1); - public static final Aspect EARTH = new Aspect("terra",0x56c000,"2",1); - public static final Aspect FIRE = new Aspect("ignis",0xff5a01,"c",1); - public static final Aspect WATER = new Aspect("aqua",0x3cd4fc,"3",1); - public static final Aspect ORDER = new Aspect("ordo",0xd5d4ec,"7",1); - public static final Aspect ENTROPY = new Aspect("perditio",0x404040,"8",771); - - //SECONDARY - public static final Aspect VOID = new Aspect("vacuos",0x888888, new Aspect[] {AIR, ENTROPY},771); - public static final Aspect LIGHT = new Aspect("lux",0xfff663, new Aspect[] {AIR, FIRE}); - public static final Aspect WEATHER = new Aspect("tempestas",0xFFFFFF, new Aspect[] {AIR, WATER}); - public static final Aspect MOTION = new Aspect("motus",0xcdccf4, new Aspect[] {AIR, ORDER}); - public static final Aspect COLD = new Aspect("gelum",0xe1ffff, new Aspect[] {FIRE, ENTROPY}); - public static final Aspect CRYSTAL = new Aspect("vitreus",0x80ffff, new Aspect[] {EARTH, ORDER}); - public static final Aspect LIFE = new Aspect("victus",0xde0005, new Aspect[] {WATER, EARTH}); - public static final Aspect POISON = new Aspect("venenum",0x89f000, new Aspect[] {WATER, ENTROPY}); - public static final Aspect ENERGY = new Aspect("potentia",0xc0ffff, new Aspect[] {ORDER, FIRE}); - public static final Aspect EXCHANGE = new Aspect("permutatio",0x578357, new Aspect[] {ENTROPY, ORDER}); -// public static final Aspect ?? = new Aspect("??",0xcdccf4, new Aspect[] {AIR, EARTH}); -// public static final Aspect ?? = new Aspect("??",0xcdccf4, new Aspect[] {FIRE, EARTH}); -// public static final Aspect ?? = new Aspect("??",0xcdccf4, new Aspect[] {FIRE, WATER}); -// public static final Aspect ?? = new Aspect("??",0xcdccf4, new Aspect[] {ORDER, WATER}); -// public static final Aspect ?? = new Aspect("??",0xcdccf4, new Aspect[] {EARTH, ENTROPY}); - - //TERTIARY - public static final Aspect METAL = new Aspect("metallum",0xb5b5cd, new Aspect[] {EARTH, CRYSTAL}); - public static final Aspect DEATH = new Aspect("mortuus",0x887788, new Aspect[] {LIFE, ENTROPY}); - public static final Aspect FLIGHT = new Aspect("volatus",0xe7e7d7, new Aspect[] {AIR, MOTION}); - public static final Aspect DARKNESS = new Aspect("tenebrae",0x222222, new Aspect[] {VOID, LIGHT}); - public static final Aspect SOUL = new Aspect("spiritus",0xebebfb, new Aspect[] {LIFE, DEATH}); - public static final Aspect HEAL = new Aspect("sano",0xff2f34, new Aspect[] {LIFE, ORDER}); - public static final Aspect TRAVEL = new Aspect("iter",0xe0585b, new Aspect[] {MOTION, EARTH}); - public static final Aspect ELDRITCH = new Aspect("alienis",0x805080, new Aspect[] {VOID, DARKNESS}); - public static final Aspect MAGIC = new Aspect("praecantatio",0x9700c0, new Aspect[] {VOID, ENERGY}); - public static final Aspect AURA = new Aspect("auram",0xffc0ff, new Aspect[] {MAGIC, AIR}); - public static final Aspect TAINT = new Aspect("vitium",0x800080, new Aspect[] {MAGIC, ENTROPY}); - public static final Aspect SLIME = new Aspect("limus",0x01f800, new Aspect[] {LIFE, WATER}); - public static final Aspect PLANT = new Aspect("herba",0x01ac00, new Aspect[] {LIFE, EARTH}); - public static final Aspect TREE = new Aspect("arbor",0x876531, new Aspect[] {AIR, PLANT}); - public static final Aspect BEAST = new Aspect("bestia",0x9f6409, new Aspect[] {MOTION, LIFE}); - public static final Aspect FLESH = new Aspect("corpus",0xee478d, new Aspect[] {DEATH, BEAST}); - public static final Aspect UNDEAD = new Aspect("exanimis",0x3a4000, new Aspect[] {MOTION, DEATH}); - public static final Aspect MIND = new Aspect("cognitio",0xffc2b3, new Aspect[] {EARTH, SOUL}); - public static final Aspect SENSES = new Aspect("sensus",0x0fd9ff, new Aspect[] {AIR, SOUL}); - public static final Aspect MAN = new Aspect("humanus",0xffd7c0, new Aspect[] {BEAST, MIND}); - public static final Aspect CROP = new Aspect("messis",0xe1b371, new Aspect[] {PLANT, MAN}); - public static final Aspect MINE = new Aspect("perfodio",0xdcd2d8, new Aspect[] {MAN, EARTH}); - public static final Aspect TOOL = new Aspect("instrumentum",0x4040ee, new Aspect[] {MAN, ORDER}); - public static final Aspect HARVEST = new Aspect("meto",0xeead82, new Aspect[] {CROP, TOOL}); - public static final Aspect WEAPON = new Aspect("telum",0xc05050, new Aspect[] {TOOL, ENTROPY}); - public static final Aspect ARMOR = new Aspect("tutamen",0x00c0c0, new Aspect[] {TOOL, EARTH}); - public static final Aspect HUNGER = new Aspect("fames",0x9a0305, new Aspect[] {LIFE, VOID}); - public static final Aspect GREED = new Aspect("lucrum",0xe6be44, new Aspect[] {MAN, HUNGER}); - public static final Aspect CRAFT = new Aspect("fabrico",0x809d80, new Aspect[] {MAN, TOOL}); - public static final Aspect CLOTH = new Aspect("pannus",0xeaeac2, new Aspect[] {TOOL, BEAST}); - public static final Aspect MECHANISM = new Aspect("machina",0x8080a0, new Aspect[] {MOTION, TOOL}); - public static final Aspect TRAP = new Aspect("vinculum",0x9a8080, new Aspect[] {MOTION, ENTROPY}); - - -} diff --git a/src/api/java/thaumcraft/api/aspects/AspectList.java b/src/api/java/thaumcraft/api/aspects/AspectList.java deleted file mode 100644 index 6b9dfcef..00000000 --- a/src/api/java/thaumcraft/api/aspects/AspectList.java +++ /dev/null @@ -1,256 +0,0 @@ -package thaumcraft.api.aspects; - -import java.io.Serializable; -import java.util.LinkedHashMap; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import thaumcraft.api.ThaumcraftApiHelper; - -public class AspectList implements Serializable { - - public LinkedHashMap<Aspect,Integer> aspects = new LinkedHashMap<Aspect,Integer>();//aspects associated with this object - - - /** - * this creates a new aspect list with preloaded values based off the aspects of the given item. - * @param the itemstack of the given item - */ - public AspectList(ItemStack stack) { - try { - AspectList temp = ThaumcraftApiHelper.getObjectAspects(stack); - if (temp!=null) - for (Aspect tag:temp.getAspects()) { - add(tag,temp.getAmount(tag)); - } - } catch (Exception e) {} - } - - public AspectList() { - } - - public AspectList copy() { - AspectList out = new AspectList(); - for (Aspect a:this.getAspects()) - out.add(a, this.getAmount(a)); - return out; - } - - /** - * @return the amount of different aspects in this collection - */ - public int size() { - return aspects.size(); - } - - /** - * @return the amount of total vis in this collection - */ - public int visSize() { - int q = 0; - - for (Aspect as:aspects.keySet()) { - q+=this.getAmount(as); - } - - return q; - } - - /** - * @return an array of all the aspects in this collection - */ - public Aspect[] getAspects() { - Aspect[] q = new Aspect[1]; - return aspects.keySet().toArray(q); - } - - /** - * @return an array of all the aspects in this collection - */ - public Aspect[] getPrimalAspects() { - AspectList t = new AspectList(); - for (Aspect as:aspects.keySet()) { - if (as.isPrimal()) { - t.add(as,1); - } - } - Aspect[] q = new Aspect[1]; - return t.aspects.keySet().toArray(q); - } - - /** - * @return an array of all the aspects in this collection sorted by name - */ - public Aspect[] getAspectsSorted() { - try { - Aspect[] out = aspects.keySet().toArray(new Aspect[1]); - boolean change=false; - do { - change=false; - for(int a=0;a<out.length-1;a++) { - Aspect e1 = out[a]; - Aspect e2 = out[a+1]; - if (e1!=null && e2!=null && e1.getTag().compareTo(e2.getTag())>0) { - out[a] = e2; - out[a+1] = e1; - change = true; - break; - } - } - } while (change==true); - return out; - } catch (Exception e) { - return this.getAspects(); - } - } - - /** - * @return an array of all the aspects in this collection sorted by amount - */ - public Aspect[] getAspectsSortedAmount() { - try { - Aspect[] out = aspects.keySet().toArray(new Aspect[1]); - boolean change=false; - do { - change=false; - for(int a=0;a<out.length-1;a++) { - int e1 = getAmount(out[a]); - int e2 = getAmount(out[a+1]); - if (e1>0 && e2>0 && e2>e1) { - Aspect ea = out[a]; - Aspect eb = out[a+1]; - out[a] = eb; - out[a+1] = ea; - change = true; - break; - } - } - } while (change==true); - return out; - } catch (Exception e) { - return this.getAspects(); - } - } - - /** - * @param key - * @return the amount associated with the given aspect in this collection - */ - public int getAmount(Aspect key) { - return aspects.get(key)==null?0:aspects.get(key); - } - - /** - * Reduces the amount of an aspect in this collection by the given amount. - * @param key - * @param amount - * @return - */ - public boolean reduce(Aspect key, int amount) { - if (getAmount(key)>=amount) { - int am = getAmount(key)-amount; - aspects.put(key, am); - return true; - } - return false; - } - - /** - * Reduces the amount of an aspect in this collection by the given amount. - * If reduced to 0 or less the aspect will be removed completely. - * @param key - * @param amount - * @return - */ - public AspectList remove(Aspect key, int amount) { - int am = getAmount(key)-amount; - if (am<=0) aspects.remove(key); else - this.aspects.put(key, am); - return this; - } - - /** - * Simply removes the aspect from the list - * @param key - * @param amount - * @return - */ - public AspectList remove(Aspect key) { - aspects.remove(key); - return this; - } - - /** - * Adds this aspect and amount to the collection. - * If the aspect exists then its value will be increased by the given amount. - * @param aspect - * @param amount - * @return - */ - public AspectList add(Aspect aspect, int amount) { - if (this.aspects.containsKey(aspect)) { - int oldamount = this.aspects.get(aspect); - amount+=oldamount; - } - this.aspects.put( aspect, amount ); - return this; - } - - - /** - * Adds this aspect and amount to the collection. - * If the aspect exists then only the highest of the old or new amount will be used. - * @param aspect - * @param amount - * @return - */ - public AspectList merge(Aspect aspect, int amount) { - if (this.aspects.containsKey(aspect)) { - int oldamount = this.aspects.get(aspect); - if (amount<oldamount) amount=oldamount; - - } - this.aspects.put( aspect, amount ); - return this; - } - - /** - * Reads the list of aspects from nbt - * @param nbttagcompound - * @return - */ - public void readFromNBT(NBTTagCompound nbttagcompound) - { - aspects.clear(); - NBTTagList tlist = nbttagcompound.getTagList("Aspects",(byte)10); - for (int j = 0; j < tlist.tagCount(); j++) { - NBTTagCompound rs = (NBTTagCompound) tlist.getCompoundTagAt(j); - if (rs.hasKey("key")) { - add( Aspect.getAspect(rs.getString("key")), - rs.getInteger("amount")); - } - } - } - - /** - * Writes the list of aspects to nbt - * @param nbttagcompound - * @return - */ - public void writeToNBT(NBTTagCompound nbttagcompound) - { - NBTTagList tlist = new NBTTagList(); - nbttagcompound.setTag("Aspects", tlist); - for (Aspect aspect : getAspects()) - if (aspect != null) { - NBTTagCompound f = new NBTTagCompound(); - f.setString("key", aspect.getTag()); - f.setInteger("amount", getAmount(aspect)); - tlist.appendTag(f); - } - } - - - -} diff --git a/src/api/java/thaumcraft/api/aspects/AspectSourceHelper.java b/src/api/java/thaumcraft/api/aspects/AspectSourceHelper.java deleted file mode 100644 index f22d8ce5..00000000 --- a/src/api/java/thaumcraft/api/aspects/AspectSourceHelper.java +++ /dev/null @@ -1,58 +0,0 @@ -package thaumcraft.api.aspects; - -import java.lang.reflect.Method; - -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; -import cpw.mods.fml.common.FMLLog; - -public class AspectSourceHelper { - - static Method drainEssentia; - static Method findEssentia; - /** - * This method is what is used to drain essentia from jars and other sources for things like - * infusion crafting or powering the arcane furnace. A record of possible sources are kept track of - * and refreshed as needed around the calling tile entity. This also renders the essentia trail particles. - * Only 1 essentia is drained at a time - * @param tile the tile entity that is draining the essentia - * @param aspect the aspect that you are looking for - * @param direction the direction from which you wish to drain. Forgedirection.Unknown simply seeks in all directions. - * @param range how many blocks you wish to search for essentia sources. - * @return boolean returns true if essentia was found and removed from a source. - */ - public static boolean drainEssentia(TileEntity tile, Aspect aspect, ForgeDirection direction, int range) { - try { - if(drainEssentia == null) { - Class fake = Class.forName("thaumcraft.common.lib.events.EssentiaHandler"); - drainEssentia = fake.getMethod("drainEssentia", TileEntity.class, Aspect.class, ForgeDirection.class, int.class); - } - return (Boolean) drainEssentia.invoke(null, tile, aspect, direction, range); - } catch(Exception ex) { - FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.events.EssentiaHandler method drainEssentia"); - } - return false; - } - - /** - * This method returns if there is any essentia of the passed type that can be drained. It in no way checks how - * much there is, only if an essentia container nearby contains at least 1 point worth. - * @param tile the tile entity that is checking the essentia - * @param aspect the aspect that you are looking for - * @param direction the direction from which you wish to drain. Forgedirection.Unknown simply seeks in all directions. - * @param range how many blocks you wish to search for essentia sources. - * @return boolean returns true if essentia was found and removed from a source. - */ - public static boolean findEssentia(TileEntity tile, Aspect aspect, ForgeDirection direction, int range) { - try { - if(findEssentia == null) { - Class fake = Class.forName("thaumcraft.common.lib.events.EssentiaHandler"); - findEssentia = fake.getMethod("findEssentia", TileEntity.class, Aspect.class, ForgeDirection.class, int.class); - } - return (Boolean) findEssentia.invoke(null, tile, aspect, direction, range); - } catch(Exception ex) { - FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.events.EssentiaHandler method findEssentia"); - } - return false; - } -} diff --git a/src/api/java/thaumcraft/api/aspects/IAspectContainer.java b/src/api/java/thaumcraft/api/aspects/IAspectContainer.java deleted file mode 100644 index bb34ae81..00000000 --- a/src/api/java/thaumcraft/api/aspects/IAspectContainer.java +++ /dev/null @@ -1,80 +0,0 @@ -package thaumcraft.api.aspects; - - -/** - * - * @author azanor - * - * Used by blocks like the crucible and alembic to hold their aspects. - * Tiles extending this interface will have their aspects show up when viewed by goggles of revealing - * - */ -public interface IAspectContainer { - public AspectList getAspects(); - - - public void setAspects(AspectList aspects); - - - /** - * This method is used to determine of a specific aspect can be added to this container. - * @param tag - * @return true or false - */ - public boolean doesContainerAccept(Aspect tag); - - /** - * This method is used to add a certain amount of an aspect to the tile entity. - * @param tag - * @param amount - * @return the amount of aspect left over that could not be added. - */ - public int addToContainer(Aspect tag, int amount); - - /** - * Removes a certain amount of a specific aspect from the tile entity - * @param tag - * @param amount - * @return true if that amount of aspect was available and was removed - */ - public boolean takeFromContainer(Aspect tag, int amount); - - /** - * removes a bunch of different aspects and amounts from the tile entity. - * @param ot the ObjectTags object that contains the aspects and their amounts. - * @return true if all the aspects and their amounts were available and successfully removed - * - * Going away in the next major patch - */ - @Deprecated - public boolean takeFromContainer(AspectList ot); - - /** - * Checks if the tile entity contains the listed amount (or more) of the aspect - * @param tag - * @param amount - * @return - */ - public boolean doesContainerContainAmount(Aspect tag,int amount); - - /** - * Checks if the tile entity contains all the listed aspects and their amounts - * @param ot the ObjectTags object that contains the aspects and their amounts. - * @return - * - * Going away in the next major patch - */ - @Deprecated - public boolean doesContainerContain(AspectList ot); - - /** - * Returns how much of the aspect this tile entity contains - * @param tag - * @return the amount of that aspect found - */ - public int containerContains(Aspect tag); - -} - - - diff --git a/src/api/java/thaumcraft/api/aspects/IAspectSource.java b/src/api/java/thaumcraft/api/aspects/IAspectSource.java deleted file mode 100644 index c01f569d..00000000 --- a/src/api/java/thaumcraft/api/aspects/IAspectSource.java +++ /dev/null @@ -1,16 +0,0 @@ -package thaumcraft.api.aspects; - - - -/** - * @author Azanor - * - * This interface is implemented by tile entites (or possibly anything else) like jars - * so that they can act as an essentia source for blocks like the infusion altar. - * - */ -public interface IAspectSource extends IAspectContainer { - - - -} diff --git a/src/api/java/thaumcraft/api/aspects/IEssentiaContainerItem.java b/src/api/java/thaumcraft/api/aspects/IEssentiaContainerItem.java deleted file mode 100644 index f92a7de4..00000000 --- a/src/api/java/thaumcraft/api/aspects/IEssentiaContainerItem.java +++ /dev/null @@ -1,36 +0,0 @@ -package thaumcraft.api.aspects; - -import net.minecraft.item.ItemStack; - -/** - * - * @author azanor - * - * Used by wispy essences and essentia phials to hold their aspects. - * Useful for similar item containers that store their aspect information in nbt form so TC - * automatically picks up the aspects they contain - * - */ -public interface IEssentiaContainerItem { - public AspectList getAspects(ItemStack itemstack); - public void setAspects(ItemStack itemstack, AspectList aspects); -} - -//Example implementation -/* - @Override - public AspectList getAspects(ItemStack itemstack) { - if (itemstack.hasTagCompound()) { - AspectList aspects = new AspectList(); - aspects.readFromNBT(itemstack.getTagCompound()); - return aspects.size()>0?aspects:null; - } - return null; - } - - @Override - public void setAspects(ItemStack itemstack, AspectList aspects) { - if (!itemstack.hasTagCompound()) itemstack.setTagCompound(new NBTTagCompound()); - aspects.writeToNBT(itemstack.getTagCompound()); - } -*/ \ No newline at end of file diff --git a/src/api/java/thaumcraft/api/aspects/IEssentiaTransport.java b/src/api/java/thaumcraft/api/aspects/IEssentiaTransport.java deleted file mode 100644 index fecbc160..00000000 --- a/src/api/java/thaumcraft/api/aspects/IEssentiaTransport.java +++ /dev/null @@ -1,100 +0,0 @@ -package thaumcraft.api.aspects; - -import net.minecraftforge.common.util.ForgeDirection; - - -/** - * @author Azanor - * This interface is used by tiles that use or transport vis. - * Only tiles that implement this interface will be able to connect to vis conduits or other thaumic devices - */ -public interface IEssentiaTransport { - /** - * Is this tile able to connect to other vis users/sources on the specified side? - * @param face - * @return - */ - public boolean isConnectable(ForgeDirection face); - - /** - * Is this side used to input essentia? - * @param face - * @return - */ - boolean canInputFrom(ForgeDirection face); - - /** - * Is this side used to output essentia? - * @param face - * @return - */ - boolean canOutputTo(ForgeDirection face); - - /** - * Sets the amount of suction this block will apply - * @param suction - */ - public void setSuction(Aspect aspect, int amount); - - /** - * Returns the type of suction this block is applying. - * @param loc - * the location from where the suction is being checked - * @return - * a return type of null indicates the suction is untyped and the first thing available will be drawn - */ - public Aspect getSuctionType(ForgeDirection face); - - /** - * Returns the strength of suction this block is applying. - * @param loc - * the location from where the suction is being checked - * @return - */ - public int getSuctionAmount(ForgeDirection face); - - /** - * remove the specified amount of essentia from this transport tile - * @return how much was actually taken - */ - public int takeEssentia(Aspect aspect, int amount, ForgeDirection face); - - /** - * add the specified amount of essentia to this transport tile - * @return how much was actually added - */ - public int addEssentia(Aspect aspect, int amount, ForgeDirection face); - - /** - * What type of essentia this contains - * @param face - * @return - */ - public Aspect getEssentiaType(ForgeDirection face); - - /** - * How much essentia this block contains - * @param face - * @return - */ - public int getEssentiaAmount(ForgeDirection face); - - - - /** - * Essentia will not be drawn from this container unless the suction exceeds this amount. - * @return the amount - */ - public int getMinimumSuction(); - - /** - * Return true if you want the conduit to extend a little further into the block. - * Used by jars and alembics that have smaller than normal hitboxes - * @return - */ - boolean renderExtendedTube(); - - - -} - diff --git a/src/api/java/thaumcraft/api/crafting/CrucibleRecipe.java b/src/api/java/thaumcraft/api/crafting/CrucibleRecipe.java deleted file mode 100644 index 9c1e8a62..00000000 --- a/src/api/java/thaumcraft/api/crafting/CrucibleRecipe.java +++ /dev/null @@ -1,95 +0,0 @@ -package thaumcraft.api.crafting; - -import java.util.ArrayList; - -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; -import thaumcraft.api.ThaumcraftApiHelper; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.aspects.AspectList; - -public class CrucibleRecipe { - - private ItemStack recipeOutput; - - - public Object catalyst; - public AspectList aspects; - public String key; - - public CrucibleRecipe(String researchKey, ItemStack result, Object cat, AspectList tags) { - recipeOutput = result; - this.aspects = tags; - this.key = researchKey; - this.catalyst = cat; - if (cat instanceof String) { - this.catalyst = OreDictionary.getOres((String) cat); - } - } - - - public boolean matches(AspectList itags, ItemStack cat) { - if (catalyst instanceof ItemStack && - !ThaumcraftApiHelper.itemMatches((ItemStack) catalyst,cat,false)) { - return false; - } else - if (catalyst instanceof ArrayList && ((ArrayList<ItemStack>)catalyst).size()>0) { - ItemStack[] ores = ((ArrayList<ItemStack>)catalyst).toArray(new ItemStack[]{}); - if (!ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{cat},ores)) return false; - } - if (itags==null) return false; - for (Aspect tag:aspects.getAspects()) { - if (itags.getAmount(tag)<aspects.getAmount(tag)) return false; - } - return true; - } - - public boolean catalystMatches(ItemStack cat) { - if (catalyst instanceof ItemStack && ThaumcraftApiHelper.itemMatches((ItemStack) catalyst,cat,false)) { - return true; - } else - if (catalyst instanceof ArrayList && ((ArrayList<ItemStack>)catalyst).size()>0) { - ItemStack[] ores = ((ArrayList<ItemStack>)catalyst).toArray(new ItemStack[]{}); - if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{cat},ores)) return true; - } - return false; - } - - public AspectList removeMatching(AspectList itags) { - AspectList temptags = new AspectList(); - temptags.aspects.putAll(itags.aspects); - - for (Aspect tag:aspects.getAspects()) { - temptags.remove(tag, aspects.getAmount(tag)); -// if (!temptags.remove(tag, aspects.getAmount(tag))) return null; - } - - itags = temptags; - return itags; - } - - public ItemStack getRecipeOutput() { - return recipeOutput; - } - - -// @Override -// public int hashCode() { -// String hash = ""; -// if (catalyst instanceof ItemStack) { -// hash += ((ItemStack)catalyst).toString(); -// } else if (catalyst instanceof ArrayList && ((ArrayList<ItemStack>)catalyst).size()>0) { -// for (ItemStack s:(ArrayList<ItemStack>)catalyst) { -// hash += s.toString(); -// } -// } else { -// hash += catalyst.hashCode(); -// } -// hash += getRecipeOutput().toString(); -// for (Aspect a:aspects.getAspectsSorted()) { -// hash += a.getTag() + aspects.getAmount(a); -// } -// return hash.hashCode(); -// } - -} diff --git a/src/api/java/thaumcraft/api/crafting/IArcaneRecipe.java b/src/api/java/thaumcraft/api/crafting/IArcaneRecipe.java deleted file mode 100644 index bb5036d2..00000000 --- a/src/api/java/thaumcraft/api/crafting/IArcaneRecipe.java +++ /dev/null @@ -1,35 +0,0 @@ -package thaumcraft.api.crafting; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import thaumcraft.api.aspects.AspectList; - -public interface IArcaneRecipe -{ - - - /** - * Used to check if a recipe matches current crafting inventory - * @param player - */ - boolean matches(IInventory var1, World world, EntityPlayer player); - - /** - * Returns an Item that is the result of this recipe - */ - ItemStack getCraftingResult(IInventory var1); - - /** - * Returns the size of the recipe area - */ - int getRecipeSize(); - - ItemStack getRecipeOutput(); - AspectList getAspects(); - AspectList getAspects(IInventory var1); - String getResearch(); - - -} diff --git a/src/api/java/thaumcraft/api/crafting/IInfusionStabiliser.java b/src/api/java/thaumcraft/api/crafting/IInfusionStabiliser.java deleted file mode 100644 index d137ff24..00000000 --- a/src/api/java/thaumcraft/api/crafting/IInfusionStabiliser.java +++ /dev/null @@ -1,19 +0,0 @@ -package thaumcraft.api.crafting; - -import net.minecraft.world.World; - -/** - * - * @author Azanor - * - * Blocks that implement this interface act as infusion crafting stabilisers like candles and skulls - * - */ -public interface IInfusionStabiliser { - - /** - * returns true if the block can stabilise things - */ - public boolean canStabaliseInfusion(World world, int x, int y, int z); - -} diff --git a/src/api/java/thaumcraft/api/crafting/InfusionEnchantmentRecipe.java b/src/api/java/thaumcraft/api/crafting/InfusionEnchantmentRecipe.java deleted file mode 100644 index 6fb4d63d..00000000 --- a/src/api/java/thaumcraft/api/crafting/InfusionEnchantmentRecipe.java +++ /dev/null @@ -1,156 +0,0 @@ -package thaumcraft.api.crafting; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.Map; - -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; -import thaumcraft.api.ThaumcraftApiHelper; -import thaumcraft.api.aspects.AspectList; - -public class InfusionEnchantmentRecipe -{ - - public AspectList aspects; - public String research; - public ItemStack[] components; - public Enchantment enchantment; - public int recipeXP; - public int instability; - - public InfusionEnchantmentRecipe(String research, Enchantment input, int inst, - AspectList aspects2, ItemStack[] recipe) { - this.research = research; - this.enchantment = input; - this.aspects = aspects2; - this.components = recipe; - this.instability = inst; - this.recipeXP = Math.max(1, input.getMinEnchantability(1)/3); - } - - /** - * Used to check if a recipe matches current crafting inventory - * @param player - */ - public boolean matches(ArrayList<ItemStack> input, ItemStack central, World world, EntityPlayer player) { - if (research.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), research)) { - return false; - } - - if (!enchantment.canApply(central) || !central.getItem().isItemTool(central)) { - return false; - } - - Map map1 = EnchantmentHelper.getEnchantments(central); - Iterator iterator = map1.keySet().iterator(); - while (iterator.hasNext()) - { - int j1 = ((Integer)iterator.next()).intValue(); - Enchantment ench = Enchantment.enchantmentsList[j1]; - if (j1 == enchantment.effectId && - EnchantmentHelper.getEnchantmentLevel(j1, central)>=ench.getMaxLevel()) - return false; - if (enchantment.effectId != ench.effectId && - (!enchantment.canApplyTogether(ench) || - !ench.canApplyTogether(enchantment))) { - return false; - } - } - - ItemStack i2 = null; - - ArrayList<ItemStack> ii = new ArrayList<ItemStack>(); - for (ItemStack is:input) { - ii.add(is.copy()); - } - - for (ItemStack comp:components) { - boolean b=false; - for (int a=0;a<ii.size();a++) { - i2 = ii.get(a).copy(); - if (comp.getItemDamage()==OreDictionary.WILDCARD_VALUE) { - i2.setItemDamage(OreDictionary.WILDCARD_VALUE); - } - if (areItemStacksEqual(i2, comp,true)) { - ii.remove(a); - b=true; - break; - } - } - if (!b) return false; - } -// System.out.println(ii.size()); - return ii.size()==0?true:false; - } - - private boolean areItemStacksEqual(ItemStack stack0, ItemStack stack1, boolean fuzzy) - { - if (stack0==null && stack1!=null) return false; - if (stack0!=null && stack1==null) return false; - if (stack0==null && stack1==null) return true; - boolean t1=false; - if (fuzzy) { - t1=true; - int od = OreDictionary.getOreID(stack0); - if (od!=-1) { - ItemStack[] ores = OreDictionary.getOres(od).toArray(new ItemStack[]{}); - if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{stack1}, ores)) - return true; - } - } - else - t1=ItemStack.areItemStackTagsEqual(stack0, stack1); - return stack0.getItem() != stack1.getItem() ? false : (stack0.getItemDamage() != stack1.getItemDamage() ? false : (stack0.stackSize > stack0.getMaxStackSize() ? false : t1)); - } - - - public Enchantment getEnchantment() { - return enchantment; - - } - - public AspectList getAspects() { - return aspects; - - } - - public String getResearch() { - return research; - - } - - public int calcInstability(ItemStack recipeInput) { - int i = 0; - Map map1 = EnchantmentHelper.getEnchantments(recipeInput); - Iterator iterator = map1.keySet().iterator(); - while (iterator.hasNext()) - { - int j1 = ((Integer)iterator.next()).intValue(); - i += EnchantmentHelper.getEnchantmentLevel(j1, recipeInput); - } - return (i/2) + instability; - } - - public int calcXP(ItemStack recipeInput) { - return recipeXP * (1+EnchantmentHelper.getEnchantmentLevel(enchantment.effectId, recipeInput)); - } - - public float getEssentiaMod(ItemStack recipeInput) { - float mod = EnchantmentHelper.getEnchantmentLevel(enchantment.effectId, recipeInput); - Map map1 = EnchantmentHelper.getEnchantments(recipeInput); - Iterator iterator = map1.keySet().iterator(); - while (iterator.hasNext()) - { - int j1 = ((Integer)iterator.next()).intValue(); - if (j1 != enchantment.effectId) - mod += EnchantmentHelper.getEnchantmentLevel(j1, recipeInput) * .1f; - } - return mod; - } - -} diff --git a/src/api/java/thaumcraft/api/crafting/InfusionRecipe.java b/src/api/java/thaumcraft/api/crafting/InfusionRecipe.java deleted file mode 100644 index fef0a347..00000000 --- a/src/api/java/thaumcraft/api/crafting/InfusionRecipe.java +++ /dev/null @@ -1,128 +0,0 @@ -package thaumcraft.api.crafting; - -import java.util.ArrayList; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; -import thaumcraft.api.ThaumcraftApiHelper; -import thaumcraft.api.aspects.AspectList; - -public class InfusionRecipe -{ - protected AspectList aspects; - protected String research; - private ItemStack[] components; - private ItemStack recipeInput; - protected Object recipeOutput; - protected int instability; - - public InfusionRecipe(String research, Object output, int inst, - AspectList aspects2, ItemStack input, ItemStack[] recipe) { - this.research = research; - this.recipeOutput = output; - this.recipeInput = input; - this.aspects = aspects2; - this.components = recipe; - this.instability = inst; - } - - /** - * Used to check if a recipe matches current crafting inventory - * @param player - */ - public boolean matches(ArrayList<ItemStack> input, ItemStack central, World world, EntityPlayer player) { - if (getRecipeInput()==null) return false; - - if (research.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), research)) { - return false; - } - - ItemStack i2 = central.copy(); - if (getRecipeInput().getItemDamage()==OreDictionary.WILDCARD_VALUE) { - i2.setItemDamage(OreDictionary.WILDCARD_VALUE); - } - - if (!areItemStacksEqual(i2, getRecipeInput(), true)) return false; - - ArrayList<ItemStack> ii = new ArrayList<ItemStack>(); - for (ItemStack is:input) { - ii.add(is.copy()); - } - - for (ItemStack comp:getComponents()) { - boolean b=false; - for (int a=0;a<ii.size();a++) { - i2 = ii.get(a).copy(); - if (comp.getItemDamage()==OreDictionary.WILDCARD_VALUE) { - i2.setItemDamage(OreDictionary.WILDCARD_VALUE); - } - if (areItemStacksEqual(i2, comp,true)) { - ii.remove(a); - b=true; - break; - } - } - if (!b) return false; - } - return ii.size()==0?true:false; - } - - protected boolean areItemStacksEqual(ItemStack stack0, ItemStack stack1, boolean fuzzy) - { - if (stack0==null && stack1!=null) return false; - if (stack0!=null && stack1==null) return false; - if (stack0==null && stack1==null) return true; - boolean t1=false; - if (fuzzy) { - t1=true; - int od = OreDictionary.getOreID(stack0); - if (od!=-1) { - ItemStack[] ores = OreDictionary.getOres(od).toArray(new ItemStack[]{}); - if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{stack1}, ores)) - return true; - } - } - else - t1=ItemStack.areItemStackTagsEqual(stack0, stack1); - return stack0.getItem() != stack1.getItem() ? false : (stack0.getItemDamage() != stack1.getItemDamage() ? false : (stack0.stackSize > stack0.getMaxStackSize() ? false : t1)); - } - - - public Object getRecipeOutput() { - return getRecipeOutput(this.getRecipeInput()); - } - - public AspectList getAspects() { - return getAspects(this.getRecipeInput()); - } - - public int getInstability() { - return getInstability(this.getRecipeInput()); - } - - public String getResearch() { - return research; - } - - public ItemStack getRecipeInput() { - return recipeInput; - } - - public ItemStack[] getComponents() { - return components; - } - - public Object getRecipeOutput(ItemStack input) { - return recipeOutput; - } - - public AspectList getAspects(ItemStack input) { - return aspects; - } - - public int getInstability(ItemStack input) { - return instability; - } -} diff --git a/src/api/java/thaumcraft/api/crafting/ShapedArcaneRecipe.java b/src/api/java/thaumcraft/api/crafting/ShapedArcaneRecipe.java deleted file mode 100644 index 40c7bc27..00000000 --- a/src/api/java/thaumcraft/api/crafting/ShapedArcaneRecipe.java +++ /dev/null @@ -1,261 +0,0 @@ -package thaumcraft.api.crafting; - -import java.util.ArrayList; -import java.util.HashMap; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; -import thaumcraft.api.ThaumcraftApiHelper; -import thaumcraft.api.aspects.AspectList; - -public class ShapedArcaneRecipe implements IArcaneRecipe -{ - //Added in for future ease of change, but hard coded for now. - private static final int MAX_CRAFT_GRID_WIDTH = 3; - private static final int MAX_CRAFT_GRID_HEIGHT = 3; - - public ItemStack output = null; - public Object[] input = null; - public AspectList aspects = null; - public String research; - public int width = 0; - public int height = 0; - private boolean mirrored = true; - - public ShapedArcaneRecipe(String research, Block result, AspectList aspects, Object... recipe){ this(research, new ItemStack(result), aspects, recipe); } - public ShapedArcaneRecipe(String research, Item result, AspectList aspects, Object... recipe){ this(research, new ItemStack(result), aspects, recipe); } - public ShapedArcaneRecipe(String research, ItemStack result, AspectList aspects, Object... recipe) - { - output = result.copy(); - this.research = research; - this.aspects = aspects; - String shape = ""; - - int idx = 0; - - if (recipe[idx] instanceof Boolean) - { - mirrored = (Boolean)recipe[idx]; - if (recipe[idx+1] instanceof Object[]) - { - recipe = (Object[])recipe[idx+1]; - } - else - { - idx = 1; - } - } - - if (recipe[idx] instanceof String[]) - { - String[] parts = ((String[])recipe[idx++]); - - for (String s : parts) - { - width = s.length(); - shape += s; - } - - height = parts.length; - } - else - { - while (recipe[idx] instanceof String) - { - String s = (String)recipe[idx++]; - shape += s; - width = s.length(); - height++; - } - } - - if (width * height != shape.length()) - { - String ret = "Invalid shaped ore recipe: "; - for (Object tmp : recipe) - { - ret += tmp + ", "; - } - ret += output; - throw new RuntimeException(ret); - } - - HashMap<Character, Object> itemMap = new HashMap<Character, Object>(); - - for (; idx < recipe.length; idx += 2) - { - Character chr = (Character)recipe[idx]; - Object in = recipe[idx + 1]; - - if (in instanceof ItemStack) - { - itemMap.put(chr, ((ItemStack)in).copy()); - } - else if (in instanceof Item) - { - itemMap.put(chr, new ItemStack((Item)in)); - } - else if (in instanceof Block) - { - itemMap.put(chr, new ItemStack((Block)in, 1, OreDictionary.WILDCARD_VALUE)); - } - else if (in instanceof String) - { - itemMap.put(chr, OreDictionary.getOres((String)in)); - } - else - { - String ret = "Invalid shaped ore recipe: "; - for (Object tmp : recipe) - { - ret += tmp + ", "; - } - ret += output; - throw new RuntimeException(ret); - } - } - - input = new Object[width * height]; - int x = 0; - for (char chr : shape.toCharArray()) - { - input[x++] = itemMap.get(chr); - } - } - - @Override - public ItemStack getCraftingResult(IInventory var1){ return output.copy(); } - - @Override - public int getRecipeSize(){ return input.length; } - - @Override - public ItemStack getRecipeOutput(){ return output; } - - @Override - public boolean matches(IInventory inv, World world, EntityPlayer player) - { - if (research.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), research)) { - return false; - } - for (int x = 0; x <= MAX_CRAFT_GRID_WIDTH - width; x++) - { - for (int y = 0; y <= MAX_CRAFT_GRID_HEIGHT - height; ++y) - { - if (checkMatch(inv, x, y, false)) - { - return true; - } - - if (mirrored && checkMatch(inv, x, y, true)) - { - return true; - } - } - } - - return false; - } - - private boolean checkMatch(IInventory inv, int startX, int startY, boolean mirror) - { - for (int x = 0; x < MAX_CRAFT_GRID_WIDTH; x++) - { - for (int y = 0; y < MAX_CRAFT_GRID_HEIGHT; y++) - { - int subX = x - startX; - int subY = y - startY; - Object target = null; - - if (subX >= 0 && subY >= 0 && subX < width && subY < height) - { - if (mirror) - { - target = input[width - subX - 1 + subY * width]; - } - else - { - target = input[subX + subY * width]; - } - } - - ItemStack slot = ThaumcraftApiHelper.getStackInRowAndColumn(inv, x, y); - - if (target instanceof ItemStack) - { - if (!checkItemEquals((ItemStack)target, slot)) - { - return false; - } - } - else if (target instanceof ArrayList) - { - boolean matched = false; - - for (ItemStack item : (ArrayList<ItemStack>)target) - { - matched = matched || checkItemEquals(item, slot); - } - - if (!matched) - { - return false; - } - } - else if (target == null && slot != null) - { - return false; - } - } - } - - return true; - } - - private boolean checkItemEquals(ItemStack target, ItemStack input) - { - if (input == null && target != null || input != null && target == null) - { - return false; - } - return (target.getItem() == input.getItem() && - (!target.hasTagCompound() || ItemStack.areItemStackTagsEqual(target, input)) && - (target.getItemDamage() == OreDictionary.WILDCARD_VALUE|| target.getItemDamage() == input.getItemDamage())); - } - - public ShapedArcaneRecipe setMirrored(boolean mirror) - { - mirrored = mirror; - return this; - } - - /** - * Returns the input for this recipe, any mod accessing this value should never - * manipulate the values in this array as it will effect the recipe itself. - * @return The recipes input vales. - */ - public Object[] getInput() - { - return this.input; - } - - @Override - public AspectList getAspects() { - return aspects; - } - - @Override - public AspectList getAspects(IInventory inv) { - return aspects; - } - - @Override - public String getResearch() { - return research; - } -} diff --git a/src/api/java/thaumcraft/api/crafting/ShapelessArcaneRecipe.java b/src/api/java/thaumcraft/api/crafting/ShapelessArcaneRecipe.java deleted file mode 100644 index 3d4ed508..00000000 --- a/src/api/java/thaumcraft/api/crafting/ShapelessArcaneRecipe.java +++ /dev/null @@ -1,157 +0,0 @@ -package thaumcraft.api.crafting; - -import java.util.ArrayList; -import java.util.Iterator; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; -import thaumcraft.api.ThaumcraftApiHelper; -import thaumcraft.api.aspects.AspectList; - -public class ShapelessArcaneRecipe implements IArcaneRecipe -{ - private ItemStack output = null; - private ArrayList input = new ArrayList(); - - public AspectList aspects = null; - public String research; - - public ShapelessArcaneRecipe(String research, Block result, AspectList aspects, Object... recipe){ this(research,new ItemStack(result),aspects, recipe); } - public ShapelessArcaneRecipe(String research, Item result, AspectList aspects, Object... recipe){ this(research,new ItemStack(result),aspects, recipe); } - - public ShapelessArcaneRecipe(String research, ItemStack result, AspectList aspects, Object... recipe) - { - output = result.copy(); - this.research = research; - this.aspects = aspects; - for (Object in : recipe) - { - if (in instanceof ItemStack) - { - input.add(((ItemStack)in).copy()); - } - else if (in instanceof Item) - { - input.add(new ItemStack((Item)in)); - } - else if (in instanceof Block) - { - input.add(new ItemStack((Block)in)); - } - else if (in instanceof String) - { - input.add(OreDictionary.getOres((String)in)); - } - else - { - String ret = "Invalid shapeless ore recipe: "; - for (Object tmp : recipe) - { - ret += tmp + ", "; - } - ret += output; - throw new RuntimeException(ret); - } - } - } - - @Override - public int getRecipeSize(){ return input.size(); } - - @Override - public ItemStack getRecipeOutput(){ return output; } - - @Override - public ItemStack getCraftingResult(IInventory var1){ return output.copy(); } - - @Override - public boolean matches(IInventory var1, World world, EntityPlayer player) - { - if (research.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), research)) { - return false; - } - - ArrayList required = new ArrayList(input); - - for (int x = 0; x < 9; x++) - { - ItemStack slot = var1.getStackInSlot(x); - - if (slot != null) - { - boolean inRecipe = false; - Iterator req = required.iterator(); - - while (req.hasNext()) - { - boolean match = false; - - Object next = req.next(); - - if (next instanceof ItemStack) - { - match = checkItemEquals((ItemStack)next, slot); - } - else if (next instanceof ArrayList) - { - for (ItemStack item : (ArrayList<ItemStack>)next) - { - match = match || checkItemEquals(item, slot); - } - } - - if (match) - { - inRecipe = true; - required.remove(next); - break; - } - } - - if (!inRecipe) - { - return false; - } - } - } - - return required.isEmpty(); - } - - private boolean checkItemEquals(ItemStack target, ItemStack input) - { - return (target.getItem() == input.getItem() && - (!target.hasTagCompound() || ItemStack.areItemStackTagsEqual(target, input)) && - (target.getItemDamage() == OreDictionary.WILDCARD_VALUE || target.getItemDamage() == input.getItemDamage())); - } - - /** - * Returns the input for this recipe, any mod accessing this value should never - * manipulate the values in this array as it will effect the recipe itself. - * @return The recipes input vales. - */ - public ArrayList getInput() - { - return this.input; - } - - @Override - public AspectList getAspects() { - return aspects; - } - - @Override - public AspectList getAspects(IInventory inv) { - return aspects; - } - - @Override - public String getResearch() { - return research; - } -} diff --git a/src/api/java/thaumcraft/api/damagesource/DamageSourceIndirectThaumcraftEntity.java b/src/api/java/thaumcraft/api/damagesource/DamageSourceIndirectThaumcraftEntity.java deleted file mode 100644 index 1562d052..00000000 --- a/src/api/java/thaumcraft/api/damagesource/DamageSourceIndirectThaumcraftEntity.java +++ /dev/null @@ -1,32 +0,0 @@ -package thaumcraft.api.damagesource; - -import net.minecraft.entity.Entity; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EntityDamageSourceIndirect; - -public class DamageSourceIndirectThaumcraftEntity extends EntityDamageSourceIndirect { - - private boolean fireDamage; - private float hungerDamage; - private boolean isUnblockable; - - - public DamageSourceIndirectThaumcraftEntity(String par1Str, - Entity par2Entity, Entity par3Entity) { - super(par1Str, par2Entity, par3Entity); - } - - - public DamageSource setFireDamage() - { - this.fireDamage = true; - return this; - } - - public DamageSource setDamageBypassesArmor() - { - this.isUnblockable = true; - this.hungerDamage = 0.0F; - return this; - } -} diff --git a/src/api/java/thaumcraft/api/damagesource/DamageSourceThaumcraft.java b/src/api/java/thaumcraft/api/damagesource/DamageSourceThaumcraft.java deleted file mode 100644 index 7c277f28..00000000 --- a/src/api/java/thaumcraft/api/damagesource/DamageSourceThaumcraft.java +++ /dev/null @@ -1,46 +0,0 @@ -package thaumcraft.api.damagesource; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EntityDamageSource; - -public class DamageSourceThaumcraft extends DamageSource -{ - - public static DamageSource taint = new DamageSourceThaumcraft("taint").setDamageBypassesArmor().setMagicDamage(); - public static DamageSource tentacle = new DamageSourceThaumcraft("tentacle"); - public static DamageSource swarm = new DamageSourceThaumcraft("swarm"); - - protected DamageSourceThaumcraft(String par1Str) { - super(par1Str); - } - - /** This kind of damage can be blocked or not. */ - private boolean isUnblockable = false; - private boolean isDamageAllowedInCreativeMode = false; - private float hungerDamage = 0.3F; - - /** This kind of damage is based on fire or not. */ - private boolean fireDamage; - - /** This kind of damage is based on a projectile or not. */ - private boolean projectile; - - /** - * Whether this damage source will have its damage amount scaled based on the current difficulty. - */ - private boolean difficultyScaled; - private boolean magicDamage = false; - private boolean explosion = false; - - public static DamageSource causeSwarmDamage(EntityLivingBase par0EntityLiving) - { - return new EntityDamageSource("swarm", par0EntityLiving); - } - - public static DamageSource causeTentacleDamage(EntityLivingBase par0EntityLiving) - { - return new EntityDamageSource("tentacle", par0EntityLiving); - } - -} diff --git a/src/api/java/thaumcraft/api/entities/ITaintedMob.java b/src/api/java/thaumcraft/api/entities/ITaintedMob.java deleted file mode 100644 index 83fb1fcb..00000000 --- a/src/api/java/thaumcraft/api/entities/ITaintedMob.java +++ /dev/null @@ -1,5 +0,0 @@ -package thaumcraft.api.entities; - -public interface ITaintedMob { - -} diff --git a/src/api/java/thaumcraft/api/nodes/INode.java b/src/api/java/thaumcraft/api/nodes/INode.java deleted file mode 100644 index 8c71414d..00000000 --- a/src/api/java/thaumcraft/api/nodes/INode.java +++ /dev/null @@ -1,53 +0,0 @@ -package thaumcraft.api.nodes; - -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.aspects.AspectList; -import thaumcraft.api.aspects.IAspectContainer; - -public interface INode extends IAspectContainer { - - /** - * Unique identifier to distinguish nodes. Normal node id's are based on world id and coordinates - * @return - */ - public String getId(); - - public AspectList getAspectsBase(); - - /** - * Return the type of node - * @return - */ - public NodeType getNodeType(); - - /** - * Set the type of node - * @return - */ - public void setNodeType(NodeType nodeType); - - /** - * Return the node modifier - * @return - */ - public void setNodeModifier(NodeModifier nodeModifier); - - /** - * Set the node modifier - * @return - */ - public NodeModifier getNodeModifier(); - - /** - * Return the maximum capacity of each aspect the node can hold - * @return - */ - public int getNodeVisBase(Aspect aspect); - - /** - * Set the maximum capacity of each aspect the node can hold - * @return - */ - public void setNodeVisBase(Aspect aspect, short nodeVisBase); - -} diff --git a/src/api/java/thaumcraft/api/nodes/IRevealer.java b/src/api/java/thaumcraft/api/nodes/IRevealer.java deleted file mode 100644 index 14a19b54..00000000 --- a/src/api/java/thaumcraft/api/nodes/IRevealer.java +++ /dev/null @@ -1,22 +0,0 @@ -package thaumcraft.api.nodes; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; - -/** - * - * @author Azanor - * - * Equipped head slot items that extend this class will make nodes visible in world. - * - */ - -public interface IRevealer { - - /* - * If this method returns true the nodes will be visible. - */ - public boolean showNodes(ItemStack itemstack, EntityLivingBase player); - - -} diff --git a/src/api/java/thaumcraft/api/nodes/NodeModifier.java b/src/api/java/thaumcraft/api/nodes/NodeModifier.java deleted file mode 100644 index 885b8678..00000000 --- a/src/api/java/thaumcraft/api/nodes/NodeModifier.java +++ /dev/null @@ -1,6 +0,0 @@ -package thaumcraft.api.nodes; - -public enum NodeModifier -{ - BRIGHT, PALE, FADING -} \ No newline at end of file diff --git a/src/api/java/thaumcraft/api/nodes/NodeType.java b/src/api/java/thaumcraft/api/nodes/NodeType.java deleted file mode 100644 index 355324b5..00000000 --- a/src/api/java/thaumcraft/api/nodes/NodeType.java +++ /dev/null @@ -1,6 +0,0 @@ -package thaumcraft.api.nodes; - -public enum NodeType -{ - NORMAL, UNSTABLE, DARK, TAINTED, HUNGRY, PURE -} \ No newline at end of file diff --git a/src/api/java/thaumcraft/api/package-info.java b/src/api/java/thaumcraft/api/package-info.java deleted file mode 100644 index 0de39267..00000000 --- a/src/api/java/thaumcraft/api/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -@API(owner = "Thaumcraft", apiVersion = "4.2.0.0", provides = "Thaumcraft|API") -package thaumcraft.api; - -import cpw.mods.fml.common.API; diff --git a/src/api/java/thaumcraft/api/potions/PotionFluxTaint.java b/src/api/java/thaumcraft/api/potions/PotionFluxTaint.java deleted file mode 100644 index b718de4b..00000000 --- a/src/api/java/thaumcraft/api/potions/PotionFluxTaint.java +++ /dev/null @@ -1,67 +0,0 @@ -package thaumcraft.api.potions; - -import net.minecraft.client.Minecraft; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; -import thaumcraft.api.damagesource.DamageSourceThaumcraft; -import thaumcraft.api.entities.ITaintedMob; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class PotionFluxTaint extends Potion -{ - public static PotionFluxTaint instance = null; // will be instantiated at runtime - private int statusIconIndex = -1; - - public PotionFluxTaint(int par1, boolean par2, int par3) - { - super(par1,par2,par3); - setIconIndex(0, 0); - } - - public static void init() - { - instance.setPotionName("potion.fluxtaint"); - instance.setIconIndex(3, 1); - instance.setEffectiveness(0.25D); - } - - @Override - public boolean isBadEffect() { - return true; - } - - @Override - @SideOnly(Side.CLIENT) - public int getStatusIconIndex() { - Minecraft.getMinecraft().renderEngine.bindTexture(rl); - return super.getStatusIconIndex(); - } - - ResourceLocation rl = new ResourceLocation("thaumcraft","textures/misc/potions.png"); - - @Override - public void performEffect(EntityLivingBase target, int par2) { - if (target instanceof ITaintedMob) { - target.heal(1); - } else - if (!target.isEntityUndead() && !(target instanceof EntityPlayer)) - { - target.attackEntityFrom(DamageSourceThaumcraft.taint, 1); - } - else - if (!target.isEntityUndead() && (target.getMaxHealth() > 1 || (target instanceof EntityPlayer))) - { - target.attackEntityFrom(DamageSourceThaumcraft.taint, 1); - } - } - - public boolean isReady(int par1, int par2) - { - int k = 40 >> par2; - return k > 0 ? par1 % k == 0 : true; - } - -} diff --git a/src/api/java/thaumcraft/api/research/IScanEventHandler.java b/src/api/java/thaumcraft/api/research/IScanEventHandler.java deleted file mode 100644 index d0efac5f..00000000 --- a/src/api/java/thaumcraft/api/research/IScanEventHandler.java +++ /dev/null @@ -1,9 +0,0 @@ -package thaumcraft.api.research; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public interface IScanEventHandler { - ScanResult scanPhenomena(ItemStack stack, World world, EntityPlayer player); -} diff --git a/src/api/java/thaumcraft/api/research/ResearchCategories.java b/src/api/java/thaumcraft/api/research/ResearchCategories.java deleted file mode 100644 index 82309b36..00000000 --- a/src/api/java/thaumcraft/api/research/ResearchCategories.java +++ /dev/null @@ -1,101 +0,0 @@ -package thaumcraft.api.research; - -import java.util.Collection; -import java.util.LinkedHashMap; - -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; - -import org.apache.logging.log4j.Level; - -import cpw.mods.fml.common.FMLLog; - -public class ResearchCategories { - - //Research - public static LinkedHashMap <String, ResearchCategoryList> researchCategories = new LinkedHashMap <String,ResearchCategoryList>(); - - /** - * @param key - * @return the research item linked to this key - */ - public static ResearchCategoryList getResearchList(String key) { - return researchCategories.get(key); - } - - /** - * @param key - * @return the name of the research category linked to this key. - * Must be stored as localization information in the LanguageRegistry. - */ - public static String getCategoryName(String key) { - return StatCollector.translateToLocal("tc.research_category."+key); - } - - /** - * @param key the research key - * @return the ResearchItem object. - */ - public static ResearchItem getResearch(String key) { - Collection rc = researchCategories.values(); - for (Object cat:rc) { - Collection rl = ((ResearchCategoryList)cat).research.values(); - for (Object ri:rl) { - if ((((ResearchItem)ri).key).equals(key)) return (ResearchItem)ri; - } - } - return null; - } - - /** - * This should only be done at the PostInit stage - * @param key the key used for this category - * @param icon the icon to be used for the research category tab - * @param background the resource location of the background image to use for this category - * @return the name of the research linked to this key - */ - public static void registerCategory(String key, ResourceLocation icon, ResourceLocation background) { - if (getResearchList(key)==null) { - ResearchCategoryList rl = new ResearchCategoryList(icon, background); - researchCategories.put(key, rl); - } - } - - public static void addResearch(ResearchItem ri) { - ResearchCategoryList rl = getResearchList(ri.category); - if (rl!=null && !rl.research.containsKey(ri.key)) { - - if (!ri.isVirtual()) { - for (ResearchItem rr:rl.research.values()) { - if (rr.displayColumn == ri.displayColumn && rr.displayRow == ri.displayRow) { - FMLLog.log(Level.FATAL, "[Thaumcraft] Research ["+ri.getName()+"] not added as it overlaps with existing research ["+rr.getName()+"]"); - return; - } - } - } - - - rl.research.put(ri.key, ri); - - if (ri.displayColumn < rl.minDisplayColumn) - { - rl.minDisplayColumn = ri.displayColumn; - } - - if (ri.displayRow < rl.minDisplayRow) - { - rl.minDisplayRow = ri.displayRow; - } - - if (ri.displayColumn > rl.maxDisplayColumn) - { - rl.maxDisplayColumn = ri.displayColumn; - } - - if (ri.displayRow > rl.maxDisplayRow) - { - rl.maxDisplayRow = ri.displayRow; - } - } - } -} diff --git a/src/api/java/thaumcraft/api/research/ResearchCategoryList.java b/src/api/java/thaumcraft/api/research/ResearchCategoryList.java deleted file mode 100644 index 7eed0101..00000000 --- a/src/api/java/thaumcraft/api/research/ResearchCategoryList.java +++ /dev/null @@ -1,37 +0,0 @@ -package thaumcraft.api.research; - -import java.util.HashMap; -import java.util.Map; - -import net.minecraft.util.ResourceLocation; - -public class ResearchCategoryList { - - /** Is the smallest column used on the GUI. */ - public int minDisplayColumn; - - /** Is the smallest row used on the GUI. */ - public int minDisplayRow; - - /** Is the biggest column used on the GUI. */ - public int maxDisplayColumn; - - /** Is the biggest row used on the GUI. */ - public int maxDisplayRow; - - /** display variables **/ - public ResourceLocation icon; - public ResourceLocation background; - - public ResearchCategoryList(ResourceLocation icon, ResourceLocation background) { - this.icon = icon; - this.background = background; - } - - //Research - public Map<String, ResearchItem> research = new HashMap<String,ResearchItem>(); - - - - -} diff --git a/src/api/java/thaumcraft/api/research/ResearchItem.java b/src/api/java/thaumcraft/api/research/ResearchItem.java deleted file mode 100644 index 55b3820c..00000000 --- a/src/api/java/thaumcraft/api/research/ResearchItem.java +++ /dev/null @@ -1,367 +0,0 @@ -package thaumcraft.api.research; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.aspects.AspectList; - -public class ResearchItem -{ - /** - * A short string used as a key for this research. Must be unique - */ - public final String key; - - /** - * A short string used as a reference to the research category to which this must be added. - */ - public final String category; - - /** - * The aspect tags and their values required to complete this research - */ - public final AspectList tags; - - /** - * This links to any research that needs to be completed before this research can be discovered or learnt. - */ - public String[] parents = null; - - /** - * Like parent above, but a line will not be displayed in the thaumonomicon linking them. Just used to prevent clutter. - */ - public String[] parentsHidden = null; - /** - * any research linked to this that will be unlocked automatically when this research is complete - */ - public String[] siblings = null; - - /** - * the horizontal position of the research icon - */ - public final int displayColumn; - - /** - * the vertical position of the research icon - */ - public final int displayRow; - - /** - * the icon to be used for this research - */ - public final ItemStack icon_item; - - /** - * the icon to be used for this research - */ - public final ResourceLocation icon_resource; - - /** - * How large the research grid is. Valid values are 1 to 3. - */ - private int complexity; - - /** - * Special research has a spiky border. Used for important research milestones. - */ - private boolean isSpecial; - - /** - * Research that can be directly purchased with RP in normal research difficulty. - */ - private boolean isSecondary; - - /** - * This indicates if the research should use a circular icon border. Usually used for "passive" research - * that doesn't have recipes and grants passive effects, or that unlock automatically. - */ - private boolean isRound; - - /** - * Stub research cannot be discovered by normal means, but can be unlocked via the sibling system. - */ - private boolean isStub; - - /** - * This indicated that the research is completely hidden and cannot be discovered by any - * player-controlled means. The recipes will never show up in the thaumonomicon. - * Usually used to unlock "hidden" recipes via sibling unlocking, like - * the various cap and rod combos for wands. - */ - private boolean isVirtual; - - @Deprecated - private boolean isLost; - - /** - * Concealed research does not display in the thaumonomicon until parent researches are discovered. - */ - private boolean isConcealed; - - /** - * Hidden research can only be discovered via scanning or knowledge fragments - */ - private boolean isHidden; - - /** - * These research items will automatically unlock for all players on game start - */ - private boolean isAutoUnlock; - - /** - * Scanning these items will have a chance of revealing hidden knowledge in the thaumonomicon - */ - private ItemStack[] itemTriggers; - - /** - * Scanning these entities will have a chance of revealing hidden knowledge in the thaumonomicon - */ - private String[] entityTriggers; - - /** - * Scanning things with these aspects will have a chance of revealing hidden knowledge in the thaumonomicon - */ - private Aspect[] aspectTriggers; - - private ResearchPage[] pages = null; - - public ResearchItem(String key, String category) - { - this.key = key; - this.category = category; - this.tags = new AspectList(); - this.icon_resource = null; - this.icon_item = null; - this.displayColumn = 0; - this.displayRow = 0; - this.setVirtual(); - - } - - public ResearchItem(String key, String category, AspectList tags, int col, int row, int complex, ResourceLocation icon) - { - this.key = key; - this.category = category; - this.tags = tags; - this.icon_resource = icon; - this.icon_item = null; - this.displayColumn = col; - this.displayRow = row; - this.complexity = complex; - if (complexity < 1) this.complexity = 1; - if (complexity > 3) this.complexity = 3; - } - - public ResearchItem(String key, String category, AspectList tags, int col, int row, int complex, ItemStack icon) - { - this.key = key; - this.category = category; - this.tags = tags; - this.icon_item = icon; - this.icon_resource = null; - this.displayColumn = col; - this.displayRow = row; - this.complexity = complex; - if (complexity < 1) this.complexity = 1; - if (complexity > 3) this.complexity = 3; - } - - public ResearchItem setSpecial() - { - this.isSpecial = true; - return this; - } - - public ResearchItem setStub() - { - this.isStub = true; - return this; - } - - @Deprecated - public ResearchItem setLost() - { - this.isLost = true; - return this; - } - - public ResearchItem setConcealed() - { - this.isConcealed = true; - return this; - } - - public ResearchItem setHidden() - { - this.isHidden = true; - return this; - } - - public ResearchItem setVirtual() - { - this.isVirtual = true; - return this; - } - - public ResearchItem setParents(String... par) - { - this.parents = par; - return this; - } - - - - public ResearchItem setParentsHidden(String... par) - { - this.parentsHidden = par; - return this; - } - - public ResearchItem setSiblings(String... sib) - { - this.siblings = sib; - return this; - } - - public ResearchItem setPages(ResearchPage... par) - { - this.pages = par; - return this; - } - - public ResearchPage[] getPages() { - return pages; - } - - public ResearchItem setItemTriggers(ItemStack... par) - { - this.itemTriggers = par; - return this; - } - - public ResearchItem setEntityTriggers(String... par) - { - this.entityTriggers = par; - return this; - } - - public ResearchItem setAspectTriggers(Aspect... par) - { - this.aspectTriggers = par; - return this; - } - - public ItemStack[] getItemTriggers() { - return itemTriggers; - } - - public String[] getEntityTriggers() { - return entityTriggers; - } - - public Aspect[] getAspectTriggers() { - return aspectTriggers; - } - - public ResearchItem registerResearchItem() - { - ResearchCategories.addResearch(this); - return this; - } - - public String getName() - { - return StatCollector.translateToLocal("tc.research_name."+key); - } - - public String getText() - { - return StatCollector.translateToLocal("tc.research_text."+key); - } - - public boolean isSpecial() - { - return this.isSpecial; - } - - public boolean isStub() - { - return this.isStub; - } - - @Deprecated - public boolean isLost() - { - return this.isLost; - } - - public boolean isConcealed() - { - return this.isConcealed; - } - - public boolean isHidden() - { - return this.isHidden; - } - - public boolean isVirtual() - { - return this.isVirtual; - } - - public boolean isAutoUnlock() { - return isAutoUnlock; - } - - public ResearchItem setAutoUnlock() - { - this.isAutoUnlock = true; - return this; - } - - public boolean isRound() { - return isRound; - } - - public ResearchItem setRound() { - this.isRound = true; - return this; - } - - public boolean isSecondary() { - return isSecondary; - } - - public ResearchItem setSecondary() { - this.isSecondary = true; - return this; - } - - public int getComplexity() { - return complexity; - } - - public ResearchItem setComplexity(int complexity) { - this.complexity = complexity; - return this; - } - - /** - * @return the aspect aspects ordinal with the highest value. Used to determine scroll color and similar things - */ - public Aspect getResearchPrimaryTag() { - Aspect aspect=null; - int highest=0; - if (tags!=null) - for (Aspect tag:tags.getAspects()) { - if (tags.getAmount(tag)>highest) { - aspect=tag; - highest=tags.getAmount(tag); - }; - } - return aspect; - } - -} diff --git a/src/api/java/thaumcraft/api/research/ResearchPage.java b/src/api/java/thaumcraft/api/research/ResearchPage.java deleted file mode 100644 index fdada843..00000000 --- a/src/api/java/thaumcraft/api/research/ResearchPage.java +++ /dev/null @@ -1,193 +0,0 @@ -package thaumcraft.api.research; - -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; -import thaumcraft.api.aspects.AspectList; -import thaumcraft.api.crafting.CrucibleRecipe; -import thaumcraft.api.crafting.IArcaneRecipe; -import thaumcraft.api.crafting.InfusionEnchantmentRecipe; -import thaumcraft.api.crafting.InfusionRecipe; - -public class ResearchPage { - public static enum PageType - { - TEXT, - TEXT_CONCEALED, - IMAGE, - CRUCIBLE_CRAFTING, - ARCANE_CRAFTING, - ASPECTS, - NORMAL_CRAFTING, - INFUSION_CRAFTING, - COMPOUND_CRAFTING, - INFUSION_ENCHANTMENT, - SMELTING - } - - public PageType type = PageType.TEXT; - - public String text=null; - public String research=null; - public ResourceLocation image=null; - public AspectList aspects=null; - public Object recipe=null; - public ItemStack recipeOutput=null; - - /** - * @param text this can (but does not have to) be a reference to a localization variable, not the actual text. - */ - public ResearchPage(String text) { - this.type = PageType.TEXT; - this.text = text; - } - - /** - * @param research this page will only be displayed if the player has discovered this research - * @param text this can (but does not have to) be a reference to a localization variable, not the actual text. - */ - public ResearchPage(String research, String text) { - this.type = PageType.TEXT_CONCEALED; - this.research = research; - this.text = text; - } - - /** - * @param recipe a vanilla crafting recipe. - */ - public ResearchPage(IRecipe recipe) { - this.type = PageType.NORMAL_CRAFTING; - this.recipe = recipe; - this.recipeOutput = recipe.getRecipeOutput(); - } - - /** - * @param recipe a collection of vanilla crafting recipes. - */ - public ResearchPage(IRecipe[] recipe) { - this.type = PageType.NORMAL_CRAFTING; - this.recipe = recipe; - } - - /** - * @param recipe a collection of arcane crafting recipes. - */ - public ResearchPage(IArcaneRecipe[] recipe) { - this.type = PageType.ARCANE_CRAFTING; - this.recipe = recipe; - } - - /** - * @param recipe a collection of arcane crafting recipes. - */ - public ResearchPage(CrucibleRecipe[] recipe) { - this.type = PageType.CRUCIBLE_CRAFTING; - this.recipe = recipe; - } - - /** - * @param recipe a collection of infusion crafting recipes. - */ - public ResearchPage(InfusionRecipe[] recipe) { - this.type = PageType.INFUSION_CRAFTING; - this.recipe = recipe; - } - - /** - * @param recipe a compound crafting recipe. - */ - public ResearchPage(List recipe) { - this.type = PageType.COMPOUND_CRAFTING; - this.recipe = recipe; - } - - /** - * @param recipe an arcane worktable crafting recipe. - */ - public ResearchPage(IArcaneRecipe recipe) { - this.type = PageType.ARCANE_CRAFTING; - this.recipe = recipe; - this.recipeOutput = recipe.getRecipeOutput(); - } - - /** - * @param recipe an alchemy crafting recipe. - */ - public ResearchPage(CrucibleRecipe recipe) { - this.type = PageType.CRUCIBLE_CRAFTING; - this.recipe = recipe; - this.recipeOutput = recipe.getRecipeOutput(); - } - - /** - * @param recipe a furnace smelting crafting recipe. - */ - public ResearchPage(ItemStack input) { - this.type = PageType.SMELTING; - this.recipe = input; - this.recipeOutput = FurnaceRecipes.smelting().getSmeltingResult(input); - } - - /** - * @param recipe an infusion crafting recipe. - */ - public ResearchPage(InfusionRecipe recipe) { - this.type = PageType.INFUSION_CRAFTING; - this.recipe = recipe; - if (recipe.getRecipeOutput() instanceof ItemStack) { - this.recipeOutput = (ItemStack) recipe.getRecipeOutput(); - } else { - this.recipeOutput = recipe.getRecipeInput(); - } - } - - /** - * @param recipe an infusion crafting recipe. - */ - public ResearchPage(InfusionEnchantmentRecipe recipe) { - this.type = PageType.INFUSION_ENCHANTMENT; - this.recipe = recipe; -// if (recipe.recipeOutput instanceof ItemStack) { -// this.recipeOutput = (ItemStack) recipe.recipeOutput; -// } else { -// this.recipeOutput = recipe.recipeInput; -// } - } - - /** - * @param image - * @param caption this can (but does not have to) be a reference to a localization variable, not the actual text. - */ - public ResearchPage(ResourceLocation image, String caption) { - this.type = PageType.IMAGE; - this.image = image; - this.text = caption; - } - - /** - * This function should really not be called directly - used internally - */ - public ResearchPage(AspectList as) { - this.type = PageType.ASPECTS; - this.aspects = as; - } - - /** - * returns a localized text of the text field (if one exists). Returns the text field itself otherwise. - * @return - */ - public String getTranslatedText() { - String ret=""; - if (text != null) { - ret = StatCollector.translateToLocal(text); - if (ret.isEmpty()) ret = text; - } - return ret; - } - - -} diff --git a/src/api/java/thaumcraft/api/research/ScanResult.java b/src/api/java/thaumcraft/api/research/ScanResult.java deleted file mode 100644 index e1498f31..00000000 --- a/src/api/java/thaumcraft/api/research/ScanResult.java +++ /dev/null @@ -1,39 +0,0 @@ -package thaumcraft.api.research; - -import net.minecraft.entity.Entity; - -public class ScanResult { - public byte type = 0; //1=blocks,2=entities,3=phenomena - public int id; - public int meta; - public Entity entity; - public String phenomena; - - public ScanResult(byte type, int blockId, int blockMeta, Entity entity, - String phenomena) { - super(); - this.type = type; - this.id = blockId; - this.meta = blockMeta; - this.entity = entity; - this.phenomena = phenomena; - } - - @Override - public boolean equals(Object obj) { - if (obj instanceof ScanResult) { - ScanResult sr = (ScanResult) obj; - if (type != sr.type) - return false; - if (type == 1 - && (id != sr.id || meta != sr.meta)) - return false; - if (type == 2 && entity.getEntityId() != sr.entity.getEntityId()) - return false; - if (type == 3 && !phenomena.equals(sr.phenomena)) - return false; - } - return true; - } - -} diff --git a/src/api/java/thaumcraft/api/visnet/TileVisNode.java b/src/api/java/thaumcraft/api/visnet/TileVisNode.java deleted file mode 100644 index 84b1400d..00000000 --- a/src/api/java/thaumcraft/api/visnet/TileVisNode.java +++ /dev/null @@ -1,188 +0,0 @@ -package thaumcraft.api.visnet; - -import java.lang.ref.WeakReference; -import java.util.ArrayList; -import java.util.HashMap; - -import thaumcraft.api.TileThaumcraft; -import thaumcraft.api.WorldCoordinates; -import thaumcraft.api.aspects.Aspect; - -/** - * @author Azanor - * - * The tile entity used by nodes in the vis energy network. A node is either a source (like an aura node), - * a transport relay or vis receiver (like the infernal furnace). - * - */ -public abstract class TileVisNode extends TileThaumcraft { - - WeakReference<TileVisNode> parent = null; - ArrayList<WeakReference<TileVisNode>> children = new ArrayList<WeakReference<TileVisNode>>(); - - /** - * @return the WorldCoordinates location of where this node is located - */ - public WorldCoordinates getLocation() { - return new WorldCoordinates(this); - } - - /** - * @return the number of blocks away this node will check for parent nodes to connect to. - */ - public abstract int getRange(); - - /** - * @return true if this is the source or root node of the vis network. - */ - public abstract boolean isSource(); - - /** - * This method should never be called directly. Use VisNetHandler.drainVis() instead - * @param aspect what aspect to drain - * @param vis how much to drain - * @return how much was actually drained - */ - public int consumeVis(Aspect aspect, int vis) { - if (VisNetHandler.isNodeValid(getParent())) { - int out = getParent().get().consumeVis(aspect, vis); - if (out>0) { - triggerConsumeEffect(aspect); - } - return out; - } - return 0; - } - - public void removeThisNode() { - for (WeakReference<TileVisNode> n:getChildren()) { - if (n!=null && n.get()!=null) { - n.get().removeThisNode(); - } - } - - children = new ArrayList<WeakReference<TileVisNode>>(); - if (VisNetHandler.isNodeValid(this.getParent())) { - this.getParent().get().nodeRefresh=true; - } - this.setParent(null); - this.parentChanged(); - - if (this.isSource()) { - HashMap<WorldCoordinates, WeakReference<TileVisNode>> sourcelist = VisNetHandler.sources.get(worldObj.provider.dimensionId); - if (sourcelist==null) { - sourcelist = new HashMap<WorldCoordinates, WeakReference<TileVisNode>>(); - } - sourcelist.remove(getLocation()); - VisNetHandler.sources.put( worldObj.provider.dimensionId, sourcelist ); - } - - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - } - - - - @Override - public void invalidate() { - removeThisNode(); - super.invalidate(); - } - - public void triggerConsumeEffect(Aspect aspect) { } - - /** - * @return - */ - public WeakReference<TileVisNode> getParent() { - return parent; - } - - /** - * @return - */ - public WeakReference<TileVisNode> getRootSource() { - return VisNetHandler.isNodeValid(getParent()) ? - getParent().get().getRootSource() : this.isSource() ? - new WeakReference(this) : null; - } - - /** - * @param parent - */ - public void setParent(WeakReference<TileVisNode> parent) { - this.parent = parent; - } - - /** - * @return - */ - public ArrayList<WeakReference<TileVisNode>> getChildren() { - return children; - } - - @Override - public boolean canUpdate() { - return true; - } - - protected int nodeCounter = 0; - private boolean nodeRegged = false; - public boolean nodeRefresh = false; - - @Override - public void updateEntity() { - - if (!worldObj.isRemote && ((nodeCounter++) % 40==0 || nodeRefresh)) { - //check for changes - if (!nodeRefresh && children.size()>0) { - for (WeakReference<TileVisNode> n:children) { - if (n==null || n.get()==null) { - nodeRefresh=true; - break; - } - } - } - - //refresh linked nodes - if (nodeRefresh) { - for (WeakReference<TileVisNode> n:children) { - if (n.get()!=null) { - n.get().nodeRefresh=true; - } - } - children.clear(); - parent=null; - } - - //redo stuff - if (isSource() && !nodeRegged) { - VisNetHandler.addSource(getWorldObj(), this); - nodeRegged = true; - } else - if (!isSource() && !VisNetHandler.isNodeValid(getParent())) { - setParent(VisNetHandler.addNode(getWorldObj(), this)); - nodeRefresh=true; - } - - if (nodeRefresh) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - parentChanged(); - } - nodeRefresh=false; - } - - } - - public void parentChanged() { } - - /** - * @return the type of shard this is attuned to: - * none -1, air 0, fire 1, water 2, earth 3, order 4, entropy 5 - * Should return -1 for most implementations - */ - public byte getAttunement() { - return -1; - } - - -} diff --git a/src/api/java/thaumcraft/api/visnet/VisNetHandler.java b/src/api/java/thaumcraft/api/visnet/VisNetHandler.java deleted file mode 100644 index 23e01ccf..00000000 --- a/src/api/java/thaumcraft/api/visnet/VisNetHandler.java +++ /dev/null @@ -1,284 +0,0 @@ -package thaumcraft.api.visnet; - -import java.lang.ref.WeakReference; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashMap; - -import net.minecraft.world.World; -import thaumcraft.api.WorldCoordinates; -import thaumcraft.api.aspects.Aspect; -import cpw.mods.fml.common.FMLLog; - -public class VisNetHandler { - - // / NODE DRAINING - /** - * This method drains vis from a relay or source near the passed in - * location. The amount received can be less than the amount requested so - * take that into account. - * - * @param world - * @param x the x position of the draining block or entity - * @param y the y position of the draining block or entity - * @param z the z position of the draining block or entity - * @param aspect what aspect to drain - * @param vis how much to drain - * @return how much was actually drained - */ - public static int drainVis(World world, int x, int y, int z, Aspect aspect, int amount) { - - int drainedAmount = 0; - - WorldCoordinates drainer = new WorldCoordinates(x, y, z, - world.provider.dimensionId); - if (!nearbyNodes.containsKey(drainer)) { - calculateNearbyNodes(world, x, y, z); - } - - ArrayList<WeakReference<TileVisNode>> nodes = nearbyNodes.get(drainer); - if (nodes!=null && nodes.size()>0) - for (WeakReference<TileVisNode> noderef : nodes) { - - TileVisNode node = noderef.get(); - - if (node == null) continue; - - int a = node.consumeVis(aspect, amount); - drainedAmount += a; - amount -= a; - if (a>0) { - int color = Aspect.getPrimalAspects().indexOf(aspect); - generateVisEffect(world.provider.dimensionId, x, y, z, node.xCoord, node.yCoord, node.zCoord, color); - } - if (amount <= 0) { - break; - } - } - - return drainedAmount; - } - - static Method generateVisEffect; - public static void generateVisEffect(int dim, int x, int y, int z, int x2, int y2, int z2, int color) { - try { - if(generateVisEffect == null) { - Class fake = Class.forName("thaumcraft.common.lib.Utils"); - generateVisEffect = fake.getMethod("generateVisEffect", int.class, int.class, int.class, int.class, int.class, int.class, int.class, int.class); - } - generateVisEffect.invoke(null, dim, x,y,z,x2,y2,z2,color); - } catch(Exception ex) { - FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.Utils method generateVisEffect"); - } - } - - public static HashMap<Integer, HashMap<WorldCoordinates, WeakReference<TileVisNode>>> sources = new HashMap<Integer, HashMap<WorldCoordinates, WeakReference<TileVisNode>>>(); - - public static void addSource(World world, TileVisNode vs) { - HashMap<WorldCoordinates, WeakReference<TileVisNode>> sourcelist = sources - .get(world.provider.dimensionId); - if (sourcelist == null) { - sourcelist = new HashMap<WorldCoordinates, WeakReference<TileVisNode>>(); - } - sourcelist.put(vs.getLocation(), new WeakReference(vs)); - sources.put(world.provider.dimensionId, sourcelist); - nearbyNodes.clear(); - } - - public static boolean isNodeValid(WeakReference<TileVisNode> node) { - if (node == null || node.get() == null || node.get().isInvalid()) - return false; - return true; - } - - public static WeakReference<TileVisNode> addNode(World world, TileVisNode vn) { - WeakReference ref = new WeakReference(vn); - - HashMap<WorldCoordinates, WeakReference<TileVisNode>> sourcelist = sources - .get(world.provider.dimensionId); - if (sourcelist == null) { - sourcelist = new HashMap<WorldCoordinates, WeakReference<TileVisNode>>(); - return null; - } - - ArrayList<Object[]> nearby = new ArrayList<Object[]>(); - - for (WeakReference<TileVisNode> root : sourcelist.values()) { - if (!isNodeValid(root)) - continue; - - TileVisNode source = root.get(); - - float r = inRange(world, vn.getLocation(), source.getLocation(), - vn.getRange()); - if (r > 0) { - nearby.add(new Object[] { source, r - vn.getRange() * 2 }); - } - nearby = findClosestNodes(vn, source, nearby); - } - - float dist = Float.MAX_VALUE; - TileVisNode closest = null; - if (nearby.size() > 0) { - for (Object[] o : nearby) { - if ((Float) o[1] < dist) {// && canNodeBeSeen(vn,(TileVisNode) - // o[0])) { - dist = (Float) o[1]; - closest = (TileVisNode) o[0]; - } - } - } - if (closest != null) { - closest.getChildren().add(ref); - nearbyNodes.clear(); - return new WeakReference(closest); - } - - return null; - } - - public static ArrayList<Object[]> findClosestNodes(TileVisNode target, - TileVisNode root, ArrayList<Object[]> in) { - TileVisNode closestChild = null; - - for (WeakReference<TileVisNode> child : root.getChildren()) { - TileVisNode n = child.get(); - - if (n != null - && !n.equals(target) - && !n.equals(root) - && (target.getAttunement() == -1 || n.getAttunement() == -1 || n - .getAttunement() == target.getAttunement())) { - - float r2 = inRange(n.getWorldObj(), n.getLocation(), - target.getLocation(), target.getRange()); - if (r2 > 0) { - in.add(new Object[] { n, r2 }); - } - - in = findClosestNodes(target, n, in); - } - } - return in; - } - - private static float inRange(World world, WorldCoordinates cc1, - WorldCoordinates cc2, int range) { - float distance = cc1.getDistanceSquaredToWorldCoordinates(cc2); - return distance > range * range ? -1 : distance; - } - - private static HashMap<WorldCoordinates, ArrayList<WeakReference<TileVisNode>>> nearbyNodes = new HashMap<WorldCoordinates, ArrayList<WeakReference<TileVisNode>>>(); - - private static void calculateNearbyNodes(World world, int x, int y, int z) { - - HashMap<WorldCoordinates, WeakReference<TileVisNode>> sourcelist = sources - .get(world.provider.dimensionId); - if (sourcelist == null) { - sourcelist = new HashMap<WorldCoordinates, WeakReference<TileVisNode>>(); - return; - } - - ArrayList<WeakReference<TileVisNode>> cn = new ArrayList<WeakReference<TileVisNode>>(); - WorldCoordinates drainer = new WorldCoordinates(x, y, z, - world.provider.dimensionId); - - ArrayList<Object[]> nearby = new ArrayList<Object[]>(); - - for (WeakReference<TileVisNode> root : sourcelist.values()) { - - if (!isNodeValid(root)) - continue; - - TileVisNode source = root.get(); - - TileVisNode closest = null; - float range = Float.MAX_VALUE; - - float r = inRange(world, drainer, source.getLocation(), - source.getRange()); - if (r > 0) { - range = r; - closest = source; - } - - ArrayList<WeakReference<TileVisNode>> children = new ArrayList<WeakReference<TileVisNode>>(); - children = getAllChildren(source,children); - - for (WeakReference<TileVisNode> child : children) { - TileVisNode n = child.get(); - if (n != null && !n.equals(root)) { - - float r2 = inRange(n.getWorldObj(), n.getLocation(), - drainer, n.getRange()); - if (r2 > 0 && r2 < range) { - range = r2; - closest = n; - } - } - } - - if (closest != null) { - - cn.add(new WeakReference(closest)); - } - } - - nearbyNodes.put(drainer, cn); - } - - private static ArrayList<WeakReference<TileVisNode>> getAllChildren(TileVisNode source, ArrayList<WeakReference<TileVisNode>> list) { - for (WeakReference<TileVisNode> child : source.getChildren()) { - TileVisNode n = child.get(); - if (n != null) { - list.add(child); - list = getAllChildren(n,list); - } - } - return list; - } - - // public static boolean canNodeBeSeen(TileVisNode source,TileVisNode - // target) - // { - // double d = Math.sqrt(source.getDistanceFrom(target.xCoord, target.yCoord, - // target.zCoord)); - // double xd = (source.xCoord-target.xCoord) / d; - // double yd = (source.yCoord-target.yCoord) / d; - // double zd = (source.zCoord-target.zCoord) / d; - // return source.getWorldObj().rayTraceBlocks( - // SpellHelper.createVec3(source.xCoord-xd+.5+.5, source.yCoord-yd, - // source.zCoord-zd), - // SpellHelper.createVec3(target.xCoord+.5, target.yCoord+.5, - // target.zCoord+.5)) == null; - // } - - // public static HashMap<WorldCoordinates,WeakReference<TileVisNode>> - // noderef = new HashMap<WorldCoordinates,WeakReference<TileVisNode>>(); - // - // public static TileVisNode getClosestNodeWithinRadius(World world, int x, - // int y, int z, int radius) { - // TileVisNode out = null; - // WorldCoordinates wc = null; - // float cd = Float.MAX_VALUE; - // for (int sx = x - radius; sx <= x + radius; sx++) { - // for (int sy = y - radius; sy <= y + radius; sy++) { - // for (int sz = z - radius; sz <= z + radius; sz++) { - // wc = new WorldCoordinates(sx,sy,sz,world.provider.dimensionId); - // if (noderef.containsKey(wc)) { - // float d = wc.getDistanceSquared(x, y, z); - // if (d<radius*radius && noderef.get(wc).get()!=null && - // !noderef.get(wc).get().isReceiver() && - // isNodeValid(noderef.get(wc).get().getParent()) - // ) { - // out = noderef.get(wc).get(); - // cd = d; - // } - // } - // } - // } - // } - // return out; - // } - -} diff --git a/src/api/java/thaumcraft/api/wands/IWandFocus.java b/src/api/java/thaumcraft/api/wands/IWandFocus.java deleted file mode 100644 index da4b9ae9..00000000 --- a/src/api/java/thaumcraft/api/wands/IWandFocus.java +++ /dev/null @@ -1,64 +0,0 @@ -package thaumcraft.api.wands; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; -import thaumcraft.api.aspects.AspectList; - - -public interface IWandFocus { - - public enum WandFocusAnimation { - WAVE, CHARGE; - } - - /** - * @return The color the focus should be changed to. - */ - public int getFocusColor(); - - /** - * @return An icon that will be drawn as a block inside the focus "block". - */ - IIcon getFocusDepthLayerIcon(); - - public IIcon getOrnament(); - - public WandFocusAnimation getAnimation(); - - /** - * Gets the amount of vis used per aspect per click or tick. This cost is actually listed as - * a hundredth of a single point of vis, so a cost of 100 will equal one vis per tick/click. - * It is returned as an AspectList to allow for multiple vis types in different ratios. - */ - public AspectList getVisCost(); - - public boolean isVisCostPerTick(); - - public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition); - - public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count); - - public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, EntityPlayer player, int count); - - /** - * Helper method to determine in what order foci should be iterated through when - * the user presses the 'change focus' keybinding. - * @return a string of characters that foci will be sorted against. - * For example AA00 will be placed before FG12 - * <br>As a guide build the sort string from two alphanumeric characters followed by - * two numeric characters based on... whatever. - */ - public String getSortingHelper(ItemStack itemstack); - - boolean onFocusBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player); - - public boolean acceptsEnchant(int id); - - - - - -} diff --git a/src/api/java/thaumcraft/api/wands/IWandRodOnUpdate.java b/src/api/java/thaumcraft/api/wands/IWandRodOnUpdate.java deleted file mode 100644 index 4ef8c849..00000000 --- a/src/api/java/thaumcraft/api/wands/IWandRodOnUpdate.java +++ /dev/null @@ -1,16 +0,0 @@ -package thaumcraft.api.wands; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -/** - * - * @author azanor - * - * Implemented by a class that you wish to be called whenever a wand with this rod performs its - * update tick. - * - */ -public interface IWandRodOnUpdate { - void onUpdate(ItemStack itemstack, EntityPlayer player); -} diff --git a/src/api/java/thaumcraft/api/wands/IWandTriggerManager.java b/src/api/java/thaumcraft/api/wands/IWandTriggerManager.java deleted file mode 100644 index 47465552..00000000 --- a/src/api/java/thaumcraft/api/wands/IWandTriggerManager.java +++ /dev/null @@ -1,12 +0,0 @@ -package thaumcraft.api.wands; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public interface IWandTriggerManager { - - public boolean performTrigger(World world, ItemStack wand, EntityPlayer player, - int x, int y, int z, int side, int event); - -} diff --git a/src/api/java/thaumcraft/api/wands/IWandable.java b/src/api/java/thaumcraft/api/wands/IWandable.java deleted file mode 100644 index aeb9bac7..00000000 --- a/src/api/java/thaumcraft/api/wands/IWandable.java +++ /dev/null @@ -1,25 +0,0 @@ -package thaumcraft.api.wands; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -/** - * - * @author azanor - * - * Add this to a tile entity that you wish wands to interact with in some way. - * - */ - -public interface IWandable { - - public int onWandRightClick(World world, ItemStack wandstack, EntityPlayer player, int x, int y, int z, int side, int md); - - public ItemStack onWandRightClick(World world, ItemStack wandstack, EntityPlayer player); - - public void onUsingWandTick(ItemStack wandstack, EntityPlayer player, int count); - - public void onWandStoppedUsing(ItemStack wandstack, World world, EntityPlayer player, int count); - -} diff --git a/src/api/java/thaumcraft/api/wands/ItemFocusBasic.java b/src/api/java/thaumcraft/api/wands/ItemFocusBasic.java deleted file mode 100644 index 35900520..00000000 --- a/src/api/java/thaumcraft/api/wands/ItemFocusBasic.java +++ /dev/null @@ -1,166 +0,0 @@ -package thaumcraft.api.wands; - -import java.text.DecimalFormat; -import java.util.List; -import java.util.Map; - -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import thaumcraft.api.ThaumcraftApi; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.aspects.AspectList; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class ItemFocusBasic extends Item implements IWandFocus { - - public ItemFocusBasic () - { - super(); - maxStackSize = 1; - canRepair=false; - this.setMaxDamage(0); - } - - public IIcon icon; - - @SideOnly(Side.CLIENT) - @Override - public IIcon getIconFromDamage(int par1) { - return icon; - } - - @Override - public boolean isItemTool(ItemStack par1ItemStack) - { - return true; - } - - @Override - public boolean isDamageable() { - return true; - } - - @Override - public void addInformation(ItemStack stack,EntityPlayer player, List list, boolean par4) { - AspectList al = this.getVisCost(); - if (al!=null && al.size()>0) { - list.add(StatCollector.translateToLocal(isVisCostPerTick()?"item.Focus.cost2":"item.Focus.cost1")); - for (Aspect aspect:al.getAspectsSorted()) { - DecimalFormat myFormatter = new DecimalFormat("#####.##"); - String amount = myFormatter.format(al.getAmount(aspect)/100f); - list.add(" \u00A7"+aspect.getChatcolor()+aspect.getName()+"\u00A7r x "+ amount); - - } - } - } - - @Override - public int getItemEnchantability() { - return 5; - } - - @Override - public EnumRarity getRarity(ItemStack itemstack) - { - return EnumRarity.rare; - } - - - @Override - public int getFocusColor() { - // TODO Auto-generated method stub - return 0; - } - - @Override - public AspectList getVisCost() { - // TODO Auto-generated method stub - return null; - } - - @Override - public ItemStack onFocusRightClick(ItemStack itemstack, World world, - EntityPlayer player, MovingObjectPosition movingobjectposition) { - // TODO Auto-generated method stub - return null; - } - - @Override - public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, - int count) { - // TODO Auto-generated method stub - } - - @Override - public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, - EntityPlayer player, int count) { - // TODO Auto-generated method stub - - } - - /** - * Just insert two alphanumeric characters before this string in your focus item class - */ - @Override - public String getSortingHelper(ItemStack itemstack) { - Map<Integer,Integer> ench = EnchantmentHelper.getEnchantments(itemstack); - String out=""; - for (Integer lvl:ench.values()) { - out = out + lvl + ""; - } - return out; - } - - @Override - public boolean isVisCostPerTick() { - return false; - } - - @Override - public IIcon getOrnament() { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean onFocusBlockStartBreak(ItemStack itemstack, int x, int y, - int z, EntityPlayer player) { - // TODO Auto-generated method stub - return false; - } - - @Override - public WandFocusAnimation getAnimation() { - return WandFocusAnimation.WAVE; - } - - @Override - public IIcon getFocusDepthLayerIcon() { - // TODO Auto-generated method stub - return null; - } - - /** - * @see thaumcraft.api.wands.IWandFocus#acceptsEnchant(int) - * By default fortune is off for all wands - **/ - @Override - public boolean acceptsEnchant(int id) { - if (id==ThaumcraftApi.enchantFrugal|| - id==ThaumcraftApi.enchantPotency) return true; - return false; - } - - - - - -} diff --git a/src/api/java/thaumcraft/api/wands/StaffRod.java b/src/api/java/thaumcraft/api/wands/StaffRod.java deleted file mode 100644 index e7ae90f0..00000000 --- a/src/api/java/thaumcraft/api/wands/StaffRod.java +++ /dev/null @@ -1,48 +0,0 @@ -package thaumcraft.api.wands; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; - -/** - * - * @author Azanor - * - * This class is used to keep the material information for the various rods. - * It is also used to generate the wand recipes ingame. - * - */ -public class StaffRod extends WandRod { - - boolean runes=false; - - public StaffRod(String tag, int capacity, ItemStack item, int craftCost) { - super(tag+"_staff", capacity, item, craftCost); - this.texture = new ResourceLocation("thaumcraft","textures/models/wand_rod_"+tag+".png"); - } - - public StaffRod(String tag, int capacity, ItemStack item, int craftCost, - IWandRodOnUpdate onUpdate, ResourceLocation texture) { - super(tag+"_staff", capacity, item, craftCost, onUpdate, texture); - } - - public StaffRod(String tag, int capacity, ItemStack item, int craftCost, - IWandRodOnUpdate onUpdate) { - super(tag+"_staff", capacity, item, craftCost, onUpdate); - this.texture = new ResourceLocation("thaumcraft","textures/models/wand_rod_"+tag+".png"); - } - - public StaffRod(String tag, int capacity, ItemStack item, int craftCost, - ResourceLocation texture) { - super(tag+"_staff", capacity, item, craftCost, texture); - } - - public boolean hasRunes() { - return runes; - } - - public void setRunes(boolean hasRunes) { - this.runes = hasRunes; - } - - -} diff --git a/src/api/java/thaumcraft/api/wands/WandCap.java b/src/api/java/thaumcraft/api/wands/WandCap.java deleted file mode 100644 index 17b4581c..00000000 --- a/src/api/java/thaumcraft/api/wands/WandCap.java +++ /dev/null @@ -1,129 +0,0 @@ -package thaumcraft.api.wands; - -import java.util.LinkedHashMap; -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import thaumcraft.api.aspects.Aspect; - -/** - * This class is used to keep the material information for the various caps. - * It is also used to generate the wand recipes ingame. - * @author Azanor - * - */ -public class WandCap { - - private String tag; - - /** - * Cost to craft this wand. Combined with the rod cost. - */ - private int craftCost; - - /** - * the amount by which all aspect costs are multiplied - */ - float baseCostModifier; - - /** - * specifies a list of primal aspects that use the special discount figure instead of the normal discount. - */ - List<Aspect> specialCostModifierAspects; - - /** - * the amount by which the specified aspect costs are multiplied - */ - float specialCostModifier; - - /** - * The texture that will be used for the ingame wand cap - */ - ResourceLocation texture; - - /** - * the actual item that makes up this cap and will be used to generate the wand recipes - */ - ItemStack item; - - public static LinkedHashMap<String,WandCap> caps = new LinkedHashMap<String,WandCap>(); - - public WandCap (String tag, float discount, ItemStack item, int craftCost) { - this.setTag(tag); - this.baseCostModifier = discount; - this.specialCostModifierAspects = null; - texture = new ResourceLocation("thaumcraft","textures/models/wand_cap_"+getTag()+".png"); - this.item=item; - this.setCraftCost(craftCost); - caps.put(tag, this); - } - - public WandCap (String tag, float discount, List<Aspect> specialAspects, float discountSpecial, ItemStack item, int craftCost) { - this.setTag(tag); - this.baseCostModifier = discount; - this.specialCostModifierAspects = specialAspects; - this.specialCostModifier = discountSpecial; - texture = new ResourceLocation("thaumcraft","textures/models/wand_cap_"+getTag()+".png"); - this.item=item; - this.setCraftCost(craftCost); - caps.put(tag, this); - } - - public float getBaseCostModifier() { - return baseCostModifier; - } - - public List<Aspect> getSpecialCostModifierAspects() { - return specialCostModifierAspects; - } - - public float getSpecialCostModifier() { - return specialCostModifier; - } - - public ResourceLocation getTexture() { - return texture; - } - - public void setTexture(ResourceLocation texture) { - this.texture = texture; - } - - public String getTag() { - return tag; - } - - public void setTag(String tag) { - this.tag = tag; - } - - - public ItemStack getItem() { - return item; - } - - public void setItem(ItemStack item) { - this.item = item; - } - - public int getCraftCost() { - return craftCost; - } - - public void setCraftCost(int craftCost) { - this.craftCost = craftCost; - } - - /** - * The research a player needs to have finished to be able to craft a wand with this cap. - */ - public String getResearch() { - return "CAP_"+getTag(); - } - - // Some examples: - // WandCap WAND_CAP_IRON = new WandCap("iron", 1.1f, Arrays.asList(Aspect.ORDER),1, new ItemStack(ConfigItems.itemWandCap,1,0),1); - // WandCap WAND_CAP_GOLD = new WandCap("gold", 1f, new ItemStack(ConfigItems.itemWandCap,1,1),3); - -} diff --git a/src/api/java/thaumcraft/api/wands/WandRod.java b/src/api/java/thaumcraft/api/wands/WandRod.java deleted file mode 100644 index 85954e46..00000000 --- a/src/api/java/thaumcraft/api/wands/WandRod.java +++ /dev/null @@ -1,158 +0,0 @@ -package thaumcraft.api.wands; - -import java.util.LinkedHashMap; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; - -/** - * - * @author Azanor - * - * This class is used to keep the material information for the various rods. - * It is also used to generate the wand recipes ingame. - * - */ -public class WandRod { - - - private String tag; - - /** - * Cost to craft this wand. Combined with the rod cost. - */ - private int craftCost; - - /** - * The amount of vis that can be stored - this number is actually multiplied - * by 100 for use by the wands internals - */ - int capacity; - - /** - * The texture that will be used for the ingame wand rod - */ - protected ResourceLocation texture; - - /** - * the actual item that makes up this rod and will be used to generate the wand recipes - */ - ItemStack item; - - /** - * A class that will be called whenever the wand onUpdate tick is run - */ - IWandRodOnUpdate onUpdate; - - /** - * Does the rod glow in the dark? - */ - boolean glow; - - public static LinkedHashMap<String,WandRod> rods = new LinkedHashMap<String,WandRod>(); - - public WandRod (String tag, int capacity, ItemStack item, int craftCost, ResourceLocation texture) { - this.setTag(tag); - this.capacity = capacity; - this.texture = texture; - this.item=item; - this.setCraftCost(craftCost); - rods.put(tag, this); - } - - public WandRod (String tag, int capacity, ItemStack item, int craftCost, IWandRodOnUpdate onUpdate, ResourceLocation texture) { - this.setTag(tag); - this.capacity = capacity; - this.texture = texture; - this.item=item; - this.setCraftCost(craftCost); - rods.put(tag, this); - this.onUpdate = onUpdate; - } - - public WandRod (String tag, int capacity, ItemStack item, int craftCost) { - this.setTag(tag); - this.capacity = capacity; - this.texture = new ResourceLocation("thaumcraft","textures/models/wand_rod_"+getTag()+".png"); - this.item=item; - this.setCraftCost(craftCost); - rods.put(tag, this); - } - - public WandRod (String tag, int capacity, ItemStack item, int craftCost, IWandRodOnUpdate onUpdate) { - this.setTag(tag); - this.capacity = capacity; - this.texture = new ResourceLocation("thaumcraft","textures/models/wand_rod_"+getTag()+".png"); - this.item=item; - this.setCraftCost(craftCost); - rods.put(tag, this); - this.onUpdate = onUpdate; - } - - public String getTag() { - return tag; - } - - public void setTag(String tag) { - this.tag = tag; - } - - public int getCapacity() { - return capacity; - } - - public void setCapacity(int capacity) { - this.capacity = capacity; - } - - public ResourceLocation getTexture() { - return texture; - } - - public void setTexture(ResourceLocation texture) { - this.texture = texture; - } - - public ItemStack getItem() { - return item; - } - - public void setItem(ItemStack item) { - this.item = item; - } - - public int getCraftCost() { - return craftCost; - } - - public void setCraftCost(int craftCost) { - this.craftCost = craftCost; - } - - public IWandRodOnUpdate getOnUpdate() { - return onUpdate; - } - - public void setOnUpdate(IWandRodOnUpdate onUpdate) { - this.onUpdate = onUpdate; - } - - public boolean isGlowing() { - return glow; - } - - public void setGlowing(boolean hasGlow) { - this.glow = hasGlow; - } - - /** - * The research a player needs to have finished to be able to craft a wand with this rod. - */ - public String getResearch() { - return "ROD_"+getTag(); - } - - // Some examples: - // WandRod WAND_ROD_WOOD = new WandRod("wood",25,new ItemStack(Item.stick),1); - // WandRod WAND_ROD_BLAZE = new WandRod("blaze",100,new ItemStack(Item.blazeRod),7,new WandRodBlazeOnUpdate()); -} diff --git a/src/api/java/thaumcraft/api/wands/WandTriggerRegistry.java b/src/api/java/thaumcraft/api/wands/WandTriggerRegistry.java deleted file mode 100644 index 68655cb7..00000000 --- a/src/api/java/thaumcraft/api/wands/WandTriggerRegistry.java +++ /dev/null @@ -1,72 +0,0 @@ -package thaumcraft.api.wands; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -/** - * This class serves a similar function to IWandable in that it allows wands to interact - * with object in the world. In this case it is most useful for adding interaction with non-mod - * blocks where you can't control what happens in their code. - * Example where it is used is in crafting the thaumonomicon from a bookshelf and the - * crucible from a cauldron - * - * @author azanor - * - */ -public class WandTriggerRegistry { - - /** - * Registers an action to perform when a casting wand right clicks on a specific block. - * A manager class needs to be created that implements IWandTriggerManager. - * @param manager - * @param event a logical number that you can use to differentiate different events or actions - * @param block - * @param meta send -1 as a wildcard value for all possible meta values - */ - public static void registerWandBlockTrigger(IWandTriggerManager manager, int event, Block block, int meta) { - triggers.put(Arrays.asList(block,meta), - Arrays.asList(manager,event)); - - } - - private static HashMap<List,List> triggers = new HashMap<List,List>(); - - public static boolean hasTrigger(Block block, int meta) { - if (triggers.containsKey(Arrays.asList(block,meta)) || - triggers.containsKey(Arrays.asList(block,-1))) return true; - return false; - } - - /** - * This is called by the onItemUseFirst function in wands. - * Parameters and return value functions like you would expect for that function. - * @param world - * @param wand - * @param player - * @param x - * @param y - * @param z - * @param side - * @param block - * @param meta - * @return - */ - public static boolean performTrigger(World world, ItemStack wand, EntityPlayer player, - int x, int y, int z, int side, Block block, int meta) { - - List l = triggers.get(Arrays.asList(block,meta)); - if (l==null) l = triggers.get(Arrays.asList(block,-1)); - if (l==null) return false; - - IWandTriggerManager manager = (IWandTriggerManager) l.get(0); - int event = (Integer) l.get(1); - return manager.performTrigger(world, wand, player, x, y, z, side, event); - } - -} diff --git a/src/api/java/vazkii/botania/api/BotaniaAPI.java b/src/api/java/vazkii/botania/api/BotaniaAPI.java deleted file mode 100644 index 36f5aa5a..00000000 --- a/src/api/java/vazkii/botania/api/BotaniaAPI.java +++ /dev/null @@ -1,363 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 14, 2014, 6:15:28 PM (GMT)] - */ -package vazkii.botania.api; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.Item.ToolMaterial; -import net.minecraft.item.ItemArmor.ArmorMaterial; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.common.util.EnumHelper; -import vazkii.botania.api.internal.DummyMethodHandler; -import vazkii.botania.api.internal.DummySubTile; -import vazkii.botania.api.internal.IInternalMethodHandler; -import vazkii.botania.api.lexicon.KnowledgeType; -import vazkii.botania.api.lexicon.LexiconCategory; -import vazkii.botania.api.lexicon.LexiconEntry; -import vazkii.botania.api.recipe.RecipeElvenTrade; -import vazkii.botania.api.recipe.RecipeManaInfusion; -import vazkii.botania.api.recipe.RecipePetals; -import vazkii.botania.api.recipe.RecipeRuneAltar; -import vazkii.botania.api.subtile.SubTileEntity; -import vazkii.botania.api.wiki.IWikiProvider; -import vazkii.botania.api.wiki.SimpleWikiProvider; -import vazkii.botania.api.wiki.WikiHooks; - -import com.google.common.collect.BiMap; -import com.google.common.collect.HashBiMap; - -public final class BotaniaAPI { - - private static List<LexiconCategory> categories = new ArrayList<LexiconCategory>(); - private static List<LexiconEntry> allEntries = new ArrayList<LexiconEntry>(); - - public static Map<String, KnowledgeType> knowledgeTypes = new HashMap<String, KnowledgeType>(); - - public static List<RecipePetals> petalRecipes = new ArrayList<RecipePetals>(); - public static List<RecipeRuneAltar> runeAltarRecipes = new ArrayList<RecipeRuneAltar>(); - public static List<RecipeManaInfusion> manaInfusionRecipes = new ArrayList<RecipeManaInfusion>(); - public static List<RecipeElvenTrade> elvenTradeRecipes = new ArrayList<RecipeElvenTrade>(); - - private static BiMap<String, Class<? extends SubTileEntity>> subTiles = HashBiMap.<String, Class<? extends SubTileEntity>> create(); - public static Set<String> subtilesForCreativeMenu = new LinkedHashSet(); - - public static Map<String, Integer> oreWeights = new HashMap<String, Integer>(); - - public static Map<Item, Block> seeds = new HashMap(); - - public static ArmorMaterial manasteelArmorMaterial = EnumHelper.addArmorMaterial("MANASTEEL", 16, new int[] { 2, 6, 5, 2 }, 18); - public static ToolMaterial manasteelToolMaterial = EnumHelper.addToolMaterial("MANASTEEL", 3, 300, 6.2F, 2F, 20); - - public static ArmorMaterial elementiumArmorMaterial = EnumHelper.addArmorMaterial("B_ELEMENTIUM", 18, new int[] { 2, 6, 5, 2 }, 18); - public static ToolMaterial elementiumToolMaterial = EnumHelper.addToolMaterial("B_ELEMENTIUM", 3, 720, 6.2F, 2F, 20); - - public static ArmorMaterial terrasteelArmorMaterial = EnumHelper.addArmorMaterial("TERRASTEEL", 34, new int[] {3, 8, 6, 3}, 26); - public static ToolMaterial terrasteelToolMaterial = EnumHelper.addToolMaterial("TERRASTEEL", 3, 2300, 9F, 3F, 26); - - public static KnowledgeType basicKnowledge, elvenKnowledge; - - static { - registerSubTile("", DummySubTile.class); - - basicKnowledge = registerKnowledgeType("minecraft", EnumChatFormatting.RESET, true); - elvenKnowledge = registerKnowledgeType("alfheim", EnumChatFormatting.DARK_GREEN, false); - - addOreWeight("oreAluminum", 3940); // Tinkers' Construct - addOreWeight("oreAmber", 2075); // Thaumcraft - addOreWeight("oreApatite", 1595); // Forestry - addOreWeight("oreBlueTopaz", 3195); // Ars Magica - addOreWeight("oreCassiterite", 1634); // GregTech - addOreWeight("oreCertusQuartz", 3975); // Applied Energistics - addOreWeight("oreChimerite", 3970); // Ars Magica - addOreWeight("oreCinnabar", 2585); // Thaumcraft - addOreWeight("oreCoal", 46525); // Vanilla - addOreWeight("oreCooperite", 5); // GregTech - addOreWeight("oreCopper", 8325); // IC2, Thermal Expansion, Tinkers' Construct, etc. - addOreWeight("oreDarkIron", 1700); // Factorization - addOreWeight("oreDiamond", 1265); // Vanilla - addOreWeight("oreEmerald", 780); // Vanilla - addOreWeight("oreEmery", 415); // GregTech - addOreWeight("oreGalena", 1000); // Factorization - addOreWeight("oreGold", 2970); // Vanilla - addOreWeight("oreInfusedAir", 925); // Thaumcraft - addOreWeight("oreInfusedEarth", 925); // Thaumcraft - addOreWeight("oreInfusedEntropy", 925); // Thaumcraft - addOreWeight("oreInfusedFire", 925); // Thaumcraft - addOreWeight("oreInfusedOrder", 925); // Thaumcraft - addOreWeight("oreInfusedWater", 925); // Thaumcraft - addOreWeight("oreIridium", 30); // GregTech - addOreWeight("oreIron", 20665); // Vanilla - addOreWeight("oreLapis", 1285); // Vanilla - addOreWeight("oreLead", 7985); // IC2, Thermal Expansion, Factorization, etc. - addOreWeight("oreMCropsEssence", 3085); // Magical Crops - addOreWeight("oreNickel", 2275); // Thermal Expansion - addOreWeight("oreOlivine", 1100); // Project RED - addOreWeight("oreRedstone", 6885); // Vanilla - addOreWeight("oreRuby", 1100); // Project RED - addOreWeight("oreSapphire", 1100); // Project RED - addOreWeight("oreSilver", 6300); // Thermal Expansion, Factorization, etc. - addOreWeight("oreSphalerite", 25); // GregTech - addOreWeight("oreSulfur", 1105); // Railcraft - addOreWeight("oreTetrahedrite", 4040); // GregTech - addOreWeight("oreTin", 9450); // IC2, Thermal Expansion, etc. - addOreWeight("oreTungstate", 20); // GregTech - addOreWeight("oreUranium", 1337); // IC2 - addOreWeight("oreVinteum", 5925); // Ars Magica - addOreWeight("oreYellorite", 3520); // Big Reactors - addOreWeight("oreZinc", 6485); // Flaxbeard's Steam Power - - addSeed(Items.wheat_seeds, Blocks.wheat); - addSeed(Items.potato, Blocks.potatoes); - addSeed(Items.carrot, Blocks.carrots); - addSeed(Items.nether_wart, Blocks.nether_wart); - addSeed(Items.pumpkin_seeds, Blocks.pumpkin_stem); - addSeed(Items.melon_seeds, Blocks.melon_stem); - - registerModWiki("Minecraft", new SimpleWikiProvider("Minecraft Wiki", "http://minecraft.gamepedia.com/%s")); - - IWikiProvider technicWiki = new SimpleWikiProvider("Technic Wiki", "http://wiki.technicpack.net/%s"); - IWikiProvider mekanismWiki = new SimpleWikiProvider("Mekanism Wiki", "http://wiki.aidancbrady.com/wiki/%s"); - IWikiProvider buildcraftWiki = new SimpleWikiProvider("BuildCraft Wiki", "http://www.mod-buildcraft.com/wiki/doku.php?id=%s"); - - registerModWiki("Mekanism", mekanismWiki); - registerModWiki("MekanismGenerators", mekanismWiki); - registerModWiki("MekanismTools", mekanismWiki); - registerModWiki("EnderIO", new SimpleWikiProvider("EnderIO Wiki", "http://wiki.enderio.com/%s")); - registerModWiki("TropiCraft", new SimpleWikiProvider("Tropicraft Wiki", "http://wiki.tropicraft.net/wiki/%s")); - registerModWiki("RandomThings", new SimpleWikiProvider("Random Things Wiki", "http://randomthingsminecraftmod.wikispaces.com/%s")); - registerModWiki("Witchery", new SimpleWikiProvider("Witchery Wiki", "https://sites.google.com/site/witcherymod/%s", "-")); - registerModWiki("AppliedEnergistics2", new SimpleWikiProvider("AE2 Wiki", "http://ae-mod.info/%s")); - registerModWiki("BigReactors", technicWiki); - registerModWiki("BuildCraft|Core", buildcraftWiki); - registerModWiki("BuildCraft|Builders", buildcraftWiki); - registerModWiki("BuildCraft|Energy", buildcraftWiki); - registerModWiki("BuildCraft|Factory", buildcraftWiki); - registerModWiki("BuildCraft|Silicon", buildcraftWiki); - registerModWiki("BuildCraft|Transport", buildcraftWiki); - registerModWiki("ArsMagica2", new SimpleWikiProvider("ArsMagica2 Wiki", "http://wiki.arsmagicamod.com/wiki/%s")); - registerModWiki("PneumaticCraft", new SimpleWikiProvider("PneumaticCraft Wiki", "http://www.minemaarten.com/wikis/pneumaticcraft-wiki/pneumaticcraft-wiki-%s")); - registerModWiki("StevesCarts2", new SimpleWikiProvider("Steve's Carts Wiki", "http://stevescarts2.wikispaces.com/%s")); - registerModWiki("GanysSurface", new SimpleWikiProvider("Gany's Surface Wiki", "http://ganys-surface.wikia.com/wiki/%s")); - registerModWiki("GanysNether", new SimpleWikiProvider("Gany's Nether Wiki", "http://ganys-nether.wikia.com/wiki/%s")); - registerModWiki("GanysEnd", new SimpleWikiProvider("Gany's End Wiki", "http://ganys-end.wikia.com/wiki/%s")); - } - - /** - * The internal method handler in use. Do not overwrite. - * @see IInternalMethodHandler - */ - public static IInternalMethodHandler internalHandler = new DummyMethodHandler(); - - - /** - * Registers a new Knowledge Type. - * @param id The ID for this knowledge type. - * @param color The color to display this knowledge type as. - */ - public static KnowledgeType registerKnowledgeType(String id, EnumChatFormatting color, boolean autoUnlock) { - KnowledgeType type = new KnowledgeType(id, color, autoUnlock); - knowledgeTypes.put(id, type); - return type; - } - - /** - * Registers a Petal Recipe. - * @param output The ItemStack to craft. - * @param inputs The objects for crafting. Can be ItemStack, MappableStackWrapper - * or String (case for Ore Dictionary). The array can't be larger than 16. - * @return The recipe created. - */ - public static RecipePetals registerPetalRecipe(ItemStack output, Object... inputs) { - RecipePetals recipe = new RecipePetals(output, inputs); - petalRecipes.add(recipe); - return recipe; - } - - /** - * Registers a Rune Altar - * @param output The ItemStack to craft. - * @param mana The amount of mana required. Don't go over 100000! - * @param inputs The objects for crafting. Can be ItemStack, MappableStackWrapper - * or String (case for Ore Dictionary). The array can't be larger than 16. - * @return The recipe created. - */ - public static RecipeRuneAltar registerRuneAltarRecipe(ItemStack output, int mana, Object... inputs) { - RecipeRuneAltar recipe = new RecipeRuneAltar(output, mana, inputs); - runeAltarRecipes.add(recipe); - return recipe; - } - - /** - * Registers a Mana Infusion Recipe (throw an item in a mana pool) - * @param output The ItemStack to craft - * @param input The input item, be it an ItemStack or an ore dictionary entry String. - * @param mana The amount of mana required. Don't go over 100000! - * @return The recipe created. - */ - public static RecipeManaInfusion registerManaInfusionRecipe(ItemStack output, Object input, int mana) { - RecipeManaInfusion recipe = new RecipeManaInfusion(output, input, mana); - manaInfusionRecipes.add(recipe); - return recipe; - } - - /** - * Register a Mana Infusion Recipe and flags it as an Alchemy recipe (requires an - * Alchemy Catalyst below the pool). - * @see BotaniaAPI#registerManaInfusionRecipe - */ - public static RecipeManaInfusion registerManaAlchemyRecipe(ItemStack output, Object input, int mana) { - RecipeManaInfusion recipe = registerManaInfusionRecipe(output, input, mana); - recipe.setAlchemy(true); - return recipe; - } - - /** - * Register a Mana Infusion Recipe and flags it as an Conjuration recipe (requires a - * Conjuration Catalyst below the pool). - * @see BotaniaAPI#registerManaInfusionRecipe - */ - public static RecipeManaInfusion registerManaConjurationRecipe(ItemStack output, Object input, int mana) { - RecipeManaInfusion recipe = registerManaInfusionRecipe(output, input, mana); - recipe.setConjuration(true); - return recipe; - } - - /** - * Registers a Elven Trade recipe (throw an item in an Alfheim Portal). - * @param output The ItemStack to return. - * @param inputs The items required, can be ItemStack or ore dictionary entry string. - * @return The recipe created. - */ - public static RecipeElvenTrade registerElvenTradeRecipe(ItemStack output, Object... inputs) { - RecipeElvenTrade recipe = new RecipeElvenTrade(output, inputs); - elvenTradeRecipes.add(recipe); - return recipe; - } - - /** - * Registers a SubTileEntity, a new special flower. Look in the subtile package of the API. - */ - public static void registerSubTile(String key, Class<? extends SubTileEntity> subtileClass) { - subTiles.put(key, subtileClass); - } - - /** - * Adds the key for a SubTileEntity into the creative menu. This goes into the - * subtilesForCreativeMenu Set. - */ - public static void addSubTileToCreativeMenu(String key) { - subtilesForCreativeMenu.add(key); - } - - /** - * Adds a category to the list of registered categories to appear in the Lexicon. - */ - public static void addCategory(LexiconCategory category) { - categories.add(category); - } - - /** - * Gets all registered categories. - */ - public static List<LexiconCategory> getAllCategories() { - return categories; - } - - /** - * Gets all registered entries. - */ - public static List<LexiconEntry> getAllEntries() { - return allEntries; - } - - /** - * Registers a Lexicon Entry and adds it to the category passed in. - */ - public static void addEntry(LexiconEntry entry, LexiconCategory category) { - allEntries.add(entry); - category.entries.add(entry); - } - - /** - * Maps an ore (ore dictionary key) to it's weight on the world generation. This - * is used for the Orechid flower. Check the static block in the BotaniaAPI class - * to get the weights for the vanilla blocks.<br> - * Alternatively get the values with the OreDetector mod:<br> - * https://gist.github.com/Vazkii/9493322 - */ - public static void addOreWeight(String ore, int weight) { - oreWeights.put(ore, weight); - } - - public static int getOreWeight(String ore) { - return oreWeights.get(ore); - } - - /** - * Allows an item to be counted as a seed. Any item in this list can be - * dispensed by a dispenser, the block is the block to be placed. - */ - public static void addSeed(Item item, Block block) { - seeds.put(item, block); - } - - /** - * Gets the last recipe to have been added to the recipe list. - */ - public static IRecipe getLatestAddedRecipe() { - List<IRecipe> list = CraftingManager.getInstance().getRecipeList(); - return list.get(list.size() - 1); - } - - /** - * Gets the last x recipes added to the recipe list. - */ - public static List<IRecipe> getLatestAddedRecipes(int x) { - List<IRecipe> list = CraftingManager.getInstance().getRecipeList(); - List<IRecipe> newList = new ArrayList(); - for(int i = x - 1; i >= 0; i--) - newList.add(list.get(list.size() - 1 - i)); - - return newList; - } - - /** - * Registers a Wiki provider for a mod so it uses that instead of the fallback - * FTB wiki. Make sure to call this on PostInit only! - */ - public static void registerModWiki(String mod, IWikiProvider provider) { - WikiHooks.registerModWiki(mod, provider); - } - - public static Class<? extends SubTileEntity> getSubTileMapping(String key) { - if(!subTiles.containsKey(key)) - key = ""; - - return subTiles.get(key); - } - - public static String getSubTileStringMapping(Class<? extends SubTileEntity> clazz) { - return subTiles.inverse().get(clazz); - } -} diff --git a/src/api/java/vazkii/botania/api/internal/DummyManaNetwork.java b/src/api/java/vazkii/botania/api/internal/DummyManaNetwork.java deleted file mode 100644 index 53a8e421..00000000 --- a/src/api/java/vazkii/botania/api/internal/DummyManaNetwork.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Mar 7, 2014, 3:47:43 PM (GMT)] - */ -package vazkii.botania.api.internal; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.world.World; -import vazkii.botania.api.mana.TileSignature; - -public class DummyManaNetwork implements IManaNetwork { - - public static final DummyManaNetwork instance = new DummyManaNetwork(); - - @Override - public void clear() { - // NO-OP - } - - @Override - public TileEntity getClosestPool(ChunkCoordinates pos, World world, int limit) { - return null; - } - - @Override - public TileEntity getClosestCollector(ChunkCoordinates pos, World world, int limit) { - return null; - } - - @Override - public List<TileSignature> getAllCollectorsInWorld(World world) { - return new ArrayList(); - } - - @Override - public List<TileSignature> getAllPoolsInWorld(World world) { - return new ArrayList(); - } - -} diff --git a/src/api/java/vazkii/botania/api/internal/DummyMethodHandler.java b/src/api/java/vazkii/botania/api/internal/DummyMethodHandler.java deleted file mode 100644 index 549bd197..00000000 --- a/src/api/java/vazkii/botania/api/internal/DummyMethodHandler.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 14, 2014, 6:43:03 PM (GMT)] - */ -package vazkii.botania.api.internal; - -import java.util.List; - -import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; -import vazkii.botania.api.lexicon.LexiconPage; -import vazkii.botania.api.recipe.RecipeElvenTrade; -import vazkii.botania.api.recipe.RecipeManaInfusion; -import vazkii.botania.api.recipe.RecipePetals; -import vazkii.botania.api.recipe.RecipeRuneAltar; - -public class DummyMethodHandler implements IInternalMethodHandler { - - @Override - public LexiconPage textPage(String key) { - return dummyPage(key); - } - - @Override - public LexiconPage imagePage(String key, String resource) { - return dummyPage(key); - } - - @Override - public LexiconPage craftingRecipesPage(String key, List<IRecipe> recipes) { - return dummyPage(key); - } - - @Override - public LexiconPage craftingRecipePage(String key, IRecipe recipe) { - return dummyPage(key); - } - - @Override - public LexiconPage petalRecipesPage(String key, List<RecipePetals> recipes) { - return dummyPage(key); - } - - @Override - public LexiconPage petalRecipePage(String key, RecipePetals recipe) { - return dummyPage(key); - } - - @Override - public LexiconPage runeRecipesPage(String key, List<RecipeRuneAltar> recipes) { - return dummyPage(key); - } - - @Override - public LexiconPage runeRecipePage(String key, RecipeRuneAltar recipe) { - return dummyPage(key); - } - - @Override - public LexiconPage manaInfusionRecipesPage(String key, List<RecipeManaInfusion> recipes) { - return dummyPage(key); - } - - @Override - public LexiconPage manaInfusionRecipePage(String key, RecipeManaInfusion recipe) { - return dummyPage(key); - } - - @Override - public LexiconPage elvenTradePage(String key, List<RecipeElvenTrade> recipes) { - return dummyPage(key); - } - - @Override - public LexiconPage elvenTradesPage(String key, RecipeElvenTrade recipe) { - return dummyPage(key); - } - - private LexiconPage dummyPage(String key) { - return new DummyPage(key); - } - - @Override - public ItemStack getSubTileAsStack(String subTile) { - return new ItemStack(Blocks.stone, 0, 0); - } - - @Override - public IIcon getSubTileIconForName(String name) { - return Blocks.red_flower.getIcon(0, 0); - } - - @Override - public IManaNetwork getManaNetworkInstance() { - return DummyManaNetwork.instance; - } - - @Override - public void drawSimpleManaHUD(int color, int mana, int maxMana, String name, ScaledResolution res) { - // NO-OP - } - - @Override - public void sparkleFX(World world, double x, double y, double z, float r, float g, float b, float size, int m) { - // NO-OP - } - - @Override - public IInventory getBaublesInventory(EntityPlayer player) { - return null; - } - - @Override - public boolean shouldForceCheck() { - return true; - } - - @Override - public int getPassiveFlowerDecay() { - return 0; - } -} diff --git a/src/api/java/vazkii/botania/api/internal/DummyPage.java b/src/api/java/vazkii/botania/api/internal/DummyPage.java deleted file mode 100644 index 33cbcf84..00000000 --- a/src/api/java/vazkii/botania/api/internal/DummyPage.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 14, 2014, 6:41:23 PM (GMT)] - */ -package vazkii.botania.api.internal; - -import vazkii.botania.api.lexicon.LexiconPage; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/** - * A dummy page. It does absolutely nothing and is only - * existant to make sure everything goes right even if - * Botania isn't loaded. - */ -public class DummyPage extends LexiconPage { - - public DummyPage(String unlocalizedName) { - super(unlocalizedName); - } - - @Override - @SideOnly(Side.CLIENT) - public void renderScreen(IGuiLexiconEntry gui, int x, int y) { - // NO-OP - } - -} diff --git a/src/api/java/vazkii/botania/api/internal/DummySubTile.java b/src/api/java/vazkii/botania/api/internal/DummySubTile.java deleted file mode 100644 index d23adced..00000000 --- a/src/api/java/vazkii/botania/api/internal/DummySubTile.java +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 24, 2014, 4:17:33 PM (GMT)] - */ -package vazkii.botania.api.internal; - -import vazkii.botania.api.subtile.SubTileEntity; - -public class DummySubTile extends SubTileEntity { - -} diff --git a/src/api/java/vazkii/botania/api/internal/IGuiLexiconEntry.java b/src/api/java/vazkii/botania/api/internal/IGuiLexiconEntry.java deleted file mode 100644 index c8bf6da1..00000000 --- a/src/api/java/vazkii/botania/api/internal/IGuiLexiconEntry.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 14, 2014, 6:48:41 PM (GMT)] - */ -package vazkii.botania.api.internal; - -import vazkii.botania.api.lexicon.LexiconEntry; - -/** - * Internal interface for the Lexicon Entry GUI. This contains - * everything that can be accessed from it. It's safe to cast - * this type to GuiScreen. - */ -public interface IGuiLexiconEntry { - - /** - * Gets the entry currently portrayed in this gui. - */ - public LexiconEntry getEntry(); - - /** - * Gets the current page the lexicon GUI is browsing. - */ - public int getPageOn(); - - /** - * Gets the leftmost part of the GUI. - */ - public int getLeft(); - - /** - * Gets the topmost part of the GUI. - */ - public int getTop(); - - /** - * Gets the GUI's width. - */ - public int getWidth(); - - /** - * Gets the GUI's height - */ - public int getHeight(); - - /** - * Gets the GUI's Z level for rendering. - */ - public float getZLevel(); -} diff --git a/src/api/java/vazkii/botania/api/internal/IInternalMethodHandler.java b/src/api/java/vazkii/botania/api/internal/IInternalMethodHandler.java deleted file mode 100644 index 00a16a29..00000000 --- a/src/api/java/vazkii/botania/api/internal/IInternalMethodHandler.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 14, 2014, 6:34:34 PM (GMT)] - */ -package vazkii.botania.api.internal; - -import java.util.List; - -import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; -import vazkii.botania.api.lexicon.LexiconPage; -import vazkii.botania.api.recipe.RecipeElvenTrade; -import vazkii.botania.api.recipe.RecipeManaInfusion; -import vazkii.botania.api.recipe.RecipePetals; -import vazkii.botania.api.recipe.RecipeRuneAltar; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/** - * Any methods that refer to internal methods in Botania are here. - * This is defaulted to a dummy handler, whose methods do nothing. - * This handler is set to a proper one on PreInit. Make sure to - * make your mod load after Botania if you have any intention of - * doing anythign with this on PreInit. - */ -public interface IInternalMethodHandler { - - public LexiconPage textPage(String key); - - public LexiconPage imagePage(String key, String resource); - - public LexiconPage craftingRecipesPage(String key, List<IRecipe> recipes); - - public LexiconPage craftingRecipePage(String key, IRecipe recipe); - - public LexiconPage petalRecipesPage(String key, List<RecipePetals> recipes); - - public LexiconPage petalRecipePage(String key, RecipePetals recipe); - - public LexiconPage runeRecipesPage(String key, List<RecipeRuneAltar> recipes); - - public LexiconPage runeRecipePage(String key, RecipeRuneAltar recipe); - - public LexiconPage manaInfusionRecipesPage(String key, List<RecipeManaInfusion> recipes); - - public LexiconPage manaInfusionRecipePage(String key, RecipeManaInfusion recipe); - - public LexiconPage elvenTradePage(String key, List<RecipeElvenTrade> recipes); - - public LexiconPage elvenTradesPage(String key, RecipeElvenTrade recipe); - - public IManaNetwork getManaNetworkInstance(); - - public ItemStack getSubTileAsStack(String subTile); - - public IIcon getSubTileIconForName(String name); - - public boolean shouldForceCheck(); - - public int getPassiveFlowerDecay(); - - public IInventory getBaublesInventory(EntityPlayer player); - - @SideOnly(Side.CLIENT) - public void drawSimpleManaHUD(int color, int mana, int maxMana, String name, ScaledResolution res); - - public void sparkleFX(World world, double x, double y, double z, float r, float g, float b, float size, int m); - -} diff --git a/src/api/java/vazkii/botania/api/internal/IManaBurst.java b/src/api/java/vazkii/botania/api/internal/IManaBurst.java deleted file mode 100644 index 38c5fd8c..00000000 --- a/src/api/java/vazkii/botania/api/internal/IManaBurst.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 31, 2014, 4:36:13 PM (GMT)] - */ -package vazkii.botania.api.internal; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.ChunkCoordinates; - -/** - * Interface for the Mana Burst entity. This can safely be casted to EntityThrowable. - */ -public interface IManaBurst { - - public boolean isFake(); - - public void setMotion(double x, double y, double z); - - public int getColor(); - - public void setColor(int color); - - public int getMana(); - - public void setMana(int mana); - - public int getStartingMana(); - - public void setStartingMana(int mana); - - public int getMinManaLoss(); - - public void setMinManaLoss(int minManaLoss); - - public float getManaLossPerTick(); - - public void setManaLossPerTick(float mana); - - public float getGravity(); - - public void setGravity(float gravity); - - public ChunkCoordinates getBurstSourceChunkCoordinates(); - - public void setBurstSourceCoords(int x, int y, int z); - - public ItemStack getSourceLens(); - - public void setSourceLens(ItemStack lens); - - public boolean hasAlreadyCollidedAt(int x, int y, int z); - - public int getTicksExisted(); - -} diff --git a/src/api/java/vazkii/botania/api/internal/IManaNetwork.java b/src/api/java/vazkii/botania/api/internal/IManaNetwork.java deleted file mode 100644 index 38e94197..00000000 --- a/src/api/java/vazkii/botania/api/internal/IManaNetwork.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Mar 7, 2014, 3:39:48 PM (GMT)] - */ -package vazkii.botania.api.internal; - -import java.util.List; - -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.world.World; -import vazkii.botania.api.mana.TileSignature; - -/** - * A basic interface for a world's Mana Network. - * @see IInternalMethodHandler#getManaNetworkInstance() - */ -public interface IManaNetwork { - - /** - * Clears the entire Mana Network of all it's contents, you probably - * don't want to call this unless you have a very good reason. - */ - public void clear(); - - /** - * Gets the closest Mana Collector (eg. Mana Spreader) in the network to the Chunk - * Coordinates passed in, in the given dimension.<br> - * A way of getting the dimension is via worldObj.provider.dimensionId<br> - * Note that this function *can* get performance intensive, it's reccomended you - * call it sparingly and take cache of the value returned. - * @param limit The maximum distance the closest block can be, if the closest block - * is farther away than that, null will be returned instead. - */ - public TileEntity getClosestCollector(ChunkCoordinates pos, World world, int limit); - - /** - * Gets the closest Mana Pool in the network to the Chunk Coordinates passed in, - * in the given dimension.<br> - * A way of getting the dimension is via worldObj.provider.dimensionId<br> - * Note that this function *can* get performance intensive, it's reccomended you - * call it sparingly and take cache of the value returned. - * @param limit The maximum distance the closest block can be, if the closest block - * is farther away than that, null will be returned instead. - */ - public TileEntity getClosestPool(ChunkCoordinates pos, World world, int limit); - - /** - * Gets the list of all Mana Collectors (eg. Mana Spreader) in the dimension - * passed in. Note that this is the actual list and not a copy, make sure to - * clone the list if you intend to change it in any way. - */ - public List<TileSignature> getAllCollectorsInWorld(World world); - - /** - * Gets the list of all Mana Pools in the dimension passed in. Note that this - * is the actual list and not a copy, make sure to clone the list if you intend - * to change it in any way. - */ - public List<TileSignature> getAllPoolsInWorld(World world); -} diff --git a/src/api/java/vazkii/botania/api/item/IExoflameHeatable.java b/src/api/java/vazkii/botania/api/item/IExoflameHeatable.java deleted file mode 100644 index eb4815c6..00000000 --- a/src/api/java/vazkii/botania/api/item/IExoflameHeatable.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Aug 30, 2014, 4:28:29 PM (GMT)] - */ -package vazkii.botania.api.item; - -/** - * A TileEntity that implements this can be heated by an Exoflame flower. - */ -public interface IExoflameHeatable { - - /** - * Can this TileEntity smelt its contents. If true, the Exoflame is allowed - * to fuel it. - */ - public boolean canSmelt(); - - /** - * Gets the amount of ticks left for the fuel. If below 2, the exoflame - * will call boostBurnTime. - */ - public int getBurnTime(); - - /** - * Called to increase the amount of time this furnace should be burning - * the fuel for. Even if it doesn't have any fuel. - */ - public void boostBurnTime(); - - /** - * Called once every two ticks to increase the speed of the furnace. Feel - * free to not do anything if all you want is to allow the exoflame to feed - * it, not make it faster. - */ - public void boostCookTime(); - -} diff --git a/src/api/java/vazkii/botania/api/item/IExtendedPlayerController.java b/src/api/java/vazkii/botania/api/item/IExtendedPlayerController.java deleted file mode 100644 index 67db3e64..00000000 --- a/src/api/java/vazkii/botania/api/item/IExtendedPlayerController.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Aug 6, 2014, 6:02:29 PM (GMT)] - */ -package vazkii.botania.api.item; - -/** - * An interface that defines an instance of PlayerControllerMP with - * the ability to modify reach. See vazkii.botania.client.core.handler.BotaniaPlayerController - */ -public interface IExtendedPlayerController { - - /** - * Sets the extra reach the player should have. - */ - public void setReachDistanceExtension(float f); - - /** - * Gets the current reach extension. - */ - public float getReachDistanceExtension(); -} diff --git a/src/api/java/vazkii/botania/api/item/IPetalApothecary.java b/src/api/java/vazkii/botania/api/item/IPetalApothecary.java deleted file mode 100644 index d96f73f1..00000000 --- a/src/api/java/vazkii/botania/api/item/IPetalApothecary.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Aug 30, 2014, 4:22:15 PM (GMT)] - */ -package vazkii.botania.api.item; - -/** - * Base Interface for the Petal Apothecary block. Can - * be safely casted to TileEntity. - */ -public interface IPetalApothecary { - - /** - * Sets if the the apothecary has water or not. - */ - public void setWater(boolean water); - - /** - * Does the apothecary have water in it? - */ - public boolean hasWater(); - -} diff --git a/src/api/java/vazkii/botania/api/item/IPixieSpawner.java b/src/api/java/vazkii/botania/api/item/IPixieSpawner.java deleted file mode 100644 index c0d47f87..00000000 --- a/src/api/java/vazkii/botania/api/item/IPixieSpawner.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Aug 6, 2014, 6:06:27 PM (GMT)] - */ -package vazkii.botania.api.item; - -import net.minecraft.item.ItemStack; - -/** - * Any item that implements this allows for pixies to be spawned when the player takes damage when...<br> - * - Case the item is armor, having it equipped.<br> - * - Case the item is a bauble, having it worn.<br> - * - On any other case, having the item being the current held item. - */ -public interface IPixieSpawner { - - /** - * The chance this item adds for pixies to be spawned. From 0.0 to 1.0. All values - * are put together when calculating. - */ - public float getPixieChance(ItemStack stack); - -} \ No newline at end of file diff --git a/src/api/java/vazkii/botania/api/lexicon/IAddonEntry.java b/src/api/java/vazkii/botania/api/lexicon/IAddonEntry.java deleted file mode 100644 index fe2167b1..00000000 --- a/src/api/java/vazkii/botania/api/lexicon/IAddonEntry.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jun 8, 2014, 7:02:48 PM (GMT)] - */ -package vazkii.botania.api.lexicon; - -/** - * Have a LexiconEntry implement this to signify it's an "Addon entry", as - * in, one provided by an Addon. This allows it to draw a subtitle of - * sorts, to prevent the [Mod tag here] nonsense that happened with thaumcraft - * addons. It can also be used for other purposes, such as stating an - * entry is WIP. - */ -public interface IAddonEntry { - - /** - * Returns the <b>unlocalized</b> subtitle to show below the title. Here you'd - * return something like "(This Entry is provided by the Botanic Tinkerer addon)". - */ - public String getSubtitle(); - -} diff --git a/src/api/java/vazkii/botania/api/lexicon/ILexicon.java b/src/api/java/vazkii/botania/api/lexicon/ILexicon.java deleted file mode 100644 index ee07e17f..00000000 --- a/src/api/java/vazkii/botania/api/lexicon/ILexicon.java +++ /dev/null @@ -1,21 +0,0 @@ -package vazkii.botania.api.lexicon; - -import net.minecraft.item.ItemStack; - -/** - * Basic interface for the Lexica Botania. - */ -public interface ILexicon { - - /** - * Gets if a specific knowledge is unlocked. Check the knowledge types in - * BotaniaAPI. - */ - public boolean isKnowledgeUnlocked(ItemStack stack, KnowledgeType knowledge); - - /** - * Unlocks a specfic type of knowledge. - */ - public void unlockKnowledge(ItemStack stack, KnowledgeType knowledge); - -} diff --git a/src/api/java/vazkii/botania/api/lexicon/ILexiconable.java b/src/api/java/vazkii/botania/api/lexicon/ILexiconable.java deleted file mode 100644 index e8777db2..00000000 --- a/src/api/java/vazkii/botania/api/lexicon/ILexiconable.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 20, 2014, 7:05:44 PM (GMT)] - */ -package vazkii.botania.api.lexicon; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -/** - * Any block that implements this can be right clicked with - * a Lexica Botania to open a entry page. - */ -public interface ILexiconable { - - /** - * Gets the lexicon entry to open at this location. null works too. - */ - public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon); - -} diff --git a/src/api/java/vazkii/botania/api/lexicon/IRecipeKeyProvider.java b/src/api/java/vazkii/botania/api/lexicon/IRecipeKeyProvider.java deleted file mode 100644 index d07c0325..00000000 --- a/src/api/java/vazkii/botania/api/lexicon/IRecipeKeyProvider.java +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Mar 20, 2014, 6:08:48 PM (GMT)] - */ -package vazkii.botania.api.lexicon; - -import net.minecraft.item.ItemStack; - -/** - * Have an Item implement this so that the method used for mapping it into - * the lexicon recipe mappings isn't the typical id:meta key. - */ -public interface IRecipeKeyProvider { - - public String getKey(ItemStack stack); - -} diff --git a/src/api/java/vazkii/botania/api/lexicon/KnowledgeType.java b/src/api/java/vazkii/botania/api/lexicon/KnowledgeType.java deleted file mode 100644 index 5a08c9ce..00000000 --- a/src/api/java/vazkii/botania/api/lexicon/KnowledgeType.java +++ /dev/null @@ -1,20 +0,0 @@ -package vazkii.botania.api.lexicon; - -import net.minecraft.util.EnumChatFormatting; - -public class KnowledgeType { - - public final String id; - public final EnumChatFormatting color; - public final boolean autoUnlock; - - public KnowledgeType(String id, EnumChatFormatting color, boolean autoUnlock) { - this.id = id; - this.color = color; - this.autoUnlock = autoUnlock; - } - - public String getUnlocalizedName() { - return "botania.knowledge." + id; - } -} diff --git a/src/api/java/vazkii/botania/api/lexicon/LexiconCategory.java b/src/api/java/vazkii/botania/api/lexicon/LexiconCategory.java deleted file mode 100644 index 76273419..00000000 --- a/src/api/java/vazkii/botania/api/lexicon/LexiconCategory.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 14, 2014, 6:23:47 PM (GMT)] - */ -package vazkii.botania.api.lexicon; - -import java.util.ArrayList; -import java.util.List; - -public final class LexiconCategory { - - public final String unlocalizedName; - public final List<LexiconEntry> entries = new ArrayList<LexiconEntry>(); - - /** - * @param unlocalizedName The unlocalized name of this category. This will be localized by the client display. - */ - public LexiconCategory(String unlocalizedName) { - this.unlocalizedName = unlocalizedName; - } - - public String getUnlocalizedName() { - return unlocalizedName; - } -} diff --git a/src/api/java/vazkii/botania/api/lexicon/LexiconEntry.java b/src/api/java/vazkii/botania/api/lexicon/LexiconEntry.java deleted file mode 100644 index bbc475c4..00000000 --- a/src/api/java/vazkii/botania/api/lexicon/LexiconEntry.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 14, 2014, 6:17:06 PM (GMT)] - */ -package vazkii.botania.api.lexicon; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import net.minecraft.util.StatCollector; -import vazkii.botania.api.BotaniaAPI; - -public class LexiconEntry implements Comparable<LexiconEntry> { - - public final String unlocalizedName; - public final LexiconCategory category; - - private KnowledgeType type = BotaniaAPI.basicKnowledge; - - public List<LexiconPage> pages = new ArrayList<LexiconPage>(); - private boolean priority = false; - - /** - * @param unlocalizedName The unlocalized name of this entry. This will be localized by the client display. - */ - public LexiconEntry(String unlocalizedName, LexiconCategory category) { - this.unlocalizedName = unlocalizedName; - this.category = category; - } - - /** - * Sets this page as prioritized, as in, will appear before others in the lexicon. - */ - public LexiconEntry setPriority() { - priority = true; - return this; - } - - /** - * Sets the Knowledge type of this entry. - */ - public LexiconEntry setKnowledgeType(KnowledgeType type) { - this.type = type; - return this; - } - - public KnowledgeType getKnowledgeType() { - return type; - } - - public boolean isPriority() { - return priority; - } - - public String getUnlocalizedName() { - return unlocalizedName; - } - - /** - * Sets what pages you want this entry to have. - */ - public LexiconEntry setLexiconPages(LexiconPage... pages) { - this.pages.addAll(Arrays.asList(pages)); - - for(int i = 0; i < this.pages.size(); i++) { - LexiconPage page = this.pages.get(i); - if(!page.skipRegistry) - page.onPageAdded(this, i); - } - - return this; - } - - /** - * Adds a page to the list of pages. - */ - public void addPage(LexiconPage page) { - pages.add(page); - } - - public final String getNameForSorting() { - return (priority ? 0 : 1) + StatCollector.translateToLocal(getUnlocalizedName()); - } - - @Override - public int compareTo(LexiconEntry o) { - return getNameForSorting().compareTo(o.getNameForSorting()); - } -} \ No newline at end of file diff --git a/src/api/java/vazkii/botania/api/lexicon/LexiconPage.java b/src/api/java/vazkii/botania/api/lexicon/LexiconPage.java deleted file mode 100644 index f17f0c5e..00000000 --- a/src/api/java/vazkii/botania/api/lexicon/LexiconPage.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 14, 2014, 6:17:24 PM (GMT)] - */ -package vazkii.botania.api.lexicon; - -import vazkii.botania.api.internal.IGuiLexiconEntry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public abstract class LexiconPage { - - public String unlocalizedName; - public boolean skipRegistry; - - public LexiconPage(String unlocalizedName) { - this.unlocalizedName = unlocalizedName; - } - - /** - * Does the rendering for this page. - * @param gui The active GuiScreen - * @param mx The mouse's relative X position. - * @param my The mouse's relative Y position. - */ - @SideOnly(Side.CLIENT) - public abstract void renderScreen(IGuiLexiconEntry gui, int mx, int my); - - /** - * Called per update tick. - */ - @SideOnly(Side.CLIENT) - public void updateScreen() { - // NO-OP - } - - /** - * Called when a key is pressed. - */ - @SideOnly(Side.CLIENT) - public void onKeyPressed(char c, int key) { - // NO-OP - } - - /** - * Called when {@link LexiconEntry#setLexiconPages(LexiconPage...)} is called. - */ - public void onPageAdded(LexiconEntry entry, int index) { - // NO-OP - } - - public String getUnlocalizedName() { - return unlocalizedName; - } - - public LexiconPage setSkipRegistry() { - skipRegistry = true; - return this; - } -} diff --git a/src/api/java/vazkii/botania/api/lexicon/LexiconRecipeMappings.java b/src/api/java/vazkii/botania/api/lexicon/LexiconRecipeMappings.java deleted file mode 100644 index 49b2a133..00000000 --- a/src/api/java/vazkii/botania/api/lexicon/LexiconRecipeMappings.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Mar 6, 2014, 3:54:12 PM (GMT)] - */ -package vazkii.botania.api.lexicon; - -import java.util.HashMap; -import java.util.Map; - -import net.minecraft.item.ItemStack; - -/** - * This class contains mappings for which entry and page correspond to each - * craftable ItemStack. Use the map method to map an ItemStack to a page in - * an entry in the lexicon. - */ -public final class LexiconRecipeMappings { - - private static Map<String, EntryData> mappings = new HashMap(); - - /** - * Maps the given stack to the given page of the entry. - */ - public static void map(ItemStack stack, LexiconEntry entry, int page, boolean force) { - EntryData data = new EntryData(entry, page); - String str = stackToString(stack); - - if(force || !mappings.containsKey(str)) - mappings.put(str, data); - } - - public static void map(ItemStack stack, LexiconEntry entry, int page) { - map(stack, entry, page, false); - } - - - public static EntryData getDataForStack(ItemStack stack) { - return mappings.get(stackToString(stack)); - } - - public static String stackToString(ItemStack stack) { - if(stack.hasTagCompound() && stack.getItem() instanceof IRecipeKeyProvider) - return ((IRecipeKeyProvider) stack.getItem()).getKey(stack); - - return stack.getUnlocalizedName() + "~" + stack.getItemDamage(); - } - - public static class EntryData { - - public final LexiconEntry entry; - public final int page; - - public EntryData(LexiconEntry entry, int page) { - this.entry = entry; - this.page = page; - } - - } -} diff --git a/src/api/java/vazkii/botania/api/mana/BurstProperties.java b/src/api/java/vazkii/botania/api/mana/BurstProperties.java deleted file mode 100644 index eed74809..00000000 --- a/src/api/java/vazkii/botania/api/mana/BurstProperties.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 31, 2014, 3:49:30 PM (GMT)] - */ -package vazkii.botania.api.mana; - -/** - * The properties of a mana burst, when shot. This is passed to the lens - * currently on the mana spreader to apply changes. - */ -public final class BurstProperties { - - public int maxMana; - public int ticksBeforeManaLoss; - public float manaLossPerTick; - public float gravity; - public float motionModifier; - - public int color; - - public BurstProperties(int maxMana, int ticksBeforeManaLoss, float manaLossPerTick, float gravity, float motionModifier, int color) { - this.maxMana = maxMana; - this.ticksBeforeManaLoss = ticksBeforeManaLoss; - this.manaLossPerTick = manaLossPerTick; - this.gravity = gravity; - this.motionModifier = motionModifier; - this.color = color; - } - -} diff --git a/src/api/java/vazkii/botania/api/mana/IClientManaHandler.java b/src/api/java/vazkii/botania/api/mana/IClientManaHandler.java deleted file mode 100644 index 889cfb51..00000000 --- a/src/api/java/vazkii/botania/api/mana/IClientManaHandler.java +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jul 2, 2014, 5:26:02 PM (GMT)] - */ -package vazkii.botania.api.mana; - -/** - * A TileEntity that implements this will get it's recieveMana call - * called on both client and server. If this is not implemented - * the call will only occur on the server. - */ -public interface IClientManaHandler extends IManaReceiver { - -} diff --git a/src/api/java/vazkii/botania/api/mana/ICreativeManaProvider.java b/src/api/java/vazkii/botania/api/mana/ICreativeManaProvider.java deleted file mode 100644 index 51f3cce9..00000000 --- a/src/api/java/vazkii/botania/api/mana/ICreativeManaProvider.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [May 25, 2014, 7:34:00 PM (GMT)] - */ -package vazkii.botania.api.mana; - -import net.minecraft.item.ItemStack; - -/** - * Have an item implement this to flag it as an infinite - * mana source for the purposes of the HUD rendered when - * an IManaUserItem implementing item is present. - */ -public interface ICreativeManaProvider { - - public boolean isCreative(ItemStack stack); - -} - diff --git a/src/api/java/vazkii/botania/api/mana/IKeyLocked.java b/src/api/java/vazkii/botania/api/mana/IKeyLocked.java deleted file mode 100644 index a7870e6b..00000000 --- a/src/api/java/vazkii/botania/api/mana/IKeyLocked.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jul 11, 2014, 4:29:32 PM (GMT)] - */ -package vazkii.botania.api.mana; - -/** - * A TileEntity that implements this interface has an IO key lock. This - * interface defines an input and output key.<br><br> - * - * A Spreader can only shoot mana into a IKeyLocked interfaced TE if the Input - * key of the TE is equal to the Output key of the Spreader.<br><br> - * - * A Spreader can only pull mana from a IKeyLocked interfaced IManaPool TE if the - * Output key of the IManaPool is equal to the Input key of the Spreader. - */ -public interface IKeyLocked { - - public String getInputKey(); - - public String getOutputKey(); - -} diff --git a/src/api/java/vazkii/botania/api/mana/ILaputaImmobile.java b/src/api/java/vazkii/botania/api/mana/ILaputaImmobile.java deleted file mode 100644 index 91cb0b93..00000000 --- a/src/api/java/vazkii/botania/api/mana/ILaputaImmobile.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jul 26, 2014, 9:51:58 PM (GMT)] - */ -package vazkii.botania.api.mana; - -import net.minecraft.world.World; - -/** - * A block that implements this has a flag for whether it can be moved by the Shard of Laputa. - */ -public interface ILaputaImmobile { - - public boolean canMove(World world, int x, int y, int z); - -} diff --git a/src/api/java/vazkii/botania/api/mana/ILens.java b/src/api/java/vazkii/botania/api/mana/ILens.java deleted file mode 100644 index 628d102b..00000000 --- a/src/api/java/vazkii/botania/api/mana/ILens.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 31, 2014, 3:03:04 PM (GMT)] - */ -package vazkii.botania.api.mana; - -import net.minecraft.item.ItemStack; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/** - * Have an Item implement this to be counted as a lens for the mana spreader. - */ -public interface ILens extends ILensEffect { - - @SideOnly(Side.CLIENT) - public int getLensColor(ItemStack stack); - - /** - * Can the source lens be combined with the composite lens? This is called - * for both the ILens instance of ItemStack.getItem() of sourceLens and compositeLens. - */ - public boolean canCombineLenses(ItemStack sourceLens, ItemStack compositeLens); - - /** - * Gets the composite lens in the stack passed in, return null for none. - */ - public ItemStack getCompositeLens(ItemStack stack); - - /** - * Sets the composite lens for the sourceLens as the compositeLens, returns - * the ItemStack with the combination. - */ - public ItemStack setCompositeLens(ItemStack sourceLens, ItemStack compositeLens); - -} diff --git a/src/api/java/vazkii/botania/api/mana/ILensEffect.java b/src/api/java/vazkii/botania/api/mana/ILensEffect.java deleted file mode 100644 index d97095b2..00000000 --- a/src/api/java/vazkii/botania/api/mana/ILensEffect.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Apr 14, 2014, 7:30:00 PM (GMT)] - */ -package vazkii.botania.api.mana; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.MovingObjectPosition; -import vazkii.botania.api.internal.IManaBurst; - -/** - * Have an item implement this for it to count as a lens effect and - * be able to change the properties of Mana Bursts. - */ -public interface ILensEffect { - - /** - * Called when a mana spreader that has this focus shoots a burst. This is where - * you change the properties of the burst. - */ - public void apply(ItemStack stack, BurstProperties props); - - /** - * Called when a mana burst fired from a mana spreader with this focus collides against - * any block. This is called after the collision is handled. - * @return True to kill the burst. False to keep it alive. - */ - public boolean collideBurst(IManaBurst burst, MovingObjectPosition pos, boolean isManaBlock, boolean dead, ItemStack stack); - - /** - * Called when a mana burst fired from a mana spreader with this focus is updated. - * This is called before the update is handled. - */ - public void updateBurst(IManaBurst burst, ItemStack stack); - - /** - * Called when the mana burst should do it's particles. Return false to not - * do any particles. - */ - public boolean doParticles(IManaBurst burst, ItemStack stack); - -} diff --git a/src/api/java/vazkii/botania/api/mana/IManaBlock.java b/src/api/java/vazkii/botania/api/mana/IManaBlock.java deleted file mode 100644 index 6896f059..00000000 --- a/src/api/java/vazkii/botania/api/mana/IManaBlock.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 22, 2014, 4:59:05 PM (GMT)] - */ -package vazkii.botania.api.mana; - -/** - * A TileEntity that implements this is considered a Mana Block. - * Just being a Mana Block doesn't mean much, look at the other IMana - * interfaces. - */ -public interface IManaBlock { - - /** - * Gets the amount of mana currently in this block. - */ - public int getCurrentMana(); - -} diff --git a/src/api/java/vazkii/botania/api/mana/IManaCollector.java b/src/api/java/vazkii/botania/api/mana/IManaCollector.java deleted file mode 100644 index a54d8c93..00000000 --- a/src/api/java/vazkii/botania/api/mana/IManaCollector.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 22, 2014, 5:01:19 PM (GMT)] - */ -package vazkii.botania.api.mana; - -import vazkii.botania.api.internal.IManaBurst; - -/** - * Any TileEntity that implements this is considered a mana collector, by - * which nearby generating flowers will pump mana into it.<br><br> - * - * <b>Implementation Instructions:</b><br> - * - Override invalidate() and onChunkUnload(), calling <i>ManaNetworkEvent.removeCollector(this);</i> on both.<br> - * - On the first tick of onUpdate(), call </i>ManaNetworkEvent.addCollector(this);<i> - */ -public interface IManaCollector extends IManaReceiver { - - /** - * Called every tick on the client case the player is holding a Wand of the Forest. - */ - public void onClientDisplayTick(); - - /** - * Get the multiplier of mana to input into the block, 1.0 is the original amount of mana - * in the burst. 0.9, for example, is 90%, so 10% of the mana in the burst will get - * dissipated. - */ - public float getManaYieldMultiplier(IManaBurst burst); - - /** - * Gets the maximum amount of mana this collector can have. - */ - public int getMaxMana(); - -} diff --git a/src/api/java/vazkii/botania/api/mana/IManaCollisionGhost.java b/src/api/java/vazkii/botania/api/mana/IManaCollisionGhost.java deleted file mode 100644 index 420f683c..00000000 --- a/src/api/java/vazkii/botania/api/mana/IManaCollisionGhost.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Mar 10, 2014, 7:49:19 PM (GMT)] - */ -package vazkii.botania.api.mana; - -/** - * Any TileEntity that implements this can be counted as a "ghost" block of - * sorts, that won't call the collision code for the mana bursts. - */ -public interface IManaCollisionGhost { - - public boolean isGhost(); - -} diff --git a/src/api/java/vazkii/botania/api/mana/IManaItem.java b/src/api/java/vazkii/botania/api/mana/IManaItem.java deleted file mode 100644 index 42dfef15..00000000 --- a/src/api/java/vazkii/botania/api/mana/IManaItem.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Mar 6, 2014, 9:07:40 AM (GMT)] - */ -package vazkii.botania.api.mana; - -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; - -/** - * An item that implements this can be counted as an item that can - * contain mana. - */ -public interface IManaItem { - - /** - * Gets the amount of mana this item contains - */ - public int getMana(ItemStack stack); - - /** - * Gets the max amount of mana this item can hold. - */ - public int getMaxMana(ItemStack stack); - - /** - * Adds mana to this item. - */ - public void addMana(ItemStack stack, int mana); - - /** - * Can this item receive mana from a mana Pool? - * @param pool The pool it's receiving mana from, can be casted to IManaPool. - * @see IManaPool#isOutputtingPower() - */ - public boolean canReceiveManaFromPool(ItemStack stack, TileEntity pool); - - /** - * Can this item recieve mana from another item? - */ - public boolean canReceiveManaFromItem(ItemStack stack, ItemStack otherStack); - - /** - * Can this item export mana to a mana Pool? - * @param pool The pool it's exporting mana to, can be casted to IManaPool. - * @see IManaPool#isOutputtingPower() - */ - public boolean canExportManaToPool(ItemStack stack,TileEntity pool); - - /** - * Can this item export mana to another item? - */ - public boolean canExportManaToItem(ItemStack stack, ItemStack otherStack); - - /** - * If this item simply does not export mana at all, set this to true. This is - * used to skip items that contain mana but can't export it when drawing the - * mana bar above the XP bar. - */ - public boolean isNoExport(ItemStack stack); - -} diff --git a/src/api/java/vazkii/botania/api/mana/IManaPool.java b/src/api/java/vazkii/botania/api/mana/IManaPool.java deleted file mode 100644 index b93bf6e8..00000000 --- a/src/api/java/vazkii/botania/api/mana/IManaPool.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 22, 2014, 5:03:09 PM (GMT)] - */ -package vazkii.botania.api.mana; - -/** - * Any TileEntity that implements this is considered a Mana Pool, - * by which nearby functional flowers will pull mana from it.<br> - * Mana Distributors will also accept it as valid output.<br><br> - * - * <b>Implementation Instructions:</b><br> - * - Override invalidate() and onChunkUnload(), calling <i>ManaNetworkEvent.removePool(this);</i> on both.<br> - * - On the first tick of onUpdate(), call <i>ManaNetworkEvent.addPool(this);</i> - */ -public interface IManaPool extends IManaReceiver { - - /** - * Returns false if the mana pool is accepting power from other power items, - * true if it's sending power into them. - */ - public boolean isOutputtingPower(); - -} diff --git a/src/api/java/vazkii/botania/api/mana/IManaReceiver.java b/src/api/java/vazkii/botania/api/mana/IManaReceiver.java deleted file mode 100644 index 2838c7b7..00000000 --- a/src/api/java/vazkii/botania/api/mana/IManaReceiver.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 22, 2014, 4:55:00 PM (GMT)] - */ -package vazkii.botania.api.mana; - -/** - * Any TileEntity that implements this can receive mana from mana bursts. - */ -public interface IManaReceiver extends IManaBlock { - - /** - * Is this Mana Receiver is full? Being full means no mana bursts will be sent. - */ - public boolean isFull(); - - /** - * Called when this receiver receives mana. - */ - public void recieveMana(int mana); - - /** - * Can this tile receive mana from bursts? Generally set to false for - * implementations of IManaCollector. - */ - public boolean canRecieveManaFromBursts(); - -} diff --git a/src/api/java/vazkii/botania/api/mana/IManaTrigger.java b/src/api/java/vazkii/botania/api/mana/IManaTrigger.java deleted file mode 100644 index 684a2c1d..00000000 --- a/src/api/java/vazkii/botania/api/mana/IManaTrigger.java +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [May 16, 2014, 7:52:53 PM (GMT)] - */ -package vazkii.botania.api.mana; - -import net.minecraft.world.World; -import vazkii.botania.api.internal.IManaBurst; - -/** - * Have a block implement this class to make it do something when a mana burst collides with it. - */ -public interface IManaTrigger { - - public void onBurstCollision(IManaBurst burst, World world, int x, int y, int z); - -} diff --git a/src/api/java/vazkii/botania/api/mana/IManaUsingItem.java b/src/api/java/vazkii/botania/api/mana/IManaUsingItem.java deleted file mode 100644 index d06cf744..00000000 --- a/src/api/java/vazkii/botania/api/mana/IManaUsingItem.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [May 25, 2014, 7:32:10 PM (GMT)] - */ -package vazkii.botania.api.mana; - -import net.minecraft.item.ItemStack; - -/** - * Any item that implements this interface is an item that would use mana - * from the player's inventory. If there's any items in the inventory or - * equipped in either the baubles or armor inventories that implement - * this interface, a mana bar will be rendered. - */ -public interface IManaUsingItem { - - public boolean usesMana(ItemStack stack); - -} diff --git a/src/api/java/vazkii/botania/api/mana/IPoolOverlayProvider.java b/src/api/java/vazkii/botania/api/mana/IPoolOverlayProvider.java deleted file mode 100644 index f677c3ee..00000000 --- a/src/api/java/vazkii/botania/api/mana/IPoolOverlayProvider.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jul 2, 2014, 6:36:54 PM (GMT)] - */ -package vazkii.botania.api.mana; - -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -/** - * A block that implements this can provide an IIcon (block icons only) - * to be used as an overlay for the mana pool, similarly to the mana void - * and catalysts. - */ -public interface IPoolOverlayProvider { - - public IIcon getIcon(World world, int x, int y, int z); - -} diff --git a/src/api/java/vazkii/botania/api/mana/ITinyPlanetExcempt.java b/src/api/java/vazkii/botania/api/mana/ITinyPlanetExcempt.java deleted file mode 100644 index 004c52ed..00000000 --- a/src/api/java/vazkii/botania/api/mana/ITinyPlanetExcempt.java +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jul 22, 2014, 2:26:14 PM (GMT)] - */ -package vazkii.botania.api.mana; - -import net.minecraft.item.ItemStack; - -/** - * Any Item that implements ILensEffect and this will have - * a check before being pulled by the Tiny Planet. - */ -public interface ITinyPlanetExcempt { - - public boolean shouldPull(ItemStack stack); - -} diff --git a/src/api/java/vazkii/botania/api/mana/ManaItemHandler.java b/src/api/java/vazkii/botania/api/mana/ManaItemHandler.java deleted file mode 100644 index 74fb0053..00000000 --- a/src/api/java/vazkii/botania/api/mana/ManaItemHandler.java +++ /dev/null @@ -1,201 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Mar 13, 2014, 5:32:24 PM (GMT)] - */ -package vazkii.botania.api.mana; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import vazkii.botania.api.BotaniaAPI; - -public final class ManaItemHandler { - - /** - * Requests mana from items in a given player's inventory. - * @param manaToGet How much mana is to be requested, if less mana exists than this amount, - * the amount of mana existent will be returned instead, if you want exact values use requestManaExact. - * @param remove If true, the mana will be removed from the target item. Set to false to just check. - * @return The amount of mana received from the request. - */ - public static int requestMana(ItemStack stack, EntityPlayer player, int manaToGet, boolean remove) { - if(stack == null) - return 0; - - IInventory mainInv = player.inventory; - IInventory baublesInv = BotaniaAPI.internalHandler.getBaublesInventory(player); - - int invSize = mainInv.getSizeInventory(); - int size = invSize; - if(baublesInv != null) - size += baublesInv.getSizeInventory(); - - for(int i = 0; i < size; i++) { - boolean useBaubles = i >= invSize; - IInventory inv = useBaubles ? baublesInv : mainInv; - ItemStack stackInSlot = inv.getStackInSlot(i - (useBaubles ? invSize : 0)); - if(stackInSlot == stack) - continue; - - if(stackInSlot != null && stackInSlot.getItem() instanceof IManaItem) { - IManaItem manaItem = (IManaItem) stackInSlot.getItem(); - if(manaItem.canExportManaToItem(stackInSlot, stack) && manaItem.getMana(stackInSlot) > 0) { - if(stack.getItem() instanceof IManaItem && !((IManaItem) stack.getItem()).canReceiveManaFromItem(stack, stackInSlot)) - continue; - - int mana = Math.min(manaToGet, manaItem.getMana(stackInSlot)); - - if(remove) - manaItem.addMana(stackInSlot, -mana); - - return mana; - } - } - } - - return 0; - } - - /** - * Requests an exact amount of mana from items in a given player's inventory. - * @param manaToGet How much mana is to be requested, if less mana exists than this amount, - * false will be returned instead, and nothing will happen. - * @param remove If true, the mana will be removed from the target item. Set to false to just check. - * @return If the request was succesful. - */ - public static boolean requestManaExact(ItemStack stack, EntityPlayer player, int manaToGet, boolean remove) { - if(stack == null) - return false; - - IInventory mainInv = player.inventory; - IInventory baublesInv = BotaniaAPI.internalHandler.getBaublesInventory(player); - - int invSize = mainInv.getSizeInventory(); - int size = invSize; - if(baublesInv != null) - size += baublesInv.getSizeInventory(); - - for(int i = 0; i < size; i++) { - boolean useBaubles = i >= invSize; - IInventory inv = useBaubles ? baublesInv : mainInv; - ItemStack stackInSlot = inv.getStackInSlot(i - (useBaubles ? invSize : 0)); - if(stackInSlot == stack) - continue; - - if(stackInSlot != null && stackInSlot.getItem() instanceof IManaItem) { - IManaItem manaItemSlot = (IManaItem) stackInSlot.getItem(); - if(manaItemSlot.canExportManaToItem(stackInSlot, stack) && manaItemSlot.getMana(stackInSlot) > manaToGet) { - if(stack.getItem() instanceof IManaItem && !((IManaItem) stack.getItem()).canReceiveManaFromItem(stack, stackInSlot)) - continue; - - if(remove) - manaItemSlot.addMana(stackInSlot, -manaToGet); - - return true; - } - } - } - - return false; - } - - /** - * Dispatches mana to items in a given player's inventory. Note that this method - * does not automatically remove mana from the item which is exporting. - * @param manaToSend How much mana is to be sent. - * @param remove If true, the mana will be added from the target item. Set to false to just check. - * @return The amount of mana actually sent. - */ - public static int dispatchMana(ItemStack stack, EntityPlayer player, int manaToSend, boolean add) { - if(stack == null) - return 0; - - IInventory mainInv = player.inventory; - IInventory baublesInv = BotaniaAPI.internalHandler.getBaublesInventory(player); - - int invSize = mainInv.getSizeInventory(); - int size = invSize; - if(baublesInv != null) - size += baublesInv.getSizeInventory(); - - for(int i = 0; i < size; i++) { - boolean useBaubles = i >= invSize; - IInventory inv = useBaubles ? baublesInv : mainInv; - ItemStack stackInSlot = inv.getStackInSlot(i - (useBaubles ? invSize : 0)); - if(stackInSlot == stack) - continue; - - if(stackInSlot != null && stackInSlot.getItem() instanceof IManaItem) { - IManaItem manaItemSlot = (IManaItem) stackInSlot.getItem(); - - if(manaItemSlot.canReceiveManaFromItem(stackInSlot, stack)) { - if(stack.getItem() instanceof IManaItem && !((IManaItem) stack.getItem()).canExportManaToItem(stack, stackInSlot)) - continue; - - int received = 0; - if(manaItemSlot.getMana(stackInSlot) + manaToSend <= manaItemSlot.getMaxMana(stackInSlot)) - received = manaToSend; - else received = manaToSend - (manaItemSlot.getMana(stackInSlot) + manaToSend - manaItemSlot.getMaxMana(stackInSlot)); - - - if(add) - manaItemSlot.addMana(stackInSlot, manaToSend); - - return received; - } - } - } - - return 0; - } - - /** - * Dispatches an exact amount of mana to items in a given player's inventory. Note that this method - * does not automatically remove mana from the item which is exporting. - * @param manaToSend How much mana is to be sent. - * @param remove If true, the mana will be added from the target item. Set to false to just check. - * @return If an item received the mana sent. - */ - public static boolean dispatchManaExact(ItemStack stack, EntityPlayer player, int manaToSend, boolean add) { - if(stack == null) - return false; - - IInventory mainInv = player.inventory; - IInventory baublesInv = BotaniaAPI.internalHandler.getBaublesInventory(player); - - int invSize = mainInv.getSizeInventory(); - int size = invSize; - if(baublesInv != null) - size += baublesInv.getSizeInventory(); - - for(int i = 0; i < size; i++) { - boolean useBaubles = i >= invSize; - IInventory inv = useBaubles ? baublesInv : mainInv; - ItemStack stackInSlot = inv.getStackInSlot(i - (useBaubles ? invSize : 0)); - if(stackInSlot == stack) - continue; - - if(stackInSlot != null && stackInSlot.getItem() instanceof IManaItem) { - IManaItem manaItemSlot = (IManaItem) stackInSlot.getItem(); - if(manaItemSlot.getMana(stackInSlot) + manaToSend <= manaItemSlot.getMaxMana(stackInSlot) && manaItemSlot.canReceiveManaFromItem(stackInSlot, stack)) { - if(stack.getItem() instanceof IManaItem && !((IManaItem) stack.getItem()).canExportManaToItem(stack, stackInSlot)) - continue; - - if(add) - manaItemSlot.addMana(stackInSlot, manaToSend); - - return true; - } - } - } - - return false; - } -} diff --git a/src/api/java/vazkii/botania/api/mana/ManaNetworkEvent.java b/src/api/java/vazkii/botania/api/mana/ManaNetworkEvent.java deleted file mode 100644 index e04253a7..00000000 --- a/src/api/java/vazkii/botania/api/mana/ManaNetworkEvent.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 22, 2014, 5:04:30 PM (GMT)] - */ -package vazkii.botania.api.mana; - -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.MinecraftForge; -import cpw.mods.fml.common.eventhandler.Event; - -public class ManaNetworkEvent extends Event { - - public final TileEntity tile; - public final ManaBlockType type; - public final Action action; - - public ManaNetworkEvent(TileEntity tile, ManaBlockType type, Action action) { - this.tile = tile; - this.type = type; - this.action = action; - } - - public static void addCollector(TileEntity tile) { - ManaNetworkEvent event = new ManaNetworkEvent(tile, ManaBlockType.COLLECTOR, Action.ADD); - MinecraftForge.EVENT_BUS.post(event); - } - - public static void removeCollector(TileEntity tile) { - ManaNetworkEvent event = new ManaNetworkEvent(tile, ManaBlockType.COLLECTOR, Action.REMOVE); - MinecraftForge.EVENT_BUS.post(event); - } - - public static void addPool(TileEntity tile) { - ManaNetworkEvent event = new ManaNetworkEvent(tile, ManaBlockType.POOL, Action.ADD); - MinecraftForge.EVENT_BUS.post(event); - } - - public static void removePool(TileEntity tile) { - ManaNetworkEvent event = new ManaNetworkEvent(tile, ManaBlockType.POOL, Action.REMOVE); - MinecraftForge.EVENT_BUS.post(event); - } - - public enum ManaBlockType { - POOL, COLLECTOR - } - - public enum Action { - REMOVE, ADD - } -} diff --git a/src/api/java/vazkii/botania/api/mana/TileSignature.java b/src/api/java/vazkii/botania/api/mana/TileSignature.java deleted file mode 100644 index 5573670d..00000000 --- a/src/api/java/vazkii/botania/api/mana/TileSignature.java +++ /dev/null @@ -1,15 +0,0 @@ -package vazkii.botania.api.mana; - -import net.minecraft.tileentity.TileEntity; - -public class TileSignature { - - public final TileEntity tile; - public final boolean remoteWorld; - - public TileSignature(TileEntity tile, boolean remoteWorld) { - this.tile = tile; - this.remoteWorld = remoteWorld; - } - -} diff --git a/src/api/java/vazkii/botania/api/mana/spark/ISparkAttachable.java b/src/api/java/vazkii/botania/api/mana/spark/ISparkAttachable.java deleted file mode 100644 index 4353f01c..00000000 --- a/src/api/java/vazkii/botania/api/mana/spark/ISparkAttachable.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Aug 21, 2014, 5:44:13 PM (GMT)] - */ -package vazkii.botania.api.mana.spark; - -import net.minecraft.item.ItemStack; -import vazkii.botania.api.mana.IManaReceiver; - -/** - * A TileEntity that implements this can have a Spark attached to it. - * For the Spark to be allowed to have upgrades, it needs to be an IManaPool. - */ -public interface ISparkAttachable extends IManaReceiver { - - /** - * Can this block have a Spark attached to it. Note that this will not - * unattach the Spark if it's changed later. - */ - public boolean canAttachSpark(ItemStack stack); - - /** - * Called when the Spark is attached. - */ - public void attachSpark(ISparkEntity entity); - - /** - * Gets the Spark that is attached to this block. A common implementation is - * to check for Spark entities above: - * - List<ISparkEntity> sparks = worldObj.getEntitiesWithinAABB(ISparkEntity.class, AxisAlignedBB.getBoundingBox(xCoord, yCoord + 1, zCoord, xCoord + 1, yCoord + 2, zCoord + 1)); - if(sparks.size() == 1) { - Entity e = (Entity) sparks.get(0); - return (ISparkEntity) e; - } - - return null; - */ - public ISparkEntity getAttachedSpark(); - - /** - * Return true if this Tile no longer requires mana and all Sparks - * transferring mana to it should cancel their transfer. - */ - public boolean areIncomingTranfersDone(); - -} diff --git a/src/api/java/vazkii/botania/api/mana/spark/ISparkEntity.java b/src/api/java/vazkii/botania/api/mana/spark/ISparkEntity.java deleted file mode 100644 index 084b827c..00000000 --- a/src/api/java/vazkii/botania/api/mana/spark/ISparkEntity.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Aug 21, 2014, 5:44:07 PM (GMT)] - */ -package vazkii.botania.api.mana.spark; - -import java.util.Collection; - -/** - * An Entity that implements this is considered a Spark. - */ -public interface ISparkEntity { - - /** - * Which TileEntity is this Spark attached to? A common implementation is checking the block below. - * - int x = MathHelper.floor_double(posX); - int y = MathHelper.floor_double(posY) - 1; - int z = MathHelper.floor_double(posZ); - TileEntity tile = worldObj.getTileEntity(x, y, z); - if(tile != null && tile instanceof ISparkAttachable) - return (ISparkAttachable) tile; - - return null; - */ - public ISparkAttachable getAttachedTile(); - - /** - * Gets a collection of all Sparks this is tranfering to. - */ - public Collection<ISparkEntity> getTransfers(); - - /** - * Registers the Spark passed in as a Spark meant for mana to be transfered towards. - */ - public void registerTransfer(ISparkEntity entity); - - /** - * Gets which upgrade is in this Spark.<br> - * 0: None<br> - * 1: Dispersive<br> - * 2: Dominant<br> - * 3: Recessive<br> - * 4: Isolated - */ - public int getUpgrade(); - - /** - * Sets the upgrade on this Spark. See {@link ISparkEntity#getUpgrade} - */ - public void setUpgrade(int upgrade); - - /** - * See {@link ISparkAttachable#areIncomingTranfersDone()} - */ - public boolean areIncomingTransfersDone(); - -} diff --git a/src/api/java/vazkii/botania/api/mana/spark/SparkHelper.java b/src/api/java/vazkii/botania/api/mana/spark/SparkHelper.java deleted file mode 100644 index 6bb3196a..00000000 --- a/src/api/java/vazkii/botania/api/mana/spark/SparkHelper.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Aug 21, 2014, 7:16:11 PM (GMT)] - */ -package vazkii.botania.api.mana.spark; - -import java.util.List; - -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.world.World; - -public final class SparkHelper { - - public static final int SPARK_SCAN_RANGE = 12; - - public static List<ISparkEntity> getSparksAround(World world, double x, double y, double z) { - return SparkHelper.getEntitiesAround(ISparkEntity.class, world, x, y, z); - } - - public static <T> List<T> getEntitiesAround(Class<? extends T> clazz, World world, double x, double y, double z) { - int r = SPARK_SCAN_RANGE; - List<T> entities = world.getEntitiesWithinAABB(clazz, AxisAlignedBB.getBoundingBox(x - r, y - r, z - r, x + r, y + r, z + r)); - return entities; - } - -} diff --git a/src/api/java/vazkii/botania/api/package-info.java b/src/api/java/vazkii/botania/api/package-info.java deleted file mode 100644 index 82da263c..00000000 --- a/src/api/java/vazkii/botania/api/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -@API(owner = "Botania", apiVersion = "18", provides = "BotaniaAPI") -package vazkii.botania.api; -import cpw.mods.fml.common.API; - diff --git a/src/api/java/vazkii/botania/api/recipe/IElvenItem.java b/src/api/java/vazkii/botania/api/recipe/IElvenItem.java deleted file mode 100644 index e614014d..00000000 --- a/src/api/java/vazkii/botania/api/recipe/IElvenItem.java +++ /dev/null @@ -1,14 +0,0 @@ -package vazkii.botania.api.recipe; - -import net.minecraft.item.ItemStack; - -/** - * Any Item that implements this is classified as an "Elven Item", by which, - * it'll not go through the alfheim portal. Any item that comes out of it - * must implement this or it'll just go back in. - */ -public interface IElvenItem { - - public boolean isElvenItem(ItemStack stack); - -} diff --git a/src/api/java/vazkii/botania/api/recipe/IFlowerComponent.java b/src/api/java/vazkii/botania/api/recipe/IFlowerComponent.java deleted file mode 100644 index fe5bf3cd..00000000 --- a/src/api/java/vazkii/botania/api/recipe/IFlowerComponent.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Feb 15, 2014, 2:36:35 PM (GMT)] - */ -package vazkii.botania.api.recipe; - -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; - -/** - * Have an Item implement this to allow it to be used in the Petal Apothecary. - */ -public interface IFlowerComponent { - - public boolean canFit(ItemStack stack, IInventory apothecary); - - public int getParticleColor(ItemStack stack); - -} diff --git a/src/api/java/vazkii/botania/api/recipe/RecipeElvenTrade.java b/src/api/java/vazkii/botania/api/recipe/RecipeElvenTrade.java deleted file mode 100644 index dbea13e8..00000000 --- a/src/api/java/vazkii/botania/api/recipe/RecipeElvenTrade.java +++ /dev/null @@ -1,94 +0,0 @@ -package vazkii.botania.api.recipe; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -public class RecipeElvenTrade { - - ItemStack output; - List<Object> inputs; - - public RecipeElvenTrade(ItemStack output, Object... inputs) { - this.output = output; - - List<Object> inputsToSet = new ArrayList(); - for(Object obj : inputs) { - if(obj instanceof String || obj instanceof ItemStack) - inputsToSet.add(obj); - else throw new IllegalArgumentException("Invalid input"); - } - - this.inputs = inputsToSet; - } - - public boolean matches(List<ItemStack> stacks, boolean remove) { - List<Object> inputsMissing = new ArrayList(inputs); - List<ItemStack> stacksToRemove = new ArrayList(); - - for(ItemStack stack : stacks) { - if(stack == null) { - continue; - } - if(inputsMissing.isEmpty()) - break; - - int stackIndex = -1, oredictIndex = -1; - - for(int j = 0; j < inputsMissing.size(); j++) { - Object input = inputsMissing.get(j); - if(input instanceof String) { - List<ItemStack> validStacks = OreDictionary.getOres((String) input); - boolean found = false; - for(ItemStack ostack : validStacks) { - ItemStack cstack = ostack.copy(); - if(cstack.getItemDamage() == Short.MAX_VALUE) - cstack.setItemDamage(stack.getItemDamage()); - - if(stack.isItemEqual(cstack)) { - if(!stacksToRemove.contains(stack)) - stacksToRemove.add(stack); - oredictIndex = j; - found = true; - break; - } - } - - if(found) - break; - } else if(input instanceof ItemStack && simpleAreStacksEqual((ItemStack) input, stack)) { - if(!stacksToRemove.contains(stack)) - stacksToRemove.add(stack); - stackIndex = j; - break; - } - } - - if(stackIndex != -1) - inputsMissing.remove(stackIndex); - else if(oredictIndex != -1) - inputsMissing.remove(oredictIndex); - } - - if(remove) - for(ItemStack r : stacksToRemove) - stacks.remove(r); - - return inputsMissing.isEmpty(); - } - - boolean simpleAreStacksEqual(ItemStack stack, ItemStack stack2) { - return stack.getItem() == stack2.getItem() && stack.getItemDamage() == stack2.getItemDamage(); - } - - public List<Object> getInputs() { - return new ArrayList(inputs); - } - - public ItemStack getOutput() { - return output; - } - -} diff --git a/src/api/java/vazkii/botania/api/recipe/RecipeManaInfusion.java b/src/api/java/vazkii/botania/api/recipe/RecipeManaInfusion.java deleted file mode 100644 index e87b002d..00000000 --- a/src/api/java/vazkii/botania/api/recipe/RecipeManaInfusion.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 30, 2014, 5:57:07 PM (GMT)] - */ -package vazkii.botania.api.recipe; - -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -public class RecipeManaInfusion { - - ItemStack output; - Object input; - int mana; - boolean isAlchemy = false; - boolean isConjuration = false; - - public RecipeManaInfusion(ItemStack output, Object input, int mana) { - this.output = output; - this.input = input; - this.mana = mana; - } - - public boolean matches(ItemStack stack) { - if(input instanceof ItemStack) - return stack.isItemEqual((ItemStack) input); - - if(input instanceof String) { - List<ItemStack> validStacks = OreDictionary.getOres((String) input); - - for(ItemStack ostack : validStacks) { - ItemStack cstack = ostack.copy(); - if(cstack.getItemDamage() == Short.MAX_VALUE) - cstack.setItemDamage(stack.getItemDamage()); - - if(stack.isItemEqual(cstack)) - return true; - } - } - - return false; - } - - public void setAlchemy(boolean alchemy) { - isAlchemy = alchemy; - } - - public boolean isAlchemy() { - return isAlchemy; - } - - public void setConjuration(boolean conjuration) { - isConjuration = conjuration; - } - - public boolean isConjuration() { - return isConjuration; - } - - public Object getInput() { - return input; - } - - public ItemStack getOutput() { - return output; - } - - public int getManaToConsume() { - return mana; - } -} - diff --git a/src/api/java/vazkii/botania/api/recipe/RecipePetals.java b/src/api/java/vazkii/botania/api/recipe/RecipePetals.java deleted file mode 100644 index 0dba51ac..00000000 --- a/src/api/java/vazkii/botania/api/recipe/RecipePetals.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 22, 2014, 2:02:44 PM (GMT)] - */ -package vazkii.botania.api.recipe; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -public class RecipePetals { - - ItemStack output; - List<Object> inputs; - - public RecipePetals(ItemStack output, Object... inputs) { - this.output = output; - - List<Object> inputsToSet = new ArrayList(); - for(Object obj : inputs) { - if(obj instanceof String || obj instanceof ItemStack) - inputsToSet.add(obj); - else throw new IllegalArgumentException("Invalid input"); - } - - this.inputs = inputsToSet; - } - - public boolean matches(IInventory inv) { - List<Object> inputsMissing = new ArrayList(inputs); - - for(int i = 0; i < inv.getSizeInventory(); i++) { - ItemStack stack = inv.getStackInSlot(i); - if(stack == null) - break; - - int stackIndex = -1, oredictIndex = -1; - - for(int j = 0; j < inputsMissing.size(); j++) { - Object input = inputsMissing.get(j); - if(input instanceof String) { - List<ItemStack> validStacks = OreDictionary.getOres((String) input); - boolean found = false; - for(ItemStack ostack : validStacks) { - ItemStack cstack = ostack.copy(); - if(cstack.getItemDamage() == Short.MAX_VALUE) - cstack.setItemDamage(stack.getItemDamage()); - - if(stack.isItemEqual(cstack)) { - oredictIndex = j; - found = true; - break; - } - } - - - if(found) - break; - } else if(input instanceof ItemStack && simpleAreStacksEqual((ItemStack) input, stack)) { - stackIndex = j; - break; - } - } - - if(stackIndex != -1) - inputsMissing.remove(stackIndex); - else if(oredictIndex != -1) - inputsMissing.remove(oredictIndex); - else return false; - } - - return inputsMissing.isEmpty(); - } - - boolean simpleAreStacksEqual(ItemStack stack, ItemStack stack2) { - return stack.getItem() == stack2.getItem() && stack.getItemDamage() == stack2.getItemDamage(); - } - - public List<Object> getInputs() { - return new ArrayList(inputs); - } - - public ItemStack getOutput() { - return output; - } - -} diff --git a/src/api/java/vazkii/botania/api/recipe/RecipeRuneAltar.java b/src/api/java/vazkii/botania/api/recipe/RecipeRuneAltar.java deleted file mode 100644 index 745c9573..00000000 --- a/src/api/java/vazkii/botania/api/recipe/RecipeRuneAltar.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Feb 5, 2014, 1:41:14 PM (GMT)] - */ -package vazkii.botania.api.recipe; - -import net.minecraft.item.ItemStack; - -public class RecipeRuneAltar extends RecipePetals { - - ItemStack output; - int mana; - - public RecipeRuneAltar(ItemStack output, int mana, Object... inputs) { - super(output, inputs); - this.output = output; - this.mana = mana; - } - - public int getManaUsage() { - return mana; - } - -} diff --git a/src/api/java/vazkii/botania/api/subtile/ISpecialFlower.java b/src/api/java/vazkii/botania/api/subtile/ISpecialFlower.java deleted file mode 100644 index 0ef31493..00000000 --- a/src/api/java/vazkii/botania/api/subtile/ISpecialFlower.java +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 22, 2014, 7:12:28 PM (GMT)] - */ -package vazkii.botania.api.subtile; - -/** - * The special flowers in botania implement this. Used for cases where - * BlockFlower would be checked against, but isn't convenient for - * the special flowers with effects. For Azanor and Lycaon. - */ -public interface ISpecialFlower { - -} diff --git a/src/api/java/vazkii/botania/api/subtile/ISubTileContainer.java b/src/api/java/vazkii/botania/api/subtile/ISubTileContainer.java deleted file mode 100644 index ddfaee7f..00000000 --- a/src/api/java/vazkii/botania/api/subtile/ISubTileContainer.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Aug 26, 2014, 5:42:16 PM (GMT)] - */ -package vazkii.botania.api.subtile; - -/** - * A TileEntity that implements this contains a SubTileEntity. - */ -public interface ISubTileContainer { - - /** - * Gets the SubTile in this block. Generally shouldn't return null, but in that - * case use the fallback DummySubTile. - */ - public SubTileEntity getSubTile(); - - /** - * Sets the SubTile on this block from it's name. - */ - public void setSubTile(String name); - -} diff --git a/src/api/java/vazkii/botania/api/subtile/SubTileEntity.java b/src/api/java/vazkii/botania/api/subtile/SubTileEntity.java deleted file mode 100644 index 619d00f3..00000000 --- a/src/api/java/vazkii/botania/api/subtile/SubTileEntity.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 24, 2014, 3:59:06 PM (GMT)] - */ -package vazkii.botania.api.subtile; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.util.IIcon; -import vazkii.botania.api.BotaniaAPI; -import vazkii.botania.api.lexicon.LexiconEntry; -import vazkii.botania.api.wand.IWandBindable; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/** - * A Sub-TileEntity, this is used for the flower system. Make sure to map subclasses - * of this using BotaniaAPI.mapSubTile(String, Class). Any subclass of this must have - * a no parameter constructor. - */ -public class SubTileEntity { - - protected TileEntity supertile; - - /** The Tag items should use to store which sub tile they are. **/ - public static final String TAG_TYPE = "type"; - - public void setSupertile(TileEntity tile) { - supertile = tile; - } - - public boolean canUpdate() { - return false; - } - - public void onUpdate() { } - - /** - * Writes some extra data to a network packet. This data is read - * by readFromPacketNBT on the client that receives the packet. - * Note: This method is also used to write to the world NBT. - */ - public void writeToPacketNBT(NBTTagCompound cmp) { } - - /** - * Reads data from a network packet. This data is written by - * writeToPacketNBT in the server. Note: This method is also used - * to read from the world NBT. - */ - public void readFromPacketNBT(NBTTagCompound cmp) { } - - public void sync() { - supertile.getWorldObj().markBlockForUpdate(supertile.xCoord, supertile.yCoord, supertile.zCoord); - } - - public String getUnlocalizedName() { - return BotaniaAPI.getSubTileStringMapping(getClass()); - } - - /** - * Gets the icon for this SubTileEntity, this is a block icon. - */ - @SideOnly(Side.CLIENT) - public IIcon getIcon() { - return BotaniaAPI.internalHandler.getSubTileIconForName(getUnlocalizedName()); - } - - /** - * Called when a Wand of the Forest is used on this sub tile. Note that the - * player parameter can be null if this is called from a dispenser. - */ - public boolean onWanded(EntityPlayer player, ItemStack wand) { - return false; - } - - /** - * Gets which Lexicon Entry to open when this sub tile is right clicked with a lexicon. - */ - public LexiconEntry getEntry() { - return null; - } - - /** - * Gets the block coordinates this is bound to, for use with the wireframe render - * when the sub tile is being hovered with a wand of the forest. - */ - @SideOnly(Side.CLIENT) - public ChunkCoordinates getBinding() { - return null; - } - - /** - * @see IWandBindable#canSelect(EntityPlayer, ItemStack, int, int, int, int) - */ - public boolean canSelect(EntityPlayer player, ItemStack wand, int x, int y, int z, int side) { - return false; - } - - /** - * @see IWandBindable#bindTo(EntityPlayer, ItemStack, int, int, int, int) - */ - public boolean bindTo(EntityPlayer player, ItemStack wand, int x, int y, int z, int side) { - return false; - } - - /** - * Called on the client when the block being pointed at is the one with this sub tile. - * Used to render a HUD portraying some data from this sub tile. - */ - @SideOnly(Side.CLIENT) - public void renderHUD(Minecraft mc, ScaledResolution res) { - // NO-OP - } -} diff --git a/src/api/java/vazkii/botania/api/subtile/SubTileFunctional.java b/src/api/java/vazkii/botania/api/subtile/SubTileFunctional.java deleted file mode 100644 index 7d95afe7..00000000 --- a/src/api/java/vazkii/botania/api/subtile/SubTileFunctional.java +++ /dev/null @@ -1,212 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 24, 2014, 8:03:44 PM (GMT)] - */ -package vazkii.botania.api.subtile; - -import java.awt.Color; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.util.StatCollector; -import net.minecraftforge.common.util.ForgeDirection; -import vazkii.botania.api.BotaniaAPI; -import vazkii.botania.api.internal.IManaNetwork; -import vazkii.botania.api.mana.IManaPool; - -/** - * The basic class for a Functional Flower. - */ -public class SubTileFunctional extends SubTileEntity { - - private static final String TAG_MANA = "mana"; - - private static final String TAG_POOL_X = "poolX"; - private static final String TAG_POOL_Y = "poolY"; - private static final String TAG_POOL_Z = "poolZ"; - - public int mana; - - public int redstoneSignal = 0; - - int sizeLastCheck = -1; - TileEntity linkedPool = null; - public int knownMana = -1; - - ChunkCoordinates cachedPoolCoordinates = null; - - @Override - public boolean canUpdate() { - return true; - } - - /** - * If set to true, redstoneSignal will be updated every tick. - */ - public boolean acceptsRedstone() { - return false; - } - - @Override - public void onUpdate() { - super.onUpdate(); - - linkPool(); - - if(linkedPool != null) { - IManaPool pool = (IManaPool) linkedPool; - int manaInPool = pool.getCurrentMana(); - int manaMissing = getMaxMana() - mana; - int manaToRemove = Math.min(manaMissing, manaInPool); - pool.recieveMana(-manaToRemove); - addMana(manaToRemove); - } - - if(acceptsRedstone()) { - redstoneSignal = 0; - for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) { - int redstoneSide = supertile.getWorldObj().getIndirectPowerLevelTo(supertile.xCoord + dir.offsetX, supertile.yCoord + dir.offsetY, supertile.zCoord + dir.offsetZ, dir.ordinal()); - redstoneSignal = Math.max(redstoneSignal, redstoneSide); - } - } - - if(supertile.getWorldObj().isRemote) { - double particleChance = 1F - (double) mana / (double) getMaxMana() / 3.5F; - Color color = new Color(getColor()); - if(Math.random() > particleChance) - BotaniaAPI.internalHandler.sparkleFX(supertile.getWorldObj(), supertile.xCoord + 0.3 + Math.random() * 0.5, supertile.yCoord + 0.5 + Math.random() * 0.5, supertile.zCoord + 0.3 + Math.random() * 0.5, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, (float) Math.random(), 5); - } - } - - public void linkPool() { - final int range = 10; - - boolean needsNew = false; - if(linkedPool == null) { - needsNew = true; - - if(cachedPoolCoordinates != null && supertile.getWorldObj().blockExists(cachedPoolCoordinates.posX, cachedPoolCoordinates.posY, cachedPoolCoordinates.posZ)) { - TileEntity tileAt = supertile.getWorldObj().getTileEntity(cachedPoolCoordinates.posX, cachedPoolCoordinates.posY, cachedPoolCoordinates.posZ); - if(tileAt != null && tileAt instanceof IManaPool) { - linkedPool = tileAt; - needsNew = false; - } - cachedPoolCoordinates = null; - } - } - - if(!needsNew) { - TileEntity tileAt = supertile.getWorldObj().getTileEntity(linkedPool.xCoord, linkedPool.yCoord, linkedPool.zCoord); - if(!(tileAt instanceof IManaPool)) { - linkedPool = null; - needsNew = true; - } else linkedPool = tileAt; - } - - if(needsNew) { - IManaNetwork network = BotaniaAPI.internalHandler.getManaNetworkInstance(); - int size = network.getAllPoolsInWorld(supertile.getWorldObj()).size(); - if(BotaniaAPI.internalHandler.shouldForceCheck() || size != sizeLastCheck) { - ChunkCoordinates coords = new ChunkCoordinates(supertile.xCoord, supertile.yCoord, supertile.zCoord); - linkedPool = network.getClosestPool(coords, supertile.getWorldObj(), range); - sizeLastCheck = size; - } - } - } - - public void addMana(int mana) { - this.mana = Math.min(getMaxMana(), this.mana + mana); - } - - @Override - public boolean onWanded(EntityPlayer player, ItemStack wand) { - if(player == null) - return false; - - knownMana = mana; - player.worldObj.playSoundAtEntity(player, "botania:ding", 0.1F, 1F); - - return super.onWanded(player, wand); - } - - public int getMaxMana() { - return 20; - } - - public int getColor() { - return 0xFFFFFF; - } - - @Override - public void readFromPacketNBT(NBTTagCompound cmp) { - mana = cmp.getInteger(TAG_MANA); - - int x = cmp.getInteger(TAG_POOL_X); - int y = cmp.getInteger(TAG_POOL_Y); - int z = cmp.getInteger(TAG_POOL_Z); - - cachedPoolCoordinates = new ChunkCoordinates(x, y, z); - } - - @Override - public void writeToPacketNBT(NBTTagCompound cmp) { - cmp.setInteger(TAG_MANA, mana); - - int x = linkedPool == null ? 0 : linkedPool.xCoord; - int y = linkedPool == null ? -1 : linkedPool.yCoord; - int z = linkedPool == null ? 0 : linkedPool.zCoord; - - cmp.setInteger(TAG_POOL_X, x); - cmp.setInteger(TAG_POOL_Y, y); - cmp.setInteger(TAG_POOL_Z, z); - } - - @Override - public ChunkCoordinates getBinding() { - if(linkedPool == null) - return null; - return new ChunkCoordinates(linkedPool.xCoord, linkedPool.yCoord, linkedPool.zCoord); - } - - @Override - public boolean canSelect(EntityPlayer player, ItemStack wand, int x, int y, int z, int side) { - return true; - } - - @Override - public boolean bindTo(EntityPlayer player, ItemStack wand, int x, int y, int z, int side) { - int range = 10; - range *= range; - - double dist = (x - supertile.xCoord) * (x - supertile.xCoord) + (y - supertile.yCoord) * (y - supertile.yCoord) + (z - supertile.zCoord) * (z - supertile.zCoord); - if(range >= dist) { - TileEntity tile = player.worldObj.getTileEntity(x, y, z); - if(tile instanceof IManaPool) { - linkedPool = tile; - return true; - } - } - - return false; - } - - @Override - public void renderHUD(Minecraft mc, ScaledResolution res) { - String name = StatCollector.translateToLocal("tile.botania:flower." + getUnlocalizedName() + ".name"); - int color = 0x66000000 | getColor(); - BotaniaAPI.internalHandler.drawSimpleManaHUD(color, knownMana, getMaxMana(), name, res); - } - -} diff --git a/src/api/java/vazkii/botania/api/subtile/SubTileGenerating.java b/src/api/java/vazkii/botania/api/subtile/SubTileGenerating.java deleted file mode 100644 index 9c44868d..00000000 --- a/src/api/java/vazkii/botania/api/subtile/SubTileGenerating.java +++ /dev/null @@ -1,245 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 24, 2014, 8:03:36 PM (GMT)] - */ -package vazkii.botania.api.subtile; - -import java.awt.Color; - -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.util.StatCollector; -import vazkii.botania.api.BotaniaAPI; -import vazkii.botania.api.internal.IManaNetwork; -import vazkii.botania.api.mana.IManaCollector; - -/** - * The basic class for a Generating Flower. - */ -public class SubTileGenerating extends SubTileEntity { - - private static final String TAG_MANA = "mana"; - private static final String TAG_TICKS_EXISTED = "ticksExisted"; - - private static final String TAG_COLLECTOR_X = "collectorX"; - private static final String TAG_COLLECTOR_Y = "collectorY"; - private static final String TAG_COLLECTOR_Z = "collectorZ"; - - protected int mana; - - int ticksExisted = 0; - int sizeLastCheck = -1; - protected TileEntity linkedCollector = null; - public int knownMana = -1; - - ChunkCoordinates cachedCollectorCoordinates = null; - - @Override - public boolean canUpdate() { - return true; - } - - @Override - public void onUpdate() { - super.onUpdate(); - - linkCollector(); - - if(canGeneratePassively()) { - int delay = getDelayBetweenPassiveGeneration(); - if(delay > 0 && supertile.getWorldObj().getWorldTime() % delay == 0) { - if(shouldSyncPassiveGeneration()) - sync(); - addMana(getValueForPassiveGeneration()); - } - } - emptyManaIntoCollector(); - - if(supertile.getWorldObj().isRemote) { - double particleChance = 1F - (double) mana / (double) getMaxMana() / 3.5F; - Color color = new Color(getColor()); - if(Math.random() > particleChance) - BotaniaAPI.internalHandler.sparkleFX(supertile.getWorldObj(), supertile.xCoord + 0.3 + Math.random() * 0.5, supertile.yCoord + 0.5 + Math.random() * 0.5, supertile.zCoord + 0.3 + Math.random() * 0.5, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, (float) Math.random(), 5); - } - - if(!supertile.getWorldObj().isRemote) { - ++ticksExisted; - int muhBalance = BotaniaAPI.internalHandler.getPassiveFlowerDecay(); - - if(isPassiveFlower() && muhBalance > 0 && ticksExisted > muhBalance) { - supertile.getWorldObj().playAuxSFX(2001, supertile.xCoord, supertile.yCoord, supertile.zCoord, Block.getIdFromBlock(supertile.getBlockType())); - supertile.getWorldObj().setBlockToAir(supertile.xCoord, supertile.yCoord, supertile.zCoord); - } - } - } - - public void linkCollector() { - final int range = 6; - - boolean needsNew = false; - if(linkedCollector == null) { - needsNew = true; - - if(cachedCollectorCoordinates != null && supertile.getWorldObj().blockExists(cachedCollectorCoordinates.posX, cachedCollectorCoordinates.posY, cachedCollectorCoordinates.posZ)) { - TileEntity tileAt = supertile.getWorldObj().getTileEntity(cachedCollectorCoordinates.posX, cachedCollectorCoordinates.posY, cachedCollectorCoordinates.posZ); - if(tileAt != null && tileAt instanceof IManaCollector) { - linkedCollector = tileAt; - needsNew = false; - } - cachedCollectorCoordinates = null; - } - } - - if(!needsNew) { - TileEntity tileAt = supertile.getWorldObj().getTileEntity(linkedCollector.xCoord, linkedCollector.yCoord, linkedCollector.zCoord); - if(!(tileAt instanceof IManaCollector)) { - linkedCollector = null; - needsNew = true; - } else linkedCollector = tileAt; - } - - if(needsNew) { - IManaNetwork network = BotaniaAPI.internalHandler.getManaNetworkInstance(); - int size = network.getAllCollectorsInWorld(supertile.getWorldObj()).size(); - if(BotaniaAPI.internalHandler.shouldForceCheck() || size != sizeLastCheck) { - ChunkCoordinates coords = new ChunkCoordinates(supertile.xCoord, supertile.yCoord, supertile.zCoord); - linkedCollector = network.getClosestCollector(coords, supertile.getWorldObj(), range); - sizeLastCheck = size; - } - } - } - - public void addMana(int mana) { - this.mana = Math.min(getMaxMana(), this.mana + mana); - } - - public void emptyManaIntoCollector() { - if(linkedCollector != null) { - IManaCollector collector = (IManaCollector) linkedCollector; - if(!collector.isFull() && mana > 0) { - int manaval = Math.min(mana, collector.getMaxMana() - collector.getCurrentMana()); - mana -= manaval; - collector.recieveMana(manaval); - } - } - } - - public boolean isPassiveFlower() { - return false; - } - - public boolean shouldSyncPassiveGeneration() { - return false; - } - - public boolean canGeneratePassively() { - return false; - } - - public int getDelayBetweenPassiveGeneration() { - return 20; - } - - public int getValueForPassiveGeneration() { - return 1; - } - - @Override - public boolean onWanded(EntityPlayer player, ItemStack wand) { - if(player == null) - return false; - - if(!player.worldObj.isRemote) - sync(); - - knownMana = mana; - player.worldObj.playSoundAtEntity(player, "botania:ding", 0.1F, 1F); - - return super.onWanded(player, wand); - } - - public int getMaxMana() { - return 20; - } - - public int getColor() { - return 0xFFFFFF; - } - - @Override - public void readFromPacketNBT(NBTTagCompound cmp) { - mana = cmp.getInteger(TAG_MANA); - if(!cmp.hasKey(TAG_TICKS_EXISTED)) - ticksExisted = cmp.getInteger(TAG_TICKS_EXISTED); - - int x = cmp.getInteger(TAG_COLLECTOR_X); - int y = cmp.getInteger(TAG_COLLECTOR_Y); - int z = cmp.getInteger(TAG_COLLECTOR_Z); - - cachedCollectorCoordinates = new ChunkCoordinates(x, y, z); - } - - @Override - public void writeToPacketNBT(NBTTagCompound cmp) { - cmp.setInteger(TAG_MANA, mana); - cmp.setInteger(TAG_TICKS_EXISTED, ticksExisted); - - int x = linkedCollector == null ? 0 : linkedCollector.xCoord; - int y = linkedCollector == null ? -1 : linkedCollector.yCoord; - int z = linkedCollector == null ? 0 : linkedCollector.zCoord; - - cmp.setInteger(TAG_COLLECTOR_X, x); - cmp.setInteger(TAG_COLLECTOR_Y, y); - cmp.setInteger(TAG_COLLECTOR_Z, z); - } - - @Override - public ChunkCoordinates getBinding() { - if(linkedCollector == null) - return null; - return new ChunkCoordinates(linkedCollector.xCoord, linkedCollector.yCoord, linkedCollector.zCoord); - } - - @Override - public boolean canSelect(EntityPlayer player, ItemStack wand, int x, int y, int z, int side) { - return true; - } - - @Override - public boolean bindTo(EntityPlayer player, ItemStack wand, int x, int y, int z, int side) { - int range = 6; - range *= range; - - double dist = (x - supertile.xCoord) * (x - supertile.xCoord) + (y - supertile.yCoord) * (y - supertile.yCoord) + (z - supertile.zCoord) * (z - supertile.zCoord); - if(range >= dist) { - TileEntity tile = player.worldObj.getTileEntity(x, y, z); - if(tile instanceof IManaCollector) { - linkedCollector = tile; - return true; - } - } - - return false; - } - - @Override - public void renderHUD(Minecraft mc, ScaledResolution res) { - String name = StatCollector.translateToLocal("tile.botania:flower." + getUnlocalizedName() + ".name"); - int color = 0x66000000 | getColor(); - BotaniaAPI.internalHandler.drawSimpleManaHUD(color, knownMana, getMaxMana(), name, res); - } - -} diff --git a/src/api/java/vazkii/botania/api/wand/ICoordBoundItem.java b/src/api/java/vazkii/botania/api/wand/ICoordBoundItem.java deleted file mode 100644 index f7c8036d..00000000 --- a/src/api/java/vazkii/botania/api/wand/ICoordBoundItem.java +++ /dev/null @@ -1,18 +0,0 @@ -package vazkii.botania.api.wand; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.ChunkCoordinates; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/** - * The item equivalent of ITileBound, renders when the - * item is in hand. - * @see ITileBound - */ -public interface ICoordBoundItem { - - @SideOnly(Side.CLIENT) - public ChunkCoordinates getBinding(ItemStack stack); - -} diff --git a/src/api/java/vazkii/botania/api/wand/ITileBound.java b/src/api/java/vazkii/botania/api/wand/ITileBound.java deleted file mode 100644 index 25a8683c..00000000 --- a/src/api/java/vazkii/botania/api/wand/ITileBound.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Mar 24, 2014, 6:47:53 PM (GMT)] - */ -package vazkii.botania.api.wand; - -import net.minecraft.util.ChunkCoordinates; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -/** - * Any TileEntity that implements this is technically bound - * to something, and the binding will be shown when hovering - * over with a Wand of the Forest. - */ -public interface ITileBound { - - /** - * Gets where this block is bound to, can return null. - */ - @SideOnly(Side.CLIENT) - public ChunkCoordinates getBinding(); - -} diff --git a/src/api/java/vazkii/botania/api/wand/IWandBindable.java b/src/api/java/vazkii/botania/api/wand/IWandBindable.java deleted file mode 100644 index 02d0771c..00000000 --- a/src/api/java/vazkii/botania/api/wand/IWandBindable.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Oct 9, 2014, 3:01:58 PM (GMT)] - */ -package vazkii.botania.api.wand; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.MovingObjectPosition; - -/** - * A TileEntity that implements this can be bound to another block - * via the Wand of the Forest. Also see IWireframeAABBProvider to change - * the displayed bounding box. - */ -public interface IWandBindable extends ITileBound { - - /** - * Return true if the Wand can select this tile. - */ - public boolean canSelect(EntityPlayer player, ItemStack wand, int x, int y, int z, int side); - - /** - * Call to bind the TileEntity to where the player clicked. Return true to deselect - * the TileEntity for another bind or false case the TileEntity should stay selected. - */ - public boolean bindTo(EntityPlayer player, ItemStack wand, int x, int y, int z, int side); - -} diff --git a/src/api/java/vazkii/botania/api/wand/IWandHUD.java b/src/api/java/vazkii/botania/api/wand/IWandHUD.java deleted file mode 100644 index 57c7e313..00000000 --- a/src/api/java/vazkii/botania/api/wand/IWandHUD.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Feb 5, 2014, 1:34:44 PM (GMT)] - */ -package vazkii.botania.api.wand; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.world.World; - -/** - * Any block that implements this has a HUD rendered when being hovered - * with a Wand of the Forest. - */ -public interface IWandHUD { - - public void renderHUD(Minecraft mc, ScaledResolution res, World world, int x, int y, int z); - -} diff --git a/src/api/java/vazkii/botania/api/wand/IWandable.java b/src/api/java/vazkii/botania/api/wand/IWandable.java deleted file mode 100644 index 0cdcf1f1..00000000 --- a/src/api/java/vazkii/botania/api/wand/IWandable.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Jan 22, 2014, 5:12:53 PM (GMT)] - */ -package vazkii.botania.api.wand; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -/** - * Any block that implements this can be used with the Wand for the Forest for some purpose. - */ -public interface IWandable { - - /** - * Called when the block is used by a wand. Note that the player parameter can be null - * if this function is called from a dispenser. - */ - public boolean onUsedByWand(EntityPlayer player, ItemStack stack, World world, int x, int y, int z, int side); - -} diff --git a/src/api/java/vazkii/botania/api/wand/IWireframeAABBProvider.java b/src/api/java/vazkii/botania/api/wand/IWireframeAABBProvider.java deleted file mode 100644 index d20b6660..00000000 --- a/src/api/java/vazkii/botania/api/wand/IWireframeAABBProvider.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Apr 19, 2014, 7:23:59 PM (GMT)] - */ -package vazkii.botania.api.wand; - -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.world.World; - -/** - * A block that implements this can provide a custom AABB - * for rendering the wireframe with ITileBound. - */ -public interface IWireframeAABBProvider { - - public AxisAlignedBB getWireframeAABB(World world, int x, int y, int z); - -} diff --git a/src/api/java/vazkii/botania/api/wiki/IWikiProvider.java b/src/api/java/vazkii/botania/api/wiki/IWikiProvider.java deleted file mode 100644 index 42e61147..00000000 --- a/src/api/java/vazkii/botania/api/wiki/IWikiProvider.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Sep 2, 2014, 5:57:35 PM (GMT)] - */ -package vazkii.botania.api.wiki; - -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; - -/** - * An interface for a Wiki Provider, these are registered to allow a mod to provide a wiki - * for all the blocks in them, used for the world interaction with the Lexica Botania. - * A simple, mostly all-inclusive implementation can be found on SimpleWikiProvider. - */ -public interface IWikiProvider { - - /** - * Gets the name of the block being looked at for display. - */ - public String getBlockName(World world, MovingObjectPosition pos); - - /** - * Gets the URL to open when the block is clicked. - */ - public String getWikiURL(World world, MovingObjectPosition pos); - - /** - * Gets the name of the wiki for display. - */ - public String getWikiName(World world, MovingObjectPosition pos); - -} diff --git a/src/api/java/vazkii/botania/api/wiki/SimpleWikiProvider.java b/src/api/java/vazkii/botania/api/wiki/SimpleWikiProvider.java deleted file mode 100644 index 6105c718..00000000 --- a/src/api/java/vazkii/botania/api/wiki/SimpleWikiProvider.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Sep 2, 2014, 5:58:39 PM (GMT)] - */ -package vazkii.botania.api.wiki; - -import org.apache.commons.lang3.text.WordUtils; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; - -public class SimpleWikiProvider implements IWikiProvider { - - final String name, urlBase, replacement; - - public SimpleWikiProvider(String name, String urlBase) { - this(name, urlBase, "%20"); - } - - public SimpleWikiProvider(String name, String urlBase, String replacement) { - this.name = name; - this.urlBase = urlBase; - this.replacement = replacement; - } - - @Override - public String getBlockName(World world, MovingObjectPosition pos) { - int x = pos.blockX; - int y = pos.blockY; - int z = pos.blockZ; - - Block block = world.getBlock(x, y, z); - if(block == null) - return null; - - ItemStack stack = block.getPickBlock(pos, world, x, y, z); - - if(stack == null || stack.getItem() == null) - stack = new ItemStack(block, 1, world.getBlockMetadata(x, y, z)); - - if(stack.getItem() == null) - return null; - - String name = stack.getDisplayName(); - if(name == null || name.isEmpty()) - return null; - - return name; - } - - @Override - public String getWikiURL(World world, MovingObjectPosition pos) { - String name = getBlockName(world, pos); - if(name == null) - return null; - return String.format(urlBase, WordUtils.capitalizeFully(name).replaceAll(" ", replacement)); - } - - @Override - public String getWikiName(World world, MovingObjectPosition pos) { - return name; - } - -} diff --git a/src/api/java/vazkii/botania/api/wiki/WikiHooks.java b/src/api/java/vazkii/botania/api/wiki/WikiHooks.java deleted file mode 100644 index 40f586e6..00000000 --- a/src/api/java/vazkii/botania/api/wiki/WikiHooks.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Sep 2, 2014, 6:05:03 PM (GMT)] - */ -package vazkii.botania.api.wiki; - -import java.util.HashMap; -import java.util.Map; - -import net.minecraft.block.Block; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier; - -public class WikiHooks { - - private static final IWikiProvider FALLBACK_PROVIDER = new SimpleWikiProvider("FTB Wiki", "http://wiki.feed-the-beast.com/%s"); - - private static final Map<String, IWikiProvider> modWikis = new HashMap(); - - public static IWikiProvider getWikiFor(Block block) { - UniqueIdentifier mod = GameRegistry.findUniqueIdentifierFor(block); - return getWikiFor(mod.modId.toLowerCase()); - } - - public static IWikiProvider getWikiFor(String mod) { - if(!modWikis.containsKey(mod)) - modWikis.put(mod, FALLBACK_PROVIDER); - - return modWikis.get(mod); - } - - public static void registerModWiki(String mod, IWikiProvider provider) { - modWikis.put(mod.toLowerCase(), provider); - } - -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index 74b2efe3..e6c4e3d6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -11,7 +11,6 @@ import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; -import WayofTime.alchemicalWizardry.common.thread.CommandDownloadGAPI; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -28,6 +27,21 @@ import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fml.common.FMLCommonHandler; +import net.minecraftforge.fml.common.Loader; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.common.Mod.EventHandler; +import net.minecraftforge.fml.common.Mod.Instance; +import net.minecraftforge.fml.common.ModContainer; +import net.minecraftforge.fml.common.Optional; +import net.minecraftforge.fml.common.SidedProxy; +import net.minecraftforge.fml.common.event.FMLInitializationEvent; +import net.minecraftforge.fml.common.event.FMLInterModComms; +import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; +import net.minecraftforge.fml.common.network.NetworkRegistry; +import net.minecraftforge.fml.common.registry.EntityRegistry; +import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.RecipeSorter; import net.minecraftforge.oredict.RecipeSorter.Category; @@ -52,7 +66,6 @@ import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; import WayofTime.alchemicalWizardry.api.rituals.Rituals; -import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; import WayofTime.alchemicalWizardry.api.soulNetwork.ComplexNetworkHandler; import WayofTime.alchemicalWizardry.api.spell.SpellEffectRegistry; import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; @@ -72,10 +85,6 @@ import WayofTime.alchemicalWizardry.common.achievements.ModAchievements; import WayofTime.alchemicalWizardry.common.alchemy.CombinedPotionRegistry; import WayofTime.alchemicalWizardry.common.block.ArmourForge; import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars; -import WayofTime.alchemicalWizardry.common.book.BloodMagicGuide; -import WayofTime.alchemicalWizardry.common.commands.CommandBind; -import WayofTime.alchemicalWizardry.common.commands.CommandSN; -import WayofTime.alchemicalWizardry.common.commands.CommandUnbind; import WayofTime.alchemicalWizardry.common.compress.AdvancedCompressionHandler; import WayofTime.alchemicalWizardry.common.compress.BaseCompressionHandler; import WayofTime.alchemicalWizardry.common.compress.StorageBlockCraftingManager; @@ -109,7 +118,6 @@ import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem; import WayofTime.alchemicalWizardry.common.entity.mob.EntityWaterElemental; import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon; import WayofTime.alchemicalWizardry.common.guide.RecipeHolder; -import WayofTime.alchemicalWizardry.common.harvest.AgriCraftCropHarvestHandler; import WayofTime.alchemicalWizardry.common.harvest.BloodMagicHarvestHandler; import WayofTime.alchemicalWizardry.common.harvest.CactusReedHarvestHandler; import WayofTime.alchemicalWizardry.common.harvest.GourdHarvestHandler; @@ -280,27 +288,12 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiHandler; import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration; -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.Mod; -import cpw.mods.fml.common.Mod.EventHandler; -import cpw.mods.fml.common.Mod.Instance; -import cpw.mods.fml.common.ModContainer; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.SidedProxy; -import cpw.mods.fml.common.event.FMLInitializationEvent; -import cpw.mods.fml.common.event.FMLInterModComms; -import cpw.mods.fml.common.event.FMLPostInitializationEvent; -import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import cpw.mods.fml.common.event.FMLServerStartingEvent; -import cpw.mods.fml.common.network.NetworkRegistry; -import cpw.mods.fml.common.registry.EntityRegistry; -import cpw.mods.fml.common.registry.GameRegistry; + @Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v1.3.3", guiFactory = "WayofTime.alchemicalWizardry.client.gui.ConfigGuiFactory") public class AlchemicalWizardry { - public static boolean parseTextFiles = false; + public static boolean parseTextFiles = false; public static boolean doMeteorsDestroyBlocks = true; public static String[] diamondMeteorArray; @@ -387,8 +380,6 @@ public class AlchemicalWizardry public static boolean ritualDisabledPhantomHands; public static boolean ritualDisabledSphereIsland; - public static boolean displayRitualAnimation; - public static boolean potionDisableRegen; public static boolean potionDisableNightVision; public static boolean potionDisableFireResistance; @@ -427,7 +418,6 @@ public class AlchemicalWizardry public static boolean lockdownAltar; public static boolean causeHungerWithRegen; public static boolean causeHungerChatMessage = true; - public static boolean disableBoundToolsRightClick; public static List<Class> wellBlacklist; @@ -448,7 +438,7 @@ public class AlchemicalWizardry }; public static ToolMaterial bloodBoundToolMaterial = EnumHelper.addToolMaterial("BoundBlood", 4, 1000, 12.0f, 8.0f, 50); - public static ArmorMaterial sanguineArmourArmourMaterial = EnumHelper.addArmorMaterial("SanguineArmour", 33, new int[]{3, 8, 6, 3}, 30); + public static ArmorMaterial sanguineArmourArmourMaterial = EnumHelper.addArmorMaterial("SanguineArmour", "test", 33, new int[]{3, 8, 6, 3}, 30); //Dungeon loot chances public static int standardBindingAgentDungeonChance; @@ -770,7 +760,6 @@ public class AlchemicalWizardry customPotionFireFuse = (new PotionFireFuse(customPotionFireFuseID, true, 0).setIconIndex(0, 0).setPotionName("Fire Fuse")); customPotionPlanarBinding = (new PotionPlanarBinding(customPotionPlanarBindingID, true, 0).setIconIndex(0, 0).setPotionName("Planar Binding")); customPotionSoulFray = (new PotionSoulFray(customPotionSoulFrayID, true, 0).setIconIndex(0, 0).setPotionName("Soul Fray")); - PlayerSacrificeHandler.soulFrayId = customPotionSoulFray; customPotionSoulHarden = (new PotionSoulHarden(customPotionSoulHardenID, false, 0).setIconIndex(0, 0).setPotionName("Soul Harden")); customPotionDeaf = (new PotionDeaf(customPotionDeafID, true, 0).setIconIndex(0, 0).setPotionName("Deafness")); customPotionFeatherFall = (new PotionFeatherFall(customPotionFeatherFallID, false, 0).setIconIndex(0, 0).setPotionName("Feather Fall")); @@ -1238,11 +1227,11 @@ public class AlchemicalWizardry ModItems.itemBloodFrame = new ItemBloodFrame().setUnlocalizedName("bloodFrame"); - ItemStack provenFrame = GameRegistry.findItemStack("Forestry", "frameImpregnated", 1); + Item provenFrame = GameRegistry.findItem("Forestry", "frameImpregnated"); if(provenFrame !=null) { - AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.itemBloodFrame), provenFrame, 3, 30000, 20, 20, false); + AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.itemBloodFrame), new ItemStack(provenFrame, 1), 3, 30000, 20, 20, false); } } else { @@ -1261,11 +1250,11 @@ public class AlchemicalWizardry AlchemicalWizardry.logger.info("Loaded MineTweaker 3 Integration"); } - if(Loader.isModLoaded("AgriCraft")) - { - HarvestRegistry.registerHarvestHandler(new AgriCraftCropHarvestHandler()); - AlchemicalWizardry.logger.info("Loaded AgriCraft Handlers!"); - } +// if(Loader.isModLoaded("AgriCraft")) +// { +// HarvestRegistry.registerHarvestHandler(new AgriCraftCropHarvestHandler()); +// AlchemicalWizardry.logger.info("Loaded AgriCraft Handlers!"); +// } isBotaniaLoaded = Loader.isModLoaded("Botania"); isPneumaticCraftLoaded = Loader.isModLoaded("PneumaticCraft"); @@ -1414,13 +1403,13 @@ public class AlchemicalWizardry AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.diamond), Potion.resistance.id, 2 * 60 * 20); if(!AlchemicalWizardry.potionDisableSaturation) - AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.poisonous_potato), Potion.field_76443_y.id, 2); //saturation + AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.poisonous_potato), Potion.saturation.id, 2); //saturation if(!AlchemicalWizardry.potionDisableHealthBoost) - AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.demonBloodShard), Potion.field_76434_w.id, 4 * 60 * 20); //health boost + AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.demonBloodShard), Potion.field_180152_w.id, 4 * 60 * 20); //health boost if(!AlchemicalWizardry.potionDisableAbsorption) - AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.weakBloodShard), Potion.field_76444_x.id, 4 * 60 * 20); //Absorption + AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.weakBloodShard), Potion.absorption.id, 4 * 60 * 20); //Absorption if(!AlchemicalWizardry.potionDisableBoost) AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.terrae), AlchemicalWizardry.customPotionBoost.id, 60 * 20); @@ -1743,7 +1732,7 @@ public class AlchemicalWizardry // // InputStream input = AlchemicalWizardry.class.getResourceAsStream("/assets/alchemicalwizardryBooks/books/book.txt"); // -// Minecraft.getMinecraft().fontRenderer.setUnicodeFlag(true); +// Minecraft.getMinecraft().fontRendererObj.setUnicodeFlag(true); // // if(input != null) // { @@ -1819,9 +1808,9 @@ public class AlchemicalWizardry // // strLine = strLine.replace('', '"').replace('','"').replace(" ", "...").replace('', '\'').replace('', '-'); // -// if(Minecraft.getMinecraft() != null && Minecraft.getMinecraft().fontRenderer != null) +// if(Minecraft.getMinecraft() != null && Minecraft.getMinecraft().fontRendererObj != null) // { -// List list = Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(strLine, 110); +// List list = Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(strLine, 110); // if(list != null) // { // System.out.println("Number of lines: " + list.size()); @@ -1835,7 +1824,7 @@ public class AlchemicalWizardry // boolean changePage = false; // int length = word.length(); // word = word.replace('\t', ' '); -// List list = Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(strings[currentPage] + " " + word, 110); +// List list = Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(strings[currentPage] + " " + word, 110); // // if(list.size() > maxLines) // { @@ -1866,8 +1855,8 @@ public class AlchemicalWizardry // } // } // -// int currentLines = Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(strings[currentPage], 110).size(); -// while(Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(strings[currentPage] + " ", 110).size() <= currentLines) +// int currentLines = Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(strings[currentPage], 110).size(); +// while(Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(strings[currentPage] + " ", 110).size() <= currentLines) // { // { // strings[currentPage] = strings[currentPage] + " "; @@ -1902,7 +1891,7 @@ public class AlchemicalWizardry //// // } // -// Minecraft.getMinecraft().fontRenderer.setUnicodeFlag(false); +// Minecraft.getMinecraft().fontRendererObj.setUnicodeFlag(false); // // } catch (FileNotFoundException e) { // // TODO Auto-generated catch block @@ -1914,12 +1903,12 @@ public class AlchemicalWizardry // } // } - @Mod.EventHandler - public void initCommands(FMLServerStartingEvent event) - { - event.registerServerCommand(new CommandBind()); - event.registerServerCommand(new CommandUnbind()); - event.registerServerCommand(new CommandSN()); - event.registerServerCommand(new CommandDownloadGAPI()); - } +// @Mod.EventHandler +// public void initCommands(FMLServerStartingEvent event) +// { +// event.registerServerCommand(new CommandBind()); +// event.registerServerCommand(new CommandUnbind()); +// event.registerServerCommand(new CommandSN()); +// event.registerServerCommand(new CommandDownloadGAPI()); +// } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java b/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java index b76359ff..290756c1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java +++ b/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java @@ -106,7 +106,6 @@ public class BloodMagicConfiguration AlchemicalWizardry.causeHungerChatMessage = config.get("WimpySettings", "causeHungerChatMessage", true).getBoolean(); // AlchemicalWizardry.lockdownAltar = config.get("WimpySettings", "LockdownAltarWithRegen", true).getBoolean(); AlchemicalWizardry.lockdownAltar = false; - AlchemicalWizardry.disableBoundToolsRightClick = config.get("WimpySettings", "disableBoundToolsRightClick", false).getBoolean(false); AlchemicalWizardry.ritualDisabledWater = config.get("Ritual Blacklist", "Ritual of the Full Spring", false).getBoolean(false); AlchemicalWizardry.ritualDisabledLava = config.get("Ritual Blacklist", "Serenade of the Nether", false).getBoolean(false); @@ -144,7 +143,7 @@ public class BloodMagicConfiguration AlchemicalWizardry.ritualDisabledCrafting = config.get("Ritual Blacklist", "Rhythm of the Beating Anvil", false).getBoolean(false); AlchemicalWizardry.ritualDisabledPhantomHands = config.get("Ritual Blacklist", "Orchestra of the Phantom Hands", false).getBoolean(false); AlchemicalWizardry.ritualDisabledSphereIsland = config.get("Ritual Blacklist", "Birth of the Bastion", false).getBoolean(false); - + AlchemicalWizardry.potionDisableRegen = config.get("Alchemy Potion Blacklist", "Regeneration", false).getBoolean(false); AlchemicalWizardry.potionDisableNightVision = config.get("Alchemy Potion Blacklist", "Night Vision", false).getBoolean(false); AlchemicalWizardry.potionDisableFireResistance = config.get("Alchemy Potion Blacklist", "Fire Resistance", false).getBoolean(false); @@ -201,6 +200,7 @@ public class BloodMagicConfiguration // PlayerSacrificeHandler.scalingOfSacrifice = (float) config.get("TestIncenseSettings", "ScalingFactor", 0.0025f).getDouble(); // PlayerSacrificeHandler.soulFrayDuration = config.get("TestIncenseSettings", "SoulFrayDuration", 400).getInt(); + Side side = FMLCommonHandler.instance().getSide(); if (side == Side.CLIENT) { @@ -208,7 +208,6 @@ public class BloodMagicConfiguration RenderHelper.yOffset = config.get("ClientSettings", "AlchemyHUDyOffset", 2).getInt(); RenderHelper.lpBarX = config.get("ClientSettings", "LPHUDxOffset", 12).getInt(); RenderHelper.lpBarY = config.get("ClientSettings", "LPHUDyOffset", 75).getInt(); - AlchemicalWizardry.displayRitualAnimation = config.get("ClientSettings", "Display Ritual Animation", true).getBoolean(true); } config.save(); @@ -216,6 +215,7 @@ public class BloodMagicConfiguration public static void set(String categoryName, String propertyName, String newValue) { + config.load(); if (config.getCategoryNames().contains(categoryName)) { @@ -225,6 +225,8 @@ public class BloodMagicConfiguration } } config.save(); + + } public static void loadBlacklist() @@ -248,47 +250,185 @@ public class BloodMagicConfiguration public static void blacklistRituals() { - if (AlchemicalWizardry.ritualDisabledWater) r("AW001Water"); - if (AlchemicalWizardry.ritualDisabledLava) r("AW002Lava"); - if (AlchemicalWizardry.ritualDisabledGreenGrove) r("AW003GreenGrove"); - if (AlchemicalWizardry.ritualDisabledInterdiction) r("AW004Interdiction"); - if (AlchemicalWizardry.ritualDisabledContainment) r("AW005Containment"); - if (AlchemicalWizardry.ritualDisabledBinding) r("AW006Binding"); - if (AlchemicalWizardry.ritualDisabledUnbinding) r("AW007Unbinding"); // "A medium dry martini, lemon peel. Shaken, not stirred." - if (AlchemicalWizardry.ritualDisabledHighJump) r("AW008HighJump"); - if (AlchemicalWizardry.ritualDisabledMagnetism) r("AW009Magnetism"); - if (AlchemicalWizardry.ritualDisabledCrusher) r("AW010Crusher"); - if (AlchemicalWizardry.ritualDisabledSpeed) r("AW011Speed"); - if (AlchemicalWizardry.ritualDisabledAnimalGrowth) r("AW012AnimalGrowth"); - if (AlchemicalWizardry.ritualDisabledSuffering) r("AW013Suffering"); - if (AlchemicalWizardry.ritualDisabledRegen) r("AW014Regen"); - if (AlchemicalWizardry.ritualDisabledFeatheredKnife) r("AW015FeatheredKnife"); - if (AlchemicalWizardry.ritualDisabledFeatheredEarth) r("AW016FeatheredEarth"); - if (AlchemicalWizardry.ritualDisabledGaia) r("AW017Gaia"); - if (AlchemicalWizardry.ritualDisabledCondor) r("AW018Condor"); - if (AlchemicalWizardry.ritualDisabledFallingTower) r("AW019FallingTower"); - if (AlchemicalWizardry.ritualDisabledBalladOfAlchemy) r("AW020BalladOfAlchemy"); - if (AlchemicalWizardry.ritualDisabledExpulsion) r("AW021Expulsion"); - if (AlchemicalWizardry.ritualDisabledSuppression) r("AW022Suppression"); - if (AlchemicalWizardry.ritualDisabledZephyr) r("AW023Zephyr"); - if (AlchemicalWizardry.ritualDisabledHarvest) r("AW024Harvest"); - if (AlchemicalWizardry.ritualDisabledConduit) r("AW025Conduit"); - if (AlchemicalWizardry.ritualDisabledEllipsoid) r("AW026Ellipsoid"); - if (AlchemicalWizardry.ritualDisabledEvaporation) r("AW027Evaporation"); - if (AlchemicalWizardry.ritualDisabledSpawnWard) r("AW028SpawnWard"); - if (AlchemicalWizardry.ritualDisabledVeilOfEvil) r("AW029VeilOfEvil"); - if (AlchemicalWizardry.ritualDisabledFullStomach) r("AW030FullStomach"); - if (AlchemicalWizardry.ritualDisabledConvocation) r("AW031Convocation"); - if (AlchemicalWizardry.ritualDisabledSymmetry) r("AW032Symmetry"); - if (AlchemicalWizardry.ritualDisabledStalling) r("AW033Stalling"); - if (AlchemicalWizardry.ritualDisabledCrafting) r("AW034Crafting"); - if (AlchemicalWizardry.ritualDisabledPhantomHands) r("AW035PhantomHands"); - if (AlchemicalWizardry.ritualDisabledSphereIsland) r("AW036SphereIsland"); - } - - private static void r(String ritualID) - { - Rituals.ritualMap.remove(ritualID); - Rituals.keyList.remove(ritualID); + if (AlchemicalWizardry.ritualDisabledWater) + { + Rituals.ritualMap.remove("AW001Water"); + Rituals.keyList.remove("AW001Water"); + } + if (AlchemicalWizardry.ritualDisabledLava) + { + Rituals.ritualMap.remove("AW002Lava"); + Rituals.keyList.remove("AW002Lava"); + } + if (AlchemicalWizardry.ritualDisabledGreenGrove) + { + Rituals.ritualMap.remove("AW003GreenGrove"); + Rituals.keyList.remove("AW003GreenGrove"); + } + if (AlchemicalWizardry.ritualDisabledInterdiction) + { + Rituals.ritualMap.remove("AW004Interdiction"); + Rituals.keyList.remove("AW004Interdiction"); + } + if (AlchemicalWizardry.ritualDisabledContainment) + { + Rituals.ritualMap.remove("AW005Containment"); + Rituals.keyList.remove("AW005Containment"); + } + if (AlchemicalWizardry.ritualDisabledBinding) + { + Rituals.ritualMap.remove("AW006Binding"); + Rituals.keyList.remove("AW006Binding"); + } + if (AlchemicalWizardry.ritualDisabledUnbinding) + { + Rituals.ritualMap.remove("AW007Unbinding");//007 reporting for duty + Rituals.keyList.remove("AW007Unbinding"); + } + if (AlchemicalWizardry.ritualDisabledHighJump) + { + Rituals.ritualMap.remove("AW008HighJump"); + Rituals.keyList.remove("AW008HighJump"); + } + if (AlchemicalWizardry.ritualDisabledMagnetism) + { + Rituals.ritualMap.remove("AW009Magnetism"); + Rituals.keyList.remove("AW009Magnetism"); + } + if (AlchemicalWizardry.ritualDisabledCrusher) + { + Rituals.ritualMap.remove("AW010Crusher"); + Rituals.keyList.remove("AW010Crusher"); + } + if (AlchemicalWizardry.ritualDisabledSpeed) + { + Rituals.ritualMap.remove("AW011Speed"); + Rituals.keyList.remove("AW011Speed"); + } + if (AlchemicalWizardry.ritualDisabledAnimalGrowth) + { + Rituals.ritualMap.remove("AW012AnimalGrowth"); + Rituals.keyList.remove("AW012AnimalGrowth"); + } + if (AlchemicalWizardry.ritualDisabledSuffering) + { + Rituals.ritualMap.remove("AW013Suffering"); + Rituals.keyList.remove("AW013Suffering"); + } + if (AlchemicalWizardry.ritualDisabledRegen) + { + Rituals.ritualMap.remove("AW014Regen"); + Rituals.keyList.remove("AW014Regen"); + } + if (AlchemicalWizardry.ritualDisabledFeatheredKnife) + { + Rituals.ritualMap.remove("AW015FeatheredKnife"); + Rituals.keyList.remove("AW015FeatheredKnife"); + } + if (AlchemicalWizardry.ritualDisabledFeatheredEarth) + { + Rituals.ritualMap.remove("AW016FeatheredEarth"); + Rituals.keyList.remove("AW016FeatheredEarth"); + } + if (AlchemicalWizardry.ritualDisabledGaia) + { + Rituals.ritualMap.remove("AW017Gaia"); + Rituals.keyList.remove("AW017Gaia"); + } + if (AlchemicalWizardry.ritualDisabledCondor) + { + Rituals.ritualMap.remove("AW018Condor"); + Rituals.keyList.remove("AW018Condor"); + } + if (AlchemicalWizardry.ritualDisabledFallingTower) + { + Rituals.ritualMap.remove("AW019FallingTower"); + Rituals.keyList.remove("AW019FallingTower"); + } + if (AlchemicalWizardry.ritualDisabledBalladOfAlchemy) + { + Rituals.ritualMap.remove("AW020BalladOfAlchemy"); + Rituals.keyList.remove("AW020BalladOfAlchemy"); + } + if (AlchemicalWizardry.ritualDisabledExpulsion) + { + Rituals.ritualMap.remove("AW021Expulsion"); + Rituals.keyList.remove("AW021Expulsion"); + } + if (AlchemicalWizardry.ritualDisabledSuppression) + { + Rituals.ritualMap.remove("AW022Suppression"); + Rituals.keyList.remove("AW022Suppression"); + } + if (AlchemicalWizardry.ritualDisabledZephyr) + { + Rituals.ritualMap.remove("AW023Zephyr"); + Rituals.keyList.remove("AW023Zephyr"); + } + if (AlchemicalWizardry.ritualDisabledHarvest) + { + Rituals.ritualMap.remove("AW024Harvest"); + Rituals.keyList.remove("AW024Harvest"); + } + if (AlchemicalWizardry.ritualDisabledConduit) + { + Rituals.ritualMap.remove("AW025Conduit"); + Rituals.keyList.remove("AW025Conduit"); + } + if (AlchemicalWizardry.ritualDisabledEllipsoid) + { + Rituals.ritualMap.remove("AW026Ellipsoid"); + Rituals.keyList.remove("AW026Ellipsoid"); + } + if (AlchemicalWizardry.ritualDisabledEvaporation) + { + Rituals.ritualMap.remove("AW027Evaporation"); + Rituals.keyList.remove("AW027Evaporation"); + } + if (AlchemicalWizardry.ritualDisabledSpawnWard) + { + Rituals.ritualMap.remove("AW028SpawnWard"); + Rituals.keyList.remove("AW028SpawnWard"); + } + if (AlchemicalWizardry.ritualDisabledVeilOfEvil) + { + Rituals.ritualMap.remove("AW029VeilOfEvil"); + Rituals.keyList.remove("AW029VeilOfEvil"); + } + if (AlchemicalWizardry.ritualDisabledFullStomach) + { + Rituals.ritualMap.remove("AW030FullStomach"); + Rituals.keyList.remove("AW030FullStomach"); + } + if (AlchemicalWizardry.ritualDisabledConvocation) + { + Rituals.ritualMap.remove("AW031Convocation"); + Rituals.keyList.remove("AW031Convocation"); + } + if (AlchemicalWizardry.ritualDisabledSymmetry) + { + Rituals.ritualMap.remove("AW032Symmetry"); + Rituals.keyList.remove("AW032Symmetry"); + } + if (AlchemicalWizardry.ritualDisabledStalling) + { + Rituals.ritualMap.remove("AW033Stalling"); + Rituals.keyList.remove("AW033Stalling"); + } + if (AlchemicalWizardry.ritualDisabledCrafting) + { + Rituals.ritualMap.remove("AW034Crafting"); + Rituals.keyList.remove("AW034Crafting"); + } + if (AlchemicalWizardry.ritualDisabledPhantomHands) + { + Rituals.ritualMap.remove("AW035PhantomHands"); + Rituals.keyList.remove("AW035PhantomHands"); + } + if (AlchemicalWizardry.ritualDisabledSphereIsland) + { + Rituals.ritualMap.remove("AW036SphereIsland"); + Rituals.keyList.remove("AW036SphereIsland"); + } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java b/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java index 7cf58421..765653b9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry; import net.minecraft.block.Block; +import net.minecraftforge.fml.common.registry.GameRegistry; import WayofTime.alchemicalWizardry.common.block.ArmourForge; import WayofTime.alchemicalWizardry.common.block.BlockAlchemicCalcinator; import WayofTime.alchemicalWizardry.common.block.BlockAltar; @@ -49,7 +50,6 @@ import WayofTime.alchemicalWizardry.common.items.ItemSpellEnhancementBlock; import WayofTime.alchemicalWizardry.common.items.ItemSpellModifierBlock; import WayofTime.alchemicalWizardry.common.items.ItemSpellParadigmBlock; import WayofTime.alchemicalWizardry.common.items.ItemStabilityGlyphBlock; -import cpw.mods.fml.common.registry.GameRegistry; /** * Created with IntelliJ IDEA. diff --git a/src/main/java/WayofTime/alchemicalWizardry/ModItems.java b/src/main/java/WayofTime/alchemicalWizardry/ModItems.java index 8e504b33..2d274ade 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/ModItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/ModItems.java @@ -158,7 +158,7 @@ public class ModItems public static Item itemSeerSigil; public static Item itemCombinationalCatalyst; - public static Item customTool; + public static ItemSpellMultiTool customTool; public static Item itemAttunedCrystal; public static Item itemTankSegmenter; @@ -284,14 +284,14 @@ public class ModItems energyBazooka = new EnergyBazooka().setUnlocalizedName("energyBazooka"); itemBloodLightSigil = new SigilBloodLight().setUnlocalizedName("bloodLightSigil"); itemComplexSpellCrystal = new ItemComplexSpellCrystal().setUnlocalizedName("itemComplexSpellCrystal"); - bucketLife = new LifeBucket(ModBlocks.blockLifeEssence).setUnlocalizedName("bucketLife").setContainerItem(Items.bucket).setCreativeTab(CreativeTabs.tabMisc); + bucketLife = (new LifeBucket(ModBlocks.blockLifeEssence)).setUnlocalizedName("bucketLife").setContainerItem(Items.bucket).setCreativeTab(CreativeTabs.tabMisc); itemSigilOfEnderSeverance = (new SigilOfEnderSeverance()).setUnlocalizedName("itemSigilOfEnderSeverance"); baseItems = new ItemComponents().setUnlocalizedName("baseItems"); baseAlchemyItems = new ItemAlchemyBase().setUnlocalizedName("baseAlchemyItems"); itemSigilOfSupression = new SigilOfSupression().setUnlocalizedName("itemSigilOfSupression"); itemFluidSigil = new SigilFluid().setUnlocalizedName("itemFluidSigil"); itemSeerSigil = new SigilSeer().setUnlocalizedName("itemSeerSigil"); - customTool = new ItemSpellMultiTool().setUnlocalizedName("multiTool"); + customTool = (ItemSpellMultiTool)(new ItemSpellMultiTool().setUnlocalizedName("multiTool")); SpellParadigmTool.customTool = customTool; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentHandler.java index 165e9ab3..cf1a3fdf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentHandler.java @@ -1,18 +1,18 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; public interface IReagentHandler { - int fill(ForgeDirection from, ReagentStack resource, boolean doFill); + int fill(EnumFacing from, ReagentStack resource, boolean doFill); - ReagentStack drain(ForgeDirection from, ReagentStack resource, boolean doDrain); + ReagentStack drain(EnumFacing from, ReagentStack resource, boolean doDrain); - ReagentStack drain(ForgeDirection from, int maxDrain, boolean doDrain); + ReagentStack drain(EnumFacing from, int maxDrain, boolean doDrain); - boolean canFill(ForgeDirection from, Reagent reagent); + boolean canFill(EnumFacing from, Reagent reagent); - boolean canDrain(ForgeDirection from, Reagent reagent); + boolean canDrain(EnumFacing from, Reagent reagent); - ReagentContainerInfo[] getContainerInfo(ForgeDirection from); + ReagentContainerInfo[] getContainerInfo(EnumFacing from); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileReagentHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileReagentHandler.java index 3e754648..5a841651 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileReagentHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileReagentHandler.java @@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; public class TileReagentHandler extends TileEntity implements IReagentHandler { @@ -25,13 +25,13 @@ public class TileReagentHandler extends TileEntity implements IReagentHandler /* IReagentHandler */ @Override - public int fill(ForgeDirection from, ReagentStack resource, boolean doFill) + public int fill(EnumFacing from, ReagentStack resource, boolean doFill) { return tank.fill(resource, doFill); } @Override - public ReagentStack drain(ForgeDirection from, ReagentStack resource, boolean doDrain) + public ReagentStack drain(EnumFacing from, ReagentStack resource, boolean doDrain) { if (resource == null || !resource.isReagentEqual(tank.getReagent())) { @@ -41,25 +41,25 @@ public class TileReagentHandler extends TileEntity implements IReagentHandler } @Override - public ReagentStack drain(ForgeDirection from, int maxDrain, boolean doDrain) + public ReagentStack drain(EnumFacing from, int maxDrain, boolean doDrain) { return tank.drain(maxDrain, doDrain); } @Override - public boolean canFill(ForgeDirection from, Reagent reagent) + public boolean canFill(EnumFacing from, Reagent reagent) { return true; } @Override - public boolean canDrain(ForgeDirection from, Reagent reagent) + public boolean canDrain(EnumFacing from, Reagent reagent) { return true; } @Override - public ReagentContainerInfo[] getContainerInfo(ForgeDirection from) + public ReagentContainerInfo[] getContainerInfo(EnumFacing from) { return new ReagentContainerInfo[]{tank.getInfo()}; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileSegmentedReagentHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileSegmentedReagentHandler.java index d1f2427f..ec4b9068 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileSegmentedReagentHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileSegmentedReagentHandler.java @@ -1,16 +1,16 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.Constants; -import net.minecraftforge.common.util.ForgeDirection; - import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; +import net.minecraftforge.common.util.Constants; + public class TileSegmentedReagentHandler extends TileEntity implements ISegmentedReagentHandler { protected ReagentContainer[] tanks; @@ -98,7 +98,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente /* ISegmentedReagentHandler */ @Override - public int fill(ForgeDirection from, ReagentStack resource, boolean doFill) + public int fill(EnumFacing from, ReagentStack resource, boolean doFill) { int totalFill = 0; @@ -164,7 +164,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente } @Override - public ReagentStack drain(ForgeDirection from, ReagentStack resource, boolean doDrain) + public ReagentStack drain(EnumFacing from, ReagentStack resource, boolean doDrain) { if (resource == null) { @@ -197,7 +197,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente /* Only returns the amount from the first available tank */ @Override - public ReagentStack drain(ForgeDirection from, int maxDrain, boolean doDrain) + public ReagentStack drain(EnumFacing from, int maxDrain, boolean doDrain) { for (int i = 0; i < tanks.length; i++) { @@ -212,19 +212,19 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente } @Override - public boolean canFill(ForgeDirection from, Reagent reagent) + public boolean canFill(EnumFacing from, Reagent reagent) { return true; } @Override - public boolean canDrain(ForgeDirection from, Reagent reagent) + public boolean canDrain(EnumFacing from, Reagent reagent) { return true; } @Override - public ReagentContainerInfo[] getContainerInfo(ForgeDirection from) + public ReagentContainerInfo[] getContainerInfo(EnumFacing from) { ReagentContainerInfo[] info = new ReagentContainerInfo[this.getNumberOfTanks()]; for (int i = 0; i < this.getNumberOfTanks(); i++) diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipe.java index 7e6af770..bb581251 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipe.java @@ -76,7 +76,7 @@ public class AltarRecipe protected boolean areTagsEqual(NBTTagCompound tag, NBTTagCompound comparedTag) { - Set set = tag.func_150296_c(); + Set set = tag.getKeySet(); for(Object obj : set) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/AddToNetworkEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/AddToNetworkEvent.java index ddcc3b01..def8381b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/AddToNetworkEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/AddToNetworkEvent.java @@ -1,7 +1,8 @@ package WayofTime.alchemicalWizardry.api.event; -import cpw.mods.fml.common.eventhandler.Cancelable; -import cpw.mods.fml.common.eventhandler.Event; +import net.minecraftforge.fml.common.eventhandler.Cancelable; +import net.minecraftforge.fml.common.eventhandler.Event; + @Cancelable public class AddToNetworkEvent extends Event diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemBindEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemBindEvent.java index 95e15da4..5d78bcd0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemBindEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemBindEvent.java @@ -1,9 +1,9 @@ package WayofTime.alchemicalWizardry.api.event; -import cpw.mods.fml.common.eventhandler.Cancelable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import cpw.mods.fml.common.eventhandler.Event; +import net.minecraftforge.fml.common.eventhandler.Cancelable; +import net.minecraftforge.fml.common.eventhandler.Event; @Cancelable public class ItemBindEvent extends Event diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainInContainerEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainInContainerEvent.java index 5a81c1d2..0cd29c51 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainInContainerEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainInContainerEvent.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.api.event; import net.minecraft.item.ItemStack; -import cpw.mods.fml.common.eventhandler.Cancelable; +import net.minecraftforge.fml.common.eventhandler.Cancelable; @Cancelable public class ItemDrainInContainerEvent extends SoulNetworkEvent diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualActivatedEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualActivatedEvent.java index 83c10c05..5bcc7eeb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualActivatedEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualActivatedEvent.java @@ -2,8 +2,8 @@ package WayofTime.alchemicalWizardry.api.event; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.common.eventhandler.Cancelable; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import cpw.mods.fml.common.eventhandler.Cancelable; @Cancelable public class RitualActivatedEvent extends RitualEvent diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualEvent.java index fbe1649c..36ee929c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualEvent.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.api.event; +import net.minecraftforge.fml.common.eventhandler.Event; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import cpw.mods.fml.common.eventhandler.Event; public class RitualEvent extends Event { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualRunEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualRunEvent.java index 4bcf075f..4b5134b7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualRunEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualRunEvent.java @@ -1,16 +1,13 @@ package WayofTime.alchemicalWizardry.api.event; +import net.minecraftforge.fml.common.eventhandler.Cancelable; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import cpw.mods.fml.common.eventhandler.Cancelable; @Cancelable public class RitualRunEvent extends RitualEvent { - - public RitualRunEvent(IMasterRitualStone mrs, String ownerKey, String ritualKey) { super(mrs, ownerKey, ritualKey); } - } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/SoulNetworkEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/SoulNetworkEvent.java index bf47a136..3d60650a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/SoulNetworkEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/SoulNetworkEvent.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.api.event; -import cpw.mods.fml.common.eventhandler.Event; +import net.minecraftforge.fml.common.eventhandler.Event; + public class SoulNetworkEvent extends Event { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/TeleposeEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/TeleposeEvent.java index 40c3170e..a1f63f9d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/TeleposeEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/TeleposeEvent.java @@ -1,56 +1,52 @@ package WayofTime.alchemicalWizardry.api.event; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; -import cpw.mods.fml.common.eventhandler.Cancelable; -import cpw.mods.fml.common.eventhandler.Event; +import net.minecraftforge.fml.common.eventhandler.Cancelable; +import net.minecraftforge.fml.common.eventhandler.Event; + /** Fired when a teleposer attempts to transpose two blocks. Use this to perform special cleanup or compensation, or cancel it entirely to prevent the transposition. */ @Cancelable -public class TeleposeEvent extends Event { +public class TeleposeEvent extends Event +{ public final World initialWorld; - public final int initialX; - public final int initialY; - public final int initialZ; + public final BlockPos initialPos; public final Block initialBlock; - public final int initialMetadata; + public final IBlockState initialState; public final World finalWorld; - public final int finalX; - public final int finalY; - public final int finalZ; + public final BlockPos finalPos; public final Block finalBlock; - public final int finalMetadata; + public final IBlockState finalState; - public TeleposeEvent(World wi, int xi, int yi, int zi, Block bi, int mi, World wf, int xf, int yf, int zf, Block bf, int mf) { + public TeleposeEvent(World wi, BlockPos posi, IBlockState statei, World wf, BlockPos posf, IBlockState statef) { initialWorld = wi; - initialX = xi; - initialY = yi; - initialZ = zi; - - initialBlock = bi; - initialMetadata = mi; + initialPos = posi; + initialState = statei; + initialBlock = initialState.getBlock(); + finalWorld = wf; - finalX = xf; - finalY = yf; - finalZ = zf; + finalPos = posf; - finalBlock = bf; - finalMetadata = mf; + finalState = statef; + finalBlock = finalState.getBlock(); } public TileEntity getInitialTile() { - return initialWorld.getTileEntity(initialX, initialY, initialZ); + return initialWorld.getTileEntity(initialPos); } public TileEntity getFinalTile() { - return finalWorld.getTileEntity(finalX, finalY, finalZ); + return finalWorld.getTileEntity(finalPos); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/guide/OrbRecipeRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/api/guide/OrbRecipeRenderer.java index e4926e1e..2de81c65 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/guide/OrbRecipeRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/guide/OrbRecipeRenderer.java @@ -1,135 +1,135 @@ -package WayofTime.alchemicalWizardry.api.guide; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; -import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; -import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; -import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; -import amerifrance.guideapi.ModInformation; -import amerifrance.guideapi.api.abstraction.CategoryAbstract; -import amerifrance.guideapi.api.abstraction.EntryAbstract; -import amerifrance.guideapi.api.abstraction.IRecipeRenderer; -import amerifrance.guideapi.api.base.Book; -import amerifrance.guideapi.api.util.GuiHelper; -import amerifrance.guideapi.gui.GuiBase; -import cpw.mods.fml.relauncher.ReflectionHelper; - -public class OrbRecipeRenderer implements IRecipeRenderer -{ - public IRecipe recipe; - - public OrbRecipeRenderer(IRecipe recipe) - { - this.recipe = recipe; - } - - @Override - public void draw(Book book, CategoryAbstract category, EntryAbstract entry, - int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, - FontRenderer fontRenderer) { - Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation(ModInformation.GUITEXLOC + "recipe_elements.png")); - guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 0, 105, 65); - - guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.recipe.shapedOrb"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0); - if(recipe instanceof ShapelessBloodOrbRecipe) - { - ShapelessBloodOrbRecipe shapelessBloodOrbRecipe = (ShapelessBloodOrbRecipe) recipe; - List<Object> list = shapelessBloodOrbRecipe.getInput(); - - int width = 3; - int height = 3; - for (int y = 0; y < height; y++) { - for (int x = 0; x < width; x++) { - if(list.size() - 1 < y * width + x) - { - continue; - } - - int stackX = (x + 1) * 18 + (guiLeft + guiBase.xSize / 7); - int stackY = (y + 1) * 18 + (guiTop + guiBase.ySize / 5); - - Object component = list.get(y * width + x); - if (component != null) { - if (component instanceof ItemStack) { - GuiHelper.drawItemStack((ItemStack) component, stackX, stackY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { - guiBase.renderToolTip((ItemStack) component, stackX, stackY); - } - } else if (component instanceof Integer) { - GuiHelper.drawItemStack(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { - guiBase.renderToolTip(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY); - } - } else { - if (((ArrayList<ItemStack>) component).isEmpty()) return; - GuiHelper.drawItemStack(((ArrayList<ItemStack>) component).get(0), stackX, stackY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { - guiBase.renderToolTip(((ArrayList<ItemStack>) component).get(0), stackX, stackY); - } - } - } - } - } - int outputX = (5 * 18) + (guiLeft + guiBase.xSize / 7); - int outputY = (2 * 18) + (guiTop + guiBase.xSize / 5); - GuiHelper.drawItemStack(shapelessBloodOrbRecipe.getRecipeOutput(), outputX, outputY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) { - guiBase.renderToolTip(shapelessBloodOrbRecipe.getRecipeOutput(), outputX, outputY); - } - }else - { - ShapedBloodOrbRecipe shapedBloodOrbRecipe = (ShapedBloodOrbRecipe) recipe; - int width = ReflectionHelper.getPrivateValue(ShapedBloodOrbRecipe.class, shapedBloodOrbRecipe, 4); - int height = ReflectionHelper.getPrivateValue(ShapedBloodOrbRecipe.class, shapedBloodOrbRecipe, 5); - for (int y = 0; y < height; y++) { - for (int x = 0; x < width; x++) { - int stackX = (x + 1) * 18 + (guiLeft + guiBase.xSize / 7); - int stackY = (y + 1) * 18 + (guiTop + guiBase.ySize / 5); - Object component = shapedBloodOrbRecipe.getInput()[y * width + x]; - if (component != null) { - if (component instanceof ItemStack) { - GuiHelper.drawItemStack((ItemStack) component, stackX, stackY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { - guiBase.renderToolTip((ItemStack) component, stackX, stackY); - } - } else if (component instanceof Integer) { - GuiHelper.drawItemStack(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { - guiBase.renderToolTip(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY); - } - } else { - if (((ArrayList<ItemStack>) component).isEmpty()) return; - GuiHelper.drawItemStack(((ArrayList<ItemStack>) component).get(0), stackX, stackY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { - guiBase.renderToolTip(((ArrayList<ItemStack>) component).get(0), stackX, stackY); - } - } - } - } - } - int outputX = (5 * 18) + (guiLeft + guiBase.xSize / 7); - int outputY = (2 * 18) + (guiTop + guiBase.xSize / 5); - GuiHelper.drawItemStack(shapedBloodOrbRecipe.getRecipeOutput(), outputX, outputY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) { - guiBase.renderToolTip(shapedBloodOrbRecipe.getRecipeOutput(), outputX, outputY); - } - } - - } - - @Override - public void drawExtras(Book book, CategoryAbstract category, - EntryAbstract entry, int guiLeft, int guiTop, int mouseX, - int mouseY, GuiBase guiBase, FontRenderer fontRenderer) { - // TODO Auto-generated method stub - - } - -} +//package WayofTime.alchemicalWizardry.api.guide; +// +//import java.util.ArrayList; +//import java.util.List; +// +//import net.minecraft.client.Minecraft; +//import net.minecraft.client.gui.FontRenderer; +//import net.minecraft.item.ItemStack; +//import net.minecraft.item.crafting.IRecipe; +//import net.minecraft.util.ResourceLocation; +//import net.minecraft.util.StatCollector; +//import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; +//import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; +//import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; +//import amerifrance.guideapi.ModInformation; +//import amerifrance.guideapi.api.abstraction.CategoryAbstract; +//import amerifrance.guideapi.api.abstraction.EntryAbstract; +//import amerifrance.guideapi.api.abstraction.IRecipeRenderer; +//import amerifrance.guideapi.api.base.Book; +//import amerifrance.guideapi.api.util.GuiHelper; +//import amerifrance.guideapi.gui.GuiBase; +//import cpw.mods.fml.relauncher.ReflectionHelper; +// +//public class OrbRecipeRenderer implements IRecipeRenderer +//{ +// public IRecipe recipe; +// +// public OrbRecipeRenderer(IRecipe recipe) +// { +// this.recipe = recipe; +// } +// +// @Override +// public void draw(Book book, CategoryAbstract category, EntryAbstract entry, +// int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, +// FontRenderer fontRenderer) { +// Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation(ModInformation.GUITEXLOC + "recipe_elements.png")); +// guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 0, 105, 65); +// +// guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.recipe.shapedOrb"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0); +// if(recipe instanceof ShapelessBloodOrbRecipe) +// { +// ShapelessBloodOrbRecipe shapelessBloodOrbRecipe = (ShapelessBloodOrbRecipe) recipe; +// List<Object> list = shapelessBloodOrbRecipe.getInput(); +// +// int width = 3; +// int height = 3; +// for (int y = 0; y < height; y++) { +// for (int x = 0; x < width; x++) { +// if(list.size() - 1 < y * width + x) +// { +// continue; +// } +// +// int stackX = (x + 1) * 18 + (guiLeft + guiBase.xSize / 7); +// int stackY = (y + 1) * 18 + (guiTop + guiBase.ySize / 5); +// +// Object component = list.get(y * width + x); +// if (component != null) { +// if (component instanceof ItemStack) { +// GuiHelper.drawItemStack((ItemStack) component, stackX, stackY); +// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { +// guiBase.renderToolTip((ItemStack) component, stackX, stackY); +// } +// } else if (component instanceof Integer) { +// GuiHelper.drawItemStack(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY); +// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { +// guiBase.renderToolTip(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY); +// } +// } else { +// if (((ArrayList<ItemStack>) component).isEmpty()) return; +// GuiHelper.drawItemStack(((ArrayList<ItemStack>) component).get(0), stackX, stackY); +// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { +// guiBase.renderToolTip(((ArrayList<ItemStack>) component).get(0), stackX, stackY); +// } +// } +// } +// } +// } +// int outputX = (5 * 18) + (guiLeft + guiBase.xSize / 7); +// int outputY = (2 * 18) + (guiTop + guiBase.xSize / 5); +// GuiHelper.drawItemStack(shapelessBloodOrbRecipe.getRecipeOutput(), outputX, outputY); +// if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) { +// guiBase.renderToolTip(shapelessBloodOrbRecipe.getRecipeOutput(), outputX, outputY); +// } +// }else +// { +// ShapedBloodOrbRecipe shapedBloodOrbRecipe = (ShapedBloodOrbRecipe) recipe; +// int width = ReflectionHelper.getPrivateValue(ShapedBloodOrbRecipe.class, shapedBloodOrbRecipe, 4); +// int height = ReflectionHelper.getPrivateValue(ShapedBloodOrbRecipe.class, shapedBloodOrbRecipe, 5); +// for (int y = 0; y < height; y++) { +// for (int x = 0; x < width; x++) { +// int stackX = (x + 1) * 18 + (guiLeft + guiBase.xSize / 7); +// int stackY = (y + 1) * 18 + (guiTop + guiBase.ySize / 5); +// Object component = shapedBloodOrbRecipe.getInput()[y * width + x]; +// if (component != null) { +// if (component instanceof ItemStack) { +// GuiHelper.drawItemStack((ItemStack) component, stackX, stackY); +// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { +// guiBase.renderToolTip((ItemStack) component, stackX, stackY); +// } +// } else if (component instanceof Integer) { +// GuiHelper.drawItemStack(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY); +// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { +// guiBase.renderToolTip(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY); +// } +// } else { +// if (((ArrayList<ItemStack>) component).isEmpty()) return; +// GuiHelper.drawItemStack(((ArrayList<ItemStack>) component).get(0), stackX, stackY); +// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { +// guiBase.renderToolTip(((ArrayList<ItemStack>) component).get(0), stackX, stackY); +// } +// } +// } +// } +// } +// int outputX = (5 * 18) + (guiLeft + guiBase.xSize / 7); +// int outputY = (2 * 18) + (guiTop + guiBase.xSize / 5); +// GuiHelper.drawItemStack(shapedBloodOrbRecipe.getRecipeOutput(), outputX, outputY); +// if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) { +// guiBase.renderToolTip(shapedBloodOrbRecipe.getRecipeOutput(), outputX, outputY); +// } +// } +// +// } +// +// @Override +// public void drawExtras(Book book, CategoryAbstract category, +// EntryAbstract entry, int guiLeft, int guiTop, int mouseX, +// int mouseY, GuiBase guiBase, FontRenderer fontRenderer) { +// // TODO Auto-generated method stub +// +// } +// +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageAltarRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageAltarRecipe.java index cbad2be3..7e61a8e5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageAltarRecipe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageAltarRecipe.java @@ -1,69 +1,69 @@ -package WayofTime.alchemicalWizardry.api.guide; - - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; -import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; -import amerifrance.guideapi.api.abstraction.CategoryAbstract; -import amerifrance.guideapi.api.abstraction.EntryAbstract; -import amerifrance.guideapi.api.base.Book; -import amerifrance.guideapi.api.base.PageBase; -import amerifrance.guideapi.api.util.GuiHelper; -import amerifrance.guideapi.gui.GuiBase; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class PageAltarRecipe extends PageBase { - - public ItemStack input; - public ItemStack output; - public int tier; - public int bloodRequired; - - public PageAltarRecipe(AltarRecipe recipe) { - this.input = recipe.getRequiredItem(); - this.output = recipe.getResult(); - this.tier = recipe.getMinTier(); - this.bloodRequired = recipe.getLiquidRequired(); - } - - @Override - @SideOnly(Side.CLIENT) - public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) { - - Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("alchemicalwizardry" + ":textures/gui/guide/altar.png")); - guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 87, 146, 104); - - guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.recipe.altar"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0); - - int inputX = (1 + 1) * 20 + (guiLeft + guiBase.xSize / 7) + 1; - int inputY = (20) + (guiTop + guiBase.ySize / 5) - 1; //1 * 20 - GuiHelper.drawItemStack(input, inputX, inputY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, inputX, inputY, 15, 15)) { - guiBase.renderToolTip(input, mouseX, mouseY); - } - - if (output == null) { - output = new ItemStack(Blocks.fire); - } - int outputX = (5 * 20) + (guiLeft + guiBase.xSize / 7) + 1; - int outputY = (20) + (guiTop + guiBase.xSize / 5) - 1; // 1 * 20 - GuiHelper.drawItemStack(output, outputX, outputY); - if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) { - guiBase.renderToolTip(output, outputX, outputY); - } - - if (output.getItem() == Item.getItemFromBlock(Blocks.fire)) { - guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.furnace.error"), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0xED073D); - guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("bm.string.tier") + ": " + String.valueOf(tier), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0); - guiBase.drawCenteredString(fontRenderer, "LP: " + String.valueOf(bloodRequired), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 30, 0); - } - guiBase.drawCenteredString(fontRenderer, String.format(StatCollector.translateToLocal("text.recipe.altar.tier"), String.valueOf(tier)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0); - guiBase.drawCenteredString(fontRenderer, String.format(StatCollector.translateToLocal("text.recipe.altar.bloodRequired"), String.valueOf(bloodRequired)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0); - } -} +//package WayofTime.alchemicalWizardry.api.guide; +// +// +//import net.minecraft.client.Minecraft; +//import net.minecraft.client.gui.FontRenderer; +//import net.minecraft.init.Blocks; +//import net.minecraft.item.Item; +//import net.minecraft.item.ItemStack; +//import net.minecraft.util.ResourceLocation; +//import net.minecraft.util.StatCollector; +//import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; +//import amerifrance.guideapi.api.abstraction.CategoryAbstract; +//import amerifrance.guideapi.api.abstraction.EntryAbstract; +//import amerifrance.guideapi.api.base.Book; +//import amerifrance.guideapi.api.base.PageBase; +//import amerifrance.guideapi.api.util.GuiHelper; +//import amerifrance.guideapi.gui.GuiBase; +//import cpw.mods.fml.relauncher.Side; +//import cpw.mods.fml.relauncher.SideOnly; +// +//public class PageAltarRecipe extends PageBase { +// +// public ItemStack input; +// public ItemStack output; +// public int tier; +// public int bloodRequired; +// +// public PageAltarRecipe(AltarRecipe recipe) { +// this.input = recipe.getRequiredItem(); +// this.output = recipe.getResult(); +// this.tier = recipe.getMinTier(); +// this.bloodRequired = recipe.getLiquidRequired(); +// } +// +// @Override +// @SideOnly(Side.CLIENT) +// public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) { +// +// Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("alchemicalwizardry" + ":textures/gui/guide/altar.png")); +// guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 87, 146, 104); +// +// guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.recipe.altar"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0); +// +// int inputX = (1 + 1) * 20 + (guiLeft + guiBase.xSize / 7); +// int inputY = (20) + (guiTop + guiBase.ySize / 5); //1 * 20 +// GuiHelper.drawItemStack(input, inputX, inputY); +// if (GuiHelper.isMouseBetween(mouseX, mouseY, inputX, inputY, 15, 15)) { +// guiBase.renderToolTip(input, mouseX, mouseY); +// } +// +// if (output == null) { +// output = new ItemStack(Blocks.fire); +// } +// int outputX = (5 * 20) + (guiLeft + guiBase.xSize / 7); +// int outputY = (20) + (guiTop + guiBase.xSize / 5); // 1 * 20 +// GuiHelper.drawItemStack(output, outputX, outputY); +// if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) { +// guiBase.renderToolTip(output, outputX, outputY); +// } +// +// if (output.getItem() == Item.getItemFromBlock(Blocks.fire)) { +// guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.furnace.error"), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0xED073D); +// guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("bm.string.tier") + ": " + String.valueOf(tier), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0); +// guiBase.drawCenteredString(fontRenderer, "LP: " + String.valueOf(bloodRequired), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 30, 0); +// } +// guiBase.drawCenteredString(fontRenderer, String.format(StatCollector.translateToLocal("text.recipe.altar.tier"), String.valueOf(tier)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0); +// guiBase.drawCenteredString(fontRenderer, String.format(StatCollector.translateToLocal("text.recipe.altar.bloodRequired"), String.valueOf(bloodRequired)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0); +// } +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageMultiBlock.java b/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageMultiBlock.java index 09f510c2..0a0678f6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageMultiBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageMultiBlock.java @@ -1,145 +1,145 @@ -package WayofTime.alchemicalWizardry.api.guide; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.item.ItemStack; - -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; - -import amerifrance.guideapi.api.abstraction.CategoryAbstract; -import amerifrance.guideapi.api.abstraction.EntryAbstract; -import amerifrance.guideapi.api.base.Book; -import amerifrance.guideapi.api.base.PageBase; -import amerifrance.guideapi.gui.GuiBase; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class PageMultiBlock extends PageBase -{ - ItemStack[][][] structure; - boolean canTick = false; - int tick = 0; - int showLayer = -1; - float scaleFactor = 1; - - boolean renderMouseOver = true; - - public PageMultiBlock(ItemStack[][][] structure) - { - this.structure = structure; - initPage(structure); - } - - int blockCount=0; - int[] countPerLevel; - int structureHeight = 0; - int structureLength = 0; - int structureWidth = 0; - - public void initPage(ItemStack[][][] structure) - { - structureHeight = structure.length; - structureWidth=0; - structureLength=0; - countPerLevel = new int[structureHeight]; - blockCount=0; - for(int h=0; h<structure.length; h++) - { - if(structure[h].length-1>structureLength) - structureLength = structure[h].length-1; - int perLvl=0; - for(int l=0; l<structure[h].length; l++) - { - if(structure[h][l].length-1>structureWidth) - structureWidth = structure[h][l].length-1; - for(ItemStack ss : structure[h][l]) - if(ss!=null) - perLvl++; - } - countPerLevel[h] = perLvl; - blockCount += perLvl; - } - tick= (showLayer==-1?blockCount:countPerLevel[showLayer])*40; -// int yOff = (structureHeight-1)*12+structureWidth*5+structureLength*5+16; -// pageButtons.add(new GuiButtonManualNavigation(gui, 100, x+4,y+yOff/2-5, 10,10, 4)); -// pageButtons.add(new GuiButtonManualNavigation(gui, 101, x+4,y+yOff/2-8-16, 10,16, 3)); -// pageButtons.add(new GuiButtonManualNavigation(gui, 102, x+4,y+yOff/2+8, 10,16, 2)); - } - - @Override - @SideOnly(Side.CLIENT) - public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) - { -// if(multiblock.getStructureManual()!=null) - Minecraft mc = Minecraft.getMinecraft(); - - int x = guiLeft + 32; - int y = guiTop + 30; - { - if(canTick) - tick++; - - int prevLayers = 0; - if(showLayer!=-1) - for(int ll=0; ll<showLayer; ll++) - prevLayers+=countPerLevel[ll]; - int limiter = prevLayers+ (tick/40)% ((showLayer==-1?blockCount:countPerLevel[showLayer])+4); - - int xHalf = (structureWidth*5 - structureLength*5); - int yOffPartial = (structureHeight-1)*12+structureWidth*5+structureLength*5; -// int yOffTotal = yOffPartial+16; - - GL11.glDisable(GL11.GL_DEPTH_TEST); - - GL11.glPushMatrix(); - GL11.glTranslatef((1-scaleFactor)*(guiLeft + 64), (1-scaleFactor)*(guiTop+60), 0); - GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - RenderHelper.enableGUIStandardItemLighting(); - RenderItem.getInstance().renderWithColor=true; - int i=0; - ItemStack highlighted = null; - for(int h=0; h<structure.length; h++) - if(showLayer==-1 || h<=showLayer) - { - ItemStack[][] level = structure[h]; - for(int l=level.length-1; l>=0; l--) - { - ItemStack[] row = level[l]; - for(int w=row.length-1; w>=0; w--) - { - int xx = 60 +xHalf -10*w +10*l -7; - int yy = yOffPartial - 5*w - 5*l -12*h; - GL11.glTranslated(0, 0, 1); - if(row[w]!=null && i<=limiter) - { - i++; - RenderItem.getInstance().renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, row[w], x+xx, y+yy); - if(mouseX>=x+xx&&mouseX<x+xx+16 && mouseY>=y+yy&&mouseY<y+yy+16) - highlighted = row[w]; - } - } - } - } - GL11.glTranslated(0, 0, -i); - RenderHelper.disableStandardItemLighting(); - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - GL11.glPopMatrix(); - - GL11.glEnable(GL11.GL_BLEND); - GL11.glEnable(GL11.GL_DEPTH_TEST); - - mc.fontRenderer.setUnicodeFlag(false); - if(highlighted!=null && renderMouseOver) - guiBase.renderToolTip(highlighted, mouseX, mouseY); - RenderHelper.disableStandardItemLighting(); - -// mc.fontRenderer.setUnicodeFlag(true); -// if(localizedText!=null&&!localizedText.isEmpty()) -// manual.fontRenderer.drawSplitString(localizedText, x,y+yOffTotal, 120, manual.getTextColour()); - } - } -} \ No newline at end of file +//package WayofTime.alchemicalWizardry.api.guide; +// +//import net.minecraft.client.Minecraft; +//import net.minecraft.client.gui.FontRenderer; +//import net.minecraft.client.renderer.RenderHelper; +//import net.minecraft.client.renderer.entity.RenderItem; +//import net.minecraft.item.ItemStack; +// +//import org.lwjgl.opengl.GL11; +//import org.lwjgl.opengl.GL12; +// +//import amerifrance.guideapi.api.abstraction.CategoryAbstract; +//import amerifrance.guideapi.api.abstraction.EntryAbstract; +//import amerifrance.guideapi.api.base.Book; +//import amerifrance.guideapi.api.base.PageBase; +//import amerifrance.guideapi.gui.GuiBase; +//import cpw.mods.fml.relauncher.Side; +//import cpw.mods.fml.relauncher.SideOnly; +// +//public class PageMultiBlock extends PageBase +//{ +// ItemStack[][][] structure; +// boolean canTick = false; +// int tick = 0; +// int showLayer = -1; +// float scaleFactor = 1; +// +// boolean renderMouseOver = true; +// +// public PageMultiBlock(ItemStack[][][] structure) +// { +// this.structure = structure; +// initPage(structure); +// } +// +// int blockCount=0; +// int[] countPerLevel; +// int structureHeight = 0; +// int structureLength = 0; +// int structureWidth = 0; +// +// public void initPage(ItemStack[][][] structure) +// { +// structureHeight = structure.length; +// structureWidth=0; +// structureLength=0; +// countPerLevel = new int[structureHeight]; +// blockCount=0; +// for(int h=0; h<structure.length; h++) +// { +// if(structure[h].length-1>structureLength) +// structureLength = structure[h].length-1; +// int perLvl=0; +// for(int l=0; l<structure[h].length; l++) +// { +// if(structure[h][l].length-1>structureWidth) +// structureWidth = structure[h][l].length-1; +// for(ItemStack ss : structure[h][l]) +// if(ss!=null) +// perLvl++; +// } +// countPerLevel[h] = perLvl; +// blockCount += perLvl; +// } +// tick= (showLayer==-1?blockCount:countPerLevel[showLayer])*40; +//// int yOff = (structureHeight-1)*12+structureWidth*5+structureLength*5+16; +//// pageButtons.add(new GuiButtonManualNavigation(gui, 100, x+4,y+yOff/2-5, 10,10, 4)); +//// pageButtons.add(new GuiButtonManualNavigation(gui, 101, x+4,y+yOff/2-8-16, 10,16, 3)); +//// pageButtons.add(new GuiButtonManualNavigation(gui, 102, x+4,y+yOff/2+8, 10,16, 2)); +// } +// +// @Override +// @SideOnly(Side.CLIENT) +// public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) +// { +//// if(multiblock.getStructureManual()!=null) +// Minecraft mc = Minecraft.getMinecraft(); +// +// int x = guiLeft + 32; +// int y = guiTop + 30; +// { +// if(canTick) +// tick++; +// +// int prevLayers = 0; +// if(showLayer!=-1) +// for(int ll=0; ll<showLayer; ll++) +// prevLayers+=countPerLevel[ll]; +// int limiter = prevLayers+ (tick/40)% ((showLayer==-1?blockCount:countPerLevel[showLayer])+4); +// +// int xHalf = (structureWidth*5 - structureLength*5); +// int yOffPartial = (structureHeight-1)*12+structureWidth*5+structureLength*5; +//// int yOffTotal = yOffPartial+16; +// +// GL11.glDisable(GL11.GL_DEPTH_TEST); +// +// GL11.glPushMatrix(); +// GL11.glTranslatef((1-scaleFactor)*(guiLeft + 64), (1-scaleFactor)*(guiTop+60), 0); +// GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); +// GL11.glEnable(GL12.GL_RESCALE_NORMAL); +// RenderHelper.enableGUIStandardItemLighting(); +// RenderItem.getInstance().renderWithColor=true; +// int i=0; +// ItemStack highlighted = null; +// for(int h=0; h<structure.length; h++) +// if(showLayer==-1 || h<=showLayer) +// { +// ItemStack[][] level = structure[h]; +// for(int l=level.length-1; l>=0; l--) +// { +// ItemStack[] row = level[l]; +// for(int w=row.length-1; w>=0; w--) +// { +// int xx = 60 +xHalf -10*w +10*l -7; +// int yy = yOffPartial - 5*w - 5*l -12*h; +// GL11.glTranslated(0, 0, 1); +// if(row[w]!=null && i<=limiter) +// { +// i++; +// RenderItem.getInstance().renderItemIntoGUI(mc.fontRendererObj, mc.renderEngine, row[w], x+xx, y+yy); +// if(mouseX>=x+xx&&mouseX<x+xx+16 && mouseY>=y+yy&&mouseY<y+yy+16) +// highlighted = row[w]; +// } +// } +// } +// } +// GL11.glTranslated(0, 0, -i); +// RenderHelper.disableStandardItemLighting(); +// GL11.glDisable(GL12.GL_RESCALE_NORMAL); +// GL11.glPopMatrix(); +// +// GL11.glEnable(GL11.GL_BLEND); +// GL11.glEnable(GL11.GL_DEPTH_TEST); +// +// mc.fontRendererObj.setUnicodeFlag(false); +// if(highlighted!=null && renderMouseOver) +// guiBase.renderToolTip(highlighted, mouseX, mouseY); +// RenderHelper.disableStandardItemLighting(); +// +//// mc.fontRendererObj.setUnicodeFlag(true); +//// if(localizedText!=null&&!localizedText.isEmpty()) +//// manual.fontRendererObj.drawSplitString(localizedText, x,y+yOffTotal, 120, manual.getTextColour()); +// } +// } +//} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageRitualMultiBlock.java b/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageRitualMultiBlock.java index 2de3bf4c..1ac64f17 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageRitualMultiBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageRitualMultiBlock.java @@ -1,22 +1,23 @@ -package WayofTime.alchemicalWizardry.api.guide; - -import java.util.List; - -import net.minecraft.item.ItemStack; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.Rituals; - -public class PageRitualMultiBlock extends PageMultiBlock -{ - private static ItemStack blankStone; - private static ItemStack waterStone; - private static ItemStack fireStone; - private static ItemStack earthStone; - private static ItemStack airStone; - private static ItemStack duskStone; - private static ItemStack dawnStone; - static - { +//package WayofTime.alchemicalWizardry.api.guide; +// +//import java.util.List; +// +//import net.minecraft.item.ItemStack; +//import WayofTime.alchemicalWizardry.ModBlocks; +//import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +//import WayofTime.alchemicalWizardry.api.rituals.Rituals; +// +//public class PageRitualMultiBlock extends PageMultiBlock +//{ +// private static ItemStack blankStone; +// private static ItemStack waterStone; +// private static ItemStack fireStone; +// private static ItemStack earthStone; +// private static ItemStack airStone; +// private static ItemStack duskStone; +// private static ItemStack dawnStone; +// static +// { // blankStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.BLANK); // waterStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.WATER); // fireStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.FIRE); @@ -24,72 +25,72 @@ public class PageRitualMultiBlock extends PageMultiBlock // airStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.AIR); // duskStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.DUSK); // dawnStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.DAWN); - } - - private PageRitualMultiBlock(ItemStack[][][] structure) - { - super(structure); - } - - public static PageRitualMultiBlock getPageForRitual(String ritualID) - { - return getPageForRitual(Rituals.getRitualList(ritualID)); - } - - public static PageRitualMultiBlock getPageForRitual(List<RitualComponent> ritualComponents) - { - int minX = 0; - int minY = 0; - int minZ = 0; - - int maxX = 0; - int maxY = 0; - int maxZ = 0; - - for(RitualComponent comp : ritualComponents) - { - minX = Math.min(comp.getX(), minX); - minY = Math.min(comp.getY(), minY); - minZ = Math.min(comp.getZ(), minZ); - - maxX = Math.max(comp.getX(), maxX); - maxY = Math.max(comp.getY(), maxY); - maxZ = Math.max(comp.getZ(), maxZ); - } - - System.out.println("Min: (" + minX + ", " + minY + ", " + minZ + "), Max: (" + maxX + ", " + maxY + ", " + maxZ + ")"); - - ItemStack[][][] tempStructure = new ItemStack[maxY-minY+1][maxX-minX+1][maxZ-minZ+1]; //First value is vertical, second is down to the left, third is down to the right - - for(RitualComponent comp : ritualComponents) - { - tempStructure[comp.getY() - minY][comp.getX() - minX][comp.getZ() - minZ] = getStackForRitualStone(comp.getStoneType()); - } - +// } +// +// private PageRitualMultiBlock(ItemStack[][][] structure) +// { +// super(structure); +// } +// +// public static PageRitualMultiBlock getPageForRitual(String ritualID) +// { +// return getPageForRitual(Rituals.getRitualList(ritualID)); +// } +// +// public static PageRitualMultiBlock getPageForRitual(List<RitualComponent> ritualComponents) +// { +// int minX = 0; +// int minY = 0; +// int minZ = 0; +// +// int maxX = 0; +// int maxY = 0; +// int maxZ = 0; +// +// for(RitualComponent comp : ritualComponents) +// { +// minX = Math.min(comp.getX(), minX); +// minY = Math.min(comp.getY(), minY); +// minZ = Math.min(comp.getZ(), minZ); +// +// maxX = Math.max(comp.getX(), maxX); +// maxY = Math.max(comp.getY(), maxY); +// maxZ = Math.max(comp.getZ(), maxZ); +// } +// +// System.out.println("Min: (" + minX + ", " + minY + ", " + minZ + "), Max: (" + maxX + ", " + maxY + ", " + maxZ + ")"); +// +// ItemStack[][][] tempStructure = new ItemStack[maxY-minY+1][maxX-minX+1][maxZ-minZ+1]; //First value is vertical, second is down to the left, third is down to the right +// +// for(RitualComponent comp : ritualComponents) +// { +// tempStructure[comp.getY() - minY][comp.getX() - minX][comp.getZ() - minZ] = getStackForRitualStone(comp.getStoneType()); +// } +// // tempStructure[-minY][-minX][-minZ] = new ItemStack(ModBlocks.blockMasterStone); - - return new PageRitualMultiBlock(tempStructure); - } - - private static ItemStack getStackForRitualStone(int type) - { - switch(type) - { - case RitualComponent.BLANK: - return blankStone; - case RitualComponent.WATER: - return waterStone; - case RitualComponent.FIRE: - return fireStone; - case RitualComponent.EARTH: - return earthStone; - case RitualComponent.AIR: - return airStone; - case RitualComponent.DUSK: - return duskStone; - case RitualComponent.DAWN: - return dawnStone; - } - return blankStone; - } -} +// +// return new PageRitualMultiBlock(tempStructure); +// } +// +// private static ItemStack getStackForRitualStone(int type) +// { +// switch(type) +// { +// case RitualComponent.BLANK: +// return blankStone; +// case RitualComponent.WATER: +// return waterStone; +// case RitualComponent.FIRE: +// return fireStone; +// case RitualComponent.EARTH: +// return earthStone; +// case RitualComponent.AIR: +// return airStone; +// case RitualComponent.DUSK: +// return duskStone; +// case RitualComponent.DAWN: +// return dawnStone; +// } +// return blankStone; +// } +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/harvest/HarvestRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/harvest/HarvestRegistry.java index aac57f57..bc30ddc8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/harvest/HarvestRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/harvest/HarvestRegistry.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.api.harvest; -import net.minecraft.block.Block; -import net.minecraft.world.World; - import java.util.ArrayList; import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.BlockPos; +import net.minecraft.world.World; + public class HarvestRegistry { public static List<IHarvestHandler> handlerList = new ArrayList(); @@ -15,14 +17,14 @@ public class HarvestRegistry handlerList.add(handler); } - public static boolean harvestBlock(World world, int xCoord, int yCoord, int zCoord) + public static boolean harvestBlock(World world, BlockPos pos) { - Block block = world.getBlock(xCoord, yCoord, zCoord); - int meta = world.getBlockMetadata(xCoord, yCoord, zCoord); + IBlockState state = world.getBlockState(pos); + Block block = state.getBlock(); for (IHarvestHandler handler : handlerList) { - if (handler.harvestAndPlant(world, xCoord, yCoord, zCoord, block, meta)) + if (handler.harvestAndPlant(world, pos, block, state)) { return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/harvest/IHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/harvest/IHarvestHandler.java index 0d5fb32b..d7dc78a8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/harvest/IHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/harvest/IHarvestHandler.java @@ -1,6 +1,8 @@ package WayofTime.alchemicalWizardry.api.harvest; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; public interface IHarvestHandler @@ -9,12 +11,8 @@ public interface IHarvestHandler * A handler that is used to harvest and replant the block at the specified location * * @param world - * @param xCoord - * @param yCoord - * @param zCoord * @param block block at this given location - * @param meta meta at this given location * @return true if successfully harvested, false if not */ - boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta); + boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java index 2d7325ca..b74bc2a3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java @@ -8,6 +8,7 @@ import java.util.Set; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -18,6 +19,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -98,7 +100,7 @@ public class ItemSpellMultiTool extends Item } @Override - public boolean onBlockStartBreak(ItemStack stack, int x, int y, int z, EntityPlayer player) + public boolean onBlockStartBreak(ItemStack stack, BlockPos pos, EntityPlayer player) { if (player.worldObj.isRemote) { @@ -109,23 +111,23 @@ public class ItemSpellMultiTool extends Item return false; World world = player.worldObj; - Block block = player.worldObj.getBlock(x, y, z); - int meta = world.getBlockMetadata(x, y, z); + IBlockState state = world.getBlockState(pos); + Block block = state.getBlock(); if (block == null || block == Blocks.air) return false; int hlvl = -1; - float blockHardness = block.getBlockHardness(world, x, y, z); + float blockHardness = block.getBlockHardness(world, pos); MovingObjectPosition mop = APISpellHelper.raytraceFromEntity(world, player, true, 5.0D); - Block localBlock = world.getBlock(x, y, z); - int localMeta = world.getBlockMetadata(x, y, z); - String toolClass = block.getHarvestTool(meta); + IBlockState localState = world.getBlockState(pos); + Block localBlock = state.getBlock(); + String toolClass = block.getHarvestTool(state); if (toolClass != null && this.getHarvestLevel(stack, toolClass) != -1) - hlvl = block.getHarvestLevel(meta); + hlvl = block.getHarvestLevel(state); int toolLevel = this.getHarvestLevel(stack, toolClass); - float localHardness = localBlock == null ? Float.MAX_VALUE : localBlock.getBlockHardness(world, x, y, z); + float localHardness = localBlock == null ? Float.MAX_VALUE : localBlock.getBlockHardness(world, pos); if (hlvl <= toolLevel && localHardness - 1.5 <= blockHardness) { @@ -139,7 +141,7 @@ public class ItemSpellMultiTool extends Item String localToolClass = this.getToolClassForMaterial(localBlock.getMaterial()); - if (localToolClass != null && this.getHarvestLevel(stack, toolClass) >= localBlock.getHarvestLevel(localMeta)) + if (localToolClass != null && this.getHarvestLevel(stack, toolClass) >= localBlock.getHarvestLevel(localState)) { isEffective = true; } @@ -154,31 +156,31 @@ public class ItemSpellMultiTool extends Item { if (isEffective) { - if (localBlock.removedByPlayer(world, player, x, y, z, true)) + if (localBlock.removedByPlayer(world, pos, player, true)) { - localBlock.onBlockDestroyedByPlayer(world, x, y, z, localMeta); + localBlock.onBlockDestroyedByPlayer(world, pos, localState); } - localBlock.onBlockHarvested(world, x, y, z, localMeta, player); + localBlock.onBlockHarvested(world, pos, localState, player); if (blockHardness > 0f) - onBlockDestroyed(stack, world, localBlock, x, y, z, player); + onBlockDestroyed(stack, world, localBlock, pos, player); - List<ItemStack> items = APISpellHelper.getItemsFromBlock(world, localBlock, x, y, z, localMeta, this.getSilkTouch(stack), this.getFortuneLevel(stack)); + List<ItemStack> items = APISpellHelper.getItemsFromBlock(world, pos, localBlock, localState, this.getSilkTouch(stack), this.getFortuneLevel(stack)); SpellParadigmTool parad = this.loadParadigmFromStack(stack); List<ItemStack> newItems = parad.handleItemList(stack, items); if (!world.isRemote) { - APISpellHelper.spawnItemListInWorld(newItems, world, x + 0.5f, y + 0.5f, z + 0.5f); + APISpellHelper.spawnItemListInWorld(newItems, world, pos.getX() + 0.5f, pos.getY() + 0.5f, pos.getZ() + 0.5f); } - world.func_147479_m(x, y, z); + world.markBlockForUpdate(pos); int cost = 0; cost += parad.digSurroundingArea(stack, world, player, mop, localToolClass, localHardness, toolLevel, this); - cost += parad.onBreakBlock(stack, world, player, localBlock, localMeta, x, y, z, ForgeDirection.getOrientation(mop.sideHit)); + cost += parad.onBreakBlock(stack, world, player, localBlock, localState, pos, mop.field_178784_b); if (cost > 0) { @@ -186,14 +188,14 @@ public class ItemSpellMultiTool extends Item } } else { - world.setBlockToAir(x, y, z); - world.func_147479_m(x, y, z); + world.setBlockToAir(pos); + world.markBlockForUpdate(pos); } } else { - world.setBlockToAir(x, y, z); - world.func_147479_m(x, y, z); + world.setBlockToAir(pos); + world.markBlockForUpdate(pos); } } } @@ -279,18 +281,14 @@ public class ItemSpellMultiTool extends Item } @Override - public float getDigSpeed(ItemStack stack, Block block, int meta) + public float getDigSpeed(ItemStack stack, IBlockState state) { - String toolClass = block.getHarvestTool(meta); + Block block = state.getBlock(); + String toolClass = block.getHarvestTool(state); if (toolClass == null || toolClass.equals("")) { - toolClass = getToolClassOfMaterial(block.getMaterial()); - - if(toolClass == "") - { - return 1.0f; - } + return 1.0f; } { if (stack.hasTagCompound()) @@ -306,26 +304,6 @@ public class ItemSpellMultiTool extends Item return 1.0f; } - - public String getToolClassOfMaterial(Material mat) - { - if(mat == Material.iron || mat == Material.anvil || mat == Material.rock) - { - return "pickaxe"; - } - - if(mat == Material.wood || mat == Material.plants || mat == Material.vine) - { - return "axe"; - } - - if(mat == Material.ground || mat == Material.grass) - { - return "shovel"; - } - - return ""; - } @Override public int getHarvestLevel(ItemStack stack, String toolClass) diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapedBloodOrbRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapedBloodOrbRecipe.java index 83461f3f..ca2122bd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapedBloodOrbRecipe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapedBloodOrbRecipe.java @@ -1,6 +1,11 @@ package WayofTime.alchemicalWizardry.api.items; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Map.Entry; + import net.minecraft.block.Block; import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.Item; @@ -9,12 +14,7 @@ import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.ShapedRecipes; import net.minecraft.world.World; import net.minecraftforge.oredict.OreDictionary; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Map.Entry; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; /** * Shaped Blood Orb Recipe Handler by joshie * @@ -278,4 +278,10 @@ public class ShapedBloodOrbRecipe implements IRecipe { return this.input; } + + @Override + public ItemStack[] func_179532_b(InventoryCrafting inventory) + { + return new ItemStack[1]; + } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapelessBloodOrbRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapelessBloodOrbRecipe.java index 80662b3b..44514568 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapelessBloodOrbRecipe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapelessBloodOrbRecipe.java @@ -177,4 +177,10 @@ public class ShapelessBloodOrbRecipe implements IRecipe { return this.input; } + + @Override + public ItemStack[] func_179532_b(InventoryCrafting inventory) + { + return new ItemStack[1]; + } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/renderer/MRSRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/api/renderer/MRSRenderer.java index 7eea34c1..8200f4e2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/renderer/MRSRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/renderer/MRSRenderer.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.api.renderer; -import net.minecraft.client.renderer.texture.TextureManager; -import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.client.Minecraft; import net.minecraft.util.ResourceLocation; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -9,13 +8,8 @@ public abstract class MRSRenderer { public abstract void renderAt(IMasterRitualStone tile, double x, double y, double z); - protected void bindTexture(ResourceLocation p_147499_1_) + protected void bindTexture(ResourceLocation location) { - TextureManager texturemanager = TileEntityRendererDispatcher.instance.field_147553_e; - - if (texturemanager != null) - { - texturemanager.bindTexture(p_147499_1_); - } + Minecraft.getMinecraft().getTextureManager().bindTexture(location); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IMasterRitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IMasterRitualStone.java index 3577ad47..8b38ecac 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IMasterRitualStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IMasterRitualStone.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.api.rituals; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ISegmentedReagentHandler; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ISegmentedReagentHandler; public interface IMasterRitualStone extends ISegmentedReagentHandler { - void performRitual(World world, int x, int y, int z, String ritualID); + void performRitual(World world, BlockPos pos, String ritualID); String getOwner(); @@ -22,13 +23,9 @@ public interface IMasterRitualStone extends ISegmentedReagentHandler int getDirection(); - World getWorld(); + World getWorldObj(); - int getXCoord(); - - int getYCoord(); - - int getZCoord(); + BlockPos getPosition(); NBTTagCompound getCustomRitualTag(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IRitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IRitualStone.java index 3ea6d90e..74d1e9a8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IRitualStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IRitualStone.java @@ -1,5 +1,7 @@ package WayofTime.alchemicalWizardry.api.rituals; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; public interface IRitualStone @@ -7,12 +9,10 @@ public interface IRitualStone /** * x, y, and z give the position of the Ritual Stone * @param world - * @param x - * @param y - * @param z - * @param meta + * @param pos + * @param state * @param runeType * @return */ - boolean isRuneType(World world, int x, int y, int z, int meta, int runeType); + boolean isRuneType(World world, BlockPos pos, IBlockState state, int runeType); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/LocalRitualStorage.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/LocalRitualStorage.java index e5a3241b..d9d7cdfc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/LocalRitualStorage.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/LocalRitualStorage.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.api.rituals; import net.minecraft.nbt.NBTTagCompound; -import WayofTime.alchemicalWizardry.api.Int3; +import net.minecraft.util.BlockPos; /** * This class is used to pass ritual-specific data into the RitualEffect from the containing Master Ritual Stone. This is basically used as auxillarary storage, @@ -10,33 +10,27 @@ import WayofTime.alchemicalWizardry.api.Int3; */ public class LocalRitualStorage { - public int xCoord; - public int yCoord; - public int zCoord; + public BlockPos coords; public void writeToNBT(NBTTagCompound tag) { - tag.setInteger("xCoord", xCoord); - tag.setInteger("yCoord", yCoord); - tag.setInteger("zCoord", zCoord); + tag.setInteger("xCoord", coords.getX()); + tag.setInteger("yCoord", coords.getY()); + tag.setInteger("zCoord", coords.getZ()); } public void readFromNBT(NBTTagCompound tag) { - this.xCoord = tag.getInteger("xCoord"); - this.yCoord = tag.getInteger("yCoord"); - this.zCoord = tag.getInteger("zCoord"); + this.coords = new BlockPos(tag.getInteger("xCoord"), tag.getInteger("yCoord"), tag.getInteger("zCoord")); } - public Int3 getLocation() + public BlockPos getLocation() { - return new Int3(xCoord, yCoord, zCoord); + return coords; } - public void setLocation(Int3 location) + public void setLocation(BlockPos location) { - this.xCoord = location.xCoord; - this.yCoord = location.yCoord; - this.zCoord = location.zCoord; + this.coords = location; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java index 85f291c7..15a558d9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java @@ -4,7 +4,7 @@ import java.util.ArrayList; import java.util.List; import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; @@ -40,13 +40,13 @@ public abstract class RitualEffect ReagentStack reagentStack = new ReagentStack(reagent, amount); - ReagentStack stack = ritualStone.drain(ForgeDirection.UNKNOWN, reagentStack, false); + ReagentStack stack = ritualStone.drain(EnumFacing.UP, reagentStack, false); if (stack != null && stack.amount >= amount) { if (doDrain) { - ritualStone.drain(ForgeDirection.UNKNOWN, reagentStack, true); + ritualStone.drain(EnumFacing.UP, reagentStack, true); } return true; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java index 4b9a48c6..8be6be44 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java @@ -6,14 +6,16 @@ import java.util.List; import java.util.Map; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.fml.common.eventhandler.Event; import WayofTime.alchemicalWizardry.api.event.RitualRunEvent; import WayofTime.alchemicalWizardry.api.event.RitualStopEvent; import WayofTime.alchemicalWizardry.api.renderer.MRSRenderer; -import cpw.mods.fml.common.eventhandler.Event; public class Rituals { @@ -95,11 +97,11 @@ public class Rituals } } - public static String checkValidRitual(World world, int x, int y, int z) + public static String checkValidRitual(World world, BlockPos pos) { for (String key : ritualMap.keySet()) { - if (checkRitualIsValid(world, x, y, z, key)) + if (checkRitualIsValid(world, pos, key)) { return key; } @@ -122,9 +124,9 @@ public class Rituals return false; } - public static boolean checkRitualIsValid(World world, int x, int y, int z, String ritualID) + public static boolean checkRitualIsValid(World world, BlockPos pos, String ritualID) { - int direction = Rituals.getDirectionOfRitual(world, x, y, z, ritualID); + int direction = Rituals.getDirectionOfRitual(world, pos, ritualID); return direction != -1; } @@ -135,7 +137,7 @@ public class Rituals * 3 - SOUTH * 4 - WEST */ - public static boolean checkDirectionOfRitualValid(World world, int x, int y, int z, String ritualID, int direction) + public static boolean checkDirectionOfRitualValid(World world, BlockPos pos, String ritualID, int direction) { List<RitualComponent> ritual = Rituals.getRitualList(ritualID); @@ -144,15 +146,18 @@ public class Rituals return false; } + IBlockState testState; Block test; TileEntity te; for (RitualComponent rc : ritual) { - test = world.getBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)); - te = world.getTileEntity(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)); + BlockPos newPos = pos.add(rc.getX(direction), rc.getY(), rc.getZ(direction)); + testState = world.getBlockState(newPos); + test = testState.getBlock(); + te = world.getTileEntity(newPos); - if (!(test instanceof IRitualStone && ((IRitualStone)test).isRuneType(world, x + rc.getX(direction), y, z+ rc.getZ(direction), world.getBlockMetadata(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)), rc.getStoneType())) + if (!(test instanceof IRitualStone && ((IRitualStone)test).isRuneType(world, newPos, testState, rc.getStoneType())) && !(te instanceof ITileRitualStone && ((ITileRitualStone)te).isRuneType(rc.getStoneType()))) { return false; @@ -162,11 +167,11 @@ public class Rituals return true; } - public static int getDirectionOfRitual(World world, int x, int y, int z, String ritualID) + public static int getDirectionOfRitual(World world, BlockPos pos, String ritualID) { for (int i = 1; i <= 4; i++) { - if (Rituals.checkDirectionOfRitualValid(world, x, y, z, ritualID, i)) + if (Rituals.checkDirectionOfRitualValid(world, pos, ritualID, i)) { return i; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/PlayerSacrificeHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/PlayerSacrificeHandler.java index 1e3db2b2..af286e12 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/PlayerSacrificeHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/PlayerSacrificeHandler.java @@ -1,10 +1,11 @@ package WayofTime.alchemicalWizardry.api.sacrifice; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; @@ -12,7 +13,6 @@ public class PlayerSacrificeHandler { public static float scalingOfSacrifice = 0.001f; public static int soulFrayDuration = 400; - public static Potion soulFrayId; public static float getPlayerIncense(EntityPlayer player) { return APISpellHelper.getCurrentIncense(player); @@ -41,7 +41,7 @@ public class PlayerSacrificeHandler public static boolean sacrificePlayerHealth(EntityPlayer player) { - if(player.isPotionActive(soulFrayId)) + if(player.isPotionActive(AlchemicalWizardry.customPotionSoulFray)) { return false; } @@ -61,7 +61,7 @@ public class PlayerSacrificeHandler { player.setHealth(maxHealth/10.0f); setPlayerIncense(player, 0); - player.addPotionEffect(new PotionEffect(soulFrayId.id, soulFrayDuration)); + player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionSoulFray.id, soulFrayDuration)); return true; } @@ -78,10 +78,7 @@ public class PlayerSacrificeHandler public static boolean findAndFillAltar(World world, EntityPlayer player, int amount) { - int posX = (int) Math.round(player.posX - 0.5f); - int posY = (int) player.posY; - int posZ = (int) Math.round(player.posZ - 0.5f); - IBloodAltar altarEntity = getAltar(world, posX, posY, posZ); + IBloodAltar altarEntity = getAltar(world, player.getPosition()); if (altarEntity == null) { @@ -94,7 +91,7 @@ public class PlayerSacrificeHandler return true; } - public static IBloodAltar getAltar(World world, int x, int y, int z) + public static IBloodAltar getAltar(World world, BlockPos pos) { TileEntity tileEntity; @@ -104,7 +101,7 @@ public class PlayerSacrificeHandler { for (int k = -2; k <= 1; k++) { - tileEntity = world.getTileEntity(i + x, k + y, j + z); + tileEntity = world.getTileEntity(pos.add(i, j, k)); if(tileEntity instanceof IBloodAltar) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/ComplexNetworkHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/ComplexNetworkHandler.java index c9b69311..8d351d1e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/ComplexNetworkHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/ComplexNetworkHandler.java @@ -12,11 +12,9 @@ import java.util.Map.Entry; import java.util.UUID; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.server.MinecraftServer; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import com.mojang.authlib.GameProfile; /** @@ -30,41 +28,12 @@ public class ComplexNetworkHandler { return player.getPersistentID(); } - - public static EntityPlayer getPlayerFromUUID(UUID uuid) - { - MinecraftServer server = MinecraftServer.getServer(); - GameProfile gameProfile; - gameProfile = server.func_152358_ax().func_152652_a(uuid); - String str = uuid.toString(); - //TODO ServerConfigurationManager d.createPlayerForUser - UUID.fromString(str); - return null; - } public static String getKeyForPlayer(EntityPlayer player) { return ""; } - public static UUID getUUIDForKey(String key) - { -// if (MinecraftServer.getServer() == null) -// { -// return null; -// } -// -// World world = MinecraftServer.getServer().worldServers[0]; -// UUIDKeyMap data = (UUIDKeyMap) world.loadItemData(UUIDKeyMap.class, key); -// -// if (data == null) -// { -// data = new UUIDKeyMap(key); -// world.setItemData(key, data); -// } - return null; - } - public static String assignKeyToPlayer(EntityPlayer player) { return ""; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java index d9f30f41..4796f951 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java @@ -9,13 +9,13 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.util.DamageSource; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.fml.common.eventhandler.Event; +import net.minecraftforge.fml.common.eventhandler.Event.Result; import WayofTime.alchemicalWizardry.api.event.AddToNetworkEvent; import WayofTime.alchemicalWizardry.api.event.ItemBindEvent; import WayofTime.alchemicalWizardry.api.event.ItemDrainInContainerEvent; import WayofTime.alchemicalWizardry.api.event.ItemDrainNetworkEvent; -import cpw.mods.fml.common.eventhandler.Event; -import cpw.mods.fml.common.eventhandler.Event.Result; public class SoulNetworkHandler { @@ -396,7 +396,7 @@ public class SoulNetworkHandler public static String getUsername(EntityPlayer player) { - return player.getCommandSenderName(); + return player.getName(); } public static EntityPlayer getPlayerForUsername(String str) @@ -405,7 +405,7 @@ public class SoulNetworkHandler { return null; } - return MinecraftServer.getServer().getConfigurationManager().func_152612_a(str); + return MinecraftServer.getServer().getConfigurationManager().getPlayerByUsername(str); } public static void causeNauseaToPlayer(ItemStack stack) diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/APISpellHelper.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/APISpellHelper.java index ed3f65ad..00e46c22 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/APISpellHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/APISpellHelper.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -13,6 +14,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.IRecipe; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.BlockPos; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; @@ -230,7 +232,7 @@ public class APISpellHelper if (!world.isRemote && player instanceof EntityPlayer) d1 += 1.62D; double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f; - Vec3 vec3 = APISpellHelper.createVec3(d0, d1, d2); + Vec3 vec3 = new Vec3(d0, d1, d2); float f3 = MathHelper.cos(-f2 * 0.017453292F - (float) Math.PI); float f4 = MathHelper.sin(-f2 * 0.017453292F - (float) Math.PI); float f5 = -MathHelper.cos(-f1 * 0.017453292F); @@ -242,56 +244,33 @@ public class APISpellHelper // d3 = ((EntityPlayerMP) player).theItemInWorldManager.getBlockReachDistance(); } Vec3 vec31 = vec3.addVector((double) f7 * range, (double) f6 * range, (double) f8 * range); - return world.func_147447_a(vec3, vec31, par3, !par3, par3); + return world.rayTraceBlocks(vec3, vec31, par3, !par3, par3); } - public static Vec3 createVec3(double x, double y, double z) - { - return Vec3.createVectorHelper(x, y, z); - } - - public static List<ItemStack> getItemsFromBlock(World world, Block block, int x, int y, int z, int meta, boolean silkTouch, int fortune) + public static List<ItemStack> getItemsFromBlock(World world, BlockPos pos, Block block, IBlockState state, boolean silkTouch, int fortune) { - boolean canSilk = block.canSilkHarvest(world, null, x, y, z, meta); + boolean canSilk = block.canSilkHarvest(world, pos, state, null); //Null player if (canSilk && silkTouch) { ArrayList<ItemStack> items = new ArrayList<ItemStack>(); - ItemStack item = createStackedBlock(block, meta); - + ItemStack item = new ItemStack(block, 1, block.getMetaFromState(state)); + items.add(item); return items; } else { - return block.getDrops(world, x, y, z, meta, fortune); + return block.getDrops(world, pos, state, fortune); } } - public static ItemStack createStackedBlock(Block block, int meta) - { - int j = 0; - if(block == Blocks.lit_redstone_ore) - { - block = Blocks.redstone_ore; - } - - Item item = Item.getItemFromBlock(block); - - if (item != null && item.getHasSubtypes()) - { - j = meta; - } - - return new ItemStack(item, 1, j); - } - public static void spawnItemListInWorld(List<ItemStack> items, World world, float x, float y, float z) { for (ItemStack stack : items) { EntityItem itemEntity = new EntityItem(world, x, y, z, stack); - itemEntity.delayBeforeCanPickup = 10; + itemEntity.setDefaultPickupDelay(); world.spawnEntityInWorld(itemEntity); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java index 51657249..243349ab 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java @@ -6,13 +6,17 @@ import java.util.LinkedList; import java.util.List; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.IProjectile; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; @@ -58,7 +62,6 @@ public class EntitySpellProjectile extends Entity implements IProjectile super(par1World); this.setSize(0.5F, 0.5F); this.setPosition(par2, par4, par6); - yOffset = 0.0F; } public EntitySpellProjectile(World par1World, EntityPlayer par2EntityPlayer) @@ -72,7 +75,6 @@ public class EntitySpellProjectile extends Entity implements IProjectile posY -= 0.2D; posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; this.setPosition(posX, posY, posZ); - yOffset = 0.0F; motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); @@ -111,18 +113,6 @@ public class EntitySpellProjectile extends Entity implements IProjectile prevRotationPitch = rotationPitch = (float) (Math.atan2(var3, var10) * 180.0D / Math.PI); } - @Override - @SideOnly(Side.CLIENT) - /** - * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, - * posY, posZ, yaw, pitch - */ - public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) - { - this.setPosition(par1, par3, par5); - this.setRotation(par7, par8); - } - @Override @SideOnly(Side.CLIENT) /** @@ -158,7 +148,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile } if (shootingEntity == null) { - List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(posX - 1, posY - 1, posZ - 1, posX + 1, posY + 1, posZ + 1)); + List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(posX - 1, posY - 1, posZ - 1, posX + 1, posY + 1, posZ + 1)); Iterator i = players.iterator(); double closestDistance = Double.MAX_VALUE; EntityPlayer closestPlayer = null; @@ -182,14 +172,15 @@ public class EntitySpellProjectile extends Entity implements IProjectile prevRotationYaw = rotationYaw = (float) (Math.atan2(motionX, motionZ) * 180.0D / Math.PI); prevRotationPitch = rotationPitch = (float) (Math.atan2(motionY, var1) * 180.0D / Math.PI); } - Block var16 = worldObj.getBlock(xTile, yTile, zTile); + IBlockState state = worldObj.getBlockState(new BlockPos(xTile, yTile, zTile)); + Block var16 = state.getBlock(); if (var16 != null) { - var16.setBlockBoundsBasedOnState(worldObj, xTile, yTile, zTile); - AxisAlignedBB var2 = var16.getCollisionBoundingBoxFromPool(worldObj, xTile, yTile, zTile); + var16.setBlockBoundsBasedOnState(worldObj, new BlockPos(xTile, yTile, zTile)); + AxisAlignedBB var2 = var16.getCollisionBoundingBox(worldObj, new BlockPos(xTile, yTile, zTile), state); - if (var2 != null && var2.isVecInside(APISpellHelper.createVec3(posX, posY, posZ))) + if (var2 != null && var2.isVecInside(new Vec3(posX, posY, posZ))) { inGround = true; } @@ -197,14 +188,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile if (inGround) { - Block var18 = worldObj.getBlock(xTile, yTile, zTile); - int var19 = worldObj.getBlockMetadata(xTile, yTile, zTile); -// if (var18.equals(Block.getBlockById(inTile)) && var19 == inData) - { - // this.groundImpact(); - // this.setDead(); - } } else { ++ticksInAir; @@ -218,19 +202,19 @@ public class EntitySpellProjectile extends Entity implements IProjectile } } - Vec3 var17 = APISpellHelper.createVec3(posX, posY, posZ); - Vec3 var3 = APISpellHelper.createVec3(posX + motionX, posY + motionY, posZ + motionZ); - MovingObjectPosition var4 = worldObj.func_147447_a(var17, var3, true, false, false); - var17 = APISpellHelper.createVec3(posX, posY, posZ); - var3 = APISpellHelper.createVec3(posX + motionX, posY + motionY, posZ + motionZ); + Vec3 var17 = new Vec3(posX, posY, posZ); + Vec3 var3 = new Vec3(posX + motionX, posY + motionY, posZ + motionZ); + MovingObjectPosition var4 = worldObj.rayTraceBlocks(var17, var3, true, false, false); + var17 = new Vec3(posX, posY, posZ); + var3 = new Vec3(posX + motionX, posY + motionY, posZ + motionZ); if (var4 != null) { - var3 = APISpellHelper.createVec3(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord); + var3 = new Vec3(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord); } Entity var5 = null; - List var6 = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); + List var6 = worldObj.getEntitiesWithinAABBExcludingEntity(this, getBoundingBox().addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); double var7 = 0.0D; Iterator var9 = var6.iterator(); float var11; @@ -242,7 +226,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile if (var10.canBeCollidedWith() && (var10 != shootingEntity || ticksInAir >= 5)) { var11 = 0.3F; - AxisAlignedBB var12 = var10.boundingBox.expand(var11, var11, var11); + AxisAlignedBB var12 = var10.getBoundingBox().expand(var11, var11, var11); MovingObjectPosition var13 = var12.calculateIntercept(var17, var3); if (var13 != null) @@ -287,14 +271,14 @@ public class EntitySpellProjectile extends Entity implements IProjectile if (ticksInAir % 3 == 0) { double gauss = gaussian(1.0F); - worldObj.spawnParticle("mobSpell", posX, posY, posZ, gauss, gauss, 0.0F); + worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB, posX, posY, posZ, gauss, gauss, 0.0F); } } private void doFiringParticles() { - worldObj.spawnParticle("mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - worldObj.spawnParticle("flame", posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); + worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + worldObj.spawnParticle(EnumParticleTypes.FLAME, posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); } /** @@ -317,17 +301,6 @@ public class EntitySpellProjectile extends Entity implements IProjectile effectList.appendTag(eff.getTag()); } -// for (String str : this.effectList) -// { -// if (str != null) -// { -// NBTTagCompound tag = new NBTTagCompound(); -// -// tag.setString("Class", str); -// effectList.appendTag(tag); -// } -// } - par1NBTTagCompound.setTag("Effects", effectList); par1NBTTagCompound.setInteger("blocksBroken", blocksBroken); par1NBTTagCompound.setBoolean("isSilkTouch", isSilkTouch); @@ -388,13 +361,6 @@ public class EntitySpellProjectile extends Entity implements IProjectile return false; } - @Override - @SideOnly(Side.CLIENT) - public float getShadowSize() - { - return 0.0F; - } - /** * Sets the amount of knockback the arrow applies when it hits a mob. */ @@ -448,7 +414,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile { if (!this.penetration) { - this.groundImpact(mop.sideHit); + this.groundImpact(mop.field_178784_b); this.performTileImpactEffects(mop); } } @@ -473,7 +439,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile { for (int particles = 0; particles < i; particles++) { - worldObj.spawnParticle("mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), posGauss(1.0F), posGauss(1.0F), 0.0F); + worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), posGauss(1.0F), posGauss(1.0F), 0.0F); } } @@ -487,7 +453,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile return DamageSource.causePlayerDamage(shootingEntity); } - private void groundImpact(int sideHit) + private void groundImpact(EnumFacing sideHit) { this.ricochet(sideHit); } @@ -507,22 +473,22 @@ public class EntitySpellProjectile extends Entity implements IProjectile return d + d * ((rand.nextFloat() - 0.5D) / 4); } - private void ricochet(int sideHit) + private void ricochet(EnumFacing sideHit) { switch (sideHit) { - case 0: - case 1: + case UP: + case DOWN: // topHit, bottomHit, reflect Y motionY = motionY * -1; break; - case 2: - case 3: + case WEST: + case EAST: // westHit, eastHit, reflect Z motionZ = motionZ * -1; break; - case 4: - case 5: + case SOUTH: + case NORTH: // southHit, northHit, reflect X motionX = motionX * -1; break; @@ -535,23 +501,23 @@ public class EntitySpellProjectile extends Entity implements IProjectile { switch (sideHit) { - case 0: - worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), -gaussian(0.1D), gaussian(0.1D)); + case UP: + worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), -gaussian(0.1D), gaussian(0.1D)); break; - case 1: - worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); + case DOWN: + worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); break; - case 2: - worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), -gaussian(0.1D)); + case NORTH: + worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), -gaussian(0.1D)); break; - case 3: - worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); + case SOUTH: + worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); break; - case 4: - worldObj.spawnParticle("smoke", posX, posY, posZ, -gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); + case WEST: + worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, -gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); break; - case 5: - worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); + case EAST: + worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); break; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ExtrapolatedMeleeEntityEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ExtrapolatedMeleeEntityEffect.java index 03929374..b5c58751 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ExtrapolatedMeleeEntityEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ExtrapolatedMeleeEntityEffect.java @@ -35,7 +35,7 @@ public abstract class ExtrapolatedMeleeEntityEffect implements IMeleeSpellEntity double y = entityPlayer.posY + entityPlayer.getEyeHeight() + lookVec.yCoord; double z = entityPlayer.posZ + lookVec.zCoord; - List<Entity> entities = world.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(x - 0.5f, y - 0.5f, z - 0.5f, x + 0.5f, y + 0.5f, z + 0.5f).expand(radius, radius, radius)); + List<Entity> entities = world.getEntitiesWithinAABB(Entity.class, new AxisAlignedBB(x - 0.5f, y - 0.5f, z - 0.5f, x + 0.5f, y + 0.5f, z + 0.5f).expand(radius, radius, radius)); int hit = 0; if (entities != null) diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnBreakBlock.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnBreakBlock.java index 6c10f6c3..6c8fbaa7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnBreakBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnBreakBlock.java @@ -1,12 +1,14 @@ package WayofTime.alchemicalWizardry.api.spell; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; public interface IOnBreakBlock { - int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, int meta, int x, int y, int z, ForgeDirection sideBroken); + int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, IBlockState state, BlockPos pos, EnumFacing sideBroken); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellCenteredWorldEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellCenteredWorldEffect.java index 68ec0133..bccfe653 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellCenteredWorldEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellCenteredWorldEffect.java @@ -1,6 +1,8 @@ package WayofTime.alchemicalWizardry.api.spell; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.BlockPos; +import net.minecraft.util.MathHelper; import net.minecraft.util.Vec3; import net.minecraft.world.World; @@ -17,11 +19,12 @@ public abstract class MeleeSpellCenteredWorldEffect extends MeleeSpellWorldEffec public void onWorldEffect(World world, EntityPlayer entityPlayer) { Vec3 lookVec = entityPlayer.getLook(range).normalize(); - int x = (int) (entityPlayer.posX + lookVec.xCoord * range); - int y = (int) (entityPlayer.posY + entityPlayer.getEyeHeight() + lookVec.yCoord * range); - int z = (int) (entityPlayer.posZ + lookVec.zCoord * range); + + int x = MathHelper.floor_double(entityPlayer.posX + lookVec.xCoord * range); + int y = MathHelper.floor_double(entityPlayer.posY + entityPlayer.getEyeHeight() + lookVec.yCoord * range); + int z = MathHelper.floor_double(entityPlayer.posZ + lookVec.zCoord * range); - this.onCenteredWorldEffect(entityPlayer, world, x, y, z); + this.onCenteredWorldEffect(entityPlayer, world, new BlockPos(x, y, z)); } public void setRange(float range) @@ -29,5 +32,5 @@ public abstract class MeleeSpellCenteredWorldEffect extends MeleeSpellWorldEffec this.range = range; } - public abstract void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ); + public abstract void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmTool.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmTool.java index e407ef24..137742c6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmTool.java @@ -7,14 +7,16 @@ import java.util.Map.Entry; import java.util.Set; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; @@ -337,12 +339,12 @@ public class SpellParadigmTool extends SpellParadigm return total; } - public int onBreakBlock(ItemStack container, World world, EntityPlayer player, Block block, int meta, int x, int y, int z, ForgeDirection sideBroken) + public int onBreakBlock(ItemStack container, World world, EntityPlayer player, Block block, IBlockState state, BlockPos pos, EnumFacing sideBroken) { int total = 0; for (IOnBreakBlock effect : this.breakBlockEffectList) { - total += effect.onBlockBroken(container, world, player, block, meta, x, y, z, sideBroken); + total += effect.onBlockBroken(container, world, player, block, state, pos, sideBroken); } return total; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellTile.java b/src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellTile.java index c5d868e0..ac47e535 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellTile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellTile.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.api.tile; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; public interface ISpellTile { void modifySpellParadigm(SpellParadigm parad); - boolean canInputRecieveOutput(ForgeDirection output); + boolean canInputRecieveOutput(EnumFacing output); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/ClientEventHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/ClientEventHandler.java index b99319df..ee938546 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/ClientEventHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/ClientEventHandler.java @@ -1,55 +1,23 @@ package WayofTime.alchemicalWizardry.client; import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.event.RenderBlockOverlayEvent; -import net.minecraftforge.client.event.RenderHandEvent; import net.minecraftforge.client.event.sound.SoundEvent; +import net.minecraftforge.fml.client.FMLClientHandler; +import net.minecraftforge.fml.common.eventhandler.Event.Result; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.common.gameevent.InputEvent; +import net.minecraftforge.fml.common.gameevent.TickEvent.Phase; +import net.minecraftforge.fml.common.gameevent.TickEvent.RenderTickEvent; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.client.renderer.RenderHelper; -import cpw.mods.fml.client.FMLClientHandler; -import cpw.mods.fml.common.eventhandler.Event.Result; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.InputEvent; -import cpw.mods.fml.common.gameevent.TickEvent.Phase; -import cpw.mods.fml.common.gameevent.TickEvent.RenderTickEvent; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + public class ClientEventHandler { - private Minecraft mc = FMLClientHandler.instance().getClient(); - - public static ResourceLocation currentPlayerTexture = null; + private Minecraft mcClient = FMLClientHandler.instance().getClient(); - @SideOnly(Side.CLIENT) - @SubscribeEvent - public void renderPOVArmour(RenderHandEvent event) - { - if (this.mc.thePlayer.worldObj.isRemote && this.mc.gameSettings.thirdPersonView == 0 && !this.mc.renderViewEntity.isPlayerSleeping() && !this.mc.gameSettings.hideGUI && !this.mc.playerController.enableEverythingIsScrewedUpMode()) - { - currentPlayerTexture = ((AbstractClientPlayer) mc.thePlayer).getLocationSkin(); - - ClientUtils.renderPlayerArmourInPOV(mc.thePlayer, event.partialTicks); - event.setCanceled(true); - } - } - -// @SubscribeEvent(priority = EventPriority.LOWEST) -// public void onPlayerRenderTick(RenderPlayerEvent.Pre event) -// { -// ModelBiped model = ((BoundArmour)ModItems.boundPlate).getArmorModel(event.entityPlayer, new ItemStack(ModItems.boundPlate), 2); -// String texture = ((BoundArmour)ModItems.boundPlate).getArmorTexture(new ItemStack(ModItems.boundPlate), event.entityPlayer, 2, ""); -// -// ResourceLocation resourcelocation = new ResourceLocation(texture); -// event.renderer.modelBipedMain.bipedBody.addChild(model.bipedBody); -// Minecraft.getMinecraft().renderEngine.bindTexture(resourcelocation); -// -// } - @SubscribeEvent public void onKeyInput(InputEvent.KeyInputEvent event) { @@ -98,7 +66,7 @@ public class ClientEventHandler if (event.phase.equals(Phase.START)) return; - if (!RenderHelper.onTickInGame(mc)) +// if (!RenderHelper.onTickInGame(mcClient)) { } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java b/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java index 9c1112ff..5f1075af 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.client; +import WayofTime.alchemicalWizardry.common.thread.GAPIChecker; import net.minecraft.item.ItemBlock; import net.minecraft.world.World; import net.minecraftforge.client.MinecraftForgeClient; import net.minecraftforge.common.MinecraftForge; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; import WayofTime.alchemicalWizardry.client.renderer.RitualDivinerRender; @@ -50,6 +50,7 @@ import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellEnhancement import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellModifierBlock; import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellParadigmBlock; import WayofTime.alchemicalWizardry.common.renderer.block.RenderWritingTable; +import WayofTime.alchemicalWizardry.common.renderer.block.ShaderHelper; import WayofTime.alchemicalWizardry.common.renderer.block.TEAltarRenderer; import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEAlchemicalCalcinatorItemRenderer; import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEAltarItemRenderer; @@ -84,7 +85,6 @@ import WayofTime.alchemicalWizardry.common.renderer.model.ModelWingedFireDemon; import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBazookaMainProjectile; import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBlastProjectile; import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderMeteor; -import WayofTime.alchemicalWizardry.common.thread.GAPIChecker; import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; @@ -159,10 +159,7 @@ public class ClientProxy extends CommonProxy ClientRegistry.bindTileEntitySpecialRenderer(TESpellParadigmBlock.class, new RenderSpellParadigmBlock()); ClientRegistry.bindTileEntitySpecialRenderer(TESpellModifierBlock.class, new RenderSpellModifierBlock()); ClientRegistry.bindTileEntitySpecialRenderer(TEReagentConduit.class, new RenderReagentConduit()); - if (AlchemicalWizardry.displayRitualAnimation) - { - ClientRegistry.bindTileEntitySpecialRenderer(TEMasterStone.class, new RenderMasterStone()); - } + ClientRegistry.bindTileEntitySpecialRenderer(TEMasterStone.class, new RenderMasterStone()); ClientRegistry.bindTileEntitySpecialRenderer(TEAlchemicCalcinator.class, new RenderAlchemicCalcinator()); ClientRegistry.bindTileEntitySpecialRenderer(TEBellJar.class, new RenderCrystalBelljar()); @@ -174,6 +171,7 @@ public class ClientProxy extends CommonProxy MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellModifier), new TESpellModifierBlockItemRenderer()); MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockAlchemicCalcinator), new TEAlchemicalCalcinatorItemRenderer()); MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockCrystalBelljar), new TEBellJarItemRenderer()); + ShaderHelper.initShaders(); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/ClientUtils.java b/src/main/java/WayofTime/alchemicalWizardry/client/ClientUtils.java deleted file mode 100644 index b7474db3..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/client/ClientUtils.java +++ /dev/null @@ -1,348 +0,0 @@ -package WayofTime.alchemicalWizardry.client; - -import static net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON; -import static net.minecraftforge.client.IItemRenderer.ItemRenderType.FIRST_PERSON_MAP; -import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.EntityClientPlayerMP; -import net.minecraft.client.entity.EntityPlayerSP; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.client.renderer.OpenGlHelper; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.client.renderer.entity.RenderPlayer; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumAction; -import net.minecraft.item.ItemCloth; -import net.minecraft.item.ItemMap; -import net.minecraft.item.ItemStack; -import net.minecraft.util.MathHelper; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.storage.MapData; -import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.MinecraftForgeClient; - -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; - -public class ClientUtils -{ - public static Minecraft mc = Minecraft.getMinecraft(); - - private static final ResourceLocation RES_MAP_BACKGROUND = new ResourceLocation("textures/map/map_background.png"); - - public static void renderPlayerArmourInPOV(EntityPlayer player, float partialTickTime) - { - GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT); - float f1 = 1.0f;//this.prevEquippedProgress + (this.equippedProgress - this.prevEquippedProgress) * partialTickTime; - EntityClientPlayerMP entityclientplayermp = mc.thePlayer; - float f2 = entityclientplayermp.prevRotationPitch + (entityclientplayermp.rotationPitch - entityclientplayermp.prevRotationPitch) * partialTickTime; -// GL11.glPushMatrix(); - GL11.glRotatef(180 - (entityclientplayermp.prevRotationYaw + (entityclientplayermp.rotationYaw - entityclientplayermp.prevRotationYaw) * partialTickTime), 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-f2, 1.0F, 0.0F, 0.0F); - RenderHelper.enableStandardItemLighting(); -// GL11.glPopMatrix(); - EntityPlayerSP entityplayersp = (EntityPlayerSP)entityclientplayermp; - float f3 = entityplayersp.prevRenderArmPitch + (entityplayersp.renderArmPitch - entityplayersp.prevRenderArmPitch) * partialTickTime; - float f4 = entityplayersp.prevRenderArmYaw + (entityplayersp.renderArmYaw - entityplayersp.prevRenderArmYaw) * partialTickTime; - GL11.glRotatef((entityclientplayermp.rotationPitch - f3) * 0.1F, 1.0F, 0.0F, 0.0F); - GL11.glRotatef((entityclientplayermp.rotationYaw - f4) * 0.1F, 0.0F, 1.0F, 0.0F); - ItemStack itemstack = player.getCurrentEquippedItem(); - - if (itemstack != null && itemstack.getItem() instanceof ItemCloth) - { - GL11.glEnable(GL11.GL_BLEND); - OpenGlHelper.glBlendFunc(770, 771, 1, 0); - } - - int i = mc.theWorld.getLightBrightnessForSkyBlocks(MathHelper.floor_double(entityclientplayermp.posX), MathHelper.floor_double(entityclientplayermp.posY), MathHelper.floor_double(entityclientplayermp.posZ), 0); - int j = i % 65536; - int k = i / 65536; - OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - float f5; - float f6; - float f7; - - if (itemstack != null) - { - int l = itemstack.getItem().getColorFromItemStack(itemstack, 0); - f5 = (float)(l >> 16 & 255) / 255.0F; - f6 = (float)(l >> 8 & 255) / 255.0F; - f7 = (float)(l & 255) / 255.0F; - GL11.glColor4f(f5, f6, f7, 1.0F); - } - else - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - } - - float f8; - float f9; - float f10; - float f13; - Render render; - RenderPlayer renderplayer; - - - if (itemstack != null && itemstack.getItem() instanceof ItemMap) - { - GL11.glPushMatrix(); - f13 = 0.8F; - f5 = entityclientplayermp.getSwingProgress(partialTickTime); - f6 = MathHelper.sin(f5 * (float)Math.PI); - f7 = MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI); - GL11.glTranslatef(-f7 * 0.4F, MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI * 2.0F) * 0.2F, -f6 * 0.2F); - f5 = 1.0F - f2 / 45.0F + 0.1F; - - if (f5 < 0.0F) - { - f5 = 0.0F; - } - - if (f5 > 1.0F) - { - f5 = 1.0F; - } - - f5 = -MathHelper.cos(f5 * (float)Math.PI) * 0.5F + 0.5F; - GL11.glTranslatef(0.0F, 0.0F * f13 - (1.0F - f1) * 1.2F - f5 * 0.5F + 0.04F, -0.9F * f13); - GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(f5 * -85.0F, 0.0F, 0.0F, 1.0F); - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - mc.getTextureManager().bindTexture(entityclientplayermp.getLocationSkin()); - - for (int i1 = 0; i1 < 2; ++i1) - { - int j1 = i1 * 2 - 1; - GL11.glPushMatrix(); - GL11.glTranslatef(-0.0F, -0.6F, 1.1F * (float)j1); - GL11.glRotatef((float)(-45 * j1), 1.0F, 0.0F, 0.0F); - GL11.glRotatef(-90.0F, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(59.0F, 0.0F, 0.0F, 1.0F); - GL11.glRotatef((float)(-65 * j1), 0.0F, 1.0F, 0.0F); - render = RenderManager.instance.getEntityRenderObject(mc.thePlayer); - renderplayer = (RenderPlayer)render; - f10 = 1.0F; - GL11.glScalef(f10, f10, f10); - renderFirstPersonArm(renderplayer, mc.thePlayer); - GL11.glPopMatrix(); - } - - f6 = entityclientplayermp.getSwingProgress(partialTickTime); - f7 = MathHelper.sin(f6 * f6 * (float)Math.PI); - f8 = MathHelper.sin(MathHelper.sqrt_float(f6) * (float)Math.PI); - GL11.glRotatef(-f7 * 20.0F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-f8 * 20.0F, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(-f8 * 80.0F, 1.0F, 0.0F, 0.0F); - f9 = 0.38F; - GL11.glScalef(f9, f9, f9); - GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); - GL11.glTranslatef(-1.0F, -1.0F, 0.0F); - f10 = 0.015625F; - GL11.glScalef(f10, f10, f10); - mc.getTextureManager().bindTexture(RES_MAP_BACKGROUND); - Tessellator tessellator = Tessellator.instance; - GL11.glNormal3f(0.0F, 0.0F, -1.0F); - tessellator.startDrawingQuads(); - byte b0 = 7; - tessellator.addVertexWithUV((double)(0 - b0), (double)(128 + b0), 0.0D, 0.0D, 1.0D); - tessellator.addVertexWithUV((double)(128 + b0), (double)(128 + b0), 0.0D, 1.0D, 1.0D); - tessellator.addVertexWithUV((double)(128 + b0), (double)(0 - b0), 0.0D, 1.0D, 0.0D); - tessellator.addVertexWithUV((double)(0 - b0), (double)(0 - b0), 0.0D, 0.0D, 0.0D); - tessellator.draw(); - - IItemRenderer custom = MinecraftForgeClient.getItemRenderer(itemstack, FIRST_PERSON_MAP); - MapData mapdata = ((ItemMap)itemstack.getItem()).getMapData(itemstack, mc.theWorld); - - if (custom == null) - { - if (mapdata != null) - { - mc.entityRenderer.getMapItemRenderer().func_148250_a(mapdata, false); - } - } - else - { - custom.renderItem(FIRST_PERSON_MAP, itemstack, mc.thePlayer, mc.getTextureManager(), mapdata); - } - - GL11.glPopMatrix(); - } - else if (itemstack != null) - { - GL11.glPushMatrix(); - f13 = 0.8F; - - if (entityclientplayermp.getItemInUseCount() > 0) - { - EnumAction enumaction = itemstack.getItemUseAction(); - - if (enumaction == EnumAction.eat || enumaction == EnumAction.drink) - { - f6 = (float)entityclientplayermp.getItemInUseCount() - partialTickTime + 1.0F; - f7 = 1.0F - f6 / (float)itemstack.getMaxItemUseDuration(); - f8 = 1.0F - f7; - f8 = f8 * f8 * f8; - f8 = f8 * f8 * f8; - f8 = f8 * f8 * f8; - f9 = 1.0F - f8; - GL11.glTranslatef(0.0F, MathHelper.abs(MathHelper.cos(f6 / 4.0F * (float)Math.PI) * 0.1F) * (float)((double)f7 > 0.2D ? 1 : 0), 0.0F); - GL11.glTranslatef(f9 * 0.6F, -f9 * 0.5F, 0.0F); - GL11.glRotatef(f9 * 90.0F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(f9 * 10.0F, 1.0F, 0.0F, 0.0F); - GL11.glRotatef(f9 * 30.0F, 0.0F, 0.0F, 1.0F); - } - } - else - { - f5 = entityclientplayermp.getSwingProgress(partialTickTime); - f6 = MathHelper.sin(f5 * (float)Math.PI); - f7 = MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI); - GL11.glTranslatef(-f7 * 0.4F, MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI * 2.0F) * 0.2F, -f6 * 0.2F); - } - - GL11.glTranslatef(0.7F * f13, -0.65F * f13 - (1.0F - f1) * 0.6F, -0.9F * f13); - GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - f5 = entityclientplayermp.getSwingProgress(partialTickTime); - f6 = MathHelper.sin(f5 * f5 * (float)Math.PI); - f7 = MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI); - GL11.glRotatef(-f6 * 20.0F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-f7 * 20.0F, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(-f7 * 80.0F, 1.0F, 0.0F, 0.0F); - f8 = 0.4F; - GL11.glScalef(f8, f8, f8); - float f11; - float f12; - - if (entityclientplayermp.getItemInUseCount() > 0) - { - EnumAction enumaction1 = itemstack.getItemUseAction(); - - if (enumaction1 == EnumAction.block) - { - GL11.glTranslatef(-0.5F, 0.2F, 0.0F); - GL11.glRotatef(30.0F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-80.0F, 1.0F, 0.0F, 0.0F); - GL11.glRotatef(60.0F, 0.0F, 1.0F, 0.0F); - } - else if (enumaction1 == EnumAction.bow) - { - GL11.glRotatef(-18.0F, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(-12.0F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-8.0F, 1.0F, 0.0F, 0.0F); - GL11.glTranslatef(-0.9F, 0.2F, 0.0F); - f10 = (float)itemstack.getMaxItemUseDuration() - ((float)entityclientplayermp.getItemInUseCount() - partialTickTime + 1.0F); - f11 = f10 / 20.0F; - f11 = (f11 * f11 + f11 * 2.0F) / 3.0F; - - if (f11 > 1.0F) - { - f11 = 1.0F; - } - - if (f11 > 0.1F) - { - GL11.glTranslatef(0.0F, MathHelper.sin((f10 - 0.1F) * 1.3F) * 0.01F * (f11 - 0.1F), 0.0F); - } - - GL11.glTranslatef(0.0F, 0.0F, f11 * 0.1F); - GL11.glRotatef(-335.0F, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(-50.0F, 0.0F, 1.0F, 0.0F); - GL11.glTranslatef(0.0F, 0.5F, 0.0F); - f12 = 1.0F + f11 * 0.2F; - GL11.glScalef(1.0F, 1.0F, f12); - GL11.glTranslatef(0.0F, -0.5F, 0.0F); - GL11.glRotatef(50.0F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(335.0F, 0.0F, 0.0F, 1.0F); - } - } - - if (itemstack.getItem().shouldRotateAroundWhenRendering()) - { - GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F); - } - - if (itemstack.getItem().requiresMultipleRenderPasses()) - { - RenderManager.instance.itemRenderer.renderItem(entityclientplayermp, itemstack, 0, EQUIPPED_FIRST_PERSON); - for (int x = 1; x < itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); x++) - { - int k1 = itemstack.getItem().getColorFromItemStack(itemstack, x); - f10 = (float)(k1 >> 16 & 255) / 255.0F; - f11 = (float)(k1 >> 8 & 255) / 255.0F; - f12 = (float)(k1 & 255) / 255.0F; - GL11.glColor4f(1.0F * f10, 1.0F * f11, 1.0F * f12, 1.0F); - RenderManager.instance.itemRenderer.renderItem(entityclientplayermp, itemstack, x, EQUIPPED_FIRST_PERSON); - } - } - else - { - RenderManager.instance.itemRenderer.renderItem(entityclientplayermp, itemstack, 0, EQUIPPED_FIRST_PERSON); - } - - GL11.glPopMatrix(); - } - else if (!entityclientplayermp.isInvisible()) - { - GL11.glPushMatrix(); - f13 = 0.8F; - f5 = entityclientplayermp.getSwingProgress(partialTickTime); - f6 = MathHelper.sin(f5 * (float)Math.PI); - f7 = MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI); - GL11.glTranslatef(-f7 * 0.3F, MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI * 2.0F) * 0.4F, -f6 * 0.4F); - GL11.glTranslatef(0.8F * f13, -0.75F * f13 - (1.0F - f1) * 0.6F, -0.9F * f13); - GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - f5 = entityclientplayermp.getSwingProgress(partialTickTime); - f6 = MathHelper.sin(f5 * f5 * (float)Math.PI); - f7 = MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI); - GL11.glRotatef(f7 * 70.0F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-f6 * 20.0F, 0.0F, 0.0F, 1.0F); - mc.getTextureManager().bindTexture(entityclientplayermp.getLocationSkin()); - GL11.glTranslatef(-1.0F, 3.6F, 3.5F); - GL11.glRotatef(120.0F, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(200.0F, 1.0F, 0.0F, 0.0F); - GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F); - GL11.glScalef(1.0F, 1.0F, 1.0F); - GL11.glTranslatef(5.6F, 0.0F, 0.0F); - render = RenderManager.instance.getEntityRenderObject(mc.thePlayer); - renderplayer = (RenderPlayer)render; - f10 = 1.0F; - GL11.glScalef(f10, f10, f10); - renderFirstPersonArm(renderplayer, mc.thePlayer); - GL11.glPopMatrix(); - } - - if (itemstack != null && itemstack.getItem() instanceof ItemCloth) - { - GL11.glDisable(GL11.GL_BLEND); - } - - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - RenderHelper.disableStandardItemLighting(); - } - - public static void renderFirstPersonArm(RenderPlayer renderer, EntityPlayer player) - { - float f = 1.0F; - GL11.glColor3f(f, f, f); - - GL11.glPushMatrix(); - ModelRenderer mRenderer = new POVArmourModelWrapper(renderer.modelBipedMain); - renderer.modelBipedMain.onGround = 0.0F; - renderer.modelBipedMain.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, player); - renderer.modelBipedMain.bipedRightArm.render(0.0625F); - - GL11.glPushMatrix(); - mRenderer.rotateAngleX = renderer.modelBipedMain.bipedRightArm.rotateAngleX; - mRenderer.rotateAngleY = renderer.modelBipedMain.bipedRightArm.rotateAngleY; - mRenderer.rotateAngleZ = renderer.modelBipedMain.bipedRightArm.rotateAngleZ; - mRenderer.render(0.0625F); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/KeyBindings.java b/src/main/java/WayofTime/alchemicalWizardry/client/KeyBindings.java index 2c924ac1..b381ed70 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/KeyBindings.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/KeyBindings.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.client; -import net.minecraft.client.settings.KeyBinding; public class KeyBindings { diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/POVArmourModelWrapper.java b/src/main/java/WayofTime/alchemicalWizardry/client/POVArmourModelWrapper.java deleted file mode 100644 index 1355fdac..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/client/POVArmourModelWrapper.java +++ /dev/null @@ -1,47 +0,0 @@ -package WayofTime.alchemicalWizardry.client; - -import org.lwjgl.opengl.GL11; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class POVArmourModelWrapper extends ModelRenderer -{ - private final ModelRenderer armModel; - private final ResourceLocation resource; - - public POVArmourModelWrapper(ModelBase model) - { - super(model); - ItemStack plateStack = new ItemStack(ModItems.boundPlateFire); - ModelBiped bipedModel = ((BoundArmour)ModItems.boundPlateFire).getArmorModel(Minecraft.getMinecraft().thePlayer, plateStack, 1); - armModel = bipedModel.bipedRightArm; - resource = new ResourceLocation(((BoundArmour)ModItems.boundPlateFire).getArmorTexture(plateStack, Minecraft.getMinecraft().thePlayer, 1, "POV")); - addBox(0, 0, 0, 0, 0, 0); //Adds in a blank box as it's required in certain cases such as rendering arrows in entities - } - - @Override - public void render(float partialTicks) - { - GL11.glPushMatrix(); -// GL11.glTranslated(0.3, -.1, 0); - Minecraft.getMinecraft().renderEngine.bindTexture(resource); - armModel.rotateAngleX = this.rotateAngleX; - armModel.rotateAngleY = this.rotateAngleY; - armModel.rotateAngleZ = this.rotateAngleZ; - armModel.render(partialTicks); - - GL11.glPopMatrix(); - Minecraft.getMinecraft().renderEngine.bindTexture(ClientEventHandler.currentPlayerTexture); - - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGui.java b/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGui.java index f9299dec..0030115d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGui.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGui.java @@ -1,15 +1,15 @@ package WayofTime.alchemicalWizardry.client.gui; -import cpw.mods.fml.client.config.GuiConfig; -import cpw.mods.fml.client.config.IConfigElement; -import net.minecraft.client.gui.GuiScreen; -import net.minecraftforge.common.config.ConfigCategory; -import net.minecraftforge.common.config.ConfigElement; + +import static WayofTime.alchemicalWizardry.BloodMagicConfiguration.config; import java.util.ArrayList; import java.util.List; -import static WayofTime.alchemicalWizardry.BloodMagicConfiguration.config; +import net.minecraft.client.gui.GuiScreen; +import net.minecraftforge.common.config.ConfigElement; +import net.minecraftforge.fml.client.config.GuiConfig; +import net.minecraftforge.fml.client.config.IConfigElement; public class ConfigGui extends GuiConfig { @@ -22,16 +22,16 @@ public class ConfigGui extends GuiConfig { List<IConfigElement> list = new ArrayList<IConfigElement>(); // adds sections declared in ConfigHandler. toLowerCase() is used because the configuration class automatically does this, so must we. - list.add(new ConfigElement<ConfigCategory>(config.getCategory("clientsettings".toLowerCase()))); - list.add(new ConfigElement<ConfigCategory>(config.getCategory("dungeon loot chances".toLowerCase()))); - list.add(new ConfigElement<ConfigCategory>(config.getCategory("meteor".toLowerCase()))); - list.add(new ConfigElement<ConfigCategory>(config.getCategory("orecrushing".toLowerCase()))); - list.add(new ConfigElement<ConfigCategory>(config.getCategory("potion id".toLowerCase()))); - list.add(new ConfigElement<ConfigCategory>(config.getCategory("wellofsufferingblacklist".toLowerCase()))); - list.add(new ConfigElement<ConfigCategory>(config.getCategory("wimpysettings".toLowerCase()))); - list.add(new ConfigElement<ConfigCategory>(config.getCategory("ritual blacklist".toLowerCase()))); - list.add(new ConfigElement<ConfigCategory>(config.getCategory("teleposer blacklist".toLowerCase()))); - list.add(new ConfigElement<ConfigCategory>(config.getCategory("demon configs".toLowerCase()))); + list.add(new ConfigElement(config.getCategory("clientsettings".toLowerCase()))); + list.add(new ConfigElement(config.getCategory("dungeon loot chances".toLowerCase()))); + list.add(new ConfigElement(config.getCategory("meteor".toLowerCase()))); + list.add(new ConfigElement(config.getCategory("orecrushing".toLowerCase()))); + list.add(new ConfigElement(config.getCategory("potion id".toLowerCase()))); + list.add(new ConfigElement(config.getCategory("wellofsufferingblacklist".toLowerCase()))); + list.add(new ConfigElement(config.getCategory("wimpysettings".toLowerCase()))); + list.add(new ConfigElement(config.getCategory("ritual blacklist".toLowerCase()))); + list.add(new ConfigElement(config.getCategory("teleposer blacklist".toLowerCase()))); + list.add(new ConfigElement(config.getCategory("demon configs".toLowerCase()))); return list; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAlchemyRecipeHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAlchemyRecipeHandler.java index d06aded2..55608511 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAlchemyRecipeHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAlchemyRecipeHandler.java @@ -1,178 +1,178 @@ -package WayofTime.alchemicalWizardry.client.nei; - -import static WayofTime.alchemicalWizardry.client.nei.NEIConfig.bloodOrbs; - -import java.awt.Rectangle; -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiWritingTable; -import codechicken.nei.ItemList; -import codechicken.nei.NEIServerUtils; -import codechicken.nei.PositionedStack; -import codechicken.nei.recipe.TemplateRecipeHandler; - -/** - * NEI Alchemy Recipe Handler by joshie * - */ -public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler { - public class CachedAlchemyRecipe extends CachedRecipe { - public class BloodOrbs { - public PositionedStack stack; - - public BloodOrbs(ItemStack orb) { - this.stack = new PositionedStack(orb, 136, 47, false); - } - } - - ArrayList<BloodOrbs> orbs; - PositionedStack output; - List<PositionedStack> inputs; - int lp; - - public CachedAlchemyRecipe(AlchemyRecipe recipe, ItemStack orb) { - this(recipe); - this.orbs = new ArrayList<BloodOrbs>(); - orbs.add(new BloodOrbs(orb)); - } - - public CachedAlchemyRecipe(AlchemyRecipe recipe) { - List<PositionedStack> inputs = new ArrayList<PositionedStack>(); - ItemStack[] stacks = recipe.getRecipe(); - if (stacks.length > 0) inputs.add(new PositionedStack(stacks[0], 76, 3)); - if (stacks.length > 1) inputs.add(new PositionedStack(stacks[1], 51, 19)); - if (stacks.length > 2) inputs.add(new PositionedStack(stacks[2], 101, 19)); - if (stacks.length > 3) inputs.add(new PositionedStack(stacks[3], 64, 47)); - if (stacks.length > 4) inputs.add(new PositionedStack(stacks[4], 88, 47)); - this.inputs = inputs; - this.output = new PositionedStack(recipe.getResult(), 76, 25); - this.lp = recipe.getAmountNeeded() * 100; - this.orbs = new ArrayList<BloodOrbs>(); - for (Item orb : bloodOrbs) { - if (((IBloodOrb) orb).getOrbLevel() >= recipe.getOrbLevel()) { - orbs.add(new BloodOrbs(new ItemStack(orb))); - } - } - } - - @Override - public List<PositionedStack> getIngredients() { - return inputs; - } - - @Override - public PositionedStack getResult() { - return output; - } - - @Override - public PositionedStack getOtherStack() { - if (orbs == null || orbs.size() <= 0) return null; - return orbs.get((cycleticks / 48) % orbs.size()).stack; - } - } - - @Override - public TemplateRecipeHandler newInstance() { - for (ItemStack item : ItemList.items) { - if (item != null && item.getItem() instanceof IBloodOrb) { - bloodOrbs.add(item.getItem()); - } - } - - return super.newInstance(); - } - - @Override - public String getOverlayIdentifier() { - return "alchemicalwizardry.alchemy"; - } - - @Override - public void loadTransferRects() { - transferRects.add(new RecipeTransferRect(new Rectangle(134, 22, 16, 24), "alchemicalwizardry.alchemy")); - } - - @Override - public Class<? extends GuiContainer> getGuiClass() { - return GuiWritingTable.class; - } - - @Override - public void loadCraftingRecipes(String outputId, Object... results) { - if (outputId.equals("alchemicalwizardry.alchemy") && getClass() == NEIAlchemyRecipeHandler.class) { - for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) { - if (recipe.getResult() != null) arecipes.add(new CachedAlchemyRecipe(recipe)); - } - } else { - super.loadCraftingRecipes(outputId, results); - } - } - - @Override - public void loadCraftingRecipes(ItemStack result) { - for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) { - if (recipe == null) continue; - if (NEIServerUtils.areStacksSameTypeCrafting(result, recipe.getResult())) { - arecipes.add(new CachedAlchemyRecipe(recipe)); - } - } - } - - @Override - public void loadUsageRecipes(ItemStack ingredient) { - if (ingredient.getItem() instanceof IBloodOrb) { - for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) { - if (recipe == null) continue; - if (((IBloodOrb) ingredient.getItem()).getOrbLevel() >= recipe.getOrbLevel()) { - arecipes.add(new CachedAlchemyRecipe(recipe, ingredient)); - } - } - } else { - for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) { - if (recipe == null) continue; - ItemStack[] stacks = recipe.getRecipe(); - for (ItemStack stack : stacks) { - if (NEIServerUtils.areStacksSameTypeCrafting(stack, ingredient)) { - arecipes.add(new CachedAlchemyRecipe(recipe)); - break; - } - } - } - } - } - - @Override - public void drawExtras(int id) { - CachedAlchemyRecipe cache = (CachedAlchemyRecipe) arecipes.get(id); - Minecraft.getMinecraft().fontRenderer.drawString("\u00a77" + cache.lp + "LP", getLPX(cache.lp), 34, 0); - } - - public int getLPX(int lp) { - if (lp < 10) return 122; - else if (lp < 100) return 122; - else if (lp < 1000) return 130; - else if (lp < 10000) return 127; - else if (lp < 100000) return 124; - return 122; - } - - @Override - public String getRecipeName() { - return StatCollector.translateToLocal("tile.blockWritingTable.name"); - } - - @Override - public String getGuiTexture() { - return new ResourceLocation("alchemicalwizardry", "gui/nei/alchemy.png").toString(); - } -} +//package WayofTime.alchemicalWizardry.client.nei; +// +//import static WayofTime.alchemicalWizardry.client.nei.NEIConfig.bloodOrbs; +// +//import java.awt.Rectangle; +//import java.util.ArrayList; +//import java.util.List; +// +//import net.minecraft.client.Minecraft; +//import net.minecraft.client.gui.inventory.GuiContainer; +//import net.minecraft.item.Item; +//import net.minecraft.item.ItemStack; +//import net.minecraft.util.ResourceLocation; +//import net.minecraft.util.StatCollector; +//import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe; +//import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +//import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; +//import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiWritingTable; +//import codechicken.nei.ItemList; +//import codechicken.nei.NEIServerUtils; +//import codechicken.nei.PositionedStack; +//import codechicken.nei.recipe.TemplateRecipeHandler; +// +///** +// * NEI Alchemy Recipe Handler by joshie * +// */ +//public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler { +// public class CachedAlchemyRecipe extends CachedRecipe { +// public class BloodOrbs { +// public PositionedStack stack; +// +// public BloodOrbs(ItemStack orb) { +// this.stack = new PositionedStack(orb, 136, 47, false); +// } +// } +// +// ArrayList<BloodOrbs> orbs; +// PositionedStack output; +// List<PositionedStack> inputs; +// int lp; +// +// public CachedAlchemyRecipe(AlchemyRecipe recipe, ItemStack orb) { +// this(recipe); +// this.orbs = new ArrayList<BloodOrbs>(); +// orbs.add(new BloodOrbs(orb)); +// } +// +// public CachedAlchemyRecipe(AlchemyRecipe recipe) { +// List<PositionedStack> inputs = new ArrayList<PositionedStack>(); +// ItemStack[] stacks = recipe.getRecipe(); +// if (stacks.length > 0) inputs.add(new PositionedStack(stacks[0], 76, 3)); +// if (stacks.length > 1) inputs.add(new PositionedStack(stacks[1], 51, 19)); +// if (stacks.length > 2) inputs.add(new PositionedStack(stacks[2], 101, 19)); +// if (stacks.length > 3) inputs.add(new PositionedStack(stacks[3], 64, 47)); +// if (stacks.length > 4) inputs.add(new PositionedStack(stacks[4], 88, 47)); +// this.inputs = inputs; +// this.output = new PositionedStack(recipe.getResult(), 76, 25); +// this.lp = recipe.getAmountNeeded() * 100; +// this.orbs = new ArrayList<BloodOrbs>(); +// for (Item orb : bloodOrbs) { +// if (((IBloodOrb) orb).getOrbLevel() >= recipe.getOrbLevel()) { +// orbs.add(new BloodOrbs(new ItemStack(orb))); +// } +// } +// } +// +// @Override +// public List<PositionedStack> getIngredients() { +// return inputs; +// } +// +// @Override +// public PositionedStack getResult() { +// return output; +// } +// +// @Override +// public PositionedStack getOtherStack() { +// if (orbs == null || orbs.size() <= 0) return null; +// return orbs.get((cycleticks / 48) % orbs.size()).stack; +// } +// } +// +// @Override +// public TemplateRecipeHandler newInstance() { +// for (ItemStack item : ItemList.items) { +// if (item != null && item.getItem() instanceof IBloodOrb) { +// bloodOrbs.add(item.getItem()); +// } +// } +// +// return super.newInstance(); +// } +// +// @Override +// public String getOverlayIdentifier() { +// return "alchemicalwizardry.alchemy"; +// } +// +// @Override +// public void loadTransferRects() { +// transferRects.add(new RecipeTransferRect(new Rectangle(134, 22, 16, 24), "alchemicalwizardry.alchemy")); +// } +// +// @Override +// public Class<? extends GuiContainer> getGuiClass() { +// return GuiWritingTable.class; +// } +// +// @Override +// public void loadCraftingRecipes(String outputId, Object... results) { +// if (outputId.equals("alchemicalwizardry.alchemy") && getClass() == NEIAlchemyRecipeHandler.class) { +// for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) { +// if (recipe.getResult() != null) arecipes.add(new CachedAlchemyRecipe(recipe)); +// } +// } else { +// super.loadCraftingRecipes(outputId, results); +// } +// } +// +// @Override +// public void loadCraftingRecipes(ItemStack result) { +// for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) { +// if (recipe == null) continue; +// if (NEIServerUtils.areStacksSameTypeCrafting(result, recipe.getResult())) { +// arecipes.add(new CachedAlchemyRecipe(recipe)); +// } +// } +// } +// +// @Override +// public void loadUsageRecipes(ItemStack ingredient) { +// if (ingredient.getItem() instanceof IBloodOrb) { +// for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) { +// if (recipe == null) continue; +// if (((IBloodOrb) ingredient.getItem()).getOrbLevel() >= recipe.getOrbLevel()) { +// arecipes.add(new CachedAlchemyRecipe(recipe, ingredient)); +// } +// } +// } else { +// for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) { +// if (recipe == null) continue; +// ItemStack[] stacks = recipe.getRecipe(); +// for (ItemStack stack : stacks) { +// if (NEIServerUtils.areStacksSameTypeCrafting(stack, ingredient)) { +// arecipes.add(new CachedAlchemyRecipe(recipe)); +// break; +// } +// } +// } +// } +// } +// +// @Override +// public void drawExtras(int id) { +// CachedAlchemyRecipe cache = (CachedAlchemyRecipe) arecipes.get(id); +// Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + cache.lp + "LP", getLPX(cache.lp), 34, 0); +// } +// +// public int getLPX(int lp) { +// if (lp < 10) return 122; +// else if (lp < 100) return 122; +// else if (lp < 1000) return 130; +// else if (lp < 10000) return 127; +// else if (lp < 100000) return 124; +// return 122; +// } +// +// @Override +// public String getRecipeName() { +// return StatCollector.translateToLocal("tile.blockWritingTable.name"); +// } +// +// @Override +// public String getGuiTexture() { +// return new ResourceLocation("alchemicalwizardry", "gui/nei/alchemy.png").toString(); +// } +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAltarRecipeHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAltarRecipeHandler.java index 79f216dd..0b264e4a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAltarRecipeHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAltarRecipeHandler.java @@ -1,187 +1,187 @@ -package WayofTime.alchemicalWizardry.client.nei; - -import java.awt.Dimension; -import java.awt.Point; -import java.awt.Rectangle; -import java.lang.reflect.Field; -import java.util.List; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; - -import org.lwjgl.input.Mouse; - -import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; -import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; -import codechicken.nei.NEIServerUtils; -import codechicken.nei.PositionedStack; -import codechicken.nei.recipe.GuiRecipe; -import codechicken.nei.recipe.TemplateRecipeHandler; - -/** - * NEI Altar Recipe Handler by joshie * - */ -public class NEIAltarRecipeHandler extends TemplateRecipeHandler { - public class CachedAltarRecipe extends CachedRecipe { - PositionedStack input; -// PositionedStack inputItems; - PositionedStack output; - int tier, lp_amount, consumption, drain; - - public CachedAltarRecipe(AltarRecipe recipe) { -// inputItems = new PositionedStack(recipe.input, 38, 2, false); - input = new PositionedStack(recipe.requiredItem, 38, 2, false); - output = new PositionedStack(recipe.result, 132, 32, false); - tier = recipe.minTier; - lp_amount = recipe.liquidRequired; - consumption = recipe.consumptionRate; - drain = recipe.drainRate; - } - - @Override - public PositionedStack getIngredient() { - return input; - } - - @Override - public PositionedStack getResult() { - return output; - } - } - - @Override - public void loadCraftingRecipes(String outputId, Object... results) { - if (outputId.equals("alchemicalwizardry.altar") && getClass() == NEIAltarRecipeHandler.class) { - for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) { - if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe)); - } - } else { - super.loadCraftingRecipes(outputId, results); - } - } - - @Override - public void loadCraftingRecipes(ItemStack result) { - for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) { - if(NEIServerUtils.areStacksSameTypeCrafting(recipe.result, result)) { - if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe)); - } - } - } - - @Override - public void loadUsageRecipes(ItemStack ingredient) { - for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) { - if(NEIServerUtils.areStacksSameTypeCrafting(recipe.requiredItem, ingredient)) { - if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe)); - } - } - } - - //Mouse Position helper - public Point getMouse(int width, int height) { - Point mousepos = getMousePosition(); - int guiLeft = (width - 176) / 2; - int guiTop = (height - 166) / 2; - Point relMouse = new Point(mousepos.x - guiLeft, mousepos.y - guiTop); - return relMouse; - } - - //width helper, getting width normal way hates me on compile - public int getGuiWidth(GuiRecipe gui) { - try { - Field f = gui.getClass().getField("width"); - return (Integer) f.get(gui); - } catch (NoSuchFieldException e) { - try { - Field f = gui.getClass().getField("field_146294_l"); - return (Integer) f.get(gui); - } catch (Exception e2) { - return 0; - } - } catch (Exception e) { - e.printStackTrace(); - return 0; - } - } - - //height helper, getting height normal way hates me on compile - public int getGuiHeight(GuiRecipe gui) { - try { - Field f = gui.getClass().getField("height"); - return (Integer) f.get(gui); - } catch (NoSuchFieldException e) { - try { - Field f = gui.getClass().getField("field_146295_m"); - return (Integer) f.get(gui); - } catch (Exception e2) { - return 0; - } - } catch (Exception e) { - e.printStackTrace(); - return 0; - } - } - - @Override - public void drawExtras(int id) { - CachedAltarRecipe recipe = (CachedAltarRecipe) arecipes.get(id); - Minecraft.getMinecraft().fontRenderer.drawString("\u00a77" + StatCollector.translateToLocal("bm.string.tier") + ": " + recipe.tier, 78, 5, 0); - Minecraft.getMinecraft().fontRenderer.drawString("\u00a77" + "LP: " + recipe.lp_amount, 78, 15, 0); - } - - @Override - public List<String> handleTooltip(GuiRecipe gui, List<String> currenttip, int id) { - currenttip = super.handleTooltip(gui, currenttip, id); - Point mouse = getMouse(getGuiWidth(gui), getGuiHeight(gui)); - CachedAltarRecipe recipe = (CachedAltarRecipe) arecipes.get(id); - int yLow = id % 2 == 0 ? 38 : 102; - int yHigh = id % 2 == 0 ? 72 : 136; - if(mouse.x >= 19 && mouse.x <= 80 && mouse.y >= yLow && mouse.y <= yHigh) { - currenttip.add(StatCollector.translateToLocal("bm.string.consume") + ": " + recipe.consumption + "LP/t"); - currenttip.add(StatCollector.translateToLocal("bm.string.drain") + ": " + recipe.drain + "LP/t"); - } - - return currenttip; - } - - @Override - public String getOverlayIdentifier() { - return "altarrecipes"; - } - - @Override - public void loadTransferRects() { - transferRects.add(new RecipeTransferRect(new Rectangle(90, 32, 22, 16), "alchemicalwizardry.altar")); - } - - @Override - public String getRecipeName() { - return " " + StatCollector.translateToLocal("tile.bloodAltar.name"); - } - - @Override - public String getGuiTexture() { - return new ResourceLocation("alchemicalwizardry", "gui/nei/altar.png").toString(); - } - - public static Point getMousePosition() { - Dimension size = displaySize(); - Dimension res = displayRes(); - return new Point(Mouse.getX() * size.width / res.width, size.height - Mouse.getY() * size.height / res.height - 1); - } - - public static Dimension displaySize() { - Minecraft mc = Minecraft.getMinecraft(); - ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); - return new Dimension(res.getScaledWidth(), res.getScaledHeight()); - } - - public static Dimension displayRes() { - Minecraft mc = Minecraft.getMinecraft(); - return new Dimension(mc.displayWidth, mc.displayHeight); - } -} +//package WayofTime.alchemicalWizardry.client.nei; +// +//import java.awt.Dimension; +//import java.awt.Point; +//import java.awt.Rectangle; +//import java.lang.reflect.Field; +//import java.util.List; +// +//import net.minecraft.client.Minecraft; +//import net.minecraft.client.gui.ScaledResolution; +//import net.minecraft.item.ItemStack; +//import net.minecraft.util.ResourceLocation; +//import net.minecraft.util.StatCollector; +// +//import org.lwjgl.input.Mouse; +// +//import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; +//import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; +//import codechicken.nei.NEIServerUtils; +//import codechicken.nei.PositionedStack; +//import codechicken.nei.recipe.GuiRecipe; +//import codechicken.nei.recipe.TemplateRecipeHandler; +// +///** +// * NEI Altar Recipe Handler by joshie * +// */ +//public class NEIAltarRecipeHandler extends TemplateRecipeHandler { +// public class CachedAltarRecipe extends CachedRecipe { +// PositionedStack input; +//// PositionedStack inputItems; +// PositionedStack output; +// int tier, lp_amount, consumption, drain; +// +// public CachedAltarRecipe(AltarRecipe recipe) { +//// inputItems = new PositionedStack(recipe.input, 38, 2, false); +// input = new PositionedStack(recipe.requiredItem, 38, 2, false); +// output = new PositionedStack(recipe.result, 132, 32, false); +// tier = recipe.minTier; +// lp_amount = recipe.liquidRequired; +// consumption = recipe.consumptionRate; +// drain = recipe.drainRate; +// } +// +// @Override +// public PositionedStack getIngredient() { +// return input; +// } +// +// @Override +// public PositionedStack getResult() { +// return output; +// } +// } +// +// @Override +// public void loadCraftingRecipes(String outputId, Object... results) { +// if (outputId.equals("alchemicalwizardry.altar") && getClass() == NEIAltarRecipeHandler.class) { +// for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) { +// if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe)); +// } +// } else { +// super.loadCraftingRecipes(outputId, results); +// } +// } +// +// @Override +// public void loadCraftingRecipes(ItemStack result) { +// for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) { +// if(NEIServerUtils.areStacksSameTypeCrafting(recipe.result, result)) { +// if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe)); +// } +// } +// } +// +// @Override +// public void loadUsageRecipes(ItemStack ingredient) { +// for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) { +// if(NEIServerUtils.areStacksSameTypeCrafting(recipe.requiredItem, ingredient)) { +// if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe)); +// } +// } +// } +// +// //Mouse Position helper +// public Point getMouse(int width, int height) { +// Point mousepos = getMousePosition(); +// int guiLeft = (width - 176) / 2; +// int guiTop = (height - 166) / 2; +// Point relMouse = new Point(mousepos.x - guiLeft, mousepos.y - guiTop); +// return relMouse; +// } +// +// //width helper, getting width normal way hates me on compile +// public int getGuiWidth(GuiRecipe gui) { +// try { +// Field f = gui.getClass().getField("width"); +// return (Integer) f.get(gui); +// } catch (NoSuchFieldException e) { +// try { +// Field f = gui.getClass().getField("field_146294_l"); +// return (Integer) f.get(gui); +// } catch (Exception e2) { +// return 0; +// } +// } catch (Exception e) { +// e.printStackTrace(); +// return 0; +// } +// } +// +// //height helper, getting height normal way hates me on compile +// public int getGuiHeight(GuiRecipe gui) { +// try { +// Field f = gui.getClass().getField("height"); +// return (Integer) f.get(gui); +// } catch (NoSuchFieldException e) { +// try { +// Field f = gui.getClass().getField("field_146295_m"); +// return (Integer) f.get(gui); +// } catch (Exception e2) { +// return 0; +// } +// } catch (Exception e) { +// e.printStackTrace(); +// return 0; +// } +// } +// +// @Override +// public void drawExtras(int id) { +// CachedAltarRecipe recipe = (CachedAltarRecipe) arecipes.get(id); +// Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + StatCollector.translateToLocal("bm.string.tier") + ": " + recipe.tier, 78, 5, 0); +// Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + "LP: " + recipe.lp_amount, 78, 15, 0); +// } +// +// @Override +// public List<String> handleTooltip(GuiRecipe gui, List<String> currenttip, int id) { +// currenttip = super.handleTooltip(gui, currenttip, id); +// Point mouse = getMouse(getGuiWidth(gui), getGuiHeight(gui)); +// CachedAltarRecipe recipe = (CachedAltarRecipe) arecipes.get(id); +// int yLow = id % 2 == 0 ? 38 : 102; +// int yHigh = id % 2 == 0 ? 72 : 136; +// if(mouse.x >= 19 && mouse.x <= 80 && mouse.y >= yLow && mouse.y <= yHigh) { +// currenttip.add(StatCollector.translateToLocal("bm.string.consume") + ": " + recipe.consumption + "LP/t"); +// currenttip.add(StatCollector.translateToLocal("bm.string.drain") + ": " + recipe.drain + "LP/t"); +// } +// +// return currenttip; +// } +// +// @Override +// public String getOverlayIdentifier() { +// return "altarrecipes"; +// } +// +// @Override +// public void loadTransferRects() { +// transferRects.add(new RecipeTransferRect(new Rectangle(90, 32, 22, 16), "alchemicalwizardry.altar")); +// } +// +// @Override +// public String getRecipeName() { +// return " " + StatCollector.translateToLocal("tile.bloodAltar.name"); +// } +// +// @Override +// public String getGuiTexture() { +// return new ResourceLocation("alchemicalwizardry", "gui/nei/altar.png").toString(); +// } +// +// public static Point getMousePosition() { +// Dimension size = displaySize(); +// Dimension res = displayRes(); +// return new Point(Mouse.getX() * size.width / res.width, size.height - Mouse.getY() * size.height / res.height - 1); +// } +// +// public static Dimension displaySize() { +// Minecraft mc = Minecraft.getMinecraft(); +// ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); +// return new Dimension(res.getScaledWidth(), res.getScaledHeight()); +// } +// +// public static Dimension displayRes() { +// Minecraft mc = Minecraft.getMinecraft(); +// return new Dimension(mc.displayWidth, mc.displayHeight); +// } +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBindingRitualHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBindingRitualHandler.java index 21f2fba8..58e9196d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBindingRitualHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBindingRitualHandler.java @@ -1,136 +1,136 @@ -package WayofTime.alchemicalWizardry.client.nei; - -import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe; -import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; -import codechicken.nei.NEIServerUtils; -import codechicken.nei.PositionedStack; -import codechicken.nei.recipe.TemplateRecipeHandler; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import org.lwjgl.input.Mouse; - -import java.awt.*; - -/** - * Binding Ritual Handler by Arcaratus - */ -public class NEIBindingRitualHandler extends TemplateRecipeHandler -{ - public class CachedBindingRecipe extends CachedRecipe - { - PositionedStack input, output; - - public CachedBindingRecipe(BindingRecipe recipe) - { - input = new PositionedStack(recipe.requiredItem, 37, 21, false); - output = new PositionedStack(recipe.outputItem, 110, 21, false); - } - - @Override - public PositionedStack getIngredient() - { - return input; - } - - @Override - public PositionedStack getResult() - { - return output; - } - } - - @Override - public void loadCraftingRecipes(String outputId, Object... results) - { - if (outputId.equals("alchemicalwizardry.bindingritual") && getClass() == NEIBindingRitualHandler.class) - { - for (BindingRecipe recipe : BindingRegistry.bindingRecipes) - { - if (recipe != null && recipe.outputItem != null) - { - arecipes.add(new CachedBindingRecipe(recipe)); - } - } - } - else - { - super.loadCraftingRecipes(outputId, results); - } - } - - @Override - public void loadCraftingRecipes(ItemStack result) - { - for (BindingRecipe recipe: BindingRegistry.bindingRecipes) - { - if (NEIServerUtils.areStacksSameTypeCrafting(recipe.outputItem, result)) - { - if (recipe != null && recipe.outputItem != null) - { - arecipes.add(new CachedBindingRecipe(recipe)); - } - } - } - } - - @Override - public void loadUsageRecipes(ItemStack ingredient) - { - for (BindingRecipe recipe: BindingRegistry.bindingRecipes) - { - if (NEIServerUtils.areStacksSameTypeCrafting(recipe.requiredItem, ingredient)) - { - if (recipe != null && recipe.outputItem != null) - { - arecipes.add(new CachedBindingRecipe(recipe)); - } - } - } - } - - @Override - public String getOverlayIdentifier() - { - return "alchemicalwizardry.bindingritual"; - } - - @Override - public void loadTransferRects() - { - transferRects.add(new RecipeTransferRect(new Rectangle(68, 20, 22, 16), "alchemicalwizardry.bindingritual")); - } - - @Override - public String getRecipeName() - { - return "Binding Ritual"; - } - - @Override - public String getGuiTexture() - { - return new ResourceLocation("alchemicalwizardry", "gui/nei/bindingRitual.png").toString(); - } - - public static Point getMousePosition() - { - Dimension size = displaySize(); - Dimension res = displayRes(); - return new Point(Mouse.getX() * size.width / res.width, size.height - Mouse.getY() * size.height / res.height - 1); - } - - public static Dimension displaySize() - { - Minecraft mc = Minecraft.getMinecraft(); - ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); - return new Dimension(res.getScaledWidth(), res.getScaledHeight()); - } - - public static Dimension displayRes() - { - Minecraft mc = Minecraft.getMinecraft(); - return new Dimension(mc.displayWidth, mc.displayHeight); - } -} \ No newline at end of file +//package WayofTime.alchemicalWizardry.client.nei; +// +//import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe; +//import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; +//import codechicken.nei.NEIServerUtils; +//import codechicken.nei.PositionedStack; +//import codechicken.nei.recipe.TemplateRecipeHandler; +//import net.minecraft.client.Minecraft; +//import net.minecraft.client.gui.ScaledResolution; +//import net.minecraft.item.ItemStack; +//import net.minecraft.util.ResourceLocation; +//import org.lwjgl.input.Mouse; +// +//import java.awt.*; +// +///** +// * Binding Ritual Handler by Arcaratus +// */ +//public class NEIBindingRitualHandler extends TemplateRecipeHandler +//{ +// public class CachedBindingRecipe extends CachedRecipe +// { +// PositionedStack input, output; +// +// public CachedBindingRecipe(BindingRecipe recipe) +// { +// input = new PositionedStack(recipe.requiredItem, 37, 21, false); +// output = new PositionedStack(recipe.outputItem, 110, 21, false); +// } +// +// @Override +// public PositionedStack getIngredient() +// { +// return input; +// } +// +// @Override +// public PositionedStack getResult() +// { +// return output; +// } +// } +// +// @Override +// public void loadCraftingRecipes(String outputId, Object... results) +// { +// if (outputId.equals("alchemicalwizardry.bindingritual") && getClass() == NEIBindingRitualHandler.class) +// { +// for (BindingRecipe recipe : BindingRegistry.bindingRecipes) +// { +// if (recipe != null && recipe.outputItem != null) +// { +// arecipes.add(new CachedBindingRecipe(recipe)); +// } +// } +// } +// else +// { +// super.loadCraftingRecipes(outputId, results); +// } +// } +// +// @Override +// public void loadCraftingRecipes(ItemStack result) +// { +// for (BindingRecipe recipe: BindingRegistry.bindingRecipes) +// { +// if (NEIServerUtils.areStacksSameTypeCrafting(recipe.outputItem, result)) +// { +// if (recipe != null && recipe.outputItem != null) +// { +// arecipes.add(new CachedBindingRecipe(recipe)); +// } +// } +// } +// } +// +// @Override +// public void loadUsageRecipes(ItemStack ingredient) +// { +// for (BindingRecipe recipe: BindingRegistry.bindingRecipes) +// { +// if (NEIServerUtils.areStacksSameTypeCrafting(recipe.requiredItem, ingredient)) +// { +// if (recipe != null && recipe.outputItem != null) +// { +// arecipes.add(new CachedBindingRecipe(recipe)); +// } +// } +// } +// } +// +// @Override +// public String getOverlayIdentifier() +// { +// return "alchemicalwizardry.bindingritual"; +// } +// +// @Override +// public void loadTransferRects() +// { +// transferRects.add(new RecipeTransferRect(new Rectangle(68, 20, 22, 16), "alchemicalwizardry.bindingritual")); +// } +// +// @Override +// public String getRecipeName() +// { +// return "Binding Ritual"; +// } +// +// @Override +// public String getGuiTexture() +// { +// return new ResourceLocation("alchemicalwizardry", "gui/nei/bindingRitual.png").toString(); +// } +// +// public static Point getMousePosition() +// { +// Dimension size = displaySize(); +// Dimension res = displayRes(); +// return new Point(Mouse.getX() * size.width / res.width, size.height - Mouse.getY() * size.height / res.height - 1); +// } +// +// public static Dimension displaySize() +// { +// Minecraft mc = Minecraft.getMinecraft(); +// ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); +// return new Dimension(res.getScaledWidth(), res.getScaledHeight()); +// } +// +// public static Dimension displayRes() +// { +// Minecraft mc = Minecraft.getMinecraft(); +// return new Dimension(mc.displayWidth, mc.displayHeight); +// } +//} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapedHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapedHandler.java index 98e2b782..e67afd56 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapedHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapedHandler.java @@ -1,142 +1,142 @@ -package WayofTime.alchemicalWizardry.client.nei; - -import java.awt.Rectangle; -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.util.StatCollector; -import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -import codechicken.nei.NEIServerUtils; -import codechicken.nei.PositionedStack; -import codechicken.nei.recipe.ShapedRecipeHandler; - -/** - * NEI Blood Orb Shaped Recipe Handler by joshie * - */ -public class NEIBloodOrbShapedHandler extends ShapedRecipeHandler { - public class CachedBloodOrbRecipe extends CachedShapedRecipe { - public CachedBloodOrbRecipe(int width, int height, Object[] items, ItemStack out) { - super(width, height, items, out); - } - - @Override - public void setIngredients(int width, int height, Object[] items) { - for (int x = 0; x < width; x++) { - for (int y = 0; y < height; y++) { - if (items[y * width + x] == null) - continue; - - Object o = items[y * width + x]; - if (o instanceof ItemStack) { - PositionedStack stack = new PositionedStack(items[y * width + x], 25 + x * 18, 6 + y * 18, false); - stack.setMaxSize(1); - ingredients.add(stack); - } else if (o instanceof Integer) { - ArrayList<ItemStack> orbs = new ArrayList(); - for (Item item : NEIConfig.bloodOrbs) { - if (((IBloodOrb) item).getOrbLevel() >= (Integer) o) { - orbs.add(new ItemStack(item)); - } - } - - PositionedStack stack = new PositionedStack(orbs, 25 + x * 18, 6 + y * 18, false); - stack.setMaxSize(1); - ingredients.add(stack); - }else if(o instanceof List) - { - PositionedStack stack = new PositionedStack(o, 25 + x * 18, 6 + y * 18, false); - stack.setMaxSize(1); - ingredients.add(stack); - } - } - } - } - } - - @Override - public void loadCraftingRecipes(String outputId, Object... results) { - if (outputId.equals("crafting") && getClass() == NEIBloodOrbShapedHandler.class) { - for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) { - if (irecipe instanceof ShapedBloodOrbRecipe) { - CachedBloodOrbRecipe recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe); - if (recipe == null) - continue; - - recipe.computeVisuals(); - arecipes.add(recipe); - } - } - } else { - super.loadCraftingRecipes(outputId, results); - } - } - - @Override - public void loadCraftingRecipes(ItemStack result) { - for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) { - if (irecipe instanceof ShapedBloodOrbRecipe) { - CachedBloodOrbRecipe recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe); - if (recipe == null || !NEIServerUtils.areStacksSameTypeCrafting(recipe.result.item, result)) - continue; - - recipe.computeVisuals(); - arecipes.add(recipe); - } - } - } - - @Override - public void loadUsageRecipes(ItemStack ingredient) { - for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) { - CachedShapedRecipe recipe = null; - if (irecipe instanceof ShapedBloodOrbRecipe) - recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe); - - if (recipe == null || !recipe.contains(recipe.ingredients, ingredient.getItem())) - continue; - - recipe.computeVisuals(); - if (recipe.contains(recipe.ingredients, ingredient)) { - recipe.setIngredientPermutation(recipe.ingredients, ingredient); - arecipes.add(recipe); - } - } - } - - private CachedBloodOrbRecipe forgeShapedRecipe(ShapedBloodOrbRecipe recipe) { - int width; - int height; - try { - width = recipe.width; - height = recipe.height; - } catch (Exception e) { - e.printStackTrace(); - return null; - } - - Object[] items = recipe.getInput(); - for (Object item : items) - if (item instanceof List && ((List<?>) item).isEmpty())// ore - // handler, - // no ores - return null; - - return new CachedBloodOrbRecipe(width, height, items, recipe.getRecipeOutput()); - } - - @Override - public void loadTransferRects() { - transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18), "crafting")); - } - - - @Override - public String getRecipeName() { - return StatCollector.translateToLocal("bm.string.crafting.orb.shaped"); - } -} +//package WayofTime.alchemicalWizardry.client.nei; +// +//import java.awt.Rectangle; +//import java.util.ArrayList; +//import java.util.List; +// +//import net.minecraft.item.Item; +//import net.minecraft.item.ItemStack; +//import net.minecraft.item.crafting.CraftingManager; +//import net.minecraft.item.crafting.IRecipe; +//import net.minecraft.util.StatCollector; +//import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; +//import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; +//import codechicken.nei.NEIServerUtils; +//import codechicken.nei.PositionedStack; +//import codechicken.nei.recipe.ShapedRecipeHandler; +// +///** +// * NEI Blood Orb Shaped Recipe Handler by joshie * +// */ +//public class NEIBloodOrbShapedHandler extends ShapedRecipeHandler { +// public class CachedBloodOrbRecipe extends CachedShapedRecipe { +// public CachedBloodOrbRecipe(int width, int height, Object[] items, ItemStack out) { +// super(width, height, items, out); +// } +// +// @Override +// public void setIngredients(int width, int height, Object[] items) { +// for (int x = 0; x < width; x++) { +// for (int y = 0; y < height; y++) { +// if (items[y * width + x] == null) +// continue; +// +// Object o = items[y * width + x]; +// if (o instanceof ItemStack) { +// PositionedStack stack = new PositionedStack(items[y * width + x], 25 + x * 18, 6 + y * 18, false); +// stack.setMaxSize(1); +// ingredients.add(stack); +// } else if (o instanceof Integer) { +// ArrayList<ItemStack> orbs = new ArrayList(); +// for (Item item : NEIConfig.bloodOrbs) { +// if (((IBloodOrb) item).getOrbLevel() >= (Integer) o) { +// orbs.add(new ItemStack(item)); +// } +// } +// +// PositionedStack stack = new PositionedStack(orbs, 25 + x * 18, 6 + y * 18, false); +// stack.setMaxSize(1); +// ingredients.add(stack); +// }else if(o instanceof List) +// { +// PositionedStack stack = new PositionedStack(o, 25 + x * 18, 6 + y * 18, false); +// stack.setMaxSize(1); +// ingredients.add(stack); +// } +// } +// } +// } +// } +// +// @Override +// public void loadCraftingRecipes(String outputId, Object... results) { +// if (outputId.equals("crafting") && getClass() == NEIBloodOrbShapedHandler.class) { +// for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) { +// if (irecipe instanceof ShapedBloodOrbRecipe) { +// CachedBloodOrbRecipe recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe); +// if (recipe == null) +// continue; +// +// recipe.computeVisuals(); +// arecipes.add(recipe); +// } +// } +// } else { +// super.loadCraftingRecipes(outputId, results); +// } +// } +// +// @Override +// public void loadCraftingRecipes(ItemStack result) { +// for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) { +// if (irecipe instanceof ShapedBloodOrbRecipe) { +// CachedBloodOrbRecipe recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe); +// if (recipe == null || !NEIServerUtils.areStacksSameTypeCrafting(recipe.result.item, result)) +// continue; +// +// recipe.computeVisuals(); +// arecipes.add(recipe); +// } +// } +// } +// +// @Override +// public void loadUsageRecipes(ItemStack ingredient) { +// for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) { +// CachedShapedRecipe recipe = null; +// if (irecipe instanceof ShapedBloodOrbRecipe) +// recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe); +// +// if (recipe == null || !recipe.contains(recipe.ingredients, ingredient.getItem())) +// continue; +// +// recipe.computeVisuals(); +// if (recipe.contains(recipe.ingredients, ingredient)) { +// recipe.setIngredientPermutation(recipe.ingredients, ingredient); +// arecipes.add(recipe); +// } +// } +// } +// +// private CachedBloodOrbRecipe forgeShapedRecipe(ShapedBloodOrbRecipe recipe) { +// int width; +// int height; +// try { +// width = recipe.width; +// height = recipe.height; +// } catch (Exception e) { +// e.printStackTrace(); +// return null; +// } +// +// Object[] items = recipe.getInput(); +// for (Object item : items) +// if (item instanceof List && ((List<?>) item).isEmpty())// ore +// // handler, +// // no ores +// return null; +// +// return new CachedBloodOrbRecipe(width, height, items, recipe.getRecipeOutput()); +// } +// +// @Override +// public void loadTransferRects() { +// transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18), "crafting")); +// } +// +// +// @Override +// public String getRecipeName() { +// return StatCollector.translateToLocal("bm.string.crafting.orb.shaped"); +// } +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapelessHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapelessHandler.java index 7be1ee25..ce531bb0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapelessHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapelessHandler.java @@ -1,135 +1,135 @@ -package WayofTime.alchemicalWizardry.client.nei; - -import java.awt.Rectangle; -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.util.StatCollector; -import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -import codechicken.nei.NEIServerUtils; -import codechicken.nei.PositionedStack; -import codechicken.nei.recipe.ShapelessRecipeHandler; - -/** - * NEI Blood Orb Shapeless Recipe Handler by joshie * - */ -public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler { - public class CachedBloodOrbRecipe extends CachedShapelessRecipe { - public CachedBloodOrbRecipe(ArrayList<Object> items, ItemStack recipeOutput) { - super(items, recipeOutput); - } - - @Override - public void setIngredients(List<?> items) { - ingredients.clear(); - for (int ingred = 0; ingred < items.size(); ingred++) { - Object o = items.get(ingred); - if (o instanceof ItemStack) { - PositionedStack stack = new PositionedStack(items.get(ingred), 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18); - stack.setMaxSize(1); - ingredients.add(stack); - } else if (o instanceof Integer) { - ArrayList<ItemStack> orbs = new ArrayList(); - for (Item item : NEIConfig.bloodOrbs) { - if (((IBloodOrb) item).getOrbLevel() >= (Integer) o) { - orbs.add(new ItemStack(item)); - } - } - - PositionedStack stack = new PositionedStack(orbs, 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18); - stack.setMaxSize(1); - ingredients.add(stack); - }else if(o instanceof List) - { - PositionedStack stack = new PositionedStack(o, 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18); - stack.setMaxSize(1); - ingredients.add(stack); - } - } - } - } - - @Override - public void loadCraftingRecipes(String outputId, Object... results) { - if (outputId.equals("crafting") && getClass() == NEIBloodOrbShapelessHandler.class) { - List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList(); - for (IRecipe irecipe : allrecipes) { - CachedBloodOrbRecipe recipe = null; - if (irecipe instanceof ShapelessBloodOrbRecipe) - recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe); - - if (recipe == null) - continue; - - arecipes.add(recipe); - } - } else { - super.loadCraftingRecipes(outputId, results); - } - } - - @Override - public void loadCraftingRecipes(ItemStack result) { - List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList(); - for (IRecipe irecipe : allrecipes) { - if (NEIServerUtils.areStacksSameTypeCrafting(irecipe.getRecipeOutput(), result)) { - CachedBloodOrbRecipe recipe = null; - if (irecipe instanceof ShapelessBloodOrbRecipe) - recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe); - - if (recipe == null) - continue; - - arecipes.add(recipe); - } - } - } - - @Override - public void loadUsageRecipes(ItemStack ingredient) { - List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList(); - for (IRecipe irecipe : allrecipes) { - CachedBloodOrbRecipe recipe = null; - if (irecipe instanceof ShapelessBloodOrbRecipe) - recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe); - - if (recipe == null) - continue; - - if (recipe.contains(recipe.ingredients, ingredient)) { - recipe.setIngredientPermutation(recipe.ingredients, ingredient); - arecipes.add(recipe); - } - } - } - - public CachedBloodOrbRecipe forgeShapelessRecipe(ShapelessBloodOrbRecipe recipe) { - ArrayList<Object> items = recipe.getInput(); - - for (Object item : items) - if (item instanceof List && ((List<?>) item).isEmpty())//ore handler, no ores - return null; - - return new CachedBloodOrbRecipe(items, recipe.getRecipeOutput()); - } - - @Override - public void loadTransferRects() { - transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18), "crafting")); - } - - @Override - public String getOverlayIdentifier() { - return "crafting"; - } - - @Override - public String getRecipeName() { - return StatCollector.translateToLocal("bm.string.crafting.orb.shapeless"); - } -} +//package WayofTime.alchemicalWizardry.client.nei; +// +//import java.awt.Rectangle; +//import java.util.ArrayList; +//import java.util.List; +// +//import net.minecraft.item.Item; +//import net.minecraft.item.ItemStack; +//import net.minecraft.item.crafting.CraftingManager; +//import net.minecraft.item.crafting.IRecipe; +//import net.minecraft.util.StatCollector; +//import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; +//import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; +//import codechicken.nei.NEIServerUtils; +//import codechicken.nei.PositionedStack; +//import codechicken.nei.recipe.ShapelessRecipeHandler; +// +///** +// * NEI Blood Orb Shapeless Recipe Handler by joshie * +// */ +//public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler { +// public class CachedBloodOrbRecipe extends CachedShapelessRecipe { +// public CachedBloodOrbRecipe(ArrayList<Object> items, ItemStack recipeOutput) { +// super(items, recipeOutput); +// } +// +// @Override +// public void setIngredients(List<?> items) { +// ingredients.clear(); +// for (int ingred = 0; ingred < items.size(); ingred++) { +// Object o = items.get(ingred); +// if (o instanceof ItemStack) { +// PositionedStack stack = new PositionedStack(items.get(ingred), 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18); +// stack.setMaxSize(1); +// ingredients.add(stack); +// } else if (o instanceof Integer) { +// ArrayList<ItemStack> orbs = new ArrayList(); +// for (Item item : NEIConfig.bloodOrbs) { +// if (((IBloodOrb) item).getOrbLevel() >= (Integer) o) { +// orbs.add(new ItemStack(item)); +// } +// } +// +// PositionedStack stack = new PositionedStack(orbs, 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18); +// stack.setMaxSize(1); +// ingredients.add(stack); +// }else if(o instanceof List) +// { +// PositionedStack stack = new PositionedStack(o, 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18); +// stack.setMaxSize(1); +// ingredients.add(stack); +// } +// } +// } +// } +// +// @Override +// public void loadCraftingRecipes(String outputId, Object... results) { +// if (outputId.equals("crafting") && getClass() == NEIBloodOrbShapelessHandler.class) { +// List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList(); +// for (IRecipe irecipe : allrecipes) { +// CachedBloodOrbRecipe recipe = null; +// if (irecipe instanceof ShapelessBloodOrbRecipe) +// recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe); +// +// if (recipe == null) +// continue; +// +// arecipes.add(recipe); +// } +// } else { +// super.loadCraftingRecipes(outputId, results); +// } +// } +// +// @Override +// public void loadCraftingRecipes(ItemStack result) { +// List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList(); +// for (IRecipe irecipe : allrecipes) { +// if (NEIServerUtils.areStacksSameTypeCrafting(irecipe.getRecipeOutput(), result)) { +// CachedBloodOrbRecipe recipe = null; +// if (irecipe instanceof ShapelessBloodOrbRecipe) +// recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe); +// +// if (recipe == null) +// continue; +// +// arecipes.add(recipe); +// } +// } +// } +// +// @Override +// public void loadUsageRecipes(ItemStack ingredient) { +// List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList(); +// for (IRecipe irecipe : allrecipes) { +// CachedBloodOrbRecipe recipe = null; +// if (irecipe instanceof ShapelessBloodOrbRecipe) +// recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe); +// +// if (recipe == null) +// continue; +// +// if (recipe.contains(recipe.ingredients, ingredient)) { +// recipe.setIngredientPermutation(recipe.ingredients, ingredient); +// arecipes.add(recipe); +// } +// } +// } +// +// public CachedBloodOrbRecipe forgeShapelessRecipe(ShapelessBloodOrbRecipe recipe) { +// ArrayList<Object> items = recipe.getInput(); +// +// for (Object item : items) +// if (item instanceof List && ((List<?>) item).isEmpty())//ore handler, no ores +// return null; +// +// return new CachedBloodOrbRecipe(items, recipe.getRecipeOutput()); +// } +// +// @Override +// public void loadTransferRects() { +// transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18), "crafting")); +// } +// +// @Override +// public String getOverlayIdentifier() { +// return "crafting"; +// } +// +// @Override +// public String getRecipeName() { +// return StatCollector.translateToLocal("bm.string.crafting.orb.shapeless"); +// } +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIConfig.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIConfig.java index c1ef8769..b074ba6e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIConfig.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIConfig.java @@ -1,35 +1,35 @@ -package WayofTime.alchemicalWizardry.client.nei; - -import java.util.ArrayList; - -import net.minecraft.item.Item; -import codechicken.nei.api.API; -import codechicken.nei.api.IConfigureNEI; - -public class NEIConfig implements IConfigureNEI { - public static ArrayList<Item> bloodOrbs = new ArrayList<Item>(); - - @Override - public void loadConfig() { - API.registerRecipeHandler(new NEIAlchemyRecipeHandler()); - API.registerUsageHandler(new NEIAlchemyRecipeHandler()); - API.registerRecipeHandler(new NEIAltarRecipeHandler()); - API.registerUsageHandler(new NEIAltarRecipeHandler()); - API.registerRecipeHandler(new NEIBloodOrbShapedHandler()); - API.registerUsageHandler(new NEIBloodOrbShapedHandler()); - API.registerRecipeHandler(new NEIBloodOrbShapelessHandler()); - API.registerUsageHandler(new NEIBloodOrbShapelessHandler()); - API.registerRecipeHandler(new NEIBindingRitualHandler()); - API.registerUsageHandler(new NEIBindingRitualHandler()); - } - - @Override - public String getName() { - return "Blood Magic NEI"; - } - - @Override - public String getVersion() { - return "1.3"; - } -} +//package WayofTime.alchemicalWizardry.client.nei; +// +//import java.util.ArrayList; +// +//import net.minecraft.item.Item; +//import codechicken.nei.api.API; +//import codechicken.nei.api.IConfigureNEI; +// +//public class NEIConfig implements IConfigureNEI { +// public static ArrayList<Item> bloodOrbs = new ArrayList<Item>(); +// +// @Override +// public void loadConfig() { +// API.registerRecipeHandler(new NEIAlchemyRecipeHandler()); +// API.registerUsageHandler(new NEIAlchemyRecipeHandler()); +// API.registerRecipeHandler(new NEIAltarRecipeHandler()); +// API.registerUsageHandler(new NEIAltarRecipeHandler()); +// API.registerRecipeHandler(new NEIBloodOrbShapedHandler()); +// API.registerUsageHandler(new NEIBloodOrbShapedHandler()); +// API.registerRecipeHandler(new NEIBloodOrbShapelessHandler()); +// API.registerUsageHandler(new NEIBloodOrbShapelessHandler()); +// API.registerRecipeHandler(new NEIBindingRitualHandler()); +// API.registerUsageHandler(new NEIBindingRitualHandler()); +// } +// +// @Override +// public String getName() { +// return "Blood Magic NEI"; +// } +// +// @Override +// public String getVersion() { +// return "1.3"; +// } +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDElement.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDElement.java index f3f97f01..da724a81 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDElement.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDElement.java @@ -29,7 +29,7 @@ public class HUDElement public boolean showDamageOverlay = false; public boolean showItemCount = false; - static RenderItem itemRenderer = new RenderItem(); + static RenderItem itemRenderer = Minecraft.getMinecraft().getRenderItem(); public HUDElement(ItemStack itemStack, int iconW, int iconH, int padW, int value) { @@ -54,8 +54,8 @@ public class HUDElement private void initSize() { - elementH = enableItemName ? Math.max(Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT * 2, iconH) : - Math.max(mc.fontRenderer.FONT_HEIGHT, iconH); + elementH = enableItemName ? Math.max(Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT * 2, iconH) : + Math.max(mc.fontRendererObj.FONT_HEIGHT, iconH); if (itemStack != null) { @@ -65,7 +65,7 @@ public class HUDElement if (showValue) { maxDamage = itemStack.getMaxDamage() + 1; - damage = maxDamage - itemStack.getItemDamageForDisplay(); + damage = maxDamage - itemStack.getItemDamage(); boolean showSpecialValue = true; boolean showValue = false; @@ -88,17 +88,17 @@ public class HUDElement (damage * 100 / maxDamage) + "%"; } - itemDamageW = mc.fontRenderer.getStringWidth(HUDUtils.stripCtrl(itemDamage)); + itemDamageW = mc.fontRendererObj.getStringWidth(HUDUtils.stripCtrl(itemDamage)); elementW = padW + iconW + padW + itemDamageW + offset; if (enableItemName) { itemName = itemStack.getDisplayName(); elementW = padW + iconW + padW + - Math.max(mc.fontRenderer.getStringWidth(HUDUtils.stripCtrl(itemName)), itemDamageW); + Math.max(mc.fontRendererObj.getStringWidth(HUDUtils.stripCtrl(itemName)), itemDamageW); } - itemNameW = mc.fontRenderer.getStringWidth(HUDUtils.stripCtrl(itemName)); + itemNameW = mc.fontRendererObj.getStringWidth(HUDUtils.stripCtrl(itemName)); } } @@ -114,27 +114,27 @@ public class HUDElement boolean toRight = true; if (toRight) { - itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), itemStack, x - (iconW + padW), y); - HUDUtils.renderItemOverlayIntoGUI(mc.fontRenderer, itemStack, x - (iconW + padW), y, showDamageOverlay, showItemCount); + itemRenderer.func_180450_b(itemStack, x - (iconW + padW), y); + HUDUtils.renderItemOverlayIntoGUI(mc.fontRendererObj, itemStack, x - (iconW + padW), y, showDamageOverlay, showItemCount); RenderHelper.disableStandardItemLighting(); GL11.glDisable(32826 /* GL_RESCALE_NORMAL_EXT */); GL11.glDisable(GL11.GL_BLEND); - mc.fontRenderer.drawStringWithShadow(itemName + "\247r", x - (padW + iconW + padW) - itemNameW, y, 0xffffff); - mc.fontRenderer.drawStringWithShadow(itemDamage + "\247r", x - (padW + iconW + padW) - itemDamageW, + mc.fontRendererObj.drawString(itemName + "\247r", x - (padW + iconW + padW) - itemNameW, y, 0xffffff); + mc.fontRendererObj.drawString(itemDamage + "\247r", x - (padW + iconW + padW) - itemDamageW, y + (enableItemName ? elementH / 2 : elementH / 4), 0xffffff); } else { - itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), itemStack, x, y); - HUDUtils.renderItemOverlayIntoGUI(mc.fontRenderer, itemStack, x, y, showDamageOverlay, showItemCount); + itemRenderer.func_180450_b(itemStack, x, y); + HUDUtils.renderItemOverlayIntoGUI(mc.fontRendererObj, itemStack, x, y, showDamageOverlay, showItemCount); RenderHelper.disableStandardItemLighting(); GL11.glDisable(32826 /* GL_RESCALE_NORMAL_EXT */); GL11.glDisable(GL11.GL_BLEND); - mc.fontRenderer.drawStringWithShadow(itemName + "\247r", x + iconW + padW, y, 0xffffff); - mc.fontRenderer.drawStringWithShadow(itemDamage + "\247r", x + iconW + padW, + mc.fontRendererObj.drawString(itemName + "\247r", x + iconW + padW, y, 0xffffff); + mc.fontRendererObj.drawString(itemDamage + "\247r", x + iconW + padW, y + (enableItemName ? elementH / 2 : elementH / 4), 0xffffff); } GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDUtils.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDUtils.java index 2c42afea..957067e6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDUtils.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDUtils.java @@ -4,11 +4,13 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; + import org.lwjgl.opengl.GL11; /** @@ -169,12 +171,13 @@ public final class HUDUtils { float var7 = 0.00390625F; float var8 = 0.00390625F; - Tessellator tessellator = Tessellator.instance; - tessellator.startDrawingQuads(); - tessellator.addVertexWithUV((x + 0), (y + height), zLevel, ((u + 0) * var7), ((v + height) * var8)); - tessellator.addVertexWithUV((x + width), (y + height), zLevel, ((u + width) * var7), ((v + height) * var8)); - tessellator.addVertexWithUV((x + width), (y + 0), zLevel, ((u + width) * var7), ((v + 0) * var8)); - tessellator.addVertexWithUV((x + 0), (y + 0), zLevel, ((u + 0) * var7), ((v + 0) * var8)); + Tessellator tessellator = Tessellator.getInstance(); + WorldRenderer wr = tessellator.getWorldRenderer(); + wr.startDrawingQuads(); + wr.addVertexWithUV((x + 0), (y + height), zLevel, ((u + 0) * var7), ((v + height) * var8)); + wr.addVertexWithUV((x + width), (y + height), zLevel, ((u + width) * var7), ((v + height) * var8)); + wr.addVertexWithUV((x + width), (y + 0), zLevel, ((u + width) * var7), ((v + 0) * var8)); + wr.addVertexWithUV((x + 0), (y + 0), zLevel, ((u + 0) * var7), ((v + 0) * var8)); tessellator.draw(); } @@ -195,12 +198,12 @@ public final class HUDUtils { if (itemStack.isItemDamaged() && showDamageBar) { - int var11 = (int) Math.round(13.0D - itemStack.getItemDamageForDisplay() * 13.0D / itemStack.getMaxDamage()); - int var7 = (int) Math.round(255.0D - itemStack.getItemDamageForDisplay() * 255.0D / itemStack.getMaxDamage()); + int var11 = (int) Math.round(13.0D - itemStack.getItemDamage() * 13.0D / itemStack.getMaxDamage()); + int var7 = (int) Math.round(255.0D - itemStack.getItemDamage() * 255.0D / itemStack.getMaxDamage()); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glDisable(GL11.GL_TEXTURE_2D); - Tessellator var8 = Tessellator.instance; + Tessellator var8 = Tessellator.getInstance(); int var9 = 255 - var7 << 16 | var7 << 8; int var10 = (255 - var7) / 4 << 16 | 16128; renderQuad(var8, x + 2, y + 13, 13, 2, 0); @@ -226,7 +229,7 @@ public final class HUDUtils String var6 = "" + count; GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); - fontRenderer.drawStringWithShadow(var6, x + 19 - 2 - fontRenderer.getStringWidth(var6), y + 6 + 3, 16777215); + fontRenderer.drawString(var6, x + 19 - 2 - fontRenderer.getStringWidth(var6), y + 6 + 3, 16777215); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_DEPTH_TEST); } @@ -240,12 +243,13 @@ public final class HUDUtils */ public static void renderQuad(Tessellator tessellator, int x, int y, int width, int height, int color) { - tessellator.startDrawingQuads(); - tessellator.setColorOpaque_I(color); - tessellator.addVertex((x + 0), (y + 0), 0.0D); - tessellator.addVertex((x + 0), (y + height), 0.0D); - tessellator.addVertex((x + width), (y + height), 0.0D); - tessellator.addVertex((x + width), (y + 0), 0.0D); + WorldRenderer wr = tessellator.getWorldRenderer(); + wr.startDrawingQuads(); +// wr.setColorOpaque_I(color); + wr.addVertex((x + 0), (y + 0), 0.0D); + wr.addVertex((x + 0), (y + height), 0.0D); + wr.addVertex((x + width), (y + height), 0.0D); + wr.addVertex((x + width), (y + 0), 0.0D); tessellator.draw(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderFakeBlocks.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderFakeBlocks.java index 1ddd11d2..954edba0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderFakeBlocks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderFakeBlocks.java @@ -2,7 +2,7 @@ package WayofTime.alchemicalWizardry.client.renderer; import net.minecraft.block.Block; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.util.IIcon; +import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.world.World; /* @@ -16,10 +16,11 @@ public class RenderFakeBlocks double maxX = minX + 1; double maxY = minY + 1; double maxZ = minZ + 1; - Tessellator tessellator = Tessellator.instance; + Tessellator tessellator = Tessellator.getInstance(); + WorldRenderer wr = tessellator.getWorldRenderer(); - tessellator.startDrawingQuads(); - tessellator.setColorRGBA(255, 255, 255, 200); + wr.startDrawingQuads(); +// wr.setColorRGBA(255, 255, 255, 200); float texMinU, texMaxU, texMinV, texMaxV; @@ -27,80 +28,76 @@ public class RenderFakeBlocks texMaxU = getMaxU(block, meta, 0); texMinV = getMinV(block, meta, 0); texMaxV = getMaxV(block, meta, 0); - tessellator.addVertexWithUV(minX, minY, minZ, texMinU, texMinV); - tessellator.addVertexWithUV(maxX, minY, minZ, texMaxU, texMinV); - tessellator.addVertexWithUV(maxX, minY, maxZ, texMaxU, texMaxV); - tessellator.addVertexWithUV(minX, minY, maxZ, texMinU, texMaxV); + wr.addVertexWithUV(minX, minY, minZ, texMinU, texMinV); + wr.addVertexWithUV(maxX, minY, minZ, texMaxU, texMinV); + wr.addVertexWithUV(maxX, minY, maxZ, texMaxU, texMaxV); + wr.addVertexWithUV(minX, minY, maxZ, texMinU, texMaxV); texMinU = getMinU(block, meta, 1); texMaxU = getMaxU(block, meta, 1); texMinV = getMinV(block, meta, 1); texMaxV = getMaxV(block, meta, 1); - tessellator.addVertexWithUV(minX, maxY, maxZ, texMinU, texMaxV); - tessellator.addVertexWithUV(maxX, maxY, maxZ, texMaxU, texMaxV); - tessellator.addVertexWithUV(maxX, maxY, minZ, texMaxU, texMinV); - tessellator.addVertexWithUV(minX, maxY, minZ, texMinU, texMinV); + wr.addVertexWithUV(minX, maxY, maxZ, texMinU, texMaxV); + wr.addVertexWithUV(maxX, maxY, maxZ, texMaxU, texMaxV); + wr.addVertexWithUV(maxX, maxY, minZ, texMaxU, texMinV); + wr.addVertexWithUV(minX, maxY, minZ, texMinU, texMinV); texMinU = getMinU(block, meta, 2); texMaxU = getMaxU(block, meta, 2); texMinV = getMinV(block, meta, 2); texMaxV = getMaxV(block, meta, 2); - tessellator.addVertexWithUV(maxX, minY, minZ, texMinU, texMaxV); - tessellator.addVertexWithUV(minX, minY, minZ, texMaxU, texMaxV); - tessellator.addVertexWithUV(minX, maxY, minZ, texMaxU, texMinV); - tessellator.addVertexWithUV(maxX, maxY, minZ, texMinU, texMinV); + wr.addVertexWithUV(maxX, minY, minZ, texMinU, texMaxV); + wr.addVertexWithUV(minX, minY, minZ, texMaxU, texMaxV); + wr.addVertexWithUV(minX, maxY, minZ, texMaxU, texMinV); + wr.addVertexWithUV(maxX, maxY, minZ, texMinU, texMinV); texMinU = getMinU(block, meta, 3); texMaxU = getMaxU(block, meta, 3); texMinV = getMinV(block, meta, 3); texMaxV = getMaxV(block, meta, 3); - tessellator.addVertexWithUV(minX, minY, maxZ, texMinU, texMaxV); - tessellator.addVertexWithUV(maxX, minY, maxZ, texMaxU, texMaxV); - tessellator.addVertexWithUV(maxX, maxY, maxZ, texMaxU, texMinV); - tessellator.addVertexWithUV(minX, maxY, maxZ, texMinU, texMinV); + wr.addVertexWithUV(minX, minY, maxZ, texMinU, texMaxV); + wr.addVertexWithUV(maxX, minY, maxZ, texMaxU, texMaxV); + wr.addVertexWithUV(maxX, maxY, maxZ, texMaxU, texMinV); + wr.addVertexWithUV(minX, maxY, maxZ, texMinU, texMinV); texMinU = getMinU(block, meta, 4); texMaxU = getMaxU(block, meta, 4); texMinV = getMinV(block, meta, 4); texMaxV = getMaxV(block, meta, 4); - tessellator.addVertexWithUV(minX, minY, minZ, texMinU, texMaxV); - tessellator.addVertexWithUV(minX, minY, maxZ, texMaxU, texMaxV); - tessellator.addVertexWithUV(minX, maxY, maxZ, texMaxU, texMinV); - tessellator.addVertexWithUV(minX, maxY, minZ, texMinU, texMinV); + wr.addVertexWithUV(minX, minY, minZ, texMinU, texMaxV); + wr.addVertexWithUV(minX, minY, maxZ, texMaxU, texMaxV); + wr.addVertexWithUV(minX, maxY, maxZ, texMaxU, texMinV); + wr.addVertexWithUV(minX, maxY, minZ, texMinU, texMinV); texMinU = getMinU(block, meta, 5); texMaxU = getMaxU(block, meta, 5); texMinV = getMinV(block, meta, 5); texMaxV = getMaxV(block, meta, 5); - tessellator.addVertexWithUV(maxX, minY, maxZ, texMinU, texMaxV); - tessellator.addVertexWithUV(maxX, minY, minZ, texMaxU, texMaxV); - tessellator.addVertexWithUV(maxX, maxY, minZ, texMaxU, texMinV); - tessellator.addVertexWithUV(maxX, maxY, maxZ, texMinU, texMinV); + wr.addVertexWithUV(maxX, minY, maxZ, texMinU, texMaxV); + wr.addVertexWithUV(maxX, minY, minZ, texMaxU, texMaxV); + wr.addVertexWithUV(maxX, maxY, minZ, texMaxU, texMinV); + wr.addVertexWithUV(maxX, maxY, maxZ, texMinU, texMinV); tessellator.draw(); } private static float getMinU(Block block, int meta, int side) { - IIcon icon = block.getIcon(side, meta); - return icon.getMinU(); + return 0; } private static float getMaxU(Block block, int meta, int side) { - IIcon icon = block.getIcon(side, meta); - return icon.getMaxU(); + return 256; } private static float getMinV(Block block, int meta, int side) { - IIcon icon = block.getIcon(side, meta); - return icon.getMinV(); + return 0; } private static float getMaxV(Block block, int meta, int side) { - IIcon icon = block.getIcon(side, meta); - return icon.getMaxV(); + return 256; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderHelper.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderHelper.java index 964feb72..502d4334 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderHelper.java @@ -7,14 +7,14 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiChat; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; @@ -179,11 +179,9 @@ public class RenderHelper { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - int x = movingobjectposition.blockX; - int y = movingobjectposition.blockY; - int z = movingobjectposition.blockZ; + BlockPos pos = movingobjectposition.func_178782_a(); - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); if (!(tile instanceof IReagentHandler)) { @@ -192,7 +190,7 @@ public class RenderHelper IReagentHandler relay = (IReagentHandler) tile; - ReagentContainerInfo[] infos = relay.getContainerInfo(ForgeDirection.getOrientation(movingobjectposition.sideHit)); + ReagentContainerInfo[] infos = relay.getContainerInfo(movingobjectposition.field_178784_b); if (infos != null) { @@ -250,12 +248,13 @@ public class RenderHelper { float f = 0.00390625F; float f1 = 0.00390625F; - Tessellator tessellator = Tessellator.instance; - tessellator.startDrawingQuads(); - tessellator.addVertexWithUV((double)p_73729_1_, p_73729_2_ + p_73729_6_, (double)zLevel, (p_73729_3_ * f), (p_73729_4_ + p_73729_6_) * f1); - tessellator.addVertexWithUV(p_73729_1_ + p_73729_5_, p_73729_2_ + p_73729_6_, (double)zLevel, (p_73729_3_ + p_73729_5_) * f, (p_73729_4_ + p_73729_6_) * f1); - tessellator.addVertexWithUV(p_73729_1_ + p_73729_5_, (double)p_73729_2_, (double)zLevel, (p_73729_3_ + p_73729_5_) * f, p_73729_4_ * f1); - tessellator.addVertexWithUV((double)p_73729_1_, (double)p_73729_2_, (double)zLevel, (double)(p_73729_3_ * f), p_73729_4_ * f1); + Tessellator tessellator = Tessellator.getInstance(); + WorldRenderer wr = tessellator.getWorldRenderer(); + wr.startDrawingQuads(); + wr.addVertexWithUV((double)p_73729_1_, p_73729_2_ + p_73729_6_, (double)zLevel, (p_73729_3_ * f), (p_73729_4_ + p_73729_6_) * f1); + wr.addVertexWithUV(p_73729_1_ + p_73729_5_, p_73729_2_ + p_73729_6_, (double)zLevel, (p_73729_3_ + p_73729_5_) * f, (p_73729_4_ + p_73729_6_) * f1); + wr.addVertexWithUV(p_73729_1_ + p_73729_5_, (double)p_73729_2_, (double)zLevel, (p_73729_3_ + p_73729_5_) * f, p_73729_4_ * f1); + wr.addVertexWithUV((double)p_73729_1_, (double)p_73729_2_, (double)zLevel, (double)(p_73729_3_ * f), p_73729_4_ * f1); tessellator.draw(); } @@ -288,17 +287,6 @@ public class RenderHelper GL11.glPopMatrix(); } - - public static void renderIcon(int p_94149_1_, int p_94149_2_, IIcon p_94149_3_, int p_94149_4_, int p_94149_5_) - { - Tessellator tessellator = Tessellator.instance; - tessellator.startDrawingQuads(); - tessellator.addVertexWithUV((double)p_94149_1_, (double)(p_94149_2_ + p_94149_5_), (double)zLevel, (double)p_94149_3_.getMinU(), (double)p_94149_3_.getMaxV()); - tessellator.addVertexWithUV((double)(p_94149_1_ + p_94149_4_), (double)(p_94149_2_ + p_94149_5_), (double)zLevel, (double)p_94149_3_.getMaxU(), (double)p_94149_3_.getMaxV()); - tessellator.addVertexWithUV((double)(p_94149_1_ + p_94149_4_), (double)p_94149_2_, (double)zLevel, (double)p_94149_3_.getMaxU(), (double)p_94149_3_.getMinV()); - tessellator.addVertexWithUV((double)p_94149_1_, (double)p_94149_2_, (double)zLevel, (double)p_94149_3_.getMinU(), (double)p_94149_3_.getMinV()); - tessellator.draw(); - } private static void displayArmorStatus(Minecraft mc) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RitualDivinerRender.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RitualDivinerRender.java index 94b0cfc1..e2ceb005 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RitualDivinerRender.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RitualDivinerRender.java @@ -1,7 +1,16 @@ package WayofTime.alchemicalWizardry.client.renderer; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; +import net.minecraftforge.client.event.RenderWorldLastEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + import org.lwjgl.opengl.GL11; import WayofTime.alchemicalWizardry.ModBlocks; @@ -11,13 +20,7 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.EntityClientPlayerMP; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; -import net.minecraftforge.client.event.RenderWorldLastEvent; + /* * Created in Scala by Alex-Hawks @@ -30,22 +33,24 @@ public class RitualDivinerRender public void render(RenderWorldLastEvent event) { Minecraft minecraft = Minecraft.getMinecraft(); - EntityClientPlayerMP player = minecraft.thePlayer; + EntityPlayer player = minecraft.thePlayer; World world = player.worldObj; if (minecraft.objectMouseOver == null || minecraft.objectMouseOver.typeOfHit != MovingObjectPosition.MovingObjectType.BLOCK) { return; } + + BlockPos pos = minecraft.objectMouseOver.func_178782_a(); - TileEntity tileEntity = world.getTileEntity(minecraft.objectMouseOver.blockX, minecraft.objectMouseOver.blockY, minecraft.objectMouseOver.blockZ); + TileEntity tileEntity = world.getTileEntity(pos); if (!(tileEntity instanceof IMasterRitualStone)) { return; } - Vector3 vec3 = new Vector3(minecraft.objectMouseOver.blockX, minecraft.objectMouseOver.blockY, minecraft.objectMouseOver.blockZ); + Vector3 vec3 = new Vector3(pos.getX(), pos.getY(), pos.getZ()); double posX = player.lastTickPosX + (player.posX - player.lastTickPosX) * event.partialTicks; double posY = player.lastTickPosY + (player.posY - player.lastTickPosY) * event.partialTicks; double posZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * event.partialTicks; @@ -71,7 +76,7 @@ public class RitualDivinerRender double minY = vX.y - posY; double minZ = vX.z - posZ; - if (!world.getBlock(vX.x, vX.y, vX.z).isOpaqueCube()) + if (!world.getBlockState(new BlockPos(vX.x, vX.y, vX.z)).getBlock().isOpaqueCube()) { RenderFakeBlocks.drawFakeBlock(vX, ModBlocks.ritualStone, ritualComponent.getStoneType(), minX, minY, minZ, world); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java index 10b04848..98b24b52 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java @@ -7,8 +7,6 @@ import java.util.List; import java.util.Map; import java.util.Random; -import WayofTime.alchemicalWizardry.common.achievements.ModAchievements; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -24,18 +22,25 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; -import net.minecraft.util.Vec3; +import net.minecraft.util.EnumParticleTypes; import net.minecraftforge.common.ISpecialArmor.ArmorProperties; import net.minecraftforge.event.AnvilUpdateEvent; import net.minecraftforge.event.entity.living.EnderTeleportEvent; import net.minecraftforge.event.entity.living.LivingAttackEvent; -import net.minecraftforge.event.entity.living.LivingDeathEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn; import net.minecraftforge.event.entity.player.EntityInteractEvent; +import net.minecraftforge.fml.client.event.ConfigChangedEvent; +import net.minecraftforge.fml.common.Optional; +import net.minecraftforge.fml.common.eventhandler.Event.Result; +import net.minecraftforge.fml.common.eventhandler.EventPriority; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; +import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.oredict.OreDictionary; import vazkii.botania.api.internal.IManaBurst; import WayofTime.alchemicalWizardry.AlchemicalWizardry; @@ -53,13 +58,7 @@ import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; import WayofTime.alchemicalWizardry.common.omega.ReagentRegenConfiguration; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import cpw.mods.fml.client.event.ConfigChangedEvent; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.eventhandler.Event.Result; -import cpw.mods.fml.common.eventhandler.EventPriority; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; -import cpw.mods.fml.common.registry.GameRegistry; + public class AlchemicalWizardryEventHooks { @@ -117,7 +116,7 @@ public class AlchemicalWizardryEventHooks float prevHp = APISpellHelper.getCurrentAdditionalHP((EntityPlayer)event.entityLiving); if(prevHp > 0) { - float recalculatedAmount = ArmorProperties.ApplyArmor(player, player.inventory.armorInventory, event.source, event.ammount); + float recalculatedAmount = ArmorProperties.applyArmor(player, player.inventory.armorInventory, event.source, event.ammount); if (recalculatedAmount <= 0) return; recalculatedAmount = SpellHelper.applyPotionDamageCalculations(player, event.source, recalculatedAmount); //Recalculated damage @@ -335,7 +334,7 @@ public class AlchemicalWizardryEventHooks String respawnRitual = "AW028SpawnWard"; - int dimension = event.world.provider.dimensionId; + int dimension = event.world.provider.getDimensionId(); if (respawnMap.containsKey(dimension)) { List<CoordAndRange> list = respawnMap.get(dimension); @@ -344,7 +343,7 @@ public class AlchemicalWizardryEventHooks { for (CoordAndRange coords : list) { - TileEntity tile = event.world.getTileEntity(coords.xCoord, coords.yCoord, coords.zCoord); + TileEntity tile = event.world.getTileEntity(coords.getPos()); if (tile instanceof TEMasterStone && ((TEMasterStone) tile).isRunning && ((TEMasterStone) tile).getCurrentRitual().equals(respawnRitual)) { @@ -388,7 +387,7 @@ public class AlchemicalWizardryEventHooks { for (CoordAndRange coords : list) { - TileEntity tile = event.world.getTileEntity(coords.xCoord, coords.yCoord, coords.zCoord); + TileEntity tile = event.world.getTileEntity(coords.getPos()); if (tile instanceof TEMasterStone && ((TEMasterStone) tile).isRunning && ((TEMasterStone) tile).getCurrentRitual().equals(forceSpawnRitual)) { @@ -508,10 +507,10 @@ public class AlchemicalWizardryEventHooks double y = entityLiving.posY; double z = entityLiving.posZ; - Vec3 blockVector = SpellHelper.getEntityBlockVector(entityLiving); - int xPos = (int) (blockVector.xCoord); - int yPos = (int) (blockVector.yCoord); - int zPos = (int) (blockVector.zCoord); + BlockPos blockVector = entityLiving.getPosition(); + int xPos = blockVector.getX(); + int yPos = blockVector.getY(); + int zPos = blockVector.getZ(); if (entityLiving instanceof EntityPlayer) { @@ -592,7 +591,7 @@ public class AlchemicalWizardryEventHooks int posY = (int) Math.round(entity.posY); int posZ = (int) Math.round(entity.posZ - 0.5f); int d0 = (int) ((i + 1) * 2.5); - AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(posX - 0.5, posY - 0.5, posZ - 0.5, posX + 0.5, posY + 0.5, posZ + 0.5).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = new AxisAlignedBB(posX - 0.5, posY - 0.5, posZ - 0.5, posX + 0.5, posY + 0.5, posZ + 0.5).expand(d0, d0, d0); List list = event.entityLiving.worldObj.getEntitiesWithinAABB(Entity.class, axisalignedbb); Iterator iterator = list.iterator(); @@ -697,7 +696,7 @@ public class AlchemicalWizardryEventHooks if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionFlameCloak)) { - entityLiving.worldObj.spawnParticle("flame", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0); + entityLiving.worldObj.spawnParticle(EnumParticleTypes.FLAME, x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0); int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFlameCloak).getAmplifier(); double range = i * 0.5; @@ -718,7 +717,7 @@ public class AlchemicalWizardryEventHooks if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionIceCloak)) { if (entityLiving.worldObj.getWorldTime() % 2 == 0) - entityLiving.worldObj.spawnParticle("reddust", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0x74, 0xbb, 0xfb); + entityLiving.worldObj.spawnParticle(EnumParticleTypes.REDSTONE, x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0x74, 0xbb, 0xfb); int r = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionIceCloak).getAmplifier(); int horizRange = r + 1; @@ -732,7 +731,7 @@ public class AlchemicalWizardryEventHooks { for (int j = -vertRange - 1; j <= vertRange - 1; j++) { - SpellHelper.freezeWaterBlock(entityLiving.worldObj, xPos + i, yPos + j, zPos + k); + SpellHelper.freezeWaterBlock(entityLiving.worldObj, new BlockPos(xPos + i, yPos + j, zPos + k)); } } } @@ -741,7 +740,7 @@ public class AlchemicalWizardryEventHooks if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionHeavyHeart)) { - entityLiving.worldObj.spawnParticle("flame", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0); + entityLiving.worldObj.spawnParticle(EnumParticleTypes.FLAME, x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0); int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionHeavyHeart).getAmplifier(); double decrease = 0.025 * (i + 1); @@ -759,7 +758,7 @@ public class AlchemicalWizardryEventHooks if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionFireFuse)) { - entityLiving.worldObj.spawnParticle("flame", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0); + entityLiving.worldObj.spawnParticle(EnumParticleTypes.FLAME, x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0); int r = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFireFuse).getAmplifier(); int radius = r + 1; @@ -791,7 +790,7 @@ public class AlchemicalWizardryEventHooks meta = 0; if (block != null) - if (( block == event.initialBlock || block == event.finalBlock) && (meta == event.initialMetadata || meta == event.finalMetadata || meta == OreDictionary.WILDCARD_VALUE)) + if ((block == event.initialBlock || block == event.finalBlock) && (meta == event.initialBlock.getMetaFromState(event.initialState) || meta == event.finalBlock.getMetaFromState(event.finalState) || meta == OreDictionary.WILDCARD_VALUE)) event.setCanceled(true); // If the block uses shorthand syntax: modid:blockname @@ -801,31 +800,12 @@ public class AlchemicalWizardryEventHooks int meta = 0; if (block != null) - if (( block == event.initialBlock || block == event.finalBlock) && (meta == event.initialMetadata || meta == event.finalMetadata || meta == OreDictionary.WILDCARD_VALUE)) + if (( block == event.initialBlock || block == event.finalBlock) && (meta == event.initialBlock.getMetaFromState(event.initialState) || meta == event.finalBlock.getMetaFromState(event.finalState) || meta == OreDictionary.WILDCARD_VALUE)) event.setCanceled(true); } } } - @SubscribeEvent - public void onEntityDeath(LivingDeathEvent event) - { - EntityLivingBase entityLiving = event.entityLiving; - - if (entityLiving instanceof IDemon && event.source.getEntity() instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) event.source.getEntity(); - - player.addStat(ModAchievements.demonSpawn, 1); - } - if (entityLiving instanceof IHoardDemon && event.source.getEntity() instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) event.source.getEntity(); - - player.addStat(ModAchievements.demons, 1); - } - } - @SubscribeEvent public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) { if (event.modID.equals("AWWayofTime")) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryFuelHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryFuelHandler.java index 5a09d2b2..730ac5cd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryFuelHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryFuelHandler.java @@ -1,9 +1,5 @@ package WayofTime.alchemicalWizardry.common; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.items.LavaCrystal; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.common.IFuelHandler; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -11,6 +7,10 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; +import net.minecraftforge.fml.common.IFuelHandler; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.items.LavaCrystal; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class AlchemicalWizardryFuelHandler implements IFuelHandler { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/CoordAndRange.java b/src/main/java/WayofTime/alchemicalWizardry/common/CoordAndRange.java index f4a89a65..a388a048 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/CoordAndRange.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/CoordAndRange.java @@ -1,5 +1,7 @@ package WayofTime.alchemicalWizardry.common; +import net.minecraft.util.BlockPos; + public class CoordAndRange { public int xCoord; @@ -8,6 +10,11 @@ public class CoordAndRange public int horizRadius; public int vertRadius; + public CoordAndRange(BlockPos pos, int horiz, int vert) + { + this(pos.getX(), pos.getY(), pos.getZ(), horiz, vert); + } + public CoordAndRange(int x, int y, int z, int horiz, int vert) { this.xCoord = x; @@ -16,6 +23,11 @@ public class CoordAndRange this.horizRadius = horiz; this.vertRadius = vert; } + + public BlockPos getPos() + { + return new BlockPos(xCoord, yCoord, zCoord); + } @Override public boolean equals(Object o) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggro.java b/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggro.java index 2b6fb25a..1396e5ae 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggro.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggro.java @@ -9,7 +9,7 @@ public class EntityAITargetAggro extends EntityAINearestAttackableTarget public EntityAITargetAggro(EntityDemon par1EntityDemon, Class par2Class, int par3, boolean par4) { - super(par1EntityDemon, par2Class, par3, par4); + super(par1EntityDemon, par2Class, par4); this.theCreature = par1EntityDemon; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/ItemType.java b/src/main/java/WayofTime/alchemicalWizardry/common/ItemType.java index e71dabe0..9ec2079b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/ItemType.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/ItemType.java @@ -53,7 +53,7 @@ public class ItemType public ItemStack createStack(int count) { ItemStack result = new ItemStack(item, count, meta); - result.stackTagCompound = nbtTag; + result.setTagCompound(nbtTag); return result; } @@ -87,7 +87,7 @@ public class ItemType public static ItemType fromStack(ItemStack stack) { - return new ItemType(stack.getItem(), stack.getItemDamage(), stack.stackTagCompound); + return new ItemType(stack.getItem(), stack.getItemDamage(), stack.getTagCompound()); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/LifeBucketHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/LifeBucketHandler.java index 3552f251..fada6f98 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/LifeBucketHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/LifeBucketHandler.java @@ -1,14 +1,15 @@ package WayofTime.alchemicalWizardry.common; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.ModItems; -import cpw.mods.fml.common.eventhandler.Event.Result; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.event.entity.player.FillBucketEvent; +import net.minecraftforge.fml.common.eventhandler.Event.Result; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.ModItems; public class LifeBucketHandler { @@ -28,11 +29,12 @@ public class LifeBucketHandler public ItemStack fillCustomBucket(World world, MovingObjectPosition pos) { - Block block = world.getBlock(pos.blockX, pos.blockY, pos.blockZ); + IBlockState state = world.getBlockState(pos.func_178782_a()); + Block block = state.getBlock(); - if (block != null && (block.equals(ModBlocks.blockLifeEssence)) && world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) == 0) + if (block != null && (block.equals(ModBlocks.blockLifeEssence)) && block.getMetaFromState(state) == 0) { - world.setBlockToAir(pos.blockX, pos.blockY, pos.blockZ); + world.setBlockToAir(pos.func_178782_a()); return new ItemStack(ModItems.bucketLife); } else { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/LifeEssence.java b/src/main/java/WayofTime/alchemicalWizardry/common/LifeEssence.java index 1892168e..fdc69542 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/LifeEssence.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/LifeEssence.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.common; import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; public class LifeEssence extends Fluid { @@ -19,7 +18,7 @@ public class LifeEssence extends Fluid } @Override - public String getLocalizedName(FluidStack fluidStack) + public String getLocalizedName() { return "Life Essence"; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java index 5bdc65e4..aed92485 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java @@ -13,9 +13,12 @@ import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.network.Packet; +import net.minecraft.network.PacketBuffer; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.ColourAndCoords; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; @@ -95,7 +98,7 @@ public enum NewPacketHandler protected void channelRead0(ChannelHandlerContext ctx, TEAltarMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z); + TileEntity te = world.getTileEntity(msg.pos); if (te instanceof TEAltar) { TEAltar altar = (TEAltar) te; @@ -111,11 +114,11 @@ public enum NewPacketHandler protected void channelRead0(ChannelHandlerContext ctx, TEOrientableMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z); + TileEntity te = world.getTileEntity(msg.pos); if (te instanceof TEOrientable) { - ((TEOrientable) te).setInputDirection(ForgeDirection.getOrientation(msg.input)); - ((TEOrientable) te).setOutputDirection(ForgeDirection.getOrientation(msg.output)); + ((TEOrientable) te).setInputDirection(EnumFacing.getFront(msg.input)); + ((TEOrientable) te).setOutputDirection(EnumFacing.getFront(msg.output)); } } } @@ -126,7 +129,7 @@ public enum NewPacketHandler protected void channelRead0(ChannelHandlerContext ctx, TEPedestalMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z); + TileEntity te = world.getTileEntity(msg.pos); if (te instanceof TEPedestal) { TEPedestal pedestal = (TEPedestal) te; @@ -142,7 +145,7 @@ public enum NewPacketHandler protected void channelRead0(ChannelHandlerContext ctx, TEPlinthMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z); + TileEntity te = world.getTileEntity(msg.pos); if (te instanceof TEPlinth) { TEPlinth Plinth = (TEPlinth) te; @@ -158,7 +161,7 @@ public enum NewPacketHandler protected void channelRead0(ChannelHandlerContext ctx, TESocketMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z); + TileEntity te = world.getTileEntity(msg.pos); if (te instanceof TESocket) { TESocket Socket = (TESocket) te; @@ -174,7 +177,7 @@ public enum NewPacketHandler protected void channelRead0(ChannelHandlerContext ctx, TETeleposerMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z); + TileEntity te = world.getTileEntity(msg.pos); if (te instanceof TETeleposer) { TETeleposer Teleposer = (TETeleposer) te; @@ -190,7 +193,7 @@ public enum NewPacketHandler protected void channelRead0(ChannelHandlerContext ctx, TEWritingTableMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z); + TileEntity te = world.getTileEntity(msg.pos); if (te instanceof TEWritingTable) { TEWritingTable WritingTable = (TEWritingTable) te; @@ -207,7 +210,7 @@ public enum NewPacketHandler { World world = AlchemicalWizardry.proxy.getClientWorld(); - world.spawnParticle(msg.particle, msg.xCoord, msg.yCoord, msg.zCoord, msg.xVel, msg.yVel, msg.zVel); + world.spawnParticle(EnumParticleTypes.func_179342_a(msg.particle), msg.xCoord, msg.yCoord, msg.zCoord, msg.xVel, msg.yVel, msg.zVel); } } @@ -233,7 +236,7 @@ public enum NewPacketHandler protected void channelRead0(ChannelHandlerContext ctx, TEMasterStoneMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z); + TileEntity te = world.getTileEntity(msg.pos); if (te instanceof TEMasterStone) { TEMasterStone masterStone = (TEMasterStone) te; @@ -250,7 +253,7 @@ public enum NewPacketHandler protected void channelRead0(ChannelHandlerContext ctx, TEReagentConduitMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z); + TileEntity te = world.getTileEntity(msg.pos); if (te instanceof TEReagentConduit) { TEReagentConduit reagentConduit = (TEReagentConduit) te; @@ -318,9 +321,7 @@ public enum NewPacketHandler public static class TEAltarMessage extends BMMessage { - int x; - int y; - int z; + BlockPos pos; int[] items; int[] fluids; @@ -329,9 +330,7 @@ public enum NewPacketHandler public static class TEOrientableMessage extends BMMessage { - int x; - int y; - int z; + BlockPos pos; int input; int output; @@ -339,52 +338,42 @@ public enum NewPacketHandler public static class TEPedestalMessage extends BMMessage { - int x; - int y; - int z; + BlockPos pos; int[] items; } public static class TEPlinthMessage extends BMMessage { - int x; - int y; - int z; + BlockPos pos; int[] items; } public static class TESocketMessage extends BMMessage { - int x; - int y; - int z; + BlockPos pos; int[] items; } public static class TETeleposerMessage extends BMMessage { - int x; - int y; - int z; + BlockPos pos; int[] items; } public static class TEWritingTableMessage extends BMMessage { - int x; - int y; - int z; + BlockPos pos; int[] items; } public static class ParticleMessage extends BMMessage { - String particle; + int particle; double xCoord; double yCoord; @@ -404,9 +393,7 @@ public enum NewPacketHandler public static class TEMasterStoneMessage extends BMMessage { - int x; - int y; - int z; + BlockPos pos; String ritual; boolean isRunning; @@ -414,9 +401,7 @@ public enum NewPacketHandler public static class TEReagentConduitMessage extends BMMessage { - int x; - int y; - int z; + BlockPos pos; List<ColourAndCoords> destinationList; } @@ -501,231 +486,209 @@ public enum NewPacketHandler @Override public void encodeInto(ChannelHandlerContext ctx, BMMessage msg, ByteBuf target) throws Exception { - target.writeInt(msg.index); + PacketBuffer newBuffer = new PacketBuffer(target); + newBuffer.writeInt(msg.index); switch (msg.index) { case 0: - target.writeInt(((TEAltarMessage) msg).x); - target.writeInt(((TEAltarMessage) msg).y); - target.writeInt(((TEAltarMessage) msg).z); + newBuffer.writeBlockPos(((TEAltarMessage) msg).pos); - target.writeBoolean(((TEAltarMessage) msg).items != null); + newBuffer.writeBoolean(((TEAltarMessage) msg).items != null); if (((TEAltarMessage) msg).items != null) { int[] items = ((TEAltarMessage) msg).items; for (int j = 0; j < items.length; j++) { int i = items[j]; - target.writeInt(i); + newBuffer.writeInt(i); } } - target.writeBoolean(((TEAltarMessage) msg).fluids != null); + newBuffer.writeBoolean(((TEAltarMessage) msg).fluids != null); if (((TEAltarMessage) msg).fluids != null) { int[] fluids = ((TEAltarMessage) msg).fluids; for (int j = 0; j < fluids.length; j++) { int i = fluids[j]; - target.writeInt(i); + newBuffer.writeInt(i); } } - target.writeInt(((TEAltarMessage) msg).capacity); + newBuffer.writeInt(((TEAltarMessage) msg).capacity); break; case 1: - target.writeInt(((TEOrientableMessage) msg).x); - target.writeInt(((TEOrientableMessage) msg).y); - target.writeInt(((TEOrientableMessage) msg).z); + newBuffer.writeBlockPos(((TEOrientableMessage) msg).pos); - target.writeInt(((TEOrientableMessage) msg).input); - target.writeInt(((TEOrientableMessage) msg).output); + newBuffer.writeInt(((TEOrientableMessage) msg).input); + newBuffer.writeInt(((TEOrientableMessage) msg).output); break; case 2: - target.writeInt(((TEPedestalMessage) msg).x); - target.writeInt(((TEPedestalMessage) msg).y); - target.writeInt(((TEPedestalMessage) msg).z); + newBuffer.writeBlockPos(((TEPedestalMessage) msg).pos); - target.writeBoolean(((TEPedestalMessage) msg).items != null); + newBuffer.writeBoolean(((TEPedestalMessage) msg).items != null); if (((TEPedestalMessage) msg).items != null) { int[] items = ((TEPedestalMessage) msg).items; for (int j = 0; j < items.length; j++) { int i = items[j]; - target.writeInt(i); + newBuffer.writeInt(i); } } break; case 3: - target.writeInt(((TEPlinthMessage) msg).x); - target.writeInt(((TEPlinthMessage) msg).y); - target.writeInt(((TEPlinthMessage) msg).z); + newBuffer.writeBlockPos(((TEPlinthMessage) msg).pos); - target.writeBoolean(((TEPlinthMessage) msg).items != null); + newBuffer.writeBoolean(((TEPlinthMessage) msg).items != null); if (((TEPlinthMessage) msg).items != null) { int[] items = ((TEPlinthMessage) msg).items; for (int j = 0; j < items.length; j++) { int i = items[j]; - target.writeInt(i); + newBuffer.writeInt(i); } } break; case 4: - target.writeInt(((TESocketMessage) msg).x); - target.writeInt(((TESocketMessage) msg).y); - target.writeInt(((TESocketMessage) msg).z); + newBuffer.writeBlockPos(((TESocketMessage) msg).pos); - target.writeBoolean(((TESocketMessage) msg).items != null); + newBuffer.writeBoolean(((TESocketMessage) msg).items != null); if (((TESocketMessage) msg).items != null) { int[] items = ((TESocketMessage) msg).items; for (int j = 0; j < items.length; j++) { int i = items[j]; - target.writeInt(i); + newBuffer.writeInt(i); } } break; case 5: - target.writeInt(((TETeleposerMessage) msg).x); - target.writeInt(((TETeleposerMessage) msg).y); - target.writeInt(((TETeleposerMessage) msg).z); + newBuffer.writeBlockPos(((TETeleposerMessage) msg).pos); - target.writeBoolean(((TETeleposerMessage) msg).items != null); + newBuffer.writeBoolean(((TETeleposerMessage) msg).items != null); if (((TETeleposerMessage) msg).items != null) { int[] items = ((TETeleposerMessage) msg).items; for (int j = 0; j < items.length; j++) { int i = items[j]; - target.writeInt(i); + newBuffer.writeInt(i); } } break; case 6: - target.writeInt(((TEWritingTableMessage) msg).x); - target.writeInt(((TEWritingTableMessage) msg).y); - target.writeInt(((TEWritingTableMessage) msg).z); + newBuffer.writeBlockPos(((TEWritingTableMessage) msg).pos); - target.writeBoolean(((TEWritingTableMessage) msg).items != null); + newBuffer.writeBoolean(((TEWritingTableMessage) msg).items != null); if (((TEWritingTableMessage) msg).items != null) { int[] items = ((TEWritingTableMessage) msg).items; for (int j = 0; j < items.length; j++) { int i = items[j]; - target.writeInt(i); + newBuffer.writeInt(i); } } break; case 7: - String str = ((ParticleMessage) msg).particle; - target.writeInt(str.length()); - for (int i = 0; i < str.length(); i++) - { - target.writeChar(str.charAt(i)); - } + newBuffer.writeInt(((ParticleMessage) msg).particle); - target.writeDouble(((ParticleMessage) msg).xCoord); - target.writeDouble(((ParticleMessage) msg).yCoord); - target.writeDouble(((ParticleMessage) msg).zCoord); + newBuffer.writeDouble(((ParticleMessage) msg).xCoord); + newBuffer.writeDouble(((ParticleMessage) msg).yCoord); + newBuffer.writeDouble(((ParticleMessage) msg).zCoord); - target.writeDouble(((ParticleMessage) msg).xVel); - target.writeDouble(((ParticleMessage) msg).yVel); - target.writeDouble(((ParticleMessage) msg).zVel); + newBuffer.writeDouble(((ParticleMessage) msg).xVel); + newBuffer.writeDouble(((ParticleMessage) msg).yVel); + newBuffer.writeDouble(((ParticleMessage) msg).zVel); break; case 8: - target.writeDouble(((VelocityMessage) msg).xVel); - target.writeDouble(((VelocityMessage) msg).yVel); - target.writeDouble(((VelocityMessage) msg).zVel); + newBuffer.writeDouble(((VelocityMessage) msg).xVel); + newBuffer.writeDouble(((VelocityMessage) msg).yVel); + newBuffer.writeDouble(((VelocityMessage) msg).zVel); break; case 9: - target.writeInt(((TEMasterStoneMessage) msg).x); - target.writeInt(((TEMasterStoneMessage) msg).y); - target.writeInt(((TEMasterStoneMessage) msg).z); + newBuffer.writeBlockPos(((TEMasterStoneMessage) msg).pos); String ritual = ((TEMasterStoneMessage) msg).ritual; - target.writeInt(ritual.length()); + newBuffer.writeInt(ritual.length()); for (int i = 0; i < ritual.length(); i++) { - target.writeChar(ritual.charAt(i)); + newBuffer.writeChar(ritual.charAt(i)); } - target.writeBoolean(((TEMasterStoneMessage) msg).isRunning); + newBuffer.writeBoolean(((TEMasterStoneMessage) msg).isRunning); break; case 10: - target.writeInt(((TEReagentConduitMessage) msg).x); - target.writeInt(((TEReagentConduitMessage) msg).y); - target.writeInt(((TEReagentConduitMessage) msg).z); + newBuffer.writeBlockPos(((TEReagentConduitMessage) msg).pos); List<ColourAndCoords> list = ((TEReagentConduitMessage) msg).destinationList; - target.writeInt(list.size()); + newBuffer.writeInt(list.size()); for (ColourAndCoords colourSet : list) { - target.writeInt(colourSet.colourRed); - target.writeInt(colourSet.colourGreen); - target.writeInt(colourSet.colourBlue); - target.writeInt(colourSet.colourIntensity); - target.writeInt(colourSet.xCoord); - target.writeInt(colourSet.yCoord); - target.writeInt(colourSet.zCoord); + newBuffer.writeInt(colourSet.colourRed); + newBuffer.writeInt(colourSet.colourGreen); + newBuffer.writeInt(colourSet.colourBlue); + newBuffer.writeInt(colourSet.colourIntensity); + newBuffer.writeInt(colourSet.xCoord); + newBuffer.writeInt(colourSet.yCoord); + newBuffer.writeInt(colourSet.zCoord); } break; case 11: - target.writeInt(((CurrentLPMessage) msg).currentLP); - target.writeInt(((CurrentLPMessage) msg).maxLP); + newBuffer.writeInt(((CurrentLPMessage) msg).currentLP); + newBuffer.writeInt(((CurrentLPMessage) msg).maxLP); break; case 12: char[] charSet = ((CurrentReagentBarMessage)msg).reagent.toCharArray(); - target.writeInt(charSet.length); + newBuffer.writeInt(charSet.length); for(char cha : charSet) { - target.writeChar(cha); + newBuffer.writeChar(cha); } - target.writeFloat(((CurrentReagentBarMessage)msg).currentAR); - target.writeFloat(((CurrentReagentBarMessage)msg).maxAR); + newBuffer.writeFloat(((CurrentReagentBarMessage)msg).currentAR); + newBuffer.writeFloat(((CurrentReagentBarMessage)msg).maxAR); break; case 13: - target.writeFloat(((CurrentAddedHPMessage) msg).currentHP); - target.writeFloat(((CurrentAddedHPMessage) msg).maxHP); + newBuffer.writeFloat(((CurrentAddedHPMessage) msg).currentHP); + newBuffer.writeFloat(((CurrentAddedHPMessage) msg).maxHP); break; case 14: System.out.println("Packet is being encoded"); - target.writeByte(((KeyboardMessage)msg).keyPressed); + newBuffer.writeByte(((KeyboardMessage)msg).keyPressed); break; } } @@ -734,15 +697,14 @@ public enum NewPacketHandler @Override public void decodeInto(ChannelHandlerContext ctx, ByteBuf dat, BMMessage msg) { - int index = dat.readInt(); + PacketBuffer newBuffer = new PacketBuffer(dat); + int index = newBuffer.readInt(); switch (index) { case 0: - ((TEAltarMessage) msg).x = dat.readInt(); - ((TEAltarMessage) msg).y = dat.readInt(); - ((TEAltarMessage) msg).z = dat.readInt(); - boolean hasStacks = dat.readBoolean(); + ((TEAltarMessage) msg).pos = newBuffer.readBlockPos(); + boolean hasStacks = newBuffer.readBoolean(); ((TEAltarMessage) msg).items = new int[TEAltar.sizeInv * 3]; if (hasStacks) @@ -750,38 +712,34 @@ public enum NewPacketHandler ((TEAltarMessage) msg).items = new int[TEAltar.sizeInv * 3]; for (int i = 0; i < ((TEAltarMessage) msg).items.length; i++) { - ((TEAltarMessage) msg).items[i] = dat.readInt(); + ((TEAltarMessage) msg).items[i] = newBuffer.readInt(); } } - boolean hasFluids = dat.readBoolean(); + boolean hasFluids = newBuffer.readBoolean(); ((TEAltarMessage) msg).fluids = new int[6]; if (hasFluids) for (int i = 0; i < ((TEAltarMessage) msg).fluids.length; i++) { - ((TEAltarMessage) msg).fluids[i] = dat.readInt(); + ((TEAltarMessage) msg).fluids[i] = newBuffer.readInt(); } - ((TEAltarMessage) msg).capacity = dat.readInt(); + ((TEAltarMessage) msg).capacity = newBuffer.readInt(); break; case 1: - ((TEOrientableMessage) msg).x = dat.readInt(); - ((TEOrientableMessage) msg).y = dat.readInt(); - ((TEOrientableMessage) msg).z = dat.readInt(); + ((TEOrientableMessage) msg).pos = newBuffer.readBlockPos(); - ((TEOrientableMessage) msg).input = dat.readInt(); - ((TEOrientableMessage) msg).output = dat.readInt(); + ((TEOrientableMessage) msg).input = newBuffer.readInt(); + ((TEOrientableMessage) msg).output = newBuffer.readInt(); break; case 2: - ((TEPedestalMessage) msg).x = dat.readInt(); - ((TEPedestalMessage) msg).y = dat.readInt(); - ((TEPedestalMessage) msg).z = dat.readInt(); + ((TEPedestalMessage) msg).pos = newBuffer.readBlockPos(); - boolean hasStacks1 = dat.readBoolean(); + boolean hasStacks1 = newBuffer.readBoolean(); ((TEPedestalMessage) msg).items = new int[TEPedestal.sizeInv * 3]; if (hasStacks1) @@ -789,18 +747,16 @@ public enum NewPacketHandler ((TEPedestalMessage) msg).items = new int[TEPedestal.sizeInv * 3]; for (int i = 0; i < ((TEPedestalMessage) msg).items.length; i++) { - ((TEPedestalMessage) msg).items[i] = dat.readInt(); + ((TEPedestalMessage) msg).items[i] = newBuffer.readInt(); } } break; case 3: - ((TEPlinthMessage) msg).x = dat.readInt(); - ((TEPlinthMessage) msg).y = dat.readInt(); - ((TEPlinthMessage) msg).z = dat.readInt(); + ((TEPlinthMessage) msg).pos = newBuffer.readBlockPos(); - boolean hasStacks2 = dat.readBoolean(); + boolean hasStacks2 = newBuffer.readBoolean(); ((TEPlinthMessage) msg).items = new int[TEPlinth.sizeInv * 3]; if (hasStacks2) @@ -808,18 +764,16 @@ public enum NewPacketHandler ((TEPlinthMessage) msg).items = new int[TEPlinth.sizeInv * 3]; for (int i = 0; i < ((TEPlinthMessage) msg).items.length; i++) { - ((TEPlinthMessage) msg).items[i] = dat.readInt(); + ((TEPlinthMessage) msg).items[i] = newBuffer.readInt(); } } break; case 4: - ((TESocketMessage) msg).x = dat.readInt(); - ((TESocketMessage) msg).y = dat.readInt(); - ((TESocketMessage) msg).z = dat.readInt(); + ((TESocketMessage) msg).pos = newBuffer.readBlockPos(); - boolean hasStacks3 = dat.readBoolean(); + boolean hasStacks3 = newBuffer.readBoolean(); ((TESocketMessage) msg).items = new int[TESocket.sizeInv * 3]; if (hasStacks3) @@ -827,18 +781,16 @@ public enum NewPacketHandler ((TESocketMessage) msg).items = new int[TESocket.sizeInv * 3]; for (int i = 0; i < ((TESocketMessage) msg).items.length; i++) { - ((TESocketMessage) msg).items[i] = dat.readInt(); + ((TESocketMessage) msg).items[i] = newBuffer.readInt(); } } break; case 5: - ((TETeleposerMessage) msg).x = dat.readInt(); - ((TETeleposerMessage) msg).y = dat.readInt(); - ((TETeleposerMessage) msg).z = dat.readInt(); + ((TETeleposerMessage) msg).pos = newBuffer.readBlockPos(); - boolean hasStacks4 = dat.readBoolean(); + boolean hasStacks4 = newBuffer.readBoolean(); ((TETeleposerMessage) msg).items = new int[TETeleposer.sizeInv * 3]; if (hasStacks4) @@ -846,18 +798,16 @@ public enum NewPacketHandler ((TETeleposerMessage) msg).items = new int[TETeleposer.sizeInv * 3]; for (int i = 0; i < ((TETeleposerMessage) msg).items.length; i++) { - ((TETeleposerMessage) msg).items[i] = dat.readInt(); + ((TETeleposerMessage) msg).items[i] = newBuffer.readInt(); } } break; case 6: - ((TEWritingTableMessage) msg).x = dat.readInt(); - ((TEWritingTableMessage) msg).y = dat.readInt(); - ((TEWritingTableMessage) msg).z = dat.readInt(); + ((TEWritingTableMessage) msg).pos = newBuffer.readBlockPos(); - boolean hasStacks5 = dat.readBoolean(); + boolean hasStacks5 = newBuffer.readBoolean(); ((TEWritingTableMessage) msg).items = new int[TEWritingTable.sizeInv * 3]; if (hasStacks5) @@ -865,70 +815,58 @@ public enum NewPacketHandler ((TEWritingTableMessage) msg).items = new int[TEWritingTable.sizeInv * 3]; for (int i = 0; i < ((TEWritingTableMessage) msg).items.length; i++) { - ((TEWritingTableMessage) msg).items[i] = dat.readInt(); + ((TEWritingTableMessage) msg).items[i] = newBuffer.readInt(); } } break; case 7: - int size = dat.readInt(); - String str = ""; + ((ParticleMessage) msg).particle = newBuffer.readInt(); - for (int i = 0; i < size; i++) - { - str = str + dat.readChar(); - } + ((ParticleMessage) msg).xCoord = newBuffer.readDouble(); + ((ParticleMessage) msg).yCoord = newBuffer.readDouble(); + ((ParticleMessage) msg).zCoord = newBuffer.readDouble(); - ((ParticleMessage) msg).particle = str; - - ((ParticleMessage) msg).xCoord = dat.readDouble(); - ((ParticleMessage) msg).yCoord = dat.readDouble(); - ((ParticleMessage) msg).zCoord = dat.readDouble(); - - ((ParticleMessage) msg).xVel = dat.readDouble(); - ((ParticleMessage) msg).yVel = dat.readDouble(); - ((ParticleMessage) msg).zVel = dat.readDouble(); + ((ParticleMessage) msg).xVel = newBuffer.readDouble(); + ((ParticleMessage) msg).yVel = newBuffer.readDouble(); + ((ParticleMessage) msg).zVel = newBuffer.readDouble(); break; case 8: - ((VelocityMessage) msg).xVel = dat.readDouble(); - ((VelocityMessage) msg).yVel = dat.readDouble(); - ((VelocityMessage) msg).zVel = dat.readDouble(); + ((VelocityMessage) msg).xVel = newBuffer.readDouble(); + ((VelocityMessage) msg).yVel = newBuffer.readDouble(); + ((VelocityMessage) msg).zVel = newBuffer.readDouble(); break; case 9: - ((TEMasterStoneMessage) msg).x = dat.readInt(); - ((TEMasterStoneMessage) msg).y = dat.readInt(); - ((TEMasterStoneMessage) msg).z = dat.readInt(); + ((TEMasterStoneMessage) msg).pos = newBuffer.readBlockPos(); - int ritualStrSize = dat.readInt(); + int ritualStrSize = newBuffer.readInt(); String ritual = ""; for (int i = 0; i < ritualStrSize; i++) { - ritual = ritual + dat.readChar(); + ritual = ritual + newBuffer.readChar(); } ((TEMasterStoneMessage) msg).ritual = ritual; - ((TEMasterStoneMessage) msg).isRunning = dat.readBoolean(); + ((TEMasterStoneMessage) msg).isRunning = newBuffer.readBoolean(); break; case 10: - ((TEReagentConduitMessage) msg).x = dat.readInt(); - ((TEReagentConduitMessage) msg).y = dat.readInt(); - ((TEReagentConduitMessage) msg).z = dat.readInt(); - - int listSize = dat.readInt(); + ((TEReagentConduitMessage) msg).pos = newBuffer.readBlockPos(); + + int listSize = newBuffer.readInt(); List<ColourAndCoords> list = new LinkedList(); for (int i = 0; i < listSize; i++) { - list.add(new ColourAndCoords(dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt())); + list.add(new ColourAndCoords(newBuffer.readInt(), newBuffer.readInt(), newBuffer.readInt(), newBuffer.readInt(), newBuffer.readInt(), newBuffer.readInt(), newBuffer.readInt())); } ((TEReagentConduitMessage) msg).destinationList = list; @@ -936,34 +874,34 @@ public enum NewPacketHandler break; case 11: - ((CurrentLPMessage) msg).currentLP = dat.readInt(); - ((CurrentLPMessage) msg).maxLP = dat.readInt(); + ((CurrentLPMessage) msg).currentLP = newBuffer.readInt(); + ((CurrentLPMessage) msg).maxLP = newBuffer.readInt(); break; case 12: - int size1 = dat.readInt(); + int size1 = newBuffer.readInt(); String str1 = ""; for(int i=0; i<size1; i++) { - str1 = str1 + dat.readChar(); + str1 = str1 + newBuffer.readChar(); } ((CurrentReagentBarMessage) msg).reagent = str1; - ((CurrentReagentBarMessage) msg).currentAR = dat.readFloat(); - ((CurrentReagentBarMessage) msg).maxAR = dat.readFloat(); + ((CurrentReagentBarMessage) msg).currentAR = newBuffer.readFloat(); + ((CurrentReagentBarMessage) msg).maxAR = newBuffer.readFloat(); break; case 13: - ((CurrentAddedHPMessage) msg).currentHP = dat.readFloat(); - ((CurrentAddedHPMessage) msg).maxHP = dat.readFloat(); + ((CurrentAddedHPMessage) msg).currentHP = newBuffer.readFloat(); + ((CurrentAddedHPMessage) msg).maxHP = newBuffer.readFloat(); break; case 14: System.out.println("Packet recieved: being decoded"); - ((KeyboardMessage)msg).keyPressed = dat.readByte(); + ((KeyboardMessage)msg).keyPressed = newBuffer.readByte(); break; } } @@ -974,9 +912,7 @@ public enum NewPacketHandler { TEAltarMessage msg = new TEAltarMessage(); msg.index = 0; - msg.x = tileAltar.xCoord; - msg.y = tileAltar.yCoord; - msg.z = tileAltar.zCoord; + msg.pos = tileAltar.getPos(); msg.items = tileAltar.buildIntDataList(); msg.fluids = tileAltar.buildFluidList(); msg.capacity = tileAltar.getCapacity(); @@ -988,11 +924,9 @@ public enum NewPacketHandler { TEOrientableMessage msg = new TEOrientableMessage(); msg.index = 1; - msg.x = tileOrientable.xCoord; - msg.y = tileOrientable.yCoord; - msg.z = tileOrientable.zCoord; - msg.input = tileOrientable.getIntForForgeDirection(tileOrientable.getInputDirection()); - msg.output = tileOrientable.getIntForForgeDirection(tileOrientable.getOutputDirection()); + msg.pos = tileOrientable.getPos(); + msg.input = tileOrientable.getIntForEnumFacing(tileOrientable.getInputDirection()); + msg.output = tileOrientable.getIntForEnumFacing(tileOrientable.getOutputDirection()); return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg); } @@ -1001,9 +935,7 @@ public enum NewPacketHandler { TEPedestalMessage msg = new TEPedestalMessage(); msg.index = 2; - msg.x = tilePedestal.xCoord; - msg.y = tilePedestal.yCoord; - msg.z = tilePedestal.zCoord; + msg.pos = tilePedestal.getPos(); msg.items = tilePedestal.buildIntDataList(); return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg); @@ -1013,9 +945,7 @@ public enum NewPacketHandler { TEPlinthMessage msg = new TEPlinthMessage(); msg.index = 3; - msg.x = tilePlinth.xCoord; - msg.y = tilePlinth.yCoord; - msg.z = tilePlinth.zCoord; + msg.pos = tilePlinth.getPos(); msg.items = tilePlinth.buildIntDataList(); return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg); @@ -1025,9 +955,7 @@ public enum NewPacketHandler { TESocketMessage msg = new TESocketMessage(); msg.index = 4; - msg.x = tileSocket.xCoord; - msg.y = tileSocket.yCoord; - msg.z = tileSocket.zCoord; + msg.pos = tileSocket.getPos(); msg.items = tileSocket.buildIntDataList(); return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg); @@ -1037,9 +965,7 @@ public enum NewPacketHandler { TETeleposerMessage msg = new TETeleposerMessage(); msg.index = 5; - msg.x = tileTeleposer.xCoord; - msg.y = tileTeleposer.yCoord; - msg.z = tileTeleposer.zCoord; + msg.pos = tileTeleposer.getPos(); msg.items = tileTeleposer.buildIntDataList(); return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg); @@ -1049,19 +975,17 @@ public enum NewPacketHandler { TEWritingTableMessage msg = new TEWritingTableMessage(); msg.index = 6; - msg.x = tileWritingTable.xCoord; - msg.y = tileWritingTable.yCoord; - msg.z = tileWritingTable.zCoord; + msg.pos = tileWritingTable.getPos(); msg.items = tileWritingTable.buildIntDataList(); return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg); } - public static Packet getParticlePacket(String str, double xCoord, double yCoord, double zCoord, double xVel, double yVel, double zVel) + public static Packet getParticlePacket(EnumParticleTypes type, double xCoord, double yCoord, double zCoord, double xVel, double yVel, double zVel) { ParticleMessage msg = new ParticleMessage(); msg.index = 7; - msg.particle = str; + msg.particle = type.ordinal(); msg.xCoord = xCoord; msg.yCoord = yCoord; msg.zCoord = zCoord; @@ -1087,9 +1011,7 @@ public enum NewPacketHandler { TEMasterStoneMessage msg = new TEMasterStoneMessage(); msg.index = 9; - msg.x = tile.xCoord; - msg.y = tile.yCoord; - msg.z = tile.zCoord; + msg.pos = tile.getPos(); msg.ritual = tile.getCurrentRitual(); msg.isRunning = tile.isRunning; @@ -1101,9 +1023,7 @@ public enum NewPacketHandler { TEReagentConduitMessage msg = new TEReagentConduitMessage(); msg.index = 10; - msg.x = tile.xCoord; - msg.y = tile.yCoord; - msg.z = tile.zCoord; + msg.pos = tile.getPos(); msg.destinationList = tile.destinationList; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementTrigger.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementTrigger.java index c5f3c932..e05804aa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementTrigger.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementTrigger.java @@ -3,7 +3,6 @@ package WayofTime.alchemicalWizardry.common.achievements; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.PlayerEvent; import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.stats.Achievement; @@ -33,25 +32,13 @@ public class AchievementTrigger { for (Item item : AchievementsRegistry.craftinglist) { - if (event.crafting != null) + if (event.crafting != null && event.crafting.getItem() == item) { - if (event.crafting.getItem() == item) - { - Achievement achievement = AchievementsRegistry.getAchievementForItem(event.crafting.getItem()); + Achievement achievement = AchievementsRegistry.getAchievementForItem(event.crafting.getItem()); - if (achievement != null) - { - event.player.addStat(achievement, 1); - } - } - if (event.crafting.getItem() instanceof ItemBlock) + if (achievement != null) { - Achievement achievement = AchievementsRegistry.getAchievementForBlock(((ItemBlock) event.crafting.getItem()).field_150939_a); - - if (achievement != null) - { - event.player.addStat(achievement, 1); - } + event.player.addStat(achievement, 1); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsRegistry.java index 02e15ac6..2f09461d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsRegistry.java @@ -1,9 +1,6 @@ package WayofTime.alchemicalWizardry.common.achievements; -import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; -import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; import net.minecraft.item.Item; import net.minecraft.block.Block; import net.minecraft.stats.Achievement; @@ -13,92 +10,40 @@ import java.util.List; public class AchievementsRegistry { - public final static List<Item> craftinglist = new ArrayList<Item>(); - public final static List<Item> pickupList = new ArrayList<Item>(); - public final static List<Block> blockCraftingList = new ArrayList<Block>(); -// public final static List<Block> blockPickupList = new ArrayList<Block>(); + public final static List<Item> craftinglist = new ArrayList(); + public final static List<Item> pickupList = new ArrayList(); public static void init() { addItemsToCraftingList(); - addBlocksToCraftingList(); addItemsToPickupList(); -// addBlocksToPickupList(); } public static void addItemsToCraftingList() { craftinglist.add(ModItems.sacrificialDagger); - craftinglist.add(ModItems.itemBloodPack); - craftinglist.add(ModItems.waterSigil); - craftinglist.add(ModItems.airSigil); - craftinglist.add(ModItems.sigilOfHolding); - craftinglist.add(ModItems.itemRitualDiviner); - craftinglist.add(ModItems.sigilOfTheBridge); - craftinglist.add(ModItems.itemSigilOfSupression); - craftinglist.add(ModItems.energyBazooka); - } - - public static void addBlocksToCraftingList() - { - blockCraftingList.add(ModBlocks.bloodRune); - blockCraftingList.add(ModBlocks.blockWritingTable); - blockCraftingList.add(ModBlocks.blockTeleposer); } public static void addItemsToPickupList() { pickupList.add(ModItems.weakBloodOrb); - pickupList.add(ModItems.apprenticeBloodOrb); - pickupList.add(ModItems.daggerOfSacrifice); - pickupList.add(ModItems.magicianBloodOrb); - pickupList.add(ModItems.energySword); - pickupList.add(ModItems.boundHelmet); - pickupList.add(ModItems.boundPlate); - pickupList.add(ModItems.boundLeggings); - pickupList.add(ModItems.boundBoots); - pickupList.add(ModItems.itemComplexSpellCrystal); - pickupList.add(ModItems.masterBloodOrb); - pickupList.add(ModItems.archmageBloodOrb); - pickupList.add(ModItems.transcendentBloodOrb); - } - - public static void addBlocksToPickupList() - { - } public static Achievement getAchievementForItem(Item item) { - if (item == ModItems.sacrificialDagger) return ModAchievements.firstPrick; - if (item == ModItems.weakBloodOrb) return ModAchievements.weakOrb; - if (item == ModItems.itemBloodPack) return ModAchievements.bloodLettersPack; - if (item == ModItems.waterSigil) return ModAchievements.waterSigil; - if (item == ModItems.apprenticeBloodOrb) return ModAchievements.apprenticeOrb; - if (item == ModItems.airSigil) return ModAchievements.airSigil; - if (item == ModItems.daggerOfSacrifice) return ModAchievements.daggerOfSacrifice; - if (item == ModItems.magicianBloodOrb) return ModAchievements.magicianOrb; - if (item == ModItems.sigilOfHolding) return ModAchievements.sigilHolding; - if (item == ModItems.energySword) return ModAchievements.boundBlade; - if (item instanceof BoundArmour) return ModAchievements.boundArmor; - if (item == ModItems.itemComplexSpellCrystal) return ModAchievements.complexSpells; - if (item instanceof ItemRitualDiviner) return ModAchievements.ritualDiviner; - if (item == ModItems.masterBloodOrb) return ModAchievements.masterOrb; - if (item == ModItems.sigilOfTheBridge) return ModAchievements.phantomBridgeSigil; - if (item == ModItems.itemSigilOfSupression) return ModAchievements.suppressionSigil; - if (item == ModItems.archmageBloodOrb) return ModAchievements.archmageOrb; - if (item == ModItems.energyBazooka) return ModAchievements.energyBazooka; - if (item == ModItems.transcendentBloodOrb) return ModAchievements.transcendentOrb; - + if (item == ModItems.sacrificialDagger) + { + return ModAchievements.firstPrick; + } + if (item == ModItems.weakBloodOrb) + { + return ModAchievements.weakOrb; + } return null; } public static Achievement getAchievementForBlock(Block block) { - if (block == ModBlocks.bloodRune) return ModAchievements.blankRunes; - if (block == ModBlocks.blockWritingTable) return ModAchievements.brewingPotions; - if (block == ModBlocks.blockTeleposer) return ModAchievements.teleposer; - return null; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ICraftAchievement.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ICraftAchievement.java new file mode 100644 index 00000000..47006462 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ICraftAchievement.java @@ -0,0 +1,11 @@ +package WayofTime.alchemicalWizardry.common.achievements; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.Achievement; + +public interface ICraftAchievement +{ + Achievement getAchievementOnCraft(ItemStack stack, EntityPlayer player, IInventory matrix); +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/IPickupAchievement.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/IPickupAchievement.java new file mode 100644 index 00000000..3d2a7351 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/IPickupAchievement.java @@ -0,0 +1,11 @@ +package WayofTime.alchemicalWizardry.common.achievements; + +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.Achievement; + +public interface IPickupAchievement +{ + Achievement getAchievementOnPickup(ItemStack stack, EntityPlayer player, EntityItem item); +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ModAchievements.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ModAchievements.java index da29820f..44de1c39 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ModAchievements.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ModAchievements.java @@ -1,8 +1,7 @@ package WayofTime.alchemicalWizardry.common.achievements; -import WayofTime.alchemicalWizardry.ModBlocks; -import net.minecraft.item.ItemStack; import net.minecraft.stats.Achievement; +import net.minecraft.util.StatCollector; import net.minecraftforge.common.AchievementPage; import WayofTime.alchemicalWizardry.ModItems; import cpw.mods.fml.common.FMLCommonHandler; @@ -13,57 +12,13 @@ public class ModAchievements public static Achievement firstPrick; public static Achievement weakOrb; - public static Achievement bloodLettersPack; - public static Achievement waterSigil; - public static Achievement blankRunes; - public static Achievement apprenticeOrb; - public static Achievement airSigil; - public static Achievement daggerOfSacrifice; - public static Achievement brewingPotions; - public static Achievement magicianOrb; - public static Achievement sigilHolding; - public static Achievement boundBlade; - public static Achievement boundArmor; - public static Achievement complexSpells; - public static Achievement ritualDiviner; - public static Achievement masterOrb; - public static Achievement demonSpawn; - public static Achievement phantomBridgeSigil; - public static Achievement teleposer; - public static Achievement suppressionSigil; - public static Achievement archmageOrb; - public static Achievement energyBazooka; - public static Achievement demons; - public static Achievement transcendentOrb; public static void init() { - firstPrick = new AchievementsMod("firstPrick", 0, 0, ModItems.sacrificialDagger, null).setSpecial(); - weakOrb = new AchievementsMod("weakOrb", 3, 0, ModItems.weakBloodOrb, firstPrick); - bloodLettersPack = new AchievementsMod("bloodLettersPack", 3, 2, ModItems.itemBloodPack, weakOrb); - waterSigil = new AchievementsMod("waterSigil", 6, 2, ModItems.waterSigil, weakOrb); - blankRunes = new AchievementsMod("blankRunes", 4, -2, ModBlocks.bloodRune, weakOrb); - apprenticeOrb = new AchievementsMod("apprenticeOrb", 4, -4, ModItems.apprenticeBloodOrb, blankRunes); - airSigil = new AchievementsMod("airSigil", 6, 1, ModItems.airSigil, apprenticeOrb); - daggerOfSacrifice = new AchievementsMod("daggerSacrifice", 4, -5, ModItems.daggerOfSacrifice, apprenticeOrb); - brewingPotions = new AchievementsMod("brewingPotions", 6, -3, ModBlocks.blockWritingTable, apprenticeOrb); - magicianOrb = new AchievementsMod("magicianOrb", 2, -2, ModItems.magicianBloodOrb, apprenticeOrb); - sigilHolding = new AchievementsMod("sigilHolding", 6, 0, ModItems.sigilOfHolding, magicianOrb); - boundBlade = new AchievementsMod("boundBlade", 0, -2, ModItems.energySword, magicianOrb); - boundArmor = new AchievementsMod("boundArmor", 1, -1, ModItems.boundPlate, magicianOrb); - complexSpells = new AchievementsMod("complexSpells", 1, -4, ModItems.itemComplexSpellCrystal, magicianOrb); - ritualDiviner = new AchievementsMod("ritualDiviner", 1, -3, ModItems.itemRitualDiviner, magicianOrb); - masterOrb = new AchievementsMod("masterOrb", -2, -1, ModItems.masterBloodOrb, boundBlade); - demonSpawn = new AchievementsMod("demonSpawn", -3, -2, ModItems.demonPlacer, masterOrb); - phantomBridgeSigil = new AchievementsMod("phantomBridgeSigil", 6, -1, ModItems.sigilOfTheBridge, masterOrb); - teleposer = new AchievementsMod("teleposer", -4, -1, ModBlocks.blockTeleposer, masterOrb); - suppressionSigil = new AchievementsMod("suppressionSigil", 6, -2, ModItems.itemSigilOfSupression, masterOrb); - archmageOrb = new AchievementsMod("archmageOrb", -1, 2, ModItems.archmageBloodOrb, masterOrb); - energyBazooka = new AchievementsMod("energyBazooka", -3, 2, ModItems.energyBazooka, archmageOrb); - demons = new AchievementsMod("demons", 0, 3, new ItemStack(ModItems.baseItems, 1, 29), archmageOrb).setSpecial(); - transcendentOrb = new AchievementsMod("trancsendentOrb", 0, 5, ModItems.transcendentBloodOrb, demons); + firstPrick = new AchievementsMod(StatCollector.translateToLocal("firstPrick"), 0, 0, ModItems.sacrificialDagger, null); + weakOrb = new AchievementsMod(StatCollector.translateToLocal("weakOrb"), 3, 0, ModItems.weakBloodOrb, firstPrick); - alchemicalWizardryPage = new AchievementPage("Blood Magic", AchievementsMod.achievements.toArray(new Achievement[AchievementsMod.achievements.size()])); + alchemicalWizardryPage = new AchievementPage("AlchemicalWizardry", AchievementsMod.achievements.toArray(new Achievement[AchievementsMod.achievements.size()])); AchievementPage.registerAchievementPage(alchemicalWizardryPage); AchievementsRegistry.init(); FMLCommonHandler.instance().bus().register(new AchievementTrigger()); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/ArmourForge.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/ArmourForge.java index e9f8eee9..96e80b9c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/ArmourForge.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/ArmourForge.java @@ -157,7 +157,7 @@ public class ArmourForge extends Block for (int i = 0; i < 8; i++) { - SpellHelper.sendIndexedParticleToAllAround(world, xCoord, yCoord, zCoord, 20, world.provider.dimensionId, 1, xCoord, yCoord, zCoord); + SpellHelper.sendIndexedParticleToAllAround(world, xCoord, yCoord, zCoord, 20, world.provider.getDimensionId(), 1, xCoord, yCoord, zCoord); } if (itemStack != null) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockHomHeart.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockHomHeart.java index f1ba267a..07ccaa3c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockHomHeart.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockHomHeart.java @@ -82,7 +82,7 @@ public class BlockHomHeart extends BlockContainer itemTag.setInteger("xCoord", x); itemTag.setInteger("yCoord", y); itemTag.setInteger("zCoord", z); - itemTag.setInteger("dimensionId", world.provider.dimensionId); + itemTag.setInteger("dimensionId", world.provider.getDimensionId()); return true; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellParadigm.java index e510791c..9f2f456a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellParadigm.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellParadigm.java @@ -64,7 +64,7 @@ public class BlockSpellParadigm extends BlockOrientable itemTag.setInteger("xCoord", x); itemTag.setInteger("yCoord", y); itemTag.setInteger("zCoord", z); - itemTag.setInteger("dimensionId", world.provider.dimensionId); + itemTag.setInteger("dimensionId", world.provider.getDimensionId()); return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java index 97dea481..f776d189 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java @@ -7,7 +7,7 @@ import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockMobSpawner; import net.minecraft.block.BlockPortal; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -15,9 +15,14 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.fml.common.Optional; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.event.TeleposeEvent; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; @@ -26,9 +31,7 @@ import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; import codechicken.multipart.MultipartHelper; import codechicken.multipart.TileMultipart; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + public class BlockTeleposer extends BlockContainer { @@ -45,35 +48,35 @@ public class BlockTeleposer extends BlockContainer setHardness(2.0F); setResistance(5.0F); setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setBlockName("bloodTeleposer"); + this.setUnlocalizedName("bloodTeleposer"); } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Top"); - this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Side"); - this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Side"); - } +// @Override +// @SideOnly(Side.CLIENT) +// public void registerBlockIcons(IIconRegister iconRegister) +// { +// this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Top"); +// this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Side"); +// this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Side"); +// } +// +// @Override +// @SideOnly(Side.CLIENT) +// public IIcon getIcon(int side, int meta) +// { +// switch (side) +// { +// case 0: +// return bottomIcon; +// case 1: +// return topIcon; +// default: +// return sideIcon2; +// } +// } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta) - { - switch (side) - { - case 0: - return bottomIcon; - case 1: - return topIcon; - default: - return sideIcon2; - } - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { ItemStack playerItem = player.getCurrentEquippedItem(); @@ -89,28 +92,28 @@ public class BlockTeleposer extends BlockContainer } NBTTagCompound itemTag = playerItem.getTagCompound(); - itemTag.setInteger("xCoord", x); - itemTag.setInteger("yCoord", y); - itemTag.setInteger("zCoord", z); - itemTag.setInteger("dimensionId", world.provider.dimensionId); + itemTag.setInteger("xCoord", pos.getX()); + itemTag.setInteger("yCoord", pos.getY()); + itemTag.setInteger("zCoord", pos.getZ()); + itemTag.setInteger("dimensionId", world.provider.getDimensionId()); return true; } } - player.openGui(AlchemicalWizardry.instance, 1, world, x, y, z); + player.openGui(AlchemicalWizardry.instance, 1, world, pos.getX(), pos.getY(), pos.getZ()); return true; } @Override - public void breakBlock(World world, int x, int y, int z, Block par5, int par6) + public void breakBlock(World world, BlockPos pos, IBlockState state) { - dropItems(world, x, y, z); - super.breakBlock(world, x, y, z, par5, par6); + dropItems(world, pos); + super.breakBlock(world, pos, state); } - private void dropItems(World world, int x, int y, int z) + private void dropItems(World world, BlockPos pos) { Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(x, y, z); + TileEntity tileEntity = world.getTileEntity(pos); if (!(tileEntity instanceof IInventory)) { @@ -128,7 +131,7 @@ public class BlockTeleposer extends BlockContainer float rx = rand.nextFloat() * 0.8F + 0.1F; float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, x + rx, y + ry, z + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); + EntityItem entityItem = new EntityItem(world, pos.getX() + rx, pos.getY() + ry, pos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { @@ -151,20 +154,20 @@ public class BlockTeleposer extends BlockContainer return new TETeleposer(); } - public static boolean swapBlocks(Object caller, World worldI, World worldF, int xi, int yi, int zi, int xf, int yf, int zf) + public static boolean swapBlocks(Object caller, World worldI, World worldF, BlockPos posi, BlockPos posf) { - return swapBlocks(caller, worldI, worldF, xi, yi, zi, xf, yf, zf, true, 3); + return swapBlocks(caller, worldI, worldF, posi, posf, true, 3); } - public static boolean swapBlocksWithoutSound(Object caller, World worldI, World worldF, int xi, int yi, int zi, int xf, int yf, int zf) + public static boolean swapBlocksWithoutSound(Object caller, World worldI, World worldF, BlockPos posi, BlockPos posf) { - return swapBlocks(caller, worldI, worldF, xi, yi, zi, xf, yf, zf, false, 3); + return swapBlocks(caller, worldI, worldF, posi, posf, false, 3); } - public static boolean swapBlocks(Object caller, World worldI, World worldF, int xi, int yi, int zi, int xf, int yf, int zf, boolean doSound, int flag) + public static boolean swapBlocks(Object caller, World worldI, World worldF, BlockPos posi, BlockPos posf, boolean doSound, int flag) { - TileEntity tileEntityI = worldI.getTileEntity(xi, yi, zi); - TileEntity tileEntityF = worldF.getTileEntity(xf, yf, zf); + TileEntity tileEntityI = worldI.getTileEntity(posi); + TileEntity tileEntityF = worldF.getTileEntity(posf); NBTTagCompound nbttag1 = new NBTTagCompound(); NBTTagCompound nbttag2 = new NBTTagCompound(); @@ -179,8 +182,10 @@ public class BlockTeleposer extends BlockContainer tileEntityF.writeToNBT(nbttag2); } - Block blockI = worldI.getBlock(xi, yi, zi); - Block blockF = worldF.getBlock(xf, yf, zf); + IBlockState stateI = worldI.getBlockState(posi); + Block blockI = stateI.getBlock(); + IBlockState stateF = worldF.getBlockState(posf); + Block blockF = stateF.getBlock(); if (blockI.equals(Blocks.air) && blockF.equals(Blocks.air)) @@ -192,18 +197,15 @@ public class BlockTeleposer extends BlockContainer { return false; } - - int metaI = worldI.getBlockMetadata(xi, yi, zi); - int metaF = worldF.getBlockMetadata(xf, yf, zf); - TeleposeEvent evt = new TeleposeEvent(worldI, xi, yi, zi, blockI, metaI, worldF, xf, yf, zf, blockF, metaF); + TeleposeEvent evt = new TeleposeEvent(worldI, posi, stateI, worldF, posf, stateF); if (MinecraftForge.EVENT_BUS.post(evt)) return false; if(doSound) { - worldI.playSoundEffect(xi, yi, zi, "mob.endermen.portal", 1.0F, 1.0F); - worldF.playSoundEffect(xf, yf, zf, "mob.endermen.portal", 1.0F, 1.0F); + worldI.playSoundEffect(posi.getX(), posi.getY(), posi.getZ(), "mob.endermen.portal", 1.0F, 1.0F); + worldF.playSoundEffect(posf.getX(), posf.getY(), posf.getZ(), "mob.endermen.portal", 1.0F, 1.0F); } //CLEAR TILES @@ -211,20 +213,20 @@ public class BlockTeleposer extends BlockContainer if (finalBlock != null) { - TileEntity tileToSet = finalBlock.createTileEntity(worldF, metaF); + TileEntity tileToSet = finalBlock.createTileEntity(worldF, stateF); - worldF.setTileEntity(xf, yf, zf, tileToSet); + worldF.setTileEntity(posf, tileToSet); } if (blockI != null) { - TileEntity tileToSet = blockI.createTileEntity(worldI, metaI); + TileEntity tileToSet = blockI.createTileEntity(worldI, stateI); - worldI.setTileEntity(xi, yi, zi, tileToSet); + worldI.setTileEntity(posi, tileToSet); } //TILES CLEARED - worldF.setBlock(xf, yf, zf, blockI, metaI, flag); + worldF.setBlockState(posf, stateI, flag); if (tileEntityI != null) { @@ -235,19 +237,16 @@ public class BlockTeleposer extends BlockContainer newTileEntityI = createMultipartFromNBT(worldF, nbttag1); } - worldF.setTileEntity(xf, yf, zf, newTileEntityI); - - newTileEntityI.xCoord = xf; - newTileEntityI.yCoord = yf; - newTileEntityI.zCoord = zf; + worldF.setTileEntity(posf, newTileEntityI); + newTileEntityI.setPos(posf); if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityI)) { sendDescriptorOfTile(worldF, newTileEntityI); } } - worldI.setBlock(xi, yi, zi, finalBlock, metaF, flag); + worldI.setBlockState(posi, stateF, flag); if (tileEntityF != null) { @@ -257,11 +256,9 @@ public class BlockTeleposer extends BlockContainer newTileEntityF = createMultipartFromNBT(worldI, nbttag2); } - worldI.setTileEntity(xi, yi, zi, newTileEntityF); + worldI.setTileEntity(posi, newTileEntityF); - newTileEntityF.xCoord = xi; - newTileEntityF.yCoord = yi; - newTileEntityF.zCoord = zi; + newTileEntityF.setPos(posi); if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityF)) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/IOrientable.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/IOrientable.java index 7545d11c..f270aa72 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/IOrientable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/IOrientable.java @@ -1,14 +1,14 @@ package WayofTime.alchemicalWizardry.common.block; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; public interface IOrientable { - ForgeDirection getInputDirection(); + EnumFacing getInputDirection(); - ForgeDirection getOutputDirection(); + EnumFacing getOutputDirection(); - void setInputDirection(ForgeDirection direction); + void setInputDirection(EnumFacing direction); - void setOutputDirection(ForgeDirection direction); + void setOutputDirection(EnumFacing direction); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarComponent.java b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarComponent.java index 4aeb4e75..06e1a3e6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarComponent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarComponent.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; public class AltarComponent { @@ -47,6 +48,11 @@ public class AltarComponent { return metadata; } + + public IBlockState getBlockState() + { + return block.getStateFromMeta(getMetadata()); + } public boolean isBloodRune() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java index 23d0845b..07333fba 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java @@ -4,7 +4,9 @@ import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.IFadedRune; @@ -19,11 +21,11 @@ public class UpgradedAltars public static List<AltarComponent> sixthTierAltar = new ArrayList(); public static int highestAltar = 6; - public static int isAltarValid(World world, int x, int y, int z) + public static int isAltarValid(World world, BlockPos pos) { for (int i = highestAltar; i >= 2; i--) { - if (checkAltarIsValid(world, x, y, z, i)) + if (checkAltarIsValid(world, pos, i)) { return i; } @@ -32,144 +34,37 @@ public class UpgradedAltars return 1; } - public static boolean checkAltarIsValid(World world, int x, int y, int z, int altarTier) + public static boolean checkAltarIsValid(World world, BlockPos pos, int altarTier) { - switch (altarTier) + List<AltarComponent> list = UpgradedAltars.getAltarUpgradeListForTier(altarTier); + + for (AltarComponent ac : list) { - case 1: - return true; - - case 2: - for (AltarComponent ac : secondTierAltar) + BlockPos newPos = pos.add(ac.getX(), ac.getY(), ac.getZ()); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); + + if (ac.isBloodRune()) + { + if (!(block instanceof BloodRune)) { - if (ac.isBloodRune()) - { - Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (!(testBlock instanceof BloodRune)) - { - return false; - } - } else - { - Block block = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) - { - return false; - } - } + return false; } + } else + { + int metadata = block.getMetaFromState(state); - return true; - - case 3: - for (AltarComponent ac : thirdTierAltar) + if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(newPos))) { - if (ac.isBloodRune()) - { - Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (!(testBlock instanceof BloodRune)) - { - return false; - } - } else - { - Block block = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) - { - return false; - } - } + return false; } - - return true; - - case 4: - for (AltarComponent ac : fourthTierAltar) - { - if (ac.isBloodRune()) - { - Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (!(testBlock instanceof BloodRune)) - { - return false; - } - } else - { - Block block = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) - { - return false; - } - } - } - - return true; - - case 5: - for (AltarComponent ac : fifthTierAltar) - { - if (ac.isBloodRune()) - { - Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (!(testBlock instanceof BloodRune)) - { - return false; - } - } else - { - Block block = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) - { - return false; - } - } - } - - return true; - - case 6: - for (AltarComponent ac : sixthTierAltar) - { - if (ac.isBloodRune()) - { - Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (!(testBlock instanceof BloodRune)) - { - return false; - } - } else - { - Block block = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) - { - return false; - } - } - } - - return true; - - default: - return false; + } } + + return true; } - public static AltarUpgradeComponent getUpgrades(World world, int x, int y, int z, int altarTier) + public static AltarUpgradeComponent getUpgrades(World world, BlockPos pos, int altarTier) { if(world.isRemote) { @@ -180,18 +75,21 @@ public class UpgradedAltars for (AltarComponent ac : list) { + BlockPos newPos = pos.add(ac.getX(), ac.getY(), ac.getZ()); + if (ac.isUpgradeSlot()) { //Currently checks the getRuneEffect. //TODO Change so that it uses the metadata instead, with the BlockID. - Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - int meta = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); + IBlockState state = world.getBlockState(newPos); + Block testBlock = state.getBlock(); + int meta = testBlock.getMetaFromState(state); if (testBlock instanceof BloodRune) { if (testBlock instanceof IFadedRune && altarTier > ((IFadedRune)testBlock).getAltarTierLimit(meta)) { - return UpgradedAltars.getUpgrades(world, x, y, z, ((IFadedRune)testBlock).getAltarTierLimit(meta)); + return UpgradedAltars.getUpgrades(world, pos, ((IFadedRune)testBlock).getAltarTierLimit(meta)); } switch (((BloodRune) testBlock).getRuneEffect(meta)) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/book/BloodMagicGuide.java b/src/main/java/WayofTime/alchemicalWizardry/common/book/BloodMagicGuide.java index 39204a70..071bfd5a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/book/BloodMagicGuide.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/book/BloodMagicGuide.java @@ -1,836 +1,836 @@ -package WayofTime.alchemicalWizardry.common.book; - -import java.awt.Color; -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.guide.OrbRecipeRenderer; -import WayofTime.alchemicalWizardry.api.guide.PageAltarRecipe; -import WayofTime.alchemicalWizardry.common.guide.RecipeHolder; -import amerifrance.guideapi.api.GuideRegistry; -import amerifrance.guideapi.api.abstraction.CategoryAbstract; -import amerifrance.guideapi.api.abstraction.EntryAbstract; -import amerifrance.guideapi.api.abstraction.IPage; -import amerifrance.guideapi.api.base.Book; -import amerifrance.guideapi.api.util.BookBuilder; -import amerifrance.guideapi.api.util.PageHelper; -import amerifrance.guideapi.categories.CategoryItemStack; -import amerifrance.guideapi.entries.EntryUniText; -import amerifrance.guideapi.pages.PageIRecipe; -import amerifrance.guideapi.pages.PageUnlocImage; - -public class BloodMagicGuide -{ - public static Book bloodMagicGuide; - public static List<CategoryAbstract> categories = new ArrayList(); - - public static void registerGuide() - { - registerArchitectBook(); - registerRitualBook(); - registerDemonBook(); - registerSpellBook(); - registerAlchemyBook(); - - BookBuilder bmBookBuilder = new BookBuilder(); - bmBookBuilder.setCategories(categories).setUnlocBookTitle("guide.BloodMagic.book.title").setUnlocWelcomeMessage("guide.BloodMagic.welcomeMessage").setUnlocDisplayName("guide.BloodMagic.book.name").setBookColor(new Color(190, 10, 0)).setAuthor("-Blood Magic"); - -// bloodMagicGuide = new Book(categories, "guide.BloodMagic.book.title", "guide.BloodMagic.welcomeMessage", "guide.BloodMagic.book.name", new Color(190, 10, 0)); - bloodMagicGuide = bmBookBuilder.build(); - GuideRegistry.registerBook(bloodMagicGuide); - } - - public static PageIRecipe getOrbPageForRecipe(IRecipe recipe) - { - return new PageIRecipe(recipe, new OrbRecipeRenderer(recipe)); - } - - public static void registerArchitectBook() - { - List<EntryAbstract> entries = new ArrayList(); - - ArrayList<IPage> introPages = new ArrayList(); - introPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.intro"))); - entries.add(new EntryUniText(introPages, "guide.BloodMagic.entryName.architect.intro")); - - ArrayList<IPage> bloodAltarPages = new ArrayList(); - bloodAltarPages.add(new PageIRecipe(RecipeHolder.bloodAltarRecipe)); - bloodAltarPages.add(new PageIRecipe(RecipeHolder.knifeRecipe)); - bloodAltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodAltar.1"))); - bloodAltarPages.add(new PageAltarRecipe(RecipeHolder.weakBloodOrbRecipe)); - bloodAltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodAltar.2"))); - entries.add(new EntryUniText(bloodAltarPages, "guide.BloodMagic.entryName.architect.bloodAltar")); - - ArrayList<IPage> soulNetworkPages = new ArrayList(); - soulNetworkPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulNetwork"))); - entries.add(new EntryUniText(soulNetworkPages, "guide.BloodMagic.entryName.architect.soulNetwork")); - - ArrayList<IPage> blankSlatePages = new ArrayList(); - blankSlatePages.add(new PageAltarRecipe(RecipeHolder.blankSlateRecipe)); - blankSlatePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.blankSlate"))); - entries.add(new EntryUniText(blankSlatePages, "guide.BloodMagic.entryName.architect.blankSlate")); - - ArrayList<IPage> divinationSigilPages = new ArrayList(); - divinationSigilPages.add(getOrbPageForRecipe(RecipeHolder.divinationSigilRecipe)); - divinationSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.divination"))); - entries.add(new EntryUniText(divinationSigilPages, "guide.BloodMagic.entryName.architect.divination")); - - ArrayList<IPage> waterSigilPages = new ArrayList(); - waterSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.waterSigil.1"))); - waterSigilPages.add(getOrbPageForRecipe(RecipeHolder.waterSigilRecipe)); - waterSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.waterSigil.2"))); - entries.add(new EntryUniText(waterSigilPages, "guide.BloodMagic.entryName.architect.waterSigil")); - - ArrayList<IPage> lavaCrystalPages = new ArrayList(); - lavaCrystalPages.add(getOrbPageForRecipe(RecipeHolder.lavaCrystalRecipe)); - lavaCrystalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.lavaCrystal"))); - entries.add(new EntryUniText(lavaCrystalPages, "guide.BloodMagic.entryName.architect.lavaCrystal")); - - ArrayList<IPage> hellHarvestPages = new ArrayList(); - hellHarvestPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.hellHarvest"))); - entries.add(new EntryUniText(hellHarvestPages, "guide.BloodMagic.entryName.architect.hellHarvest")); - - ArrayList<IPage> lavaSigilPages = new ArrayList(); - lavaSigilPages.add(new PageIRecipe(RecipeHolder.lavaSigilRecipe)); - lavaSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.lavaSigil"))); - entries.add(new EntryUniText(lavaSigilPages, "guide.BloodMagic.entryName.architect.lavaSigil")); - - ArrayList<IPage> blankRunePages = new ArrayList(); - blankRunePages.add(getOrbPageForRecipe(RecipeHolder.blankRuneRecipe)); - blankRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.blankRunes.1"))); - blankRunePages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T2.png"), true)); - blankRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.blankRunes.2"))); - entries.add(new EntryUniText(blankRunePages, "guide.BloodMagic.entryName.architect.blankRunes")); - - ArrayList<IPage> speedRunePages = new ArrayList(); - speedRunePages.add(new PageIRecipe(RecipeHolder.speedRuneRecipe)); - speedRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.speedRunes"))); - entries.add(new EntryUniText(speedRunePages, "guide.BloodMagic.entryName.architect.speedRunes")); - - ArrayList<IPage> apprenticeOrbPages = new ArrayList(); - apprenticeOrbPages.add(new PageAltarRecipe(RecipeHolder.apprenticeBloodOrbRecipe)); - apprenticeOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.apprenticeOrb"))); - entries.add(new EntryUniText(apprenticeOrbPages, "guide.BloodMagic.entryName.architect.apprenticeOrb")); - - ArrayList<IPage> voidSigilPages = new ArrayList(); - voidSigilPages.add(getOrbPageForRecipe(RecipeHolder.voidSigilRecipe)); - voidSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.voidSigil"))); - entries.add(new EntryUniText(voidSigilPages, "guide.BloodMagic.entryName.architect.voidSigil")); - - ArrayList<IPage> airSigilPages = new ArrayList(); - airSigilPages.add(getOrbPageForRecipe(RecipeHolder.airSigilRecipe)); - airSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.airSigil"))); - entries.add(new EntryUniText(airSigilPages, "guide.BloodMagic.entryName.architect.airSigil")); - - ArrayList<IPage> sightSigilPages = new ArrayList(); - sightSigilPages.add(getOrbPageForRecipe(RecipeHolder.sightSigilRecipe)); - sightSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sightSigil"))); - entries.add(new EntryUniText(sightSigilPages, "guide.BloodMagic.entryName.architect.sightSigil")); - - ArrayList<IPage> advancedAltarPages = new ArrayList(); - advancedAltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.advancedAltar"))); - entries.add(new EntryUniText(advancedAltarPages, "guide.BloodMagic.entryName.architect.advancedAltar")); - - ArrayList<IPage> fastMinerPages = new ArrayList(); - fastMinerPages.add(getOrbPageForRecipe(RecipeHolder.fastMinerRecipe)); - fastMinerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fastMiner"))); - entries.add(new EntryUniText(fastMinerPages, "guide.BloodMagic.entryName.architect.fastMiner")); - - ArrayList<IPage> soulFrayPages = new ArrayList(); - soulFrayPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulFray"))); - entries.add(new EntryUniText(soulFrayPages, "guide.BloodMagic.entryName.architect.soulFray")); - - ArrayList<IPage> greenGrovePages = new ArrayList(); - greenGrovePages.add(getOrbPageForRecipe(RecipeHolder.greenGroveRecipe)); - greenGrovePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.greenGrove"))); - entries.add(new EntryUniText(greenGrovePages, "guide.BloodMagic.entryName.architect.greenGrove")); - - ArrayList<IPage> daggerPages = new ArrayList(); - daggerPages.add(new PageAltarRecipe(RecipeHolder.daggerRecipe)); - daggerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.dagger"))); - entries.add(new EntryUniText(daggerPages, "guide.BloodMagic.entryName.architect.dagger")); - - ArrayList<IPage> sacrificePages = new ArrayList(); - sacrificePages.add(getOrbPageForRecipe(RecipeHolder.selfSacrificeRuneRecipe)); - sacrificePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sacrifice.1"))); - sacrificePages.add(getOrbPageForRecipe(RecipeHolder.sacrificeRuneRecipe)); - sacrificePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sacrifice.2"))); - entries.add(new EntryUniText(sacrificePages, "guide.BloodMagic.entryName.architect.sacrifice")); - - ArrayList<IPage> bloodPackPages = new ArrayList(); - bloodPackPages.add(new PageIRecipe(RecipeHolder.bloodPackRecipe)); - bloodPackPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodPack"))); - entries.add(new EntryUniText(bloodPackPages, "guide.BloodMagic.entryName.architect.bloodPack")); - - ArrayList<IPage> fivePeoplePages = new ArrayList(); - fivePeoplePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fivePeople"))); - entries.add(new EntryUniText(fivePeoplePages, "guide.BloodMagic.entryName.architect.fivePeople")); - - ArrayList<IPage> tier3Pages = new ArrayList(); - tier3Pages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T3.png"), true)); - tier3Pages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier3"))); - entries.add(new EntryUniText(tier3Pages, "guide.BloodMagic.entryName.architect.tier3")); - - ArrayList<IPage> magicianOrbPages = new ArrayList(); - magicianOrbPages.add(new PageAltarRecipe(RecipeHolder.magicianBloodOrbRecipe)); - magicianOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.magicianOrb"))); - entries.add(new EntryUniText(magicianOrbPages, "guide.BloodMagic.entryName.architect.magicianOrb")); - - ArrayList<IPage> newRunePages = new ArrayList(); - newRunePages.add(getOrbPageForRecipe(RecipeHolder.capacityRuneRecipe)); - newRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.newRune.1"))); - newRunePages.add(getOrbPageForRecipe(RecipeHolder.dislocationRuneRecipe)); - newRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.newRune.2"))); - entries.add(new EntryUniText(newRunePages, "guide.BloodMagic.entryName.architect.newRune")); - - ArrayList<IPage> magnetismPages = new ArrayList(); - magnetismPages.add(getOrbPageForRecipe(RecipeHolder.magnetismSigilRecipe)); - magnetismPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.magnetism"))); - entries.add(new EntryUniText(magnetismPages, "guide.BloodMagic.entryName.architect.magnetism")); - - ArrayList<IPage> phantomBridgePages = new ArrayList(); - phantomBridgePages.add(getOrbPageForRecipe(RecipeHolder.phantomBridgeRecipe)); - phantomBridgePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.phantomBridge"))); - entries.add(new EntryUniText(phantomBridgePages, "guide.BloodMagic.entryName.architect.phantomBridge")); - - ArrayList<IPage> holdingPages = new ArrayList(); - holdingPages.add(getOrbPageForRecipe(RecipeHolder.holdingSigilRecipe)); - holdingPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.holding"))); - entries.add(new EntryUniText(holdingPages, "guide.BloodMagic.entryName.architect.holding")); - - ArrayList<IPage> elementalAffinityPages = new ArrayList(); - elementalAffinityPages.add(getOrbPageForRecipe(RecipeHolder.affinitySigilRecipe)); - elementalAffinityPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.elementalAffinity"))); - entries.add(new EntryUniText(elementalAffinityPages, "guide.BloodMagic.entryName.architect.elementalAffinity")); - - ArrayList<IPage> ritualStonesPages = new ArrayList(); - ritualStonesPages.add(getOrbPageForRecipe(RecipeHolder.ritualStoneRecipe)); - ritualStonesPages.add(getOrbPageForRecipe(RecipeHolder.masterStoneRecipe)); - ritualStonesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.ritualStones"))); - entries.add(new EntryUniText(ritualStonesPages, "guide.BloodMagic.entryName.architect.ritualStones")); - - ArrayList<IPage> bloodLampPages = new ArrayList(); - bloodLampPages.add(getOrbPageForRecipe(RecipeHolder.bloodLampRecipe)); - bloodLampPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodLamp"))); - entries.add(new EntryUniText(bloodLampPages, "guide.BloodMagic.entryName.architect.bloodLamp")); - - ArrayList<IPage> boundArmourPages = new ArrayList(); - boundArmourPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.boundArmour.1"))); - boundArmourPages.add(new PageIRecipe(RecipeHolder.emptySocketRecipe)); - boundArmourPages.add(new PageAltarRecipe(RecipeHolder.filledSocketRecipe)); - boundArmourPages.add(getOrbPageForRecipe(RecipeHolder.soulForgeRecipe)); - boundArmourPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.boundArmour.2"))); - entries.add(new EntryUniText(boundArmourPages, "guide.BloodMagic.entryName.architect.boundArmour")); - - if(AlchemicalWizardry.isThaumcraftLoaded) - { - ArrayList<IPage> sanguineArmourPages = new ArrayList(); - sanguineArmourPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sanguineArmour"), new ItemStack(ModItems.sanguineRobe))); - entries.add(new EntryUniText(sanguineArmourPages, "guide.BloodMagic.entryName.architect.sanguineArmour")); - } - - ArrayList<IPage> soulSuppressPages = new ArrayList(); - soulSuppressPages.add(new PageIRecipe(RecipeHolder.inhibitorRecipe)); - soulSuppressPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulSuppress"))); - entries.add(new EntryUniText(soulSuppressPages, "guide.BloodMagic.entryName.architect.soulSuppress")); - - ArrayList<IPage> ritualDivinerPages = new ArrayList(); - ritualDivinerPages.add(new PageIRecipe(RecipeHolder.ritualDiviner1Recipe)); - ritualDivinerPages.add(new PageIRecipe(RecipeHolder.ritualDiviner2Recipe)); - ritualDivinerPages.add(new PageIRecipe(RecipeHolder.ritualDiviner3Recipe)); - ritualDivinerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.ritualDiviner"))); - entries.add(new EntryUniText(ritualDivinerPages, "guide.BloodMagic.entryName.architect.ritualDiviner")); - - ArrayList<IPage> bloodShardPages = new ArrayList(); - bloodShardPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodShard"), new ItemStack(ModItems.weakBloodShard))); - entries.add(new EntryUniText(bloodShardPages, "guide.BloodMagic.entryName.architect.bloodShard")); - - ArrayList<IPage> tier4AltarPages = new ArrayList(); - tier4AltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier4Altar.1"))); - tier4AltarPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T4.png"), true)); - tier4AltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier4Altar.2"))); - entries.add(new EntryUniText(tier4AltarPages, "guide.BloodMagic.entryName.architect.tier4Altar")); - - ArrayList<IPage> masterOrbPages = new ArrayList(); - masterOrbPages.add(new PageAltarRecipe(RecipeHolder.masterBloodOrbRecipe)); - masterOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.masterOrb"))); - entries.add(new EntryUniText(masterOrbPages, "guide.BloodMagic.entryName.architect.masterOrb")); - - ArrayList<IPage> whirlwindPages = new ArrayList(); - whirlwindPages.add(getOrbPageForRecipe(RecipeHolder.whirlwindSigilRecipe)); - whirlwindPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.whirlwind"))); - entries.add(new EntryUniText(whirlwindPages, "guide.BloodMagic.entryName.architect.whirlwind")); - - ArrayList<IPage> compressionPages = new ArrayList(); - compressionPages.add(getOrbPageForRecipe(RecipeHolder.compressionSigilRecipe)); - compressionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.compression"))); - entries.add(new EntryUniText(compressionPages, "guide.BloodMagic.entryName.architect.compression")); - - ArrayList<IPage> severancePages = new ArrayList(); - severancePages.add(getOrbPageForRecipe(RecipeHolder.enderSeveranceSigilRecipe)); - severancePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.severance"))); - entries.add(new EntryUniText(severancePages, "guide.BloodMagic.entryName.architect.severance")); - - ArrayList<IPage> teleposerPages = new ArrayList(); - teleposerPages.add(new PageAltarRecipe(RecipeHolder.teleposerFocusRecipe1)); - teleposerPages.add(new PageIRecipe(RecipeHolder.teleposerRecipe)); - teleposerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.teleposer"))); - entries.add(new EntryUniText(teleposerPages, "guide.BloodMagic.entryName.architect.teleposer")); - - ArrayList<IPage> suppressionPages = new ArrayList(); - suppressionPages.add(getOrbPageForRecipe(RecipeHolder.suppressionSigilRecipe)); - suppressionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.suppression"))); - entries.add(new EntryUniText(suppressionPages, "guide.BloodMagic.entryName.architect.suppression")); - - ArrayList<IPage> superiorCapacityPages = new ArrayList(); - superiorCapacityPages.add(getOrbPageForRecipe(RecipeHolder.superiorCapacityRecipe)); - superiorCapacityPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.superiorCapacity"))); - entries.add(new EntryUniText(superiorCapacityPages, "guide.BloodMagic.entryName.architect.superiorCapacity")); - - ArrayList<IPage> orbRunePages = new ArrayList(); - orbRunePages.add(getOrbPageForRecipe(RecipeHolder.orbRuneRecipe)); - orbRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.orbRune"))); - entries.add(new EntryUniText(orbRunePages, "guide.BloodMagic.entryName.architect.orbRune")); - - ArrayList<IPage> fieldTripPages = new ArrayList(); - fieldTripPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fieldTrip"))); - entries.add(new EntryUniText(fieldTripPages, "guide.BloodMagic.entryName.architect.fieldTrip")); - - ArrayList<IPage> bindingKeyPages = new ArrayList(); - bindingKeyPages.add(new PageIRecipe(RecipeHolder.keyOfBindingRecipe)); - bindingKeyPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bindingKey"))); - entries.add(new EntryUniText(bindingKeyPages, "guide.BloodMagic.entryName.architect.bindingKey")); - - ArrayList<IPage> tier5AltarPages = new ArrayList(); - tier5AltarPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T5.png"), true)); - tier5AltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier5Altar"))); - entries.add(new EntryUniText(tier5AltarPages, "guide.BloodMagic.entryName.architect.tier5Altar")); - - ArrayList<IPage> priceOfPowerPages = new ArrayList(); - priceOfPowerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.priceOfPower"))); - entries.add(new EntryUniText(priceOfPowerPages, "guide.BloodMagic.entryName.architect.priceOfPower")); - - ArrayList<IPage> demonicOrbPages = new ArrayList(); - demonicOrbPages.add(new PageAltarRecipe(RecipeHolder.archmageBloodOrbRecipe)); - demonicOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.demonicOrb"))); - entries.add(new EntryUniText(demonicOrbPages, "guide.BloodMagic.entryName.architect.demonicOrb")); - - ArrayList<IPage> energyBazookaPages = new ArrayList(); - demonicOrbPages.add(getOrbPageForRecipe(RecipeHolder.energyBazookaRecipe)); - energyBazookaPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.energyBazooka"))); - entries.add(new EntryUniText(energyBazookaPages, "guide.BloodMagic.entryName.architect.energyBazooka")); - - ArrayList<IPage> accelerationRunePages = new ArrayList(); - demonicOrbPages.add(getOrbPageForRecipe(RecipeHolder.accelerationRuneRecipe)); - accelerationRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.accelerationRune"))); - entries.add(new EntryUniText(accelerationRunePages, "guide.BloodMagic.entryName.architect.accelerationRune")); - - ArrayList<IPage> harvestPages = new ArrayList(); - demonicOrbPages.add(getOrbPageForRecipe(RecipeHolder.harvestSigilRecipe)); - harvestPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.harvest"))); - entries.add(new EntryUniText(harvestPages, "guide.BloodMagic.entryName.architect.harvest")); - - ArrayList<IPage> demonProblemPages = new ArrayList(); - demonProblemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.demonProblem"))); - entries.add(new EntryUniText(demonProblemPages, "guide.BloodMagic.entryName.architect.demonProblem")); - - ArrayList<IPage> tier6AltarPages = new ArrayList(); - tier6AltarPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T6.png"), true)); - tier6AltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier6Altar"))); - tier6AltarPages.add(new PageIRecipe(RecipeHolder.crystalCluserRecipe)); - tier6AltarPages.add(new PageAltarRecipe(RecipeHolder.transcendentBloodOrbRecipe)); - entries.add(new EntryUniText(tier6AltarPages, "guide.BloodMagic.entryName.architect.tier6Altar")); - - ArrayList<IPage> moreThanHumanPages = new ArrayList(); - moreThanHumanPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.moreThanHuman"))); - entries.add(new EntryUniText(moreThanHumanPages, "guide.BloodMagic.entryName.architect.moreThanHuman")); - - categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.architect", new ItemStack(ModItems.divinationSigil))); - } - - public static void registerRitualBook() - { - List<EntryAbstract> entries = new ArrayList(); - -// ArrayList<IPage> testPages = new ArrayList(); -// testPages.add(PageRitualMultiBlock.getPageForRitual("AW031Convocation")); -// entries.add(new EntryUniText(testPages, "Test page")); - - - ArrayList<IPage> introPages = new ArrayList(); - introPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.intro"))); - entries.add(new EntryUniText(introPages, "guide.BloodMagic.entryName.rituals.intro")); - - ArrayList<IPage> weakRitualPages = new ArrayList(); - weakRitualPages.add(getOrbPageForRecipe(RecipeHolder.weakRitualStoneRecipe)); - weakRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.weakRitual"))); - entries.add(new EntryUniText(weakRitualPages, "guide.BloodMagic.entryName.rituals.weakRitual")); - - ArrayList<IPage> ritualsPages = new ArrayList(); - ritualsPages.add(getOrbPageForRecipe(RecipeHolder.ritualStoneRecipe)); - ritualsPages.add(getOrbPageForRecipe(RecipeHolder.masterStoneRecipe)); - ritualsPages.add(new PageAltarRecipe(RecipeHolder.waterScribeTool)); - ritualsPages.add(new PageAltarRecipe(RecipeHolder.fireScribeTool)); - ritualsPages.add(new PageAltarRecipe(RecipeHolder.earthScribeTool)); - ritualsPages.add(new PageAltarRecipe(RecipeHolder.airScribeTool)); - ritualsPages.add(new PageIRecipe(RecipeHolder.ritualDiviner1Recipe)); - ritualsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.rituals"))); - ritualsPages.add(new PageAltarRecipe(RecipeHolder.weakActivationRecipe)); - entries.add(new EntryUniText(ritualsPages, "guide.BloodMagic.entryName.rituals.rituals")); - - ArrayList<IPage> waterRitualPages = new ArrayList(); - waterRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Water.png"), true)); - waterRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.waterRitual"))); - entries.add(new EntryUniText(waterRitualPages, "guide.BloodMagic.entryName.rituals.waterRitual")); - - ArrayList<IPage> lavaRitualPages = new ArrayList(); - lavaRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Lava.png"), true)); - lavaRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.lavaRitual"))); - entries.add(new EntryUniText(lavaRitualPages, "guide.BloodMagic.entryName.rituals.lavaRitual")); - - ArrayList<IPage> groveRitualPages = new ArrayList(); - groveRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/GreenGrove.png"), true)); - groveRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.groveRitual"))); - entries.add(new EntryUniText(groveRitualPages, "guide.BloodMagic.entryName.rituals.groveRitual")); - - ArrayList<IPage> interdictionRitualPages = new ArrayList(); - interdictionRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Interdiction.png"), true)); - interdictionRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.interdictionRitual"))); - entries.add(new EntryUniText(interdictionRitualPages, "guide.BloodMagic.entryName.rituals.interdictionRitual")); - - ArrayList<IPage> containmentRitualPages = new ArrayList(); - containmentRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Containment.png"), true)); - containmentRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.containmentRitual"))); - entries.add(new EntryUniText(containmentRitualPages, "guide.BloodMagic.entryName.rituals.containmentRitual")); - - ArrayList<IPage> bindingRitualPages = new ArrayList(); - bindingRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Binding.png"), true)); - bindingRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.bindingRitual"))); - entries.add(new EntryUniText(bindingRitualPages, "guide.BloodMagic.entryName.rituals.bindingRitual")); - - ArrayList<IPage> beastModePages = new ArrayList(); - beastModePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.beastMode"))); - entries.add(new EntryUniText(beastModePages, "guide.BloodMagic.entryName.rituals.beastMode")); - - ArrayList<IPage> unbindingRitualPages = new ArrayList(); - unbindingRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Unbinding.png"), true)); - unbindingRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.unbindingRitual"))); - entries.add(new EntryUniText(unbindingRitualPages, "guide.BloodMagic.entryName.rituals.unbindingRitual")); - - ArrayList<IPage> jumpRitualPages = new ArrayList(); - jumpRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Jump.png"), true)); - jumpRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.jumpRitual"))); - entries.add(new EntryUniText(jumpRitualPages, "guide.BloodMagic.entryName.rituals.jumpRitual")); - - ArrayList<IPage> duskInkPages = new ArrayList(); - duskInkPages.add(new PageAltarRecipe(RecipeHolder.duskRecipe)); - duskInkPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.duskInk"))); - entries.add(new EntryUniText(duskInkPages, "guide.BloodMagic.entryName.rituals.duskInk")); - - ArrayList<IPage> magnetismRitualPages = new ArrayList(); - magnetismRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Magnetism.png"), true)); - magnetismRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.magnetismRitual"))); - entries.add(new EntryUniText(magnetismRitualPages, "guide.BloodMagic.entryName.rituals.magnetismRitual")); - - ArrayList<IPage> crusherRitualPages = new ArrayList(); - crusherRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Crusher.png"), true)); - crusherRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.crusherRitual"))); - entries.add(new EntryUniText(crusherRitualPages, "guide.BloodMagic.entryName.rituals.crusherRitual")); - - ArrayList<IPage> speedRitualPages = new ArrayList(); - speedRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Speed.png"), true)); - speedRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.speedRitual"))); - entries.add(new EntryUniText(speedRitualPages, "guide.BloodMagic.entryName.rituals.speedRitual")); - - ArrayList<IPage> shepherdRitualPages = new ArrayList(); - shepherdRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/AnimalGrowth.png"), true)); - shepherdRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.shepherdRitual"))); - entries.add(new EntryUniText(shepherdRitualPages, "guide.BloodMagic.entryName.rituals.shepherdRitual")); - - ArrayList<IPage> darkMagicPages = new ArrayList(); - darkMagicPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.darkMagic"))); - entries.add(new EntryUniText(darkMagicPages, "guide.BloodMagic.entryName.rituals.darkMagic")); - - ArrayList<IPage> knifeAndSufferingRitualPages = new ArrayList(); - knifeAndSufferingRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/WellOfSuffering.png"), true)); - knifeAndSufferingRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.knifeAndSufferingRitual.1"))); - knifeAndSufferingRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/FeatheredKnife.png"), true)); - knifeAndSufferingRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.knifeAndSufferingRitual.2"))); - entries.add(new EntryUniText(knifeAndSufferingRitualPages, "guide.BloodMagic.entryName.rituals.knifeAndSufferingRitual")); - - ArrayList<IPage> regenerationRitualPages = new ArrayList(); - regenerationRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Regeneration.png"), true)); - regenerationRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.regenerationRitual"))); - entries.add(new EntryUniText(regenerationRitualPages, "guide.BloodMagic.entryName.rituals.regenerationRitual")); - - ArrayList<IPage> harvestFestivalPages = new ArrayList(); - harvestFestivalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.harvestFestival"))); - entries.add(new EntryUniText(harvestFestivalPages, "guide.BloodMagic.entryName.rituals.harvestFestival")); - - ArrayList<IPage> thenThereWereFivePages = new ArrayList(); - thenThereWereFivePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.thenThereWereFive"))); - entries.add(new EntryUniText(thenThereWereFivePages, "guide.BloodMagic.entryName.rituals.thenThereWereFive")); - - ArrayList<IPage> alchemyRitualPages = new ArrayList(); - alchemyRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Alchemy.png"), true)); - alchemyRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.alchemyRitual"))); - entries.add(new EntryUniText(alchemyRitualPages, "guide.BloodMagic.entryName.rituals.alchemyRitual")); - - ArrayList<IPage> domeRitualPages = new ArrayList(); - domeRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Dome.png"), true)); - domeRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.domeRitual"))); - entries.add(new EntryUniText(domeRitualPages, "guide.BloodMagic.entryName.rituals.domeRitual")); - - ArrayList<IPage> awakenedCrystalPages = new ArrayList(); - awakenedCrystalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.awakenedCrystal"))); - entries.add(new EntryUniText(awakenedCrystalPages, "guide.BloodMagic.entryName.rituals.awakenedCrystal")); - - ArrayList<IPage> featheredEarthRitualPages = new ArrayList(); - featheredEarthRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/FeatheredEarth.png"), true)); - featheredEarthRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.featheredEarthRitual"))); - entries.add(new EntryUniText(featheredEarthRitualPages, "guide.BloodMagic.entryName.rituals.featheredEarthRitual")); - - ArrayList<IPage> gaiaRitualPages = new ArrayList(); - gaiaRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Gaia.png"), true)); - gaiaRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.gaiaRitual"))); - entries.add(new EntryUniText(gaiaRitualPages, "guide.BloodMagic.entryName.rituals.gaiaRitual")); - - ArrayList<IPage> condorRitualPages = new ArrayList(); - condorRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Flight.png"), true)); - condorRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.condorRitual"))); - entries.add(new EntryUniText(condorRitualPages, "guide.BloodMagic.entryName.rituals.condorRitual")); - - ArrayList<IPage> meteorRitualPages = new ArrayList(); - meteorRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Meteor.png"), true)); - meteorRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.meteorRitual"))); - entries.add(new EntryUniText(meteorRitualPages, "guide.BloodMagic.entryName.rituals.meteorRitual")); - - ArrayList<IPage> expulsionRitualPages = new ArrayList(); - expulsionRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Expulsion.png"), true)); - expulsionRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.expulsionRitual"))); - entries.add(new EntryUniText(expulsionRitualPages, "guide.BloodMagic.entryName.rituals.expulsionRitual")); - - ArrayList<IPage> costOfProgressPages = new ArrayList(); - costOfProgressPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.costOfProgress.1"))); - costOfProgressPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.costOfProgress.2"))); - entries.add(new EntryUniText(costOfProgressPages, "guide.BloodMagic.entryName.rituals.costOfProgress")); - - ArrayList<IPage> zephyrRitualPages = new ArrayList(); - zephyrRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Zephyr.png"), true)); - zephyrRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.zephyrRitual"))); - entries.add(new EntryUniText(zephyrRitualPages, "guide.BloodMagic.entryName.rituals.zephyrRitual")); - - ArrayList<IPage> harvestRitualPages = new ArrayList(); - harvestRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Harvest.png"), true)); - harvestRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.harvestRitual"))); - entries.add(new EntryUniText(harvestRitualPages, "guide.BloodMagic.entryName.rituals.harvestRitual")); - - ArrayList<IPage> eternalSoulRitualPages = new ArrayList(); - eternalSoulRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/EternalSoul.png"), true)); - eternalSoulRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.eternalSoulRitual"))); - entries.add(new EntryUniText(eternalSoulRitualPages, "guide.BloodMagic.entryName.rituals.eternalSoulRitual")); - - ArrayList<IPage> ellipsoidRitualPages = new ArrayList(); - ellipsoidRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Ellipsoid.png"), true)); - ellipsoidRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.ellipsoidRitual"))); - entries.add(new EntryUniText(ellipsoidRitualPages, "guide.BloodMagic.entryName.rituals.ellipsoidRitual")); - - ArrayList<IPage> evaporationRitualPages = new ArrayList(); - evaporationRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Evaporation.png"), true)); - evaporationRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.evaporationRitual"))); - entries.add(new EntryUniText(evaporationRitualPages, "guide.BloodMagic.entryName.rituals.evaporationRitual")); - - ArrayList<IPage> sacrosanctityRitualPages = new ArrayList(); - sacrosanctityRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Sacrosanctity.png"), true)); - sacrosanctityRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.sacrosanctityRitual"))); - entries.add(new EntryUniText(sacrosanctityRitualPages, "guide.BloodMagic.entryName.rituals.sacrosanctityRitual")); - - ArrayList<IPage> evilRitualPages = new ArrayList(); - evilRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/VeilOfEvil.png"), true)); - evilRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.evilRitual"))); - entries.add(new EntryUniText(evilRitualPages, "guide.BloodMagic.entryName.rituals.evilRitual")); - - ArrayList<IPage> stomachRitualPages = new ArrayList(); - stomachRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Stomach.png"), true)); - stomachRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.stomachRitual"))); - entries.add(new EntryUniText(stomachRitualPages, "guide.BloodMagic.entryName.rituals.stomachRitual")); - - ArrayList<IPage> reagentEffectsRitualPages = new ArrayList(); - for(int i=1; i<=24; i++) - { - reagentEffectsRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.reagentEffects." + i))); - } - entries.add(new EntryUniText(reagentEffectsRitualPages, "guide.BloodMagic.entryName.rituals.reagentEffects")); - - ArrayList<IPage> conclaveOfMagesPages = new ArrayList(); - conclaveOfMagesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.conclaveOfMages"))); - entries.add(new EntryUniText(conclaveOfMagesPages, "guide.BloodMagic.entryName.rituals.conclaveOfMages")); - - ArrayList<IPage> forbiddenParadisePages = new ArrayList(); - forbiddenParadisePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.forbiddenParadise"))); - entries.add(new EntryUniText(forbiddenParadisePages, "guide.BloodMagic.entryName.rituals.forbiddenParadise")); - - ArrayList<IPage> convocationRitualPages = new ArrayList(); - convocationRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Convocation.png"), true)); - convocationRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.convocationRitual"))); - entries.add(new EntryUniText(convocationRitualPages, "guide.BloodMagic.entryName.rituals.convocationRitual")); - - ArrayList<IPage> longHaulPages = new ArrayList(); - longHaulPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.longHaul"))); - entries.add(new EntryUniText(longHaulPages, "guide.BloodMagic.entryName.rituals.longHaul")); - - ArrayList<IPage> phantomHandsRitualPages = new ArrayList(); - phantomHandsRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/PhantomHands.png"), true)); - phantomHandsRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.phantomHandsRitual"))); - entries.add(new EntryUniText(phantomHandsRitualPages, "guide.BloodMagic.entryName.rituals.phantomHandsRitual")); - - ArrayList<IPage> anvilRitualPages = new ArrayList(); - anvilRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/BeatingAnvil.png"), true)); - anvilRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.anvilRitual"))); - entries.add(new EntryUniText(anvilRitualPages, "guide.BloodMagic.entryName.rituals.anvilRitual")); - - ArrayList<IPage> dawnInkPages = new ArrayList(); - dawnInkPages.add(new PageAltarRecipe(RecipeHolder.dawnRecipe)); - dawnInkPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.dawnInk"))); - entries.add(new EntryUniText(dawnInkPages, "guide.BloodMagic.entryName.rituals.dawnInk")); - - ArrayList<IPage> symmetryRitualPages = new ArrayList(); - symmetryRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/SymmetryOmega.png"), true)); - symmetryRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.symmetryRitual"))); - entries.add(new EntryUniText(symmetryRitualPages, "guide.BloodMagic.entryName.rituals.symmetryRitual")); - - ArrayList<IPage> stallingRitualPages = new ArrayList(); - stallingRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/StallingOmega.png"), true)); - stallingRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.stallingRitual"))); - entries.add(new EntryUniText(stallingRitualPages, "guide.BloodMagic.entryName.rituals.stallingRitual")); - - ArrayList<IPage> newMoonRitualPages = new ArrayList(); - newMoonRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.newMoonRitual"))); - entries.add(new EntryUniText(newMoonRitualPages, "guide.BloodMagic.entryName.rituals.newMoonRitual")); - - categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.rituals", new ItemStack(ModBlocks.blockMasterStone))); - } - - public static void registerDemonBook() - { - List<EntryAbstract> entries = new ArrayList(); - - ArrayList<IPage> ashesPages = new ArrayList(); - ashesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.ashes"))); - entries.add(new EntryUniText(ashesPages, "guide.BloodMagic.entryName.demons.ashes")); - - ArrayList<IPage> tamedDemonPages = new ArrayList(); - tamedDemonPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.tamedDemon"))); - entries.add(new EntryUniText(tamedDemonPages, "guide.BloodMagic.entryName.demons.tamedDemon")); - - ArrayList<IPage> futurePages = new ArrayList(); - futurePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.future"))); - entries.add(new EntryUniText(futurePages, "guide.BloodMagic.entryName.demons.future")); - - ArrayList<IPage> knightPages = new ArrayList(); - knightPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.knight"))); - entries.add(new EntryUniText(knightPages, "guide.BloodMagic.entryName.demons.knight")); - - ArrayList<IPage> demonShardPages = new ArrayList(); - demonShardPages.addAll(PageHelper.pagesForLongText((StatCollector.translateToLocal("aw.entries.demons.demonShard")), new ItemStack(ModItems.demonBloodShard))); - entries.add(new EntryUniText(demonShardPages, "guide.BloodMagic.entryName.demons.demonShard")); - - - ArrayList<IPage> demonSummoningPages = new ArrayList(); - demonSummoningPages.add(new PageIRecipe(RecipeHolder.arcanePedestalRecipe)); - demonSummoningPages.add(new PageIRecipe(RecipeHolder.arcanePlinthRecipe)); - demonSummoningPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/demons/Ring1.png"), true)); - demonSummoningPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/demons/Ring2.png"), true)); - demonSummoningPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.demonSummoning"))); - entries.add(new EntryUniText(demonSummoningPages, "guide.BloodMagic.entryName.demons.demonSummoning")); - - ArrayList<IPage> keysGatePages = new ArrayList(); - for(int i=1; i<=10; i++) - { - keysGatePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.keysGate." + i))); - } - entries.add(new EntryUniText(keysGatePages, "guide.BloodMagic.entryName.demons.keysGate")); - - ArrayList<IPage> futurePlansPages = new ArrayList(); - futurePlansPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.futurePlans"))); - entries.add(new EntryUniText(futurePlansPages, "guide.BloodMagic.entryName.demons.futurePlans")); - - ArrayList<IPage> demonInvasionPages = new ArrayList(); - demonInvasionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.demonInvasion"))); - entries.add(new EntryUniText(demonInvasionPages, "guide.BloodMagic.entryName.demons.demonInvasion")); - - ArrayList<IPage> observationsPages = new ArrayList(); - observationsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.observations"))); - entries.add(new EntryUniText(observationsPages, "guide.BloodMagic.entryName.demons.observations")); - - categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.demons", new ItemStack(ModItems.demonBloodShard))); - } - - public static void registerSpellBook() - { - List<EntryAbstract> entries = new ArrayList(); - - ArrayList<IPage> demonGirlPages = new ArrayList(); - demonGirlPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.demonGirl"))); - entries.add(new EntryUniText(demonGirlPages, "guide.BloodMagic.entryName.spells.demonGirl")); - - ArrayList<IPage> spellTablePages = new ArrayList(); - spellTablePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.spellTable.1"))); - spellTablePages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/SimpleSpellTable.png"), true)); - spellTablePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.spellTable.2"))); - entries.add(new EntryUniText(spellTablePages, "guide.BloodMagic.entryName.spells.spellTable")); - - ArrayList<IPage> simpleEffectsPages = new ArrayList(); - for(int i=1; i<=11; i++) - { - simpleEffectsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.simpleEffects." + i))); - } - entries.add(new EntryUniText(simpleEffectsPages, "guide.BloodMagic.entryName.spells.simpleEffects")); - - ArrayList<IPage> tableAndSkullsPages = new ArrayList(); - tableAndSkullsPages.add(new PageAltarRecipe(RecipeHolder.blankSpellRecipe)); - tableAndSkullsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.tableAndSkulls.1"))); - tableAndSkullsPages.add(getOrbPageForRecipe(RecipeHolder.spellTableRecipe)); - tableAndSkullsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.tableAndSkulls.2"))); - entries.add(new EntryUniText(tableAndSkullsPages, "guide.BloodMagic.entryName.spells.tableAndSkulls")); - - ArrayList<IPage> timePassesPages = new ArrayList(); - timePassesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.timePasses"))); - entries.add(new EntryUniText(timePassesPages, "guide.BloodMagic.entryName.spells.timePasses")); - - ArrayList<IPage> complexSpellBasicsPages = new ArrayList(); - complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics.1"))); - complexSpellBasicsPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Paradigm.png"), true)); - - for(int i=2; i<=6; i++) - complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics." + i))); - - complexSpellBasicsPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Effect.png"), true)); - complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics.7"))); - complexSpellBasicsPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Modifier.png"), true)); - - for(int i=8; i<=12; i++) - complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics." + i))); - - complexSpellBasicsPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Enhancement.png"), true)); - - for(int i=13; i<=16; i++) - complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics." + i))); - - complexSpellBasicsPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Conduit.png"), true)); - complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics.17"))); - - entries.add(new EntryUniText(complexSpellBasicsPages, "guide.BloodMagic.entryName.spells.complexSpellBasics")); - - ArrayList<IPage> complexSpellEffectsPages = new ArrayList(); - for(int i=1; i<=17; i++) - complexSpellEffectsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellEffects." + i))); - entries.add(new EntryUniText(complexSpellEffectsPages, "guide.BloodMagic.entryName.spells.complexSpellEffects")); - - ArrayList<IPage> offTopicPages = new ArrayList(); - offTopicPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.offTopic"))); - entries.add(new EntryUniText(offTopicPages, "guide.BloodMagic.entryName.spells.offTopic")); - - ArrayList<IPage> demonicPowerPages = new ArrayList(); - demonicPowerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.demonicPower"))); - entries.add(new EntryUniText(demonicPowerPages, "guide.BloodMagic.entryName.spells.demonicPower")); - - categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.spells", new ItemStack(ModItems.itemComplexSpellCrystal))); - } - - public static void registerAlchemyBook() - { - List<EntryAbstract> entries = new ArrayList(); - - ArrayList<IPage> fatedMeetingPages = new ArrayList(); - fatedMeetingPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.fatedMeeting"))); - entries.add(new EntryUniText(fatedMeetingPages, "guide.BloodMagic.entryName.alchemy.fatedMeeting")); - - ArrayList<IPage> firstStepsPages = new ArrayList(); - firstStepsPages.add(getOrbPageForRecipe(RecipeHolder.alchemySetRecipe)); - firstStepsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.firstSteps"))); - entries.add(new EntryUniText(firstStepsPages, "guide.BloodMagic.entryName.alchemy.firstSteps")); - - ArrayList<IPage> chemistrySetPages = new ArrayList(); - for(int i=1; i<=10; i++) - chemistrySetPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.chemistrySet." + i))); - entries.add(new EntryUniText(chemistrySetPages, "guide.BloodMagic.entryName.alchemy.chemistrySet")); - - ArrayList<IPage> incensePages = new ArrayList(); - incensePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.incense.1"))); - incensePages.add(new PageIRecipe(RecipeHolder.crucibleRecipe)); - incensePages.add(new PageIRecipe(RecipeHolder.woodAshRecipe)); - incensePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.incense.2"))); - incensePages.add(getOrbPageForRecipe(RecipeHolder.byrrusRecipe)); - incensePages.add(getOrbPageForRecipe(RecipeHolder.livensRecipe)); - incensePages.add(getOrbPageForRecipe(RecipeHolder.virRecipe)); - incensePages.add(getOrbPageForRecipe(RecipeHolder.purpuraRecipe)); - incensePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.incense.3"))); - entries.add(new EntryUniText(incensePages, "guide.BloodMagic.entryName.alchemy.incense")); - - ArrayList<IPage> potionsPages = new ArrayList(); - potionsPages.add(new PageAltarRecipe(RecipeHolder.flaskRecipe)); - potionsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.potions"))); - entries.add(new EntryUniText(potionsPages, "guide.BloodMagic.entryName.alchemy.potions")); - - ArrayList<IPage> reagentRevolutionPages = new ArrayList(); - for(int i=1; i<=8; i++) - reagentRevolutionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentRevolution." + i))); - entries.add(new EntryUniText(reagentRevolutionPages, "guide.BloodMagic.entryName.alchemy.reagentRevolution")); - - ArrayList<IPage> newPotionsPages = new ArrayList(); - newPotionsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.newPotions"))); - entries.add(new EntryUniText(newPotionsPages, "guide.BloodMagic.entryName.alchemy.newPotions")); - - ArrayList<IPage> soulSandPages = new ArrayList(); - soulSandPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.soulSand"))); - entries.add(new EntryUniText(soulSandPages, "guide.BloodMagic.entryName.alchemy.soulSand")); - - ArrayList<IPage> timeGoesByPages = new ArrayList(); - timeGoesByPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.timeGoesBy"))); - entries.add(new EntryUniText(timeGoesByPages, "guide.BloodMagic.entryName.alchemy.timeGoesBy")); - - ArrayList<IPage> catalystsPages = new ArrayList(); - catalystsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.catalysts"))); - entries.add(new EntryUniText(catalystsPages, "guide.BloodMagic.entryName.alchemy.catalysts")); - - ArrayList<IPage> activationCrystalPages = new ArrayList(); - activationCrystalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.activationCrystal"))); - entries.add(new EntryUniText(activationCrystalPages, "guide.BloodMagic.entryName.alchemy.activationCrystal")); - - ArrayList<IPage> reagentSystemPages = new ArrayList(); - reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.1"))); - reagentSystemPages.add(new PageIRecipe(RecipeHolder.calcinatorRecipe)); - reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.2"))); - reagentSystemPages.add(new PageIRecipe(RecipeHolder.belljarRecipe)); - reagentSystemPages.add(new PageIRecipe(RecipeHolder.relayRecipe)); - reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.3"))); - reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.4"))); - reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.5"))); - reagentSystemPages.add(new PageIRecipe(RecipeHolder.routerRecipe)); - reagentSystemPages.add(new PageIRecipe(RecipeHolder.segmenterRecipe)); - reagentSystemPages.add(new PageIRecipe(RecipeHolder.cleanserRecipe)); - reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.6"))); - - reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.7"))); - - entries.add(new EntryUniText(reagentSystemPages, "guide.BloodMagic.entryName.alchemy.reagentSystem")); - - ArrayList<IPage> magusSecretPages = new ArrayList(); - magusSecretPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.magusSecret"))); - entries.add(new EntryUniText(magusSecretPages, "guide.BloodMagic.entryName.alchemy.magusSecret")); - - ArrayList<IPage> simpleCreationsPages = new ArrayList(); - simpleCreationsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.simpleCreations"))); - entries.add(new EntryUniText(simpleCreationsPages, "guide.BloodMagic.entryName.alchemy.simpleCreations")); - - categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.alchemy", new ItemStack(ModItems.alchemyFlask))); - } -} +//package WayofTime.alchemicalWizardry.common.book; +// +//import java.awt.Color; +//import java.util.ArrayList; +//import java.util.List; +// +//import net.minecraft.item.ItemStack; +//import net.minecraft.item.crafting.IRecipe; +//import net.minecraft.util.ResourceLocation; +//import net.minecraft.util.StatCollector; +//import WayofTime.alchemicalWizardry.AlchemicalWizardry; +//import WayofTime.alchemicalWizardry.ModBlocks; +//import WayofTime.alchemicalWizardry.ModItems; +//import WayofTime.alchemicalWizardry.api.guide.OrbRecipeRenderer; +//import WayofTime.alchemicalWizardry.api.guide.PageAltarRecipe; +//import WayofTime.alchemicalWizardry.common.guide.RecipeHolder; +//import amerifrance.guideapi.api.GuideRegistry; +//import amerifrance.guideapi.api.abstraction.CategoryAbstract; +//import amerifrance.guideapi.api.abstraction.EntryAbstract; +//import amerifrance.guideapi.api.abstraction.IPage; +//import amerifrance.guideapi.api.base.Book; +//import amerifrance.guideapi.api.util.BookBuilder; +//import amerifrance.guideapi.api.util.PageHelper; +//import amerifrance.guideapi.categories.CategoryItemStack; +//import amerifrance.guideapi.entries.EntryUniText; +//import amerifrance.guideapi.pages.PageIRecipe; +//import amerifrance.guideapi.pages.PageUnlocImage; +// +//public class BloodMagicGuide +//{ +// public static Book bloodMagicGuide; +// public static List<CategoryAbstract> categories = new ArrayList(); +// +// public static void registerGuide() +// { +// registerArchitectBook(); +// registerRitualBook(); +// registerDemonBook(); +// registerSpellBook(); +// registerAlchemyBook(); +// +// BookBuilder bmBookBuilder = new BookBuilder(); +// bmBookBuilder.setCategories(categories).setUnlocBookTitle("guide.BloodMagic.book.title").setUnlocWelcomeMessage("guide.BloodMagic.welcomeMessage").setUnlocDisplayName("guide.BloodMagic.book.name").setBookColor(new Color(190, 10, 0)).setAuthor("--Blood Magic"); +// +//// bloodMagicGuide = new Book(categories, "guide.BloodMagic.book.title", "guide.BloodMagic.welcomeMessage", "guide.BloodMagic.book.name", new Color(190, 10, 0)); +// bloodMagicGuide = bmBookBuilder.build(); +// GuideRegistry.registerBook(bloodMagicGuide); +// } +// +// public static PageIRecipe getOrbPageForRecipe(IRecipe recipe) +// { +// return new PageIRecipe(recipe, new OrbRecipeRenderer(recipe)); +// } +// +// public static void registerArchitectBook() +// { +// List<EntryAbstract> entries = new ArrayList(); +// +// ArrayList<IPage> introPages = new ArrayList(); +// introPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.intro"))); +// entries.add(new EntryUniText(introPages, "guide.BloodMagic.entryName.architect.intro")); +// +// ArrayList<IPage> bloodAltarPages = new ArrayList(); +// bloodAltarPages.add(new PageIRecipe(RecipeHolder.bloodAltarRecipe)); +// bloodAltarPages.add(new PageIRecipe(RecipeHolder.knifeRecipe)); +// bloodAltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodAltar.1"))); +// bloodAltarPages.add(new PageAltarRecipe(RecipeHolder.weakBloodOrbRecipe)); +// bloodAltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodAltar.2"))); +// entries.add(new EntryUniText(bloodAltarPages, "guide.BloodMagic.entryName.architect.bloodAltar")); +// +// ArrayList<IPage> soulNetworkPages = new ArrayList(); +// soulNetworkPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulNetwork"))); +// entries.add(new EntryUniText(soulNetworkPages, "guide.BloodMagic.entryName.architect.soulNetwork")); +// +// ArrayList<IPage> blankSlatePages = new ArrayList(); +// blankSlatePages.add(new PageAltarRecipe(RecipeHolder.blankSlateRecipe)); +// blankSlatePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.blankSlate"))); +// entries.add(new EntryUniText(blankSlatePages, "guide.BloodMagic.entryName.architect.blankSlate")); +// +// ArrayList<IPage> divinationSigilPages = new ArrayList(); +// divinationSigilPages.add(getOrbPageForRecipe(RecipeHolder.divinationSigilRecipe)); +// divinationSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.divination"))); +// entries.add(new EntryUniText(divinationSigilPages, "guide.BloodMagic.entryName.architect.divination")); +// +// ArrayList<IPage> waterSigilPages = new ArrayList(); +// waterSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.waterSigil.1"))); +// waterSigilPages.add(getOrbPageForRecipe(RecipeHolder.waterSigilRecipe)); +// waterSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.waterSigil.2"))); +// entries.add(new EntryUniText(waterSigilPages, "guide.BloodMagic.entryName.architect.waterSigil")); +// +// ArrayList<IPage> lavaCrystalPages = new ArrayList(); +// lavaCrystalPages.add(getOrbPageForRecipe(RecipeHolder.lavaCrystalRecipe)); +// lavaCrystalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.lavaCrystal"))); +// entries.add(new EntryUniText(lavaCrystalPages, "guide.BloodMagic.entryName.architect.lavaCrystal")); +// +// ArrayList<IPage> hellHarvestPages = new ArrayList(); +// hellHarvestPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.hellHarvest"))); +// entries.add(new EntryUniText(hellHarvestPages, "guide.BloodMagic.entryName.architect.hellHarvest")); +// +// ArrayList<IPage> lavaSigilPages = new ArrayList(); +// lavaSigilPages.add(new PageIRecipe(RecipeHolder.lavaSigilRecipe)); +// lavaSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.lavaSigil"))); +// entries.add(new EntryUniText(lavaSigilPages, "guide.BloodMagic.entryName.architect.lavaSigil")); +// +// ArrayList<IPage> blankRunePages = new ArrayList(); +// blankRunePages.add(getOrbPageForRecipe(RecipeHolder.blankRuneRecipe)); +// blankRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.blankRunes.1"))); +// blankRunePages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T2.png"), true)); +// blankRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.blankRunes.2"))); +// entries.add(new EntryUniText(blankRunePages, "guide.BloodMagic.entryName.architect.blankRunes")); +// +// ArrayList<IPage> speedRunePages = new ArrayList(); +// speedRunePages.add(new PageIRecipe(RecipeHolder.speedRuneRecipe)); +// speedRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.speedRunes"))); +// entries.add(new EntryUniText(speedRunePages, "guide.BloodMagic.entryName.architect.speedRunes")); +// +// ArrayList<IPage> apprenticeOrbPages = new ArrayList(); +// apprenticeOrbPages.add(new PageAltarRecipe(RecipeHolder.apprenticeBloodOrbRecipe)); +// apprenticeOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.apprenticeOrb"))); +// entries.add(new EntryUniText(apprenticeOrbPages, "guide.BloodMagic.entryName.architect.apprenticeOrb")); +// +// ArrayList<IPage> voidSigilPages = new ArrayList(); +// voidSigilPages.add(getOrbPageForRecipe(RecipeHolder.voidSigilRecipe)); +// voidSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.voidSigil"))); +// entries.add(new EntryUniText(voidSigilPages, "guide.BloodMagic.entryName.architect.voidSigil")); +// +// ArrayList<IPage> airSigilPages = new ArrayList(); +// airSigilPages.add(getOrbPageForRecipe(RecipeHolder.airSigilRecipe)); +// airSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.airSigil"))); +// entries.add(new EntryUniText(airSigilPages, "guide.BloodMagic.entryName.architect.airSigil")); +// +// ArrayList<IPage> sightSigilPages = new ArrayList(); +// sightSigilPages.add(getOrbPageForRecipe(RecipeHolder.sightSigilRecipe)); +// sightSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sightSigil"))); +// entries.add(new EntryUniText(sightSigilPages, "guide.BloodMagic.entryName.architect.sightSigil")); +// +// ArrayList<IPage> advancedAltarPages = new ArrayList(); +// advancedAltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.advancedAltar"))); +// entries.add(new EntryUniText(advancedAltarPages, "guide.BloodMagic.entryName.architect.advancedAltar")); +// +// ArrayList<IPage> fastMinerPages = new ArrayList(); +// fastMinerPages.add(getOrbPageForRecipe(RecipeHolder.fastMinerRecipe)); +// fastMinerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fastMiner"))); +// entries.add(new EntryUniText(fastMinerPages, "guide.BloodMagic.entryName.architect.fastMiner")); +// +// ArrayList<IPage> soulFrayPages = new ArrayList(); +// soulFrayPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulFray"))); +// entries.add(new EntryUniText(soulFrayPages, "guide.BloodMagic.entryName.architect.soulFray")); +// +// ArrayList<IPage> greenGrovePages = new ArrayList(); +// greenGrovePages.add(getOrbPageForRecipe(RecipeHolder.greenGroveRecipe)); +// greenGrovePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.greenGrove"))); +// entries.add(new EntryUniText(greenGrovePages, "guide.BloodMagic.entryName.architect.greenGrove")); +// +// ArrayList<IPage> daggerPages = new ArrayList(); +// daggerPages.add(new PageAltarRecipe(RecipeHolder.daggerRecipe)); +// daggerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.dagger"))); +// entries.add(new EntryUniText(daggerPages, "guide.BloodMagic.entryName.architect.dagger")); +// +// ArrayList<IPage> sacrificePages = new ArrayList(); +// sacrificePages.add(getOrbPageForRecipe(RecipeHolder.selfSacrificeRuneRecipe)); +// sacrificePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sacrifice.1"))); +// sacrificePages.add(getOrbPageForRecipe(RecipeHolder.sacrificeRuneRecipe)); +// sacrificePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sacrifice.2"))); +// entries.add(new EntryUniText(sacrificePages, "guide.BloodMagic.entryName.architect.sacrifice")); +// +// ArrayList<IPage> bloodPackPages = new ArrayList(); +// bloodPackPages.add(new PageIRecipe(RecipeHolder.bloodPackRecipe)); +// bloodPackPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodPack"))); +// entries.add(new EntryUniText(bloodPackPages, "guide.BloodMagic.entryName.architect.bloodPack")); +// +// ArrayList<IPage> fivePeoplePages = new ArrayList(); +// fivePeoplePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fivePeople"))); +// entries.add(new EntryUniText(fivePeoplePages, "guide.BloodMagic.entryName.architect.fivePeople")); +// +// ArrayList<IPage> tier3Pages = new ArrayList(); +// tier3Pages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T3.png"), true)); +// tier3Pages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier3"))); +// entries.add(new EntryUniText(tier3Pages, "guide.BloodMagic.entryName.architect.tier3")); +// +// ArrayList<IPage> magicianOrbPages = new ArrayList(); +// magicianOrbPages.add(new PageAltarRecipe(RecipeHolder.magicianBloodOrbRecipe)); +// magicianOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.magicianOrb"))); +// entries.add(new EntryUniText(magicianOrbPages, "guide.BloodMagic.entryName.architect.magicianOrb")); +// +// ArrayList<IPage> newRunePages = new ArrayList(); +// newRunePages.add(getOrbPageForRecipe(RecipeHolder.capacityRuneRecipe)); +// newRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.newRune.1"))); +// newRunePages.add(getOrbPageForRecipe(RecipeHolder.dislocationRuneRecipe)); +// newRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.newRune.2"))); +// entries.add(new EntryUniText(newRunePages, "guide.BloodMagic.entryName.architect.newRune")); +// +// ArrayList<IPage> magnetismPages = new ArrayList(); +// magnetismPages.add(getOrbPageForRecipe(RecipeHolder.magnetismSigilRecipe)); +// magnetismPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.magnetism"))); +// entries.add(new EntryUniText(magnetismPages, "guide.BloodMagic.entryName.architect.magnetism")); +// +// ArrayList<IPage> phantomBridgePages = new ArrayList(); +// phantomBridgePages.add(getOrbPageForRecipe(RecipeHolder.phantomBridgeRecipe)); +// phantomBridgePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.phantomBridge"))); +// entries.add(new EntryUniText(phantomBridgePages, "guide.BloodMagic.entryName.architect.phantomBridge")); +// +// ArrayList<IPage> holdingPages = new ArrayList(); +// holdingPages.add(getOrbPageForRecipe(RecipeHolder.holdingSigilRecipe)); +// holdingPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.holding"))); +// entries.add(new EntryUniText(holdingPages, "guide.BloodMagic.entryName.architect.holding")); +// +// ArrayList<IPage> elementalAffinityPages = new ArrayList(); +// elementalAffinityPages.add(getOrbPageForRecipe(RecipeHolder.affinitySigilRecipe)); +// elementalAffinityPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.elementalAffinity"))); +// entries.add(new EntryUniText(elementalAffinityPages, "guide.BloodMagic.entryName.architect.elementalAffinity")); +// +// ArrayList<IPage> ritualStonesPages = new ArrayList(); +// ritualStonesPages.add(getOrbPageForRecipe(RecipeHolder.ritualStoneRecipe)); +// ritualStonesPages.add(getOrbPageForRecipe(RecipeHolder.masterStoneRecipe)); +// ritualStonesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.ritualStones"))); +// entries.add(new EntryUniText(ritualStonesPages, "guide.BloodMagic.entryName.architect.ritualStones")); +// +// ArrayList<IPage> bloodLampPages = new ArrayList(); +// bloodLampPages.add(getOrbPageForRecipe(RecipeHolder.bloodLampRecipe)); +// bloodLampPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodLamp"))); +// entries.add(new EntryUniText(bloodLampPages, "guide.BloodMagic.entryName.architect.bloodLamp")); +// +// ArrayList<IPage> boundArmourPages = new ArrayList(); +// boundArmourPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.boundArmour.1"))); +// boundArmourPages.add(new PageIRecipe(RecipeHolder.emptySocketRecipe)); +// boundArmourPages.add(new PageAltarRecipe(RecipeHolder.filledSocketRecipe)); +// boundArmourPages.add(getOrbPageForRecipe(RecipeHolder.soulForgeRecipe)); +// boundArmourPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.boundArmour.2"))); +// entries.add(new EntryUniText(boundArmourPages, "guide.BloodMagic.entryName.architect.boundArmour")); +// +// if(AlchemicalWizardry.isThaumcraftLoaded) +// { +// ArrayList<IPage> sanguineArmourPages = new ArrayList(); +// sanguineArmourPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sanguineArmour"), new ItemStack(ModItems.sanguineRobe))); +// entries.add(new EntryUniText(sanguineArmourPages, "guide.BloodMagic.entryName.architect.sanguineArmour")); +// } +// +// ArrayList<IPage> soulSuppressPages = new ArrayList(); +// soulSuppressPages.add(new PageIRecipe(RecipeHolder.inhibitorRecipe)); +// soulSuppressPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulSuppress"))); +// entries.add(new EntryUniText(soulSuppressPages, "guide.BloodMagic.entryName.architect.soulSuppress")); +// +// ArrayList<IPage> ritualDivinerPages = new ArrayList(); +// ritualDivinerPages.add(new PageIRecipe(RecipeHolder.ritualDiviner1Recipe)); +// ritualDivinerPages.add(new PageIRecipe(RecipeHolder.ritualDiviner2Recipe)); +// ritualDivinerPages.add(new PageIRecipe(RecipeHolder.ritualDiviner3Recipe)); +// ritualDivinerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.ritualDiviner"))); +// entries.add(new EntryUniText(ritualDivinerPages, "guide.BloodMagic.entryName.architect.ritualDiviner")); +// +// ArrayList<IPage> bloodShardPages = new ArrayList(); +// bloodShardPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodShard"), new ItemStack(ModItems.weakBloodShard))); +// entries.add(new EntryUniText(bloodShardPages, "guide.BloodMagic.entryName.architect.bloodShard")); +// +// ArrayList<IPage> tier4AltarPages = new ArrayList(); +// tier4AltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier4Altar.1"))); +// tier4AltarPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T4.png"), true)); +// tier4AltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier4Altar.2"))); +// entries.add(new EntryUniText(tier4AltarPages, "guide.BloodMagic.entryName.architect.tier4Altar")); +// +// ArrayList<IPage> masterOrbPages = new ArrayList(); +// masterOrbPages.add(new PageAltarRecipe(RecipeHolder.masterBloodOrbRecipe)); +// masterOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.masterOrb"))); +// entries.add(new EntryUniText(masterOrbPages, "guide.BloodMagic.entryName.architect.masterOrb")); +// +// ArrayList<IPage> whirlwindPages = new ArrayList(); +// whirlwindPages.add(getOrbPageForRecipe(RecipeHolder.whirlwindSigilRecipe)); +// whirlwindPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.whirlwind"))); +// entries.add(new EntryUniText(whirlwindPages, "guide.BloodMagic.entryName.architect.whirlwind")); +// +// ArrayList<IPage> compressionPages = new ArrayList(); +// compressionPages.add(getOrbPageForRecipe(RecipeHolder.compressionSigilRecipe)); +// compressionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.compression"))); +// entries.add(new EntryUniText(compressionPages, "guide.BloodMagic.entryName.architect.compression")); +// +// ArrayList<IPage> severancePages = new ArrayList(); +// severancePages.add(getOrbPageForRecipe(RecipeHolder.enderSeveranceSigilRecipe)); +// severancePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.severance"))); +// entries.add(new EntryUniText(severancePages, "guide.BloodMagic.entryName.architect.severance")); +// +// ArrayList<IPage> teleposerPages = new ArrayList(); +// teleposerPages.add(new PageAltarRecipe(RecipeHolder.teleposerFocusRecipe1)); +// teleposerPages.add(new PageIRecipe(RecipeHolder.teleposerRecipe)); +// teleposerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.teleposer"))); +// entries.add(new EntryUniText(teleposerPages, "guide.BloodMagic.entryName.architect.teleposer")); +// +// ArrayList<IPage> suppressionPages = new ArrayList(); +// suppressionPages.add(getOrbPageForRecipe(RecipeHolder.suppressionSigilRecipe)); +// suppressionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.suppression"))); +// entries.add(new EntryUniText(suppressionPages, "guide.BloodMagic.entryName.architect.suppression")); +// +// ArrayList<IPage> superiorCapacityPages = new ArrayList(); +// superiorCapacityPages.add(getOrbPageForRecipe(RecipeHolder.superiorCapacityRecipe)); +// superiorCapacityPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.superiorCapacity"))); +// entries.add(new EntryUniText(superiorCapacityPages, "guide.BloodMagic.entryName.architect.superiorCapacity")); +// +// ArrayList<IPage> orbRunePages = new ArrayList(); +// orbRunePages.add(getOrbPageForRecipe(RecipeHolder.orbRuneRecipe)); +// orbRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.orbRune"))); +// entries.add(new EntryUniText(orbRunePages, "guide.BloodMagic.entryName.architect.orbRune")); +// +// ArrayList<IPage> fieldTripPages = new ArrayList(); +// fieldTripPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fieldTrip"))); +// entries.add(new EntryUniText(fieldTripPages, "guide.BloodMagic.entryName.architect.fieldTrip")); +// +// ArrayList<IPage> bindingKeyPages = new ArrayList(); +// bindingKeyPages.add(new PageIRecipe(RecipeHolder.keyOfBindingRecipe)); +// bindingKeyPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bindingKey"))); +// entries.add(new EntryUniText(bindingKeyPages, "guide.BloodMagic.entryName.architect.bindingKey")); +// +// ArrayList<IPage> tier5AltarPages = new ArrayList(); +// tier5AltarPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T5.png"), true)); +// tier5AltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier5Altar"))); +// entries.add(new EntryUniText(tier5AltarPages, "guide.BloodMagic.entryName.architect.tier5Altar")); +// +// ArrayList<IPage> priceOfPowerPages = new ArrayList(); +// priceOfPowerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.priceOfPower"))); +// entries.add(new EntryUniText(priceOfPowerPages, "guide.BloodMagic.entryName.architect.priceOfPower")); +// +// ArrayList<IPage> demonicOrbPages = new ArrayList(); +// demonicOrbPages.add(new PageAltarRecipe(RecipeHolder.archmageBloodOrbRecipe)); +// demonicOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.demonicOrb"))); +// entries.add(new EntryUniText(demonicOrbPages, "guide.BloodMagic.entryName.architect.demonicOrb")); +// +// ArrayList<IPage> energyBazookaPages = new ArrayList(); +// demonicOrbPages.add(getOrbPageForRecipe(RecipeHolder.energyBazookaRecipe)); +// energyBazookaPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.energyBazooka"))); +// entries.add(new EntryUniText(energyBazookaPages, "guide.BloodMagic.entryName.architect.energyBazooka")); +// +// ArrayList<IPage> accelerationRunePages = new ArrayList(); +// demonicOrbPages.add(getOrbPageForRecipe(RecipeHolder.accelerationRuneRecipe)); +// accelerationRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.accelerationRune"))); +// entries.add(new EntryUniText(accelerationRunePages, "guide.BloodMagic.entryName.architect.accelerationRune")); +// +// ArrayList<IPage> harvestPages = new ArrayList(); +// demonicOrbPages.add(getOrbPageForRecipe(RecipeHolder.harvestSigilRecipe)); +// harvestPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.harvest"))); +// entries.add(new EntryUniText(harvestPages, "guide.BloodMagic.entryName.architect.harvest")); +// +// ArrayList<IPage> demonProblemPages = new ArrayList(); +// demonProblemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.demonProblem"))); +// entries.add(new EntryUniText(demonProblemPages, "guide.BloodMagic.entryName.architect.demonProblem")); +// +// ArrayList<IPage> tier6AltarPages = new ArrayList(); +// tier6AltarPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T6.png"), true)); +// tier6AltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier6Altar"))); +// tier6AltarPages.add(new PageIRecipe(RecipeHolder.crystalCluserRecipe)); +// tier6AltarPages.add(new PageAltarRecipe(RecipeHolder.transcendentBloodOrbRecipe)); +// entries.add(new EntryUniText(tier6AltarPages, "guide.BloodMagic.entryName.architect.tier6Altar")); +// +// ArrayList<IPage> moreThanHumanPages = new ArrayList(); +// moreThanHumanPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.moreThanHuman"))); +// entries.add(new EntryUniText(moreThanHumanPages, "guide.BloodMagic.entryName.architect.moreThanHuman")); +// +// categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.architect", new ItemStack(ModItems.divinationSigil))); +// } +// +// public static void registerRitualBook() +// { +// List<EntryAbstract> entries = new ArrayList(); +// +//// ArrayList<IPage> testPages = new ArrayList(); +//// testPages.add(PageRitualMultiBlock.getPageForRitual("AW031Convocation")); +//// entries.add(new EntryUniText(testPages, "Test page")); +// +// +// ArrayList<IPage> introPages = new ArrayList(); +// introPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.intro"))); +// entries.add(new EntryUniText(introPages, "guide.BloodMagic.entryName.rituals.intro")); +// +// ArrayList<IPage> weakRitualPages = new ArrayList(); +// weakRitualPages.add(getOrbPageForRecipe(RecipeHolder.weakRitualStoneRecipe)); +// weakRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.weakRitual"))); +// entries.add(new EntryUniText(weakRitualPages, "guide.BloodMagic.entryName.rituals.weakRitual")); +// +// ArrayList<IPage> ritualsPages = new ArrayList(); +// ritualsPages.add(getOrbPageForRecipe(RecipeHolder.ritualStoneRecipe)); +// ritualsPages.add(getOrbPageForRecipe(RecipeHolder.masterStoneRecipe)); +// ritualsPages.add(new PageAltarRecipe(RecipeHolder.waterScribeTool)); +// ritualsPages.add(new PageAltarRecipe(RecipeHolder.fireScribeTool)); +// ritualsPages.add(new PageAltarRecipe(RecipeHolder.earthScribeTool)); +// ritualsPages.add(new PageAltarRecipe(RecipeHolder.airScribeTool)); +// ritualsPages.add(new PageIRecipe(RecipeHolder.ritualDiviner1Recipe)); +// ritualsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.rituals"))); +// ritualsPages.add(new PageAltarRecipe(RecipeHolder.weakActivationRecipe)); +// entries.add(new EntryUniText(ritualsPages, "guide.BloodMagic.entryName.rituals.rituals")); +// +// ArrayList<IPage> waterRitualPages = new ArrayList(); +// waterRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Water.png"), true)); +// waterRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.waterRitual"))); +// entries.add(new EntryUniText(waterRitualPages, "guide.BloodMagic.entryName.rituals.waterRitual")); +// +// ArrayList<IPage> lavaRitualPages = new ArrayList(); +// lavaRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Lava.png"), true)); +// lavaRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.lavaRitual"))); +// entries.add(new EntryUniText(lavaRitualPages, "guide.BloodMagic.entryName.rituals.lavaRitual")); +// +// ArrayList<IPage> groveRitualPages = new ArrayList(); +// groveRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/GreenGrove.png"), true)); +// groveRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.groveRitual"))); +// entries.add(new EntryUniText(groveRitualPages, "guide.BloodMagic.entryName.rituals.groveRitual")); +// +// ArrayList<IPage> interdictionRitualPages = new ArrayList(); +// interdictionRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Interdiction.png"), true)); +// interdictionRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.interdictionRitual"))); +// entries.add(new EntryUniText(interdictionRitualPages, "guide.BloodMagic.entryName.rituals.interdictionRitual")); +// +// ArrayList<IPage> containmentRitualPages = new ArrayList(); +// containmentRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Containment.png"), true)); +// containmentRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.containmentRitual"))); +// entries.add(new EntryUniText(containmentRitualPages, "guide.BloodMagic.entryName.rituals.containmentRitual")); +// +// ArrayList<IPage> bindingRitualPages = new ArrayList(); +// bindingRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Binding.png"), true)); +// bindingRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.bindingRitual"))); +// entries.add(new EntryUniText(bindingRitualPages, "guide.BloodMagic.entryName.rituals.bindingRitual")); +// +// ArrayList<IPage> beastModePages = new ArrayList(); +// beastModePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.beastMode"))); +// entries.add(new EntryUniText(beastModePages, "guide.BloodMagic.entryName.rituals.beastMode")); +// +// ArrayList<IPage> unbindingRitualPages = new ArrayList(); +// unbindingRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Unbinding.png"), true)); +// unbindingRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.unbindingRitual"))); +// entries.add(new EntryUniText(unbindingRitualPages, "guide.BloodMagic.entryName.rituals.unbindingRitual")); +// +// ArrayList<IPage> jumpRitualPages = new ArrayList(); +// jumpRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Jump.png"), true)); +// jumpRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.jumpRitual"))); +// entries.add(new EntryUniText(jumpRitualPages, "guide.BloodMagic.entryName.rituals.jumpRitual")); +// +// ArrayList<IPage> duskInkPages = new ArrayList(); +// duskInkPages.add(new PageAltarRecipe(RecipeHolder.duskRecipe)); +// duskInkPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.duskInk"))); +// entries.add(new EntryUniText(duskInkPages, "guide.BloodMagic.entryName.rituals.duskInk")); +// +// ArrayList<IPage> magnetismRitualPages = new ArrayList(); +// magnetismRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Magnetism.png"), true)); +// magnetismRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.magnetismRitual"))); +// entries.add(new EntryUniText(magnetismRitualPages, "guide.BloodMagic.entryName.rituals.magnetismRitual")); +// +// ArrayList<IPage> crusherRitualPages = new ArrayList(); +// crusherRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Crusher.png"), true)); +// crusherRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.crusherRitual"))); +// entries.add(new EntryUniText(crusherRitualPages, "guide.BloodMagic.entryName.rituals.crusherRitual")); +// +// ArrayList<IPage> speedRitualPages = new ArrayList(); +// speedRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Speed.png"), true)); +// speedRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.speedRitual"))); +// entries.add(new EntryUniText(speedRitualPages, "guide.BloodMagic.entryName.rituals.speedRitual")); +// +// ArrayList<IPage> shepherdRitualPages = new ArrayList(); +// shepherdRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/AnimalGrowth.png"), true)); +// shepherdRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.shepherdRitual"))); +// entries.add(new EntryUniText(shepherdRitualPages, "guide.BloodMagic.entryName.rituals.shepherdRitual")); +// +// ArrayList<IPage> darkMagicPages = new ArrayList(); +// darkMagicPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.darkMagic"))); +// entries.add(new EntryUniText(darkMagicPages, "guide.BloodMagic.entryName.rituals.darkMagic")); +// +// ArrayList<IPage> knifeAndSufferingRitualPages = new ArrayList(); +// knifeAndSufferingRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/WellOfSuffering.png"), true)); +// knifeAndSufferingRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.knifeAndSufferingRitual.1"))); +// knifeAndSufferingRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/FeatheredKnife.png"), true)); +// knifeAndSufferingRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.knifeAndSufferingRitual.2"))); +// entries.add(new EntryUniText(knifeAndSufferingRitualPages, "guide.BloodMagic.entryName.rituals.knifeAndSufferingRitual")); +// +// ArrayList<IPage> regenerationRitualPages = new ArrayList(); +// regenerationRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Regeneration.png"), true)); +// regenerationRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.regenerationRitual"))); +// entries.add(new EntryUniText(regenerationRitualPages, "guide.BloodMagic.entryName.rituals.regenerationRitual")); +// +// ArrayList<IPage> harvestFestivalPages = new ArrayList(); +// harvestFestivalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.harvestFestival"))); +// entries.add(new EntryUniText(harvestFestivalPages, "guide.BloodMagic.entryName.rituals.harvestFestival")); +// +// ArrayList<IPage> thenThereWereFivePages = new ArrayList(); +// thenThereWereFivePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.thenThereWereFive"))); +// entries.add(new EntryUniText(thenThereWereFivePages, "guide.BloodMagic.entryName.rituals.thenThereWereFive")); +// +// ArrayList<IPage> alchemyRitualPages = new ArrayList(); +// alchemyRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Alchemy.png"), true)); +// alchemyRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.alchemyRitual"))); +// entries.add(new EntryUniText(alchemyRitualPages, "guide.BloodMagic.entryName.rituals.alchemyRitual")); +// +// ArrayList<IPage> domeRitualPages = new ArrayList(); +// domeRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Dome.png"), true)); +// domeRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.domeRitual"))); +// entries.add(new EntryUniText(domeRitualPages, "guide.BloodMagic.entryName.rituals.domeRitual")); +// +// ArrayList<IPage> awakenedCrystalPages = new ArrayList(); +// awakenedCrystalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.awakenedCrystal"))); +// entries.add(new EntryUniText(awakenedCrystalPages, "guide.BloodMagic.entryName.rituals.awakenedCrystal")); +// +// ArrayList<IPage> featheredEarthRitualPages = new ArrayList(); +// featheredEarthRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/FeatheredEarth.png"), true)); +// featheredEarthRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.featheredEarthRitual"))); +// entries.add(new EntryUniText(featheredEarthRitualPages, "guide.BloodMagic.entryName.rituals.featheredEarthRitual")); +// +// ArrayList<IPage> gaiaRitualPages = new ArrayList(); +// gaiaRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Gaia.png"), true)); +// gaiaRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.gaiaRitual"))); +// entries.add(new EntryUniText(gaiaRitualPages, "guide.BloodMagic.entryName.rituals.gaiaRitual")); +// +// ArrayList<IPage> condorRitualPages = new ArrayList(); +// condorRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Flight.png"), true)); +// condorRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.condorRitual"))); +// entries.add(new EntryUniText(condorRitualPages, "guide.BloodMagic.entryName.rituals.condorRitual")); +// +// ArrayList<IPage> meteorRitualPages = new ArrayList(); +// meteorRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Meteor.png"), true)); +// meteorRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.meteorRitual"))); +// entries.add(new EntryUniText(meteorRitualPages, "guide.BloodMagic.entryName.rituals.meteorRitual")); +// +// ArrayList<IPage> expulsionRitualPages = new ArrayList(); +// expulsionRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Expulsion.png"), true)); +// expulsionRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.expulsionRitual"))); +// entries.add(new EntryUniText(expulsionRitualPages, "guide.BloodMagic.entryName.rituals.expulsionRitual")); +// +// ArrayList<IPage> costOfProgressPages = new ArrayList(); +// costOfProgressPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.costOfProgress.1"))); +// costOfProgressPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.costOfProgress.2"))); +// entries.add(new EntryUniText(costOfProgressPages, "guide.BloodMagic.entryName.rituals.costOfProgress")); +// +// ArrayList<IPage> zephyrRitualPages = new ArrayList(); +// zephyrRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Zephyr.png"), true)); +// zephyrRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.zephyrRitual"))); +// entries.add(new EntryUniText(zephyrRitualPages, "guide.BloodMagic.entryName.rituals.zephyrRitual")); +// +// ArrayList<IPage> harvestRitualPages = new ArrayList(); +// harvestRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Harvest.png"), true)); +// harvestRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.harvestRitual"))); +// entries.add(new EntryUniText(harvestRitualPages, "guide.BloodMagic.entryName.rituals.harvestRitual")); +// +// ArrayList<IPage> eternalSoulRitualPages = new ArrayList(); +// eternalSoulRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/EternalSoul.png"), true)); +// eternalSoulRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.eternalSoulRitual"))); +// entries.add(new EntryUniText(eternalSoulRitualPages, "guide.BloodMagic.entryName.rituals.eternalSoulRitual")); +// +// ArrayList<IPage> ellipsoidRitualPages = new ArrayList(); +// ellipsoidRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Ellipsoid.png"), true)); +// ellipsoidRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.ellipsoidRitual"))); +// entries.add(new EntryUniText(ellipsoidRitualPages, "guide.BloodMagic.entryName.rituals.ellipsoidRitual")); +// +// ArrayList<IPage> evaporationRitualPages = new ArrayList(); +// evaporationRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Evaporation.png"), true)); +// evaporationRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.evaporationRitual"))); +// entries.add(new EntryUniText(evaporationRitualPages, "guide.BloodMagic.entryName.rituals.evaporationRitual")); +// +// ArrayList<IPage> sacrosanctityRitualPages = new ArrayList(); +// sacrosanctityRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Sacrosanctity.png"), true)); +// sacrosanctityRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.sacrosanctityRitual"))); +// entries.add(new EntryUniText(sacrosanctityRitualPages, "guide.BloodMagic.entryName.rituals.sacrosanctityRitual")); +// +// ArrayList<IPage> evilRitualPages = new ArrayList(); +// evilRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/VeilOfEvil.png"), true)); +// evilRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.evilRitual"))); +// entries.add(new EntryUniText(evilRitualPages, "guide.BloodMagic.entryName.rituals.evilRitual")); +// +// ArrayList<IPage> stomachRitualPages = new ArrayList(); +// stomachRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Stomach.png"), true)); +// stomachRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.stomachRitual"))); +// entries.add(new EntryUniText(stomachRitualPages, "guide.BloodMagic.entryName.rituals.stomachRitual")); +// +// ArrayList<IPage> reagentEffectsRitualPages = new ArrayList(); +// for(int i=1; i<=24; i++) +// { +// reagentEffectsRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.reagentEffects." + i))); +// } +// entries.add(new EntryUniText(reagentEffectsRitualPages, "guide.BloodMagic.entryName.rituals.reagentEffects")); +// +// ArrayList<IPage> conclaveOfMagesPages = new ArrayList(); +// conclaveOfMagesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.conclaveOfMages"))); +// entries.add(new EntryUniText(conclaveOfMagesPages, "guide.BloodMagic.entryName.rituals.conclaveOfMages")); +// +// ArrayList<IPage> forbiddenParadisePages = new ArrayList(); +// forbiddenParadisePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.forbiddenParadise"))); +// entries.add(new EntryUniText(forbiddenParadisePages, "guide.BloodMagic.entryName.rituals.forbiddenParadise")); +// +// ArrayList<IPage> convocationRitualPages = new ArrayList(); +// convocationRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Convocation.png"), true)); +// convocationRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.convocationRitual"))); +// entries.add(new EntryUniText(convocationRitualPages, "guide.BloodMagic.entryName.rituals.convocationRitual")); +// +// ArrayList<IPage> longHaulPages = new ArrayList(); +// longHaulPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.longHaul"))); +// entries.add(new EntryUniText(longHaulPages, "guide.BloodMagic.entryName.rituals.longHaul")); +// +// ArrayList<IPage> phantomHandsRitualPages = new ArrayList(); +// phantomHandsRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/PhantomHands.png"), true)); +// phantomHandsRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.phantomHandsRitual"))); +// entries.add(new EntryUniText(phantomHandsRitualPages, "guide.BloodMagic.entryName.rituals.phantomHandsRitual")); +// +// ArrayList<IPage> anvilRitualPages = new ArrayList(); +// anvilRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/BeatingAnvil.png"), true)); +// anvilRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.anvilRitual"))); +// entries.add(new EntryUniText(anvilRitualPages, "guide.BloodMagic.entryName.rituals.anvilRitual")); +// +// ArrayList<IPage> dawnInkPages = new ArrayList(); +// dawnInkPages.add(new PageAltarRecipe(RecipeHolder.dawnRecipe)); +// dawnInkPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.dawnInk"))); +// entries.add(new EntryUniText(dawnInkPages, "guide.BloodMagic.entryName.rituals.dawnInk")); +// +// ArrayList<IPage> symmetryRitualPages = new ArrayList(); +// symmetryRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/SymmetryOmega.png"), true)); +// symmetryRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.symmetryRitual"))); +// entries.add(new EntryUniText(symmetryRitualPages, "guide.BloodMagic.entryName.rituals.symmetryRitual")); +// +// ArrayList<IPage> stallingRitualPages = new ArrayList(); +// stallingRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/StallingOmega.png"), true)); +// stallingRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.stallingRitual"))); +// entries.add(new EntryUniText(stallingRitualPages, "guide.BloodMagic.entryName.rituals.stallingRitual")); +// +// ArrayList<IPage> newMoonRitualPages = new ArrayList(); +// newMoonRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.newMoonRitual"))); +// entries.add(new EntryUniText(newMoonRitualPages, "guide.BloodMagic.entryName.rituals.newMoonRitual")); +// +// categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.rituals", new ItemStack(ModBlocks.blockMasterStone))); +// } +// +// public static void registerDemonBook() +// { +// List<EntryAbstract> entries = new ArrayList(); +// +// ArrayList<IPage> ashesPages = new ArrayList(); +// ashesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.ashes"))); +// entries.add(new EntryUniText(ashesPages, "guide.BloodMagic.entryName.demons.ashes")); +// +// ArrayList<IPage> tamedDemonPages = new ArrayList(); +// tamedDemonPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.tamedDemon"))); +// entries.add(new EntryUniText(tamedDemonPages, "guide.BloodMagic.entryName.demons.tamedDemon")); +// +// ArrayList<IPage> futurePages = new ArrayList(); +// futurePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.future"))); +// entries.add(new EntryUniText(futurePages, "guide.BloodMagic.entryName.demons.future")); +// +// ArrayList<IPage> knightPages = new ArrayList(); +// knightPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.knight"))); +// entries.add(new EntryUniText(knightPages, "guide.BloodMagic.entryName.demons.knight")); +// +// ArrayList<IPage> demonShardPages = new ArrayList(); +// demonShardPages.addAll(PageHelper.pagesForLongText((StatCollector.translateToLocal("aw.entries.demons.demonShard")), new ItemStack(ModItems.demonBloodShard))); +// entries.add(new EntryUniText(demonShardPages, "guide.BloodMagic.entryName.demons.demonShard")); +// +// +// ArrayList<IPage> demonSummoningPages = new ArrayList(); +// demonSummoningPages.add(new PageIRecipe(RecipeHolder.arcanePedestalRecipe)); +// demonSummoningPages.add(new PageIRecipe(RecipeHolder.arcanePlinthRecipe)); +// demonSummoningPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/demons/Ring1.png"), true)); +// demonSummoningPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/demons/Ring2.png"), true)); +// demonSummoningPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.demonSummoning"))); +// entries.add(new EntryUniText(demonSummoningPages, "guide.BloodMagic.entryName.demons.demonSummoning")); +// +// ArrayList<IPage> keysGatePages = new ArrayList(); +// for(int i=1; i<=10; i++) +// { +// keysGatePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.keysGate." + i))); +// } +// entries.add(new EntryUniText(keysGatePages, "guide.BloodMagic.entryName.demons.keysGate")); +// +// ArrayList<IPage> futurePlansPages = new ArrayList(); +// futurePlansPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.futurePlans"))); +// entries.add(new EntryUniText(futurePlansPages, "guide.BloodMagic.entryName.demons.futurePlans")); +// +// ArrayList<IPage> demonInvasionPages = new ArrayList(); +// demonInvasionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.demonInvasion"))); +// entries.add(new EntryUniText(demonInvasionPages, "guide.BloodMagic.entryName.demons.demonInvasion")); +// +// ArrayList<IPage> observationsPages = new ArrayList(); +// observationsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.observations"))); +// entries.add(new EntryUniText(observationsPages, "guide.BloodMagic.entryName.demons.observations")); +// +// categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.demons", new ItemStack(ModItems.demonBloodShard))); +// } +// +// public static void registerSpellBook() +// { +// List<EntryAbstract> entries = new ArrayList(); +// +// ArrayList<IPage> demonGirlPages = new ArrayList(); +// demonGirlPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.demonGirl"))); +// entries.add(new EntryUniText(demonGirlPages, "guide.BloodMagic.entryName.spells.demonGirl")); +// +// ArrayList<IPage> spellTablePages = new ArrayList(); +// spellTablePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.spellTable.1"))); +// spellTablePages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/SimpleSpellTable.png"), true)); +// spellTablePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.spellTable.2"))); +// entries.add(new EntryUniText(spellTablePages, "guide.BloodMagic.entryName.spells.spellTable")); +// +// ArrayList<IPage> simpleEffectsPages = new ArrayList(); +// for(int i=1; i<=11; i++) +// { +// simpleEffectsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.simpleEffects." + i))); +// } +// entries.add(new EntryUniText(simpleEffectsPages, "guide.BloodMagic.entryName.spells.simpleEffects")); +// +// ArrayList<IPage> tableAndSkullsPages = new ArrayList(); +// tableAndSkullsPages.add(new PageAltarRecipe(RecipeHolder.blankSpellRecipe)); +// tableAndSkullsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.tableAndSkulls.1"))); +// tableAndSkullsPages.add(getOrbPageForRecipe(RecipeHolder.spellTableRecipe)); +// tableAndSkullsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.tableAndSkulls.2"))); +// entries.add(new EntryUniText(tableAndSkullsPages, "guide.BloodMagic.entryName.spells.tableAndSkulls")); +// +// ArrayList<IPage> timePassesPages = new ArrayList(); +// timePassesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.timePasses"))); +// entries.add(new EntryUniText(timePassesPages, "guide.BloodMagic.entryName.spells.timePasses")); +// +// ArrayList<IPage> complexSpellBasicsPages = new ArrayList(); +// complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics.1"))); +// complexSpellBasicsPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Paradigm.png"), true)); +// +// for(int i=2; i<=6; i++) +// complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics." + i))); +// +// complexSpellBasicsPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Effect.png"), true)); +// complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics.7"))); +// complexSpellBasicsPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Modifier.png"), true)); +// +// for(int i=8; i<=12; i++) +// complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics." + i))); +// +// complexSpellBasicsPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Enhancement.png"), true)); +// +// for(int i=13; i<=16; i++) +// complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics." + i))); +// +// complexSpellBasicsPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Conduit.png"), true)); +// complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics.17"))); +// +// entries.add(new EntryUniText(complexSpellBasicsPages, "guide.BloodMagic.entryName.spells.complexSpellBasics")); +// +// ArrayList<IPage> complexSpellEffectsPages = new ArrayList(); +// for(int i=1; i<=17; i++) +// complexSpellEffectsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellEffects." + i))); +// entries.add(new EntryUniText(complexSpellEffectsPages, "guide.BloodMagic.entryName.spells.complexSpellEffects")); +// +// ArrayList<IPage> offTopicPages = new ArrayList(); +// offTopicPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.offTopic"))); +// entries.add(new EntryUniText(offTopicPages, "guide.BloodMagic.entryName.spells.offTopic")); +// +// ArrayList<IPage> demonicPowerPages = new ArrayList(); +// demonicPowerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.demonicPower"))); +// entries.add(new EntryUniText(demonicPowerPages, "guide.BloodMagic.entryName.spells.demonicPower")); +// +// categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.spells", new ItemStack(ModItems.itemComplexSpellCrystal))); +// } +// +// public static void registerAlchemyBook() +// { +// List<EntryAbstract> entries = new ArrayList(); +// +// ArrayList<IPage> fatedMeetingPages = new ArrayList(); +// fatedMeetingPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.fatedMeeting"))); +// entries.add(new EntryUniText(fatedMeetingPages, "guide.BloodMagic.entryName.alchemy.fatedMeeting")); +// +// ArrayList<IPage> firstStepsPages = new ArrayList(); +// firstStepsPages.add(getOrbPageForRecipe(RecipeHolder.alchemySetRecipe)); +// firstStepsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.firstSteps"))); +// entries.add(new EntryUniText(firstStepsPages, "guide.BloodMagic.entryName.alchemy.firstSteps")); +// +// ArrayList<IPage> chemistrySetPages = new ArrayList(); +// for(int i=1; i<=10; i++) +// chemistrySetPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.chemistrySet." + i))); +// entries.add(new EntryUniText(chemistrySetPages, "guide.BloodMagic.entryName.alchemy.chemistrySet")); +// +// ArrayList<IPage> incensePages = new ArrayList(); +// incensePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.incense.1"))); +// incensePages.add(new PageIRecipe(RecipeHolder.crucibleRecipe)); +// incensePages.add(new PageIRecipe(RecipeHolder.woodAshRecipe)); +// incensePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.incense.2"))); +// incensePages.add(getOrbPageForRecipe(RecipeHolder.byrrusRecipe)); +// incensePages.add(getOrbPageForRecipe(RecipeHolder.livensRecipe)); +// incensePages.add(getOrbPageForRecipe(RecipeHolder.virRecipe)); +// incensePages.add(getOrbPageForRecipe(RecipeHolder.purpuraRecipe)); +// incensePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.incense.3"))); +// entries.add(new EntryUniText(incensePages, "guide.BloodMagic.entryName.alchemy.incense")); +// +// ArrayList<IPage> potionsPages = new ArrayList(); +// potionsPages.add(new PageAltarRecipe(RecipeHolder.flaskRecipe)); +// potionsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.potions"))); +// entries.add(new EntryUniText(potionsPages, "guide.BloodMagic.entryName.alchemy.potions")); +// +// ArrayList<IPage> reagentRevolutionPages = new ArrayList(); +// for(int i=1; i<=8; i++) +// reagentRevolutionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentRevolution." + i))); +// entries.add(new EntryUniText(reagentRevolutionPages, "guide.BloodMagic.entryName.alchemy.reagentRevolution")); +// +// ArrayList<IPage> newPotionsPages = new ArrayList(); +// newPotionsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.newPotions"))); +// entries.add(new EntryUniText(newPotionsPages, "guide.BloodMagic.entryName.alchemy.newPotions")); +// +// ArrayList<IPage> soulSandPages = new ArrayList(); +// soulSandPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.soulSand"))); +// entries.add(new EntryUniText(soulSandPages, "guide.BloodMagic.entryName.alchemy.soulSand")); +// +// ArrayList<IPage> timeGoesByPages = new ArrayList(); +// timeGoesByPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.timeGoesBy"))); +// entries.add(new EntryUniText(timeGoesByPages, "guide.BloodMagic.entryName.alchemy.timeGoesBy")); +// +// ArrayList<IPage> catalystsPages = new ArrayList(); +// catalystsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.catalysts"))); +// entries.add(new EntryUniText(catalystsPages, "guide.BloodMagic.entryName.alchemy.catalysts")); +// +// ArrayList<IPage> activationCrystalPages = new ArrayList(); +// activationCrystalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.activationCrystal"))); +// entries.add(new EntryUniText(activationCrystalPages, "guide.BloodMagic.entryName.alchemy.activationCrystal")); +// +// ArrayList<IPage> reagentSystemPages = new ArrayList(); +// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.1"))); +// reagentSystemPages.add(new PageIRecipe(RecipeHolder.calcinatorRecipe)); +// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.2"))); +// reagentSystemPages.add(new PageIRecipe(RecipeHolder.belljarRecipe)); +// reagentSystemPages.add(new PageIRecipe(RecipeHolder.relayRecipe)); +// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.3"))); +// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.4"))); +// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.5"))); +// reagentSystemPages.add(new PageIRecipe(RecipeHolder.routerRecipe)); +// reagentSystemPages.add(new PageIRecipe(RecipeHolder.segmenterRecipe)); +// reagentSystemPages.add(new PageIRecipe(RecipeHolder.cleanserRecipe)); +// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.6"))); +// +// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.7"))); +// +// entries.add(new EntryUniText(reagentSystemPages, "guide.BloodMagic.entryName.alchemy.reagentSystem")); +// +// ArrayList<IPage> magusSecretPages = new ArrayList(); +// magusSecretPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.magusSecret"))); +// entries.add(new EntryUniText(magusSecretPages, "guide.BloodMagic.entryName.alchemy.magusSecret")); +// +// ArrayList<IPage> simpleCreationsPages = new ArrayList(); +// simpleCreationsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.simpleCreations"))); +// entries.add(new EntryUniText(simpleCreationsPages, "guide.BloodMagic.entryName.alchemy.simpleCreations")); +// +// categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.alchemy", new ItemStack(ModItems.alchemyFlask))); +// } +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandBind.java b/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandBind.java deleted file mode 100644 index c97515a8..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandBind.java +++ /dev/null @@ -1,76 +0,0 @@ -package WayofTime.alchemicalWizardry.common.commands; - -import java.util.List; - -import net.minecraft.command.CommandBase; -import net.minecraft.command.CommandException; -import net.minecraft.command.ICommandSender; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.server.MinecraftServer; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; - -public class CommandBind extends CommandBase -{ - public CommandBind() {} - - public String getCommandName() - { - return "bind"; - } - - public int getRequiredPermissionLevel() - { - return 2; - } - - public String getCommandUsage(ICommandSender icommandsender) - { - return "commands.bind.usage"; - } - - public void processCommand(ICommandSender iCommandSender, String[] astring) - { - EntityPlayerMP entityplayermp = getCommandSenderAsPlayer(iCommandSender); - ItemStack item = entityplayermp.getCurrentEquippedItem(); - EntityPlayerMP targetPlayer = getPlayer(iCommandSender, astring[0]); - - if (targetPlayer == null) - { - throw new CommandException("commands.bind.failed.noPlayer"); - } - - if (item != null && item.getItem() instanceof IBindable) - { - if (EnergyItems.getOwnerName(item).isEmpty()) - { - EnergyItems.checkAndSetItemOwner(item, targetPlayer); - func_152373_a(iCommandSender, this, "commands.bind.success"); - } - else - { - throw new CommandException("commands.bind.failed.alreadyBound"); - } - } - else if (!(item.getItem() instanceof IBindable)) - { - throw new CommandException("commands.bind.failed.notBindable"); - } - } - - public List addTabCompletionOptions(ICommandSender iCommandSender, String[] astring) - { - return getListOfStringsMatchingLastWord(astring, this.getPlayer()); - } - - protected String[] getPlayer() - { - return MinecraftServer.getServer().getAllUsernames(); - } - - public boolean isUsernameIndex(String[] astring, int par2) - { - return par2 == 0; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandSN.java b/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandSN.java deleted file mode 100644 index 5f96be2d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandSN.java +++ /dev/null @@ -1,137 +0,0 @@ -package WayofTime.alchemicalWizardry.common.commands; - -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import net.minecraft.command.CommandBase; -import net.minecraft.command.CommandException; -import net.minecraft.command.ICommandSender; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.server.MinecraftServer; - -import java.util.List; - -public class CommandSN extends CommandBase -{ - public CommandSN() {} - - @Override - public String getCommandName() - { - return "soulnetwork"; - } - - @Override - public int getRequiredPermissionLevel() - { - return 2; - } - - @Override - public String getCommandUsage(ICommandSender icommandsender) - { - return "commands.soulnetwork.usage"; - } - - @Override - public void processCommand(ICommandSender icommandsender, String[] astring) - { - EntityPlayerMP targetPlayer = getPlayer(icommandsender, astring[0]); - String owner = targetPlayer.getDisplayName(); - EntityPlayerMP proxyPlayerName = getPlayer(icommandsender, astring[0]); - - if (astring.length >= 2 && astring.length <= 3) - { - if ("add".equalsIgnoreCase(astring[1])) - { - int amount = parseIntBounded(icommandsender, astring[2], Integer.MIN_VALUE, Integer.MAX_VALUE); - - SoulNetworkHandler.addCurrentEssenceToMaximum(owner, amount, Integer.MAX_VALUE); - func_152373_a(icommandsender, this, "commands.soulnetwork.add.success", amount, owner); - } - else if ("subtract".equalsIgnoreCase(astring[1])) - { - int amount = parseIntBounded(icommandsender, astring[2], Integer.MIN_VALUE, Integer.MAX_VALUE); - - if (amount > SoulNetworkHandler.getCurrentEssence(owner)) - { - int lp = SoulNetworkHandler.getCurrentEssence(owner); - SoulNetworkHandler.syphonFromNetwork(owner, lp); - func_152373_a(icommandsender, this, "commands.soulnetwork.subtract.success", SoulNetworkHandler.getCurrentEssence(owner), owner); - } - else - { - SoulNetworkHandler.syphonFromNetwork(owner, amount); - func_152373_a(icommandsender, this, "commands.soulnetwork.subtract.success", amount, owner); - } - } - else if ("fill".equalsIgnoreCase(astring[1])) - { - int amount = Integer.MAX_VALUE - SoulNetworkHandler.getCurrentEssence(owner); - SoulNetworkHandler.addCurrentEssenceToMaximum(owner, amount, Integer.MAX_VALUE); - func_152373_a(icommandsender, this, "commands.soulnetwork.fill.success", owner); - } - else if ("empty".equalsIgnoreCase(astring[1])) - { - SoulNetworkHandler.syphonFromNetwork(owner, SoulNetworkHandler.getCurrentEssence(owner)); - func_152373_a(icommandsender, this, "commands.soulnetwork.empty.success", owner); - } - else if ("get".equalsIgnoreCase(astring[1])) - { - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - func_152373_a(icommandsender, this, "commands.soulnetwork.get.success", currentEssence, owner); - } - else if ("fillMax".equalsIgnoreCase(astring[1])) - { - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - int orbTier = SoulNetworkHandler.getCurrentMaxOrb(owner); - int maxForOrb = SoulNetworkHandler.getMaximumForOrbTier(orbTier); - int fillAmount = maxForOrb - currentEssence; - SoulNetworkHandler.addCurrentEssenceToMaximum(owner, fillAmount, fillAmount); - func_152373_a(icommandsender, this, "commands.soulnetwork.fillMax.success", owner); - } - else if ("create".equalsIgnoreCase(astring[1])) - { - int orbTier = parseIntBounded(icommandsender, astring[2], 1, 6); - SoulNetworkHandler.setMaxOrbToMax(proxyPlayerName.getDisplayName(), orbTier); - func_152373_a(icommandsender, this, "commands.soulnetwork.create.success", owner, orbTier); - } - else - { - throw new CommandException("commands.soulnetwork.notACommand"); - } - } - else if (astring.length == 0) - { - throw new CommandException("commands.soulnetwork.noPlayer"); - } - else if (astring.length == 1) - { - throw new CommandException("commands.soulnetwork.noCommand"); - } - } - - @Override - public List addTabCompletionOptions(ICommandSender iCommandSender, String[] astring) - { - if (astring.length == 1) - { - return getListOfStringsMatchingLastWord(astring, this.getPlayer()); - } - else if (astring.length == 2) - { - return getListOfStringsMatchingLastWord(astring, "add", "subtract", "fill", "empty", "get", "fillMax", "create"); - } - - return null; - } - - protected String[] getPlayer() - { - return MinecraftServer.getServer().getAllUsernames(); - } - - @Override - public boolean isUsernameIndex(String[] astring, int par2) - { - return par2 == 0; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandUnbind.java b/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandUnbind.java deleted file mode 100644 index 3a1cc09a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandUnbind.java +++ /dev/null @@ -1,52 +0,0 @@ -package WayofTime.alchemicalWizardry.common.commands; - -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import net.minecraft.command.CommandBase; -import net.minecraft.command.CommandException; -import net.minecraft.command.ICommandSender; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; - -public class CommandUnbind extends CommandBase -{ - public CommandUnbind() {} - - public String getCommandName() - { - return "unbind"; - } - - public int getRequiredPermissionLevel() - { - return 2; - } - - public String getCommandUsage(ICommandSender icommandsender) - { - return "commands.unbind.usage"; - } - - public void processCommand(ICommandSender iCommandSender, String[] astring) - { - EntityPlayerMP entityplayermp = getCommandSenderAsPlayer(iCommandSender); - ItemStack item = entityplayermp.getCurrentEquippedItem(); - - if (item != null && item.getItem() instanceof IBindable) - { - if (!EnergyItems.getOwnerName(item).isEmpty()) - { - item.getTagCompound().removeTag("ownerName"); - func_152373_a(iCommandSender, this, "commands.unbind.success"); - } - else - { - throw new CommandException("commands.unbind.failed.notBindable"); - } - } - else if (!(item.getItem() instanceof IBindable)) - { - throw new CommandException("commands.unbind.failed.notBindable"); - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingManager.java b/src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingManager.java index 6f52fefa..b8ce890d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingManager.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingManager.java @@ -231,8 +231,8 @@ public class StorageBlockCraftingManager if (i == 2 && itemstack.getItem() == itemstack1.getItem() && itemstack.stackSize == 1 && itemstack1.stackSize == 1 && itemstack.getItem().isRepairable()) { Item item = itemstack.getItem(); - int j1 = item.getMaxDamage() - itemstack.getItemDamageForDisplay(); - int k = item.getMaxDamage() - itemstack1.getItemDamageForDisplay(); + int j1 = item.getMaxDamage() - itemstack.getItemDamage(); + int k = item.getMaxDamage() - itemstack1.getItemDamage(); int l = j1 + k + item.getMaxDamage() * 5 / 100; int i1 = item.getMaxDamage() - l; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java index 18503f85..24532279 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java @@ -14,8 +14,9 @@ import net.minecraft.block.BlockTrapDoor; import net.minecraft.init.Blocks; import net.minecraft.inventory.IInventory; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.common.demonVillage.loot.DemonVillageLootRegistry; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.IBlockPortalNode; @@ -276,7 +277,7 @@ public class BlockSet return GameRegistry.findBlock(modId, name); } - public int getMetaForDirection(ForgeDirection dir) + public int getMetaForDirection(EnumFacing dir) { if (metadata.length < 4) { @@ -298,7 +299,7 @@ public class BlockSet } } - public void buildAtIndex(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, ForgeDirection dir, int index, boolean populateInventories, int tier) + public void buildAtIndex(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, EnumFacing dir, int index, boolean populateInventories, int tier) { Block block = this.getBlock(); if (index >= positions.size() || block == null) @@ -333,14 +334,15 @@ public class BlockSet default: } - world.setBlock(xCoord + xOff, yCoord + yOff, zCoord + zOff, block, meta, 3); + BlockPos newPos = new BlockPos(xCoord + xOff, yCoord + yOff, zCoord + zOff); + world.setBlockState(newPos, block.getStateFromMeta(meta), 3); if(populateInventories) { - this.populateIfIInventory(world, xCoord + xOff, yCoord + yOff, zCoord + zOff, tier); + this.populateIfIInventory(world, newPos, tier); } if(block instanceof IBlockPortalNode) { - TileEntity tile = world.getTileEntity(xCoord + xOff, yCoord + yOff, zCoord + zOff); + TileEntity tile = world.getTileEntity(newPos); if(tile instanceof ITilePortalNode) { ((ITilePortalNode) tile).setPortalLocation(teDemonPortal); @@ -348,16 +350,16 @@ public class BlockSet } } - public void populateIfIInventory(World world, int x, int y, int z, int tier) + public void populateIfIInventory(World world, BlockPos pos, int tier) { - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); if(tile instanceof IInventory) { DemonVillageLootRegistry.populateChest((IInventory)tile, tier); } } - public void buildAll(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, ForgeDirection dir, boolean populateInventories, int tier) + public void buildAll(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, EnumFacing dir, boolean populateInventories, int tier) { for (int i = 0; i < positions.size(); i++) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java index fc1ba6b7..fb706a13 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java @@ -4,8 +4,10 @@ import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; @@ -52,7 +54,7 @@ public class BuildingSchematic blockList.add(set); } - public void buildAll(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, ForgeDirection dir, boolean populateInventories) + public void buildAll(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, EnumFacing dir, boolean populateInventories) { for (BlockSet set : blockList) { @@ -86,7 +88,7 @@ public class BuildingSchematic return new Int3(gridX, doorY, gridZ); } - public List<Int3> getGriddedPositions(ForgeDirection dir) + public List<Int3> getGriddedPositions(EnumFacing dir) { List<Int3> positionList = new ArrayList(); @@ -127,7 +129,7 @@ public class BuildingSchematic return positionList; } - public void destroyAllInField(World world, int xCoord, int yCoord, int zCoord, ForgeDirection dir) + public void destroyAllInField(World world, int xCoord, int yCoord, int zCoord, EnumFacing dir) { // GridSpaceHolder grid = this.createGSH(); //GridSpaceHolder is not aware of the buildings - need to use the schematic @@ -137,10 +139,12 @@ public class BuildingSchematic { for (Int3 pos : positionList) { - Block block = world.getBlock(xCoord + pos.xCoord, yCoord + i, zCoord + pos.zCoord); + BlockPos newPos = new BlockPos(xCoord + pos.xCoord, yCoord + i, zCoord + pos.zCoord); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); if (block != ModBlocks.blockDemonPortal) { - world.setBlockToAir(xCoord + pos.xCoord, yCoord + i, zCoord + pos.zCoord); + world.setBlockToAir(newPos); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonBuilding.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonBuilding.java index aa190a28..fa6450d7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonBuilding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonBuilding.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.common.demonVillage; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; @@ -30,17 +30,17 @@ public class DemonBuilding return schematic.getName(); } - public boolean isValid(GridSpaceHolder master, int gridX, int gridZ, ForgeDirection dir) + public boolean isValid(GridSpaceHolder master, int gridX, int gridZ, EnumFacing dir) { return area.doesContainAll(master, gridX, gridZ, dir); } - public void buildAll(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, ForgeDirection dir, boolean populateInventories) + public void buildAll(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, EnumFacing dir, boolean populateInventories) { schematic.buildAll(teDemonPortal, world, xCoord, yCoord, zCoord, dir, populateInventories); } - public void setAllGridSpaces(int xInit, int zInit, int yLevel, ForgeDirection dir, int type, GridSpaceHolder master) + public void setAllGridSpaces(int xInit, int zInit, int yLevel, EnumFacing dir, int type, GridSpaceHolder master) { area.setAllGridSpaces(xInit, zInit, yLevel, dir, type, master); } @@ -57,7 +57,7 @@ public class DemonBuilding return scheme.createGSH(); } - public Int3 getDoorSpace(ForgeDirection dir) + public Int3 getDoorSpace(EnumFacing dir) { int x; int z; @@ -84,7 +84,7 @@ public class DemonBuilding return new Int3(x, doorGridSpace.yCoord, z); } - public Int3 getGridOffsetFromRoad(ForgeDirection sideOfRoad, int yLevel) + public Int3 getGridOffsetFromRoad(EnumFacing sideOfRoad, int yLevel) { Int3 doorSpace = this.getDoorSpace(sideOfRoad); int x = doorSpace.xCoord; @@ -109,7 +109,7 @@ public class DemonBuilding return new Int3(x, yLevel, z); } - public void destroyAllInField(World world, int xCoord, int yCoord, int zCoord, ForgeDirection dir) + public void destroyAllInField(World world, int xCoord, int yCoord, int zCoord, EnumFacing dir) { schematic.destroyAllInField(world, xCoord, yCoord, zCoord, dir); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonVillagePath.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonVillagePath.java index ee83c7f8..eeb4da3c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonVillagePath.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonVillagePath.java @@ -3,9 +3,11 @@ package WayofTime.alchemicalWizardry.common.demonVillage; import net.minecraft.block.Block; import net.minecraft.block.BlockFlower; import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.IRoadWard; @@ -16,19 +18,19 @@ public class DemonVillagePath public int xPos; public int yPos; public int zPos; - public ForgeDirection dir; + public EnumFacing dir; public int length; public static boolean canGoDown = true; public static boolean tunnelIfObstructed = false; public static boolean createBridgeInAirIfObstructed = false; - public DemonVillagePath(int xi, int yi, int zi, ForgeDirection dir, int length) + public DemonVillagePath(int xi, int yi, int zi, EnumFacing dir2, int length) { this.xPos = xi; this.yPos = yi; this.zPos = zi; - this.dir = dir; + this.dir = dir2; this.length = length; } @@ -40,11 +42,11 @@ public class DemonVillagePath int rad = this.getRoadRadius(); int value = 0; - int finalYPos = this.constructPartialPath(portal, world, clearance, xi - rad * dir.offsetX, yi, zi - rad * dir.offsetZ, dir, length + rad, false); + int finalYPos = this.constructPartialPath(portal, world, clearance, xi - rad * dir.getFrontOffsetX(), yi, zi - rad * dir.getFrontOffsetZ(), dir, length + rad, false); for (int i = -rad; i <= rad; i++) { - value = Math.max(this.constructPartialPath(portal, world, clearance, xi - rad * dir.offsetX + i * dir.offsetZ, yi, zi - rad * dir.offsetZ + i * dir.offsetX, dir, length + 2 * rad, true), value); + value = Math.max(this.constructPartialPath(portal, world, clearance, xi - rad * dir.getFrontOffsetX() + i * dir.getFrontOffsetZ(), yi, zi - rad * dir.getFrontOffsetZ() + i * dir.getFrontOffsetX(), dir, length + 2 * rad, true), value); if(TEDemonPortal.printDebug) System.out.println("" + (length + 2 * rad) + ", " + value + ""); } @@ -80,12 +82,12 @@ public class DemonVillagePath * @param doConstruct * @return length if doConstruct, yi if !doConstruct */ - public int constructPartialPath(TEDemonPortal portal, World world, int clearance, int xi, int yi, int zi, ForgeDirection dir, int length, boolean doConstruct) + public int constructPartialPath(TEDemonPortal portal, World world, int clearance, int xi, int yi, int zi, EnumFacing dir, int length, boolean doConstruct) { for (int i = 0; i < length; i++) { - int xOffset = i * dir.offsetX; - int zOffset = i * dir.offsetZ; + int xOffset = i * dir.getFrontOffsetX(); + int zOffset = i * dir.getFrontOffsetZ(); boolean completed = false; @@ -93,14 +95,19 @@ public class DemonVillagePath { int sign = 1; - Block block1 = world.getBlock(xi + xOffset, yi + sign * yOffset, zi + zOffset); - Block highBlock1 = world.getBlock(xi + xOffset, yi + sign * yOffset + 1, zi + zOffset); + BlockPos pos1 = new BlockPos(xi + xOffset, yi + sign * yOffset, zi + zOffset); + BlockPos highPos1 = pos1.offsetUp(); + + IBlockState state1 = world.getBlockState(pos1); + IBlockState highState1 = world.getBlockState(highPos1); + Block block1 = state1.getBlock(); + Block highBlock1 = highState1.getBlock(); - if ((this.forceReplaceBlock(block1))||(!block1.isReplaceable(world, xi + xOffset, yi + sign * yOffset, zi + zOffset) && this.isBlockReplaceable(block1) ) && (this.forceCanTunnelUnder(highBlock1) || highBlock1.isReplaceable(world, xi + xOffset, yi + sign * yOffset + 1, zi + zOffset))) + if ((this.forceReplaceBlock(block1))||(!block1.isReplaceable(world, pos1) && this.isBlockReplaceable(block1) ) && (this.forceCanTunnelUnder(highBlock1) || highBlock1.isReplaceable(world, highPos1))) { if(doConstruct) { - world.setBlock(xi + xOffset, yi + sign * yOffset, zi + zOffset, portal.getRoadBlock(), portal.getRoadMeta(), 3); + world.setBlockState(pos1, portal.getRoadState(), 3); } yi += sign * yOffset; completed = true; @@ -108,14 +115,19 @@ public class DemonVillagePath } else if(canGoDown) { sign = -1; - Block block2 = world.getBlock(xi + xOffset, yi + sign * yOffset, zi + zOffset); - Block highBlock2 = world.getBlock(xi + xOffset, yi + sign * yOffset + 1, zi + zOffset); + pos1 = new BlockPos(xi + xOffset, yi + sign * yOffset, zi + zOffset); + highPos1 = pos1.offsetUp(); + + state1 = world.getBlockState(pos1); + highState1 = world.getBlockState(highPos1); + block1 = state1.getBlock(); + highBlock1 = highState1.getBlock(); - if ((this.forceReplaceBlock(block2))||(!block2.isReplaceable(world, xi + xOffset, yi + sign * yOffset, zi + zOffset) && this.isBlockReplaceable(block2)) && (this.forceCanTunnelUnder(highBlock2) || highBlock2.isReplaceable(world, xi + xOffset, yi + sign * yOffset + 1, zi + zOffset))) + if ((this.forceReplaceBlock(block1))||(!block1.isReplaceable(world, pos1) && this.isBlockReplaceable(block1) ) && (this.forceCanTunnelUnder(highBlock1) || highBlock1.isReplaceable(world, highPos1))) { - if(doConstruct) + if(doConstruct) { - world.setBlock(xi + xOffset, yi + sign * yOffset, zi + zOffset, portal.getRoadBlock(), portal.getRoadMeta(), 3); + world.setBlockState(pos1, portal.getRoadState(), 3); } yi += sign * yOffset; completed = true; @@ -129,15 +141,17 @@ public class DemonVillagePath boolean returnAmount = true; if(createBridgeInAirIfObstructed) { - Block block1 = world.getBlock(xi + xOffset, yi, zi + zOffset); + BlockPos pos1 = new BlockPos(xi + xOffset, yi, zi + zOffset); + IBlockState state1 = world.getBlockState(pos1); + Block block1 = state1.getBlock(); - if (block1.isReplaceable(world, xi + xOffset, yi, zi + zOffset) || !this.isBlockReplaceable(block1) || !this.forceReplaceBlock(block1)) + if (block1.isReplaceable(world, pos1) || !this.isBlockReplaceable(block1) || !this.forceReplaceBlock(block1)) { returnAmount = false; if(doConstruct) { - world.setBlock(xi + xOffset, yi, zi + zOffset, portal.getRoadBlock(), portal.getRoadMeta(), 3); + world.setBlockState(pos1, portal.getRoadState(), 3); } }else { @@ -146,18 +160,20 @@ public class DemonVillagePath }else if(tunnelIfObstructed) { - Block block1 = world.getBlock(xi + xOffset, yi, zi + zOffset); + BlockPos pos1 = new BlockPos(xi + xOffset, yi, zi + zOffset); + IBlockState state1 = world.getBlockState(pos1); + Block block1 = state1.getBlock(); - if (!block1.isReplaceable(world, xi + xOffset, yi, zi + zOffset) || this.isBlockReplaceable(block1) || !this.forceReplaceBlock(block1)) + if (!block1.isReplaceable(world, pos1) || this.isBlockReplaceable(block1) || !this.forceReplaceBlock(block1)) { returnAmount = false; if(doConstruct) { - world.setBlock(xi + xOffset, yi, zi + zOffset, portal.getRoadBlock(), portal.getRoadMeta(), 3); - world.setBlockToAir(xi + xOffset, yi + 1, zi + zOffset); - world.setBlockToAir(xi + xOffset, yi + 2, zi + zOffset); - world.setBlockToAir(xi + xOffset, yi + 3, zi + zOffset); + world.setBlockState(pos1, portal.getRoadState(), 3); + world.setBlockToAir(pos1.offsetUp(1)); + world.setBlockToAir(pos1.offsetUp(2)); + world.setBlockToAir(pos1.offsetUp(3)); } }else { @@ -183,27 +199,37 @@ public class DemonVillagePath for (int i = 0; i < length; i++) { - int xOffset = i * dir.offsetX; - int zOffset = i * dir.offsetZ; + int xOffset = i * dir.getFrontOffsetX(); + int zOffset = i * dir.getFrontOffsetZ(); for (int yOffset = 0; yOffset <= clearance; yOffset++) { int sign = 1; - Block block1 = world.getBlock(xi + xOffset, yi + sign * yOffset, zi + zOffset); - Block highBlock1 = world.getBlock(xi + xOffset, yi + sign * yOffset + 1, zi + zOffset); + BlockPos pos1 = new BlockPos(xi + xOffset, yi + sign * yOffset, zi + zOffset); + BlockPos highPos1 = pos1.offsetUp(); + + IBlockState state1 = world.getBlockState(pos1); + IBlockState highState1 = world.getBlockState(highPos1); + Block block1 = state1.getBlock(); + Block highBlock1 = highState1.getBlock(); - if ((this.forceReplaceBlock(block1))||(!block1.isReplaceable(world, xi + xOffset, yi + sign * yOffset, zi + zOffset) && this.isBlockReplaceable(block1) ) && (this.forceCanTunnelUnder(highBlock1) || highBlock1.isReplaceable(world, xi + xOffset, yi + sign * yOffset + 1, zi + zOffset))) + if ((this.forceReplaceBlock(block1))||(!block1.isReplaceable(world, pos1) && this.isBlockReplaceable(block1) ) && (this.forceCanTunnelUnder(highBlock1) || highBlock1.isReplaceable(world, highPos1))) { yi += sign * yOffset; break; } else { sign = -1; - Block block2 = world.getBlock(xi + xOffset, yi + sign * yOffset, zi + zOffset); - Block highBlock2 = world.getBlock(xi + xOffset, yi + sign * yOffset + 1, zi + zOffset); + BlockPos pos2 = new BlockPos(xi + xOffset, yi + sign * yOffset, zi + zOffset); + BlockPos highPos2 = pos2.offsetUp(); + + IBlockState state2 = world.getBlockState(pos2); + IBlockState highState2 = world.getBlockState(highPos2); + Block block2 = state2.getBlock(); + Block highBlock2 = highState2.getBlock(); - if ((this.forceReplaceBlock(block2))||(!block2.isReplaceable(world, xi + xOffset, yi + sign * yOffset, zi + zOffset) && this.isBlockReplaceable(block2) ) && (this.forceCanTunnelUnder(highBlock2) || highBlock2.isReplaceable(world, xi + xOffset, yi + sign * yOffset + 1, zi + zOffset))) + if ((this.forceReplaceBlock(block2))||(!block2.isReplaceable(world, pos2) && this.isBlockReplaceable(block2) ) && (this.forceCanTunnelUnder(highBlock2) || highBlock2.isReplaceable(world, highPos2))) { yi += sign * yOffset; break; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpaceHolder.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpaceHolder.java index e4c58087..bbb3c04f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpaceHolder.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpaceHolder.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.demonVillage; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; -import net.minecraft.block.Block; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; public class GridSpaceHolder { @@ -139,7 +141,7 @@ public class GridSpaceHolder } } - public boolean doesContainAll(GridSpaceHolder master, int xInit, int zInit, ForgeDirection dir) + public boolean doesContainAll(GridSpaceHolder master, int xInit, int zInit, EnumFacing dir) { if (master != null) { @@ -191,7 +193,7 @@ public class GridSpaceHolder return false; } - public void setAllGridSpaces(int xInit, int zInit, int yLevel, ForgeDirection dir, int type, GridSpaceHolder master) + public void setAllGridSpaces(int xInit, int zInit, int yLevel, EnumFacing dir, int type, GridSpaceHolder master) { if(TEDemonPortal.printDebug) AlchemicalWizardry.logger.info("Grid space selected: (" + xInit + "," + zInit + ")"); @@ -239,7 +241,7 @@ public class GridSpaceHolder } } - public void destroyAllInGridSpaces(World world, int xCoord, int yCoord, int zCoord, ForgeDirection dir) + public void destroyAllInGridSpaces(World world, int xCoord, int yCoord, int zCoord, EnumFacing dir) { for (int i = -negXRadius; i <= posXRadius; i++) { @@ -278,12 +280,14 @@ public class GridSpaceHolder { for (int m = -2; m <= 2; m++) { - Block block = world.getBlock(xCoord + xOff * 5 + l, yCoord, zCoord + zOff * 5 + m); + BlockPos newPos = new BlockPos(xCoord + xOff * 5 + l, yCoord, zCoord + zOff * 5 + m); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); if (block == ModBlocks.blockDemonPortal) { continue; } - world.setBlockToAir(xCoord + xOff * 5 + l, yCoord, zCoord + zOff * 5 + m); + world.setBlockToAir(newPos); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityAIOccasionalRangedAttack.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityAIOccasionalRangedAttack.java index d23816ae..9d7ea89f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityAIOccasionalRangedAttack.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityAIOccasionalRangedAttack.java @@ -24,7 +24,6 @@ public class EntityAIOccasionalRangedAttack extends EntityAIBase private int maxRangedAttackTime; private float field_96562_i; private float field_82642_h; - private static final String __OBFID = "CL_00001609"; private double range; public EntityAIOccasionalRangedAttack(IOccasionalRangedAttackMob p_i1649_1_, double p_i1649_2_, int p_i1649_4_, float p_i1649_5_, double range) @@ -110,7 +109,7 @@ public class EntityAIOccasionalRangedAttack extends EntityAIBase */ public void updateTask() { - double d0 = this.entityHost.getDistanceSq(this.attackTarget.posX, this.attackTarget.boundingBox.minY, this.attackTarget.posZ); + double d0 = this.entityHost.getDistanceSq(this.attackTarget.posX, this.attackTarget.getBoundingBox().minY, this.attackTarget.posZ); boolean flag = this.entityHost.getEntitySenses().canSee(this.attackTarget); if (flag) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityDemonAIHurtByTarget.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityDemonAIHurtByTarget.java index 147ddd73..a80ea0ba 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityDemonAIHurtByTarget.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityDemonAIHurtByTarget.java @@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.common.demonVillage.ai; import net.minecraft.entity.EntityCreature; import net.minecraft.entity.ai.EntityAIHurtByTarget; import net.minecraft.tileentity.TileEntity; -import WayofTime.alchemicalWizardry.api.Int3; +import net.minecraft.util.BlockPos; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; @@ -20,14 +20,14 @@ public class EntityDemonAIHurtByTarget extends EntityAIHurtByTarget @Override public void startExecuting() { - Int3 portalPosition = ((IHoardDemon)this.taskOwner).getPortalLocation(); + BlockPos portalPosition = ((IHoardDemon)this.taskOwner).getPortalLocation(); if(portalPosition == null) { super.startExecuting(); return; } - TileEntity portal = this.taskOwner.worldObj.getTileEntity(portalPosition.xCoord, portalPosition.yCoord, portalPosition.zCoord); + TileEntity portal = this.taskOwner.worldObj.getTileEntity(portalPosition); if((this.taskOwner.getAITarget() instanceof IHoardDemon && portalPosition.equals(((IHoardDemon)this.taskOwner.getAITarget()).getPortalLocation()))) { @@ -45,7 +45,7 @@ public class EntityDemonAIHurtByTarget extends EntityAIHurtByTarget } // double d0 = this.getTargetDistance(); -// List list = this.taskOwner.worldObj.getEntitiesWithinAABB(this.taskOwner.getClass(), AxisAlignedBB.getBoundingBox(this.taskOwner.posX, this.taskOwner.posY, this.taskOwner.posZ, this.taskOwner.posX + 1.0D, this.taskOwner.posY + 1.0D, this.taskOwner.posZ + 1.0D).expand(d0, 10.0D, d0)); +// List list = this.taskOwner.worldObj.getEntitiesWithinAABB(this.taskOwner.getClass(), new AxisAlignedBB(this.taskOwner.posX, this.taskOwner.posY, this.taskOwner.posZ, this.taskOwner.posX + 1.0D, this.taskOwner.posY + 1.0D, this.taskOwner.posZ + 1.0D).expand(d0, 10.0D, d0)); // Iterator iterator = list.iterator(); // // while (iterator.hasNext()) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGrunt.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGrunt.java index c507d72a..613eaf56 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGrunt.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGrunt.java @@ -20,11 +20,11 @@ import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage; import WayofTime.alchemicalWizardry.common.EntityAITargetAggroCloaking; @@ -34,7 +34,6 @@ import WayofTime.alchemicalWizardry.common.demonVillage.ai.IOccasionalRangedAtta import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; -import WayofTime.alchemicalWizardry.common.rituals.LocalStorageAlphaPact; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRangedAttackMob, IHoardDemon @@ -43,7 +42,7 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); private boolean isAngry = true; - private Int3 demonPortal; + private BlockPos demonPortal; private static float maxTamedHealth = 200.0F; private static float maxUntamedHealth = 200.0F; @@ -54,7 +53,7 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan { super(par1World, AlchemicalWizardry.entityMinorDemonGruntID); this.setSize(0.7F, 1.8F); - this.getNavigator().setAvoidsWater(true); +// this.getNavigator().setAvoidsWater(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, this.aiSit); this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); @@ -68,7 +67,7 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan this.setAggro(false); this.setTamed(false); - demonPortal = new Int3(0,0,0); + demonPortal = new BlockPos(0,0,0); if (par1World != null && !par1World.isRemote) { @@ -128,13 +127,13 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan } @Override - public void setPortalLocation(Int3 position) + public void setPortalLocation(BlockPos position) { this.demonPortal = position; } @Override - public Int3 getPortalLocation() + public BlockPos getPortalLocation() { return this.demonPortal; } @@ -176,23 +175,25 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan * (abstract) Protected helper method to write subclass entity data to NBT. */ @Override - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) + public void writeEntityToNBT(NBTTagCompound tag) { - super.writeEntityToNBT(par1NBTTagCompound); - par1NBTTagCompound.setBoolean("Angry", this.isAngry()); + super.writeEntityToNBT(tag); + tag.setBoolean("Angry", this.isAngry()); - this.demonPortal.writeToNBT(par1NBTTagCompound); + tag.setInteger("xCoord", this.demonPortal.getX()); + tag.setInteger("yCoord", this.demonPortal.getY()); + tag.setInteger("zCoord", this.demonPortal.getZ()); } /** * (abstract) Protected helper method to read subclass entity data from NBT. */ @Override - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) + public void readEntityFromNBT(NBTTagCompound tag) { - super.readEntityFromNBT(par1NBTTagCompound); - this.setAngry(par1NBTTagCompound.getBoolean("Angry")); - this.demonPortal = Int3.readFromNBT(par1NBTTagCompound); + super.readEntityFromNBT(tag); + this.setAngry(tag.getBoolean("Angry")); + this.demonPortal = new BlockPos(tag.getInteger("xCoord"), tag.getInteger("yCoord"), tag.getInteger("zCoord")); this.setCombatTask(); } @@ -252,7 +253,7 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan { if(!this.enthralled) { - TileEntity tile = this.worldObj.getTileEntity(this.demonPortal.xCoord, this.demonPortal.yCoord, this.demonPortal.zCoord); + TileEntity tile = this.worldObj.getTileEntity(this.demonPortal); if(tile instanceof TEDemonPortal) { ((TEDemonPortal) tile).enthrallDemon(this); @@ -261,12 +262,12 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan { IMasterRitualStone stone = (IMasterRitualStone)tile; LocalRitualStorage stor = stone.getLocalStorage(); - if(stor instanceof LocalStorageAlphaPact) - { - LocalStorageAlphaPact storage = (LocalStorageAlphaPact)stor; - - storage.thrallDemon(this); - } +// if(stor instanceof LocalStorageAlphaPact) +// { +// LocalStorageAlphaPact storage = (LocalStorageAlphaPact)stor; +// +// storage.thrallDemon(this); +// } } } super.onUpdate(); @@ -325,7 +326,7 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan --itemstack.stackSize; } - this.heal((float) itemfood.func_150905_g(itemstack)); + this.heal((float) itemfood.getHealAmount(itemstack)); if (itemstack.stackSize <= 0) { @@ -343,8 +344,8 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan { this.aiSit.setSitting(!this.isSitting()); this.isJumping = false; - this.setPathToEntity(null); - this.setTarget(null); +// this.setPathToEntity(null); +// this.setTarget(null); this.setAttackTarget(null); } @@ -367,7 +368,7 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan if (this.rand.nextInt(1) == 0) { this.setTamed(true); - this.setPathToEntity(null); +// this.setPathToEntity(null); this.setAttackTarget(null); this.aiSit.setSitting(true); this.setHealth(maxTamedHealth); @@ -500,7 +501,7 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan } @Override - public boolean thrallDemon(Int3 location) + public boolean thrallDemon(BlockPos location) { this.setPortalLocation(location); return true; @@ -509,9 +510,9 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan @Override public boolean isSamePortal(IHoardDemon demon) { - Int3 position = demon.getPortalLocation(); - TileEntity portal = worldObj.getTileEntity(this.demonPortal.xCoord, this.demonPortal.yCoord, this.demonPortal.zCoord); + BlockPos position = demon.getPortalLocation(); + TileEntity portal = worldObj.getTileEntity(this.demonPortal); - return portal instanceof TEDemonPortal ? portal == worldObj.getTileEntity(position.xCoord, position.yCoord, position.zCoord) : false; + return portal instanceof TEDemonPortal ? portal == worldObj.getTileEntity(position) : false; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/IHoardDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/IHoardDemon.java index 7f9f2660..61732750 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/IHoardDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/IHoardDemon.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; -import WayofTime.alchemicalWizardry.api.Int3; +import net.minecraft.util.BlockPos; public interface IHoardDemon { - void setPortalLocation(Int3 position); - Int3 getPortalLocation(); - boolean thrallDemon(Int3 location); + void setPortalLocation(BlockPos position); + BlockPos getPortalLocation(); + boolean thrallDemon(BlockPos location); boolean isSamePortal(IHoardDemon demon); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/loot/DemonVillageLootRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/loot/DemonVillageLootRegistry.java index a501269b..2b648fb8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/loot/DemonVillageLootRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/loot/DemonVillageLootRegistry.java @@ -18,7 +18,7 @@ public class DemonVillageLootRegistry String[] tier1Strings = new String[]{ChestGenHooks.DUNGEON_CHEST, ChestGenHooks.PYRAMID_DESERT_CHEST}; for(String str : tier1Strings) { - WeightedRandomChestContent[] contents = ChestGenHooks.getItems(str, new Random()); + List<WeightedRandomChestContent> contents = ChestGenHooks.getItems(str, new Random()); if(contents != null) { for(WeightedRandomChestContent content : contents) @@ -34,16 +34,6 @@ public class DemonVillageLootRegistry public static void populateChest(IInventory tile, int tier) { - WeightedRandomChestContent.generateChestContents(new Random(), toArray(list1), tile, tile.getSizeInventory() / 3); - } - - public static WeightedRandomChestContent[] toArray(List<WeightedRandomChestContent> aList) - { - int size = aList.size(); - WeightedRandomChestContent[] contents = new WeightedRandomChestContent[size]; - - contents = aList.toArray(contents); - - return contents; + WeightedRandomChestContent.generateChestContents(new Random(), list1, tile, tile.getSizeInventory() / 3); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/BlockDemonChest.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/BlockDemonChest.java index eec54945..f880b4e1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/BlockDemonChest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/BlockDemonChest.java @@ -1,9 +1,9 @@ package WayofTime.alchemicalWizardry.common.demonVillage.tileEntity; -import net.minecraft.block.Block; import net.minecraft.block.BlockChest; -import net.minecraft.inventory.IInventory; +import net.minecraft.block.state.IBlockState; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; @@ -12,15 +12,10 @@ public class BlockDemonChest extends BlockChest implements IBlockPortalNode public BlockDemonChest() { super(0); - this.setHardness(2.5F).setStepSound(soundTypeWood).setBlockName("demonChest"); + this.setHardness(2.5F).setStepSound(soundTypeWood).setUnlocalizedName("demonChest"); this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); } - public IInventory func_149951_m(World world, int x, int y, int z) - { - return (IInventory)world.getTileEntity(x, y, z); - } - @Override public TileEntity createNewTileEntity(World var1, int var2) { @@ -28,18 +23,18 @@ public class BlockDemonChest extends BlockChest implements IBlockPortalNode } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int meta) + public void breakBlock(World world, BlockPos pos, IBlockState state) { - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); if(tile instanceof TEDemonChest) { ((TEDemonChest) tile).notifyPortalOfInteraction(); } - super.breakBlock(world, x, y, z, block, meta); + super.breakBlock(world, pos, state); } @Override - public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_) + public boolean canPlaceBlockAt(World world, BlockPos pos) { return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonChest.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonChest.java index a1d4fd88..8444a3a9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonChest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonChest.java @@ -1,16 +1,17 @@ package WayofTime.alchemicalWizardry.common.demonVillage.tileEntity; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityChest; -import WayofTime.alchemicalWizardry.api.Int3; +import net.minecraft.util.BlockPos; public class TEDemonChest extends TileEntityChest implements ITilePortalNode { - public Int3 portalLocation = new Int3(0,0,0); + public BlockPos portalLocation = BlockPos.ORIGIN; @Override - public String getInventoryName() + public String getName() { return "Demon's Chest"; } @@ -20,21 +21,24 @@ public class TEDemonChest extends TileEntityChest implements ITilePortalNode { super.readFromNBT(tag); NBTTagCompound portalTag = tag.getCompoundTag("portalLocation"); - portalLocation = Int3.readFromNBT(portalTag); + portalLocation = new BlockPos(portalTag.getInteger("xCoord"), portalTag.getInteger("yCoord"), portalTag.getInteger("zCoord")); } @Override public void writeToNBT(NBTTagCompound tag) { super.writeToNBT(tag); - NBTTagCompound portalTag = portalLocation.writeToNBT(new NBTTagCompound()); + NBTTagCompound portalTag = new NBTTagCompound(); + portalTag.setInteger("xCoord", portalLocation.getX()); + portalTag.setInteger("yCoord", portalLocation.getY()); + portalTag.setInteger("zCoord", portalLocation.getZ()); tag.setTag("portalLocation", portalTag); } @Override - public void openInventory() + public void openInventory(EntityPlayer player) { - super.openInventory(); + super.openInventory(player); this.notifyPortalOfInteraction(); } @@ -49,13 +53,13 @@ public class TEDemonChest extends TileEntityChest implements ITilePortalNode { if(teDemonPortal != null) { - portalLocation = new Int3(teDemonPortal.xCoord, teDemonPortal.yCoord, teDemonPortal.zCoord); + portalLocation = teDemonPortal.getPos(); } } public TEDemonPortal getDemonPortal() { - TileEntity tile = worldObj.getTileEntity(portalLocation.xCoord, portalLocation.yCoord, portalLocation.zCoord); + TileEntity tile = worldObj.getTileEntity(portalLocation); if(tile instanceof TEDemonPortal) { return (TEDemonPortal)tile; @@ -71,6 +75,6 @@ public class TEDemonChest extends TileEntityChest implements ITilePortalNode return; } - portal.notifyDemons(xCoord, yCoord, zCoord, 50); + portal.notifyDemons(pos.getX(), pos.getY(), pos.getZ(), 50); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java index 5c6f43c4..a086a797 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java @@ -15,6 +15,7 @@ import java.util.Random; import java.util.Set; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityCreature; import net.minecraft.entity.EntityLivingBase; @@ -22,9 +23,11 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; +import net.minecraft.server.gui.IUpdatePlayerListBox; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraftforge.common.util.Constants; -import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; @@ -42,7 +45,7 @@ import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardD import com.google.gson.Gson; import com.google.gson.GsonBuilder; -public class TEDemonPortal extends TileEntity +public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox { public DemonType type = DemonType.FIRE; @@ -85,7 +88,7 @@ public class TEDemonPortal extends TileEntity public float pointPool; public String nextDemonPortalName = ""; - public ForgeDirection nextDemonPortalDirection = ForgeDirection.DOWN; + public EnumFacing nextDemonPortalDirection = EnumFacing.DOWN; public int buildingStage = -1; @@ -116,7 +119,7 @@ public class TEDemonPortal extends TileEntity isInitialized = false; - this.setGridSpace(0, 0, new GridSpace(GridSpace.MAIN_PORTAL, yCoord)); + this.setGridSpace(0, 0, new GridSpace(GridSpace.MAIN_PORTAL, pos.getY())); this.houseCooldown = 0; this.roadCooldown = 0; @@ -282,7 +285,7 @@ public class TEDemonPortal extends TileEntity { if(demon instanceof IHoardDemon) { - boolean enthrall = ((IHoardDemon) demon).thrallDemon(new Int3(this.xCoord, this.yCoord, this.zCoord)); + boolean enthrall = ((IHoardDemon) demon).thrallDemon(pos); if(enthrall) { this.hoardList.add((IHoardDemon)demon); @@ -306,10 +309,10 @@ public class TEDemonPortal extends TileEntity { if (Math.abs(xIndex) == 1 || Math.abs(zIndex) == 1) { - this.setGridSpace(xIndex, zIndex, new GridSpace(GridSpace.ROAD, yCoord)); + this.setGridSpace(xIndex, zIndex, new GridSpace(GridSpace.ROAD, pos.getY())); } else if (xIndex == 0 && zIndex == 0) { - this.setGridSpace(0, 0, new GridSpace(GridSpace.MAIN_PORTAL, yCoord)); + this.setGridSpace(0, 0, new GridSpace(GridSpace.MAIN_PORTAL, pos.getY())); } else { this.setGridSpace(xIndex, zIndex, new GridSpace()); @@ -334,7 +337,7 @@ public class TEDemonPortal extends TileEntity public void createParty() { - worldObj.createExplosion(null, xCoord + rand.nextInt(10) - rand.nextInt(10), yCoord, zCoord + rand.nextInt(10) - rand.nextInt(10), 5*rand.nextFloat(), false); + worldObj.createExplosion(null, pos.getX() + rand.nextInt(10) - rand.nextInt(10), pos.getY(), pos.getZ() + rand.nextInt(10) - rand.nextInt(10), 5*rand.nextFloat(), false); } public void start() @@ -346,7 +349,7 @@ public class TEDemonPortal extends TileEntity * Randomly increase one of the cooldowns such that a road, house, or a demon portal tier is caused. Demons are also randomly spawned via this mechanic. */ @Override - public void updateEntity() + public void update() { if(worldObj.isRemote) { @@ -364,7 +367,7 @@ public class TEDemonPortal extends TileEntity if(delayBeforeParty <= 0) { - worldObj.createExplosion(null, xCoord, yCoord, zCoord, 15, false); + worldObj.createExplosion(null, pos.getX(), pos.getY(), pos.getZ(), 15, false); this.initialize(); } @@ -493,7 +496,7 @@ public class TEDemonPortal extends TileEntity this.nextDemonPortalName = par1NBTTagCompound.getString("nextDemonPortalName"); this.buildingStage = par1NBTTagCompound.getInteger("buildingStage"); - this.nextDemonPortalDirection = ForgeDirection.getOrientation(par1NBTTagCompound.getInteger("nextDemonPortalDirection")); + this.nextDemonPortalDirection = EnumFacing.getFront(par1NBTTagCompound.getInteger("nextDemonPortalDirection")); this.pointPool = par1NBTTagCompound.getFloat("pointPool"); this.lockdownTimer = par1NBTTagCompound.getInteger("lockdownTimer"); @@ -553,24 +556,24 @@ public class TEDemonPortal extends TileEntity public int createRandomDemonHoard(TEDemonPortal teDemonPortal, int tier, DemonType type, boolean spawnGuardian) { int next = rand.nextInt(4); - ForgeDirection dir; + EnumFacing dir; switch (next) { case 0: - dir = ForgeDirection.NORTH; + dir = EnumFacing.NORTH; break; case 1: - dir = ForgeDirection.SOUTH; + dir = EnumFacing.SOUTH; break; case 2: - dir = ForgeDirection.EAST; + dir = EnumFacing.EAST; break; case 3: - dir = ForgeDirection.WEST; + dir = EnumFacing.WEST; break; default: - dir = ForgeDirection.NORTH; + dir = EnumFacing.NORTH; } Int3 road = findRoadSpaceFromDirection(dir, (rand.nextInt(negXRadius + negZRadius + posXRadius + posZRadius)) + 1); @@ -582,30 +585,30 @@ public class TEDemonPortal extends TileEntity if(TEDemonPortal.printDebug) System.out.println("Spawning Demons"); - return DemonPacketRegistry.spawnDemons(teDemonPortal, worldObj, xCoord + road.xCoord * 5, road.yCoord + 1, zCoord + road.zCoord * 5, type, tier, spawnGuardian); + return DemonPacketRegistry.spawnDemons(teDemonPortal, worldObj, pos.getX() + road.xCoord * 5, road.yCoord + 1, pos.getZ() + road.zCoord * 5, type, tier, spawnGuardian); } public int createRandomRoad() //Return the number of road spaces { int next = rand.nextInt(4); - ForgeDirection dir; + EnumFacing dir; switch (next) { case 0: - dir = ForgeDirection.NORTH; + dir = EnumFacing.NORTH; break; case 1: - dir = ForgeDirection.SOUTH; + dir = EnumFacing.SOUTH; break; case 2: - dir = ForgeDirection.EAST; + dir = EnumFacing.EAST; break; case 3: - dir = ForgeDirection.WEST; + dir = EnumFacing.WEST; break; default: - dir = ForgeDirection.NORTH; + dir = EnumFacing.NORTH; } Int3 road = findRoadSpaceFromDirection(dir, (rand.nextInt(negXRadius + negZRadius + posXRadius + posZRadius)) + 1); @@ -617,7 +620,7 @@ public class TEDemonPortal extends TileEntity if(printDebug) AlchemicalWizardry.logger.info("X: " + x + " Z: " + z + " Direction: " + dir.toString()); - List<ForgeDirection> directions = this.findValidExtentionDirection(x, z); + List<EnumFacing> directions = this.findValidExtentionDirection(x, z); if (directions.size() <= 0) { @@ -627,9 +630,9 @@ public class TEDemonPortal extends TileEntity int maxDistance = 5; int distance = 0; - ForgeDirection dominantDirection = null; + EnumFacing dominantDirection = null; - for (ForgeDirection direction : directions) + for (EnumFacing direction : directions) { int amt = this.getLength(direction, maxDistance, x, z); if (amt > distance) @@ -656,9 +659,9 @@ public class TEDemonPortal extends TileEntity return distance; } - public List<ForgeDirection> findValidExtentionDirection(int x, int z) + public List<EnumFacing> findValidExtentionDirection(int x, int z) { - List<ForgeDirection> directions = new LinkedList(); + List<EnumFacing> directions = new LinkedList(); if (this.getGridSpace(x, z) == null || !this.getGridSpace(x, z).isRoadSegment()) { @@ -668,41 +671,41 @@ public class TEDemonPortal extends TileEntity GridSpace nextGrid = this.getGridSpace(x + 1, z); if (nextGrid.isEmpty()) { - directions.add(ForgeDirection.EAST); + directions.add(EnumFacing.EAST); } nextGrid = this.getGridSpace(x - 1, z); if (nextGrid.isEmpty()) { - directions.add(ForgeDirection.WEST); + directions.add(EnumFacing.WEST); } nextGrid = this.getGridSpace(x, z + 1); if (nextGrid.isEmpty()) { - directions.add(ForgeDirection.SOUTH); + directions.add(EnumFacing.SOUTH); } nextGrid = this.getGridSpace(x, z - 1); if (nextGrid.isEmpty()) { - directions.add(ForgeDirection.NORTH); + directions.add(EnumFacing.NORTH); } return directions; } - public int getLength(ForgeDirection dir, int maxLength, int x, int z) //Number of spaces forward + public int getLength(EnumFacing dir, int maxLength, int x, int z) //Number of spaces forward { for (int i = 1; i <= maxLength; i++) { - GridSpace space = this.getGridSpace(x + i * dir.offsetX, z + i * dir.offsetZ); + GridSpace space = this.getGridSpace(x + i * dir.getFrontOffsetX(), z + i * dir.getFrontOffsetZ()); if (space.isEmpty()) { for (int k = 1; k <= this.getRoadSpacer(); k++) { - GridSpace space1 = this.getGridSpace(x + i * dir.offsetX + dir.offsetZ * k, z + i * dir.offsetZ + dir.offsetX * k); - GridSpace space2 = this.getGridSpace(x + i * dir.offsetX - dir.offsetZ * k, z + i * dir.offsetZ - dir.offsetX * k); + GridSpace space1 = this.getGridSpace(x + i * dir.getFrontOffsetX() + dir.getFrontOffsetZ() * k, z + i * dir.getFrontOffsetZ() + dir.getFrontOffsetX() * k); + GridSpace space2 = this.getGridSpace(x + i * dir.getFrontOffsetX() - dir.getFrontOffsetZ() * k, z + i * dir.getFrontOffsetZ() - dir.getFrontOffsetX() * k); if (space1.isRoadSegment() || space2.isRoadSegment()) { @@ -723,10 +726,10 @@ public class TEDemonPortal extends TileEntity return maxLength; } - public Int3 findRoadSpaceFromDirection(ForgeDirection dir, int amount) //TODO + public Int3 findRoadSpaceFromDirection(EnumFacing dir, int amount) //TODO { int index = 0; - if (dir == ForgeDirection.NORTH) + if (dir == EnumFacing.NORTH) { if(printDebug) System.out.print("NORTH!"); @@ -745,7 +748,7 @@ public class TEDemonPortal extends TileEntity } } } - } else if (dir == ForgeDirection.SOUTH) + } else if (dir == EnumFacing.SOUTH) { for (int i = negZRadius + Math.min(posZRadius, limit); i >= Math.max(0, -limit + negZRadius); i--) { @@ -762,7 +765,7 @@ public class TEDemonPortal extends TileEntity } } } - } else if (dir == ForgeDirection.EAST) + } else if (dir == EnumFacing.EAST) { for (int i = negXRadius + Math.min(posXRadius, limit); i >= Math.max(0, -limit + negXRadius); i--) { @@ -779,7 +782,7 @@ public class TEDemonPortal extends TileEntity } } } - } else if (dir == ForgeDirection.WEST) + } else if (dir == EnumFacing.WEST) { for (int i = Math.max(0, -limit + negXRadius); i <= negXRadius + Math.min(posXRadius, limit); i++) { @@ -801,10 +804,10 @@ public class TEDemonPortal extends TileEntity return new Int3(0, 0, 0); } - public Int3 findEmptySpaceNearRoad(ForgeDirection dir, int amount, int closeness) + public Int3 findEmptySpaceNearRoad(EnumFacing dir, int amount, int closeness) { int index = 0; - if (dir == ForgeDirection.NORTH) + if (dir == EnumFacing.NORTH) { if(printDebug) System.out.print("NORTH!"); @@ -828,7 +831,7 @@ public class TEDemonPortal extends TileEntity } } } - } else if (dir == ForgeDirection.SOUTH) + } else if (dir == EnumFacing.SOUTH) { for (int i = negZRadius + posZRadius; i >= 0; i--) { @@ -850,7 +853,7 @@ public class TEDemonPortal extends TileEntity } } } - } else if (dir == ForgeDirection.EAST) + } else if (dir == EnumFacing.EAST) { for (int i = negXRadius + posXRadius; i >= 0; i--) { @@ -872,7 +875,7 @@ public class TEDemonPortal extends TileEntity } } } - } else if (dir == ForgeDirection.WEST) + } else if (dir == EnumFacing.WEST) { for (int i = 0; i <= negXRadius + posXRadius; i++) { @@ -899,10 +902,10 @@ public class TEDemonPortal extends TileEntity return new Int3(0, 0, 0); } - public Int3 findEmptySpaceFromDirection(ForgeDirection dir, int amount) + public Int3 findEmptySpaceFromDirection(EnumFacing dir, int amount) { int index = 0; - if (dir == ForgeDirection.NORTH) + if (dir == EnumFacing.NORTH) { if(printDebug) System.out.print("NORTH!"); @@ -921,7 +924,7 @@ public class TEDemonPortal extends TileEntity } } } - } else if (dir == ForgeDirection.SOUTH) + } else if (dir == EnumFacing.SOUTH) { for (int i = negZRadius + posZRadius; i >= 0; i--) { @@ -938,7 +941,7 @@ public class TEDemonPortal extends TileEntity } } } - } else if (dir == ForgeDirection.EAST) + } else if (dir == EnumFacing.EAST) { for (int i = negXRadius + posXRadius; i >= 0; i--) { @@ -955,7 +958,7 @@ public class TEDemonPortal extends TileEntity } } } - } else if (dir == ForgeDirection.WEST) + } else if (dir == EnumFacing.WEST) { for (int i = 0; i <= negXRadius + posXRadius; i++) { @@ -977,7 +980,7 @@ public class TEDemonPortal extends TileEntity return new Int3(0, 0, 0); } - public int createGriddedRoad(int gridXi, int yi, int gridZi, ForgeDirection dir, int gridLength, boolean convertStarter) //Total grid length + public int createGriddedRoad(int gridXi, int yi, int gridZi, EnumFacing dir, int gridLength, boolean convertStarter) //Total grid length { if (gridLength == 0 || gridLength == 1) { @@ -992,13 +995,13 @@ public class TEDemonPortal extends TileEntity { this.setGridSpace(initGridX, initGridZ, new GridSpace(GridSpace.CROSSROAD, initY)); - DemonCrosspath crosspath = new DemonCrosspath(xCoord + initGridX * 5, initY, zCoord + initGridZ * 5); + DemonCrosspath crosspath = new DemonCrosspath(pos.getX() + initGridX * 5, initY, pos.getZ() + initGridZ * 5); crosspath.createCrosspath(worldObj); } for (int index = 0; index < gridLength - 1; index++) { - DemonVillagePath path = new DemonVillagePath(xCoord + initGridX * 5, initY, zCoord + initGridZ * 5, dir, 6); + DemonVillagePath path = new DemonVillagePath(pos.getX() + initGridX * 5, initY, pos.getZ() + initGridZ * 5, dir, 6); Int3AndBool temp = path.constructFullPath(this, worldObj, this.getRoadStepClearance()); Int3 next = temp.coords; @@ -1015,8 +1018,8 @@ public class TEDemonPortal extends TileEntity return index; } - initGridX += dir.offsetX; - initGridZ += dir.offsetZ; + initGridX += dir.getFrontOffsetX(); + initGridZ += dir.getFrontOffsetZ(); if (!this.getGridSpace(initGridX, initGridZ).isRoadSegment()) { @@ -1157,10 +1160,10 @@ public class TEDemonPortal extends TileEntity // // this.initialize(); // -// if (ForgeDirection.getOrientation(side) == ForgeDirection.UP) +// if (EnumFacing.getOrientation(side) == EnumFacing.UP) // { // this.createRandomBuilding(DemonBuilding.BUILDING_HOUSE, 0); -// } else if (ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) +// } else if (EnumFacing.getOrientation(side) == EnumFacing.DOWN) // { // this.createRandomBuilding(DemonBuilding.BUILDING_PORTAL, 0); // } else @@ -1194,11 +1197,11 @@ public class TEDemonPortal extends TileEntity // GridSpaceHolder grid = this.createGSH(); - List<ForgeDirection> directions = new ArrayList(); + List<EnumFacing> directions = new ArrayList(); for (int i = 2; i < 6; i++) { - ForgeDirection testDir = ForgeDirection.getOrientation(i); + EnumFacing testDir = EnumFacing.getFront(i); directions.add(testDir); } @@ -1207,9 +1210,9 @@ public class TEDemonPortal extends TileEntity return 0; } - HashMap<ForgeDirection, List<DemonBuilding>> schemMap = new HashMap(); + HashMap<EnumFacing, List<DemonBuilding>> schemMap = new HashMap(); - for (ForgeDirection nextDir : directions) + for (EnumFacing nextDir : directions) { for (DemonBuilding build : TEDemonPortal.buildingList) { @@ -1234,7 +1237,7 @@ public class TEDemonPortal extends TileEntity return 0; } - ForgeDirection chosenDirection = (ForgeDirection) schemMap.keySet().toArray()[new Random().nextInt(schemMap.keySet().size())]; + EnumFacing chosenDirection = (EnumFacing) schemMap.keySet().toArray()[new Random().nextInt(schemMap.keySet().size())]; DemonBuilding build = schemMap.get(chosenDirection).get(new Random().nextInt(schemMap.get(chosenDirection).size())); // Int3 portalSpace = build.getDoorSpace(chosenDirection); @@ -1276,7 +1279,7 @@ public class TEDemonPortal extends TileEntity GridSpaceHolder grid = this.createGSH(); - ForgeDirection chosenDirection = this.nextDemonPortalDirection; + EnumFacing chosenDirection = this.nextDemonPortalDirection; Int3 portalSpace = build.getDoorSpace(chosenDirection); int yOffset = portalSpace.yCoord; @@ -1288,9 +1291,9 @@ public class TEDemonPortal extends TileEntity case 1: int yDestination = yLevel + yOffset; - if(yCoord != yDestination) + if(pos.getY() != yDestination) { - BlockTeleposer.swapBlocks(this, worldObj, worldObj, xCoord, yCoord, zCoord, xCoord, yDestination, zCoord); + BlockTeleposer.swapBlocks(this, worldObj, worldObj, pos, new BlockPos(pos.getX(), yDestination, pos.getZ())); }else { //Nuthin - just as a reminder that we can now increment properly @@ -1298,9 +1301,9 @@ public class TEDemonPortal extends TileEntity break; case 2: - build.destroyAllInField(worldObj, xCoord + (x) * 5, yLevel, zCoord + (z) * 5, chosenDirection.getOpposite()); + build.destroyAllInField(worldObj, pos.getX() + (x) * 5, yLevel, pos.getZ() + (z) * 5, chosenDirection.getOpposite()); - build.buildAll(this, worldObj, xCoord + (x) * 5, yLevel, zCoord + (z) * 5, chosenDirection.getOpposite(), true); + build.buildAll(this, worldObj, pos.getX() + (x) * 5, yLevel, pos.getZ() + (z) * 5, chosenDirection.getOpposite(), true); build.setAllGridSpaces(x, z, yLevel, chosenDirection.getOpposite(), GridSpace.MAIN_PORTAL, grid); this.loadGSH(grid); break; @@ -1314,24 +1317,24 @@ public class TEDemonPortal extends TileEntity public int createRandomHouse(int buildingTier) { int next = rand.nextInt(4); - ForgeDirection dir; + EnumFacing dir; switch (next) { case 0: - dir = ForgeDirection.NORTH; + dir = EnumFacing.NORTH; break; case 1: - dir = ForgeDirection.SOUTH; + dir = EnumFacing.SOUTH; break; case 2: - dir = ForgeDirection.EAST; + dir = EnumFacing.EAST; break; case 3: - dir = ForgeDirection.WEST; + dir = EnumFacing.WEST; break; default: - dir = ForgeDirection.NORTH; + dir = EnumFacing.NORTH; } Int3 space = this.findRoadSpaceFromDirection(dir, (rand.nextInt(negXRadius + negZRadius + posXRadius + posZRadius)) + 1); // Second: 1 * @@ -1350,12 +1353,12 @@ public class TEDemonPortal extends TileEntity return 0; } - List<ForgeDirection> directions = new ArrayList(); + List<EnumFacing> directions = new ArrayList(); for (int i = 2; i < 6; i++) { - ForgeDirection testDir = ForgeDirection.getOrientation(i); - if (this.getGridSpace(x + testDir.offsetX, z + testDir.offsetZ).isEmpty()) + EnumFacing testDir = EnumFacing.getFront(i); + if (this.getGridSpace(x + testDir.getFrontOffsetX(), z + testDir.getFrontOffsetZ()).isEmpty()) { directions.add(testDir); } @@ -1366,9 +1369,9 @@ public class TEDemonPortal extends TileEntity return 0; } - HashMap<ForgeDirection, List<DemonBuilding>> schemMap = new HashMap(); + HashMap<EnumFacing, List<DemonBuilding>> schemMap = new HashMap(); - for (ForgeDirection nextDir : directions) + for (EnumFacing nextDir : directions) { for (DemonBuilding build : TEDemonPortal.buildingList) { @@ -1403,19 +1406,19 @@ public class TEDemonPortal extends TileEntity return 0; } - ForgeDirection chosenDirection = (ForgeDirection) schemMap.keySet().toArray()[new Random().nextInt(schemMap.keySet().size())]; + EnumFacing chosenDirection = (EnumFacing) schemMap.keySet().toArray()[new Random().nextInt(schemMap.keySet().size())]; DemonBuilding build = schemMap.get(chosenDirection).get(new Random().nextInt(schemMap.get(chosenDirection).size())); Int3 offsetSpace = build.getGridOffsetFromRoad(chosenDirection, yLevel); int xOff = offsetSpace.xCoord; int zOff = offsetSpace.zCoord; - build.destroyAllInField(worldObj, xCoord + (x + xOff) * 5, yLevel, zCoord + (z + zOff) * 5, chosenDirection.getOpposite()); - build.buildAll(this, worldObj, xCoord + (x + xOff) * 5, yLevel, zCoord + (z + zOff) * 5, chosenDirection.getOpposite(), true); + build.destroyAllInField(worldObj, pos.getX() + (x + xOff) * 5, yLevel, pos.getZ() + (z + zOff) * 5, chosenDirection.getOpposite()); + build.buildAll(this, worldObj, pos.getX() + (x + xOff) * 5, yLevel, pos.getZ() + (z + zOff) * 5, chosenDirection.getOpposite(), true); build.setAllGridSpaces(x + xOff, z + zOff, yLevel, chosenDirection.getOpposite(), GridSpace.HOUSE, grid); this.loadGSH(grid); - DemonVillagePath path = new DemonVillagePath(xCoord + (x) * 5, yLevel, zCoord + (z) * 5, chosenDirection, 2); + DemonVillagePath path = new DemonVillagePath(pos.getX() + (x) * 5, yLevel, pos.getZ() + (z) * 5, chosenDirection, 2); Int3AndBool temp = path.constructFullPath(this, worldObj, this.getRoadStepClearance()); @@ -1446,14 +1449,14 @@ public class TEDemonPortal extends TileEntity return -1; } - public void createRoad(int xi, int yi, int zi, ForgeDirection dir, int length, boolean doesNotDrop) + public void createRoad(int xi, int yi, int zi, EnumFacing dir, int length, boolean doesNotDrop) { int curX = xi; int curY = yi; int curZ = zi; int roadRadius = this.getRoadRadius(); - if (dir.offsetY != 0) + if (dir.getFrontOffsetY() != 0) { return; } @@ -1495,6 +1498,11 @@ public class TEDemonPortal extends TileEntity } return 0; } + + public IBlockState getRoadState() + { + return getRoadBlock().getStateFromMeta(getRoadMeta()); + } public int getRoadStepClearance() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/BookEntityItem.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/BookEntityItem.java index 14f06b92..00187b3d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/BookEntityItem.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/BookEntityItem.java @@ -26,7 +26,7 @@ public class BookEntityItem extends EntityItem public BookEntityItem(World world, Entity original, ItemStack stack) { this(world, original.posX, original.posY, original.posZ); - this.delayBeforeCanPickup = 20; + this.setDefaultPickupDelay(); this.motionX = original.motionX; this.motionY = original.motionY; this.motionZ = original.motionZ; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java index 3d21cda8..58b13aa2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java @@ -1,34 +1,31 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.*; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.entity.ai.EntityAIAttackOnCollide; +import net.minecraft.entity.ai.EntityAIFollowOwner; +import net.minecraft.entity.ai.EntityAIHurtByTarget; +import net.minecraft.entity.ai.EntityAILookIdle; +import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; +import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; +import net.minecraft.entity.ai.EntityAISwimming; +import net.minecraft.entity.ai.EntityAIWander; +import net.minecraft.entity.ai.EntityAIWatchClosest; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; +import net.minecraft.pathfinding.PathNavigateGround; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; public class EntityBileDemon extends EntityDemon { - private static float maxTamedHealth = 100.0F; - private static float maxUntamedHealth = 200.0F; - private int attackTimer; + public EntityBileDemon(World par1World) { super(par1World, AlchemicalWizardry.entityBileDemonID); + maxTamedHealth = 100.0F; + maxUntamedHealth = 200.0F; this.setSize(1.3F, 2.0F); - this.getNavigator().setAvoidsWater(true); + ((PathNavigateGround)this.getNavigator()).func_179690_a(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0D, true)); this.tasks.addTask(3, this.aiSit); @@ -41,6 +38,7 @@ public class EntityBileDemon extends EntityDemon this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true)); this.setTamed(false); attackTimer = 0; + this.applyEntityAttributes(); } @Override @@ -61,338 +59,4 @@ public class EntityBileDemon extends EntityDemon //this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D); } - - /** - * Returns true if the newer Entity AI code should be run - */ - public boolean isAIEnabled() - { - return true; - } - - /** - * Sets the active target the Task system uses for tracking - */ - public void setAttackTarget(EntityLivingBase par1EntityLivingBase) - { - super.setAttackTarget(par1EntityLivingBase); - - if (par1EntityLivingBase == null) - { - this.setAngry(false); - } else if (!this.isTamed()) - { - this.setAngry(true); - } - } - - /** - * main AI tick function, replaces updateEntityActionState - */ - protected void updateAITick() - { - this.dataWatcher.updateObject(18, this.getHealth()); - } - - protected void entityInit() - { - super.entityInit(); - this.dataWatcher.addObject(18, this.getHealth()); - //this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1))); - } - - /** - * Plays step sound at given x, y, z for the entity - */ - protected void playStepSound(int par1, int par2, int par3, int par4) - { - this.playSound("mob.zombie.step", 0.15F, 1.0F); - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeEntityToNBT(par1NBTTagCompound); - par1NBTTagCompound.setBoolean("Angry", this.isAngry()); - par1NBTTagCompound.setByte("attackTimer", (byte) attackTimer); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readEntityFromNBT(par1NBTTagCompound); - this.setAngry(par1NBTTagCompound.getBoolean("Angry")); - - attackTimer = par1NBTTagCompound.getByte("attackTimer"); - } - - /** - * Returns the sound this mob makes while it's alive. - */ - protected String getLivingSound() - { - return "none"; - } - - /** - * Returns the sound this mob makes when it is hurt. - */ - protected String getHurtSound() - { - return "mob.irongolem.hit"; - } - - /** - * Returns the sound this mob makes on death. - */ - protected String getDeathSound() - { - return "mob.irongolem.death"; - } - - /** - * Returns the volume for the sounds this mob makes. - */ - protected float getSoundVolume() - { - return 1.0F; - } - - /** - * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons - * use this to react to sunlight and start to burn. - */ - public void onLivingUpdate() - { - super.onLivingUpdate(); - - if (attackTimer > 0) - { - attackTimer--; - } - } - - /** - * Called to update the entity's position/logic. - */ - public void onUpdate() - { - super.onUpdate(); - } - - public float getEyeHeight() - { - return this.height * 0.8F; - } - - /** - * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently - * use in wolves. - */ - public int getVerticalFaceSpeed() - { - return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); - } - - /** - * Called when the entity is attacked. - */ - public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) - { - if (this.isEntityInvulnerable()) - { - return false; - } else - { - Entity entity = par1DamageSource.getEntity(); - this.aiSit.setSitting(false); - - if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) - { - par2 = (par2 + 1.0F) / 2.0F; - } - - return super.attackEntityFrom(par1DamageSource, par2); - } - } - - public boolean attackEntityAsMob(Entity par1Entity) - { - this.attackTimer = 10; - this.worldObj.setEntityState(this, (byte) 4); - boolean flag = par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) (7 + this.rand.nextInt(15))); - - if (flag) - { - par1Entity.motionY += 0.4000000059604645D; - } - - this.playSound("mob.irongolem.throw", 1.0F, 1.0F); - return flag; - } - - public void setTamed(boolean par1) - { - super.setTamed(par1); - - if (par1) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - } - - /** - * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. - */ - @Override - public boolean interact(EntityPlayer par1EntityPlayer) - { - ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); - - if (this.isTamed()) - { - if (itemstack != null) - { - if (itemstack.getItem() instanceof ItemFood) - { - ItemFood itemfood = (ItemFood) itemstack.getItem(); - - if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < maxTamedHealth) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - this.heal((float) itemfood.func_150905_g(itemstack)); - - if (itemstack.stackSize <= 0) - { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); - } - - return true; - } - } - } - - if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack)) - { - if (!this.worldObj.isRemote) - { - this.aiSit.setSitting(!this.isSitting()); - this.isJumping = false; - this.setPathToEntity(null); - this.setTarget(null); - this.setAttackTarget(null); - } - - this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); - } - } else if (itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - if (itemstack.stackSize <= 0) - { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); - } - - if (!this.worldObj.isRemote) - { - if (this.rand.nextInt(1) == 0) - { - this.setTamed(true); - this.setPathToEntity(null); - this.setAttackTarget(null); - this.aiSit.setSitting(true); - this.setHealth(maxTamedHealth); - this.func_152115_b(par1EntityPlayer.getUniqueID().toString()); - this.playTameEffect(true); - this.worldObj.setEntityState(this, (byte) 7); - } else - { - this.playTameEffect(false); - this.worldObj.setEntityState(this, (byte) 6); - } - } - - return true; - } - - return super.interact(par1EntityPlayer); - } - - /** - * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on - * the animal type) - */ - public boolean isBreedingItem(ItemStack par1ItemStack) - { - return false; - } - - /** - * Determines whether this wolf is angry or not. - */ - public boolean isAngry() - { - return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; - } - - /** - * Sets whether this wolf is angry or not. - */ - public void setAngry(boolean par1) - { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); - - if (par1) - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); - } else - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); - } - } - - /** - * Determines if an entity can be despawned, used on idle far away entities - */ - protected boolean canDespawn() - { - return false; - } - - @Override - public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) - { - if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) - { - if (par1EntityLivingBase instanceof EntityBileDemon) - { - EntityBileDemon entitywolf = (EntityBileDemon) par1EntityLivingBase; - - if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) - { - return false; - } - } - - return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); - } else - { - return false; - } - } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java index 2dad0271..973908d4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java @@ -1,24 +1,21 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; -import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.*; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.entity.ai.EntityAIAttackOnCollide; +import net.minecraft.entity.ai.EntityAIFollowOwner; +import net.minecraft.entity.ai.EntityAIHurtByTarget; +import net.minecraft.entity.ai.EntityAILeapAtTarget; +import net.minecraft.entity.ai.EntityAILookIdle; +import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; +import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; +import net.minecraft.entity.ai.EntityAISwimming; +import net.minecraft.entity.ai.EntityAIWander; +import net.minecraft.entity.ai.EntityAIWatchClosest; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; +import net.minecraft.pathfinding.PathNavigateGround; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; public class EntityBoulderFist extends EntityDemon { @@ -31,7 +28,7 @@ public class EntityBoulderFist extends EntityDemon { super(par1World, AlchemicalWizardry.entityBoulderFistID); this.setSize(0.8F, 1.2F); - this.getNavigator().setAvoidsWater(true); + ((PathNavigateGround)this.getNavigator()).func_179690_a(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, this.aiSit); this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F)); @@ -70,334 +67,6 @@ public class EntityBoulderFist extends EntityDemon } } - /** - * Returns true if the newer Entity AI code should be run - */ - public boolean isAIEnabled() - { - return true; - } - - /** - * Sets the active target the Task system uses for tracking - */ - public void setAttackTarget(EntityLivingBase par1EntityLivingBase) - { - super.setAttackTarget(par1EntityLivingBase); - - if (par1EntityLivingBase == null) - { - this.setAngry(false); - } else if (!this.isTamed()) - { - this.setAngry(true); - } - } - - /** - * main AI tick function, replaces updateEntityActionState - */ - protected void updateAITick() - { - this.dataWatcher.updateObject(18, this.getHealth()); - } - - protected void entityInit() - { - super.entityInit(); - this.dataWatcher.addObject(18, this.getHealth()); - } - - /** - * Plays step sound at given x, y, z for the entity - */ - protected void playStepSound(int par1, int par2, int par3, int par4) - { - this.playSound("mob.zombie.step", 0.15F, 1.0F); - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeEntityToNBT(par1NBTTagCompound); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readEntityFromNBT(par1NBTTagCompound); - this.setAngry(par1NBTTagCompound.getBoolean("Angry")); - - this.setCombatTask(); - } - - /** - * Returns the sound this mob makes while it's alive. - */ - protected String getLivingSound() - { - //TODO change sounds - return this.isAngry() ? "mob.wolf.growl" : (this.rand.nextInt(3) == 0 ? (this.isTamed() && this.dataWatcher.getWatchableObjectFloat(18) < 10.0F ? "mob.wolf.whine" : "mob.wolf.panting") : "mob.wolf.bark"); - } - - /** - * Returns the sound this mob makes when it is hurt. - */ - protected String getHurtSound() - { - return "mob.wolf.hurt"; - } - - /** - * Returns the sound this mob makes on death. - */ - protected String getDeathSound() - { - return "mob.wolf.death"; - } - - /** - * Returns the volume for the sounds this mob makes. - */ - protected float getSoundVolume() - { - return 0.4F; - } - - /** - * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons - * use this to react to sunlight and start to burn. - */ - public void onLivingUpdate() - { - super.onLivingUpdate(); - } - - /** - * Called to update the entity's position/logic. - */ - public void onUpdate() - { - super.onUpdate(); - } - - public float getEyeHeight() - { - return this.height * 0.8F; - } - - /** - * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently - * use in wolves. - */ - public int getVerticalFaceSpeed() - { - return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); - } - - /** - * Called when the entity is attacked. - */ - public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) - { - if (this.isEntityInvulnerable()) - { - return false; - } else - { - Entity entity = par1DamageSource.getEntity(); - this.aiSit.setSitting(false); - - if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) - { - par2 = (par2 + 1.0F) / 2.0F; - } - - return super.attackEntityFrom(par1DamageSource, par2); - } - } - - public boolean attackEntityAsMob(Entity par1Entity) - { - int i = this.isTamed() ? 6 : 7; - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); - } - - public void setTamed(boolean par1) - { - super.setTamed(par1); - - if (par1) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - } - - /** - * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. - */ - @Override - public boolean interact(EntityPlayer par1EntityPlayer) - { - ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); - - if (this.isTamed()) - { - if (itemstack != null) - { - if (itemstack.getItem() instanceof ItemFood) - { - ItemFood itemfood = (ItemFood) itemstack.getItem(); - - if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < maxTamedHealth) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - this.heal((float) itemfood.func_150905_g(itemstack)); - - if (itemstack.stackSize <= 0) - { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); - } - - return true; - } - } - } - - if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack)) - { - if (!this.worldObj.isRemote) - { - this.aiSit.setSitting(!this.isSitting()); - this.isJumping = false; - this.setPathToEntity(null); - this.setTarget(null); - this.setAttackTarget(null); - } - - this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); - } - } else if (itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - if (itemstack.stackSize <= 0) - { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); - } - - if (!this.worldObj.isRemote) - { - if (this.rand.nextInt(1) == 0) - { - this.setTamed(true); - this.setPathToEntity(null); - this.setAttackTarget(null); - this.aiSit.setSitting(true); - this.setHealth(maxTamedHealth); - this.func_152115_b(par1EntityPlayer.getUniqueID().toString()); - this.playTameEffect(true); - this.worldObj.setEntityState(this, (byte) 7); - } else - { - this.playTameEffect(false); - this.worldObj.setEntityState(this, (byte) 6); - } - } - - return true; - } - - return super.interact(par1EntityPlayer); - } - - - /** - * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on - * the animal type) - */ - public boolean isBreedingItem(ItemStack par1ItemStack) - { - return false; - } - - /** - * Determines whether this wolf is angry or not. - */ - public boolean isAngry() - { - return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; - } - - /** - * Sets whether this wolf is angry or not. - */ - public void setAngry(boolean par1) - { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); - - if (par1) - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); - } else - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); - } - } - - /** - * Determines if an entity can be despawned, used on idle far away entities - */ - protected boolean canDespawn() - { - return false; - } - - @Override - public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) - { - if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) - { - if (par1EntityLivingBase instanceof EntityBoulderFist) - { - EntityBoulderFist entitywolf = (EntityBoulderFist) par1EntityLivingBase; - - if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) - { - return false; - } - } - - return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); - } else - { - return false; - } - } - - /** - * Attack the specified entity using a ranged attack. - */ - public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) - { - HolyProjectile hol = new HolyProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 5, 600); - this.worldObj.spawnEntityInWorld(hol); - } - /** * sets this entity's combat AI. */ diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java index a9179329..c65baff2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java @@ -1,11 +1,22 @@ package WayofTime.alchemicalWizardry.common.entity.mob; +import net.minecraft.entity.Entity; import net.minecraft.entity.EntityAgeable; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntityGhast; +import net.minecraft.entity.passive.EntityAnimal; +import net.minecraft.entity.passive.EntityHorse; import net.minecraft.entity.passive.EntityTameable; +import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ChatComponentTranslation; +import net.minecraft.util.DamageSource; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.common.IDemon; @@ -14,8 +25,12 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class EntityDemon extends EntityTameable implements IDemon { - private boolean isAggro; - private String demonID; + protected boolean isAggro; + protected String demonID; + + protected float maxTamedHealth = 100.0F; + protected float maxUntamedHealth = 200.0F; + protected int attackTimer; protected boolean dropCrystal = true; @@ -61,13 +76,15 @@ public class EntityDemon extends EntityTameable implements IDemon // TODO Auto-generated method stub return null; } - + @Override public void writeToNBT(NBTTagCompound tag) { super.writeToNBT(tag); tag.setBoolean("dropCrystal", this.getDoesDropCrystal()); + tag.setBoolean("isAggro", isAggro); + tag.setString("demonID", demonID); } @Override @@ -76,6 +93,8 @@ public class EntityDemon extends EntityTameable implements IDemon super.readFromNBT(tag); this.setDropCrystal(tag.getBoolean("dropCrystal")); + isAggro = tag.getBoolean("isAggro"); + demonID = tag.getString("demonID"); } @Override @@ -92,7 +111,7 @@ public class EntityDemon extends EntityTameable implements IDemon DemonPlacer.setOwnerName(drop, SpellHelper.getUsername((EntityPlayer) this.getOwner())); } - if (this.hasCustomNameTag()) + if (this.hasCustomName()) { drop.setStackDisplayName(this.getCustomNameTag()); } @@ -138,4 +157,387 @@ public class EntityDemon extends EntityTameable implements IDemon { this.demonID = id; } + + + /** + * Returns true if the newer Entity AI code should be run + */ + public boolean isAIEnabled() + { + return true; + } + + /** + * Sets the active target the Task system uses for tracking + */ + public void setAttackTarget(EntityLivingBase par1EntityLivingBase) + { + super.setAttackTarget(par1EntityLivingBase); + + if (par1EntityLivingBase == null) + { + this.setAngry(false); + } else if (!this.isTamed()) + { + this.setAngry(true); + } + } + + /** + * main AI tick function, replaces updateEntityActionState + */ + protected void updateAITick() + { + this.dataWatcher.updateObject(18, this.getHealth()); + } + + protected void entityInit() + { + super.entityInit(); + this.dataWatcher.addObject(18, this.getHealth()); + this.dataWatcher.addObject(19, 0); + //this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1))); + } + + /** + * Plays step sound at given x, y, z for the entity + */ + protected void playStepSound(int par1, int par2, int par3, int par4) + { + this.playSound("mob.zombie.step", 0.15F, 1.0F); + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) + { + super.writeEntityToNBT(par1NBTTagCompound); + par1NBTTagCompound.setBoolean("Angry", this.isAngry()); + par1NBTTagCompound.setByte("attackTimer", (byte) attackTimer); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) + { + super.readEntityFromNBT(par1NBTTagCompound); + this.setAngry(par1NBTTagCompound.getBoolean("Angry")); + + attackTimer = par1NBTTagCompound.getByte("attackTimer"); + } + + /** + * Returns the sound this mob makes while it's alive. + */ + protected String getLivingSound() + { + return "none"; + } + + /** + * Returns the sound this mob makes when it is hurt. + */ + protected String getHurtSound() + { + return "mob.irongolem.hit"; + } + + /** + * Returns the sound this mob makes on death. + */ + protected String getDeathSound() + { + return "mob.irongolem.death"; + } + + /** + * Returns the volume for the sounds this mob makes. + */ + protected float getSoundVolume() + { + return 1.0F; + } + + /** + * Returns the item ID for the item the mob drops on death. + */ + protected int getDropItemId() + { + return -1; + } + + public int getAttackTimer() + { + return attackTimer; + } + + /** + * Called to update the entity's position/logic. + */ + public void onUpdate() + { + super.onUpdate(); + } + + public float getEyeHeight() + { + return this.height * 0.8F; + } + + /** + * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently + * use in wolves. + */ + public int getVerticalFaceSpeed() + { + return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); + } + + /** + * Called when the entity is attacked. + */ + public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) + { +// if (this.isEntityInvulnerable()) +// { +// return false; +// } else + { + Entity entity = par1DamageSource.getEntity(); + this.aiSit.setSitting(false); + + if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) + { + par2 = (par2 + 1.0F) / 2.0F; + } + + return super.attackEntityFrom(par1DamageSource, par2); + } + } + + public boolean attackEntityAsMob(Entity par1Entity) + { + this.attackTimer = 10; + this.worldObj.setEntityState(this, (byte) 4); + boolean flag = par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) (7 + this.rand.nextInt(15))); + + if (flag) + { + par1Entity.motionY += 0.4000000059604645D; + } + + this.playSound("mob.irongolem.throw", 1.0F, 1.0F); + return flag; + } + + public void setTamed(boolean par1) + { + super.setTamed(par1); + + if (par1) + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); + } else + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); + } + } + + /** + * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. + */ + @Override + public boolean interact(EntityPlayer par1EntityPlayer) + { + ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); + + if (this.isTamed()) + { + if (itemstack != null) + { + if (itemstack.getItem() instanceof ItemFood) + { + ItemFood itemfood = (ItemFood) itemstack.getItem(); + + if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < maxTamedHealth) + { + if (!par1EntityPlayer.capabilities.isCreativeMode) + { + --itemstack.stackSize; + } + + this.heal((float) itemfood.getHealAmount(itemstack)); + + if (itemstack.stackSize <= 0) + { + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); + } + + return true; + } + } + } + + if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack)) + { + if (!this.worldObj.isRemote) + { + this.aiSit.setSitting(!this.isSitting()); + this.isJumping = false; +// this.setPathToEntity(null); +// this.setTarget(null); + this.setAttackTarget(null); + } + + this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); + } + } else if (itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) + { + if (!par1EntityPlayer.capabilities.isCreativeMode) + { + --itemstack.stackSize; + } + + if (itemstack.stackSize <= 0) + { + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); + } + + if (!this.worldObj.isRemote) + { + if (this.rand.nextInt(1) == 0) + { + this.setTamed(true); +// this.setPathToEntity(null); + this.setAttackTarget(null); + this.aiSit.setSitting(true); + this.setHealth(maxTamedHealth); + this.func_152115_b(par1EntityPlayer.getUniqueID().toString()); + this.playTameEffect(true); + this.worldObj.setEntityState(this, (byte) 7); + } else + { + this.playTameEffect(false); + this.worldObj.setEntityState(this, (byte) 6); + } + } + + return true; + } + + return super.interact(par1EntityPlayer); + } + + /** + * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on + * the animal type) + */ + public boolean isBreedingItem(ItemStack par1ItemStack) + { + return false; + } + + /** + * Determines whether this wolf is angry or not. + */ + public boolean isAngry() + { + return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; + } + + /** + * Sets whether this wolf is angry or not. + */ + public void setAngry(boolean par1) + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + + if (par1) + { + this.dataWatcher.updateObject(16, b0 | 2); + } else + { + this.dataWatcher.updateObject(16, b0 & -3); + } + } + + /** + * Return this wolf's collar color. + */ + public int getCollarColor() + { + return this.dataWatcher.getWatchableObjectByte(20) & 15; + } + + /** + * Set this wolf's collar color. + */ + public void setCollarColor(int par1) + { + this.dataWatcher.updateObject(20, par1 & 15); + } + + /** + * This function is used when two same-species animals in 'love mode' breed to generate the new baby animal. + */ + public EntityWolf spawnBabyAnimal(EntityAgeable par1EntityAgeable) + { + return null; + } + + public void func_70918_i(boolean par1) + { + if (par1) + { + this.dataWatcher.updateObject(19, 1); + } else + { + this.dataWatcher.updateObject(19, 0); + } + } + + /** + * Returns true if the mob is currently able to mate with the specified mob. + */ + public boolean canMateWith(EntityAnimal par1EntityAnimal) + { + return false; + } + + public boolean func_70922_bv() + { + return this.dataWatcher.getWatchableObjectByte(19) == 1; + } + + /** + * Determines if an entity can be despawned, used on idle far away entities + */ + protected boolean canDespawn() + { + return false; + } + + @Override + public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) + { + if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) + { + if (par1EntityLivingBase instanceof EntityBileDemon) + { + EntityBileDemon entitywolf = (EntityBileDemon) par1EntityLivingBase; + + if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) + { + return false; + } + } + + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + } else + { + return false; + } + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java index 6b6d73e2..621c390c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java @@ -2,13 +2,13 @@ package WayofTime.alchemicalWizardry.common.entity.mob; import java.util.List; -import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIAttackOnCollide; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityGhast; +import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.entity.passive.EntityHorse; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; @@ -16,11 +16,14 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class EntityElemental extends EntityDemon { @@ -81,57 +84,60 @@ public class EntityElemental extends EntityDemon /** * Moves the entity based on the specified heading. Args: strafe, forward */ - public void moveEntityWithHeading(float par1, float par2) + public void moveEntityWithHeading(float p_70612_1_, float p_70612_2_) { if (this.isInWater()) { - this.moveFlying(par1, par2, 0.02F); + this.moveFlying(p_70612_1_, p_70612_2_, 0.02F); this.moveEntity(this.motionX, this.motionY, this.motionZ); this.motionX *= 0.800000011920929D; this.motionY *= 0.800000011920929D; this.motionZ *= 0.800000011920929D; - } else if (this.handleLavaMovement()) + } + else if (this.isInLava()) { - this.moveFlying(par1, par2, 0.02F); + this.moveFlying(p_70612_1_, p_70612_2_, 0.02F); this.moveEntity(this.motionX, this.motionY, this.motionZ); this.motionX *= 0.5D; this.motionY *= 0.5D; this.motionZ *= 0.5D; - } else + } + else { float f2 = 0.91F; if (this.onGround) { - f2 = 0.54600006F; - Block i = this.worldObj.getBlock(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.boundingBox.minY) - 1, MathHelper.floor_double(this.posZ)); - - if (i != null) - { - f2 = i.slipperiness * 0.91F; - } + f2 = this.worldObj.getBlockState(new BlockPos(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.getEntityBoundingBox().minY) - 1, MathHelper.floor_double(this.posZ))).getBlock().slipperiness * 0.91F; } float f3 = 0.16277136F / (f2 * f2 * f2); - this.moveFlying(par1, par2, this.onGround ? 0.1F * f3 : 0.02F); + this.moveFlying(p_70612_1_, p_70612_2_, this.onGround ? 0.1F * f3 : 0.02F); f2 = 0.91F; if (this.onGround) { - f2 = 0.54600006F; - Block j = this.worldObj.getBlock(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.boundingBox.minY) - 1, MathHelper.floor_double(this.posZ)); - - if (j != null) - { - f2 = j.slipperiness * 0.91F; - } + f2 = this.worldObj.getBlockState(new BlockPos(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.getEntityBoundingBox().minY) - 1, MathHelper.floor_double(this.posZ))).getBlock().slipperiness * 0.91F; } this.moveEntity(this.motionX, this.motionY, this.motionZ); - this.motionX *= (double) f2; - this.motionY *= (double) f2; - this.motionZ *= (double) f2; + this.motionX *= (double)f2; + this.motionY *= (double)f2; + this.motionZ *= (double)f2; } + + this.prevLimbSwingAmount = this.limbSwingAmount; + double d1 = this.posX - this.prevPosX; + double d0 = this.posZ - this.prevPosZ; + float f4 = MathHelper.sqrt_double(d1 * d1 + d0 * d0) * 4.0F; + + if (f4 > 1.0F) + { + f4 = 1.0F; + } + + this.limbSwingAmount += (f4 - this.limbSwingAmount) * 0.4F; + this.limbSwing += this.limbSwingAmount; } /** @@ -142,115 +148,10 @@ public class EntityElemental extends EntityDemon return false; } - protected void updateEntityActionState() + @SideOnly(Side.CLIENT) + public boolean func_110182_bF() { - if (this.getHealth() <= this.getMaxHealth() / 2.0f && worldObj.rand.nextInt(200) == 0) - { - this.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionReciprocation.id, 100, 1)); - } - - this.prevAttackCounter = this.attackCounter; - double d0 = this.waypointX - this.posX; - double d1 = this.waypointY - this.posY; - double d2 = this.waypointZ - this.posZ; - double d3 = d0 * d0 + d1 * d1 + d2 * d2; - - if (d3 < 1.0D || d3 > 3600.0D) - { - this.waypointX = this.posX + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); - this.waypointY = this.posY + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); - this.waypointZ = this.posZ + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); - } - - if (this.courseChangeCooldown-- <= 0) - { - this.courseChangeCooldown += this.rand.nextInt(5) + 2; - d3 = (double) MathHelper.sqrt_double(d3); - - if (this.isCourseTraversable(this.waypointX, this.waypointY, this.waypointZ, d3)) - { - this.motionX += d0 / d3 * 0.1D; - this.motionY += d1 / d3 * 0.1D; - this.motionZ += d2 / d3 * 0.1D; - } else - { - this.waypointX = this.posX + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); - this.waypointY = this.posY + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); - this.waypointZ = this.posZ + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); - } - } - - if (this.targetedEntity != null && this.targetedEntity.isDead) - { - this.targetedEntity = null; - } - - if (this.targetedEntity == null || this.aggroCooldown-- <= 0) - { - this.targetedEntity = getClosestVulnerableMonsterToEntity(this, 100.0D); - - if (this.targetedEntity != null) - { - this.aggroCooldown = 20; - } - } - - double d4 = 64.0D; - - if (this.targetedEntity != null && this.targetedEntity.getDistanceSqToEntity(this) < d4 * d4) - { - double d5 = this.targetedEntity.posX - this.posX; - double d6 = this.targetedEntity.boundingBox.minY + (double) (this.targetedEntity.height / 2.0F) - (this.posY + (double) (this.height / 2.0F)); - double d7 = this.targetedEntity.posZ - this.posZ; - this.renderYawOffset = this.rotationYaw = -((float) Math.atan2(d5, d7)) * 180.0F / (float) Math.PI; - - if (this.courseChangeCooldown <= 0) - { - if (isCourseTraversable(this.targetedEntity.posX, this.targetedEntity.posY, this.targetedEntity.posZ, Math.sqrt(d5 * d5 + d6 * d6 + d7 * d7))) - { - this.waypointX = this.targetedEntity.posX; - this.waypointY = this.targetedEntity.posY; - this.waypointZ = this.targetedEntity.posZ; - this.motionX += d5 / d3 * 0.1D; - this.motionY += d6 / d3 * 0.1D; - this.motionZ += d7 / d3 * 0.1D; - } else - { - this.waypointX = this.posX + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); - this.waypointY = this.posY + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); - this.waypointZ = this.posZ + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); - this.motionX += d5 / d3 * 0.1D; - this.motionY += d6 / d3 * 0.1D; - this.motionZ += d7 / d3 * 0.1D; - } - } - - if (this.canEntityBeSeen(this.targetedEntity)) - { - if (Math.sqrt(d5 * d5 + d6 * d6 + d7 * d7) < 4) - { - ++this.attackCounter; - - if (this.attackCounter >= 10) - { - this.worldObj.playAuxSFXAtEntity(null, 1008, (int) this.posX, (int) this.posY, (int) this.posZ, 0); - this.inflictEffectOnEntity(this.targetedEntity); - this.attackCounter = -40; - } - } - } else if (this.attackCounter > 0) - { - --this.attackCounter; - } - } else - { - this.renderYawOffset = this.rotationYaw = -((float) Math.atan2(motionX, this.motionZ)) * 180.0F / (float) Math.PI; - - if (this.attackCounter > 0) - { - --this.attackCounter; - } - } + return this.dataWatcher.getWatchableObjectByte(25) != 0; } /** @@ -261,7 +162,7 @@ public class EntityElemental extends EntityDemon double d4 = (this.waypointX - this.posX) / par7; double d5 = (this.waypointY - this.posY) / par7; double d6 = (this.waypointZ - this.posZ) / par7; - AxisAlignedBB axisalignedbb = this.boundingBox.copy(); + AxisAlignedBB axisalignedbb = this.getBoundingBox(); for (int i = 1; (double) i < par7; ++i) { @@ -298,6 +199,7 @@ public class EntityElemental extends EntityDemon public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) { super.readEntityFromNBT(par1NBTTagCompound); + this.setAngry(par1NBTTagCompound.getBoolean("Angry")); this.setCombatTask(); } @@ -333,6 +235,14 @@ public class EntityElemental extends EntityDemon public void setAttackTarget(EntityLivingBase par1EntityLivingBase) { super.setAttackTarget(par1EntityLivingBase); + + if (par1EntityLivingBase == null) + { + this.setAngry(false); + } else if (!this.isTamed()) + { + this.setAngry(true); + } } /** @@ -348,6 +258,7 @@ public class EntityElemental extends EntityDemon super.entityInit(); this.dataWatcher.addObject(18, this.getHealth()); this.dataWatcher.addObject(19, 0); + this.dataWatcher.addObject(25, 0); } /** @@ -392,12 +303,11 @@ public class EntityElemental extends EntityDemon } /** - * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons - * use this to react to sunlight and start to burn. + * Returns the item ID for the item the mob drops on death. */ - public void onLivingUpdate() + protected int getDropItemId() { - super.onLivingUpdate(); + return -1; } /** @@ -406,6 +316,11 @@ public class EntityElemental extends EntityDemon public void onUpdate() { super.onUpdate(); + + if (this.getHealth() <= this.getMaxHealth() / 2.0f && worldObj.rand.nextInt(200) == 0) + { + this.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionReciprocation.id, 100, 1)); + } } public float getEyeHeight() @@ -425,14 +340,14 @@ public class EntityElemental extends EntityDemon /** * Called when the entity is attacked. */ - public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) + public boolean attackEntityFrom(DamageSource source, float par2) { - if (this.isEntityInvulnerable()) + if (this.func_180431_b(source)) { return false; } else { - Entity entity = par1DamageSource.getEntity(); + Entity entity = source.getEntity(); this.aiSit.setSitting(false); if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) @@ -440,7 +355,7 @@ public class EntityElemental extends EntityDemon par2 = (par2 + 1.0F) / 2.0F; } - return super.attackEntityFrom(par1DamageSource, par2); + return super.attackEntityFrom(source, par2); } } @@ -476,6 +391,54 @@ public class EntityElemental extends EntityDemon return false; } + /** + * Determines whether this wolf is angry or not. + */ + public boolean isAngry() + { + return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; + } + + /** + * Sets whether this wolf is angry or not. + */ + public void setAngry(boolean par1) + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + + if (par1) + { + this.dataWatcher.updateObject(16, b0 | 2); + } else + { + this.dataWatcher.updateObject(16, b0 & -3); + } + } + + public void func_70918_i(boolean par1) + { + if (par1) + { + this.dataWatcher.updateObject(19, 1); + } else + { + this.dataWatcher.updateObject(19, 0); + } + } + + /** + * Returns true if the mob is currently able to mate with the specified mob. + */ + public boolean canMateWith(EntityAnimal par1EntityAnimal) + { + return false; + } + + public boolean func_70922_bv() + { + return this.dataWatcher.getWatchableObjectByte(19) == 1; + } + /** * Determines if an entity can be despawned, used on idle far away entities */ @@ -536,7 +499,7 @@ public class EntityElemental extends EntityDemon double range = Math.sqrt(par2); double verticalRange = Math.sqrt(par2); - List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(par1 - 0.5f, par3 - 0.5f, par5 - 0.5f, par1 + 0.5f, par3 + 0.5f, par5 + 0.5f).expand(range, verticalRange, range)); + List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(par1 - 0.5f, par3 - 0.5f, par5 - 0.5f, par1 + 0.5f, par3 + 0.5f, par5 + 0.5f).expand(range, verticalRange, range)); if (entities == null) { return null; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java index 3187dccf..2fc2b8e5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java @@ -1,22 +1,24 @@ package WayofTime.alchemicalWizardry.common.entity.mob; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.IRangedAttackMob; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.EntityAIArrowAttack; +import net.minecraft.entity.ai.EntityAIAttackOnCollide; +import net.minecraft.entity.ai.EntityAIFollowOwner; +import net.minecraft.entity.ai.EntityAIHurtByTarget; +import net.minecraft.entity.ai.EntityAILookIdle; +import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; +import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; +import net.minecraft.entity.ai.EntityAISwimming; +import net.minecraft.entity.ai.EntityAIWander; +import net.minecraft.entity.ai.EntityAIWatchClosest; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.pathfinding.PathNavigateGround; +import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.entity.*; -import net.minecraft.entity.ai.*; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob { @@ -30,7 +32,7 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob { super(par1World, AlchemicalWizardry.entityFallenAngelID); this.setSize(0.7F, 1.8F); - this.getNavigator().setAvoidsWater(true); + ((PathNavigateGround)this.getNavigator()).func_179690_a(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, this.aiSit); this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); @@ -69,327 +71,6 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob } } - /** - * Returns true if the newer Entity AI code should be run - */ - public boolean isAIEnabled() - { - return true; - } - - /** - * Sets the active target the Task system uses for tracking - */ - public void setAttackTarget(EntityLivingBase par1EntityLivingBase) - { - super.setAttackTarget(par1EntityLivingBase); - - if (par1EntityLivingBase == null) - { - this.setAngry(false); - } else if (!this.isTamed()) - { - this.setAngry(true); - } - } - - /** - * main AI tick function, replaces updateEntityActionState - */ - protected void updateAITick() - { - this.dataWatcher.updateObject(18, this.getHealth()); - } - - protected void entityInit() - { - super.entityInit(); - this.dataWatcher.addObject(18, this.getHealth()); - } - - /** - * Plays step sound at given x, y, z for the entity - */ - protected void playStepSound(int par1, int par2, int par3, int par4) - { - this.playSound("mob.zombie.step", 0.15F, 1.0F); - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeEntityToNBT(par1NBTTagCompound); - par1NBTTagCompound.setBoolean("Angry", this.isAngry()); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readEntityFromNBT(par1NBTTagCompound); - this.setAngry(par1NBTTagCompound.getBoolean("Angry")); - - this.setCombatTask(); - } - - /** - * Returns the sound this mob makes while it's alive. - */ - protected String getLivingSound() - { - //TODO change sounds - return "none"; - } - - /** - * Returns the sound this mob makes when it is hurt. - */ - protected String getHurtSound() - { - return "none"; - } - - /** - * Returns the sound this mob makes on death. - */ - protected String getDeathSound() - { - return "mob.wolf.death"; - } - - /** - * Returns the volume for the sounds this mob makes. - */ - protected float getSoundVolume() - { - return 0.4F; - } - - /** - * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons - * use this to react to sunlight and start to burn. - */ - public void onLivingUpdate() - { - super.onLivingUpdate(); - } - - /** - * Called to update the entity's position/logic. - */ - public void onUpdate() - { - super.onUpdate(); - } - - public float getEyeHeight() - { - return this.height * 0.8F; - } - - /** - * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently - * use in wolves. - */ - public int getVerticalFaceSpeed() - { - return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); - } - - /** - * Called when the entity is attacked. - */ - public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) - { - if (this.isEntityInvulnerable()) - { - return false; - } else - { - Entity entity = par1DamageSource.getEntity(); - this.aiSit.setSitting(false); - - if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) - { - par2 = (par2 + 1.0F) / 2.0F; - } - - return super.attackEntityFrom(par1DamageSource, par2); - } - } - - public boolean attackEntityAsMob(Entity par1Entity) - { - int i = this.isTamed() ? 4 : 2; - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); - } - - public void setTamed(boolean par1) - { - super.setTamed(par1); - - if (par1) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - } - - /** - * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. - */ - @Override - public boolean interact(EntityPlayer par1EntityPlayer) - { - ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); - - if (this.isTamed()) - { - if (itemstack != null) - { - if (itemstack.getItem() instanceof ItemFood) - { - ItemFood itemfood = (ItemFood) itemstack.getItem(); - - if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < maxTamedHealth) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - this.heal((float) itemfood.func_150905_g(itemstack)); - - if (itemstack.stackSize <= 0) - { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); - } - - return true; - } - } - } - - if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack)) - { - if (!this.worldObj.isRemote) - { - this.aiSit.setSitting(!this.isSitting()); - this.isJumping = false; - this.setPathToEntity(null); - this.setTarget(null); - this.setAttackTarget(null); - } - - this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); - } - } else if (itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - if (itemstack.stackSize <= 0) - { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); - } - - if (!this.worldObj.isRemote) - { - if (this.rand.nextInt(1) == 0) - { - this.setTamed(true); - this.setPathToEntity(null); - this.setAttackTarget(null); - this.aiSit.setSitting(true); - this.setHealth(maxTamedHealth); - this.func_152115_b(par1EntityPlayer.getUniqueID().toString()); - this.playTameEffect(true); - this.worldObj.setEntityState(this, (byte) 7); - } else - { - this.playTameEffect(false); - this.worldObj.setEntityState(this, (byte) 6); - } - } - - return true; - } - - return super.interact(par1EntityPlayer); - } - - - /** - * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on - * the animal type) - */ - public boolean isBreedingItem(ItemStack par1ItemStack) - { - return false; - //return par1ItemStack == null ? false : (!(Item.itemsList[par1ItemStack.itemID] instanceof ItemFood) ? false : ((ItemFood)Item.itemsList[par1ItemStack.itemID]).isWolfsFavoriteMeat()); - } - - /** - * Determines whether this wolf is angry or not. - */ - public boolean isAngry() - { - return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; - } - - /** - * Sets whether this wolf is angry or not. - */ - public void setAngry(boolean par1) - { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); - - if (par1) - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); - } else - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); - } - } - - /** - * Determines if an entity can be despawned, used on idle far away entities - */ - protected boolean canDespawn() - { - //return !this.isTamed() && this.ticksExisted > 2400; - return false; - } - - public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) - { - if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) - { - if (par1EntityLivingBase instanceof EntityFallenAngel) - { - EntityFallenAngel entitywolf = (EntityFallenAngel) par1EntityLivingBase; - - if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) - { - return false; - } - } - - return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); - } else - { - return false; - } - } - /** * Attack the specified entity using a ranged attack. */ diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java index 854926e7..7f221801 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IRangedAttackMob; import net.minecraft.entity.SharedMonsterAttributes; @@ -14,22 +13,11 @@ import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; import net.minecraft.entity.ai.EntityAISwimming; import net.minecraft.entity.ai.EntityAIWander; import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.passive.EntityHorse; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; -import net.minecraft.util.Vec3; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class EntityIceDemon extends EntityDemon implements IRangedAttackMob { @@ -79,345 +67,6 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob } } - /** - * Returns true if the newer Entity AI code should be run - */ - public boolean isAIEnabled() - { - return true; - } - - /** - * Sets the active target the Task system uses for tracking - */ - public void setAttackTarget(EntityLivingBase par1EntityLivingBase) - { - super.setAttackTarget(par1EntityLivingBase); - - if (par1EntityLivingBase == null) - { - this.setAngry(false); - } else if (!this.isTamed()) - { - this.setAngry(true); - } - } - - /** - * main AI tick function, replaces updateEntityActionState - */ - protected void updateAITick() - { - this.dataWatcher.updateObject(18, this.getHealth()); - } - - protected void entityInit() - { - super.entityInit(); - this.dataWatcher.addObject(18, this.getHealth()); - } - - /** - * Plays step sound at given x, y, z for the entity - */ - protected void playStepSound(int par1, int par2, int par3, int par4) - { - this.playSound("mob.zombie.step", 0.15F, 1.0F); - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeEntityToNBT(par1NBTTagCompound); - par1NBTTagCompound.setBoolean("Angry", this.isAngry()); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readEntityFromNBT(par1NBTTagCompound); - this.setAngry(par1NBTTagCompound.getBoolean("Angry")); - - this.setCombatTask(); - } - - /** - * Returns the sound this mob makes while it's alive. - */ - protected String getLivingSound() - { - return "none"; - } - - /** - * Returns the sound this mob makes when it is hurt. - */ - protected String getHurtSound() - { - return "mob.irongolem.hit"; - } - - /** - * Returns the sound this mob makes on death. - */ - protected String getDeathSound() - { - return "mob.irongolem.death"; - } - - /** - * Returns the volume for the sounds this mob makes. - */ - protected float getSoundVolume() - { - return 0.4F; - } - - /** - * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons - * use this to react to sunlight and start to burn. - */ - public void onLivingUpdate() - { - super.onLivingUpdate(); - int range = 2; - - Vec3 blockVector = SpellHelper.getEntityBlockVector(this); - - int xCoord = (int) (blockVector.xCoord); - int yCoord = (int) (blockVector.yCoord); - int zCoord = (int) (blockVector.zCoord); - - for (int i = -range; i <= range; i++) - { - for (int j = -range; j <= range; j++) - { - for (int k = -range; k <= range; k++) - { - if (worldObj.rand.nextFloat() < 0.25f) - { - SpellHelper.freezeWaterBlock(worldObj, xCoord + i, yCoord + j, zCoord + k); - } - } - } - } - } - - /** - * Called to update the entity's position/logic. - */ - public void onUpdate() - { - super.onUpdate(); - } - - public float getEyeHeight() - { - return this.height * 0.8F; - } - - /** - * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently - * use in wolves. - */ - public int getVerticalFaceSpeed() - { - return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); - } - - /** - * Called when the entity is attacked. - */ - public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) - { - if (this.isEntityInvulnerable()) - { - return false; - } else - { - Entity entity = par1DamageSource.getEntity(); - this.aiSit.setSitting(false); - - if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) - { - par2 = (par2 + 1.0F) / 2.0F; - } - - return super.attackEntityFrom(par1DamageSource, par2); - } - } - - public boolean attackEntityAsMob(Entity par1Entity) - { - int i = this.isTamed() ? 4 : 2; - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); - } - - public void setTamed(boolean par1) - { - super.setTamed(par1); - - if (par1) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - } - - /** - * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. - */ - @Override - public boolean interact(EntityPlayer par1EntityPlayer) - { - ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); - - if (this.isTamed()) - { - if (itemstack != null) - { - if (itemstack.getItem() instanceof ItemFood) - { - ItemFood itemfood = (ItemFood) itemstack.getItem(); - - if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < maxTamedHealth) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - this.heal((float) itemfood.func_150905_g(itemstack)); - - if (itemstack.stackSize <= 0) - { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); - } - - return true; - } - } - } - - if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack)) - { - if (!this.worldObj.isRemote) - { - this.aiSit.setSitting(!this.isSitting()); - this.isJumping = false; - this.setPathToEntity(null); - this.setTarget(null); - this.setAttackTarget(null); - } - - this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); - } - } else if (itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - if (itemstack.stackSize <= 0) - { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); - } - - if (!this.worldObj.isRemote) - { - if (this.rand.nextInt(1) == 0) - { - this.setTamed(true); - this.setPathToEntity(null); - this.setAttackTarget(null); - this.aiSit.setSitting(true); - this.setHealth(maxTamedHealth); - this.func_152115_b(par1EntityPlayer.getUniqueID().toString()); - this.playTameEffect(true); - this.worldObj.setEntityState(this, (byte) 7); - } else - { - this.playTameEffect(false); - this.worldObj.setEntityState(this, (byte) 6); - } - } - - return true; - } - - return super.interact(par1EntityPlayer); - } - - - /** - * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on - * the animal type) - */ - public boolean isBreedingItem(ItemStack par1ItemStack) - { - return false; - } - - /** - * Determines whether this wolf is angry or not. - */ - public boolean isAngry() - { - return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; - } - - /** - * Sets whether this wolf is angry or not. - */ - public void setAngry(boolean par1) - { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); - - if (par1) - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); - } else - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); - } - } - - /** - * Determines if an entity can be despawned, used on idle far away entities - */ - protected boolean canDespawn() - { - return false; - } - - public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) - { - if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) - { - if (par1EntityLivingBase instanceof EntityIceDemon) - { - EntityIceDemon entitywolf = (EntityIceDemon) par1EntityLivingBase; - - if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) - { - return false; - } - } - - return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); - } else - { - return false; - } - } - /** * Attack the specified entity using a ranged attack. */ diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java index e6d9955f..7b38c3df 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java @@ -1,23 +1,21 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.*; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.entity.ai.EntityAIAttackOnCollide; +import net.minecraft.entity.ai.EntityAIFollowOwner; +import net.minecraft.entity.ai.EntityAIHurtByTarget; +import net.minecraft.entity.ai.EntityAILookIdle; +import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; +import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; +import net.minecraft.entity.ai.EntityAISwimming; +import net.minecraft.entity.ai.EntityAIWander; +import net.minecraft.entity.ai.EntityAIWatchClosest; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; +import net.minecraft.pathfinding.PathNavigateGround; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; public class EntityLowerGuardian extends EntityDemon { @@ -29,7 +27,7 @@ public class EntityLowerGuardian extends EntityDemon { super(par1World, AlchemicalWizardry.entityLowerGuardianID); this.setSize(0.7F, 1.8F); - this.getNavigator().setAvoidsWater(true); + ((PathNavigateGround)this.getNavigator()).func_179690_a(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0D, true)); this.tasks.addTask(3, this.aiSit); @@ -63,342 +61,8 @@ public class EntityLowerGuardian extends EntityDemon } } - /** - * Returns true if the newer Entity AI code should be run - */ - public boolean isAIEnabled() + public EntityAgeable createChild(EntityAgeable par1EntityAgeable) { - return true; - } - - /** - * Sets the active target the Task system uses for tracking - */ - public void setAttackTarget(EntityLivingBase par1EntityLivingBase) - { - super.setAttackTarget(par1EntityLivingBase); - - if (par1EntityLivingBase == null) - { - this.setAngry(false); - } else if (!this.isTamed()) - { - this.setAngry(true); - } - } - - /** - * main AI tick function, replaces updateEntityActionState - */ - protected void updateAITick() - { - this.dataWatcher.updateObject(18, this.getHealth()); - } - - protected void entityInit() - { - super.entityInit(); - this.dataWatcher.addObject(18, this.getHealth()); - } - - /** - * Plays step sound at given x, y, z for the entity - */ - protected void playStepSound(int par1, int par2, int par3, int par4) - { - this.playSound("mob.zombie.step", 0.15F, 1.0F); - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeEntityToNBT(par1NBTTagCompound); - par1NBTTagCompound.setBoolean("Angry", this.isAngry()); - par1NBTTagCompound.setByte("attackTimer", (byte) attackTimer); - par1NBTTagCompound.setBoolean("isAggro", this.isAggro()); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readEntityFromNBT(par1NBTTagCompound); - this.setAngry(par1NBTTagCompound.getBoolean("Angry")); - - attackTimer = par1NBTTagCompound.getByte("attackTimer"); - } - - /** - * Returns the sound this mob makes while it's alive. - */ - protected String getLivingSound() - { - return "none"; - } - - /** - * Returns the sound this mob makes when it is hurt. - */ - protected String getHurtSound() - { - return "mob.irongolem.hit"; - } - - /** - * Returns the sound this mob makes on death. - */ - protected String getDeathSound() - { - return "mob.irongolem.death"; - } - - /** - * Returns the volume for the sounds this mob makes. - */ - protected float getSoundVolume() - { - return 1.0F; - } - - /** - * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons - * use this to react to sunlight and start to burn. - */ - public void onLivingUpdate() - { - super.onLivingUpdate(); - - if (attackTimer > 0) - { - attackTimer--; - } - } - - public int getAttackTimer() - { - return attackTimer; - } - - /** - * Called to update the entity's position/logic. - */ - public void onUpdate() - { - super.onUpdate(); - } - - public float getEyeHeight() - { - return this.height * 0.8F; - } - - /** - * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently - * use in wolves. - */ - public int getVerticalFaceSpeed() - { - return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); - } - - /** - * Called when the entity is attacked. - */ - public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) - { - if (this.isEntityInvulnerable()) - { - return false; - } else - { - Entity entity = par1DamageSource.getEntity(); - this.aiSit.setSitting(false); - - if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) - { - par2 = (par2 + 1.0F) / 2.0F; - } - - return super.attackEntityFrom(par1DamageSource, par2); - } - } - - public boolean attackEntityAsMob(Entity par1Entity) - { - this.attackTimer = 10; - this.worldObj.setEntityState(this, (byte) 4); - boolean flag = par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) (7 + this.rand.nextInt(15))); - - if (flag) - { - par1Entity.motionY += 0.4000000059604645D; - } - - this.playSound("mob.irongolem.throw", 1.0F, 1.0F); - return flag; - } - - public void setTamed(boolean par1) - { - super.setTamed(par1); - - if (par1) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - } - - /** - * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. - */ - @Override - public boolean interact(EntityPlayer par1EntityPlayer) - { - ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); - - if (this.isTamed()) - { - if (itemstack != null) - { - if (itemstack.getItem() instanceof ItemFood) - { - ItemFood itemfood = (ItemFood) itemstack.getItem(); - - if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < maxTamedHealth) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - this.heal((float) itemfood.func_150905_g(itemstack)); - - if (itemstack.stackSize <= 0) - { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); - } - - return true; - } - } - } - - if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack)) - { - if (!this.worldObj.isRemote) - { - this.aiSit.setSitting(!this.isSitting()); - this.isJumping = false; - this.setPathToEntity(null); - this.setTarget(null); - this.setAttackTarget(null); - } - - this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); - } - } else if (itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - if (itemstack.stackSize <= 0) - { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); - } - - if (!this.worldObj.isRemote) - { - if (this.rand.nextInt(1) == 0) - { - this.setTamed(true); - this.setPathToEntity(null); - this.setAttackTarget(null); - this.aiSit.setSitting(true); - this.setHealth(maxTamedHealth); - this.func_152115_b(par1EntityPlayer.getUniqueID().toString()); - this.playTameEffect(true); - this.worldObj.setEntityState(this, (byte) 7); - } else - { - this.playTameEffect(false); - this.worldObj.setEntityState(this, (byte) 6); - } - } - - return true; - } - - return super.interact(par1EntityPlayer); - } - - - /** - * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on - * the animal type) - */ - public boolean isBreedingItem(ItemStack par1ItemStack) - { - return false; - } - - /** - * Determines whether this wolf is angry or not. - */ - public boolean isAngry() - { - return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; - } - - /** - * Sets whether this wolf is angry or not. - */ - public void setAngry(boolean par1) - { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); - - if (par1) - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); - } else - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); - } - } - - /** - * Determines if an entity can be despawned, used on idle far away entities - */ - protected boolean canDespawn() - { - return false; - } - - public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) - { - if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) - { - if (par1EntityLivingBase instanceof EntityLowerGuardian) - { - EntityLowerGuardian entitywolf = (EntityLowerGuardian) par1EntityLivingBase; - - if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) - { - return false; - } - } - - return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); - } else - { - return false; - } + return this.spawnBabyAnimal(par1EntityAgeable); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java index f73ba7c8..299a2efc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java @@ -1,24 +1,22 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; -import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.*; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.entity.ai.EntityAIAttackOnCollide; +import net.minecraft.entity.ai.EntityAIFollowOwner; +import net.minecraft.entity.ai.EntityAIHurtByTarget; +import net.minecraft.entity.ai.EntityAILookIdle; +import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; +import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; +import net.minecraft.entity.ai.EntityAISwimming; +import net.minecraft.entity.ai.EntityAIWander; +import net.minecraft.entity.ai.EntityAIWatchClosest; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; +import net.minecraft.pathfinding.PathNavigateGround; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; +import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; public class EntityShade extends EntityDemon { @@ -31,7 +29,7 @@ public class EntityShade extends EntityDemon { super(par1World, AlchemicalWizardry.entityShadeID); this.setSize(0.8F, 2.0F); - this.getNavigator().setAvoidsWater(true); + ((PathNavigateGround)this.getNavigator()).func_179690_a(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, this.aiSit); this.tasks.addTask(3, new EntityAIAttackOnCollide(this, 1.0D, true)); @@ -69,328 +67,6 @@ public class EntityShade extends EntityDemon } } - /** - * Returns true if the newer Entity AI code should be run - */ - public boolean isAIEnabled() - { - return true; - } - - /** - * Sets the active target the Task system uses for tracking - */ - public void setAttackTarget(EntityLivingBase par1EntityLivingBase) - { - super.setAttackTarget(par1EntityLivingBase); - - if (par1EntityLivingBase == null) - { - this.setAngry(false); - } else if (!this.isTamed()) - { - this.setAngry(true); - } - } - - /** - * main AI tick function, replaces updateEntityActionState - */ - protected void updateAITick() - { - this.dataWatcher.updateObject(18, this.getHealth()); - } - - protected void entityInit() - { - super.entityInit(); - this.dataWatcher.addObject(18, this.getHealth()); - } - - /** - * Plays step sound at given x, y, z for the entity - */ - protected void playStepSound(int par1, int par2, int par3, int par4) - { - this.playSound("mob.zombie.step", 0.15F, 1.0F); - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeEntityToNBT(par1NBTTagCompound); - par1NBTTagCompound.setBoolean("Angry", this.isAngry()); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readEntityFromNBT(par1NBTTagCompound); - this.setAngry(par1NBTTagCompound.getBoolean("Angry")); - - this.setCombatTask(); - } - - /** - * Returns the sound this mob makes while it's alive. - */ - protected String getLivingSound() - { - //TODO change sounds - return "none"; - } - - /** - * Returns the sound this mob makes when it is hurt. - */ - protected String getHurtSound() - { - return "none"; - } - - /** - * Returns the sound this mob makes on death. - */ - protected String getDeathSound() - { - return "none"; - } - - /** - * Returns the volume for the sounds this mob makes. - */ - protected float getSoundVolume() - { - return 0.4F; - } - - /** - * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons - * use this to react to sunlight and start to burn. - */ - public void onLivingUpdate() - { - super.onLivingUpdate(); - } - - /** - * Called to update the entity's position/logic. - */ - public void onUpdate() - { - super.onUpdate(); - } - - public float getEyeHeight() - { - return this.height * 0.8F; - } - - /** - * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently - * use in wolves. - */ - public int getVerticalFaceSpeed() - { - return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); - } - - /** - * Called when the entity is attacked. - */ - public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) - { - if (this.isEntityInvulnerable()) - { - return false; - } else - { - Entity entity = par1DamageSource.getEntity(); - this.aiSit.setSitting(false); - - if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) - { - par2 = (par2 + 1.0F) / 2.0F; - } - - return super.attackEntityFrom(par1DamageSource, par2); - } - } - - public boolean attackEntityAsMob(Entity par1Entity) - { - int i = this.isTamed() ? 6 : 7; - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); - } - - public void setTamed(boolean par1) - { - super.setTamed(par1); - - if (par1) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - } - - /** - * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. - */ - @Override - public boolean interact(EntityPlayer par1EntityPlayer) - { - ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); - - if (this.isTamed()) - { - if (itemstack != null) - { - if (itemstack.getItem() instanceof ItemFood) - { - ItemFood itemfood = (ItemFood) itemstack.getItem(); - - if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < maxTamedHealth) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - this.heal((float) itemfood.func_150905_g(itemstack)); - - if (itemstack.stackSize <= 0) - { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); - } - - return true; - } - } - } - - if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack)) - { - if (!this.worldObj.isRemote) - { - this.aiSit.setSitting(!this.isSitting()); - this.isJumping = false; - this.setPathToEntity(null); - this.setTarget(null); - this.setAttackTarget(null); - } - - this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); - } - } else if (itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - if (itemstack.stackSize <= 0) - { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); - } - - if (!this.worldObj.isRemote) - { - if (this.rand.nextInt(1) == 0) - { - this.setTamed(true); - this.setPathToEntity(null); - this.setAttackTarget(null); - this.aiSit.setSitting(true); - this.setHealth(maxTamedHealth); - this.func_152115_b(par1EntityPlayer.getUniqueID().toString()); - this.playTameEffect(true); - this.worldObj.setEntityState(this, (byte) 7); - } else - { - this.playTameEffect(false); - this.worldObj.setEntityState(this, (byte) 6); - } - } - - return true; - } - - return super.interact(par1EntityPlayer); - } - - - /** - * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on - * the animal type) - */ - public boolean isBreedingItem(ItemStack par1ItemStack) - { - return false; - } - - /** - * Determines whether this wolf is angry or not. - */ - public boolean isAngry() - { - return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; - } - - /** - * Sets whether this wolf is angry or not. - */ - public void setAngry(boolean par1) - { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); - - if (par1) - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); - } else - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); - } - } - - /** - * Determines if an entity can be despawned, used on idle far away entities - */ - protected boolean canDespawn() - { - return false; - } - - public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) - { - if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) - { - if (par1EntityLivingBase instanceof EntityBoulderFist) - { - EntityBoulderFist entitywolf = (EntityBoulderFist) par1EntityLivingBase; - - if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) - { - return false; - } - } - - return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); - } else - { - return false; - } - } - - /** - * Attack the specified entity using a ranged attack. - */ public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) { HolyProjectile hol = new HolyProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 5, 600); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java index 0ebeb103..ea827fcd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java @@ -1,22 +1,24 @@ package WayofTime.alchemicalWizardry.common.entity.mob; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.IRangedAttackMob; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.EntityAIArrowAttack; +import net.minecraft.entity.ai.EntityAIAttackOnCollide; +import net.minecraft.entity.ai.EntityAIFollowOwner; +import net.minecraft.entity.ai.EntityAIHurtByTarget; +import net.minecraft.entity.ai.EntityAILookIdle; +import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; +import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; +import net.minecraft.entity.ai.EntityAISwimming; +import net.minecraft.entity.ai.EntityAIWander; +import net.minecraft.entity.ai.EntityAIWatchClosest; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.pathfinding.PathNavigateGround; +import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.entity.*; -import net.minecraft.entity.ai.*; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackMob { @@ -30,7 +32,7 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM { super(par1World, AlchemicalWizardry.entitySmallEarthGolemID); this.setSize(0.2F, 1.0F); - this.getNavigator().setAvoidsWater(true); + ((PathNavigateGround)this.getNavigator()).func_179690_a(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, this.aiSit); this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); @@ -66,325 +68,7 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); } } - - /** - * Returns true if the newer Entity AI code should be run - */ - public boolean isAIEnabled() - { - return true; - } - - /** - * Sets the active target the Task system uses for tracking - */ - public void setAttackTarget(EntityLivingBase par1EntityLivingBase) - { - super.setAttackTarget(par1EntityLivingBase); - - if (par1EntityLivingBase == null) - { - this.setAngry(false); - } else if (!this.isTamed()) - { - this.setAngry(true); - } - } - - /** - * main AI tick function, replaces updateEntityActionState - */ - protected void updateAITick() - { - this.dataWatcher.updateObject(18, this.getHealth()); - } - - protected void entityInit() - { - super.entityInit(); - this.dataWatcher.addObject(18, this.getHealth()); - } - - /** - * Plays step sound at given x, y, z for the entity - */ - protected void playStepSound(int par1, int par2, int par3, int par4) - { - this.playSound("mob.zombie.step", 0.15F, 1.0F); - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeEntityToNBT(par1NBTTagCompound); - par1NBTTagCompound.setBoolean("Angry", this.isAngry()); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readEntityFromNBT(par1NBTTagCompound); - this.setAngry(par1NBTTagCompound.getBoolean("Angry")); - - this.setCombatTask(); - } - - /** - * Returns the sound this mob makes while it's alive. - */ - protected String getLivingSound() - { - return "none"; - } - - /** - * Returns the sound this mob makes when it is hurt. - */ - protected String getHurtSound() - { - return "mob.irongolem.hit"; - } - - /** - * Returns the sound this mob makes on death. - */ - protected String getDeathSound() - { - return "mob.irongolem.death"; - } - - /** - * Returns the volume for the sounds this mob makes. - */ - protected float getSoundVolume() - { - return 0.4F; - } - - /** - * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons - * use this to react to sunlight and start to burn. - */ - public void onLivingUpdate() - { - super.onLivingUpdate(); - } - - /** - * Called to update the entity's position/logic. - */ - public void onUpdate() - { - super.onUpdate(); - } - - public float getEyeHeight() - { - return this.height * 0.8F; - } - - /** - * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently - * use in wolves. - */ - public int getVerticalFaceSpeed() - { - return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); - } - - /** - * Called when the entity is attacked. - */ - public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) - { - if (this.isEntityInvulnerable()) - { - return false; - } else - { - Entity entity = par1DamageSource.getEntity(); - this.aiSit.setSitting(false); - - if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) - { - par2 = (par2 + 1.0F) / 2.0F; - } - - return super.attackEntityFrom(par1DamageSource, par2); - } - } - - public boolean attackEntityAsMob(Entity par1Entity) - { - int i = this.isTamed() ? 4 : 2; - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); - } - - public void setTamed(boolean par1) - { - super.setTamed(par1); - - if (par1) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - } - - /** - * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. - */ - @Override - public boolean interact(EntityPlayer par1EntityPlayer) - { - ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); - - if (this.isTamed()) - { - if (itemstack != null) - { - if (itemstack.getItem() instanceof ItemFood) - { - ItemFood itemfood = (ItemFood) itemstack.getItem(); - - if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < maxTamedHealth) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - this.heal((float) itemfood.func_150905_g(itemstack)); - - if (itemstack.stackSize <= 0) - { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); - } - - return true; - } - } - } - - if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack)) - { - if (!this.worldObj.isRemote) - { - this.aiSit.setSitting(!this.isSitting()); - this.isJumping = false; - this.setPathToEntity(null); - this.setTarget(null); - this.setAttackTarget(null); - } - - this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); - } - } else if (itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - if (itemstack.stackSize <= 0) - { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); - } - - if (!this.worldObj.isRemote) - { - if (this.rand.nextInt(1) == 0) - { - this.setTamed(true); - this.setPathToEntity(null); - this.setAttackTarget(null); - this.aiSit.setSitting(true); - this.setHealth(maxTamedHealth); - this.func_152115_b(par1EntityPlayer.getUniqueID().toString()); - this.playTameEffect(true); - this.worldObj.setEntityState(this, (byte) 7); - } else - { - this.playTameEffect(false); - this.worldObj.setEntityState(this, (byte) 6); - } - } - - return true; - } - - return super.interact(par1EntityPlayer); - } - - - /** - * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on - * the animal type) - */ - public boolean isBreedingItem(ItemStack par1ItemStack) - { - return false; - } - - /** - * Determines whether this wolf is angry or not. - */ - public boolean isAngry() - { - return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; - } - - /** - * Sets whether this wolf is angry or not. - */ - public void setAngry(boolean par1) - { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); - - if (par1) - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); - } else - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); - } - } - - /** - * Determines if an entity can be despawned, used on idle far away entities - */ - protected boolean canDespawn() - { - return false; - } - - public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) - { - if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) - { - if (par1EntityLivingBase instanceof EntitySmallEarthGolem) - { - EntitySmallEarthGolem entitywolf = (EntitySmallEarthGolem) par1EntityLivingBase; - - if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) - { - return false; - } - } - - return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); - } else - { - return false; - } - } - + /** * Attack the specified entity using a ranged attack. */ diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java index 02389aac..5b6720db 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java @@ -1,22 +1,24 @@ package WayofTime.alchemicalWizardry.common.entity.mob; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.IRangedAttackMob; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.EntityAIArrowAttack; +import net.minecraft.entity.ai.EntityAIAttackOnCollide; +import net.minecraft.entity.ai.EntityAIFollowOwner; +import net.minecraft.entity.ai.EntityAIHurtByTarget; +import net.minecraft.entity.ai.EntityAILookIdle; +import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; +import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; +import net.minecraft.entity.ai.EntityAISwimming; +import net.minecraft.entity.ai.EntityAIWander; +import net.minecraft.entity.ai.EntityAIWatchClosest; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.pathfinding.PathNavigateGround; +import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.entity.*; -import net.minecraft.entity.ai.*; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackMob { @@ -30,7 +32,7 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM { super(par1World, AlchemicalWizardry.entityWingedFireDemonID); this.setSize(0.7F, 1.8F); - this.getNavigator().setAvoidsWater(true); + ((PathNavigateGround)this.getNavigator()).func_179690_a(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, this.aiSit); this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); @@ -71,338 +73,12 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM //this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D); } - /** - * Returns true if the newer Entity AI code should be run - */ - public boolean isAIEnabled() - { - return true; - } - - /** - * Sets the active target the Task system uses for tracking - */ - public void setAttackTarget(EntityLivingBase par1EntityLivingBase) - { - super.setAttackTarget(par1EntityLivingBase); - - if (par1EntityLivingBase == null) - { - this.setAngry(false); - } else if (!this.isTamed()) - { - this.setAngry(true); - } - } - - /** - * main AI tick function, replaces updateEntityActionState - */ - protected void updateAITick() - { - this.dataWatcher.updateObject(18, this.getHealth()); - } - - protected void entityInit() - { - super.entityInit(); - this.dataWatcher.addObject(18, this.getHealth()); - } - - /** - * Plays step sound at given x, y, z for the entity - */ - protected void playStepSound(int par1, int par2, int par3, int par4) - { - this.playSound("mob.zombie.step", 0.15F, 1.0F); - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeEntityToNBT(par1NBTTagCompound); - par1NBTTagCompound.setBoolean("Angry", this.isAngry()); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readEntityFromNBT(par1NBTTagCompound); - this.setAngry(par1NBTTagCompound.getBoolean("Angry")); - - this.setCombatTask(); - } - - /** - * Returns the sound this mob makes while it's alive. - */ - protected String getLivingSound() - { - return "mob.blaze.breathe"; - } - - /** - * Returns the sound this mob makes when it is hurt. - */ - protected String getHurtSound() - { - return "mob.blaze.hit"; - } - - /** - * Returns the sound this mob makes on death. - */ - protected String getDeathSound() - { - return "mob.blaze.death"; - } - - /** - * Returns the volume for the sounds this mob makes. - */ - protected float getSoundVolume() - { - return 0.4F; - } - - /** - * Returns the item ID for the item the mob drops on death. - */ - protected int getDropItemId() - { - return -1; - } - - /** - * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons - * use this to react to sunlight and start to burn. - */ - public void onLivingUpdate() - { - super.onLivingUpdate(); - } - - /** - * Called to update the entity's position/logic. - */ - public void onUpdate() - { - super.onUpdate(); - } - - public float getEyeHeight() - { - return this.height * 0.8F; - } - - /** - * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently - * use in wolves. - */ - public int getVerticalFaceSpeed() - { - return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); - } - - /** - * Called when the entity is attacked. - */ - public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) - { - if (this.isEntityInvulnerable()) - { - return false; - } else - { - Entity entity = par1DamageSource.getEntity(); - this.aiSit.setSitting(false); - - if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) - { - par2 = (par2 + 1.0F) / 2.0F; - } - - return super.attackEntityFrom(par1DamageSource, par2); - } - } - - public boolean attackEntityAsMob(Entity par1Entity) - { - int i = this.isTamed() ? 4 : 2; - return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); - } - - public void setTamed(boolean par1) - { - super.setTamed(par1); - - if (par1) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - } - - /** - * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. - */ - @Override - public boolean interact(EntityPlayer par1EntityPlayer) - { - ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); - - if (this.isTamed()) - { - if (itemstack != null) - { - if (itemstack.getItem() instanceof ItemFood) - { - ItemFood itemfood = (ItemFood) itemstack.getItem(); - - if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < maxTamedHealth) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - this.heal((float) itemfood.func_150905_g(itemstack)); - - if (itemstack.stackSize <= 0) - { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); - } - - return true; - } - } - } - - if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack)) - { - if (!this.worldObj.isRemote) - { - this.aiSit.setSitting(!this.isSitting()); - this.isJumping = false; - this.setPathToEntity(null); - this.setTarget(null); - this.setAttackTarget(null); - } - - this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); - } - } else if (itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - if (itemstack.stackSize <= 0) - { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); - } - - if (!this.worldObj.isRemote) - { - if (this.rand.nextInt(1) == 0) - { - this.setTamed(true); - this.setPathToEntity(null); - this.setAttackTarget(null); - this.aiSit.setSitting(true); - this.setHealth(maxTamedHealth); - this.func_152115_b(par1EntityPlayer.getUniqueID().toString()); - this.playTameEffect(true); - this.worldObj.setEntityState(this, (byte) 7); - } else - { - this.playTameEffect(false); - this.worldObj.setEntityState(this, (byte) 6); - } - } - - return true; - } - - return super.interact(par1EntityPlayer); - } - - - /** - * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on - * the animal type) - */ - public boolean isBreedingItem(ItemStack par1ItemStack) - { - return false; - } - - /** - * Determines whether this wolf is angry or not. - */ - public boolean isAngry() - { - return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; - } - - /** - * Sets whether this wolf is angry or not. - */ - public void setAngry(boolean par1) - { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); - - if (par1) - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); - } else - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); - } - } - - /** - * Determines if an entity can be despawned, used on idle far away entities - */ - protected boolean canDespawn() - { - return false; - } - - public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) - { - if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) - { - if (par1EntityLivingBase instanceof EntityWingedFireDemon) - { - EntityWingedFireDemon entitywolf = (EntityWingedFireDemon) par1EntityLivingBase; - - if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) - { - return false; - } - } - - return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); - } else - { - return false; - } - } - /** * Attack the specified entity using a ranged attack. */ public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) { - this.worldObj.playAuxSFXAtEntity(null, 1009, (int) this.posX, (int) this.posY, (int) this.posZ, 0); + this.worldObj.playAuxSFXAtEntity(null, 1009, this.getPosition(), 0); FireProjectile hol = new FireProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 20, 600); this.worldObj.spawnEntityInWorld(hol); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/MailOrderEntityItem.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/MailOrderEntityItem.java index bf7f5263..c1ac2bc7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/MailOrderEntityItem.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/MailOrderEntityItem.java @@ -1,15 +1,12 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import pneumaticCraft.api.PneumaticRegistry; -import cpw.mods.fml.common.Optional; import net.minecraft.entity.Entity; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.book.BloodMagicGuide; -import amerifrance.guideapi.api.GuideRegistry; +import cpw.mods.fml.common.Optional; public class MailOrderEntityItem extends EntityItem { @@ -31,7 +28,7 @@ public class MailOrderEntityItem extends EntityItem public MailOrderEntityItem(World world, Entity original, ItemStack stack) { this(world, original.posX, original.posY, original.posZ); - this.delayBeforeCanPickup = 20; + this.setDefaultPickupDelay(); this.motionX = original.motionX; this.motionY = original.motionY; this.motionZ = original.motionZ; @@ -57,11 +54,11 @@ public class MailOrderEntityItem extends EntityItem this.deliverItemViaDrone(this.posX, this.posY, this.posZ); }else { - EntityItem entity = new BookEntityItem(worldObj, this.posX, this.posY, this.posZ, GuideRegistry.getItemStackForBook(BloodMagicGuide.bloodMagicGuide)); - entity.lifespan = 6000; - entity.delayBeforeCanPickup = 20; - entity.motionY = 1; - worldObj.spawnEntityInWorld(entity); +// EntityItem entity = new BookEntityItem(worldObj, this.posX, this.posY, this.posZ, GuideRegistry.getItemStackForBook(BloodMagicGuide.bloodMagicGuide)); +// entity.lifespan = 6000; +// entity.setDefaultPickupDelay(); +// entity.motionY = 1; +// worldObj.spawnEntityInWorld(entity); } this.setDead(); @@ -71,6 +68,6 @@ public class MailOrderEntityItem extends EntityItem @Optional.Method(modid = "PneumaticCraft") public void deliverItemViaDrone(double x, double y, double z) { - PneumaticRegistry.getInstance().deliverItemsAmazonStyle(worldObj, (int)x, (int)y, (int)z, GuideRegistry.getItemStackForBook(BloodMagicGuide.bloodMagicGuide)); +// PneumaticRegistry.getInstance().deliverItemsAmazonStyle(worldObj, (int)x, (int)y, (int)z, GuideRegistry.getItemStackForBook(BloodMagicGuide.bloodMagicGuide)); } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java index 3e5e9bfa..fa7daebc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java @@ -204,7 +204,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow if (shootingEntity == null) { - List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(posX - 1, posY - 1, posZ - 1, posX + 1, posY + 1, posZ + 1)); + List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(posX - 1, posY - 1, posZ - 1, posX + 1, posY + 1, posZ + 1)); Iterator i = players.iterator(); double closestDistance = Double.MAX_VALUE; EntityPlayer closestPlayer = null; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java index 617db735..8ab1b0dc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java @@ -151,7 +151,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil if (shootingEntity == null) { - List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(posX - 1, posY - 1, posZ - 1, posX + 1, posY + 1, posZ + 1)); + List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(posX - 1, posY - 1, posZ - 1, posX + 1, posY + 1, posZ + 1)); Iterator i = players.iterator(); double closestDistance = Double.MAX_VALUE; EntityPlayer closestPlayer = null; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java index 3fc5e2ac..2497c43e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java @@ -79,10 +79,6 @@ public class HolyProjectile extends EnergyBlastProjectile } } - if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ)) - { - } - spawnHitParticles("magicCrit", 8); this.setDead(); } @@ -90,7 +86,7 @@ public class HolyProjectile extends EnergyBlastProjectile @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpell", posX, posY, posZ, 1.0F, 1.0F, 1.0F); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpell", posX, posY, posZ, 1.0F, 1.0F, 1.0F); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java index 3ba02709..247a6dd3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java @@ -94,7 +94,7 @@ public class IceProjectile extends EnergyBlastProjectile @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "explode", posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "explode", posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java index fe521b4c..3273cf11 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java @@ -90,8 +90,8 @@ public class LightningBoltProjectile extends EnergyBlastProjectile @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpell", posX, posY, posZ, 1.0F, 1.0F, 1.0F); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpell", posX, posY, posZ, 1.0F, 1.0F, 1.0F); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java index cc9cf06c..3d6ba693 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java @@ -94,8 +94,8 @@ public class MudProjectile extends EnergyBlastProjectile @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpell", posX, posY, posZ, 0.5F, 0.297F, 0.0664F); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpell", posX, posY, posZ, 0.5F, 0.297F, 0.0664F); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java index 48ea1bf5..5e6a0d77 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java @@ -138,8 +138,8 @@ public class TeleportProjectile extends EnergyBlastProjectile @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "portal", posX, posY, posZ, -motionX, -motionY, -motionZ); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "portal", posX, posY, posZ, -motionX, -motionY, -motionZ); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java index 4ec890ff..aa5c24f0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java @@ -84,7 +84,7 @@ public class WaterProjectile extends EnergyBlastProjectile @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "portal", posX, posY, posZ, -motionX, -motionY, -motionZ); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "portal", posX, posY, posZ, -motionX, -motionY, -motionZ); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java index fbe86c24..d04c27c2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java @@ -81,7 +81,7 @@ public class WindGustProjectile extends EnergyBlastProjectile @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpell", posX, posY, posZ, 1.0F, 1.0F, 1.0F); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpell", posX, posY, posZ, 1.0F, 1.0F, 1.0F); } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/AgriCraftCropHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/AgriCraftCropHarvestHandler.java deleted file mode 100644 index 6ed664b2..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/AgriCraftCropHarvestHandler.java +++ /dev/null @@ -1,83 +0,0 @@ -package WayofTime.alchemicalWizardry.common.harvest; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import net.minecraft.block.Block; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; -import cpw.mods.fml.common.registry.GameRegistry; - -public class AgriCraftCropHarvestHandler implements IHarvestHandler -{ - public Block harvestBlock; - public Method isMature; - public Method harvest; - - public AgriCraftCropHarvestHandler() - { - this.harvestBlock = getBlockForString("AgriCraft:crops"); - if(this.harvestBlock != null) - { - try { - Class clazz = Class.forName("com.InfinityRaider.AgriCraft.blocks.BlockCrop"); - if(clazz != null) - { - isMature = clazz.getMethod("isMature", World.class, int.class, int.class, int.class); - harvest = clazz.getMethod("harvest", World.class, int.class, int.class, int.class); - } - } catch (ClassNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (NoSuchMethodException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (SecurityException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } - - public boolean isHarvesterValid() - { - return harvestBlock != null && isMature != null && harvest != null; - } - - public static Block getBlockForString(String str) - { - String[] parts = str.split(":"); - String modId = parts[0]; - String name = parts[1]; - return GameRegistry.findBlock(modId, name); - } - - public boolean canHandleBlock(Block block) - { - return block == harvestBlock; - } - - @Override - public boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta) - { - if (!this.canHandleBlock(block)) - { - return false; - } - - try { - return (Boolean)(isMature.invoke(block, world, xCoord, yCoord, zCoord)) && (Boolean)(harvest.invoke(block, world, xCoord, yCoord, zCoord)); - } catch (IllegalAccessException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IllegalArgumentException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (InvocationTargetException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - return false; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/BloodMagicHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/BloodMagicHarvestHandler.java index 3b437fac..4703ebaa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/BloodMagicHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/BloodMagicHarvestHandler.java @@ -3,12 +3,13 @@ package WayofTime.alchemicalWizardry.common.harvest; import java.util.List; import net.minecraft.block.Block; -import net.minecraft.block.BlockCrops; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityItem; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.IPlantable; import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; @@ -22,10 +23,6 @@ public class BloodMagicHarvestHandler implements IHarvestHandler public int getHarvestMeta(Block block) { - if(block instanceof BlockCrops) - { - - } if (block == Blocks.wheat) { return 7; @@ -46,9 +43,9 @@ public class BloodMagicHarvestHandler implements IHarvestHandler } @Override - public boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta) + public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) { - if (!this.canHandleBlock(block) || meta != this.getHarvestMeta(block)) + if (!this.canHandleBlock(block) || block.getMetaFromState(state) != this.getHarvestMeta(block)) { return false; } @@ -62,7 +59,7 @@ public class BloodMagicHarvestHandler implements IHarvestHandler int fortune = 0; - List<ItemStack> list = block.getDrops(world, xCoord, yCoord, zCoord, meta, fortune); + List<ItemStack> list = block.getDrops(world, pos, state, fortune); boolean foundAndRemovedSeed = false; for (ItemStack stack : list) @@ -92,16 +89,15 @@ public class BloodMagicHarvestHandler implements IHarvestHandler if (foundAndRemovedSeed) { - int plantMeta = seed.getPlantMetadata(world, xCoord, yCoord, zCoord); - Block plantBlock = seed.getPlant(world, xCoord, yCoord, zCoord); + IBlockState plantState = seed.getPlant(world, pos); - world.func_147480_a(xCoord, yCoord, zCoord, false); + world.destroyBlock(pos, false); - world.setBlock(xCoord, yCoord, zCoord, plantBlock, plantMeta, 3); + world.setBlockState(pos, plantState, 3); for (ItemStack stack : list) { - EntityItem itemEnt = new EntityItem(world, xCoord, yCoord, zCoord, stack); + EntityItem itemEnt = new EntityItem(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, stack); world.spawnEntityInWorld(itemEnt); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/CactusReedHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/CactusReedHarvestHandler.java index 3f948080..f8c2d7ee 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/CactusReedHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/CactusReedHarvestHandler.java @@ -1,9 +1,11 @@ package WayofTime.alchemicalWizardry.common.harvest; -import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; public class CactusReedHarvestHandler implements IHarvestHandler { @@ -13,19 +15,19 @@ public class CactusReedHarvestHandler implements IHarvestHandler } @Override - public boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta) + public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) { if (!this.canHandleBlock(block)) { return false; } - if (world.getBlock(xCoord, yCoord - 1, zCoord) != block || world.getBlock(xCoord, yCoord - 2, zCoord) != block) + if (world.getBlockState(pos.offsetDown(1)).getBlock() != block || world.getBlockState(pos.offsetDown(2)).getBlock() != block) { return false; } - world.func_147480_a(xCoord, yCoord, zCoord, true); + world.destroyBlock(pos, true); return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericItemStackHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericItemStackHarvestHandler.java index 45dee807..77837d15 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericItemStackHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericItemStackHarvestHandler.java @@ -1,17 +1,18 @@ package WayofTime.alchemicalWizardry.common.harvest; -import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; -import net.minecraft.block.Block; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraftforge.common.IPlantable; - import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.common.IPlantable; +import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; + public class GenericItemStackHarvestHandler implements IHarvestHandler { - public Block harvestBlock; public int harvestMeta; public ItemStack harvestItem; @@ -30,15 +31,15 @@ public class GenericItemStackHarvestHandler implements IHarvestHandler return block == harvestBlock; } - public int getHarvestMeta(Block block) + public int getHarvestMeta() { return harvestMeta; } @Override - public boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta) + public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) { - if (!this.canHandleBlock(block) || meta != this.getHarvestMeta(block)) + if (!this.canHandleBlock(block) || block.getMetaFromState(state) != this.getHarvestMeta()) { return false; } @@ -47,14 +48,14 @@ public class GenericItemStackHarvestHandler implements IHarvestHandler if (seed == null) { - world.func_147480_a(xCoord, yCoord, zCoord, true); + world.destroyBlock(pos, true); return true; } else { int fortune = 0; - List<ItemStack> list = block.getDrops(world, xCoord, yCoord, zCoord, meta, fortune); + List<ItemStack> list = block.getDrops(world, pos, state, fortune); boolean foundAndRemovedSeed = false; for (ItemStack stack : list) @@ -85,16 +86,15 @@ public class GenericItemStackHarvestHandler implements IHarvestHandler if (foundAndRemovedSeed) { - int plantMeta = seed.getPlantMetadata(world, xCoord, yCoord, zCoord); - Block plantBlock = seed.getPlant(world, xCoord, yCoord, zCoord); + IBlockState plantState = seed.getPlant(world, pos); - world.func_147480_a(xCoord, yCoord, zCoord, false); + world.destroyBlock(pos, false); - world.setBlock(xCoord, yCoord, zCoord, plantBlock, plantMeta, 3); + world.setBlockState(pos, plantState, 3); for (ItemStack stack : list) { - EntityItem itemEnt = new EntityItem(world, xCoord, yCoord, zCoord, stack); + EntityItem itemEnt = new EntityItem(world, pos.getX(), pos.getY(), pos.getZ(), stack); world.spawnEntityInWorld(itemEnt); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericPamSeedlessFruitHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericPamSeedlessFruitHarvestHandler.java index a5d4b036..ee11737b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericPamSeedlessFruitHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericPamSeedlessFruitHarvestHandler.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.harvest; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.item.Item; +import net.minecraft.util.BlockPos; +import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; import cpw.mods.fml.common.registry.GameRegistry; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.world.World; public class GenericPamSeedlessFruitHarvestHandler implements IHarvestHandler { @@ -45,22 +47,22 @@ public class GenericPamSeedlessFruitHarvestHandler implements IHarvestHandler return block == harvestBlock; } - public int getHarvestMeta(Block block) + public int getHarvestMeta() { return harvestMeta; } @Override - public boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta) + public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) { - if (!this.canHandleBlock(block) || meta != this.getHarvestMeta(block)) + if (!this.canHandleBlock(block) || block.getMetaFromState(state) != this.getHarvestMeta()) { return false; } - world.func_147480_a(xCoord, yCoord, zCoord, true); + world.destroyBlock(pos, true); - world.setBlock(xCoord, yCoord, zCoord, harvestBlock, resetMeta, 3); + world.setBlockState(pos, harvestBlock.getStateFromMeta(resetMeta), 3); return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericSeededHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericSeededHarvestHandler.java index 0fbd69e1..ae8d7d8e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericSeededHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericSeededHarvestHandler.java @@ -1,15 +1,17 @@ package WayofTime.alchemicalWizardry.common.harvest; -import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; -import cpw.mods.fml.common.registry.GameRegistry; +import java.util.List; + import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.IPlantable; - -import java.util.List; +import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; +import cpw.mods.fml.common.registry.GameRegistry; public class GenericSeededHarvestHandler implements IHarvestHandler { @@ -57,15 +59,15 @@ public class GenericSeededHarvestHandler implements IHarvestHandler return block == harvestBlock; } - public int getHarvestMeta(Block block) + public int getHarvestMeta() { return harvestMeta; } @Override - public boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta) + public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) { - if (!this.canHandleBlock(block) || meta != this.getHarvestMeta(block)) + if (!this.canHandleBlock(block) || block.getMetaFromState(state) != this.getHarvestMeta()) { return false; } @@ -74,14 +76,14 @@ public class GenericSeededHarvestHandler implements IHarvestHandler if (seed == null) { - world.func_147480_a(xCoord, yCoord, zCoord, true); + world.destroyBlock(pos, true); return true; } else { int fortune = 0; - List<ItemStack> list = block.getDrops(world, xCoord, yCoord, zCoord, meta, fortune); + List<ItemStack> list = block.getDrops(world, pos, state, fortune); boolean foundAndRemovedSeed = false; for (ItemStack stack : list) @@ -111,16 +113,15 @@ public class GenericSeededHarvestHandler implements IHarvestHandler if (foundAndRemovedSeed) { - int plantMeta = seed.getPlantMetadata(world, xCoord, yCoord, zCoord); - Block plantBlock = seed.getPlant(world, xCoord, yCoord, zCoord); + IBlockState plantState = seed.getPlant(world, pos); - world.func_147480_a(xCoord, yCoord, zCoord, false); + world.destroyBlock(pos, false); - world.setBlock(xCoord, yCoord, zCoord, plantBlock, plantMeta, 3); + world.setBlockState(pos, plantState, 3); for (ItemStack stack : list) { - EntityItem itemEnt = new EntityItem(world, xCoord, yCoord, zCoord, stack); + EntityItem itemEnt = new EntityItem(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, stack); world.spawnEntityInWorld(itemEnt); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GourdHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GourdHarvestHandler.java index 485005d4..911968d0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GourdHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GourdHarvestHandler.java @@ -1,9 +1,11 @@ package WayofTime.alchemicalWizardry.common.harvest; -import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; public class GourdHarvestHandler implements IHarvestHandler { @@ -13,13 +15,13 @@ public class GourdHarvestHandler implements IHarvestHandler } @Override - public boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta) + public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) { if (!this.canHandleBlock(block)) { return false; } - world.func_147480_a(xCoord, yCoord, zCoord, true); + world.destroyBlock(pos, true); return true; } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java index bd32d14d..f0ac52c4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java @@ -117,7 +117,7 @@ public class BoundAxe extends ItemAxe implements IBindable par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); return par1ItemStack; } - + if (par2World.isRemote) { return par1ItemStack; @@ -128,11 +128,6 @@ public class BoundAxe extends ItemAxe implements IBindable return par1ItemStack; } - if (AlchemicalWizardry.disableBoundToolsRightClick) - { - return par1ItemStack; - } - if (par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionInhibit)) { return par1ItemStack; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java index cae100b1..1a358bca 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java @@ -131,11 +131,6 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable return par1ItemStack; } - if (AlchemicalWizardry.disableBoundToolsRightClick) - { - return par1ItemStack; - } - if (par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionInhibit)) { return par1ItemStack; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java index bd70d517..3dbfc338 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java @@ -132,11 +132,6 @@ public class BoundShovel extends ItemSpade implements IBindable return par1ItemStack; } - if (AlchemicalWizardry.disableBoundToolsRightClick) - { - return par1ItemStack; - } - if (par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionInhibit)) { return par1ItemStack; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/CheatyItem.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/CheatyItem.java index 29a842fa..f15d7a6a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/CheatyItem.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/CheatyItem.java @@ -64,7 +64,7 @@ public class CheatyItem extends Item implements IBindable double posY = par3EntityPlayer.posY; double posZ = par3EntityPlayer.posZ; world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 4, posX, posY, posZ); + SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.getDimensionId(), 4, posX, posY, posZ); } if (par3EntityPlayer.worldObj.isRemote) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java index 6e6c84d4..856ac155 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java @@ -95,7 +95,7 @@ public class DaggerOfSacrifice extends EnergyItems for (int i = 0; i < 8; i++) { - SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 1, posX, posY, posZ); + SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.getDimensionId(), 1, posX, posY, posZ); } par2EntityLivingBase.setHealth(-1); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java index eeafc65c..98e7a6db 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java @@ -1,7 +1,9 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -20,11 +22,8 @@ import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class DemonPlacer extends Item { @@ -75,8 +74,6 @@ public class DemonPlacer extends Item ((EntityLiving) entity).setCustomNameTag(par1ItemStack.getDisplayName()); } - - if (!par2EntityPlayer.capabilities.isCreativeMode) { --par1ItemStack.stackSize; @@ -165,16 +162,12 @@ public class DemonPlacer extends Item entityliving.renderYawOffset = entityliving.rotationYaw; if (entityliving instanceof EntityDemon) { - Entity owner = SpellHelper.getPlayerForUsername(DemonPlacer.getOwnerName(itemStack)); - if(owner != null) - { - ((EntityDemon) entityliving).func_152115_b(owner.getPersistentID().toString()); + ((EntityDemon) entityliving).func_152115_b(DemonPlacer.getOwnerName(itemStack)); - if (!DemonPlacer.getOwnerName(itemStack).equals("")) - { - ((EntityDemon) entityliving).setTamed(true); - } - } + if (!DemonPlacer.getOwnerName(itemStack).equals("")) + { + ((EntityDemon) entityliving).setTamed(true); + } } par0World.spawnEntityInWorld(entity); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java index 3f12eb8e..30ccc0cd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java @@ -66,7 +66,7 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl double posY = par3EntityPlayer.posY; double posZ = par3EntityPlayer.posZ; world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 4, posX, posY, posZ); + SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.getDimensionId(), 4, posX, posY, posZ); } NBTTagCompound itemTag = par1ItemStack.getTagCompound(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java index 4b0cecaa..34be619d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java @@ -76,7 +76,7 @@ public class EnergyItems extends Item implements IBindable double posY = player.posY; double posZ = player.posZ; - SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 4, posX, posY, posZ); + SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.getDimensionId(), 4, posX, posY, posZ); world.playSoundEffect((double) ((float) player.posX + 0.5F), (double) ((float) player.posY + 0.5F), (double) ((float) player.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergySword.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergySword.java index 65477341..2ac7f609 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergySword.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergySword.java @@ -121,7 +121,6 @@ public class EnergySword extends ItemSword @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - super.onItemRightClick(par1ItemStack, par2World, par3EntityPlayer); if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java index 3b9c33fb..a2fb0288 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java @@ -61,7 +61,7 @@ public class ItemDiabloKey extends EnergyItems double posY = par3EntityPlayer.posY; double posZ = par3EntityPlayer.posZ; world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 4, posX, posY, posZ); + SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.getDimensionId(), 4, posX, posY, posZ); } if (!par3EntityPlayer.worldObj.isRemote && !(par3EntityPlayer.getClass().equals(EntityPlayerMP.class))) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java index d1ca42ce..9da448a8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java @@ -9,7 +9,6 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -50,41 +49,52 @@ public class ItemRitualDismantler extends EnergyItems public boolean breakRitualStoneAtMasterStone(ItemStack stack, EntityPlayer player, World world, int x, int y, int z) { + ItemStack[] playerInventory = player.inventory.mainInventory; TileEntity tileEntity = world.getTileEntity(x, y, z); if (tileEntity instanceof TEMasterStone) { TEMasterStone masterStone = (TEMasterStone) tileEntity; int direction = masterStone.getDirection(); + int freeSpace = -1; - String ritualName = Rituals.checkValidRitual(world, x, y, z); - List<RitualComponent> ritualList = Rituals.getRitualList(ritualName); + List<RitualComponent> ritualList = Rituals.getRitualList(masterStone.getCurrentRitual()); if (ritualList == null) { return false; } + for (int i = 0; i < playerInventory.length; i++) + { + if (playerInventory[i] == null) + { + freeSpace = i; + break; + } + } + for (RitualComponent rc : ritualList) { if (!world.isAirBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)) && world.getBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)) instanceof RitualStone) { - if (EnergyItems.syphonBatteries(stack, player, getEnergyUsed()) || player.capabilities.isCreativeMode) + if (freeSpace >= 0) { - world.setBlockToAir(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)); - EntityItem entityItem = new EntityItem(world, player.posX, player.posY, player.posZ, new ItemStack(ModBlocks.ritualStone)); - if (world.isRemote) + if (EnergyItems.syphonBatteries(stack, player, getEnergyUsed()) || player.capabilities.isCreativeMode) { - world.playAuxSFX(2005, x, y + 1, z, 0); - } - else - { - world.spawnEntityInWorld(entityItem); + world.setBlockToAir(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)); + player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.ritualStone)); + if (world.isRemote) + { + world.playAuxSFX(2005, x, y + 1, z, 0); + + return true; + } } + + return true; } } } - - return true; } return false; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java index 11fdbdf9..9a7a4fbb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java @@ -1,17 +1,18 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.BlockPos; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; - -import java.util.List; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class TelepositionFocus extends EnergyItems { @@ -111,6 +112,11 @@ public class TelepositionFocus extends EnergyItems return 0; } } + + public BlockPos getBlockPos(ItemStack stack) + { + return new BlockPos(xCoord(stack), yCoord(stack), zCoord(stack)); + } public int getFocusLevel() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java index dd609433..c6c1f305 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java @@ -8,6 +8,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumAction; +import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -57,12 +58,6 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA setMaxDamage(1000); setCreativeTab(AlchemicalWizardry.tabBloodMagic); } - - @Override - public boolean isItemTool(ItemStack stack) - { - return false; - } ModelBiped model1 = null; ModelBiped model2 = null; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java index 1b726b44..ca292038 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java @@ -102,7 +102,7 @@ public abstract class OmegaArmour extends BoundArmour if(this.storeDimensionID()) { - this.setDimensionIDStored(itemStack, world.provider.dimensionId); + this.setDimensionIDStored(itemStack, world.provider.getDimensionId()); } if(this.storeYLevel()) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemAttunedCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemAttunedCrystal.java index a583a0ee..87729e2a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemAttunedCrystal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemAttunedCrystal.java @@ -223,7 +223,7 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator return itemStack; } - if (dimension != world.provider.dimensionId || Math.abs(coords.xCoord - x) > maxDistance || Math.abs(coords.yCoord - y) > maxDistance || Math.abs(coords.zCoord - z) > maxDistance) + if (dimension != world.provider.getDimensionId() || Math.abs(coords.xCoord - x) > maxDistance || Math.abs(coords.yCoord - y) > maxDistance || Math.abs(coords.zCoord - z) > maxDistance) { player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.error.toofar")); return itemStack; @@ -261,7 +261,7 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator world.markBlockForUpdate(coords.xCoord, coords.yCoord, coords.zCoord); } else { - int dimension = world.provider.dimensionId; + int dimension = world.provider.getDimensionId(); this.setDimension(itemStack, dimension); this.setCoordinates(itemStack, new Int3(x, y, z)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java index 1e6aa7e4..34725eb3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java @@ -155,8 +155,8 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHol float posX = Math.round(par3Entity.posX); float posY = (float) (par3Entity.posY - par3Entity.getEyeHeight()); float posZ = Math.round(par3Entity.posZ); - List<EntityItem> entities = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range)); - List<EntityXPOrb> xpOrbs = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityXPOrb.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range)); + List<EntityItem> entities = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range)); + List<EntityXPOrb> xpOrbs = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityXPOrb.class, new AxisAlignedBB(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range)); for (EntityItem entity : entities) { @@ -184,8 +184,8 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHol float posX = Math.round(player.posX); float posY = (float) (player.posY - player.getEyeHeight()); float posZ = Math.round(player.posZ); - List<EntityItem> entities = player.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range)); - List<EntityXPOrb> xpOrbs = player.worldObj.getEntitiesWithinAABB(EntityXPOrb.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range)); + List<EntityItem> entities = player.worldObj.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range)); + List<EntityXPOrb> xpOrbs = player.worldObj.getEntitiesWithinAABB(EntityXPOrb.class, new AxisAlignedBB(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range)); for (EntityItem entity : entities) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java index 00703db4..7b023b8b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java @@ -252,7 +252,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade, ISig } int range = 2; - int verticalOffset = -2; + int verticalOffset = -1; if (player.isSneaking()) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/InventoryHolding.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/InventoryHolding.java index 81d06ae9..f894aad9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/InventoryHolding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/InventoryHolding.java @@ -6,6 +6,7 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.IChatComponent; import java.util.UUID; @@ -136,13 +137,13 @@ public class InventoryHolding implements IInventory } @Override - public String getInventoryName() + public String getName() { return "SigilOfHolding"; } @Override - public boolean hasCustomInventoryName() + public boolean hasCustomName() { return false; } @@ -166,13 +167,13 @@ public class InventoryHolding implements IInventory } @Override - public void openInventory() + public void openInventory(EntityPlayer player) { // NOOP } @Override - public void closeInventory() + public void closeInventory(EntityPlayer player) { // NOOP } @@ -224,7 +225,7 @@ public class InventoryHolding implements IInventory public static boolean hasTag(ItemStack itemStack, String keyName) { - return itemStack != null && itemStack.stackTagCompound != null && itemStack.stackTagCompound.hasKey(keyName); + return itemStack != null && itemStack.getTagCompound() != null && itemStack.getTagCompound().hasKey(keyName); } public static boolean hasUUID(ItemStack itemStack) @@ -246,7 +247,7 @@ public class InventoryHolding implements IInventory private static void initNBTTagCompound(ItemStack itemStack) { - if (itemStack.stackTagCompound == null) + if (itemStack.getTagCompound() == null) { itemStack.setTagCompound(new NBTTagCompound()); } @@ -256,6 +257,36 @@ public class InventoryHolding implements IInventory { initNBTTagCompound(itemStack); - itemStack.stackTagCompound.setLong(keyName, keyValue); + itemStack.getTagCompound().setLong(keyName, keyValue); } + + @Override + public IChatComponent getDisplayName() { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getField(int id) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void setField(int id, int value) { + // TODO Auto-generated method stub + + } + + @Override + public int getFieldCount() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void clear() { + // TODO Auto-generated method stub + + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ScrollHelper.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ScrollHelper.java index f816f868..c40984b6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ScrollHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ScrollHelper.java @@ -1,14 +1,14 @@ package WayofTime.alchemicalWizardry.common.items.sigil.holding; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.EntityClientPlayerMP; +import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.client.event.MouseEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class ScrollHelper @@ -16,7 +16,7 @@ public class ScrollHelper @SubscribeEvent public void onMouseEvent(MouseEvent event) { - EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer; + EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; if (event.dwheel != 0 && player != null && player.isSneaking()) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java index 2ad813c0..c26c7265 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java @@ -19,7 +19,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class SigilOfHolding extends EnergyItems { - private static int invSize = 5; + private static int invSize = 4; private static final String NBT_CURRENT_SIGIL = "CurrentSigil"; @@ -83,7 +83,7 @@ public class SigilOfHolding extends EnergyItems par3List.add(StatCollector.translateToLocal("tooltip.item.currentitem") + " " + item.getDisplayName()); } - for (int i = 0; i < invSize; i++) + for (int i = 0; i <= invSize; i++) { if (inv[i] != null) { @@ -156,41 +156,11 @@ public class SigilOfHolding extends EnergyItems return par1ItemStack; } - @Override - public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) - { - if (checkAndSetItemOwner(stack, player)) - { - int currentSlot = getCurrentItem(stack); - ItemStack[] inv = getInternalInventory(stack); - - if (inv == null) - { - return false; - } - - ItemStack itemUsed = inv[currentSlot]; - - if (itemUsed == null) - { - return false; - } - - boolean bool = itemUsed.getItem().onItemUseFirst(stack, player, world, x, y, z, side, hitX, hitY, hitZ); - - saveInventory(stack, inv); - - return bool; - } - - return false; - } - public static int next(int mode) { int index = mode + 1; - if (index >= invSize) + if (index >= invSize + 1) { index = 0; } @@ -212,10 +182,10 @@ public class SigilOfHolding extends EnergyItems private static void initModeTag(ItemStack itemStack) { - if (itemStack.stackTagCompound == null) + if (itemStack.getTagCompound() == null) { - itemStack.stackTagCompound = new NBTTagCompound(); - itemStack.stackTagCompound.setInteger(NBT_CURRENT_SIGIL, invSize); + itemStack.getTagCompound() = new NBTTagCompound(); + itemStack.getTagCompound().setInteger(NBT_CURRENT_SIGIL, invSize); } } @@ -239,7 +209,7 @@ public class SigilOfHolding extends EnergyItems if (itemStack != null && itemStack.getItem() instanceof SigilOfHolding) { initModeTag(itemStack); - int currentSigil = itemStack.stackTagCompound.getInteger(NBT_CURRENT_SIGIL); + int currentSigil = itemStack.getTagCompound().getInteger(NBT_CURRENT_SIGIL); currentSigil = MathHelper.clamp_int(currentSigil, 0, invSize); return currentSigil; } @@ -270,7 +240,7 @@ public class SigilOfHolding extends EnergyItems NBTTagCompound tag = tagList.getCompoundTagAt(i); int slot = tag.getByte("Slot"); - if (slot >= 0 && slot < invSize) + if (slot >= 0 && slot <= invSize) { inv[slot] = ItemStack.loadItemStackFromNBT(tag); } @@ -290,7 +260,7 @@ public class SigilOfHolding extends EnergyItems NBTTagList itemList = new NBTTagList(); - for (int i = 0; i < invSize; i++) + for (int i = 0; i <= invSize; i++) { if (inventory[i] != null) { @@ -309,7 +279,7 @@ public class SigilOfHolding extends EnergyItems if (itemStack != null && itemStack.getItem() instanceof SigilOfHolding) { initModeTag(itemStack); - itemStack.stackTagCompound.setInteger(NBT_CURRENT_SIGIL, mode); + itemStack.getTagCompound().setInteger(NBT_CURRENT_SIGIL, mode); } } @@ -331,7 +301,7 @@ public class SigilOfHolding extends EnergyItems return; } - for (int i = 0; i < invSize; i++) + for (int i = 0; i <= invSize; i++) { if (inv[i] == null) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmEarth.java index 65283945..d601147d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmEarth.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.omega; -import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -35,13 +34,13 @@ public class OmegaParadigmEarth extends OmegaParadigm { if(player.posY < 50 && player.getHealth() < player.getMaxHealth()) { - player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, 0, true)); + player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, 0, true, false)); } } if(player.posY > 100) { - player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, 200, 0, true)); + player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, 200, 0, true, false)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmFire.java index 4802841f..8cf69f17 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmFire.java @@ -35,25 +35,25 @@ public class OmegaParadigmFire extends OmegaParadigm boolean isInLava = player.isInsideOfMaterial(Material.lava); if(player.isBurning() && player.getHealth() < player.getMaxHealth()) { - player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, isInLava ? 1 : 0, true)); + player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, isInLava ? 1 : 0, true, false)); } if(player.isBurning()) { - player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, isInLava ? 400 : 200, isInLava ? 1 : 0, true)); + player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, isInLava ? 400 : 200, isInLava ? 1 : 0, true, false)); } if(player.isInWater()) { - player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 200, 2, true)); - player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 200, 2, true)); - player.addPotionEffect(new PotionEffect(Potion.weakness.id, 200, 1, true)); + player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 200, 2, true, false)); + player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 200, 2, true, false)); + player.addPotionEffect(new PotionEffect(Potion.weakness.id, 200, 1, true, false)); } } if(player.isBurning()) { - player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 200, 0, true)); + player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 200, 0, true, false)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWater.java index 941f82cd..1780c25a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWater.java @@ -7,6 +7,7 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; @@ -35,14 +36,14 @@ public class OmegaParadigmWater extends OmegaParadigm @Override public void onUpdate(World world, EntityPlayer player, ItemStack stack) { - player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 3, 0, true)); - player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionAmphibian.id, 3, 0, true)); + player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 3, 0, true, false)); + player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionAmphibian.id, 3, 0, true, false)); if(world.getWorldTime() % 100 == 0 && !world.isRemote) { if(player.isInWater() && player.getHealth() < player.getMaxHealth()) { - player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, 0, true)); + player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, 0, true, false)); } } } @@ -52,7 +53,7 @@ public class OmegaParadigmWater extends OmegaParadigm { if(entity instanceof EntityLivingBase) { - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 100, 1, true)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 100, 1, true, false)); } return true; } @@ -74,7 +75,7 @@ public class OmegaParadigmWater extends OmegaParadigm { for(int k=-range; k<=range; k++) { - TEMimicBlock.createMimicBlockAtLocation(world, x+i, y+j, z+k, 300, Blocks.water, 0, ReagentRegistry.aquasalusReagent); + TEMimicBlock.createMimicBlockAtLocation(world, new BlockPos(x+i, y+j, z+k), 300, Blocks.water.getDefaultState(), ReagentRegistry.aquasalusReagent); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWind.java index 1276863c..e02b4c2c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWind.java @@ -33,7 +33,7 @@ public class OmegaParadigmWind extends OmegaParadigm { if(world.getWorldTime() % 100 == 0 && !world.isRemote && player.posY > 128 && player.getHealth() < player.getMaxHealth()) { - player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, player.posY > 128 + 64 ? 1 : 0, true)); + player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, player.posY > 128 + 64 ? 1 : 0, true, false)); } player.fallDistance = 0; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/AlchemyCircleRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/AlchemyCircleRenderer.java index d58f5581..d3aeb4d9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/AlchemyCircleRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/AlchemyCircleRenderer.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common.renderer; import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; @@ -48,7 +49,7 @@ public class AlchemyCircleRenderer extends MRSRenderer GL11.glPushMatrix(); float f1 = 1.0f; - Tessellator tessellator = Tessellator.instance; + Tessellator tessellator = Tessellator.getInstance(); this.bindTexture(resourceLocation); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); @@ -61,22 +62,23 @@ public class AlchemyCircleRenderer extends MRSRenderer // GL11.glDepthMask(false); - tessellator.startDrawingQuads(); - tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity); + WorldRenderer wr = tessellator.getWorldRenderer(); + wr.startDrawingQuads(); + wr.func_178961_b(colourRed, colourGreen, colourBlue, colourIntensity); GL11.glTranslated(x + 0.5 + xOffset, y + 0.5 + (yOffset - initialY) * (tile.getRunningTime() / 100d) + initialY, z + 0.5 + zOffset); float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL); GL11.glRotatef(rotationAngle, 0F, 1F, 0F); //Rotate on planar axis - tessellator.setBrightness(240); +// tessellator.setBrightness(240); double finalRadius = (radius) * (tile.getRunningTime() / 100d); - tessellator.addVertexWithUV(-finalRadius, 0, -finalRadius, 0.0d, 0.0d); - tessellator.addVertexWithUV(finalRadius, 0, -finalRadius, 1.0d, 0.0d); - tessellator.addVertexWithUV(finalRadius, 0, finalRadius, 1.0d, 1.0d); - tessellator.addVertexWithUV(-finalRadius, 0, finalRadius, 0.0d, 1.0d); + wr.addVertexWithUV(-finalRadius, 0, -finalRadius, 0.0d, 0.0d); + wr.addVertexWithUV(finalRadius, 0, -finalRadius, 1.0d, 0.0d); + wr.addVertexWithUV(finalRadius, 0, finalRadius, 1.0d, 1.0d); + wr.addVertexWithUV(-finalRadius, 0, finalRadius, 0.0d, 1.0d); tessellator.draw(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/BeamRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/BeamRenderer.java index 06ddafd3..5617feb8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/BeamRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/BeamRenderer.java @@ -1,13 +1,16 @@ package WayofTime.alchemicalWizardry.common.renderer; -import WayofTime.alchemicalWizardry.api.ColourAndCoords; import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.api.ColourAndCoords; + public class BeamRenderer { private static final ResourceLocation field_110629_a = new ResourceLocation("textures/entity/beacon_beam.png"); @@ -53,7 +56,7 @@ public class BeamRenderer protected static void bindTexture(ResourceLocation p_147499_1_) { - TextureManager texturemanager = TileEntityRendererDispatcher.instance.field_147553_e; + TextureManager texturemanager = TileEntityRendererDispatcher.instance.renderEngine; if (texturemanager != null) { @@ -74,7 +77,7 @@ public class BeamRenderer GL11.glPushMatrix(); float f1 = 1.0f; - Tessellator tessellator = Tessellator.instance; + Tessellator tessellator = Tessellator.getInstance(); BeamRenderer.bindTexture(field_110629_a); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); @@ -87,9 +90,10 @@ public class BeamRenderer GL11.glDepthMask(false); + WorldRenderer wr = tessellator.getWorldRenderer(); - tessellator.startDrawingQuads(); - tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity); + wr.startDrawingQuads(); + wr.func_178961_b(colourRed, colourGreen, colourBlue, colourIntensity); double inside = -(this.size / 2d); double outside = 1.0d - (0.50d - this.size / 2d) - 0.5d; @@ -116,24 +120,24 @@ public class BeamRenderer double offset = 0; - tessellator.setBrightness(240); +// tessellator.setBrightness(240); float s = 1F / 16F; - tessellator.addVertexWithUV(d26, d18, d19, d28, d30); - tessellator.addVertexWithUV(offset, d18, d19, d28, d29); - tessellator.addVertexWithUV(offset, d20, d21, d27, d29); - tessellator.addVertexWithUV(d26, d20, d21, d27, d30); - tessellator.addVertexWithUV(d26, d24, d25, d28, d30); - tessellator.addVertexWithUV(offset, d24, d25, d28, d29); - tessellator.addVertexWithUV(offset, d22, d23, d27, d29); - tessellator.addVertexWithUV(d26, d22, d23, d27, d30); - tessellator.addVertexWithUV(d26, d20, d21, d28, d30); - tessellator.addVertexWithUV(offset, d20, d21, d28, d29); - tessellator.addVertexWithUV(offset, d24, d25, d27, d29); - tessellator.addVertexWithUV(d26, d24, d25, d27, d30); - tessellator.addVertexWithUV(d26, d22, d23, d28, d30); - tessellator.addVertexWithUV(offset, d22, d23, d28, d29); - tessellator.addVertexWithUV(offset, d18, d19, d27, d29); - tessellator.addVertexWithUV(d26, d18, d19, d27, d30); + wr.addVertexWithUV(d26, d18, d19, d28, d30); + wr.addVertexWithUV(offset, d18, d19, d28, d29); + wr.addVertexWithUV(offset, d20, d21, d27, d29); + wr.addVertexWithUV(d26, d20, d21, d27, d30); + wr.addVertexWithUV(d26, d24, d25, d28, d30); + wr.addVertexWithUV(offset, d24, d25, d28, d29); + wr.addVertexWithUV(offset, d22, d23, d27, d29); + wr.addVertexWithUV(d26, d22, d23, d27, d30); + wr.addVertexWithUV(d26, d20, d21, d28, d30); + wr.addVertexWithUV(offset, d20, d21, d28, d29); + wr.addVertexWithUV(offset, d24, d25, d27, d29); + wr.addVertexWithUV(d26, d24, d25, d27, d30); + wr.addVertexWithUV(d26, d22, d23, d28, d30); + wr.addVertexWithUV(offset, d22, d23, d28, d29); + wr.addVertexWithUV(offset, d18, d19, d27, d29); + wr.addVertexWithUV(d26, d18, d19, d27, d30); tessellator.draw(); GL11.glDepthMask(true); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java index 26ace13d..8ae26a81 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java @@ -39,7 +39,7 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer } @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) { if (tileEntity instanceof TEAlchemicCalcinator) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/ShaderHelper.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/ShaderHelper.java new file mode 100644 index 00000000..7e72c42e --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/ShaderHelper.java @@ -0,0 +1,196 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Apr 9, 2014, 11:20:26 PM (GMT)] + */ +package WayofTime.alchemicalWizardry.common.renderer.block; + +import org.lwjgl.opengl.ARBFragmentShader; +import org.lwjgl.opengl.ARBShaderObjects; +import org.lwjgl.opengl.ARBVertexShader; +import org.lwjgl.opengl.GL11; + +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; + +public final class ShaderHelper +{ + + private static final int VERT = ARBVertexShader.GL_VERTEX_SHADER_ARB; + private static final int FRAG = ARBFragmentShader.GL_FRAGMENT_SHADER_ARB; + + public static int beam = 0; + + public static void initShaders() + { + beam = createProgram(null, "/assets/alchemicalwizardry/shaders/beam.frag"); + } + + public static void useShaderWithProps(int shader, Object... props) + { + ARBShaderObjects.glUseProgramObjectARB(shader); + + if (shader != 0 && props.length % 2 == 0) + { + int propCount = props.length / 2; + for (int i = 0; i < propCount; i++) + { + String propName = (String) props[i * 2]; + Object propVal = props[i * 2 + 1]; + + int uniform = ARBShaderObjects.glGetUniformLocationARB(shader, propName); + if (propVal instanceof Integer) + ARBShaderObjects.glUniform1iARB(uniform, (Integer) propVal); + if (propVal instanceof Float) + ARBShaderObjects.glUniform1fARB(uniform, (Float) propVal); + } + } + } + + public static void useShader(int shader) + { + useShaderWithProps(shader); + } + + public static void releaseShader() + { + useShader(0); + } + + public static boolean useShaders() + { + return true; + } + + // Most of the code taken from the LWJGL wiki + // http://lwjgl.org/wiki/index.php?title=GLSL_Shaders_with_LWJGL + private static int createProgram(String vert, String frag) + { + int vertId = 0, fragId = 0, program = 0; + if (vert != null) + vertId = createShader(vert, VERT); + if (frag != null) + fragId = createShader(frag, FRAG); + + program = ARBShaderObjects.glCreateProgramObjectARB(); + if (program == 0) + return 0; + + if (vert != null) + ARBShaderObjects.glAttachObjectARB(program, vertId); + if (frag != null) + ARBShaderObjects.glAttachObjectARB(program, fragId); + + ARBShaderObjects.glLinkProgramARB(program); + if (ARBShaderObjects.glGetObjectParameteriARB(program, ARBShaderObjects.GL_OBJECT_LINK_STATUS_ARB) == GL11.GL_FALSE) + { + return 0; + } + + ARBShaderObjects.glValidateProgramARB(program); + if (ARBShaderObjects.glGetObjectParameteriARB(program, ARBShaderObjects.GL_OBJECT_VALIDATE_STATUS_ARB) == GL11.GL_FALSE) + { + return 0; + } + + return program; + } + + private static int createShader(String filename, int shaderType) + { + int shader = 0; + try + { + shader = ARBShaderObjects.glCreateShaderObjectARB(shaderType); + + if (shader == 0) + return 0; + + ARBShaderObjects.glShaderSourceARB(shader, readFileAsString(filename)); + ARBShaderObjects.glCompileShaderARB(shader); + + if (ARBShaderObjects.glGetObjectParameteriARB(shader, ARBShaderObjects.GL_OBJECT_COMPILE_STATUS_ARB) == GL11.GL_FALSE) + throw new RuntimeException("Error creating shader: " + getLogInfo(shader)); + + return shader; + } catch (Exception e) + { + ARBShaderObjects.glDeleteObjectARB(shader); + e.printStackTrace(); + return -1; + } + } + + private static String getLogInfo(int obj) + { + return ARBShaderObjects.glGetInfoLogARB(obj, ARBShaderObjects.glGetObjectParameteriARB(obj, ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB)); + } + + private static String readFileAsString(String filename) throws Exception + { + StringBuilder source = new StringBuilder(); + InputStream in = ShaderHelper.class.getResourceAsStream(filename); + Exception exception = null; + BufferedReader reader; + + if (in == null) + return ""; + + try + { + reader = new BufferedReader(new InputStreamReader(in, "UTF-8")); + + Exception innerExc = null; + try + { + String line; + while ((line = reader.readLine()) != null) + source.append(line).append('\n'); + } catch (Exception exc) + { + exception = exc; + } finally + { + try + { + reader.close(); + } catch (Exception exc) + { + if (innerExc == null) + innerExc = exc; + else exc.printStackTrace(); + } + } + + if (innerExc != null) + throw innerExc; + } catch (Exception exc) + { + exception = exc; + } finally + { + try + { + in.close(); + } catch (Exception exc) + { + if (exception == null) + exception = exc; + else exc.printStackTrace(); + } + + if (exception != null) + throw exception; + } + + return source.toString(); + } +} + diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java index b8a1679f..ade3d47e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java @@ -2,8 +2,9 @@ package WayofTime.alchemicalWizardry.common.renderer.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.WorldRenderer; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.model.AdvancedModelLoader; import net.minecraftforge.client.model.IModelCustom; @@ -57,21 +58,22 @@ public class ModelBloodAltar extends ModelBase GL11.glPopMatrix(); } - public void renderBloodLevel(IIcon icon) + public void renderBloodLevel(TextureAtlasSprite icon) { - Tessellator tessellator = Tessellator.instance; + Tessellator tessellator = Tessellator.getInstance(); + WorldRenderer wr = tessellator.getWorldRenderer(); double minU = (double) icon.getInterpolatedU(0); double maxU = (double) icon.getInterpolatedU(16); double minV = (double) icon.getInterpolatedV(0); double maxV = (double) icon.getInterpolatedV(16); - tessellator.startDrawingQuads(); - tessellator.setNormal(0, 1, 0); - tessellator.addVertexWithUV(1, 0, 1, maxU, maxV); - tessellator.addVertexWithUV(1, 0, 0, maxU, minV); - tessellator.addVertexWithUV(0, 0, 0, minU, minV); - tessellator.addVertexWithUV(0, 0, 1, minU, maxV); + wr.startDrawingQuads(); + wr.func_178980_d(0, 1, 0); //setNormal + wr.addVertexWithUV(1, 0, 1, maxU, maxV); + wr.addVertexWithUV(1, 0, 0, maxU, minV); + wr.addVertexWithUV(0, 0, 0, minU, minV); + wr.addVertexWithUV(0, 0, 1, minU, maxV); tessellator.draw(); } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelElemental.java index 10ce54be..25cb2814 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelElemental.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.renderer.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; +import net.minecraft.entity.monster.EntityBlaze; import net.minecraft.world.World; public class ModelElemental extends ModelBase @@ -70,10 +71,11 @@ public class ModelElemental extends ModelBase return; } - float ratio = 0.1f; - float rot = (entity.worldObj.getWorldTime() + f) * ratio; - Shape1.rotateAngleX = rot; - Shape2.rotateAngleZ = rot; - Shape3.rotateAngleY = rot; + int ratio = 20; + float rot = (entity.worldObj.getWorldTime() % ratio) / ratio; + Shape1.rotateAngleX = f / 5; + Shape2.rotateAngleZ = f / 5; + Shape3.rotateAngleY = f / 5; + EntityBlaze d; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/LocalStorageAlphaPact.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/LocalStorageAlphaPact.java index 2c762aa9..a63baace 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/LocalStorageAlphaPact.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/LocalStorageAlphaPact.java @@ -1,25 +1,25 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -import java.util.HashSet; -import java.util.Set; - -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; - -public class LocalStorageAlphaPact extends LocalRitualStorage -{ - public static Set<IHoardDemon> hoardList = new HashSet(); - - public void thrallDemon(IHoardDemon demon) - { - if(demon instanceof IHoardDemon) - { - boolean enthrall = ((IHoardDemon) demon).thrallDemon(new Int3(this.xCoord, this.yCoord, this.zCoord)); - if(enthrall) - { - this.hoardList.add((IHoardDemon)demon); - } - } - } -} +//package WayofTime.alchemicalWizardry.common.rituals; +// +//import java.util.HashSet; +//import java.util.Set; +// +//import WayofTime.alchemicalWizardry.api.Int3; +//import WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage; +//import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; +// +//public class LocalStorageAlphaPact extends LocalRitualStorage +//{ +// public static Set<IHoardDemon> hoardList = new HashSet(); +// +// public void thrallDemon(IHoardDemon demon) +// { +// if(demon instanceof IHoardDemon) +// { +// boolean enthrall = ((IHoardDemon) demon).thrallDemon(new Int3(this.xCoord, this.yCoord, this.zCoord)); +// if(enthrall) +// { +// this.hoardList.add((IHoardDemon)demon); +// } +// } +// } +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAlphaPact.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAlphaPact.java index 4ce93209..6fafc94c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAlphaPact.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAlphaPact.java @@ -1,179 +1,178 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGrunt; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; - -public class RitualEffectAlphaPact extends RitualEffect -{ - Random rand = new Random(); - - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); - - if (world.getWorldTime() % 20 != 0) - { - return; - } - - LocalRitualStorage stor = ritualStone.getLocalStorage(); - if(stor instanceof LocalStorageAlphaPact) - { - LocalStorageAlphaPact storage = (LocalStorageAlphaPact)stor; - - Object[] demonList = storage.hoardList.toArray(); - - for(Object demon : demonList) - { - if(demon instanceof EntityLivingBase) - { - if(!((EntityLivingBase) demon).isEntityAlive()) - { - System.out.println(storage.hoardList.remove(demon)); - } - } - } - - System.out.println("Hi!"); - - int summons = 0; - - int horizontalRange = 25; - int verticalRange = 20; - - if(storage.hoardList.isEmpty()) - { - IHoardDemon demon = this.getRandomDemonForStage(world, x, y, z, horizontalRange, verticalRange); - if(demon instanceof EntityLivingBase) - { - world.spawnEntityInWorld((EntityLivingBase)demon); - storage.thrallDemon(demon); - } - }else - { - } - } - } - - public IHoardDemon getRandomDemonForStage(World world, int x, int y, int z, int horizontalRange, int verticalRange) - { - EntityLivingBase entityLiving = new EntityMinorDemonGrunt(world); - - boolean isGood = false; - for(int n=0; n<100; n++) - { - double newX = x + (rand.nextInt(horizontalRange) - horizontalRange) + 0.5; - double newY = y + (double) (rand.nextInt((int) verticalRange)); - double newZ = z + (rand.nextInt(horizontalRange) - horizontalRange) + 0.5; - - entityLiving.posX = newX; - entityLiving.posY = newY; - entityLiving.posZ = newZ; - - int i = MathHelper.floor_double(entityLiving.posX); - int j = MathHelper.floor_double(entityLiving.posY); - int k = MathHelper.floor_double(entityLiving.posZ); - Block l; - - if (entityLiving.worldObj.blockExists(i, j, k)) - { - boolean flag1 = false; - - while (!flag1 && j > 0) - { - l = entityLiving.worldObj.getBlock(i, j - 1, k); - - if (l != null && l.getMaterial().blocksMovement()) - { - flag1 = true; - } else - { - --entityLiving.posY; - --j; - } - } - } - - if(entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.boundingBox)) - { - entityLiving.setPositionAndUpdate(newX, newY, newZ); - isGood = true; - } - } - - if(isGood = false) - { - return null; - } - - return (IHoardDemon)entityLiving; - } - - public int spawnMoreDemons(LocalStorageAlphaPact storage) - { - return 5; - } - - @Override - public int getCostPerRefresh() - { - return 1; - } - - public LocalRitualStorage getNewLocalStorage() - { - return new LocalStorageAlphaPact(); - } - - @Override - public List<RitualComponent> getRitualComponentList() - { - ArrayList<RitualComponent> omegaRitual = new ArrayList(); - - this.addCornerRunes(omegaRitual, 1, 0, RitualComponent.BLANK); - this.addOffsetRunes(omegaRitual, 2, 1, 0, RitualComponent.FIRE); - this.addParallelRunes(omegaRitual, 4, 0, RitualComponent.WATER); - this.addParallelRunes(omegaRitual, 5, 0, RitualComponent.EARTH); - this.addCornerRunes(omegaRitual, 4, 0, RitualComponent.AIR); - this.addOffsetRunes(omegaRitual, 3, 4, 0, RitualComponent.AIR); - this.addParallelRunes(omegaRitual, 5, 1, RitualComponent.WATER); - this.addParallelRunes(omegaRitual, 5, 2, RitualComponent.EARTH); - this.addParallelRunes(omegaRitual, 4, 3, RitualComponent.WATER); - this.addParallelRunes(omegaRitual, 4, 4, RitualComponent.WATER); - this.addParallelRunes(omegaRitual, 3, 5, RitualComponent.BLANK); - this.addParallelRunes(omegaRitual, 2, 5, RitualComponent.FIRE); - this.addParallelRunes(omegaRitual, 1, 5, RitualComponent.DUSK); - this.addOffsetRunes(omegaRitual, 5, 3, 1, RitualComponent.WATER); - this.addOffsetRunes(omegaRitual, 6, 3, 1, RitualComponent.DUSK); - this.addOffsetRunes(omegaRitual, 6, 4, 1, RitualComponent.FIRE); - this.addOffsetRunes(omegaRitual, 6, 5, 1, RitualComponent.BLANK); - this.addCornerRunes(omegaRitual, 4, 2, RitualComponent.FIRE); - this.addCornerRunes(omegaRitual, 4, 3, RitualComponent.AIR); - this.addCornerRunes(omegaRitual, 4, 4, RitualComponent.AIR); - this.addOffsetRunes(omegaRitual, 4, 3, 2, RitualComponent.BLANK); - this.addCornerRunes(omegaRitual, 3, 5, RitualComponent.EARTH); - this.addOffsetRunes(omegaRitual, 2, 3, 5, RitualComponent.AIR); - - return omegaRitual; - } -} +//package WayofTime.alchemicalWizardry.common.rituals; +// +//import java.util.ArrayList; +//import java.util.List; +//import java.util.Random; +// +//import net.minecraft.block.Block; +//import net.minecraft.entity.EntityLivingBase; +//import net.minecraft.util.BlockPos; +//import net.minecraft.util.MathHelper; +//import net.minecraft.world.World; +//import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +//import WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage; +//import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +//import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +//import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +//import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGrunt; +//import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; +// +//public class RitualEffectAlphaPact extends RitualEffect +//{ +// Random rand = new Random(); +// +// @Override +// public void performEffect(IMasterRitualStone ritualStone) +// { +// String owner = ritualStone.getOwner(); +// +// int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); +// World world = ritualStone.getWorldObj(); +// BlockPos pos = ritualStone.getPosition(); +// +// if (world.getWorldTime() % 20 != 0) +// { +// return; +// } +// +// LocalRitualStorage stor = ritualStone.getLocalStorage(); +// if(stor instanceof LocalStorageAlphaPact) +// { +// LocalStorageAlphaPact storage = (LocalStorageAlphaPact)stor; +// +// Object[] demonList = storage.hoardList.toArray(); +// +// for(Object demon : demonList) +// { +// if(demon instanceof EntityLivingBase) +// { +// if(!((EntityLivingBase) demon).isEntityAlive()) +// { +// System.out.println(storage.hoardList.remove(demon)); +// } +// } +// } +// +// System.out.println("Hi!"); +// +// int summons = 0; +// +// int horizontalRange = 25; +// int verticalRange = 20; +// +// if(storage.hoardList.isEmpty()) +// { +// IHoardDemon demon = this.getRandomDemonForStage(world, x, y, z, horizontalRange, verticalRange); +// if(demon instanceof EntityLivingBase) +// { +// world.spawnEntityInWorld((EntityLivingBase)demon); +// storage.thrallDemon(demon); +// } +// }else +// { +// } +// } +// } +// +// public IHoardDemon getRandomDemonForStage(World world, int x, int y, int z, int horizontalRange, int verticalRange) +// { +// EntityLivingBase entityLiving = new EntityMinorDemonGrunt(world); +// +// boolean isGood = false; +// for(int n=0; n<100; n++) +// { +// double newX = x + (rand.nextInt(horizontalRange) - horizontalRange) + 0.5; +// double newY = y + (double) (rand.nextInt((int) verticalRange)); +// double newZ = z + (rand.nextInt(horizontalRange) - horizontalRange) + 0.5; +// +// entityLiving.posX = newX; +// entityLiving.posY = newY; +// entityLiving.posZ = newZ; +// +// int i = MathHelper.floor_double(entityLiving.posX); +// int j = MathHelper.floor_double(entityLiving.posY); +// int k = MathHelper.floor_double(entityLiving.posZ); +// Block l; +// +// if (entityLiving.worldObj.blockExists(i, j, k)) +// { +// boolean flag1 = false; +// +// while (!flag1 && j > 0) +// { +// l = entityLiving.worldObj.getBlock(i, j - 1, k); +// +// if (l != null && l.getMaterial().blocksMovement()) +// { +// flag1 = true; +// } else +// { +// --entityLiving.posY; +// --j; +// } +// } +// } +// +// if(entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.boundingBox)) +// { +// entityLiving.setPositionAndUpdate(newX, newY, newZ); +// isGood = true; +// } +// } +// +// if(isGood = false) +// { +// return null; +// } +// +// return (IHoardDemon)entityLiving; +// } +// +// public int spawnMoreDemons(LocalStorageAlphaPact storage) +// { +// return 5; +// } +// +// @Override +// public int getCostPerRefresh() +// { +// return 1; +// } +// +// public LocalRitualStorage getNewLocalStorage() +// { +// return new LocalStorageAlphaPact(); +// } +// +// @Override +// public List<RitualComponent> getRitualComponentList() +// { +// ArrayList<RitualComponent> omegaRitual = new ArrayList(); +// +// this.addCornerRunes(omegaRitual, 1, 0, RitualComponent.BLANK); +// this.addOffsetRunes(omegaRitual, 2, 1, 0, RitualComponent.FIRE); +// this.addParallelRunes(omegaRitual, 4, 0, RitualComponent.WATER); +// this.addParallelRunes(omegaRitual, 5, 0, RitualComponent.EARTH); +// this.addCornerRunes(omegaRitual, 4, 0, RitualComponent.AIR); +// this.addOffsetRunes(omegaRitual, 3, 4, 0, RitualComponent.AIR); +// this.addParallelRunes(omegaRitual, 5, 1, RitualComponent.WATER); +// this.addParallelRunes(omegaRitual, 5, 2, RitualComponent.EARTH); +// this.addParallelRunes(omegaRitual, 4, 3, RitualComponent.WATER); +// this.addParallelRunes(omegaRitual, 4, 4, RitualComponent.WATER); +// this.addParallelRunes(omegaRitual, 3, 5, RitualComponent.BLANK); +// this.addParallelRunes(omegaRitual, 2, 5, RitualComponent.FIRE); +// this.addParallelRunes(omegaRitual, 1, 5, RitualComponent.DUSK); +// this.addOffsetRunes(omegaRitual, 5, 3, 1, RitualComponent.WATER); +// this.addOffsetRunes(omegaRitual, 6, 3, 1, RitualComponent.DUSK); +// this.addOffsetRunes(omegaRitual, 6, 4, 1, RitualComponent.FIRE); +// this.addOffsetRunes(omegaRitual, 6, 5, 1, RitualComponent.BLANK); +// this.addCornerRunes(omegaRitual, 4, 2, RitualComponent.FIRE); +// this.addCornerRunes(omegaRitual, 4, 3, RitualComponent.AIR); +// this.addCornerRunes(omegaRitual, 4, 4, RitualComponent.AIR); +// this.addOffsetRunes(omegaRitual, 4, 3, 2, RitualComponent.BLANK); +// this.addCornerRunes(omegaRitual, 3, 5, RitualComponent.EARTH); +// this.addOffsetRunes(omegaRitual, 2, 3, 5, RitualComponent.AIR); +// +// return omegaRitual; +// } +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java index 865a5f14..191d186b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java @@ -11,6 +11,7 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -28,10 +29,8 @@ public class RitualEffectAnimalGrowth extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (world.getWorldTime() % 20 != 0) { @@ -40,7 +39,7 @@ public class RitualEffectAnimalGrowth extends RitualEffect double range = 2; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 3), (double) (z + 1)).expand(range, 0, range); + AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 3), (double) (z + 1)).expand(range, 0, range); List<EntityAgeable> list = world.getEntitiesWithinAABB(EntityAgeable.class, axisalignedbb); int entityCount = 0; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java index f222840d..c6d784eb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java @@ -9,6 +9,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -30,10 +31,8 @@ public class RitualEffectApiaryOverclock extends RitualEffect } int currentEssence = data.currentEssence; - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (currentEssence < this.getCostPerRefresh()) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java index e3581192..7dd7beaf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java @@ -7,6 +7,7 @@ import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.oredict.OreDictionary; @@ -31,10 +32,8 @@ public class RitualEffectAutoAlchemy extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (currentEssence < this.getCostPerRefresh() * 6) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java index afa50b54..358b7efd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java @@ -13,6 +13,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -27,10 +28,8 @@ public class RitualEffectBinding extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (currentEssence < this.getCostPerRefresh()) { @@ -47,7 +46,7 @@ public class RitualEffectBinding extends RitualEffect if (ritualStone.getVar1() == 0) { int d0 = 0; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 2), (double) (z + 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 2), (double) (z + 1)).expand(d0, d0, d0); List list = world.getEntitiesWithinAABB(EntityItem.class, axisalignedbb); Iterator iterator = list.iterator(); EntityItem item; @@ -78,7 +77,7 @@ public class RitualEffectBinding extends RitualEffect if (world.rand.nextInt(10) == 0) { - SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 1, x, y, z); + SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.getDimensionId(), 1, x, y, z); } } @@ -94,19 +93,19 @@ public class RitualEffectBinding extends RitualEffect switch (lightningPoint) { case 0: - world.addWeatherEffect(new EntityLightningBolt(world, x + 4, y + 3, z)); + world.addWeatherEffect(new EntityLightningBolt(world, x + 4, y + 3, z + 0)); break; case 1: - world.addWeatherEffect(new EntityLightningBolt(world, x - 4, y + 3, z)); + world.addWeatherEffect(new EntityLightningBolt(world, x - 4, y + 3, z + 0)); break; case 2: - world.addWeatherEffect(new EntityLightningBolt(world, x, y + 3, z + 4)); + world.addWeatherEffect(new EntityLightningBolt(world, x + 0, y + 3, z + 4)); break; case 3: - world.addWeatherEffect(new EntityLightningBolt(world, x, y + 3, z - 4)); + world.addWeatherEffect(new EntityLightningBolt(world, x + 0, y + 3, z - 4)); break; case 4: diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java index 399ee3e5..d356547e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java @@ -18,6 +18,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.chunk.Chunk; @@ -33,10 +34,9 @@ public class RitualEffectBiomeChanger extends RitualEffect String owner = ritualStone.getOwner(); int cooldown = ritualStone.getCooldown(); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); + if (cooldown > 0) { ritualStone.setCooldown(cooldown - 1); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java index 1a6b225a..0871c350 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java @@ -13,6 +13,7 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -31,10 +32,8 @@ public class RitualEffectContainment extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (currentEssence < this.getCostPerRefresh()) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java index 889bed90..a675082a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java @@ -15,6 +15,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.oredict.OreDictionary; @@ -40,10 +41,8 @@ public class RitualEffectCrafting extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java index 9440dc1d..6601a171 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java @@ -11,6 +11,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.ModBlocks; @@ -35,16 +36,14 @@ public class RitualEffectCrushing extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (world.getWorldTime() % 10 != 5) { return; } - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); TileEntity tile = world.getTileEntity(x, y + 1, z); IInventory tileEntity; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java index c083863d..f4313d20 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java @@ -8,6 +8,7 @@ import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentTranslation; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.ModBlocks; @@ -36,10 +37,8 @@ public class RitualEffectDemonPortal extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (currentEssence < this.getCostPerRefresh()) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java index 5e82d851..3ed4f53b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java @@ -12,6 +12,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -28,10 +29,8 @@ public class RitualEffectEllipsoid extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); TileEntity tile = world.getTileEntity(x, y + 1, z); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java index 5c447a02..1c4717db 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java @@ -11,6 +11,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -24,10 +25,8 @@ public class RitualEffectEvaporation extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (currentEssence < 0) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java index 0452a29e..a7342a9d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java @@ -17,6 +17,7 @@ import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; @@ -38,10 +39,8 @@ public class RitualEffectExpulsion extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (currentEssence < this.getCostPerRefresh()) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java index a72bc0af..a3f2ae1b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -27,10 +28,8 @@ public class RitualEffectFeatheredEarth extends RitualEffect //Nullifies all fal String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (ritualStone.getCooldown() > 0) { @@ -47,7 +46,7 @@ public class RitualEffectFeatheredEarth extends RitualEffect //Nullifies all fal int range = this.getHorizontalRangeForReagent(hasTerrae, hasOrbisTerrae); int verticalRange = hasAether ? 60 : 30; - List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1).expand(range, verticalRange, range)); + List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(x, y, z, x + 1, y + 1, z + 1).expand(range, verticalRange, range)); int entityCount = 0; boolean flag = false; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java index 35df70c8..57ae3848 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java @@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -28,10 +29,8 @@ public class RitualEffectFeatheredKnife extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java index 705eaf1d..d2423a38 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java @@ -10,6 +10,7 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -27,14 +28,12 @@ public class RitualEffectFlight extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); int range = 20; int verticalRange = 30; - AxisAlignedBB axis = AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1).expand(range, verticalRange, range); + AxisAlignedBB axis = new AxisAlignedBB(x, y, z, x + 1, y + 1, z + 1).expand(range, verticalRange, range); axis.maxY = 256; axis.minY = 0; List<EntityPlayer> entities = world.getEntitiesWithinAABB(EntityPlayer.class, axis); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java index 84bfdd01..3447421b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java @@ -9,6 +9,7 @@ import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.util.FoodStats; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -26,10 +27,8 @@ public class RitualEffectFullStomach extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (world.getWorldTime() % 20 != 0) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java index 58288c92..4b833b9c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java @@ -7,6 +7,7 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.block.Block; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.IPlantable; import net.minecraft.block.IGrowable; @@ -27,10 +28,8 @@ public class RitualEffectGrowth extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (currentEssence < this.getCostPerRefresh() * 9) { @@ -77,7 +76,7 @@ public class RitualEffectGrowth extends RitualEffect if (block instanceof IPlantable || block instanceof IGrowable) { { - SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 3, x, y, z); + SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.getDimensionId(), 3, x, y, z); block.updateTick(world, x + i, y + 2, z + j, world.rand); flag++; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java index 02803953..790d2986 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java @@ -11,6 +11,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -24,10 +25,9 @@ public class RitualEffectHarvest extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); + int maxCount = 100; if (currentEssence < this.getCostPerRefresh() * maxCount) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java index c8e45fbe..b3c86d7b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java @@ -10,6 +10,7 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -27,10 +28,8 @@ public class RitualEffectHealing extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); int timeDelay = 50; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java index 0a1b9711..46a510f7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java @@ -10,6 +10,7 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -26,10 +27,8 @@ public class RitualEffectInterdiction extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (currentEssence < this.getCostPerRefresh()) { @@ -78,7 +77,7 @@ public class RitualEffectInterdiction extends RitualEffect int horizontalRadius = 5; int verticalRadius = 5; - List<EntityItem> itemList = world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1).expand(horizontalRadius, verticalRadius, horizontalRadius)); + List<EntityItem> itemList = world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(x, y, z, x + 1, y + 1, z + 1).expand(horizontalRadius, verticalRadius, horizontalRadius)); if (itemList != null) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java index f8dca42f..5d7c6b72 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java @@ -10,6 +10,7 @@ import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.Int3; @@ -33,10 +34,8 @@ public class RitualEffectItemRouting extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (world.getWorldTime() % 20 != 0) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java index 5f0c57cf..f2eb38c8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java @@ -7,6 +7,7 @@ import net.minecraft.entity.item.EntityItem; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; @@ -28,11 +29,9 @@ public class RitualEffectItemSuction extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); + TileEntity tile = world.getTileEntity(x, y + 1, z); IInventory tileEntity; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java index 4c6dc431..7daa6b31 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java @@ -10,6 +10,7 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -26,10 +27,8 @@ public class RitualEffectJumping extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); double range = 0.5; List<EntityLivingBase> livingList = SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 1.5, z + 0.5, range, range); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java index 8826b267..d21f233b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java @@ -1,5 +1,21 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.potion.PotionEffect; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.world.World; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidHandler; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -8,20 +24,6 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.block.BlockSpectralContainer; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.block.Block; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; - -import java.util.ArrayList; -import java.util.List; public class RitualEffectLava extends RitualEffect { @@ -37,11 +39,8 @@ public class RitualEffectLava extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); - + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (this.canDrainReagent(ritualStone, ReagentRegistry.offensaReagent, offensaDrain, false) && SoulNetworkHandler.canSyphonFromOnlyNetwork(owner, fireFuseCost)) { @@ -49,7 +48,7 @@ public class RitualEffectLava extends RitualEffect boolean drainReductus = world.getWorldTime() % 100 == 0; int range = 5; - List<EntityLivingBase> entityList = SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range); + List<EntityLivingBase> entityList = SpellHelper.getLivingEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, range, range); EntityPlayer player = SpellHelper.getPlayerForUsername(owner); for (EntityLivingBase entity : entityList) @@ -76,9 +75,11 @@ public class RitualEffectLava extends RitualEffect } } - Block block = world.getBlock(x, y + 1, z); + BlockPos newPos = pos.offsetUp(); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); - if (world.isAirBlock(x, y + 1, z) && !(block instanceof BlockSpectralContainer)) + if (world.isAirBlock(newPos) && !(block instanceof BlockSpectralContainer)) { if (currentEssence < this.getCostPerRefresh()) { @@ -87,10 +88,10 @@ public class RitualEffectLava extends RitualEffect { for (int i = 0; i < 10; i++) { - SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 3, x, y, z); + SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, world.provider.getDimensionId(), 3, pos); } - world.setBlock(x, y + 1, z, Blocks.lava, 0, 3); + world.setBlockState(newPos, Blocks.lava.getDefaultState()); SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); } } else @@ -100,13 +101,13 @@ public class RitualEffectLava extends RitualEffect { return; } - TileEntity tile = world.getTileEntity(x, y + 1, z); + TileEntity tile = world.getTileEntity(newPos); if (tile instanceof IFluidHandler) { - int amount = ((IFluidHandler) tile).fill(ForgeDirection.DOWN, new FluidStack(FluidRegistry.LAVA, 1000), false); + int amount = ((IFluidHandler) tile).fill(EnumFacing.DOWN, new FluidStack(FluidRegistry.LAVA, 1000), false); if (amount >= 1000) { - ((IFluidHandler) tile).fill(ForgeDirection.DOWN, new FluidStack(FluidRegistry.LAVA, 1000), true); + ((IFluidHandler) tile).fill(EnumFacing.DOWN, new FluidStack(FluidRegistry.LAVA, 1000), true); this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java index baa711cd..aa7e0e04 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java @@ -10,6 +10,7 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -29,10 +30,8 @@ public class RitualEffectLeap extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); double range = 2.0; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java index 23f39955..3cc98a4c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; @@ -24,10 +25,8 @@ public class RitualEffectLifeConduit extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); IBloodAltar tileAltar = null; boolean testFlag = false; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java index dd099f52..5a4945e0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java @@ -11,6 +11,7 @@ import net.minecraft.block.BlockRedstoneOre; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.oredict.OreDictionary; import WayofTime.alchemicalWizardry.api.Int3; @@ -66,10 +67,8 @@ public class RitualEffectMagnetic extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java index 15abe3e3..e8f741d6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java @@ -6,6 +6,7 @@ import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityBeacon; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -25,10 +26,8 @@ public class RitualEffectOmegaStalling extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (world.getWorldTime() % 20 != 0) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java index 2fe3fd4f..401823fd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java @@ -10,6 +10,7 @@ import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.Int3; @@ -40,10 +41,8 @@ public class RitualEffectOmegaTest extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (world.getWorldTime() % 200 != 0) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java index 396b7779..056f6611 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java @@ -6,6 +6,7 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks; import WayofTime.alchemicalWizardry.common.CoordAndRange; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -20,10 +21,8 @@ public class RitualEffectSpawnWard extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (currentEssence < this.getCostPerRefresh()) { @@ -33,7 +32,7 @@ public class RitualEffectSpawnWard extends RitualEffect int horizRange = 32; int vertRange = 32; - int dimension = world.provider.dimensionId; + int dimension = world.provider.getDimensionId(); if (AlchemicalWizardryEventHooks.respawnMap.containsKey(new Integer(dimension))) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSphereCreator.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSphereCreator.java index 7761f005..aead349e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSphereCreator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSphereCreator.java @@ -4,11 +4,13 @@ import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; @@ -31,10 +33,8 @@ public class RitualEffectSphereCreator extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); // boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); @@ -48,7 +48,7 @@ public class RitualEffectSphereCreator extends RitualEffect SoulNetworkHandler.causeNauseaToPlayer(owner); } else { - TileEntity tile = world.getTileEntity(x, y+1, z); + TileEntity tile = world.getTileEntity(pos.offsetUp()); if(!(tile instanceof IInventory)) { return; @@ -107,8 +107,8 @@ public class RitualEffectSphereCreator extends RitualEffect k = Math.min(radius, Math.max(-radius, lastPos.zCoord)); } - int yP = y + negYOffset; - int yN = y - negYOffset; + int yP = negYOffset; + int yN = -negYOffset; boolean incrementNext = false; @@ -131,21 +131,25 @@ public class RitualEffectSphereCreator extends RitualEffect return; } - Block blk = world.getBlock(x + i, yP + j, z + k); + BlockPos pPos = pos.add(i, j + yP, k); + BlockPos nPos = pos.add(i, j + yN, k); + + IBlockState state = world.getBlockState(pPos); + Block blk = state.getBlock(); - if (world.isAirBlock(x + i, yN + j, z + k) || (!world.isAirBlock(x + i, yP + j, z + k) && !SpellHelper.isBlockFluid(blk))) + if (world.isAirBlock(nPos) || (!world.isAirBlock(pPos) && !SpellHelper.isBlockFluid(blk))) { k++; continue; } - if(BlockTeleposer.swapBlocks(this, world, world, x + i, yN + j, z + k, x + i, yP + j, z + k, false, 2)) + if(BlockTeleposer.swapBlocks(this, world, world, nPos, pPos, false, 2)) { SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); if(this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true)) { - world.setBlock(x + i, yN + j, z + k, Blocks.dirt, 0, 2); + world.setBlockState(nPos, Blocks.dirt.getDefaultState(), 2); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java index 94f769d6..9e4cb891 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java @@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -26,10 +27,8 @@ public class RitualEffectSummonMeteor extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (ritualStone.getCooldown() > 0) { @@ -48,7 +47,7 @@ public class RitualEffectSummonMeteor extends RitualEffect entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); } else { - List<EntityItem> entities = world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(x, y + 1, z, x + 1, y + 2, z + 1)); + List<EntityItem> entities = world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(pos.offsetUp(), pos.add(1, 2, 1))); if (entities == null) { @@ -60,7 +59,7 @@ public class RitualEffectSummonMeteor extends RitualEffect if (entityItem != null && MeteorRegistry.isValidParadigmItem(entityItem.getEntityItem())) { int meteorID = MeteorRegistry.getParadigmIDForItem(entityItem.getEntityItem()); - EntityMeteor meteor = new EntityMeteor(world, x + 0.5f, 257, z + 0.5f, meteorID); + EntityMeteor meteor = new EntityMeteor(world, pos.getX() + 0.5f, 257, pos.getZ() + 0.5f, meteorID); meteor.motionY = -1.0f; if (this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, 1000, true)) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSupression.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSupression.java index c04b4a2a..851c97bf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSupression.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSupression.java @@ -1,5 +1,16 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; @@ -7,15 +18,6 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; public class RitualEffectSupression extends RitualEffect { @@ -28,12 +30,11 @@ public class RitualEffectSupression extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); - Block blockish = world.getBlock(x, y - 1, z); + IBlockState stateish = world.getBlockState(pos.offsetDown()); + Block blockish = stateish.getBlock(); boolean hasAquasalus = this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, false); boolean hasAether = this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false); @@ -74,16 +75,19 @@ public class RitualEffectSupression extends RitualEffect { continue; } - - Block block = world.getBlock(x + i, y + j, z + k); + + BlockPos newPos = pos.add(i, j, k); + IBlockState state = world.getBlockState(newPos); + + Block block = state.getBlock(); if (SpellHelper.isBlockFluid(block)) { - TESpectralContainer.createSpectralBlockAtLocation(world, x + i, y + j, z + k, 3 * masterRadius); + TESpectralContainer.createSpectralBlockAtLocation(world, newPos, 3 * masterRadius); } else { - TileEntity tile = world.getTileEntity(x + i, y + j, z + k); + TileEntity tile = world.getTileEntity(newPos); if (tile instanceof TESpectralContainer) { ((TESpectralContainer) tile).resetDuration(3 * masterRadius); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java index 8193dbf4..aaa76a64 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java @@ -16,6 +16,7 @@ import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -32,10 +33,8 @@ public class RitualEffectUnbinding extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (currentEssence < this.getCostPerRefresh()) { @@ -43,13 +42,17 @@ public class RitualEffectUnbinding extends RitualEffect } else { int d0 = 0; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 2), (double) (z + 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = new AxisAlignedBB(pos, pos.add(1, 1, 1)).expand(d0, d0, d0); List list = world.getEntitiesWithinAABB(EntityItem.class, axisalignedbb); Iterator iterator = list.iterator(); EntityItem item; boolean drain = false; + int x = pos.getX(); + int y = pos.getY(); + int z = pos.getZ(); + while (iterator.hasNext()) { item = (EntityItem) iterator.next(); @@ -142,7 +145,7 @@ public class RitualEffectUnbinding extends RitualEffect if (world.rand.nextInt(10) == 0) { - SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 1, x, y, z); + SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, world.provider.getDimensionId(), 1, pos); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectVeilOfEvil.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectVeilOfEvil.java index f8dc5c70..0710499e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectVeilOfEvil.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectVeilOfEvil.java @@ -6,6 +6,7 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks; import WayofTime.alchemicalWizardry.common.CoordAndRange; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -20,10 +21,8 @@ public class RitualEffectVeilOfEvil extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (currentEssence < this.getCostPerRefresh()) { @@ -33,41 +32,39 @@ public class RitualEffectVeilOfEvil extends RitualEffect int horizRange = 32; int vertRange = 32; - int dimension = world.provider.dimensionId; + int dimension = world.provider.getDimensionId(); if (AlchemicalWizardryEventHooks.forceSpawnMap.containsKey(new Integer(dimension))) { List<CoordAndRange> list = AlchemicalWizardryEventHooks.forceSpawnMap.get(new Integer(dimension)); if (list != null) { - if (!list.contains(new CoordAndRange(x, y, z, horizRange, vertRange))) + if (!list.contains(new CoordAndRange(pos, horizRange, vertRange))) { boolean hasFoundAndRemoved = false; for (CoordAndRange coords : list) { - int xLocation = coords.xCoord; - int yLocation = coords.yCoord; - int zLocation = coords.zCoord; + BlockPos locationPos = coords.getPos(); - if (xLocation == x && yLocation == y && zLocation == z) + if (locationPos.equals(pos)) { list.remove(coords); hasFoundAndRemoved = true; break; } } - list.add(new CoordAndRange(x, y, z, horizRange, vertRange)); + list.add(new CoordAndRange(pos, horizRange, vertRange)); } } else { list = new LinkedList(); - list.add(new CoordAndRange(x, y, z, horizRange, vertRange)); + list.add(new CoordAndRange(pos, horizRange, vertRange)); AlchemicalWizardryEventHooks.forceSpawnMap.put(new Integer(dimension), list); } } else { List<CoordAndRange> list = new LinkedList(); - list.add(new CoordAndRange(x, y, z, horizRange, vertRange)); + list.add(new CoordAndRange(pos, horizRange, vertRange)); AlchemicalWizardryEventHooks.forceSpawnMap.put(new Integer(dimension), list); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java index 95e68c3e..e0080ad8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java @@ -1,5 +1,22 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.potion.PotionEffect; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.world.World; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidHandler; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -8,21 +25,6 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.block.BlockSpectralContainer; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; - -import java.util.ArrayList; -import java.util.List; public class RitualEffectWater extends RitualEffect { @@ -37,10 +39,8 @@ public class RitualEffectWater extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); boolean hasCrystallos = this.canDrainReagent(ritualStone, ReagentRegistry.crystallosReagent, crystallosDrain, false); boolean hasAquasalus = this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, false); @@ -57,7 +57,8 @@ public class RitualEffectWater extends RitualEffect { for (int k = -hydrationRange; k <= hydrationRange; k++) { - if (SpellHelper.hydrateSoil(world, x + i, y + j, z + k)) + BlockPos newPos = pos.add(i, j, k); + if (SpellHelper.hydrateSoil(world, newPos)) { this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, true); } @@ -72,7 +73,7 @@ public class RitualEffectWater extends RitualEffect boolean drainReductus = world.getWorldTime() % 100 == 0; int range = 10; - List<Entity> list = SpellHelper.getEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range); + List<Entity> list = SpellHelper.getEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, range, range); for (Entity entity : list) { if (entity instanceof EntityLivingBase) @@ -106,9 +107,11 @@ public class RitualEffectWater extends RitualEffect } } - Block block = world.getBlock(x, y + 1, z); + BlockPos newPos = pos.offsetUp(); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); - if (world.isAirBlock(x, y + 1, z) && !(block instanceof BlockSpectralContainer)) + if (world.isAirBlock(newPos) && !(block instanceof BlockSpectralContainer)) { if (currentEssence < this.getCostPerRefresh()) { @@ -117,10 +120,10 @@ public class RitualEffectWater extends RitualEffect { for (int i = 0; i < 10; i++) { - SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 3, x, y, z); + SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, world.provider.getDimensionId(), 3, pos); } - world.setBlock(x, y + 1, z, Blocks.water, 0, 3); + world.setBlockState(newPos, Blocks.water.getDefaultState()); SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); } } else @@ -130,13 +133,13 @@ public class RitualEffectWater extends RitualEffect { return; } - TileEntity tile = world.getTileEntity(x, y + 1, z); + TileEntity tile = world.getTileEntity(newPos); if (tile instanceof IFluidHandler) { - int amount = ((IFluidHandler) tile).fill(ForgeDirection.DOWN, new FluidStack(FluidRegistry.WATER, 1000), false); + int amount = ((IFluidHandler) tile).fill(EnumFacing.DOWN, new FluidStack(FluidRegistry.WATER, 1000), false); if (amount >= 1000) { - ((IFluidHandler) tile).fill(ForgeDirection.DOWN, new FluidStack(FluidRegistry.WATER, 1000), true); + ((IFluidHandler) tile).fill(EnumFacing.DOWN, new FluidStack(FluidRegistry.WATER, 1000), true); this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true); @@ -159,12 +162,13 @@ public class RitualEffectWater extends RitualEffect if (hasCrystallos) { boolean success = false; - if (!world.isAirBlock(x + i, y + j, z + k) && SpellHelper.freezeWaterBlock(world, x + i, y + j, z + k)) + newPos = pos.add(i, j, k); + if (!world.isAirBlock(newPos) && SpellHelper.freezeWaterBlock(world, newPos)) { success = true; } else { - if (world.rand.nextInt(100) == 0 && world.isSideSolid(x + i, y + j - 1, z + k, ForgeDirection.UP)) + if (world.rand.nextInt(100) == 0 && world.isSideSolid(newPos, EnumFacing.UP)) { success = true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java index f7ef0e5b..c6bba4f3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java @@ -1,5 +1,14 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -7,14 +16,6 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; public class RitualEffectWellOfSuffering extends RitualEffect { @@ -31,10 +32,8 @@ public class RitualEffectWellOfSuffering extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + World world = ritualStone.getWorldObj(); + BlockPos pos = ritualStone.getPosition(); if (world.getWorldTime() % this.timeDelay != 0) { @@ -50,9 +49,10 @@ public class RitualEffectWellOfSuffering extends RitualEffect { for (int k = -10; k <= 10; k++) { - if (world.getTileEntity(x + i, y + k, z + j) instanceof IBloodAltar) + BlockPos newPos = pos.add(i, j, k); + if (world.getTileEntity(newPos) instanceof IBloodAltar) { - tileAltar = (IBloodAltar) world.getTileEntity(x + i, y + k, z + j); + tileAltar = (IBloodAltar) world.getTileEntity(newPos); testFlag = true; } } @@ -68,7 +68,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect int d0 = 10; int vertRange = hasPotentia ? 20 : 10; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) x, (double) y, (double) z, (double) (x + 1), (double) (y + 1), (double) (z + 1)).expand(d0, vertRange, d0); + AxisAlignedBB axisalignedbb = new AxisAlignedBB(pos, pos.add(1, 1, 1)).expand(d0, vertRange, d0); List<EntityLivingBase> list = world.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); int entityCount = 0; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicModItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicModItems.java index dd37a1ac..8770d605 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicModItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicModItems.java @@ -22,7 +22,7 @@ public class RoutingFocusLogicModItems extends RoutingFocusLogic public String getModID(Item itm) { - String str = GameData.getItemRegistry().getNameForObject(itm); + String str = (String) GameData.getItemRegistry().getNameForObject(itm); if(!str.isEmpty()) { String[] strs = str.split(":"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifier.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifier.java new file mode 100644 index 00000000..36754656 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifier.java @@ -0,0 +1,21 @@ +package WayofTime.alchemicalWizardry.common.spell.complex; + +public class SpellModifier +{ + public static final int DEFAULT = 0; + public static final int OFFENSIVE = 1; + public static final int DEFENSIVE = 2; + public static final int ENVIRONMENTAL = 3; + + private int modifier; + + protected SpellModifier(int modifier) + { + this.modifier = modifier; + } + + public int getModifier() + { + return this.modifier; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefault.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefault.java new file mode 100644 index 00000000..771ca1ce --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefault.java @@ -0,0 +1,9 @@ +package WayofTime.alchemicalWizardry.common.spell.complex; + +public class SpellModifierDefault extends SpellModifier +{ + public SpellModifierDefault() + { + super(SpellModifier.DEFAULT); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefensive.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefensive.java new file mode 100644 index 00000000..29d89007 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefensive.java @@ -0,0 +1,9 @@ +package WayofTime.alchemicalWizardry.common.spell.complex; + +public class SpellModifierDefensive extends SpellModifier +{ + public SpellModifierDefensive() + { + super(SpellModifier.DEFENSIVE); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierEnvironmental.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierEnvironmental.java new file mode 100644 index 00000000..f805dfca --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierEnvironmental.java @@ -0,0 +1,9 @@ +package WayofTime.alchemicalWizardry.common.spell.complex; + +public class SpellModifierEnvironmental extends SpellModifier +{ + public SpellModifierEnvironmental() + { + super(SpellModifier.ENVIRONMENTAL); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierOffensive.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierOffensive.java new file mode 100644 index 00000000..5d956e3f --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierOffensive.java @@ -0,0 +1,9 @@ +package WayofTime.alchemicalWizardry.common.spell.complex; + +public class SpellModifierOffensive extends SpellModifier +{ + public SpellModifierOffensive() + { + super(SpellModifier.OFFENSIVE); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java index e11b898e..97175a80 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect; -import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Random; @@ -8,6 +7,7 @@ import java.util.regex.Pattern; import net.minecraft.block.Block; import net.minecraft.block.BlockLiquid; +import net.minecraft.block.state.IBlockState; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentProtection; import net.minecraft.entity.Entity; @@ -34,13 +34,14 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; import net.minecraft.server.management.ServerConfigurationManager; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; -import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraft.world.WorldServer; import net.minecraftforge.common.util.FakePlayer; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.IFluidBlock; import net.minecraftforge.oredict.OreDictionary; import WayofTime.alchemicalWizardry.AlchemicalWizardry; @@ -53,37 +54,33 @@ import WayofTime.alchemicalWizardry.common.NewPacketHandler; import WayofTime.alchemicalWizardry.common.items.sigil.SigilDivination; import cpw.mods.fml.common.FMLCommonHandler; -public class SpellHelper +public class SpellHelper extends APISpellHelper { public static Random rand = new Random(); public static final double root2 = Math.sqrt(2); public static boolean canEntityBeSeen(Entity entity, Entity entity2) { - return entity.worldObj.rayTraceBlocks(SpellHelper.createVec3(entity.posX, entity.posY, entity.posZ), SpellHelper.createVec3(entity2.posX, entity2.posY, entity2.posZ), false) == null; - } - - public static Vec3 createVec3(double x, double y, double z) - { - return APISpellHelper.createVec3(x, y, z); + return entity.worldObj.rayTraceBlocks(new Vec3(entity.posX, entity.posY, entity.posZ), new Vec3(entity2.posX, entity2.posY, entity2.posZ), false) == null; } - public static void smeltBlockInWorld(World world, int posX, int posY, int posZ) + public static void smeltBlockInWorld(World world, BlockPos pos) { - FurnaceRecipes recipes = FurnaceRecipes.smelting(); + FurnaceRecipes recipes = FurnaceRecipes.instance(); - Block block = world.getBlock(posX, posY, posZ); + IBlockState state = world.getBlockState(pos); + Block block = state.getBlock(); if (block == null) { return; } - int meta = world.getBlockMetadata(posX, posY, posZ); - + int meta = block.getMetaFromState(state); + ItemStack smeltedStack = recipes.getSmeltingResult(new ItemStack(block, 1, meta)); if (smeltedStack != null && smeltedStack.getItem() instanceof ItemBlock) { - world.setBlock(posX, posY, posZ, ((ItemBlock) (smeltedStack.getItem())).field_150939_a, smeltedStack.getItemDamage(), 3); + world.setBlockState(pos, ((ItemBlock) (smeltedStack.getItem())).block.getStateFromMeta(smeltedStack.getItemDamage()), 3); } } @@ -142,22 +139,22 @@ public class SpellHelper public static List<Entity> getEntitiesInRange(World world, double posX, double posY, double posZ, double horizontalRadius, double verticalRadius) { - return world.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius)); + return world.getEntitiesWithinAABB(Entity.class, new AxisAlignedBB(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius)); } public static List<EntityLivingBase> getLivingEntitiesInRange(World world, double posX, double posY, double posZ, double horizontalRadius, double verticalRadius) { - return world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius)); + return world.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius)); } public static List<EntityItem> getItemsInRange(World world, double posX, double posY, double posZ, double horizontalRadius, double verticalRadius) { - return world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius)); + return world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius)); } public static List<EntityPlayer> getPlayersInRange(World world, double posX, double posY, double posZ, double horizontalRadius, double verticalRadius) { - return world.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius)); + return world.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius)); } public static double gaussian(double d) @@ -165,62 +162,54 @@ public class SpellHelper return d * ((rand.nextFloat() - 0.5D)); } - public static Vec3 getEntityBlockVector(Entity entity) - { - int posX = (int) Math.round(entity.posX - 0.5f); - int posY = (int) entity.posY; - int posZ = (int) Math.round(entity.posZ - 0.5f); - - return entity.getLookVec().createVectorHelper(posX, posY, posZ); - } - - public static ForgeDirection getDirectionForLookVector(Vec3 lookVec) + public static EnumFacing getDirectionForLookVector(Vec3 lookVec) { double distance = lookVec.lengthVector(); if (lookVec.yCoord > distance * 0.9) { - return ForgeDirection.UP; + return EnumFacing.UP; } if (lookVec.yCoord < distance * -0.9) { - return ForgeDirection.DOWN; + return EnumFacing.DOWN; } return getCompassDirectionForLookVector(lookVec); } - public static ForgeDirection getCompassDirectionForLookVector(Vec3 lookVec) + public static EnumFacing getCompassDirectionForLookVector(Vec3 lookVec) { double radius = Math.sqrt(Math.pow(lookVec.xCoord, 2) + Math.pow(lookVec.zCoord, 2)); if (lookVec.zCoord > radius * 1 / root2) { - return ForgeDirection.SOUTH; + return EnumFacing.SOUTH; } if (lookVec.zCoord < -radius * 1 / root2) { - return ForgeDirection.NORTH; + return EnumFacing.NORTH; } if (lookVec.xCoord > radius * 1 / root2) { - return ForgeDirection.EAST; + return EnumFacing.EAST; } if (lookVec.xCoord < -radius * 1 / root2) { - return ForgeDirection.WEST; + return EnumFacing.WEST; } - return ForgeDirection.EAST; + return EnumFacing.EAST; } - public static boolean freezeWaterBlock(World world, int posX, int posY, int posZ) + public static boolean freezeWaterBlock(World world, BlockPos pos) { - Block block = world.getBlock(posX, posY, posZ); + IBlockState state = world.getBlockState(pos); + Block block = state.getBlock(); if (block == Blocks.water || block == Blocks.flowing_water) { - world.setBlock(posX, posY, posZ, Blocks.ice); + world.setBlockState(pos, Blocks.ice.getDefaultState()); return true; } @@ -237,11 +226,11 @@ public class SpellHelper return SoulNetworkHandler.getPlayerForUsername(str); } - public static void sendParticleToPlayer(EntityPlayer player, String str, double xCoord, double yCoord, double zCoord, double xVel, double yVel, double zVel) + public static void sendParticleToPlayer(EntityPlayer player, EnumParticleTypes type, double xCoord, double yCoord, double zCoord, double xVel, double yVel, double zVel) { if (player instanceof EntityPlayerMP) { - NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getParticlePacket(str, xCoord, yCoord, zCoord, xVel, yVel, zVel), (EntityPlayerMP) player); + NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getParticlePacket(type, xCoord, yCoord, zCoord, xVel, yVel, zVel), (EntityPlayerMP) player); } } @@ -250,13 +239,13 @@ public class SpellHelper switch (index) { case 1: - SpellHelper.sendParticleToPlayer(player, "mobSpell", xCoord + 0.5D + rand.nextGaussian() / 8, yCoord + 1.1D, zCoord + 0.5D + rand.nextGaussian() / 8, 0.5117D, 0.0117D, 0.0117D); + SpellHelper.sendParticleToPlayer(player, EnumParticleTypes.SPELL_MOB, xCoord + 0.5D + rand.nextGaussian() / 8, yCoord + 1.1D, zCoord + 0.5D + rand.nextGaussian() / 8, 0.5117D, 0.0117D, 0.0117D); break; case 2: - SpellHelper.sendParticleToPlayer(player, "reddust", xCoord + 0.5D + rand.nextGaussian() / 8, yCoord + 1.1D, zCoord + 0.5D + rand.nextGaussian() / 8, 0.82D, 0.941D, 0.91D); + SpellHelper.sendParticleToPlayer(player, EnumParticleTypes.REDSTONE, xCoord + 0.5D + rand.nextGaussian() / 8, yCoord + 1.1D, zCoord + 0.5D + rand.nextGaussian() / 8, 0.82D, 0.941D, 0.91D); break; case 3: - SpellHelper.sendParticleToPlayer(player, "mobSpell", xCoord + 0.5D + rand.nextGaussian() / 8, yCoord + 1.1D, zCoord + 0.5D + rand.nextGaussian() / 8, 1.0D, 0.371D, 0.371D); + SpellHelper.sendParticleToPlayer(player, EnumParticleTypes.SPELL_MOB, xCoord + 0.5D + rand.nextGaussian() / 8, yCoord + 1.1D, zCoord + 0.5D + rand.nextGaussian() / 8, 1.0D, 0.371D, 0.371D); break; case 4: float f = 1.0F; @@ -266,13 +255,13 @@ public class SpellHelper for (int l = 0; l < 8; ++l) { - SpellHelper.sendParticleToPlayer(player, "reddust", xCoord + Math.random() - Math.random(), yCoord + Math.random() - Math.random(), zCoord + Math.random() - Math.random(), f1, f2, f3); + SpellHelper.sendParticleToPlayer(player, EnumParticleTypes.REDSTONE, xCoord + Math.random() - Math.random(), yCoord + Math.random() - Math.random(), zCoord + Math.random() - Math.random(), f1, f2, f3); } break; } } - public static void sendParticleToAllAround(World world, double xPos, double yPos, double zPos, int radius, int dimension, String str, double xCoord, double yCoord, double zCoord, double xVel, double yVel, double zVel) + public static void sendParticleToAllAround(World world, double xPos, double yPos, double zPos, int radius, int dimension, EnumParticleTypes type, double xCoord, double yCoord, double zCoord, double xVel, double yVel, double zVel) { List<EntityPlayer> entities = SpellHelper.getPlayersInRange(world, xPos, yPos, zPos, radius, radius); @@ -283,7 +272,7 @@ public class SpellHelper for (EntityPlayer player : entities) { - SpellHelper.sendParticleToPlayer(player, str, xCoord, yCoord, zCoord, xVel, yVel, zVel); + SpellHelper.sendParticleToPlayer(player, type, xCoord, yCoord, zCoord, xVel, yVel, zVel); } } @@ -301,7 +290,12 @@ public class SpellHelper SpellHelper.sendIndexedParticleToPlayer(player, index, xCoord, yCoord, zCoord); } } - + + public static void sendIndexedParticleToAllAround(World world, BlockPos pos1, int radius, int dimension, int index, BlockPos coordPos) + { + sendIndexedParticleToAllAround(world, pos1.getX(), pos1.getY(), pos1.getZ(), radius, dimension, index, coordPos.getX(), coordPos.getY(), coordPos.getZ()); + } + public static void setPlayerSpeedFromServer(EntityPlayer player, double motionX, double motionY, double motionZ) { if (player instanceof EntityPlayerMP) @@ -321,19 +315,20 @@ public class SpellHelper return player instanceof FakePlayer || FAKE_PLAYER_PATTERN.matcher(SpellHelper.getUsername(player)).matches(); } - public static void smashBlock(World world, int posX, int posY, int posZ) + public static void smashBlock(World world, BlockPos pos) { - Block block = world.getBlock(posX, posY, posZ); + IBlockState state = world.getBlockState(pos); + Block block = state.getBlock(); if (block == Blocks.stone) { - world.setBlock(posX, posY, posZ, Blocks.cobblestone); + world.setBlockState(pos, Blocks.cobblestone.getDefaultState()); } else if (block == Blocks.cobblestone) { - world.setBlock(posX, posY, posZ, Blocks.gravel); + world.setBlockState(pos, Blocks.gravel.getDefaultState()); } else if (block == Blocks.gravel) { - world.setBlock(posX, posY, posZ, Blocks.sand); + world.setBlockState(pos, Blocks.sand.getDefaultState()); } } @@ -342,69 +337,60 @@ public class SpellHelper return block instanceof IFluidBlock || block instanceof BlockLiquid; } - public static void evaporateWaterBlock(World world, int posX, int posY, int posZ) + public static void evaporateWaterBlock(World world, BlockPos pos) { - Block block = world.getBlock(posX, posY, posZ); + IBlockState state = world.getBlockState(pos); + Block block = state.getBlock(); if (block == Blocks.water || block == Blocks.flowing_water) { - world.setBlockToAir(posX, posY, posZ); + world.setBlockToAir(pos); } } public static ItemStack getDustForOre(ItemStack item) { - String oreName = OreDictionary.getOreName(OreDictionary.getOreID(item)); - - if (oreName.contains("ore")) - { - String lowercaseOre = oreName.toLowerCase(); - boolean isAllowed = false; - - for (String str : AlchemicalWizardry.allowedCrushedOresArray) + int [] oreIds = OreDictionary.getOreIDs(item); + + for(int id : oreIds) + { + String oreName = OreDictionary.getOreName(id); + + if (oreName.contains("ore")) { - String testStr = str.toLowerCase(); + String lowercaseOre = oreName.toLowerCase(); + boolean isAllowed = false; - if (lowercaseOre.contains(testStr)) + for (String str : AlchemicalWizardry.allowedCrushedOresArray) { - isAllowed = true; - break; + String testStr = str.toLowerCase(); + + if (lowercaseOre.contains(testStr)) + { + isAllowed = true; + break; + } + } + + if (!isAllowed) + { + return null; + } + + String dustName = oreName.replace("ore", "dust"); + + List<ItemStack> items = OreDictionary.getOres(dustName); + + if (items != null && items.size() >= 1) + { + return (items.get(0).copy()); } } - - if (!isAllowed) - { - return null; - } - - String dustName = oreName.replace("ore", "dust"); - - ArrayList<ItemStack> items = OreDictionary.getOres(dustName); - - if (items != null && items.size() >= 1) - { - return (items.get(0).copy()); - } - } + } return null; } - public static List<ItemStack> getItemsFromBlock(World world, Block block, int x, int y, int z, int meta, boolean silkTouch, int fortune) - { - return APISpellHelper.getItemsFromBlock(world, block, x, y, z, meta, silkTouch, fortune); - } - - public static void spawnItemListInWorld(List<ItemStack> items, World world, float x, float y, float z) - { - APISpellHelper.spawnItemListInWorld(items, world, x, y, z); - } - - public static MovingObjectPosition raytraceFromEntity(World world, Entity player, boolean par3, double range) - { - return APISpellHelper.raytraceFromEntity(world, player, par3, range); - } - public static String getNumeralForInt(int num) { switch (num) @@ -523,7 +509,7 @@ public class SpellHelper return returned; } - public static ItemStack insertStackIntoInventory(ItemStack stack, IInventory inventory, ForgeDirection dir) + public static ItemStack insertStackIntoInventory(ItemStack stack, IInventory inventory, EnumFacing dir) { if (stack == null) { @@ -534,10 +520,10 @@ public class SpellHelper if(inventory instanceof ISidedInventory) { - int[] array = ((ISidedInventory)inventory).getAccessibleSlotsFromSide(dir.ordinal()); + int[] array = ((ISidedInventory)inventory).getSlotsForFace(dir); for(int in : array) { - canBeInserted[in] = inventory.isItemValidForSlot(in, stack) && ((ISidedInventory)inventory).canInsertItem(in, stack, dir.ordinal()); + canBeInserted[in] = inventory.isItemValidForSlot(in, stack) && ((ISidedInventory)inventory).canInsertItem(in, stack, dir); } }else { @@ -568,12 +554,12 @@ public class SpellHelper } - public static boolean canInsertStackFullyIntoInventory(ItemStack stack, IInventory inventory, ForgeDirection dir) + public static boolean canInsertStackFullyIntoInventory(ItemStack stack, IInventory inventory, EnumFacing dir) { return canInsertStackFullyIntoInventory(stack, inventory, dir, false, 0); } - public static boolean canInsertStackFullyIntoInventory(ItemStack stack, IInventory inventory, ForgeDirection dir, boolean fillToLimit, int limit) + public static boolean canInsertStackFullyIntoInventory(ItemStack stack, IInventory inventory, EnumFacing dir, boolean fillToLimit, int limit) { if (stack == null) { @@ -586,10 +572,10 @@ public class SpellHelper if(inventory instanceof ISidedInventory) { - int[] array = ((ISidedInventory)inventory).getAccessibleSlotsFromSide(dir.ordinal()); + int[] array = ((ISidedInventory)inventory).getSlotsForFace(dir); for(int in : array) { - canBeInserted[in] = inventory.isItemValidForSlot(in, stack) && ((ISidedInventory)inventory).canInsertItem(in, stack, dir.ordinal()); + canBeInserted[in] = inventory.isItemValidForSlot(in, stack) && ((ISidedInventory)inventory).canInsertItem(in, stack, dir); } }else { @@ -653,7 +639,7 @@ public class SpellHelper return false; } - public static ItemStack insertStackIntoInventory(ItemStack stack, IInventory inventory, ForgeDirection dir, int limit) + public static ItemStack insertStackIntoInventory(ItemStack stack, IInventory inventory, EnumFacing dir, int limit) { if (stack == null) { @@ -664,10 +650,10 @@ public class SpellHelper if(inventory instanceof ISidedInventory) { - int[] array = ((ISidedInventory)inventory).getAccessibleSlotsFromSide(dir.ordinal()); + int[] array = ((ISidedInventory)inventory).getSlotsForFace(dir); for(int in : array) { - canBeInserted[in] = ((ISidedInventory)inventory).canInsertItem(in, stack, dir.ordinal()); + canBeInserted[in] = ((ISidedInventory)inventory).canInsertItem(in, stack, dir); } }else { @@ -725,13 +711,13 @@ public class SpellHelper return stack; } - public static int getNumberOfItemsInInventory(IInventory inventory, ForgeDirection dir) + public static int getNumberOfItemsInInventory(IInventory inventory, EnumFacing dir) { boolean[] canBeInserted = new boolean[inventory.getSizeInventory()]; if(inventory instanceof ISidedInventory) { - int[] array = ((ISidedInventory)inventory).getAccessibleSlotsFromSide(dir.ordinal()); + int[] array = ((ISidedInventory)inventory).getSlotsForFace(dir); for(int in : array) { canBeInserted[in] = true; @@ -762,12 +748,13 @@ public class SpellHelper return amountOfItems; } - public static boolean hydrateSoil(World world, int x, int y, int z) + public static boolean hydrateSoil(World world, BlockPos pos) { - Block block = world.getBlock(x, y, z); - if (block == Blocks.dirt || block == Blocks.grass || (block == Blocks.farmland && world.getBlockMetadata(x, y, z) == 0)) + IBlockState state = world.getBlockState(pos); + Block block = state.getBlock(); + if (block == Blocks.dirt || block == Blocks.grass || (block == Blocks.farmland && block.getMetaFromState(state) == 0)) { - world.setBlock(x, y, z, Blocks.farmland, 15, 2); + world.setBlockState(pos, Blocks.farmland.getStateFromMeta(7), 2); return true; } @@ -826,8 +813,8 @@ public class SpellHelper ServerConfigurationManager config = player.mcServer.getConfigurationManager(); oldWorld.playSoundEffect(player.posX, player.posY, player.posZ, "mob.endermen.portal", 1.0F, 1.0F); player.closeScreen(); - player.dimension = newWorldServer.provider.dimensionId; - player.playerNetServerHandler.sendPacket(new S07PacketRespawn(player.dimension, player.worldObj.difficultySetting, newWorldServer.getWorldInfo().getTerrainType(), player.theItemInWorldManager.getGameType())); + player.dimension = newWorldServer.provider.getDimensionId(); + player.playerNetServerHandler.sendPacket(new S07PacketRespawn(player.dimension, player.worldObj.getDifficulty(), newWorldServer.getWorldInfo().getTerrainType(), player.theItemInWorldManager.getGameType())); oldWorldServer.removeEntity(player); player.isDead = false; player.setLocationAndAngles(d, e, f, player.rotationYaw, player.rotationPitch); @@ -847,7 +834,7 @@ public class SpellHelper player.playerNetServerHandler.sendPacket(new S1DPacketEntityEffect(player.getEntityId(), potion.next())); } player.playerNetServerHandler.sendPacket(new S1FPacketSetExperience(player.experience, player.experienceTotal, player.experienceLevel)); - FMLCommonHandler.instance().firePlayerChangedDimensionEvent(player, oldWorldServer.provider.dimensionId, player.dimension); + FMLCommonHandler.instance().firePlayerChangedDimensionEvent(player, oldWorldServer.provider.getDimensionId(), player.dimension); player.timeUntilPortal = 150; } player.worldObj.theProfiler.endSection(); @@ -927,7 +914,7 @@ public class SpellHelper public static float applySpecialProtection(EntityLivingBase entity, DamageSource source, float damage) { - ItemStack[] armour = entity.getLastActiveItems(); + ItemStack[] armour = entity.getInventory(); if(armour == null) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefaultEarth.java index 81f24122..fca0705a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefaultEarth.java @@ -17,6 +17,7 @@ public class CSEMeleeDefaultEarth extends ComplexSpellEffect public CSEMeleeDefaultEarth(int power, int cost, int potency) { this(); + this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefensiveEarth.java index 53aae894..c9e0954d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefensiveEarth.java @@ -17,6 +17,7 @@ public class CSEMeleeDefensiveEarth extends ComplexSpellEffect public CSEMeleeDefensiveEarth(int power, int cost, int potency) { this(); + this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeEnvironmentalEarth.java index dc558fb7..35a00764 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeEnvironmentalEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeEnvironmentalEarth.java @@ -17,6 +17,7 @@ public class CSEMeleeEnvironmentalEarth extends ComplexSpellEffect public CSEMeleeEnvironmentalEarth(int power, int cost, int potency) { this(); + this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeOffensiveEarth.java index 9b9b2409..9e294bb3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeOffensiveEarth.java @@ -17,6 +17,7 @@ public class CSEMeleeOffensiveEarth extends ComplexSpellEffect public CSEMeleeOffensiveEarth(int power, int cost, int potency) { this(); + this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefaultEarth.java index 60226c72..3f99eea3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefaultEarth.java @@ -17,6 +17,7 @@ public class CSEProjectileDefaultEarth extends ComplexSpellEffect public CSEProjectileDefaultEarth(int power, int cost, int potency) { this(); + this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileEnvironmentalEarth.java index ec1362a6..cec867cd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileEnvironmentalEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileEnvironmentalEarth.java @@ -17,6 +17,7 @@ public class CSEProjectileEnvironmentalEarth extends ComplexSpellEffect public CSEProjectileEnvironmentalEarth(int power, int cost, int potency) { this(); + this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileOffensiveEarth.java index 6ff81d50..139c88bb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileOffensiveEarth.java @@ -17,6 +17,7 @@ public class CSEProjectileOffensiveEarth extends ComplexSpellEffect public CSEProjectileOffensiveEarth(int power, int cost, int potency) { this(); + this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefaultEarth.java index 424be92e..fd767c1b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefaultEarth.java @@ -17,6 +17,7 @@ public class CSESelfDefaultEarth extends ComplexSpellEffect public CSESelfDefaultEarth(int power, int cost, int potency) { this(); + this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefensiveEarth.java index 90794fc8..64700185 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefensiveEarth.java @@ -17,6 +17,7 @@ public class CSESelfDefensiveEarth extends ComplexSpellEffect public CSESelfDefensiveEarth(int power, int cost, int potency) { this(); + this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfOffensiveEarth.java index 51312610..3eb7bf79 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfOffensiveEarth.java @@ -17,6 +17,7 @@ public class CSESelfOffensiveEarth extends ComplexSpellEffect public CSESelfOffensiveEarth(int power, int cost, int potency) { this(); + this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefaultEarth.java index ef1dd1b4..0b38fa7b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefaultEarth.java @@ -29,8 +29,10 @@ public class CSEToolDefaultEarth extends ComplexSpellEffect { String toolClass = "pickaxe"; + float digSpeed = 7.0f; + switch (this.powerEnhancement) { case 1: @@ -50,8 +52,10 @@ public class CSEToolDefaultEarth extends ComplexSpellEffect break; } + ((SpellParadigmTool)parad).setDigSpeed(toolClass, digSpeed); + int hlvl = this.potencyEnhancement + 2; ((SpellParadigmTool)parad).setHarvestLevel(toolClass, hlvl); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolEnvironmentalEarth.java index 1536fbff..376db588 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolEnvironmentalEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolEnvironmentalEarth.java @@ -17,6 +17,7 @@ public class CSEToolEnvironmentalEarth extends ComplexSpellEffect public CSEToolEnvironmentalEarth(int power, int cost, int potency) { this(); + this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolOffensiveEarth.java index 9b7e0c84..02f1cf6b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolOffensiveEarth.java @@ -17,6 +17,7 @@ public class CSEToolOffensiveEarth extends ComplexSpellEffect public CSEToolOffensiveEarth(int power, int cost, int potency) { this(); + this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeEnvironmentalIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeEnvironmentalIce.java index 807d79f8..c1ff2fe0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeEnvironmentalIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeEnvironmentalIce.java @@ -41,6 +41,6 @@ public class CSEMeleeEnvironmentalIce extends ComplexSpellEffect @Override public int getCostOfEffect() { - return (int) (20 * (0.5 * potencyEnhancement + 1) * 1 * Math.pow(0.85, costEnhancement)); //where the lone 1 is: (0 * potencyEnhancement + 1) + return (int) (20 * (0.5 * potencyEnhancement + 1) * (0 * powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefaultWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefaultWind.java index e39030de..f47960e9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefaultWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefaultWind.java @@ -17,6 +17,7 @@ public class CSEMeleeDefaultWind extends ComplexSpellEffect public CSEMeleeDefaultWind(int power, int cost, int potency) { this(); + this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefensiveWind.java index 15f1be6e..2381fda5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefensiveWind.java @@ -40,6 +40,6 @@ public class CSEProjectileDefensiveWind extends ComplexSpellEffect @Override public int getCostOfEffect() { - return (100 * (this.potencyEnhancement + 1)); + return (int) (100 * (this.potencyEnhancement + 1)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefaultEarth.java index 7ca0d401..cf4ed985 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefaultEarth.java @@ -1,10 +1,12 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityFallingBlock; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; public class MeleeDefaultEarth extends MeleeSpellCenteredWorldEffect { @@ -15,7 +17,7 @@ public class MeleeDefaultEarth extends MeleeSpellCenteredWorldEffect } @Override - public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ) + public void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos) { int radius = this.potencyUpgrades; @@ -25,17 +27,18 @@ public class MeleeDefaultEarth extends MeleeSpellCenteredWorldEffect { for (int k = -radius; k <= radius; k++) { - if (!world.isAirBlock(posX + i, posY + j, posZ + k) && world.getTileEntity(posX + i, posY + j, posZ + k) == null) + BlockPos newPos = pos.add(i, j, k); + if (!world.isAirBlock(newPos) && world.getTileEntity(newPos) == null) { - Block block = world.getBlock(posX + i, posY + j, posZ + k); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); - if (block.getBlockHardness(world, posX + i, posY + j, posZ + k) == -1) + if (block.getBlockHardness(world, newPos) == -1) { continue; } - int meta = world.getBlockMetadata(posX + i, posY + j, posZ + k); - EntityFallingBlock entity = new EntityFallingBlock(world, posX + i + 0.5f, posY + j + 0.5f, posZ + k + 0.5f, block, meta); + EntityFallingBlock entity = new EntityFallingBlock(world, newPos.getX() + 0.5f, newPos.getY() + 0.5f, newPos.getZ() + 0.5f, state); world.spawnEntityInWorld(entity); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefensiveEarth.java index d82ca011..e470be7c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefensiveEarth.java @@ -1,11 +1,12 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; public class MeleeDefensiveEarth extends MeleeSpellCenteredWorldEffect { @@ -16,21 +17,21 @@ public class MeleeDefensiveEarth extends MeleeSpellCenteredWorldEffect } @Override - public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ) + public void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos) { - ForgeDirection dir = SpellHelper.getDirectionForLookVector(player.getLook(1)); + EnumFacing dir = SpellHelper.getDirectionForLookVector(player.getLook(1)); int vertRadius = (int) (2 + 1.0f / 2.0f * Math.pow(this.potencyUpgrades, 2) + 1.0f / 2.0f * this.potencyUpgrades); int horizRadius = this.potencyUpgrades + 1; - int xOff = dir.offsetX; - int zOff = dir.offsetZ; + int xOff = dir.getFrontOffsetX(); + int zOff = dir.getFrontOffsetZ(); for (int i = -horizRadius; i <= horizRadius; i++) { for (int j = 0; j < vertRadius; j++) { - BlockTeleposer.swapBlocks(this, world, world, posX + i * zOff, posY + j, posZ + i * xOff, posX + i * zOff, posY + j - vertRadius, posZ + i * xOff); + BlockTeleposer.swapBlocks(this, world, world, pos.add(i * zOff, j, i * xOff), pos.add(i * zOff, j - vertRadius, i * xOff)); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeEnvironmentalEarth.java index 32291181..f80a0e70 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeEnvironmentalEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeEnvironmentalEarth.java @@ -1,11 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class MeleeEnvironmentalEarth extends MeleeSpellCenteredWorldEffect { @@ -16,7 +19,7 @@ public class MeleeEnvironmentalEarth extends MeleeSpellCenteredWorldEffect } @Override - public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ) + public void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos) { int radius = this.potencyUpgrades; @@ -26,18 +29,21 @@ public class MeleeEnvironmentalEarth extends MeleeSpellCenteredWorldEffect { for (int k = -radius; k <= radius; k++) { - if (!world.isAirBlock(posX + i, posY + j, posZ + k) && world.getTileEntity(posX + i, posY + j, posZ + k) == null) + BlockPos newPos = pos.add(i, j, k); + if (!world.isAirBlock(newPos) && world.getTileEntity(newPos) == null) { - ItemStack stack = new ItemStack(world.getBlock(posX + i, posY + j, posZ + k), 1, world.getBlockMetadata(posX + i, posY + j, posZ + k)); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); + ItemStack stack = new ItemStack(block, 1, block.getMetaFromState(state)); ItemStack dustStack = SpellHelper.getDustForOre(stack); if (dustStack != null) { - dustStack.stackSize *= 3; - world.spawnEntityInWorld(new EntityItem(world, posX, posY, posZ, dustStack)); + dustStack.stackSize = 3; + world.spawnEntityInWorld(new EntityItem(world, newPos.getX() + 0.5, newPos.getY() + 0.5, newPos.getZ() + 0.5, dustStack)); - world.setBlockToAir(posX + i, posY + j, posZ + k); + world.setBlockToAir(newPos); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeOffensiveEarth.java index d13ab19c..990a81fd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeOffensiveEarth.java @@ -1,9 +1,10 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.BlockPos; +import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; public class MeleeOffensiveEarth extends MeleeSpellCenteredWorldEffect { @@ -14,7 +15,7 @@ public class MeleeOffensiveEarth extends MeleeSpellCenteredWorldEffect } @Override - public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ) + public void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos) { int radius = this.potencyUpgrades; @@ -24,7 +25,8 @@ public class MeleeOffensiveEarth extends MeleeSpellCenteredWorldEffect { for (int k = -radius; k <= radius; k++) { - SpellHelper.smashBlock(world, posX + i, posY + j, posZ + k); + BlockPos newPos = pos.add(i, j, k); + SpellHelper.smashBlock(world, newPos); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefaultEarth.java index 8437f6d8..d28c5343 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefaultEarth.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; +import net.minecraft.util.BlockPos; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class ProjectileDefaultEarth extends ProjectileImpactEffect { @@ -22,34 +24,32 @@ public class ProjectileDefaultEarth extends ProjectileImpactEffect @Override public void onTileImpact(World world, MovingObjectPosition mop) { + BlockPos pos = mop.func_178782_a(); + int horizRange = (int) (0.5 * (this.powerUpgrades) + 1); int vertRange = (int) (0.5 * (this.powerUpgrades) + 1); - int posX = mop.blockX; - int posY = mop.blockY; - int posZ = mop.blockZ; - for (int i = -horizRange; i <= horizRange; i++) { for (int j = -vertRange; j <= vertRange; j++) { for (int k = -horizRange; k <= horizRange; k++) { - if (!world.isAirBlock(posX + i, posY + j, posZ + k)) + BlockPos newPos = pos.add(i, j, k); + if (!world.isAirBlock(newPos)) { - Block block = world.getBlock(posX + i, posY + j, posZ + k); - if (block == null || block.getBlockHardness(world, posX + i, posY + j, posZ + k) == -1 || SpellHelper.isBlockFluid(block)) + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); + if (block == null || block.getBlockHardness(world, newPos) == -1 || SpellHelper.isBlockFluid(block)) { continue; } //block.breakBlock(world, posX+i, posY+j, posZ+k, block.blockID, world.getBlockMetadata(posX+i, posY+j, posZ+k)); //world.destroyBlock(posX+i, posY+j, posZ+k, true); - world.func_147480_a(posX + i, posY + j, posZ + k, false); + world.destroyBlock(newPos, false); } } } } - } - } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefensiveEarth.java index e2d53a60..1c888f85 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefensiveEarth.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; +import net.minecraft.util.BlockPos; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class ProjectileDefensiveEarth extends ProjectileImpactEffect { @@ -22,12 +24,10 @@ public class ProjectileDefensiveEarth extends ProjectileImpactEffect @Override public void onTileImpact(World world, MovingObjectPosition mop) { - int horizRange = this.powerUpgrades; - int vertRange = this.potencyUpgrades; + BlockPos pos = mop.func_178782_a(); - int posX = mop.blockX; - int posY = mop.blockY; - int posZ = mop.blockZ; + int horizRange = (int) (this.powerUpgrades); + int vertRange = (int) (this.potencyUpgrades); for (int i = -horizRange; i <= horizRange; i++) { @@ -35,10 +35,12 @@ public class ProjectileDefensiveEarth extends ProjectileImpactEffect { for (int k = -horizRange; k <= horizRange; k++) { - if (!world.isAirBlock(posX + i, posY + j, posZ + k)) + BlockPos newPos = pos.add(i, j, k); + if (!world.isAirBlock(newPos)) { - Block block = world.getBlock(posX + i, posY + j, posZ + k); - if (block == null || block.getBlockHardness(world, posX + i, posY + j, posZ + k) == -1) + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); + if (block == null || block.getBlockHardness(world, newPos) == -1) { continue; } @@ -46,7 +48,7 @@ public class ProjectileDefensiveEarth extends ProjectileImpactEffect //world.destroyBlock(posX+i, posY+j, posZ+k, true); if (world.rand.nextFloat() < 0.6f) { - SpellHelper.smashBlock(world, posX + i, posY + j, posZ + k); + SpellHelper.smashBlock(world, newPos); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileEnvironmentalEarth.java index 721edd40..7a28612c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileEnvironmentalEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileEnvironmentalEarth.java @@ -1,14 +1,15 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; -import WayofTime.alchemicalWizardry.api.spell.ProjectileUpdateEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; -import net.minecraft.util.Vec3; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; +import WayofTime.alchemicalWizardry.api.spell.ProjectileUpdateEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class ProjectileEnvironmentalEarth extends ProjectileUpdateEffect { @@ -20,16 +21,12 @@ public class ProjectileEnvironmentalEarth extends ProjectileUpdateEffect @Override public void onUpdateEffect(Entity projectile) { - Vec3 posVec = SpellHelper.getEntityBlockVector(projectile); + BlockPos pos = projectile.getPosition(); int horizRange = this.powerUpgrades + 1; int vertRange = (int) (0.5 * (this.powerUpgrades + 1)); int maxBlocks = (int) (2 * Math.pow(3.47, this.potencyUpgrades)); - int posX = (int) (posVec.xCoord); - int posY = (int) (posVec.yCoord); - int posZ = (int) (posVec.zCoord); - World worldObj = projectile.worldObj; if (projectile instanceof EntitySpellProjectile) @@ -47,24 +44,25 @@ public class ProjectileEnvironmentalEarth extends ProjectileUpdateEffect { for (int k = -horizRange; k <= horizRange; k++) { - if (!worldObj.isAirBlock(posX + i, posY + j, posZ + k) && blocksBroken < maxBlocks) + BlockPos newPos = pos.add(i, j, k); + if (!worldObj.isAirBlock(newPos) && blocksBroken < maxBlocks) { - Block block = worldObj.getBlock(posX + i, posY + j, posZ + k); - int meta = worldObj.getBlockMetadata(posX + i, posY + j, posZ + k); - if (block == null || block.getBlockHardness(worldObj, posX + i, posY + j, posZ + k) == -1 || SpellHelper.isBlockFluid(block)) + IBlockState state = worldObj.getBlockState(newPos); + Block block = state.getBlock(); + if (block == null || block.getBlockHardness(worldObj, newPos) == -1 || SpellHelper.isBlockFluid(block)) { continue; } - if (((EntitySpellProjectile) projectile).getIsSilkTouch() && block.canSilkHarvest(worldObj, ((EntitySpellProjectile) projectile).shootingEntity, posX + i, posY + j, posZ + k, meta)) + if (((EntitySpellProjectile) projectile).getIsSilkTouch() && block.canSilkHarvest(worldObj, newPos, state, ((EntitySpellProjectile) projectile).shootingEntity)) { - ItemStack stack = new ItemStack(block, 1, meta); - EntityItem itemEntity = new EntityItem(worldObj, posX + i + 0.5, posY + j + 0.5, posZ + k + 0.5, stack); + ItemStack stack = new ItemStack(block, 1, block.getMetaFromState(state)); + EntityItem itemEntity = new EntityItem(worldObj, newPos.getX() + 0.5, newPos.getY() + 0.5, newPos.getZ() + 0.5, stack); worldObj.spawnEntityInWorld(itemEntity); - worldObj.setBlockToAir(posX + i, posY + j, posZ + k); + worldObj.setBlockToAir(newPos); } else { - worldObj.func_147480_a(posX + i, posY + j, posZ + k, true); + worldObj.destroyBlock(newPos, true); } blocksBroken++; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileOffensiveEarth.java index 67b2d424..8693f628 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileOffensiveEarth.java @@ -1,13 +1,13 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; +import net.minecraft.util.BlockPos; import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; public class ProjectileOffensiveEarth extends ProjectileImpactEffect { @@ -19,14 +19,10 @@ public class ProjectileOffensiveEarth extends ProjectileImpactEffect @Override public void onEntityImpact(Entity mop, Entity proj) { - int horizRange = this.powerUpgrades; - int vertDepth = 3 * this.potencyUpgrades + 1; + int horizRange = (int) (this.powerUpgrades); + int vertDepth = (int) (3 * this.potencyUpgrades + 1); - Vec3 blockVector = SpellHelper.getEntityBlockVector(mop); - - int posX = (int) (blockVector.xCoord); - int posY = (int) (blockVector.yCoord); - int posZ = (int) (blockVector.zCoord); + BlockPos pos = proj.getPosition(); World world = mop.worldObj; @@ -36,16 +32,18 @@ public class ProjectileOffensiveEarth extends ProjectileImpactEffect { for (int k = -horizRange; k <= horizRange; k++) { - if (!world.isAirBlock(posX + i, posY + j, posZ + k)) + BlockPos newPos = pos.add(i, j, k); + if (!world.isAirBlock(newPos)) { - Block block = world.getBlock(posX + i, posY + j, posZ + k); - if (block == null || block.getBlockHardness(world, posX + i, posY + j, posZ + k) == -1) + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); + if (block == null || block.getBlockHardness(world, newPos) == -1) { continue; } if (block == Blocks.stone || block == Blocks.cobblestone || block == Blocks.sand || block == Blocks.gravel || block == Blocks.grass || block == Blocks.dirt) { - world.setBlockToAir(posX + i, posY + j, posZ + k); + world.setBlockToAir(newPos); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefaultEarth.java index 53b038c0..78396edb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefaultEarth.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.BlockPos; +import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; public class SelfDefaultEarth extends SelfSpellEffect { @@ -21,26 +21,24 @@ public class SelfDefaultEarth extends SelfSpellEffect int horizRadius = this.powerUpgrades; int vertRange = 5 + 10 * this.potencyUpgrades; - Vec3 blockVec = SpellHelper.getEntityBlockVector(player); - - int posX = (int) (blockVec.xCoord); - int posY = (int) (blockVec.yCoord) - 1; - int posZ = (int) (blockVec.zCoord); + BlockPos pos = player.getPosition().offsetDown(); for (int i = -horizRadius; i <= horizRadius; i++) { for (int k = -horizRadius; k <= horizRadius; k++) { - if (!world.isAirBlock(posX + i, posY, posZ + k)) + BlockPos newPos = pos.add(i, 0, k); + if (!world.isAirBlock(newPos)) { continue; } for (int j = -1; j >= -vertRange; j--) { - if (!world.isAirBlock(posX + i, posY + j, posZ + k) && !SpellHelper.isBlockFluid(world.getBlock(posX + i, posY + j, posZ + k))) + BlockPos newNewPos = newPos.add(0, j, 0); + if (!world.isAirBlock(newNewPos) && !SpellHelper.isBlockFluid(world.getBlockState(newNewPos).getBlock())) { - BlockTeleposer.swapBlocks(this, world, world, posX + i, posY, posZ + k, posX + i, posY + j, posZ + k); + BlockTeleposer.swapBlocks(this, world, world,newPos, newNewPos); break; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefensiveEarth.java index cc3892b1..9b71bef4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefensiveEarth.java @@ -21,7 +21,7 @@ public class SelfDefensiveEarth extends SelfSpellEffect int pot = 2 * this.potencyUpgrades + 1; int duration = 20 * 60 * (this.powerUpgrades + 1); - player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, duration, pot)); + player.addPotionEffect(new PotionEffect(Potion.field_180152_w.id, duration, pot)); player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, duration, pot)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfOffensiveEarth.java index c43ed78b..fc3397d2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfOffensiveEarth.java @@ -1,13 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.BlockPos; +import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; public class SelfOffensiveEarth extends SelfSpellEffect { + public SelfOffensiveEarth(int power, int potency, int cost) { super(power, potency, cost); @@ -19,11 +20,7 @@ public class SelfOffensiveEarth extends SelfSpellEffect int horizRadius = this.powerUpgrades; int vertRadius = this.potencyUpgrades + 1; - Vec3 blockVec = SpellHelper.getEntityBlockVector(player); - - int posX = (int) (blockVec.xCoord); - int posY = (int) (blockVec.yCoord); - int posZ = (int) (blockVec.zCoord); + BlockPos pos = player.getPosition(); for (int i = -horizRadius; i <= horizRadius; i++) { @@ -31,9 +28,10 @@ public class SelfOffensiveEarth extends SelfSpellEffect { for (int k = -horizRadius; k <= horizRadius; k++) { + BlockPos newPos = pos.add(i, j, k); if (world.rand.nextFloat() < 0.7f) { - SpellHelper.smashBlock(world, posX + i, posY + j, posZ + k); + SpellHelper.smashBlock(world, newPos); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolEnvironmentalEarth.java index cd62fd34..e7a34b6b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolEnvironmentalEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolEnvironmentalEarth.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.DigAreaEffect; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.DigAreaEffect; public class ToolEnvironmentalEarth extends DigAreaEffect { @@ -23,13 +24,11 @@ public class ToolEnvironmentalEarth extends DigAreaEffect return 0; } - int x = blockPos.blockX; - int y = blockPos.blockY; - int z = blockPos.blockZ; - ForgeDirection sidehit = ForgeDirection.getOrientation(blockPos.sideHit); + BlockPos pos = blockPos.func_178782_a(); + EnumFacing sidehit = blockPos.field_178784_b; - int radius = this.powerUpgrades; - int depth = 2 * this.potencyUpgrades + 1; + int radius = 2; + int depth = 5; depth--; @@ -70,13 +69,14 @@ public class ToolEnvironmentalEarth extends DigAreaEffect default: } - for (int xPos = x - negX; xPos <= x + posX; xPos++) + for (int i = -negX; i <= posX; i++) { - for (int yPos = y - negY; yPos <= y + posY; yPos++) + for (int j = -negY; j <= posY; j++) { - for (int zPos = z - negZ; zPos <= z + posZ; zPos++) + for (int k = -negZ; k <= posZ; k++) { - this.breakBlock(container, world, player, blockHardness, xPos, yPos, zPos, itemTool); + BlockPos newPos = pos.add(i, j, k); + itemTool.onBlockStartBreak(container, newPos, player); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolOffensiveEarth.java index 7ad0c879..61130c47 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolOffensiveEarth.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; + import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.ItemManipulator; import net.minecraft.block.Block; import net.minecraft.init.Blocks; @@ -9,15 +10,18 @@ import net.minecraft.item.ItemStack; import java.util.LinkedList; import java.util.List; + public class ToolOffensiveEarth extends ItemManipulator { public static Block[] mundaneList = new Block[]{Blocks.stone, Blocks.cobblestone, Blocks.sand, Blocks.gravel, Blocks.netherrack, Blocks.dirt}; + public ToolOffensiveEarth(int power, int potency, int cost) { super(power, potency, cost); } + @Override public List<ItemStack> handleItemsOnBlockBroken(ItemStack toolStack, List<ItemStack> itemList) { @@ -25,7 +29,7 @@ public class ToolOffensiveEarth extends ItemManipulator for (ItemStack stack : itemList) { - if (stack != null && stack.getItem() instanceof ItemBlock && !this.isMundaneBlock(((ItemBlock) stack.getItem()).field_150939_a)) + if (stack != null && stack.getItem() instanceof ItemBlock && !this.isMundaneBlock(((ItemBlock) stack.getItem()).getBlock())) { newList.add(stack); } @@ -45,6 +49,7 @@ public class ToolOffensiveEarth extends ItemManipulator } } + return false; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeDefensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeDefensiveFire.java index 30ae1449..873c2998 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeDefensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeDefensiveFire.java @@ -1,12 +1,12 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.api.spell.MeleeSpellWorldEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; -import net.minecraft.util.Vec3; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.spell.MeleeSpellWorldEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class MeleeDefensiveFire extends MeleeSpellWorldEffect { @@ -18,19 +18,15 @@ public class MeleeDefensiveFire extends MeleeSpellWorldEffect @Override public void onWorldEffect(World world, EntityPlayer entityPlayer) { - ForgeDirection look = SpellHelper.getCompassDirectionForLookVector(entityPlayer.getLookVec()); + EnumFacing look = SpellHelper.getCompassDirectionForLookVector(entityPlayer.getLookVec()); int width = this.potencyUpgrades + 1; int length = 5 * this.powerUpgrades + 3; - int xOffset = look.offsetX; - int zOffset = look.offsetZ; + int xOffset = look.getFrontOffsetX(); + int zOffset = look.getFrontOffsetZ(); - Vec3 lookVec = SpellHelper.getEntityBlockVector(entityPlayer); - - int xStart = (int) (lookVec.xCoord) + 1 * xOffset; - int zStart = (int) (lookVec.zCoord) + 1 * zOffset; - int yStart = (int) (lookVec.yCoord) - 1; + BlockPos pos = entityPlayer.getPosition().add(look.getDirectionVec()); for (int i = -width; i <= width; i++) { @@ -38,9 +34,10 @@ public class MeleeDefensiveFire extends MeleeSpellWorldEffect { for (int k = 0; k < 3; k++) { - if (world.isAirBlock(xStart + i * (zOffset) + j * (xOffset), yStart + k, zStart + i * (xOffset) + j * (zOffset))) + BlockPos newPos = pos.add(i * (zOffset) + j * (xOffset), k, i * (xOffset) + j * (zOffset)); + if (world.isAirBlock(newPos)) { - world.setBlock(xStart + i * (zOffset) + j * (xOffset), yStart + k, zStart + i * (xOffset) + j * (zOffset), Blocks.fire); + world.setBlockState(newPos, Blocks.fire.getDefaultState()); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeEnvironmentalFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeEnvironmentalFire.java index 9ef25810..865b33c1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeEnvironmentalFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeEnvironmentalFire.java @@ -1,9 +1,10 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.BlockPos; +import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; public class MeleeEnvironmentalFire extends MeleeSpellCenteredWorldEffect { @@ -14,7 +15,7 @@ public class MeleeEnvironmentalFire extends MeleeSpellCenteredWorldEffect } @Override - public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ) + public void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos) { int radius = this.potencyUpgrades; @@ -24,7 +25,8 @@ public class MeleeEnvironmentalFire extends MeleeSpellCenteredWorldEffect { for (int k = -radius; k <= radius; k++) { - SpellHelper.evaporateWaterBlock(world, posX + i, posY + j, posZ + k); + BlockPos newPos = pos.add(i, j, k); + SpellHelper.evaporateWaterBlock(world, newPos); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefaultFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefaultFire.java index 0f1316a3..a9e6800d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefaultFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefaultFire.java @@ -1,12 +1,11 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; +import net.minecraft.util.BlockPos; import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; public class ProjectileDefaultFire extends ProjectileImpactEffect { @@ -18,11 +17,8 @@ public class ProjectileDefaultFire extends ProjectileImpactEffect @Override public void onEntityImpact(Entity mop, Entity proj) { - Vec3 blockVec = SpellHelper.getEntityBlockVector(mop); - - int x = (int) (blockVec.xCoord); - int y = (int) (blockVec.yCoord); - int z = (int) (blockVec.zCoord); + BlockPos pos = proj.getPosition(); + World world = mop.worldObj; int horizRange = 0; @@ -34,9 +30,11 @@ public class ProjectileDefaultFire extends ProjectileImpactEffect { for (int k = -horizRange; k <= horizRange; k++) { - if (world.isAirBlock(x + i, y + j, z + k)) + BlockPos newPos = pos.add(i, j, k); + + if (world.isAirBlock(newPos)) { - world.setBlock(x + i, y + j, z + k, Blocks.fire); + world.setBlockState(newPos, Blocks.fire.getDefaultState()); } } } @@ -46,10 +44,8 @@ public class ProjectileDefaultFire extends ProjectileImpactEffect @Override public void onTileImpact(World world, MovingObjectPosition mop) { - int x = mop.blockX; - int y = mop.blockY; - int z = mop.blockZ; - + BlockPos pos = mop.func_178782_a(); + int horizRange = 0; int vertRange = 0; @@ -59,9 +55,11 @@ public class ProjectileDefaultFire extends ProjectileImpactEffect { for (int k = -horizRange; k <= horizRange; k++) { - if (world.isAirBlock(x + i, y + j, z + k)) + BlockPos newPos = pos.add(i, j, k); + + if (world.isAirBlock(newPos)) { - world.setBlock(x + i, y + j, z + k, Blocks.fire); + world.setBlockState(newPos, Blocks.fire.getDefaultState()); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefensiveFire.java index ddaa2fcf..d727b1ac 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefensiveFire.java @@ -1,10 +1,11 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; +import net.minecraft.util.BlockPos; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class ProjectileDefensiveFire extends ProjectileImpactEffect { @@ -22,12 +23,10 @@ public class ProjectileDefensiveFire extends ProjectileImpactEffect @Override public void onTileImpact(World world, MovingObjectPosition mop) { - int horizRange = this.powerUpgrades; - int vertRange = this.powerUpgrades; + int horizRange = (int) ((this.powerUpgrades)); + int vertRange = (int) ((this.powerUpgrades)); - int posX = mop.blockX; - int posY = mop.blockY; - int posZ = mop.blockZ; + BlockPos pos = mop.func_178782_a(); for (int i = -horizRange; i <= horizRange; i++) { @@ -35,9 +34,11 @@ public class ProjectileDefensiveFire extends ProjectileImpactEffect { for (int k = -horizRange; k <= horizRange; k++) { - if (!world.isAirBlock(posX + i, posY + j, posZ + k)) + BlockPos newPos = pos.add(i, j, k); + + if (!world.isAirBlock(newPos)) { - SpellHelper.smeltBlockInWorld(world, posX + i, posY + j, posZ + k); + SpellHelper.smeltBlockInWorld(world, newPos); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileEnvironmentalFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileEnvironmentalFire.java index dea915b5..d4eb74d9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileEnvironmentalFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileEnvironmentalFire.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; +import net.minecraft.entity.Entity; +import net.minecraft.util.BlockPos; +import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.ProjectileUpdateEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.entity.Entity; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; public class ProjectileEnvironmentalFire extends ProjectileUpdateEffect { @@ -16,15 +16,11 @@ public class ProjectileEnvironmentalFire extends ProjectileUpdateEffect @Override public void onUpdateEffect(Entity projectile) { - Vec3 posVec = SpellHelper.getEntityBlockVector(projectile); + BlockPos pos = projectile.getPosition(); int horizRange = this.powerUpgrades + 1; int vertRange = (int) (0.5 * (this.powerUpgrades + 1)); - int posX = (int) (posVec.xCoord); - int posY = (int) (posVec.yCoord); - int posZ = (int) (posVec.zCoord); - World worldObj = projectile.worldObj; for (int i = -horizRange; i <= horizRange; i++) @@ -33,9 +29,11 @@ public class ProjectileEnvironmentalFire extends ProjectileUpdateEffect { for (int k = -horizRange; k <= horizRange; k++) { - if (!worldObj.isAirBlock(posX + i, posY + j, posZ + k)) + BlockPos newPos = pos.add(i, j, k); + + if (!worldObj.isAirBlock(newPos)) { - SpellHelper.evaporateWaterBlock(worldObj, posX + i, posY + j, posZ + k); + SpellHelper.evaporateWaterBlock(worldObj, newPos); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileOffensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileOffensiveFire.java index ed95e428..e3525364 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileOffensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileOffensiveFire.java @@ -1,12 +1,11 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; +import net.minecraft.util.BlockPos; import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; public class ProjectileOffensiveFire extends ProjectileImpactEffect { @@ -18,14 +17,10 @@ public class ProjectileOffensiveFire extends ProjectileImpactEffect @Override public void onEntityImpact(Entity mop, Entity proj) { - int horizRange = this.powerUpgrades; - int vertDepth = 3 * this.potencyUpgrades + 1; + int horizRange = (int) (this.powerUpgrades); + int vertDepth = (int) (3 * this.potencyUpgrades + 1); - Vec3 blockVector = SpellHelper.getEntityBlockVector(mop); - - int posX = (int) (blockVector.xCoord); - int posY = (int) (blockVector.yCoord); - int posZ = (int) (blockVector.zCoord); + BlockPos pos = proj.getPosition(); World world = mop.worldObj; @@ -35,9 +30,10 @@ public class ProjectileOffensiveFire extends ProjectileImpactEffect { for (int k = -horizRange; k <= horizRange; k++) { - if (world.isAirBlock(posX + i, posY + j, posZ + k)) + BlockPos newPos = pos.add(i, j, k); + if (world.isAirBlock(newPos)) { - world.setBlock(posX + i, posY + j, posZ + k, Blocks.flowing_lava, 7, 3); + world.setBlockState(newPos, Blocks.flowing_lava.getStateFromMeta(7)); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfDefensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfDefensiveFire.java index f0826849..4a10521d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfDefensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfDefensiveFire.java @@ -1,11 +1,10 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; -import net.minecraft.util.Vec3; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; public class SelfDefensiveFire extends SelfSpellEffect { @@ -18,14 +17,10 @@ public class SelfDefensiveFire extends SelfSpellEffect @Override public void onSelfUse(World world, EntityPlayer player) { - int horizRange = this.powerUpgrades; - int vertDepth = 3 * this.potencyUpgrades + 1; + int horizRange = (int) (this.powerUpgrades); + int vertDepth = (int) (3 * this.potencyUpgrades + 1); - Vec3 blockVector = SpellHelper.getEntityBlockVector(player); - - int posX = (int) (blockVector.xCoord); - int posY = (int) (blockVector.yCoord); - int posZ = (int) (blockVector.zCoord); + BlockPos pos = player.getPosition(); for (int i = -horizRange; i <= horizRange; i++) { @@ -33,9 +28,11 @@ public class SelfDefensiveFire extends SelfSpellEffect { for (int k = -horizRange; k <= horizRange; k++) { - if (world.isAirBlock(posX + i, posY + j, posZ + k)) + BlockPos newPos = pos.add(i, j, k); + + if (world.isAirBlock(newPos)) { - world.setBlock(posX + i, posY + j, posZ + k, Blocks.flowing_lava, 7, 3); + world.setBlockState(newPos, Blocks.flowing_lava.getStateFromMeta(7)); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfEnvironmentalFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfEnvironmentalFire.java index e933e17d..004548f8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfEnvironmentalFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfEnvironmentalFire.java @@ -1,10 +1,11 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class SelfEnvironmentalFire extends SelfSpellEffect { @@ -16,9 +17,7 @@ public class SelfEnvironmentalFire extends SelfSpellEffect @Override public void onSelfUse(World world, EntityPlayer player) { - int posX = (int) Math.round(player.posX - 0.5f); - int posY = (int) player.posY; - int posZ = (int) Math.round(player.posZ - 0.5f); + BlockPos pos = player.getPosition(); int powRadius = this.powerUpgrades; int potRadius = this.potencyUpgrades - 1; @@ -29,9 +28,11 @@ public class SelfEnvironmentalFire extends SelfSpellEffect { for (int k = -powRadius; k <= powRadius; k++) { - if (world.isAirBlock(posX + i, posY + j, posZ + k)) + BlockPos newPos = pos.add(i, j, k); + + if (world.isAirBlock(newPos)) { - world.setBlock(posX + i, posY + j, posZ + k, Blocks.fire); + world.setBlockState(newPos, Blocks.fire.getDefaultState()); } } @@ -44,9 +45,11 @@ public class SelfEnvironmentalFire extends SelfSpellEffect { for (int k = -potRadius; k <= potRadius; k++) { - if (!world.isAirBlock(posX + i, posY + j, posZ + k)) + BlockPos newPos = pos.add(i, j, k); + + if (!world.isAirBlock(newPos)) { - SpellHelper.smeltBlockInWorld(world, posX + i, posY + j, posZ + k); + SpellHelper.smeltBlockInWorld(world, newPos); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolDefaultFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolDefaultFire.java index c6d7478b..fbae06d1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolDefaultFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolDefaultFire.java @@ -20,7 +20,7 @@ public class ToolDefaultFire extends ItemManipulator LinkedList<ItemStack> newList = new LinkedList(); for (ItemStack item : itemList) { - ItemStack newItem = FurnaceRecipes.smelting().getSmeltingResult(item); + ItemStack newItem = FurnaceRecipes.instance().getSmeltingResult(item); if (newItem != null) { newList.add(newItem); @@ -32,5 +32,4 @@ public class ToolDefaultFire extends ItemManipulator return newList; } - } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolEnvironmentalFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolEnvironmentalFire.java index 518ccc2d..68d1dd9c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolEnvironmentalFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolEnvironmentalFire.java @@ -1,14 +1,16 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.OnBreakBlockEffect; +import java.util.Random; + import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -import java.util.Random; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.OnBreakBlockEffect; public class ToolEnvironmentalFire extends OnBreakBlockEffect { @@ -18,7 +20,7 @@ public class ToolEnvironmentalFire extends OnBreakBlockEffect } @Override - public int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, int meta, int x, int y, int z, ForgeDirection sideBroken) + public int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, IBlockState state, BlockPos pos, EnumFacing sideBroken) { int amount = 0; int cost = (int) (250 * (1 - 0.1f * powerUpgrades) * Math.pow(0.85, costUpgrades)); @@ -31,11 +33,13 @@ public class ToolEnvironmentalFire extends OnBreakBlockEffect { for (int k = -radius; k <= radius; k++) { - Block blockAffected = world.getBlock(x + i - sideBroken.offsetX, y + j, z + k - sideBroken.offsetZ); + BlockPos newPos = pos.add(i - sideBroken.getFrontOffsetX(), j, k - sideBroken.getFrontOffsetZ()); + IBlockState newState = world.getBlockState(newPos); + Block blockAffected = newState.getBlock(); if ((new Random().nextFloat() <= chance) && (blockAffected == Blocks.gravel || blockAffected == Blocks.stone || blockAffected == Blocks.cobblestone)) { - world.setBlock(x + i - sideBroken.offsetX, y + j, z + k - sideBroken.offsetZ, Blocks.lava); + world.setBlockState(newPos, Blocks.lava.getDefaultState()); amount += cost; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefaultIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefaultIce.java index cd546753..b375331a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefaultIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefaultIce.java @@ -7,6 +7,7 @@ import net.minecraft.world.World; public class MeleeDefaultIce extends ExtrapolatedMeleeEntityEffect { + public MeleeDefaultIce(int power, int potency, int cost) { super(power, potency, cost); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefensiveIce.java index 0eb02f85..a581cf56 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefensiveIce.java @@ -1,12 +1,12 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import WayofTime.alchemicalWizardry.api.spell.MeleeSpellWorldEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; -import net.minecraft.util.Vec3; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.spell.MeleeSpellWorldEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class MeleeDefensiveIce extends MeleeSpellWorldEffect { @@ -18,29 +18,30 @@ public class MeleeDefensiveIce extends MeleeSpellWorldEffect @Override public void onWorldEffect(World world, EntityPlayer entityPlayer) { - ForgeDirection look = SpellHelper.getCompassDirectionForLookVector(entityPlayer.getLookVec()); + EnumFacing look = SpellHelper.getCompassDirectionForLookVector(entityPlayer.getLookVec()); int width = this.powerUpgrades; int height = this.powerUpgrades + 2; - int xOffset = look.offsetX; - int zOffset = look.offsetZ; + int xOffset = look.getFrontOffsetX(); + int zOffset = look.getFrontOffsetZ(); int range = this.potencyUpgrades + 1; - Vec3 lookVec = SpellHelper.getEntityBlockVector(entityPlayer); + BlockPos pos = entityPlayer.getPosition(); - int xStart = (int) (lookVec.xCoord) + range * xOffset; - int zStart = (int) (lookVec.zCoord) + range * zOffset; - int yStart = (int) (lookVec.yCoord); + int xStart = pos.getX() + range * xOffset; + int zStart = pos.getZ() + range * zOffset; + int yStart = pos.getY(); for (int i = -width; i <= width; i++) { for (int j = 0; j < height; j++) { - if (world.isAirBlock(xStart + i * (zOffset), yStart + j, zStart + i * (xOffset))) + BlockPos newPos = new BlockPos(xStart + i * (zOffset), yStart + j, zStart + i * (xOffset)); + if (world.isAirBlock(newPos)) { - world.setBlock(xStart + i * (zOffset), yStart + j, zStart + i * (xOffset), Blocks.ice); + world.setBlockState(newPos, Blocks.ice.getDefaultState()); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeOffensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeOffensiveIce.java index 3245ba16..c8e99587 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeOffensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeOffensiveIce.java @@ -1,12 +1,11 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; -import net.minecraft.util.Vec3; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; public class MeleeOffensiveIce extends ExtrapolatedMeleeEntityEffect { @@ -21,19 +20,19 @@ public class MeleeOffensiveIce extends ExtrapolatedMeleeEntityEffect @Override protected boolean entityEffect(World world, Entity entity, EntityPlayer entityPlayer) { - Vec3 blockVector = SpellHelper.getEntityBlockVector(entity); + BlockPos pos = entityPlayer.getPosition(); - int posX = (int) (blockVector.xCoord); - int posY = (int) (blockVector.yCoord); - int posZ = (int) (blockVector.zCoord); - entity.motionY = 1 * (0.3 * this.powerUpgrades + 0.90); + double yVel = 1 * (0.3 * this.powerUpgrades + 0.90); + + entity.motionY = yVel; for (int i = 0; i < 2; i++) { - if (world.isAirBlock(posX, posY + i, posZ)) + BlockPos newPos = pos.offsetUp(i); + if (world.isAirBlock(newPos)) { - world.setBlock(posX, posY + i, posZ, Blocks.ice); + world.setBlockState(newPos, Blocks.ice.getDefaultState()); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefaultIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefaultIce.java index 1f4c7831..cf730254 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefaultIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefaultIce.java @@ -1,11 +1,12 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; public class ProjectileDefaultIce extends ProjectileImpactEffect { @@ -17,21 +18,21 @@ public class ProjectileDefaultIce extends ProjectileImpactEffect @Override public void onEntityImpact(Entity mop, Entity proj) { - + return; } @Override public void onTileImpact(World world, MovingObjectPosition mop) { - ForgeDirection sideHit = ForgeDirection.getOrientation(mop.sideHit); + int horizRadius = this.powerUpgrades + 1; + int vertRadius = this.potencyUpgrades; - int posX = mop.blockX + sideHit.offsetX; - int posY = mop.blockY + sideHit.offsetY; - int posZ = mop.blockZ + sideHit.offsetZ; + EnumFacing sideHit = mop.field_178784_b; - if (world.isAirBlock(posX, posY, posZ)) + BlockPos newPos = mop.func_178782_a().add(sideHit.getDirectionVec()); + if (world.isAirBlock(newPos)) { - world.setBlock(posX, posY, posZ, Blocks.ice); + world.setBlockState(newPos, Blocks.ice.getDefaultState()); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefensiveIce.java index 655439e3..5c51fe35 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefensiveIce.java @@ -4,6 +4,7 @@ import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; +import net.minecraft.util.BlockPos; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -17,7 +18,7 @@ public class ProjectileDefensiveIce extends ProjectileImpactEffect @Override public void onEntityImpact(Entity mop, Entity proj) { - + return; } @Override @@ -25,10 +26,8 @@ public class ProjectileDefensiveIce extends ProjectileImpactEffect { int horizRadius = this.powerUpgrades + 1; int vertRadius = this.potencyUpgrades; - - int posX = mop.blockX; - int posY = mop.blockY; - int posZ = mop.blockZ; + + BlockPos pos = mop.func_178782_a(); for (int i = -horizRadius; i <= horizRadius; i++) { @@ -36,11 +35,12 @@ public class ProjectileDefensiveIce extends ProjectileImpactEffect { for (int j = -vertRadius; j <= vertRadius; j++) { - SpellHelper.freezeWaterBlock(world, posX + i, posY + j, posZ + k); + BlockPos newPos = pos.add(i, j, k); + SpellHelper.freezeWaterBlock(world, newPos); - if (world.isAirBlock(posX + i, posY + j, posZ + k) && !world.isAirBlock(posX + i, posY + j - 1, posZ + k)) + if (world.isAirBlock(newPos) && !world.isAirBlock(newPos.offsetDown())) { - world.setBlock(posX + i, posY + j, posZ + k, Blocks.snow); + world.setBlockState(newPos, Blocks.snow.getDefaultState()); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileEnvironmentalIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileEnvironmentalIce.java index ad7a3ab6..1b689f0b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileEnvironmentalIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileEnvironmentalIce.java @@ -1,9 +1,9 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; +import net.minecraft.entity.Entity; +import net.minecraft.util.BlockPos; import WayofTime.alchemicalWizardry.api.spell.ProjectileUpdateEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.entity.Entity; -import net.minecraft.util.Vec3; public class ProjectileEnvironmentalIce extends ProjectileUpdateEffect { @@ -16,22 +16,18 @@ public class ProjectileEnvironmentalIce extends ProjectileUpdateEffect @Override public void onUpdateEffect(Entity projectile) { - Vec3 posVec = SpellHelper.getEntityBlockVector(projectile); - + BlockPos pos = projectile.getPosition(); + int horizRange = this.powerUpgrades + 1; int vertRange = this.potencyUpgrades + 1; - int posX = (int) (posVec.xCoord); - int posY = (int) (posVec.yCoord); - int posZ = (int) (posVec.zCoord); - for (int i = -horizRange; i <= horizRange; i++) { for (int j = -vertRange; j <= vertRange; j++) { for (int k = -horizRange; k <= horizRange; k++) { - SpellHelper.freezeWaterBlock(projectile.worldObj, posX + i, posY + j, posZ + k); + SpellHelper.freezeWaterBlock(projectile.worldObj, pos.add(i, j, k)); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileOffensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileOffensiveIce.java index ce770091..97d47967 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileOffensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileOffensiveIce.java @@ -27,6 +27,6 @@ public class ProjectileOffensiveIce extends ProjectileImpactEffect @Override public void onTileImpact(World world, MovingObjectPosition mop) { - + return; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfDefaultIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfDefaultIce.java index 8361a4f0..7861cc43 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfDefaultIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfDefaultIce.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; -import net.minecraft.util.Vec3; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class SelfDefaultIce extends SelfSpellEffect { @@ -17,20 +17,17 @@ public class SelfDefaultIce extends SelfSpellEffect @Override public void onSelfUse(World world, EntityPlayer player) { - Vec3 blockVector = SpellHelper.getEntityBlockVector(player); - - int posX = (int) (blockVector.xCoord); - int posY = (int) (blockVector.yCoord); - int posZ = (int) (blockVector.zCoord); + BlockPos pos = player.getPosition(); double yVel = 1 * (0.4 * this.powerUpgrades + 0.75); SpellHelper.setPlayerSpeedFromServer(player, player.motionX, yVel, player.motionZ); for (int i = 0; i < 2; i++) { - if (world.isAirBlock(posX, posY + i, posZ)) + BlockPos newPos = pos.add(0, i, 0); + if (world.isAirBlock(newPos)) { - world.setBlock(posX, posY + i, posZ, Blocks.ice); + world.setBlockState(newPos, Blocks.ice.getDefaultState()); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfEnvironmentalIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfEnvironmentalIce.java index 871fbc0a..2e73b07e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfEnvironmentalIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfEnvironmentalIce.java @@ -1,12 +1,12 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; -import net.minecraft.util.Vec3; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class SelfEnvironmentalIce extends SelfSpellEffect { @@ -18,27 +18,24 @@ public class SelfEnvironmentalIce extends SelfSpellEffect @Override public void onSelfUse(World world, EntityPlayer player) { - ForgeDirection look = SpellHelper.getCompassDirectionForLookVector(player.getLookVec()); + EnumFacing look = SpellHelper.getCompassDirectionForLookVector(player.getLookVec()); int width = this.potencyUpgrades + 1; int length = 5 * this.powerUpgrades + 3; - int xOffset = look.offsetX; - int zOffset = look.offsetZ; + int xOffset = look.getFrontOffsetX(); + int zOffset = look.getFrontOffsetZ(); - Vec3 lookVec = SpellHelper.getEntityBlockVector(player); - - int xStart = (int) (lookVec.xCoord); - int zStart = (int) (lookVec.zCoord); - int yStart = (int) (lookVec.yCoord) - 1; + BlockPos pos = player.getPosition(); for (int i = -width; i <= width; i++) { for (int j = 0; j < length; j++) { - if (world.isAirBlock(xStart + i * (zOffset) + j * (xOffset), yStart, zStart + i * (xOffset) + j * (zOffset))) + BlockPos newPos = pos.add(i * (zOffset) + j * (xOffset), 0, i * (xOffset) + j * (zOffset)); + if (world.isAirBlock(newPos)) { - world.setBlock(xStart + i * (zOffset) + j * (xOffset), yStart, zStart + i * (xOffset) + j * (zOffset), Blocks.ice); + world.setBlockState(newPos, Blocks.ice.getDefaultState()); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefaultIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefaultIce.java index a4aa47e7..e9eeb811 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefaultIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefaultIce.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; + import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.LeftClickEffect; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; + public class ToolDefaultIce extends LeftClickEffect { public ToolDefaultIce(int power, int potency, int cost) @@ -13,13 +15,16 @@ public class ToolDefaultIce extends LeftClickEffect super(power, potency, cost); } + @Override public int onLeftClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder) { int duration = 200; + attacked.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, duration, this.powerUpgrades)); + return 0; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefensiveIce.java index 37070d7c..7c4edbfe 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefensiveIce.java @@ -1,18 +1,18 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.SummonToolEffect; +import java.util.List; + import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.Vec3; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -import java.util.List; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.SummonToolEffect; public class ToolDefensiveIce extends SummonToolEffect { @@ -36,22 +36,19 @@ public class ToolDefensiveIce extends SummonToolEffect } } - Vec3 blockVec = SpellHelper.getEntityBlockVector(entity); + BlockPos pos = entity.getPosition(); - int x = (int) (blockVec.xCoord); - int y = (int) (blockVec.yCoord); - int z = (int) (blockVec.zCoord); - - for (int posX = x - horizRadius; posX <= x + horizRadius; posX++) + for (int x = -horizRadius; x <= horizRadius; x++) { - for (int posY = y - vertRadius; posY <= y + vertRadius; posY++) + for (int y = -vertRadius; y <= vertRadius; y++) { - for (int posZ = z - horizRadius; posZ <= z + horizRadius; posZ++) + for (int z = -horizRadius; z <= horizRadius; z++) { - SpellHelper.freezeWaterBlock(world, posX, posY, posZ); - if (world.isSideSolid(posX, posY, posZ, ForgeDirection.UP) && world.isAirBlock(posX, posY + 1, posZ)) + BlockPos newPos = pos.add(x, y, z); + SpellHelper.freezeWaterBlock(world, newPos); + if (world.isSideSolid(newPos, EnumFacing.UP) && world.isAirBlock(newPos.offsetUp())) { - world.setBlock(posX, posY + 1, posZ, Blocks.snow_layer); + world.setBlockState(newPos.offsetUp(), Blocks.snow_layer.getDefaultState()); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaEffect.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaEffect.java index eac176c4..39f11169 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaEffect.java @@ -1,17 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool; -import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; -import WayofTime.alchemicalWizardry.api.spell.IDigAreaEffect; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -import java.util.List; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; +import WayofTime.alchemicalWizardry.api.spell.IDigAreaEffect; public class DigAreaEffect implements IDigAreaEffect { @@ -34,9 +31,10 @@ public class DigAreaEffect implements IDigAreaEffect return 0; } - int x = blockPos.blockX; - int y = blockPos.blockY; - int z = blockPos.blockZ; + int x = blockPos.func_178782_a().getX(); //BlockPos + int y = blockPos.func_178782_a().getY(); + int z = blockPos.func_178782_a().getZ(); + EnumFacing sidehit = blockPos.field_178784_b; for (int xPos = x - 1; xPos <= x + 1; xPos++) { @@ -44,85 +42,15 @@ public class DigAreaEffect implements IDigAreaEffect { for (int zPos = z - 1; zPos <= z + 1; zPos++) { - this.breakBlock(container, world, player, blockHardness, xPos, yPos, zPos, itemTool); + BlockPos newPos = new BlockPos(xPos, yPos, zPos); + ModItems.customTool.onBlockStartBreak(container, newPos, player); } } } return 0; } - - public void breakBlock(ItemStack container, World world, EntityPlayer player, float blockHardness, int x, int y, int z, ItemSpellMultiTool itemTool) - { - int hlvl = -1; - Block localBlock = world.getBlock(x, y, z); - int localMeta = world.getBlockMetadata(x, y, z); - String toolClass = localBlock.getHarvestTool(localMeta); - if (toolClass != null && itemTool.getHarvestLevel(container, toolClass) != -1) - hlvl = localBlock.getHarvestLevel(localMeta); - int toolLevel = itemTool.getHarvestLevel(container, toolClass); - - float localHardness = localBlock == null ? Float.MAX_VALUE : localBlock.getBlockHardness(world, x, y, z); - - if (hlvl <= toolLevel && localHardness - this.getHardnessDifference() <= blockHardness) - { - boolean cancelHarvest = false; - - if (!cancelHarvest) - { - if (localBlock != null && !(localHardness < 0)) - { - boolean isEffective = false; - - String localToolClass = itemTool.getToolClassForMaterial(localBlock.getMaterial()); - - if (localToolClass != null && itemTool.getHarvestLevel(container, toolClass) >= localBlock.getHarvestLevel(localMeta)) - { - isEffective = true; - } - - if (localBlock.getMaterial().isToolNotRequired()) - { - isEffective = true; - } - - if (!player.capabilities.isCreativeMode) - { - if (isEffective) - { - if (localBlock.removedByPlayer(world, player, x, y, z)) - { - localBlock.onBlockDestroyedByPlayer(world, x, y, z, localMeta); - } - localBlock.onBlockHarvested(world, x, y, z, localMeta, player); - if (localHardness > 0f) - itemTool.onBlockDestroyed(container, world, localBlock, x, y, z, player); - - List<ItemStack> items = SpellHelper.getItemsFromBlock(world, localBlock, x, y, z, localMeta, itemTool.getSilkTouch(container), itemTool.getFortuneLevel(container)); - - SpellParadigmTool parad = itemTool.loadParadigmFromStack(container); - items = parad.handleItemList(container, items); - - if (!world.isRemote) - { - SpellHelper.spawnItemListInWorld(items, world, x + 0.5f, y + 0.5f, z + 0.5f); - } - - world.func_147479_m(x, y, z); - } else - { - } - - } else - { - world.setBlockToAir(x, y, z); - world.func_147479_m(x, y, z); - } - } - } - } - } - + public float getHardnessDifference() { return 1.5f; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaTunnel.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaTunnel.java index ce304d09..a946d755 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaTunnel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaTunnel.java @@ -6,13 +6,14 @@ import java.util.Random; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class DigAreaTunnel extends DigAreaEffect { @@ -33,19 +34,17 @@ public class DigAreaTunnel extends DigAreaEffect List<Vec3> vectorLine = new LinkedList(); - double initialX = blockPos.blockX; - double initialY = blockPos.blockY; - double initialZ = blockPos.blockZ; - ForgeDirection sidehit = ForgeDirection.getOrientation(blockPos.sideHit); - ForgeDirection opposite = sidehit.getOpposite(); - - AlchemicalWizardry.logger.info(opposite.toString()); + double initialX = blockPos.func_178782_a().getX(); + double initialY = blockPos.func_178782_a().getY(); + double initialZ = blockPos.func_178782_a().getZ(); + EnumFacing sidehit = blockPos.field_178784_b; + EnumFacing opposite = sidehit.getOpposite(); double initialLength = this.getRandomVectorLength(); - Vec3 initialVector = SpellHelper.createVec3(opposite.offsetX * initialLength, opposite.offsetY * initialLength, opposite.offsetZ * initialLength); + Vec3 initialVector = new Vec3(opposite.getFrontOffsetX() * initialLength, opposite.getFrontOffsetY() * initialLength, opposite.getFrontOffsetZ() * initialLength); - Vec3 lastVec = SpellHelper.createVec3(initialVector.xCoord, initialVector.yCoord, initialVector.zCoord); + Vec3 lastVec = new Vec3(initialVector.xCoord, initialVector.yCoord, initialVector.zCoord); vectorLine.add(initialVector); double currentLength = lastVec.lengthVector(); @@ -65,9 +64,7 @@ public class DigAreaTunnel extends DigAreaEffect double length = Math.min(this.getRandomVectorLength(), totalLength - currentLength); - tempVec.xCoord = tempVec.xCoord * length; - tempVec.yCoord = tempVec.yCoord * length; - tempVec.zCoord = tempVec.zCoord * length; + tempVec = new Vec3(tempVec.xCoord * length, tempVec.yCoord * length, tempVec.zCoord * length); vectorLine.add(tempVec); @@ -122,6 +119,7 @@ public class DigAreaTunnel extends DigAreaEffect public void destroySphereOfMundane(World world, double x, double y, double z, int radius) { + BlockPos pos = new BlockPos(MathHelper.floor_double(x), MathHelper.floor_double(y), MathHelper.floor_double(z)); for (int i = -radius; i <= radius; i++) { for (int j = -radius; j <= radius; j++) @@ -133,29 +131,27 @@ public class DigAreaTunnel extends DigAreaEffect continue; } - int newX = (int) (i + x + 0.5); - int newY = (int) (j + y + 0.5); - int newZ = (int) (k + z + 0.5); + BlockPos newPos = pos.add(i, j, k); - this.destroyMunadeAt(world, newX, newY, newZ); + this.destroyMunadeAt(world, newPos); } } } } - public void destroyMunadeAt(World world, int x, int y, int z) + public void destroyMunadeAt(World world, BlockPos pos) { - world.setBlockToAir(x, y, z); + world.setBlockToAir(pos); } public void travelVector(Vec3 vector, World world, double x, double y, double z) { double vecLength = vector.lengthVector(); AlchemicalWizardry.logger.info(vecLength); - Vec3 normVec = SpellHelper.createVec3(vector.xCoord, vector.yCoord, vector.zCoord); + Vec3 normVec = new Vec3(vector.xCoord, vector.yCoord, vector.zCoord); normVec = normVec.normalize(); - Vec3 prevVec = SpellHelper.createVec3(0, 0, 0); + Vec3 prevVec = new Vec3(0, 0, 0); double distanceTravelled = 0; while (distanceTravelled < vecLength) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/RightClickTunnel.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/RightClickTunnel.java index 6d53b912..8051d264 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/RightClickTunnel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/RightClickTunnel.java @@ -6,11 +6,12 @@ import java.util.Random; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class RightClickTunnel extends RightClickEffect { @@ -35,17 +36,17 @@ public class RightClickTunnel extends RightClickEffect List<Vec3> vectorLine = new LinkedList(); - double initialX = mop.blockX; - double initialY = mop.blockY; - double initialZ = mop.blockZ; - ForgeDirection sidehit = ForgeDirection.getOrientation(mop.sideHit); - ForgeDirection opposite = sidehit.getOpposite(); + double initialX = mop.func_178782_a().getX(); + double initialY = mop.func_178782_a().getY(); + double initialZ = mop.func_178782_a().getZ(); + EnumFacing sidehit = mop.field_178784_b; + EnumFacing opposite = sidehit.getOpposite(); double initialLength = this.getRandomVectorLength(); - Vec3 initialVector = SpellHelper.createVec3(opposite.offsetX * initialLength, opposite.offsetY * initialLength, opposite.offsetZ * initialLength); + Vec3 initialVector = new Vec3(opposite.getFrontOffsetX() * initialLength, opposite.getFrontOffsetY() * initialLength, opposite.getFrontOffsetZ() * initialLength); - Vec3 lastVec = SpellHelper.createVec3(initialVector.xCoord, initialVector.yCoord, initialVector.zCoord); + Vec3 lastVec = new Vec3(initialVector.xCoord, initialVector.yCoord, initialVector.zCoord); vectorLine.add(initialVector); double currentLength = lastVec.lengthVector(); @@ -64,10 +65,8 @@ public class RightClickTunnel extends RightClickEffect tempVec = tempVec.normalize(); double length = Math.min(this.getRandomVectorLength(), totalLength - currentLength); - - tempVec.xCoord = tempVec.xCoord * length; - tempVec.yCoord = tempVec.yCoord * length; - tempVec.zCoord = tempVec.zCoord * length; + + tempVec = new Vec3(tempVec.xCoord * length, tempVec.yCoord * length, tempVec.zCoord * length); vectorLine.add(tempVec); @@ -128,6 +127,7 @@ public class RightClickTunnel extends RightClickEffect public void destroySphereOfMundane(World world, double x, double y, double z, int radius) { + BlockPos pos = new BlockPos(MathHelper.floor_double(x), MathHelper.floor_double(y), MathHelper.floor_double(z)); for (int i = -radius; i <= radius; i++) { for (int j = -radius; j <= radius; j++) @@ -139,29 +139,27 @@ public class RightClickTunnel extends RightClickEffect continue; } - int newX = (int) (i + x + 0.5); - int newY = (int) (j + y + 0.5); - int newZ = (int) (k + z + 0.5); + BlockPos newPos = pos.add(i, j, k); - this.destroyMunadeAt(world, newX, newY, newZ); + this.destroyMunadeAt(world, newPos); } } } } - public void destroyMunadeAt(World world, int x, int y, int z) + public void destroyMunadeAt(World world, BlockPos pos) { - world.setBlockToAir(x, y, z); + world.setBlockToAir(pos); } public void travelVector(Vec3 vector, World world, double x, double y, double z) { double vecLength = vector.lengthVector(); - Vec3 normVec = SpellHelper.createVec3(vector.xCoord, vector.yCoord, vector.zCoord); + Vec3 normVec = new Vec3(vector.xCoord, vector.yCoord, vector.zCoord); normVec = normVec.normalize(); - Vec3 prevVec = SpellHelper.createVec3(0, 0, 0); + Vec3 prevVec = new Vec3(0, 0, 0); double distanceTravelled = 0; while (distanceTravelled < vecLength) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeEnvironmentalWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeEnvironmentalWind.java index ddd90274..36d9c5c6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeEnvironmentalWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeEnvironmentalWind.java @@ -1,13 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; -import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import java.util.List; + import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; - -import java.util.List; +import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class MeleeEnvironmentalWind extends MeleeSpellCenteredWorldEffect { @@ -18,18 +19,18 @@ public class MeleeEnvironmentalWind extends MeleeSpellCenteredWorldEffect } @Override - public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ) + public void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos) { int radius = 5 * this.potencyUpgrades + 3; - List<Entity> entities = SpellHelper.getEntitiesInRange(world, posX, posY, posZ, radius, radius); + List<Entity> entities = SpellHelper.getEntitiesInRange(world, pos.getX(), pos.getY(), pos.getZ(), radius, radius); for (Entity entity : entities) { if (entity instanceof EntityItem) { - ((EntityItem) entity).delayBeforeCanPickup = 0; - entity.onCollideWithPlayer(player); + ((EntityItem) entity).setPickupDelay(0); + entity.onCollideWithPlayer((EntityPlayer) player); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileDefaultWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileDefaultWind.java index 111028dd..862b7193 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileDefaultWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileDefaultWind.java @@ -15,13 +15,16 @@ public class ProjectileDefaultWind extends ProjectileImpactEffect @Override public void onEntityImpact(Entity mop, Entity proj) { + float wantedYVel = (float) ((0.5) * (0.5 * this.potencyUpgrades + 1)); + mop.motionX = proj.motionX; + mop.motionY = mop.motionY += wantedYVel; mop.motionZ = proj.motionZ; } @Override public void onTileImpact(World world, MovingObjectPosition mop) { - + return; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileEnvironmentalWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileEnvironmentalWind.java index e9d53d3d..a647f34c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileEnvironmentalWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileEnvironmentalWind.java @@ -1,14 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; -import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; -import WayofTime.alchemicalWizardry.api.spell.ProjectileUpdateEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import java.util.List; + import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; - -import java.util.List; +import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; +import WayofTime.alchemicalWizardry.api.spell.ProjectileUpdateEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class ProjectileEnvironmentalWind extends ProjectileUpdateEffect { @@ -37,14 +37,12 @@ public class ProjectileEnvironmentalWind extends ProjectileUpdateEffect { if (entity instanceof EntityItem) { - ((EntityItem) entity).delayBeforeCanPickup = 0; + ((EntityItem) entity).setPickupDelay(0); entity.onCollideWithPlayer((EntityPlayer) shooter); } } } } } - - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileOffensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileOffensiveWind.java index 691f8cdd..35f1aaf4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileOffensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileOffensiveWind.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.potion.PotionEffect; import net.minecraft.util.MovingObjectPosition; @@ -11,6 +10,7 @@ import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; public class ProjectileOffensiveWind extends ProjectileImpactEffect { + public ProjectileOffensiveWind(int power, int potency, int cost) { super(power, potency, cost); @@ -21,13 +21,13 @@ public class ProjectileOffensiveWind extends ProjectileImpactEffect { if (mop instanceof EntityLivingBase) { - ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, (100 * (2 * this.powerUpgrades + 1) * (1 / (this.potencyUpgrades + 1))), this.potencyUpgrades)); + ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, (int) (100 * (2 * this.powerUpgrades + 1) * (1 / (this.potencyUpgrades + 1))), this.potencyUpgrades)); } } @Override public void onTileImpact(World world, MovingObjectPosition mop) { - + return; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolDefensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolDefensiveWind.java index 261209b5..15745deb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolDefensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolDefensiveWind.java @@ -7,6 +7,7 @@ import net.minecraft.util.Vec3; public class ToolDefensiveWind extends LeftClickEffect { + public ToolDefensiveWind(int power, int potency, int cost) { super(power, potency, cost); @@ -16,8 +17,8 @@ public class ToolDefensiveWind extends LeftClickEffect public int onLeftClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder) { Vec3 vec = weilder.getLookVec(); - vec.yCoord = 0; - vec.normalize(); + vec = vec.subtract(0, vec.yCoord, 0); + vec = vec.normalize(); float velocity = 0.5f * (1 + this.powerUpgrades * 0.8f); float ratio = 0.1f + 0.3f * this.potencyUpgrades; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolEnvironmentalWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolEnvironmentalWind.java index b325fc36..7a1d461a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolEnvironmentalWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolEnvironmentalWind.java @@ -1,15 +1,17 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.OnBreakBlockEffect; +import java.util.List; + import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -import java.util.List; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.OnBreakBlockEffect; public class ToolEnvironmentalWind extends OnBreakBlockEffect { @@ -19,21 +21,23 @@ public class ToolEnvironmentalWind extends OnBreakBlockEffect } @Override - public int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, int meta, int x, int y, int z, ForgeDirection sideBroken) + public int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, IBlockState state, BlockPos pos, EnumFacing sideBroken) { double vertRange = 0.5 + (this.powerUpgrades * this.powerUpgrades + this.powerUpgrades) / 2; + double horizRange = vertRange; - List<EntityItem> itemList = SpellHelper.getItemsInRange(world, x + 0.5f, y + 0.5f, z + 0.5f, vertRange, vertRange); + List<EntityItem> itemList = SpellHelper.getItemsInRange(world, pos.getX() + 0.5f, pos.getY() + 0.5f, pos.getZ() + 0.5f, horizRange, vertRange); for (EntityItem entity : itemList) { if (!world.isRemote) { - entity.delayBeforeCanPickup = 0; + entity.setPickupDelay(0); entity.onCollideWithPlayer(player); } } return 0; } + } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolOffensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolOffensiveWind.java index df508e7d..07be3f79 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolOffensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolOffensiveWind.java @@ -16,7 +16,7 @@ public class ToolOffensiveWind extends LeftClickEffect @Override public int onLeftClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder) { - attacked.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, (100 * (2 * this.powerUpgrades + 1) * (1 / (this.potencyUpgrades + 1))), this.potencyUpgrades)); + attacked.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, (int) (100 * (2 * this.powerUpgrades + 1) * (1 / (this.potencyUpgrades + 1))), this.potencyUpgrades)); return (int) (100 * (0.5 * this.potencyUpgrades + 1) * (this.powerUpgrades + 1) * Math.pow(0.85, costUpgrades)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellComponent.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellComponent.java index d4b7e0bb..41cfcaab 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellComponent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellComponent.java @@ -6,6 +6,7 @@ public class HomSpellComponent { public HomSpell spell; public ItemStack item; + public int blockID; public HomSpellComponent(ItemStack item, HomSpell spell) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/ISimpleSpell.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/ISimpleSpell.java index 01c70978..77a8799d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/ISimpleSpell.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/ISimpleSpell.java @@ -6,11 +6,11 @@ import net.minecraft.world.World; public interface ISimpleSpell { - ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); + public abstract ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); - ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); + public abstract ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); - ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); + public abstract ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); - ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); + public abstract ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java index 94d6bf35..5a984a87 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java @@ -1,15 +1,17 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.block.Block; +import java.util.Random; + +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; - -import java.util.Random; +import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class SpellEarthBender extends HomSpell { @@ -22,133 +24,132 @@ public class SpellEarthBender extends HomSpell } @Override - public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + public ItemStack onOffensiveRangedRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { - return par1ItemStack; + return stack; } - if (!par3EntityPlayer.capabilities.isCreativeMode) + if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveRangedEnergy()); } - par2World.spawnEntityInWorld(new MudProjectile(par2World, par3EntityPlayer, 8, false)); - par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - return par1ItemStack; + world.spawnEntityInWorld(new MudProjectile(world, player, 8, false)); + world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); + return stack; } @Override - public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + public ItemStack onOffensiveMeleeRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { - return par1ItemStack; + return stack; } - if (!par3EntityPlayer.capabilities.isCreativeMode) + if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveMeleeEnergy()); } - if (!par2World.isRemote) + if (!world.isRemote) { for (int i = -1; i <= 1; i++) { for (int j = -1; j <= 1; j++) { - par2World.spawnEntityInWorld(new MudProjectile(par2World, par3EntityPlayer, 3, 3, par3EntityPlayer.posX, par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight(), par3EntityPlayer.posZ, par3EntityPlayer.rotationYaw + i * 10F, par3EntityPlayer.rotationPitch + j * 5F, true)); + world.spawnEntityInWorld(new MudProjectile(world, player, 3, 3, player.posX, player.posY + player.getEyeHeight(), player.posZ, player.rotationYaw + i * 10F, player.rotationPitch + j * 5F, true)); } } } - return par1ItemStack; + return stack; } @Override - public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + public ItemStack onDefensiveRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { - return par1ItemStack; + return stack; } - if (!par3EntityPlayer.capabilities.isCreativeMode) + if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(stack, player, this.getDefensiveEnergy()); } - double xCoord = par3EntityPlayer.posX; - double yCoord = par3EntityPlayer.posY; - double zCoord = par3EntityPlayer.posZ; + double xCoord = player.posX; + double yCoord = player.posY; + double zCoord = player.posZ; int posX = (int) xCoord; int posY = (int) yCoord; int posZ = (int) zCoord; - Block blockID = Blocks.stone; + BlockPos pos = player.getPosition(); + IBlockState blockID = Blocks.stone.getDefaultState(); - if (par2World.isAirBlock(posX, posY + 3, posZ)) + if (world.isAirBlock(pos.offsetUp(3))) { - par2World.setBlock(posX, posY + 3, posZ, Blocks.glass); + world.setBlockState(pos.offsetUp(3), Blocks.glass.getDefaultState()); } for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { - if (par2World.isAirBlock(posX + i - 1, posY + j, posZ - 2)) + if (world.isAirBlock(new BlockPos(posX + i - 1, posY + j, posZ - 2))) { - par2World.setBlock(posX + i - 1, posY + j, posZ - 2, blockID); + world.setBlockState(new BlockPos(posX + i - 1, posY + j, posZ - 2), blockID); } - if (par2World.isAirBlock(posX + 2, posY + j, posZ - 1 + i)) + if (world.isAirBlock(new BlockPos(posX + 2, posY + j, posZ - 1 + i))) { - par2World.setBlock(posX + 2, posY + j, posZ - 1 + i, blockID); + world.setBlockState(new BlockPos(posX + 2, posY + j, posZ - 1 + i), blockID); } - if (par2World.isAirBlock(posX - i + 1, posY + j, posZ + 2)) + if (world.isAirBlock(new BlockPos(posX - i + 1, posY + j, posZ + 2))) { - par2World.setBlock(posX - i + 1, posY + j, posZ + 2, blockID); + world.setBlockState(new BlockPos(posX - i + 1, posY + j, posZ + 2), blockID); } - if (par2World.isAirBlock(posX - 2, posY + j, posZ + 1 - i)) + if (world.isAirBlock(new BlockPos(posX - 2, posY + j, posZ + 1 - i))) { - par2World.setBlock(posX - 2, posY + j, posZ + 1 - i, blockID); + world.setBlockState(new BlockPos(posX - 2, posY + j, posZ + 1 - i), blockID); } + if (world.isAirBlock(new BlockPos(posX - 1 + i, posY + 3, posZ - 1 + j))) { - if (par2World.isAirBlock(posX - 1 + i, posY + 3, posZ - 1 + j)) - { - par2World.setBlock(posX - 1 + i, posY + 3, posZ - 1 + j, blockID); - } + world.setBlockState(new BlockPos(posX - 1 + i, posY + 3, posZ - 1 + j), blockID); } } } for (int i = 0; i < 20; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); + SpellHelper.sendParticleToAllAround(world, xCoord, yCoord, zCoord, 30, world.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); } - return par1ItemStack; + return stack; } @Override - public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + public ItemStack onEnvironmentalRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { - return par1ItemStack; + return stack; } - if (!par3EntityPlayer.capabilities.isCreativeMode) + if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(stack, player, this.getEnvironmentalEnergy()); } int range = 3; - if (!par2World.isRemote) + if (!world.isRemote) { for (int i = -range; i <= range; i++) { @@ -156,16 +157,17 @@ public class SpellEarthBender extends HomSpell { for (int k = -range; k <= range; k++) { - if (par2World.getBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k) == Blocks.water || par2World.getBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k) == Blocks.flowing_water) + BlockPos pos = player.getPosition().add(i, j, k); + if (world.getBlockState(pos).getBlock() == Blocks.water || world.getBlockState(pos).getBlock() == Blocks.flowing_water) { - int x = par2World.rand.nextInt(2); + int x = world.rand.nextInt(2); if (x == 0) { - par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k, Blocks.sand); + world.setBlockState(pos, Blocks.sand.getDefaultState()); } else { - par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k, Blocks.dirt); + world.setBlockState(pos, Blocks.dirt.getDefaultState()); } } } @@ -173,15 +175,15 @@ public class SpellEarthBender extends HomSpell } } - double xCoord = par3EntityPlayer.posX; - double yCoord = par3EntityPlayer.posY; - double zCoord = par3EntityPlayer.posZ; + double xCoord = player.posX; + double yCoord = player.posY; + double zCoord = player.posZ; for (int i = 0; i < 16; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); + SpellHelper.sendParticleToAllAround(world, xCoord, yCoord, zCoord, 30, world.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); } - return par1ItemStack; + return stack; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java index 7e030d91..aad3367c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java @@ -1,18 +1,19 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import java.util.Iterator; +import java.util.List; +import java.util.Random; + import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; import net.minecraft.world.World; - -import java.util.Iterator; -import java.util.List; -import java.util.Random; +import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; public class SpellFireBurst extends HomSpell { @@ -25,75 +26,75 @@ public class SpellFireBurst extends HomSpell } @Override - public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + public ItemStack onOffensiveRangedRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { - return par1ItemStack; + return stack; } - if (!par3EntityPlayer.capabilities.isCreativeMode) + if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveRangedEnergy()); } - par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); + world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - if (!par2World.isRemote) + if (!world.isRemote) { - FireProjectile proj = new FireProjectile(par2World, par3EntityPlayer, 7); - par2World.spawnEntityInWorld(proj); + FireProjectile proj = new FireProjectile(world, player, 7); + world.spawnEntityInWorld(proj); } - return par1ItemStack; + return stack; } @Override - public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + public ItemStack onOffensiveMeleeRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { - return par1ItemStack; + return stack; } - if (!par3EntityPlayer.capabilities.isCreativeMode) + if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveMeleeEnergy()); } - par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); + world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - if (!par2World.isRemote) + if (!world.isRemote) { for (int i = -1; i <= 1; i++) { for (int j = -1; j <= 1; j++) { - par2World.spawnEntityInWorld(new FireProjectile(par2World, par3EntityPlayer, 8, 2, par3EntityPlayer.posX, par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight(), par3EntityPlayer.posZ, par3EntityPlayer.rotationYaw + i * 10F, par3EntityPlayer.rotationPitch + j * 10F)); + world.spawnEntityInWorld(new FireProjectile(world, player, 8, 2, player.posX, player.posY + player.getEyeHeight(), player.posZ, player.rotationYaw + i * 10F, player.rotationPitch + j * 10F)); } } } - return par1ItemStack; + return stack; } @Override - public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + public ItemStack onDefensiveRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { - return par1ItemStack; + return stack; } - if (!par3EntityPlayer.capabilities.isCreativeMode) + if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(stack, player, this.getDefensiveEnergy()); } - par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); + world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); int d0 = 2; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (par3EntityPlayer.posX + 1), (par3EntityPlayer.posY + 2), (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); - List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); + AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) player.posX, (double) player.posY, (double) player.posZ, (double) (player.posX + 1), (double) (player.posY + 2), (double) (player.posZ + 1)).expand(d0, d0, d0); + List list = player.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); while (iterator.hasNext()) @@ -102,7 +103,7 @@ public class SpellFireBurst extends HomSpell if (entityLiving instanceof EntityPlayer) { - if (entityLiving.equals(par3EntityPlayer)) + if (entityLiving.equals(player)) { continue; } @@ -111,23 +112,24 @@ public class SpellFireBurst extends HomSpell entityLiving.setFire(100); entityLiving.attackEntityFrom(DamageSource.inFire, 2); } - return par1ItemStack; + return stack; } @Override - public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + public ItemStack onEnvironmentalRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { - return par1ItemStack; + return stack; } - if (!par3EntityPlayer.capabilities.isCreativeMode) + if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(stack, player, this.getEnvironmentalEnergy()); } - par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); + world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); + World worldObj = world; for (int i = -1; i <= 1; i++) { @@ -135,17 +137,18 @@ public class SpellFireBurst extends HomSpell { for (int k = -1; k <= 1; k++) { - if (par2World.isAirBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k)) + BlockPos pos = player.getPosition().add(i, k, k); + if (worldObj.isAirBlock(pos)) { - if (par2World.rand.nextFloat() < 0.8F) + if (worldObj.rand.nextFloat() < 0.8F) { - par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k, Blocks.fire); + worldObj.setBlockState(pos, Blocks.fire.getDefaultState()); } } } } } - return par1ItemStack; + return stack; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java index 8d3e8873..85615bb9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java @@ -1,14 +1,15 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import net.minecraft.block.Block; +import java.util.Random; + +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; - -import java.util.Random; +import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; public class SpellFrozenWater extends HomSpell { @@ -21,60 +22,63 @@ public class SpellFrozenWater extends HomSpell } @Override - public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + public ItemStack onOffensiveRangedRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { - return par1ItemStack; + return stack; } - if (!par3EntityPlayer.capabilities.isCreativeMode) + if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveRangedEnergy()); } - par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); + world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - if (!par2World.isRemote) + if (!world.isRemote) { - par2World.spawnEntityInWorld(new IceProjectile(par2World, par3EntityPlayer, 6)); + world.spawnEntityInWorld(new IceProjectile(world, player, 6)); } - return par1ItemStack; + return stack; } @Override - public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + public ItemStack onOffensiveMeleeRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { - return par1ItemStack; + return stack; } - if (!par3EntityPlayer.capabilities.isCreativeMode) + if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveMeleeEnergy()); } for (int i = -2; i <= 2; i++) { - par2World.spawnEntityInWorld(new IceProjectile(par2World, par3EntityPlayer, 6, 2, par3EntityPlayer.posX, par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight(), par3EntityPlayer.posZ, par3EntityPlayer.rotationYaw + i * 5F, par3EntityPlayer.rotationPitch)); + world.spawnEntityInWorld(new IceProjectile(world, player, 6, 2, player.posX, player.posY + player.getEyeHeight(), player.posZ, player.rotationYaw + i * 5F, player.rotationPitch)); } - return par1ItemStack; + return stack; } @Override - public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + public ItemStack onDefensiveRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!par3EntityPlayer.capabilities.isCreativeMode) + if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, getDefensiveEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(stack, player, getDefensiveEnergy()); } - float yaw = par3EntityPlayer.rotationYaw; - float pitch = par3EntityPlayer.rotationPitch; + float yaw = player.rotationYaw; + float pitch = player.rotationPitch; int range = 2; + + BlockPos pos = player.getPosition(); + BlockPos newPos = pos; if (pitch > 40F) { @@ -82,28 +86,32 @@ public class SpellFrozenWater extends HomSpell { for (int j = -range; j <= range; j++) { - if (par2World.isAirBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY - 1, (int) par3EntityPlayer.posZ + j)) + newPos = pos.add(i, -1, j); + + if (world.isAirBlock(newPos)) { - par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY - 1, (int) par3EntityPlayer.posZ + j, Blocks.ice); + world.setBlockState(newPos, Blocks.ice.getDefaultState()); } } } - return par1ItemStack; + return stack; } else if (pitch < -40F) { for (int i = -range; i <= range; i++) { for (int j = -range; j <= range; j++) { - if (par2World.isAirBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + 3, (int) par3EntityPlayer.posZ + j)) + newPos = pos.add(i, 3, j); + + if (world.isAirBlock(newPos)) { - par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + 3, (int) par3EntityPlayer.posZ + j, Blocks.ice); + world.setBlockState(newPos, Blocks.ice.getDefaultState()); } } } - return par1ItemStack; + return stack; } if ((yaw >= 315 && yaw < 360) || (yaw >= 0 && yaw < 45)) @@ -112,9 +120,11 @@ public class SpellFrozenWater extends HomSpell { for (int j = 0; j < range * 2 + 1; j++) { - if (par2World.isAirBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + 2)) + newPos = pos.add(i, j, 2); + + if (world.isAirBlock(newPos)) { - par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + 2, Blocks.ice); + world.setBlockState(newPos, Blocks.ice.getDefaultState()); } } } @@ -124,9 +134,11 @@ public class SpellFrozenWater extends HomSpell { for (int j = 0; j < range * 2 + 1; j++) { - if (par2World.isAirBlock((int) par3EntityPlayer.posX - 2, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + i)) + newPos = pos.add(-2, j, i); + + if (world.isAirBlock(newPos)) { - par2World.setBlock((int) par3EntityPlayer.posX - 2, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + i, Blocks.ice); + world.setBlockState(newPos, Blocks.ice.getDefaultState()); } } } @@ -136,9 +148,11 @@ public class SpellFrozenWater extends HomSpell { for (int j = 0; j < range * 2 + 1; j++) { - if (par2World.isAirBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ - 2)) + newPos = pos.add(i, j, -2); + + if (world.isAirBlock(newPos)) { - par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ - 2, Blocks.ice); + world.setBlockState(newPos, Blocks.ice.getDefaultState()); } } } @@ -148,26 +162,31 @@ public class SpellFrozenWater extends HomSpell { for (int j = 0; j < range * 2 + 1; j++) { - if (par2World.isAirBlock((int) par3EntityPlayer.posX + 2, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + i)) + newPos = pos.add(2, j, i); + + if (world.isAirBlock(newPos)) { - par2World.setBlock((int) par3EntityPlayer.posX + 2, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + i, Blocks.ice); + world.setBlockState(newPos, Blocks.ice.getDefaultState()); } } } } - return par1ItemStack; + return stack; } @Override - public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + public ItemStack onEnvironmentalRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { - return par1ItemStack; + return stack; } int radius = 3; + int posX = (int) player.posX; + int posY = (int) player.posY; + int posZ = (int) player.posZ; for (int i = -radius; i <= radius; i++) { @@ -175,14 +194,16 @@ public class SpellFrozenWater extends HomSpell { for (int k = -radius; k <= radius; k++) { - Block block = par2World.getBlock((int) par3EntityPlayer.posX + i - 1, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k); - if (block == Blocks.water || block == Blocks.flowing_water) + BlockPos pos = player.getPosition().add(i, j, k); + + IBlockState state = world.getBlockState(pos); + if (state.getBlock() == Blocks.water || state.getBlock() == Blocks.flowing_water) { - par2World.setBlock((int) par3EntityPlayer.posX + i - 1, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k, Blocks.ice); + world.setBlockState(pos, Blocks.ice.getDefaultState()); } } } } - return par1ItemStack; + return stack; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java index 3102ba88..8e05809c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java @@ -8,6 +8,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; import java.util.Iterator; @@ -67,7 +68,7 @@ public class SpellHolyBlast extends HomSpell double yCoord = par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance; double zCoord = par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance; float d0 = 0.5f; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX - 0.5 + Math.sin(yaw) * Math.cos(pitch) * (-distance), par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance, par3EntityPlayer.posZ - 0.5 + Math.cos(yaw) * Math.cos(pitch) * distance, par3EntityPlayer.posX + Math.sin(yaw) * Math.cos(pitch) * (-distance) + 0.5, par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance + 1, par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance + 0.5).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = new AxisAlignedBB(par3EntityPlayer.posX - 0.5 + Math.sin(yaw) * Math.cos(pitch) * (-distance), par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance, par3EntityPlayer.posZ - 0.5 + Math.cos(yaw) * Math.cos(pitch) * distance, par3EntityPlayer.posX + Math.sin(yaw) * Math.cos(pitch) * (-distance) + 0.5, par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance + 1, par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance + 0.5).expand(d0, d0, d0); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); @@ -96,7 +97,7 @@ public class SpellHolyBlast extends HomSpell for (int i = 0; i < 5; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F); } return par1ItemStack; @@ -140,7 +141,7 @@ public class SpellHolyBlast extends HomSpell } int d0 = 3; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (par3EntityPlayer.posX + 1), (par3EntityPlayer.posY + 2), (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); @@ -172,7 +173,7 @@ public class SpellHolyBlast extends HomSpell for (int i = 0; i < 20; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F); } return par1ItemStack; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java index 7dac5a82..1ec3912d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java @@ -6,6 +6,7 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; import java.util.Random; @@ -72,7 +73,7 @@ public class SpellLightningBolt extends HomSpell for (int i = 0; i < 5; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F); } return par1ItemStack; @@ -102,7 +103,7 @@ public class SpellLightningBolt extends HomSpell for (int i = 0; i < 8; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F); } return par1ItemStack; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java index d588fcbe..219da278 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java @@ -1,26 +1,29 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import WayofTime.alchemicalWizardry.common.entity.projectile.TeleportProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.block.Block; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.living.EnderTeleportEvent; - import java.util.Iterator; import java.util.List; import java.util.Random; +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.monster.EntityEnderman; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumParticleTypes; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.living.EnderTeleportEvent; +import WayofTime.alchemicalWizardry.common.entity.projectile.TeleportProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + public class SpellTeleport extends HomSpell { - Random itemRand = new Random(); + public static Random itemRand = new Random(); public SpellTeleport() { @@ -43,6 +46,7 @@ public class SpellTeleport extends HomSpell par2World.spawnEntityInWorld(new TeleportProjectile(par2World, par3EntityPlayer, 8, true)); par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); + EntityEnderman g; return par1ItemStack; } @@ -83,7 +87,7 @@ public class SpellTeleport extends HomSpell for (int i = 0; i < 20; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "portal", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, itemRand.nextFloat(), itemRand.nextFloat(), itemRand.nextFloat()); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.PORTAL, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, itemRand.nextFloat(), itemRand.nextFloat(), itemRand.nextFloat()); } return par1ItemStack; @@ -105,7 +109,7 @@ public class SpellTeleport extends HomSpell if (!par2World.isRemote) { int d0 = 3; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (par3EntityPlayer.posX + 1), (par3EntityPlayer.posY + 2), (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); @@ -130,7 +134,7 @@ public class SpellTeleport extends HomSpell for (int i = 0; i < 32; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "portal", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, itemRand.nextFloat(), itemRand.nextFloat(), itemRand.nextFloat()); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.PORTAL, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, itemRand.nextFloat(), itemRand.nextFloat(), itemRand.nextFloat()); } return par1ItemStack; @@ -143,14 +147,14 @@ public class SpellTeleport extends HomSpell double z = entityLiving.posZ; Random rand = new Random(); double d0 = x + (rand.nextDouble() - 0.5D) * distance; - double d1 = y + (rand.nextInt((int) distance) - (distance) / 2); + double d1 = y + (double) (rand.nextInt((int) distance) - (distance) / 2); double d2 = z + (rand.nextDouble() - 0.5D) * distance; int i = 0; while (!SpellTeleport.teleportTo(entityLiving, d0, d1, d2, x, y, z) && i < 100) { d0 = x + (rand.nextDouble() - 0.5D) * distance; - d1 = y + (rand.nextInt((int) distance) - (distance) / 2); + d1 = y + (double) (rand.nextInt((int) distance) - (distance) / 2); d2 = z + (rand.nextDouble() - 0.5D) * distance; i++; } @@ -165,43 +169,42 @@ public class SpellTeleport extends HomSpell private static boolean teleportTo(EntityLivingBase entityLiving, double par1, double par3, double par5, double lastX, double lastY, double lastZ) { - EnderTeleportEvent event = new EnderTeleportEvent(entityLiving, par1, par3, par5, 0); - - if (MinecraftForge.EVENT_BUS.post(event)) - { - return false; - } - - SpellTeleport.moveEntityViaTeleport(entityLiving, event.targetX, event.targetY, event.targetZ); + net.minecraftforge.event.entity.living.EnderTeleportEvent event = new net.minecraftforge.event.entity.living.EnderTeleportEvent(entityLiving, par1, par3, par5, 0); + if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) return false; + double d3 = entityLiving.posX; + double d4 = entityLiving.posY; + double d5 = entityLiving.posZ; + entityLiving.posX = event.targetX; + entityLiving.posY = event.targetY; + entityLiving.posZ = event.targetZ; boolean flag = false; - int i = MathHelper.floor_double(entityLiving.posX); - int j = MathHelper.floor_double(entityLiving.posY); - int k = MathHelper.floor_double(entityLiving.posZ); - Block l; + BlockPos blockpos = new BlockPos(entityLiving.posX, entityLiving.posY, entityLiving.posZ); - if (entityLiving.worldObj.blockExists(i, j, k)) + if (entityLiving.worldObj.isBlockLoaded(blockpos)) { boolean flag1 = false; - while (!flag1 && j > 0) + while (!flag1 && blockpos.getY() > 0) { - l = entityLiving.worldObj.getBlock(i, j - 1, k); + BlockPos blockpos1 = blockpos.offsetDown(); + Block block = entityLiving.worldObj.getBlockState(blockpos1).getBlock(); - if (l != null && l.getMaterial().blocksMovement()) + if (block.getMaterial().blocksMovement()) { flag1 = true; - } else + } + else { --entityLiving.posY; - --j; + blockpos = blockpos1; } } if (flag1) { - SpellTeleport.moveEntityViaTeleport(entityLiving, entityLiving.posX, entityLiving.posY, entityLiving.posZ); + entityLiving.setPositionAndUpdate(entityLiving.posX, entityLiving.posY, entityLiving.posZ); - if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.boundingBox)) + if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.getEntityBoundingBox()).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.getEntityBoundingBox())) { flag = true; } @@ -210,23 +213,27 @@ public class SpellTeleport extends HomSpell if (!flag) { - SpellTeleport.moveEntityViaTeleport(entityLiving, lastX, lastY, lastZ); + entityLiving.setPosition(d3, d4, d5); return false; - } else + } + else { short short1 = 128; - for (j = 0; j < short1; ++j) + for (int i = 0; i < short1; ++i) { - double d6 = (double) j / ((double) short1 - 1.0D); - float f = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; - float f1 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; - float f2 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; - double d7 = lastX + (entityLiving.posX - lastX) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; - double d8 = lastY + (entityLiving.posY - lastY) * d6 + entityLiving.worldObj.rand.nextDouble() * (double) entityLiving.height; - double d9 = lastZ + (entityLiving.posZ - lastZ) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; - entityLiving.worldObj.spawnParticle("portal", d7, d8, d9, (double) f, (double) f1, (double) f2); + double d9 = (double)i / ((double)short1 - 1.0D); + float f = (itemRand.nextFloat() - 0.5F) * 0.2F; + float f1 = (itemRand.nextFloat() - 0.5F) * 0.2F; + float f2 = (itemRand.nextFloat() - 0.5F) * 0.2F; + double d6 = d3 + (entityLiving.posX - d3) * d9 + (itemRand.nextDouble() - 0.5D) * (double)entityLiving.width * 2.0D; + double d7 = d4 + (entityLiving.posY - d4) * d9 + itemRand.nextDouble() * (double)entityLiving.height; + double d8 = d5 + (entityLiving.posZ - d5) * d9 + (itemRand.nextDouble() - 0.5D) * (double)entityLiving.width * 2.0D; + entityLiving.worldObj.spawnParticle(EnumParticleTypes.PORTAL, d6, d7, d8, (double)f, (double)f1, (double)f2, new int[0]); } + + entityLiving.worldObj.playSoundEffect(d3, d4, d5, "mob.endermen.portal", 1.0F, 1.0F); + entityLiving.playSound("mob.endermen.portal", 1.0F, 1.0F); return true; } } @@ -246,7 +253,7 @@ public class SpellTeleport extends HomSpell { if (entityLiving.isRiding()) { - entityLiving.mountEntity(null); + entityLiving.mountEntity((Entity) null); } entityLiving.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java index 3b9bc15c..32c701f3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java @@ -1,21 +1,23 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import java.util.Iterator; +import java.util.List; +import java.util.Random; + import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; - -import java.util.Iterator; -import java.util.List; -import java.util.Random; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class SpellWateryGrave extends HomSpell { @@ -86,7 +88,7 @@ public class SpellWateryGrave extends HomSpell } int d0 = 3; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (par3EntityPlayer.posX + 1), (par3EntityPlayer.posY + 2), (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); @@ -119,7 +121,7 @@ public class SpellWateryGrave extends HomSpell for (int i = 0; i < 20; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); } return par1ItemStack; @@ -146,9 +148,10 @@ public class SpellWateryGrave extends HomSpell { for (int j = -range; j <= range; j++) { - if (par2World.isAirBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY, (int) par3EntityPlayer.posZ + j)) + BlockPos newPos = new BlockPos((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY, (int) par3EntityPlayer.posZ + j); + if (par2World.isAirBlock(newPos)) { - par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY, (int) par3EntityPlayer.posZ + j, Blocks.water); + par2World.setBlockState(newPos, Blocks.water.getDefaultState()); } } } @@ -160,7 +163,7 @@ public class SpellWateryGrave extends HomSpell for (int i = 0; i < 16; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); } return par1ItemStack; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java index 3541359a..ea359f44 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java @@ -7,6 +7,7 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.Vec3; import net.minecraft.world.World; @@ -67,7 +68,7 @@ public class SpellWindGust extends HomSpell double yCoord = par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance; double zCoord = par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance; float d0 = 0.5f; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX - 0.5 + Math.sin(yaw) * Math.cos(pitch) * (-distance), par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance, par3EntityPlayer.posZ - 0.5 + Math.cos(yaw) * Math.cos(pitch) * distance, par3EntityPlayer.posX + Math.sin(yaw) * Math.cos(pitch) * (-distance) + 0.5, par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance + 1, par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance + 0.5).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = new AxisAlignedBB(par3EntityPlayer.posX - 0.5 + Math.sin(yaw) * Math.cos(pitch) * (-distance), par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance, par3EntityPlayer.posZ - 0.5 + Math.cos(yaw) * Math.cos(pitch) * distance, par3EntityPlayer.posX + Math.sin(yaw) * Math.cos(pitch) * (-distance) + 0.5, par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance + 1, par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance + 0.5).expand(d0, d0, d0); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); @@ -88,7 +89,7 @@ public class SpellWindGust extends HomSpell } for (int i = 0; i < 5; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); } return par1ItemStack; @@ -106,7 +107,8 @@ public class SpellWindGust extends HomSpell { EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); } - + + int distance = 3; double yaw = par3EntityPlayer.rotationYaw / 180 * Math.PI; double pitch = par3EntityPlayer.rotationPitch / 180 * Math.PI; double wantedVelocity = 5; @@ -126,7 +128,7 @@ public class SpellWindGust extends HomSpell for (int i = 0; i < 8; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); } return par1ItemStack; @@ -146,7 +148,7 @@ public class SpellWindGust extends HomSpell } int d0 = 3; - AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (par3EntityPlayer.posX + 1), (par3EntityPlayer.posY + 2), (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); double xCoord = par3EntityPlayer.posX; @@ -177,7 +179,7 @@ public class SpellWindGust extends HomSpell } for (int i = 0; i < 20; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); } return par1ItemStack; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java index c324adf8..1d8aabd1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java @@ -7,6 +7,8 @@ import java.util.Random; import net.minecraft.init.Blocks; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; @@ -38,6 +40,8 @@ public class MeteorParadigm public void createMeteorImpact(World world, int x, int y, int z, boolean[] flags) { + BlockPos pos = new BlockPos(x, y, z); + boolean hasTerrae = false; boolean hasOrbisTerrae = false; boolean hasCrystallos = false; @@ -85,7 +89,9 @@ public class MeteorParadigm continue; } - if (!world.isAirBlock(x + i, y + j, z + k)) + BlockPos newPos = pos.add(i, j, k); + + if (!world.isAirBlock(newPos)) { continue; } @@ -107,12 +113,12 @@ public class MeteorParadigm ItemStack blockStack = mpc.getValidBlockParadigm(); if(blockStack != null && blockStack.getItem() instanceof ItemBlock) { - ((ItemBlock)blockStack.getItem()).placeBlockAt(blockStack, null, world, x + i, y + j, z + k, 0, 0, 0, 0, blockStack.getItemDamage()); - world.markBlockForUpdate(x + i, y + j, z + k); + ((ItemBlock)blockStack.getItem()).placeBlockAt(blockStack, null, world, newPos, EnumFacing.DOWN, 0, 0, 0, ((ItemBlock)blockStack.getItem()).block.getStateFromMeta(blockStack.getItemDamage())); + world.markBlockForUpdate(newPos); hasPlacedBlock = true; break; } -// world.setBlock(x + i, y + j, z + k, Block.getBlockById(Item.getIdFromItem(blockStack.getItem())), blockStack.getItemDamage(), 3); +// world.setBlock(newPos, Block.getBlockById(Item.getIdFromItem(blockStack.getItem())), blockStack.getItemDamage(), 3); // hasPlacedBlock = true; // break; } @@ -124,7 +130,7 @@ public class MeteorParadigm if (randChance < iceChance) { - world.setBlock(x + i, y + j, z + k, Blocks.ice, 0, 3); + world.setBlockState(newPos, Blocks.ice.getDefaultState(), 3); } else { randChance -= iceChance; @@ -134,13 +140,13 @@ public class MeteorParadigm switch (rand.nextInt(3)) { case 0: - world.setBlock(x + i, y + j, z + k, Blocks.soul_sand, 0, 3); + world.setBlockState(newPos, Blocks.soul_sand.getDefaultState(), 3); break; case 1: - world.setBlock(x + i, y + j, z + k, Blocks.glowstone, 0, 3); + world.setBlockState(newPos, Blocks.glowstone.getDefaultState(), 3); break; case 2: - world.setBlock(x + i, y + j, z + k, Blocks.netherrack, 0, 3); + world.setBlockState(newPos, Blocks.netherrack.getDefaultState(), 3); break; } } else @@ -149,12 +155,12 @@ public class MeteorParadigm if (randChance < obsidChance) { - world.setBlock(x + i, y + j, z + k, Blocks.obsidian, 0, 3); + world.setBlockState(newPos, Blocks.obsidian.getDefaultState(), 3); } else { randChance -= obsidChance; - world.setBlock(x + i, y + j, z + k, Blocks.stone, 0, 3); + world.setBlockState(newPos, Blocks.stone.getDefaultState(), 3); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/thread/GAPIChecker.java b/src/main/java/WayofTime/alchemicalWizardry/common/thread/GAPIChecker.java index 70d02550..3b4ce3ba 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/thread/GAPIChecker.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/thread/GAPIChecker.java @@ -1,20 +1,25 @@ package WayofTime.alchemicalWizardry.common.thread; -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.TickEvent; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.*; - -import java.io.*; +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.IChatComponent; +import net.minecraft.util.StatCollector; +import net.minecraftforge.fml.common.FMLCommonHandler; +import net.minecraftforge.fml.common.Loader; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.common.gameevent.TickEvent; + public class GAPIChecker { public static boolean doneChecking = false; @@ -103,7 +108,7 @@ public class GAPIChecker if (event.phase == TickEvent.Phase.END && Minecraft.getMinecraft().thePlayer != null && !triedToWarnPlayer) { EntityPlayer player = Minecraft.getMinecraft().thePlayer; - IChatComponent component = IChatComponent.Serializer.func_150699_a(StatCollector.translateToLocal("bm.versioning.getGAPI")); + IChatComponent component = IChatComponent.Serializer.jsonToComponent(StatCollector.translateToLocal("bm.versioning.getGAPI")); player.addChatComponentMessage(component); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/thread/ThreadDownloadGAPI.java b/src/main/java/WayofTime/alchemicalWizardry/common/thread/ThreadDownloadGAPI.java index cb390250..a5c7ee6f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/thread/ThreadDownloadGAPI.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/thread/ThreadDownloadGAPI.java @@ -35,7 +35,7 @@ public class ThreadDownloadGAPI extends Thread { try { - IChatComponent component = IChatComponent.Serializer.func_150699_a(String.format(StatCollector.translateToLocal("bm.versioning.startingDownload"), fileName)); + IChatComponent component = IChatComponent.Serializer.jsonToComponent(String.format(StatCollector.translateToLocal("bm.versioning.startingDownload"), fileName)); if (Minecraft.getMinecraft().thePlayer != null) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicCalcinator.java index d5891819..f585b570 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicCalcinator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicCalcinator.java @@ -1,12 +1,5 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; @@ -15,16 +8,28 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.network.NetworkManager; import net.minecraft.network.Packet; import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.server.gui.IUpdatePlayerListBox; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.IChatComponent; import net.minecraftforge.common.util.Constants; -import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory +public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory, IUpdatePlayerListBox { protected ItemStack[] inv; protected ReagentContainer bufferTank = new ReagentContainer(Reagent.REAGENT_SIZE * 2); protected int bufferTransferRate = 20; + private int lpPerTick = 10; + private int ticksPerReagent = 200; + public int progress; public TEAlchemicCalcinator() @@ -51,7 +56,7 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory for (int i = 0; i < tagList.tagCount(); i++) { - NBTTagCompound savedTag = tagList.getCompoundTagAt(i); + NBTTagCompound savedTag = (NBTTagCompound) tagList.getCompoundTagAt(i); if (savedTag.getBoolean("Empty")) { @@ -80,6 +85,7 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory for (int i = 0; i < inv.length; i++) { + ItemStack stack = inv[i]; NBTTagCompound savedTag = new NBTTagCompound(); if (inv[i] != null) @@ -97,9 +103,9 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory } @Override - public void updateEntity() + public void update() { - super.updateEntity(); + super.update(); if (!worldObj.isRemote) { @@ -111,19 +117,17 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory public void moveBufferToMain() { ReagentStack amountStack = this.bufferTank.drain(bufferTransferRate, false); - int drainAmount = this.fill(ForgeDirection.UNKNOWN, amountStack, false); + int drainAmount = this.fill(EnumFacing.UP, amountStack, false); if (drainAmount > 0) { ReagentStack drainedStack = this.bufferTank.drain(drainAmount, true); - this.fill(ForgeDirection.UNKNOWN, drainedStack, true); + this.fill(EnumFacing.UP, drainedStack, true); } } public void tickProgress() { - int lpPerTick = 10; - int ticksPerReagent = 200; ItemStack reagentItemStack = this.getStackInSlot(1); if (reagentItemStack == null) { @@ -158,10 +162,10 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory if (worldObj.getWorldTime() % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); + SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); } - if (progress >= ticksPerReagent) + if (progress >= this.ticksPerReagent) { progress = 0; this.bufferTank.fill(possibleReagent, true); @@ -196,7 +200,7 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory for (int i = 0; i < invTagList.tagCount(); i++) { - NBTTagCompound savedTag = invTagList.getCompoundTagAt(i); + NBTTagCompound savedTag = (NBTTagCompound) invTagList.getCompoundTagAt(i); if (savedTag.getBoolean("Empty")) { @@ -231,6 +235,7 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory for (int i = 0; i < inv.length; i++) { + ItemStack stack = inv[i]; NBTTagCompound savedTag = new NBTTagCompound(); if (inv[i] != null) @@ -252,14 +257,14 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory { NBTTagCompound nbttagcompound = new NBTTagCompound(); writeClientNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, -999, nbttagcompound); + return new S35PacketUpdateTileEntity(pos, -999, nbttagcompound); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) { super.onDataPacket(net, packet); - readClientNBT(packet.func_148857_g()); + readClientNBT(packet.getNbtCompound()); } @Override @@ -284,7 +289,7 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory stack.stackSize = getInventoryStackLimit(); } - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } @Override @@ -333,27 +338,27 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory @Override public boolean isUseableByPlayer(EntityPlayer player) { - return worldObj.getTileEntity(xCoord, yCoord, zCoord) == this && player.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) < 64; + return worldObj.getTileEntity(pos) == this && pos.distanceSqToCenter(player.posX, player.posY, player.posZ) < 64; } @Override - public void openInventory() + public void openInventory(EntityPlayer player) { } @Override - public void closeInventory() + public void closeInventory(EntityPlayer player) { } @Override - public String getInventoryName() + public String getName() { return "AlchemicCalcinator"; } @Override - public boolean hasCustomInventoryName() + public boolean hasCustomName() { return false; } @@ -365,13 +370,43 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory } @Override - public int fill(ForgeDirection from, ReagentStack resource, boolean doFill) + public int fill(EnumFacing from, ReagentStack resource, boolean doFill) { if (doFill && !worldObj.isRemote) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } return super.fill(from, resource, doFill); } + + @Override + public IChatComponent getDisplayName() { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getField(int id) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void setField(int id, int value) { + // TODO Auto-generated method stub + + } + + @Override + public int getFieldCount() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void clear() { + // TODO Auto-generated method stub + + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java index 91d80544..bd663b57 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.tileEntity; import java.util.List; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -10,11 +11,13 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.Packet; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; +import net.minecraft.server.gui.IUpdatePlayerListBox; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.ChatComponentTranslation; +import net.minecraft.util.EnumFacing; import net.minecraft.util.StatCollector; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidEvent; @@ -34,7 +37,7 @@ import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.AltarUpgradeCompone import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, IBloodAltar +public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, IBloodAltar, IUpdatePlayerListBox { public static final int sizeInv = 1; @@ -246,7 +249,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I } @Override - public String getInventoryName() + public String getName() { return "TEAltar"; } @@ -339,7 +342,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I return 0; } - if (resource.getFluidID() != (new FluidStack(AlchemicalWizardry.lifeEssenceFluid, 1)).getFluidID()) + if (resource.getFluid() != (new FluidStack(AlchemicalWizardry.lifeEssenceFluid, 1)).getFluid()) { return 0; } @@ -364,7 +367,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I fluidInput = new FluidStack(resource, Math.min(bufferCapacity, resource.amount)); if (tile != null) { - FluidEvent.fireEvent(new FluidEvent.FluidFillingEvent(fluidInput, tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord, this)); + FluidEvent.fireEvent(new FluidEvent.FluidFillingEvent(fluidInput, tile.getWorld(), tile.getPos(), this, fluidInput.amount)); } return fluidInput.amount; @@ -388,7 +391,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I if (tile != null) { - FluidEvent.fireEvent(new FluidEvent.FluidFillingEvent(fluidInput, tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord, this)); + FluidEvent.fireEvent(new FluidEvent.FluidFillingEvent(fluidInput, tile.getWorld(), tile.getPos(), this, fluidInput.amount)); } return filled; @@ -422,7 +425,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I if (this != null) { - FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(fluidOutput, this.worldObj, this.xCoord, this.yCoord, this.zCoord, this)); + FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(fluidOutput, this.worldObj, this.pos, this, fluidOutput.amount)); } } @@ -433,7 +436,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I if (worldObj != null) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } return stack; @@ -441,13 +444,13 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I //Logic for the actual block is under here @Override - public void updateEntity() + public void update() { this.decrementDemonBlood(); if(this.hasDemonBlood() && !worldObj.isRemote) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); + SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); } if (this.lockdownDuration > 0) @@ -463,23 +466,18 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I if (!worldObj.isRemote && worldObj.getWorldTime() % 20 == 0) { { - Block block = worldObj.getBlock(xCoord + 1, yCoord, zCoord); - block.onNeighborBlockChange(worldObj, xCoord + 1, yCoord, zCoord, block); - block = worldObj.getBlock(xCoord - 1, yCoord, zCoord); - block.onNeighborBlockChange(worldObj, xCoord - 1, yCoord, zCoord, block); - block = worldObj.getBlock(xCoord, yCoord + 1, zCoord); - block.onNeighborBlockChange(worldObj, xCoord, yCoord + 1, zCoord, block); - block = worldObj.getBlock(xCoord, yCoord - 1, zCoord); - block.onNeighborBlockChange(worldObj, xCoord, yCoord - 1, zCoord, block); - block = worldObj.getBlock(xCoord, yCoord, zCoord + 1); - block.onNeighborBlockChange(worldObj, xCoord, yCoord, zCoord + 1, block); - block = worldObj.getBlock(xCoord, yCoord, zCoord - 1); - block.onNeighborBlockChange(worldObj, xCoord, yCoord, zCoord - 1, block); + for(EnumFacing facing : EnumFacing.VALUES) + { + BlockPos newPos = pos.offset(facing); + IBlockState state = worldObj.getBlockState(newPos); + Block block = state.getBlock(); + block.onNeighborBlockChange(worldObj, newPos, state, this.getBlockType()); + } } if (AlchemicalWizardry.lockdownAltar) { - List<EntityPlayer> list = SpellHelper.getPlayersInRange(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, 15, 15); + List<EntityPlayer> list = SpellHelper.getPlayersInRange(worldObj, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 15, 15); for (EntityPlayer player : list) { PotionEffect regenEffect = player.getActivePotionEffect(Potion.regeneration); @@ -566,7 +564,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I if (worldTime % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); + SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); } if (progress >= liquidRequired * stackSize) @@ -583,7 +581,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I for (int i = 0; i < 8; i++) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 4, xCoord + 0.5f, yCoord + 1.0f, zCoord + 0.5f); + SpellHelper.sendIndexedParticleToAllAround(worldObj, pos.getX(), pos.getY(), pos.getZ(), 20, worldObj.provider.getDimensionId(), 4, pos.getX() + 0.5f, pos.getY() + 1.0f, pos.getZ() + 0.5f); } this.isActive = false; } @@ -593,7 +591,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I if (worldTime % 2 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 2, xCoord, yCoord, zCoord); + SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 2, pos); } } } else @@ -630,13 +628,13 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I if (worldTime % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 3, xCoord, yCoord, zCoord); + SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 3, pos); } } } if (worldObj != null) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } } @@ -728,7 +726,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I { if (worldObj != null) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } this.checkAndSetAltar(); @@ -760,7 +758,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I public void checkAndSetAltar() { boolean checkUpgrade = true; - int upgradeState = UpgradedAltars.isAltarValid(worldObj, xCoord, yCoord, zCoord); + int upgradeState = UpgradedAltars.isAltarValid(worldObj, pos); if (upgradeState <= 1) { @@ -777,7 +775,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I return; } - AltarUpgradeComponent upgrades = UpgradedAltars.getUpgrades(worldObj, xCoord, yCoord, zCoord, upgradeState); + AltarUpgradeComponent upgrades = UpgradedAltars.getUpgrades(worldObj, pos, upgradeState); if (upgrades == null) { @@ -823,7 +821,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I this.fluidInput.amount = this.bufferCapacity; } - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } @Override @@ -833,7 +831,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I } @Override - public int fill(ForgeDirection from, FluidStack resource, boolean doFill) + public int fill(EnumFacing from, FluidStack resource, boolean doFill) { //TODO if (resource == null) @@ -851,7 +849,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I } @Override - public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) + public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain) { if (resource == null) { @@ -867,26 +865,26 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I } @Override - public FluidStack drain(ForgeDirection from, int maxEmpty, boolean doDrain) + public FluidStack drain(EnumFacing from, int maxEmpty, boolean doDrain) { return this.drain(maxEmpty, doDrain); } @Override - public boolean canFill(ForgeDirection from, Fluid fluid) + public boolean canFill(EnumFacing from, Fluid fluid) { //I changed this, since fluidstack != fluid... :p dunno if it was a accident? so you might wanna check this return this.fluidInput != null && this.fluid.getFluid().equals(fluidInput.getFluid()); } @Override - public boolean canDrain(ForgeDirection from, Fluid fluid) + public boolean canDrain(EnumFacing from, Fluid fluid) { return true; } @Override - public FluidTankInfo[] getTankInfo(ForgeDirection from) + public FluidTankInfo[] getTankInfo(EnumFacing from) { FluidTank compositeTank = new FluidTank(capacity); compositeTank.setFluid(fluid); @@ -903,7 +901,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I sortList[1] = 0; } else { - sortList[0] = this.fluid.getFluidID(); + sortList[0] = this.fluid.fluidID; sortList[1] = this.fluid.amount; } @@ -913,7 +911,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I sortList[3] = 0; } else { - sortList[2] = this.fluidInput.getFluidID(); + sortList[2] = this.fluidInput.fluidID; sortList[3] = this.fluidInput.amount; } @@ -923,7 +921,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I sortList[5] = 0; } else { - sortList[4] = this.fluidOutput.getFluidID(); + sortList[4] = this.fluidOutput.fluidID; sortList[5] = this.fluidOutput.amount; } @@ -933,7 +931,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I public void sendChatInfoToPlayer(EntityPlayer player) { player.addChatMessage(new ChatComponentTranslation(String.format("message.altar.currentessence"), this.fluid.amount)); - player.addChatMessage(new ChatComponentTranslation(String.format("message.altar.currenttier"), UpgradedAltars.isAltarValid(worldObj, xCoord, yCoord, zCoord))); + player.addChatMessage(new ChatComponentTranslation(String.format("message.altar.currenttier"), UpgradedAltars.isAltarValid(worldObj, pos))); player.addChatMessage(new ChatComponentTranslation(String.format("message.altar.capacity"), this.getCapacity())); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java index 1126762a..b12c426c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java @@ -5,10 +5,13 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraftforge.common.util.Constants; public class TEBellJar extends TEReagentConduit @@ -36,7 +39,7 @@ public class TEBellJar extends TEReagentConduit public static ReagentContainerInfo[] getContainerInfoFromItem(ItemStack stack) { - if (stack != null && stack.getItem() instanceof ItemBlock && ModBlocks.blockCrystalBelljar == ((ItemBlock) stack.getItem()).field_150939_a) + if (stack != null && stack.getItem() instanceof ItemBlock && ModBlocks.blockCrystalBelljar == ((ItemBlock) stack.getItem()).getBlock()) { NBTTagCompound tag = stack.getTagCompound(); if (tag != null) @@ -98,24 +101,19 @@ public class TEBellJar extends TEReagentConduit } @Override - public void updateEntity() + public void update() { - super.updateEntity(); - + super.update(); + if (hasChanged == 1) { - Block block = worldObj.getBlock(xCoord + 1, yCoord, zCoord); - block.onNeighborBlockChange(worldObj, xCoord + 1, yCoord, zCoord, block); - block = worldObj.getBlock(xCoord - 1, yCoord, zCoord); - block.onNeighborBlockChange(worldObj, xCoord - 1, yCoord, zCoord, block); - block = worldObj.getBlock(xCoord, yCoord + 1, zCoord); - block.onNeighborBlockChange(worldObj, xCoord, yCoord + 1, zCoord, block); - block = worldObj.getBlock(xCoord, yCoord - 1, zCoord); - block.onNeighborBlockChange(worldObj, xCoord, yCoord - 1, zCoord, block); - block = worldObj.getBlock(xCoord, yCoord, zCoord + 1); - block.onNeighborBlockChange(worldObj, xCoord, yCoord, zCoord + 1, block); - block = worldObj.getBlock(xCoord, yCoord, zCoord - 1); - block.onNeighborBlockChange(worldObj, xCoord, yCoord, zCoord - 1, block); + for(EnumFacing facing : EnumFacing.VALUES) + { + BlockPos newPos = pos.offset(facing); + IBlockState state = worldObj.getBlockState(newPos); + Block block = state.getBlock(); + block.onNeighborBlockChange(worldObj, newPos, state, this.getBlockType()); + } } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java index 3c09f67a..1a24d7f4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java @@ -17,13 +17,6 @@ public class TEConduit extends TESpellBlock super.writeToNBT(par1NBTTagCompound); } - //Logic for the actual block is under here - @Override - public void updateEntity() - { - - } - @Override protected void applySpellChange(SpellParadigm parad) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java index eae4f507..d1855d08 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java @@ -4,6 +4,7 @@ import java.util.List; import java.util.Random; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -11,13 +12,17 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.network.NetworkManager; import net.minecraft.network.Packet; import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.server.gui.IUpdatePlayerListBox; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; import WayofTime.alchemicalWizardry.api.sacrifice.IIncense; import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -public class TECrucible extends TEInventory +public class TECrucible extends TEInventory implements IUpdatePlayerListBox { private int radius = 5; @@ -45,7 +50,7 @@ public class TECrucible extends TEInventory } @Override - public void updateEntity() + public void update() { if(worldObj.isRemote) return; @@ -81,7 +86,7 @@ public class TECrucible extends TEInventory if(ticksRemaining > 0) { - List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, radius, radius); + List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(worldObj, pos.getX(), pos.getY(), pos.getZ(), radius, radius); if(playerList != null && !playerList.isEmpty()) { @@ -114,7 +119,7 @@ public class TECrucible extends TEInventory if(state != 0) { state = 0; - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); updateNeighbors(); } } @@ -123,14 +128,14 @@ public class TECrucible extends TEInventory if(state != 0) { state = 0; - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); updateNeighbors(); } } if(stateChanged) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); updateNeighbors(); } @@ -138,18 +143,13 @@ public class TECrucible extends TEInventory private void updateNeighbors() { - Block block = worldObj.getBlock(xCoord + 1, yCoord, zCoord); - block.onNeighborBlockChange(worldObj, xCoord + 1, yCoord, zCoord, block); - block = worldObj.getBlock(xCoord - 1, yCoord, zCoord); - block.onNeighborBlockChange(worldObj, xCoord - 1, yCoord, zCoord, block); - block = worldObj.getBlock(xCoord, yCoord + 1, zCoord); - block.onNeighborBlockChange(worldObj, xCoord, yCoord + 1, zCoord, block); - block = worldObj.getBlock(xCoord, yCoord - 1, zCoord); - block.onNeighborBlockChange(worldObj, xCoord, yCoord - 1, zCoord, block); - block = worldObj.getBlock(xCoord, yCoord, zCoord + 1); - block.onNeighborBlockChange(worldObj, xCoord, yCoord, zCoord + 1, block); - block = worldObj.getBlock(xCoord, yCoord, zCoord - 1); - block.onNeighborBlockChange(worldObj, xCoord, yCoord, zCoord - 1, block); + for(EnumFacing facing : EnumFacing.VALUES) + { + BlockPos newPos = pos.offset(facing); + IBlockState state = worldObj.getBlockState(newPos); + Block block = state.getBlock(); + block.onNeighborBlockChange(worldObj, newPos, state, this.getBlockType()); + } } public void spawnClientParticle(World world, int x, int y, int z, Random rand) @@ -157,16 +157,16 @@ public class TECrucible extends TEInventory switch(state) { case 0: - world.spawnParticle("reddust", x + 0.5D + rand.nextGaussian() / 8, y + 0.7D, z + 0.5D + rand.nextGaussian() / 8, 0.15, 0.15, 0.15); + world.spawnParticle(EnumParticleTypes.REDSTONE, x + 0.5D + rand.nextGaussian() / 8, y + 0.7D, z + 0.5D + rand.nextGaussian() / 8, 0.15, 0.15, 0.15); break; case 1: - world.spawnParticle("reddust", x + 0.5D + rand.nextGaussian() / 8, y + 0.7D, z + 0.5D + rand.nextGaussian() / 8, 1.0, 1.0, 1.0); + world.spawnParticle(EnumParticleTypes.REDSTONE, x + 0.5D + rand.nextGaussian() / 8, y + 0.7D, z + 0.5D + rand.nextGaussian() / 8, 1.0, 1.0, 1.0); break; case 2: - world.spawnParticle("reddust", x + 0.5D + rand.nextGaussian() / 8, y + 0.7D, z + 0.5D + rand.nextGaussian() / 8, rColour, gColour, bColour); - world.spawnParticle("flame", x + 0.5D + rand.nextGaussian() / 32, y + 0.7D, z + 0.5D + rand.nextGaussian() / 32, 0, 0.02, 0); + world.spawnParticle(EnumParticleTypes.REDSTONE, x + 0.5D + rand.nextGaussian() / 8, y + 0.7D, z + 0.5D + rand.nextGaussian() / 8, rColour, gColour, bColour); + world.spawnParticle(EnumParticleTypes.FLAME, x + 0.5D + rand.nextGaussian() / 32, y + 0.7D, z + 0.5D + rand.nextGaussian() / 32, 0, 0.02, 0); break; case 3: @@ -248,18 +248,18 @@ public class TECrucible extends TEInventory { NBTTagCompound nbttagcompound = new NBTTagCompound(); writeClientNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 90210, nbttagcompound); + return new S35PacketUpdateTileEntity(pos, 90210, nbttagcompound); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) { super.onDataPacket(net, packet); - readClientNBT(packet.func_148857_g()); + readClientNBT(packet.getNbtCompound()); } @Override - public String getInventoryName() + public String getName() { return "TECrucible"; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java index 2a8c0e79..7ebffa93 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java @@ -4,6 +4,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntitySkull; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.common.spell.simple.HomSpell; import WayofTime.alchemicalWizardry.common.spell.simple.HomSpellRegistry; @@ -71,73 +72,25 @@ public class TEHomHeart extends TileEntity public HomSpell getSpell() { - TileEntity tileEntity = worldObj.getTileEntity(xCoord - 1, yCoord, zCoord); + for(EnumFacing face : EnumFacing.HORIZONTALS) + { + TileEntity tileEntity = worldObj.getTileEntity(pos.offset(face)); - if (tileEntity instanceof TEAltar) - { - ItemStack itemStack = ((TEAltar) tileEntity).getStackInSlot(0); - - if (itemStack != null) + if (tileEntity instanceof TEAltar) { - HomSpell spell = HomSpellRegistry.getSpellForItemStack(itemStack); + ItemStack itemStack = ((TEAltar) tileEntity).getStackInSlot(0); - if (spell != null) + if (itemStack != null) { - return spell; + HomSpell spell = HomSpellRegistry.getSpellForItemStack(itemStack); + + if (spell != null) + { + return spell; + } } } - } - - tileEntity = worldObj.getTileEntity(xCoord + 1, yCoord, zCoord); - - if (tileEntity instanceof TEAltar) - { - ItemStack itemStack = ((TEAltar) tileEntity).getStackInSlot(0); - - if (itemStack != null) - { - HomSpell spell = HomSpellRegistry.getSpellForItemStack(itemStack); - - if (spell != null) - { - return spell; - } - } - } - - tileEntity = worldObj.getTileEntity(xCoord, yCoord, zCoord - 1); - - if (tileEntity instanceof TEAltar) - { - ItemStack itemStack = ((TEAltar) tileEntity).getStackInSlot(0); - - if (itemStack != null) - { - HomSpell spell = HomSpellRegistry.getSpellForItemStack(itemStack); - - if (spell != null) - { - return spell; - } - } - } - - tileEntity = worldObj.getTileEntity(xCoord, yCoord, zCoord + 1); - - if (tileEntity instanceof TEAltar) - { - ItemStack itemStack = ((TEAltar) tileEntity).getStackInSlot(0); - - if (itemStack != null) - { - HomSpell spell = HomSpellRegistry.getSpellForItemStack(itemStack); - - if (spell != null) - { - return spell; - } - } - } + } return null; } @@ -146,11 +99,11 @@ public class TEHomHeart extends TileEntity { //TODO change so that it works with a Tile Entity for a custom head or whatnot - TileEntity tileEntity = worldObj.getTileEntity(xCoord, yCoord + 1, zCoord); + TileEntity tileEntity = worldObj.getTileEntity(pos.offsetUp()); if (tileEntity instanceof TileEntitySkull) { - int skullType = ((TileEntitySkull) tileEntity).func_145904_a(); + int skullType = ((TileEntitySkull) tileEntity).getSkullType(); switch (skullType) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEInventory.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEInventory.java index 6d28ea18..ec5ccc86 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEInventory.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEInventory.java @@ -6,6 +6,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IChatComponent; import net.minecraftforge.common.util.Constants; /** @@ -65,16 +66,16 @@ public abstract class TEInventory extends TileEntity implements IInventory public void setInventorySlotContents(int slot, ItemStack stack) { inv[slot] = stack; - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); if (stack != null && stack.stackSize > getInventoryStackLimit()) stack.stackSize = getInventoryStackLimit(); } @Override - public abstract String getInventoryName(); + public abstract String getName(); @Override - public boolean hasCustomInventoryName() + public boolean hasCustomName() { return false; } @@ -88,17 +89,17 @@ public abstract class TEInventory extends TileEntity implements IInventory @Override public boolean isUseableByPlayer(EntityPlayer player) { - return worldObj.getTileEntity(xCoord, yCoord, zCoord) == this - && player.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) < 64; + return worldObj.getTileEntity(this.pos) == this + && player.getDistanceSqToCenter(pos) < 64; } @Override - public void openInventory() + public void openInventory(EntityPlayer player) { } @Override - public void closeInventory() + public void closeInventory(EntityPlayer player) { } @@ -147,4 +148,28 @@ public abstract class TEInventory extends TileEntity implements IInventory { inv = new ItemStack[inv.length]; } + + @Override + public int getField(int id) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void setField(int id, int value) { + // TODO Auto-generated method stub + + } + + @Override + public int getFieldCount() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public IChatComponent getDisplayName() { + // TODO Auto-generated method stub + return null; + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java index a4f56112..83ee371f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java @@ -11,14 +11,16 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.network.NetworkManager; import net.minecraft.network.Packet; import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.server.gui.IUpdatePlayerListBox; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentTranslation; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.Constants; -import net.minecraftforge.common.util.ForgeDirection; -import WayofTime.alchemicalWizardry.api.Int3; +import net.minecraftforge.fml.common.eventhandler.Event; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; @@ -31,9 +33,8 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualBreakMethod; import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.common.eventhandler.Event; -public class TEMasterStone extends TileEntity implements IMasterRitualStone +public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUpdatePlayerListBox { private String currentRitualString; private boolean isActive; @@ -151,9 +152,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone { newStorage.readFromNBT(localStorageTag); storage = newStorage; - storage.xCoord = xCoord; - storage.yCoord = yCoord; - storage.zCoord = zCoord; + storage.setLocation(pos); } } @@ -215,7 +214,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone return; } - String testRitual = Rituals.checkValidRitual(world, xCoord, yCoord, zCoord); + String testRitual = Rituals.checkValidRitual(world, pos); if (testRitual.equals("")) { @@ -271,7 +270,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone for (int i = 0; i < 12; i++) { - SpellHelper.sendIndexedParticleToAllAround(world, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); + SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, worldObj.provider.getDimensionId(), 1, pos); } }else { @@ -291,11 +290,11 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone var1 = 0; currentRitualString = testRitual; storage = Rituals.getLocalStorage(currentRitualString); - storage.setLocation(new Int3(xCoord, yCoord, zCoord)); + storage.setLocation(pos); isActive = true; isRunning = true; - direction = Rituals.getDirectionOfRitual(world, xCoord, yCoord, zCoord, testRitual); - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + direction = Rituals.getDirectionOfRitual(world, pos, testRitual); + worldObj.markBlockForUpdate(pos); } public void setOwner(String owner) @@ -314,7 +313,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone } @Override - public void updateEntity() + public void update() { if (isRunning && runningTime < 100) { @@ -338,26 +337,26 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone if (worldTime % 100 == 0) { - boolean testRunes = Rituals.checkDirectionOfRitualValid(worldObj, xCoord, yCoord, zCoord, currentRitualString, direction); - SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); + boolean testRunes = Rituals.checkDirectionOfRitualValid(worldObj, pos, currentRitualString, direction); + SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); if (!testRunes) { Rituals.onRitualBroken(this, currentRitualString, RitualBreakMethod.BREAK_STONE); isActive = false; currentRitualString = ""; - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); return; } } - if (worldObj.getBlockPowerInput(xCoord, yCoord, zCoord) > 0) + if (worldObj.getStrongPower(pos) > 0) { if (isRunning) { Rituals.onRitualBroken(this, this.currentRitualString, RitualBreakMethod.REDSTONE); isRunning = false; - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } return; @@ -366,14 +365,14 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone if (!isRunning) { isRunning = true; - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } } - performRitual(worldObj, xCoord, yCoord, zCoord, currentRitualString); + performRitual(worldObj, pos, currentRitualString); } - public void performRitual(World world, int x, int y, int z, String currentRitualString) + public void performRitual(World world, BlockPos pos, String currentRitualString) { Rituals.performEffect(this, currentRitualString); } @@ -408,7 +407,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone Rituals.onRitualBroken(this, this.currentRitualString, RitualBreakMethod.DEACTIVATE); this.isActive = active; this.isRunning = active; - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } public int getDirection() @@ -417,27 +416,15 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone } @Override - public World getWorld() + public World getWorldObj() { - return this.getWorldObj(); + return this.getWorld(); } @Override - public int getXCoord() + public BlockPos getPosition() { - return xCoord; - } - - @Override - public int getYCoord() - { - return yCoord; - } - - @Override - public int getZCoord() - { - return zCoord; + return this.getPos(); } public String getCurrentRitual() @@ -455,30 +442,30 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone { NBTTagCompound nbttagcompound = new NBTTagCompound(); writeClientNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, -999, nbttagcompound); + return new S35PacketUpdateTileEntity(pos, -999, nbttagcompound); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) { super.onDataPacket(net, packet); - readClientNBT(packet.func_148857_g()); + readClientNBT(packet.getNbtCompound()); } public AxisAlignedBB getRenderBoundingBox() { double renderExtention = 1.0d; - AxisAlignedBB bb = AxisAlignedBB.getBoundingBox(xCoord - renderExtention, yCoord - renderExtention, zCoord - renderExtention, xCoord + 1 + renderExtention, yCoord + 1 + renderExtention, zCoord + 1 + renderExtention); + AxisAlignedBB bb = new AxisAlignedBB(pos.add(-renderExtention, -renderExtention, -renderExtention), pos.add(1 + renderExtention, 1 + renderExtention, 1 + renderExtention)); return bb; } /* ISegmentedReagentHandler */ @Override - public int fill(ForgeDirection from, ReagentStack resource, boolean doFill) + public int fill(EnumFacing from, ReagentStack resource, boolean doFill) { if (doFill) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } int totalFill = 0; @@ -497,7 +484,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone ReagentStack remainingStack = resource.copy(); remainingStack.amount = maxFill - totalFill; - boolean doesReagentMatch = tanks[i].getReagent() != null && tanks[i].getReagent().isReagentEqual(remainingStack); + boolean doesReagentMatch = tanks[i].getReagent() == null ? false : tanks[i].getReagent().isReagentEqual(remainingStack); if (doesReagentMatch) { @@ -545,7 +532,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone } @Override - public ReagentStack drain(ForgeDirection from, ReagentStack resource, boolean doDrain) + public ReagentStack drain(EnumFacing from, ReagentStack resource, boolean doDrain) { if (resource == null) { @@ -554,7 +541,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone if (doDrain) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } int maxDrain = resource.amount; @@ -583,7 +570,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone /* Only returns the amount from the first available tank */ @Override - public ReagentStack drain(ForgeDirection from, int maxDrain, boolean doDrain) + public ReagentStack drain(EnumFacing from, int maxDrain, boolean doDrain) { for (int i = 0; i < tanks.length; i++) { @@ -592,7 +579,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone { if (doDrain) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } return stack; @@ -603,19 +590,19 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone } @Override - public boolean canFill(ForgeDirection from, Reagent reagent) + public boolean canFill(EnumFacing from, Reagent reagent) { return true; } @Override - public boolean canDrain(ForgeDirection from, Reagent reagent) + public boolean canDrain(EnumFacing from, Reagent reagent) { return true; } @Override - public ReagentContainerInfo[] getContainerInfo(ForgeDirection from) + public ReagentContainerInfo[] getContainerInfo(EnumFacing from) { ReagentContainerInfo[] info = new ReagentContainerInfo[this.getNumberOfTanks()]; for (int i = 0; i < this.getNumberOfTanks(); i++) @@ -650,7 +637,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone return; } - this.attunedTankMap.put(reagent, total); + this.attunedTankMap.put(reagent, new Integer(total)); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java index 465cec69..5b76fe26 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common.tileEntity; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; @@ -9,7 +10,9 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.network.NetworkManager; import net.minecraft.network.Packet; import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.server.gui.IUpdatePlayerListBox; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; import WayofTime.alchemicalWizardry.ModBlocks; @@ -18,7 +21,7 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; -public class TEMimicBlock extends TileEntity +public class TEMimicBlock extends TileEntity implements IUpdatePlayerListBox { private ItemStack[] inv; public Reagent reagent; @@ -37,14 +40,14 @@ public class TEMimicBlock extends TileEntity { NBTTagCompound nbttagcompound = new NBTTagCompound(); writeToNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, -999, nbttagcompound); + return new S35PacketUpdateTileEntity(pos, -999, nbttagcompound); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) { super.onDataPacket(net, packet); - readFromNBT(packet.func_148857_g()); + readFromNBT(packet.getNbtCompound()); } @Override @@ -55,7 +58,7 @@ public class TEMimicBlock extends TileEntity for (int i = 0; i < tagList.tagCount(); i++) { - NBTTagCompound tag = tagList.getCompoundTagAt(i); + NBTTagCompound tag = (NBTTagCompound) tagList.getCompoundTagAt(i); int slot = tag.getByte("Slot"); if (slot >= 0 && slot < inv.length) @@ -76,6 +79,8 @@ public class TEMimicBlock extends TileEntity for (int i = 0; i < inv.length; i++) { + ItemStack stack = inv[i]; + if (inv[i] != null) { NBTTagCompound tag = new NBTTagCompound(); @@ -91,10 +96,8 @@ public class TEMimicBlock extends TileEntity } @Override - public void updateEntity() + public void update() { - super.updateEntity(); - this.ticksRemaining--; if (this.ticksRemaining <= 0) @@ -103,34 +106,35 @@ public class TEMimicBlock extends TileEntity } } - public static boolean createMimicBlockAtLocation(World world, int x, int y, int z, int duration, Block block, int meta, Reagent reagent) + public static boolean createMimicBlockAtLocation(World world, BlockPos pos, int duration, IBlockState state, Reagent reagent) { + Block block = state.getBlock(); if (block == null) { return false; } - TileEntity tileEntity = world.getTileEntity(x, y, z); + TileEntity tileEntity = world.getTileEntity(pos); - if (tileEntity == null && world.isAirBlock(x, y, z)) + if (tileEntity == null && world.isAirBlock(pos)) { - ItemStack item = new ItemStack(block, 1, meta); + ItemStack item = new ItemStack(block, 1, block.getMetaFromState(state)); - world.setBlock(x, y, z, ModBlocks.blockMimic); - TileEntity tile = world.getTileEntity(x, y, z); + world.setBlockState(pos, ModBlocks.blockMimic.getDefaultState()); + TileEntity tile = world.getTileEntity(pos); if (tile instanceof TEMimicBlock) { ((TEMimicBlock) tile).setContainedItem(item); ((TEMimicBlock) tile).setDuration(duration); ((TEMimicBlock) tile).reagent = reagent; - world.markBlockForUpdate(x, y, z); + world.markBlockForUpdate(pos); return true; } }else { if(tileEntity instanceof TEMimicBlock) { - if(((TEMimicBlock) tileEntity).getBlock() == block && ((TEMimicBlock) tileEntity).getMetaOfMimic() == meta) + if(((TEMimicBlock) tileEntity).getBlock() == block) { ((TEMimicBlock) tileEntity).ticksRemaining = Math.max(duration, ((TEMimicBlock) tileEntity).ticksRemaining); } @@ -181,7 +185,7 @@ public class TEMimicBlock extends TileEntity // // } else { - this.worldObj.setBlockToAir(xCoord, yCoord, zCoord); + this.worldObj.setBlockToAir(pos); } } @@ -192,7 +196,8 @@ public class TEMimicBlock extends TileEntity { if (item.getItem() instanceof ItemBlock) { - return ((ItemBlock) item.getItem()).field_150939_a; + Block block = ((ItemBlock) item.getItem()).getBlock(); + return block; } } return null; @@ -209,6 +214,17 @@ public class TEMimicBlock extends TileEntity return 0; } + public IBlockState getStateOfMimic() + { + Block block = this.getBlock(); + if(block == null) + { + return null; + } + + return block.getStateFromMeta(getMetaOfMimic()); + } + public boolean getBlockEffectWhileInside(Entity entity, int x, int y, int z) { if(reagent != null) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEOrientable.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEOrientable.java index 4029c2fa..160bf6a7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEOrientable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEOrientable.java @@ -1,64 +1,64 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.common.NewPacketHandler; -import WayofTime.alchemicalWizardry.common.block.IOrientable; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; +import WayofTime.alchemicalWizardry.common.NewPacketHandler; +import WayofTime.alchemicalWizardry.common.block.IOrientable; public class TEOrientable extends TileEntity implements IOrientable { - protected ForgeDirection inputFace; - protected ForgeDirection outputFace; + protected EnumFacing inputFace; + protected EnumFacing outputFace; public TEOrientable() { - this.inputFace = ForgeDirection.DOWN; - this.outputFace = ForgeDirection.UP; + this.inputFace = EnumFacing.DOWN; + this.outputFace = EnumFacing.UP; } @Override public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); - this.setInputDirection(ForgeDirection.getOrientation(par1NBTTagCompound.getInteger("inputFace"))); - this.setOutputDirection(ForgeDirection.getOrientation(par1NBTTagCompound.getInteger("outputFace"))); + this.setInputDirection(EnumFacing.getFront(par1NBTTagCompound.getInteger("inputFace"))); + this.setOutputDirection(EnumFacing.getFront(par1NBTTagCompound.getInteger("outputFace"))); } @Override public void writeToNBT(NBTTagCompound par1NBTTagCompound) { super.writeToNBT(par1NBTTagCompound); - par1NBTTagCompound.setInteger("inputFace", TEOrientable.getIntForForgeDirection(this.getInputDirection())); - par1NBTTagCompound.setInteger("outputFace", TEOrientable.getIntForForgeDirection(this.getOutputDirection())); + par1NBTTagCompound.setInteger("inputFace", TEOrientable.getIntForEnumFacing(this.getInputDirection())); + par1NBTTagCompound.setInteger("outputFace", TEOrientable.getIntForEnumFacing(this.getOutputDirection())); } @Override - public ForgeDirection getInputDirection() + public EnumFacing getInputDirection() { return this.inputFace; } @Override - public ForgeDirection getOutputDirection() + public EnumFacing getOutputDirection() { return this.outputFace; } @Override - public void setInputDirection(ForgeDirection direction) + public void setInputDirection(EnumFacing direction) { this.inputFace = direction; } @Override - public void setOutputDirection(ForgeDirection direction) + public void setOutputDirection(EnumFacing direction) { this.outputFace = direction; } - public static int getIntForForgeDirection(ForgeDirection direction) + public static int getIntForEnumFacing(EnumFacing direction) { switch (direction) { @@ -92,7 +92,7 @@ public class TEOrientable extends TileEntity implements IOrientable } - public boolean isSideRendered(ForgeDirection side) + public boolean isSideRendered(EnumFacing side) { if (side.equals(this.getInputDirection()) || side.equals(this.getOutputDirection())) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java index ff2d1875..87ff82be 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java @@ -46,7 +46,7 @@ public class TEPedestal extends TEInventory } @Override - public String getInventoryName() + public String getName() { return "TEPedestal"; } @@ -57,13 +57,6 @@ public class TEPedestal extends TEInventory return 1; } - //Logic for the actual block is under here - @Override - public void updateEntity() - { - super.updateEntity(); - } - public void setActive() { isActive = false; @@ -134,12 +127,12 @@ public class TEPedestal extends TEInventory public void onItemDeletion() { - worldObj.addWeatherEffect(new EntityLightningBolt(worldObj, xCoord, yCoord, zCoord)); - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.addWeatherEffect(new EntityLightningBolt(worldObj, pos.getX(), pos.getY(), pos.getZ())); + worldObj.markBlockForUpdate(pos); for (int i = 0; i < 16; i++) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 2, xCoord, yCoord, zCoord); + SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 2, pos); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java index 8ad6d782..4096e114 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java @@ -10,7 +10,9 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.network.Packet; +import net.minecraft.server.gui.IUpdatePlayerListBox; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraftforge.common.util.Constants; import net.minecraftforge.oredict.OreDictionary; import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry; @@ -20,7 +22,7 @@ import WayofTime.alchemicalWizardry.common.NewPacketHandler; import WayofTime.alchemicalWizardry.common.PlinthComponent; import WayofTime.alchemicalWizardry.common.items.EnergyBattery; -public class TEPlinth extends TEInventory +public class TEPlinth extends TEInventory implements IUpdatePlayerListBox { public static final int sizeInv = 1; @@ -149,7 +151,7 @@ public class TEPlinth extends TEInventory } @Override - public String getInventoryName() + public String getName() { return "TEPlinth"; } @@ -162,10 +164,8 @@ public class TEPlinth extends TEInventory //Logic for the actual block is under here @Override - public void updateEntity() + public void update() { - super.updateEntity(); - if (worldObj.isRemote) { return; @@ -251,7 +251,7 @@ public class TEPlinth extends TEInventory if (entity != null) { - entity.setPosition(xCoord + 0.5, yCoord + 1, zCoord + 0.5); + entity.setPosition(pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5); worldObj.spawnEntityInWorld(entity); if (entity instanceof IDemon) @@ -266,7 +266,7 @@ public class TEPlinth extends TEInventory if (worldObj != null) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } } } @@ -284,12 +284,13 @@ public class TEPlinth extends TEInventory { if (i < 6 && pc.getRing() == ring) { - TileEntity tileEntity = worldObj.getTileEntity(xCoord + pc.xOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); + BlockPos newPos = pos.add(pc.xOffset, pc.yOffset, pc.zOffset); + TileEntity tileEntity = worldObj.getTileEntity(newPos); if (tileEntity instanceof TEPedestal) { ((TEPedestal) tileEntity).setInventorySlotContents(0, null); - worldObj.markBlockForUpdate(xCoord + pc.xOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); + worldObj.markBlockForUpdate(newPos); i++; } } @@ -302,12 +303,13 @@ public class TEPlinth extends TEInventory { if (i < 6 && pc.getRing() == ring) { - TileEntity tileEntity = worldObj.getTileEntity(xCoord + pc.zOffset, yCoord + pc.yOffset, zCoord + pc.xOffset); + BlockPos newPos = pos.add(pc.zOffset, pc.yOffset, pc.xOffset); + TileEntity tileEntity = worldObj.getTileEntity(newPos); if (tileEntity instanceof TEPedestal) { ((TEPedestal) tileEntity).setInventorySlotContents(0, null); - worldObj.markBlockForUpdate(xCoord + pc.zOffset, yCoord + pc.yOffset, zCoord + pc.xOffset); + worldObj.markBlockForUpdate(newPos); i++; } } @@ -330,7 +332,8 @@ public class TEPlinth extends TEInventory { if (i < 6 && pc.getRing() == ring) { - TileEntity tileEntity = worldObj.getTileEntity(xCoord + pc.xOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); + BlockPos newPos = pos.add(pc.xOffset, pc.yOffset, pc.zOffset); + TileEntity tileEntity = worldObj.getTileEntity(newPos); if (tileEntity instanceof TEPedestal) { @@ -365,7 +368,7 @@ public class TEPlinth extends TEInventory ((TEPedestal) tileEntity).setInventorySlotContents(0, null); } ((TEPedestal) tileEntity).onItemDeletion(); - worldObj.markBlockForUpdate(xCoord + pc.xOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); + worldObj.markBlockForUpdate(newPos); return true; } } @@ -382,7 +385,8 @@ public class TEPlinth extends TEInventory { if (i < 6 && pc.getRing() == ring) { - TileEntity tileEntity = worldObj.getTileEntity(xCoord + pc.zOffset, yCoord + pc.yOffset, zCoord + pc.xOffset); + BlockPos newPos = pos.add(pc.zOffset, pc.yOffset, pc.xOffset); + TileEntity tileEntity = worldObj.getTileEntity(newPos); if (tileEntity instanceof TEPedestal) { @@ -413,7 +417,7 @@ public class TEPlinth extends TEInventory { ((TEPedestal) tileEntity).decrStackSize(0, 1); ((TEPedestal) tileEntity).onItemDeletion(); - worldObj.markBlockForUpdate(xCoord + pc.zOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); + worldObj.markBlockForUpdate(newPos); return true; } } @@ -439,7 +443,8 @@ public class TEPlinth extends TEInventory { if (i < 6 && pc.getRing() == ring) { - TileEntity tileEntity = worldObj.getTileEntity(xCoord + pc.xOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); + BlockPos newPos = pos.add(pc.xOffset, pc.yOffset, pc.zOffset); + TileEntity tileEntity = worldObj.getTileEntity(newPos); if (tileEntity instanceof TEPedestal) { @@ -456,7 +461,8 @@ public class TEPlinth extends TEInventory { if (i < 6 && pc.getRing() == ring) { - TileEntity tileEntity = worldObj.getTileEntity(xCoord + pc.zOffset, yCoord + pc.yOffset, zCoord + pc.xOffset); + BlockPos newPos = pos.add(pc.zOffset, pc.yOffset, pc.xOffset); + TileEntity tileEntity = worldObj.getTileEntity(newPos); if (tileEntity instanceof TEPedestal) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java index 6efd07e2..02ad475a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java @@ -1,31 +1,38 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.api.ColourAndCoords; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.api.alchemy.energy.*; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityParticleBeam; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.network.NetworkManager; -import net.minecraft.network.Packet; -import net.minecraft.network.play.server.S35PacketUpdateTileEntity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraftforge.common.util.Constants; -import net.minecraftforge.common.util.ForgeDirection; - import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Map.Entry; -public class TEReagentConduit extends TileSegmentedReagentHandler +import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.server.gui.IUpdatePlayerListBox; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.world.World; +import net.minecraftforge.common.util.Constants; +import WayofTime.alchemicalWizardry.api.ColourAndCoords; +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; +import WayofTime.alchemicalWizardry.api.alchemy.energy.TileSegmentedReagentHandler; +import WayofTime.alchemicalWizardry.common.entity.projectile.EntityParticleBeam; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class TEReagentConduit extends TileSegmentedReagentHandler implements IUpdatePlayerListBox { public List<ColourAndCoords> destinationList; //These are offsets public Map<Reagent, List<Int3>> reagentTargetList; @@ -253,7 +260,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler } @Override - public void updateEntity() + public void update() { if (!worldObj.isRemote) { @@ -270,7 +277,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler this.updateColourList(); } - if (affectedByRedstone && worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)) + if (affectedByRedstone && worldObj.isBlockPowered(pos)) //isBlockBeingIndirectlyPowered() { return; } @@ -286,7 +293,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler break; } - ReagentStack maxDrainAmount = this.drain(ForgeDirection.UNKNOWN, new ReagentStack(entry.getKey(), this.tickRate - totalTransfered), false); + ReagentStack maxDrainAmount = this.drain(EnumFacing.UP, new ReagentStack(entry.getKey(), this.tickRate - totalTransfered), false); if (maxDrainAmount == null) { @@ -300,28 +307,26 @@ public class TEReagentConduit extends TileSegmentedReagentHandler continue; } - int x = xCoord + coord.xCoord; - int y = yCoord + coord.yCoord; - int z = zCoord + coord.zCoord; + BlockPos newPos = pos.add(coord.xCoord, coord.yCoord, coord.zCoord); - TileEntity tile = worldObj.getTileEntity(x, y, z); + TileEntity tile = worldObj.getTileEntity(newPos); if (tile instanceof IReagentHandler) { - int amount = Math.min(((IReagentHandler) tile).fill(ForgeDirection.UNKNOWN, maxDrainAmount, false), amountLeft); + int amount = Math.min(((IReagentHandler) tile).fill(EnumFacing.UP, maxDrainAmount, false), amountLeft); if (amount > 0) { amountLeft -= amount; totalTransfered += amount; - ReagentStack stack = this.drain(ForgeDirection.UNKNOWN, new ReagentStack(entry.getKey(), amount), true); - ((IReagentHandler) tile).fill(ForgeDirection.UNKNOWN, stack, true); + ReagentStack stack = this.drain(EnumFacing.UP, new ReagentStack(entry.getKey(), amount), true); + ((IReagentHandler) tile).fill(EnumFacing.UP, stack, true); } } } } } else { - if (affectedByRedstone && worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)) + if (affectedByRedstone && worldObj.isBlockPowered(pos)) { return; } @@ -348,16 +353,17 @@ public class TEReagentConduit extends TileSegmentedReagentHandler { for (ColourAndCoords colourSet : this.destinationList) { - if (!(worldObj.getTileEntity(xCoord + colourSet.xCoord, yCoord + colourSet.yCoord, zCoord + colourSet.zCoord) instanceof IReagentHandler)) + BlockPos newPos = pos.add(colourSet.xCoord, colourSet.yCoord, colourSet.zCoord); + if (!(worldObj.getTileEntity(newPos) instanceof IReagentHandler)) { continue; } - EntityParticleBeam beam = new EntityParticleBeam(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5); + EntityParticleBeam beam = new EntityParticleBeam(worldObj, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5); double velocity = Math.sqrt(Math.pow(colourSet.xCoord, 2) + Math.pow(colourSet.yCoord, 2) + Math.pow(colourSet.zCoord, 2)); double wantedVel = 0.3d; beam.setVelocity(wantedVel * colourSet.xCoord / velocity, wantedVel * colourSet.yCoord / velocity, wantedVel * colourSet.zCoord / velocity); beam.setColour(colourSet.colourRed / 255f, colourSet.colourGreen / 255f, colourSet.colourBlue / 255f); - beam.setDestination(xCoord + colourSet.xCoord, yCoord + colourSet.yCoord, zCoord + colourSet.zCoord); + beam.setDestination(pos.getX() + colourSet.xCoord, pos.getY() + colourSet.yCoord, pos.getZ() + colourSet.zCoord); worldObj.spawnEntityInWorld(beam); } } @@ -375,7 +381,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler if (newList != null && !newList.equals(destinationList)) { this.destinationList = newList; - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } } @@ -421,7 +427,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler public boolean addDestinationViaActual(int red, int green, int blue, int intensity, int x, int y, int z) { - return this.addDestinationViaOffset(red, green, blue, intensity, x - this.xCoord, y - this.yCoord, z - this.zCoord); + return this.addDestinationViaOffset(red, green, blue, intensity, x - pos.getX(), y - pos.getY(), z - pos.getZ()); } @Override @@ -429,14 +435,14 @@ public class TEReagentConduit extends TileSegmentedReagentHandler { NBTTagCompound nbttagcompound = new NBTTagCompound(); writeClientNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 90210, nbttagcompound); + return new S35PacketUpdateTileEntity(pos, 90210, nbttagcompound); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) { super.onDataPacket(net, packet); - readClientNBT(packet.func_148857_g()); + readClientNBT(packet.getNbtCompound()); } public boolean addReagentDestinationViaOffset(Reagent reagent, int xOffset, int yOffset, int zOffset) @@ -490,7 +496,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler public boolean addReagentDestinationViaActual(Reagent reagent, int x, int y, int z) { - return (this.addReagentDestinationViaOffset(reagent, x - xCoord, y - yCoord, z - zCoord)); + return (this.addReagentDestinationViaOffset(reagent, x - pos.getX(), y - pos.getY(), z - pos.getZ())); } public boolean removeReagentDestinationViaOffset(Reagent reagent, int xOffset, int yOffset, int zOffset) @@ -510,15 +516,15 @@ public class TEReagentConduit extends TileSegmentedReagentHandler public boolean removeReagentDestinationViaActual(Reagent reagent, int x, int y, int z) { - return this.removeReagentDestinationViaOffset(reagent, x - xCoord, y - yCoord, z - zCoord); + return this.removeReagentDestinationViaOffset(reagent, x - pos.getX(), y - pos.getY(), z - pos.getZ()); } @Override - public int fill(ForgeDirection from, ReagentStack resource, boolean doFill) + public int fill(EnumFacing from, ReagentStack resource, boolean doFill) { if (doFill && !worldObj.isRemote) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); hasChanged = 2; } @@ -526,11 +532,11 @@ public class TEReagentConduit extends TileSegmentedReagentHandler } @Override - public ReagentStack drain(ForgeDirection from, ReagentStack resource, boolean doDrain) + public ReagentStack drain(EnumFacing from, ReagentStack resource, boolean doDrain) { if (doDrain && !worldObj.isRemote) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); hasChanged = 2; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java index b1aa3e94..e4e46c92 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java @@ -1,19 +1,22 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.common.demonVillage.BuildingSchematic; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; - import java.io.FileWriter; import java.io.IOException; import java.io.Writer; import java.util.Random; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.common.demonVillage.BuildingSchematic; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + public class TESchematicSaver extends TileEntity { public Block targetBlock = ModBlocks.largeBloodStoneBrick; @@ -35,14 +38,15 @@ public class TESchematicSaver extends TileEntity { for (int k = -negZ + 1; k <= posZ - 1; k++) { - int meta = worldObj.getBlockMetadata(xCoord + i, yCoord + j, zCoord + k); - Block block = worldObj.getBlock(xCoord + i, yCoord + j, zCoord + k); + BlockPos newPos = pos.add(i, j, k); + IBlockState state = worldObj.getBlockState(newPos); + Block block = state.getBlock(); + int meta = block.getMetaFromState(state); - if (!block.isAir(worldObj, xCoord + i, yCoord + j, zCoord + k)) + if (!block.isAir(worldObj, newPos)) { schematic.addBlockWithMeta(block, meta, i, j, k); } - } } @@ -70,7 +74,7 @@ public class TESchematicSaver extends TileEntity int i = 1; while (i < 100) { - if (targetBlock == (worldObj.getBlock(xCoord, yCoord + i, zCoord))) + if (targetBlock == (worldObj.getBlockState(pos.add(0, i, 0)).getBlock())) { return i; } @@ -85,7 +89,7 @@ public class TESchematicSaver extends TileEntity int i = 1; while (i < 100) { - if (targetBlock == (worldObj.getBlock(xCoord, yCoord - i, zCoord))) + if (targetBlock == (worldObj.getBlockState(pos.add(0, -i, 0)).getBlock())) { return i; } @@ -100,7 +104,7 @@ public class TESchematicSaver extends TileEntity int i = 1; while (i < 100) { - if (targetBlock == (worldObj.getBlock(xCoord + i, yCoord, zCoord))) + if (targetBlock == (worldObj.getBlockState(pos.add(i, 0, 0)).getBlock())) { return i; } @@ -115,7 +119,7 @@ public class TESchematicSaver extends TileEntity int i = 1; while (i < 100) { - if (targetBlock == (worldObj.getBlock(xCoord - i, yCoord, zCoord))) + if (targetBlock == (worldObj.getBlockState(pos.add(-i, 0, 0)).getBlock())) { return i; } @@ -130,7 +134,7 @@ public class TESchematicSaver extends TileEntity int i = 1; while (i < 100) { - if (targetBlock == (worldObj.getBlock(xCoord, yCoord, zCoord + i))) + if (targetBlock == (worldObj.getBlockState(pos.add(0, 0, i)).getBlock())) { return i; } @@ -145,7 +149,7 @@ public class TESchematicSaver extends TileEntity int i = 1; while (i < 100) { - if (targetBlock == (worldObj.getBlock(xCoord, yCoord, zCoord - i))) + if (targetBlock == (worldObj.getBlockState(pos.add(0, 0, -i)).getBlock())) { return i; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESocket.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESocket.java index faa72994..2dab8da8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESocket.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESocket.java @@ -45,7 +45,7 @@ public class TESocket extends TEInventory } @Override - public String getInventoryName() + public String getName() { return "TESocket"; } @@ -56,13 +56,6 @@ public class TESocket extends TEInventory return 1; } - //Logic for the actual block is under here - @Override - public void updateEntity() - { - super.updateEntity(); - } - public void setActive() { isActive = false; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralBlock.java index 22e637c3..56ddd107 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralBlock.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.ModBlocks; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.server.gui.IUpdatePlayerListBox; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.ModBlocks; -public class TESpectralBlock extends TileEntity +public class TESpectralBlock extends TileEntity implements IUpdatePlayerListBox { private int ticksRemaining; @@ -31,31 +33,30 @@ public class TESpectralBlock extends TileEntity } @Override - public void updateEntity() + public void update() { - super.updateEntity(); - -// if (worldObj.isRemote) + if (worldObj.isRemote) { -// return; + return; } this.ticksRemaining--; if (this.ticksRemaining <= 0) { - worldObj.setBlockToAir(xCoord, yCoord, zCoord); + worldObj.setBlockToAir(pos); } } - public static boolean createSpectralBlockAtLocation(World world, int x, int y, int z, int duration) + public static boolean createSpectralBlockAtLocation(World world, BlockPos pos, int duration) { - if (!world.isAirBlock(x, y, z)) + if (!world.isAirBlock(pos)) { return false; } - world.setBlock(x, y, z, ModBlocks.spectralBlock); - TileEntity tile = world.getTileEntity(x, y, z); + + world.setBlockState(pos, ModBlocks.spectralBlock.getDefaultState()); + TileEntity tile = world.getTileEntity(pos); if (tile instanceof TESpectralBlock) { ((TESpectralBlock) tile).setDuration(duration); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralContainer.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralContainer.java index 1ee0076c..5936d83f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralContainer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralContainer.java @@ -1,17 +1,20 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.ModBlocks; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; +import net.minecraft.server.gui.IUpdatePlayerListBox; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; import net.minecraftforge.fluids.IFluidBlock; +import WayofTime.alchemicalWizardry.ModBlocks; -public class TESpectralContainer extends TileEntity +public class TESpectralContainer extends TileEntity implements IUpdatePlayerListBox { private ItemStack[] inv; @@ -66,10 +69,8 @@ public class TESpectralContainer extends TileEntity } @Override - public void updateEntity() + public void update() { - super.updateEntity(); - this.ticksRemaining--; if (this.ticksRemaining <= 0) @@ -78,22 +79,23 @@ public class TESpectralContainer extends TileEntity } } - public static boolean createSpectralBlockAtLocation(World world, int x, int y, int z, int duration) + public static boolean createSpectralBlockAtLocation(World world, BlockPos pos, int duration) { - Block block = world.getBlock(x, y, z); + IBlockState state = world.getBlockState(pos); + Block block = state.getBlock(); if (block == null) { return false; } - if (world.getTileEntity(x, y, z) == null || block instanceof IFluidBlock) + if (world.getTileEntity(pos) == null || block instanceof IFluidBlock) { - int meta = world.getBlockMetadata(x, y, z); + int meta = block.getMetaFromState(state); ItemStack item = new ItemStack(block, 1, meta); - world.setBlock(x, y, z, ModBlocks.blockSpectralContainer); - TileEntity tile = world.getTileEntity(x, y, z); + world.setBlockState(pos, ModBlocks.blockSpectralContainer.getDefaultState()); + TileEntity tile = world.getTileEntity(pos); if (tile instanceof TESpectralContainer) { ((TESpectralContainer) tile).setContainedItem(item); @@ -130,18 +132,18 @@ public class TESpectralContainer extends TileEntity { if (item.getItem() instanceof ItemBlock) { - Block block = ((ItemBlock) item.getItem()).field_150939_a; + Block block = ((ItemBlock) item.getItem()).getBlock(); int meta = item.getItemDamage(); if (block != null) { - this.worldObj.setBlock(xCoord, yCoord, zCoord, block, meta, 6); + this.worldObj.setBlockState(pos, block.getStateFromMeta(meta), 6); } } } else { - this.worldObj.setBlockToAir(xCoord, yCoord, zCoord); + this.worldObj.setBlockToAir(pos); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java index 5e38781c..c83379c9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java @@ -1,9 +1,9 @@ package WayofTime.alchemicalWizardry.common.tileEntity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; import WayofTime.alchemicalWizardry.api.tile.ISpellTile; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; public abstract class TESpellBlock extends TEOrientable implements ISpellTile { @@ -23,12 +23,12 @@ public abstract class TESpellBlock extends TEOrientable implements ISpellTile public TESpellBlock getTileAtOutput() { - ForgeDirection output = this.getOutputDirection(); - int xOffset = output.offsetX; - int yOffset = output.offsetY; - int zOffset = output.offsetZ; + EnumFacing output = this.getOutputDirection(); + int xOffset = output.getFrontOffsetX(); + int yOffset = output.getFrontOffsetY(); + int zOffset = output.getFrontOffsetZ(); - TileEntity tile = worldObj.getTileEntity(xCoord + xOffset, yCoord + yOffset, zCoord + zOffset); + TileEntity tile = worldObj.getTileEntity(pos.add(output.getDirectionVec())); if (tile instanceof TESpellBlock && ((TESpellBlock) tile).canInputRecieveOutput(output)) { @@ -44,7 +44,7 @@ public abstract class TESpellBlock extends TEOrientable implements ISpellTile } @Override - public boolean canInputRecieveOutput(ForgeDirection output) + public boolean canInputRecieveOutput(EnumFacing output) { return this.canInputRecieve() && this.getInputDirection().getOpposite() == output; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEffectBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEffectBlock.java index 28f3f504..da988b1a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEffectBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEffectBlock.java @@ -14,7 +14,7 @@ public class TESpellEffectBlock extends TESpellBlock public SpellEffect getSpellEffect() { - int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); + int meta = this.getBlockMetadata(); switch (meta) { case 0: diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEnhancementBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEnhancementBlock.java index 2682d67b..13aaf122 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEnhancementBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEnhancementBlock.java @@ -37,7 +37,7 @@ public class TESpellEnhancementBlock extends TESpellBlock public SpellEnhancement getSpellEnhancement() { - int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); + int meta = this.getBlockMetadata(); switch (meta) { case 0: @@ -64,7 +64,7 @@ public class TESpellEnhancementBlock extends TESpellBlock public int getLimit() { - int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); + int meta = this.getBlockMetadata(); switch (meta) { case 0: @@ -103,7 +103,7 @@ public class TESpellEnhancementBlock extends TESpellBlock public int enhancementType() //0 is power, 1 is cost, 2 is potency { - int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); + int meta = this.getBlockMetadata(); switch (meta) { case 0: diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellModifierBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellModifierBlock.java index 06787e48..b1a3e1fa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellModifierBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellModifierBlock.java @@ -13,7 +13,7 @@ public class TESpellModifierBlock extends TESpellBlock public ComplexSpellModifier getSpellModifier() { - int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); + int meta = this.getBlockMetadata(); switch (meta) { case 0: diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java index 21f12faa..4e06b26d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java @@ -2,8 +2,8 @@ package WayofTime.alchemicalWizardry.common.tileEntity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; @@ -15,7 +15,7 @@ public class TESpellParadigmBlock extends TESpellBlock implements ISpellParadigm { public SpellParadigm getSpellParadigm() { - int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); + int meta = this.getBlockMetadata(); switch (meta) { case 0: @@ -68,14 +68,14 @@ public class TESpellParadigmBlock extends TESpellBlock implements ISpellParadigm } @Override - public void setInputDirection(ForgeDirection direction) + public void setInputDirection(EnumFacing direction) { } @Override - public ForgeDirection getInputDirection() + public EnumFacing getInputDirection() { - return ForgeDirection.UNKNOWN; + return EnumFacing.WEST; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java index e9ae36df..3687e1ad 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java @@ -3,13 +3,14 @@ package WayofTime.alchemicalWizardry.common.tileEntity; import java.util.Iterator; import java.util.List; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.Packet; +import net.minecraft.server.gui.IUpdatePlayerListBox; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.common.NewPacketHandler; import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; @@ -17,7 +18,7 @@ import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -public class TETeleposer extends TEInventory +public class TETeleposer extends TEInventory implements IUpdatePlayerListBox { public static final int sizeInv = 1; @@ -59,7 +60,7 @@ public class TETeleposer extends TEInventory } @Override - public String getInventoryName() + public String getName() { return "TETeleposer"; } @@ -72,16 +73,14 @@ public class TETeleposer extends TEInventory //Logic for the actual block is under here @Override - public void updateEntity() + public void update() { - super.updateEntity(); - if (worldObj.isRemote) { return; } - int currentInput = worldObj.getBlockPowerInput(xCoord, yCoord, zCoord); + int currentInput = worldObj.getStrongPower(pos); if (previousInput == 0 && currentInput != 0) { @@ -93,18 +92,20 @@ public class TETeleposer extends TEInventory int xf = focusItem.xCoord(focus); int yf = focusItem.yCoord(focus); int zf = focusItem.zCoord(focus); + BlockPos posF = focusItem.getBlockPos(focus); + World worldF = focusItem.getWorld(focus); - int damage = (int) (0.5f * Math.sqrt((xCoord - xf) * (xCoord - xf) + (yCoord - yf + 1) * (yCoord - yf + 1) + (zCoord - zf) * (zCoord - zf))); + int damage = (int) (0.5f * Math.sqrt(pos.distanceSq(posF))); int focusLevel = focusItem.getFocusLevel(); int transportCount = 0; int entityCount = 0; - if (worldF != null && worldF.getTileEntity(xf, yf, zf) instanceof TETeleposer && !worldF.getTileEntity(xf, yf, zf).equals(this)) + if (worldF != null && worldF.getTileEntity(posF) instanceof TETeleposer && !worldF.getTileEntity(posF).equals(this)) { //Prime the teleportation int d0 = focusLevel - 1; - AxisAlignedBB axisalignedbb1 = AxisAlignedBB.getBoundingBox((double) this.xCoord-0.5, (double) this.yCoord + d0 + 0.5, (double) this.zCoord-0.5, (double) (this.xCoord + 0.5), (double) (this.yCoord + 1.5 + d0), (double) (this.zCoord + 0.5)).expand(d0, d0, d0); - axisalignedbb1.maxY = Math.min((double) this.worldObj.getHeight(), this.yCoord + 2 + d0 + d0); + AxisAlignedBB axisalignedbb1 = new AxisAlignedBB(pos.add(0, 1, 0), pos.add(1, 2, 1)).expand(d0, d0, d0); +// axisalignedbb1.maxY = Math.min((double) this.worldObj.getHeight(), pos.getY() + 2 + d0 + d0); List list1 = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb1); Iterator iterator1 = list1.iterator(); EntityLivingBase entityplayer1; @@ -115,7 +116,7 @@ public class TETeleposer extends TEInventory entityCount++; } - AxisAlignedBB axisalignedbb2 = AxisAlignedBB.getBoundingBox(xf-0.5, yf + d0 + 0.5, zf-0.5, xf + 0.5, yf + 1.5 + d0, zf+0.5).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb2 = new AxisAlignedBB(xf-0.5, yf + d0 + 0.5, zf-0.5, xf + 0.5, yf + 1.5 + d0, zf+0.5).expand(d0, d0, d0); List list2 = worldF.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb2); Iterator iterator2 = list2.iterator(); EntityLivingBase entityplayer2; @@ -134,7 +135,7 @@ public class TETeleposer extends TEInventory for (int j = -(focusLevel - 1); j <= (focusLevel - 1); j++) { { - if (BlockTeleposer.swapBlocks(this, worldObj, worldF, xCoord + i, yCoord + 1 + k, zCoord + j, xf + i, yf + 1 + k, zf + j)) + if (BlockTeleposer.swapBlocks(this, worldObj, worldF, pos.add(i, 1 + k, j), posF.add(i, 1 + k, j))) { transportCount++; } @@ -147,7 +148,7 @@ public class TETeleposer extends TEInventory entityCount = 0; } - SoulNetworkHandler.syphonFromNetwork(focus, damage * transportCount + damage * entityCount); + EnergyItems.syphonWhileInContainer(focus, damage * transportCount + damage * entityCount); //Teleport if (worldF.equals(worldObj)) @@ -159,14 +160,14 @@ public class TETeleposer extends TEInventory { entityplayer1 = (EntityLivingBase) iterator1.next(); entityplayer1.worldObj = worldF; - entityplayer1.setPositionAndUpdate(entityplayer1.posX - this.xCoord + xf, entityplayer1.posY - this.yCoord + yf, entityplayer1.posZ - this.zCoord + zf); + entityplayer1.setPositionAndUpdate(entityplayer1.posX - pos.getX() + xf, entityplayer1.posY - pos.getY() + yf, entityplayer1.posZ - pos.getZ() + zf); } while (iterator2.hasNext()) { entityplayer2 = (EntityLivingBase) iterator2.next(); entityplayer2.worldObj = worldF; - entityplayer2.setPositionAndUpdate(entityplayer2.posX + this.xCoord - xf, entityplayer2.posY + this.yCoord - yf, entityplayer2.posZ + this.zCoord - zf); + entityplayer2.setPositionAndUpdate(entityplayer2.posX + pos.getX() - xf, entityplayer2.posY + pos.getY() - yf, entityplayer2.posZ + pos.getZ() - zf); } }else { @@ -176,17 +177,17 @@ public class TETeleposer extends TEInventory while (iterator1.hasNext()) { entityplayer1 = (EntityLivingBase) iterator1.next(); - SpellHelper.teleportEntityToDim(worldObj, worldF.provider.dimensionId, entityplayer1.posX - this.xCoord + xf, entityplayer1.posY - this.yCoord + yf, entityplayer1.posZ - this.zCoord + zf, entityplayer1); + SpellHelper.teleportEntityToDim(worldObj, worldF.provider.getDimensionId(), entityplayer1.posX - pos.getX() + xf, entityplayer1.posY - pos.getY() + yf, entityplayer1.posZ - pos.getZ() + zf, entityplayer1); // entityplayer1.worldObj = worldF; -// entityplayer1.setPositionAndUpdate(entityplayer1.posX - this.xCoord + xf, entityplayer1.posY - this.yCoord + yf, entityplayer1.posZ - this.zCoord + zf); +// entityplayer1.setPositionAndUpdate(entityplayer1.posX - pos.getX() + xf, entityplayer1.posY - pos.getY() + yf, entityplayer1.posZ - pos.getZ() + zf); } while (iterator2.hasNext()) { entityplayer2 = (EntityLivingBase) iterator2.next(); - SpellHelper.teleportEntityToDim(worldF, worldObj.provider.dimensionId, entityplayer2.posX + this.xCoord - xf, entityplayer2.posY + this.yCoord - yf, entityplayer2.posZ + this.zCoord - zf, entityplayer2); + SpellHelper.teleportEntityToDim(worldF, worldObj.provider.getDimensionId(), entityplayer2.posX + pos.getX() - xf, entityplayer2.posY + pos.getY() - yf, entityplayer2.posZ + pos.getZ() - zf, entityplayer2); // entityplayer2.worldObj = worldF; -// entityplayer2.setPositionAndUpdate(entityplayer2.posX + this.xCoord - xf, entityplayer2.posY + this.yCoord - yf, entityplayer2.posZ + this.zCoord - zf); +// entityplayer2.setPositionAndUpdate(entityplayer2.posX + pos.getX() - xf, entityplayer2.posY + pos.getY() - yf, entityplayer2.posZ + pos.getZ() - zf); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java index 101950d1..270fce74 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java @@ -5,7 +5,8 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.server.gui.IUpdatePlayerListBox; +import net.minecraft.util.EnumFacing; import net.minecraftforge.oredict.OreDictionary; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler; @@ -22,7 +23,7 @@ import WayofTime.alchemicalWizardry.common.alchemy.ICombinationalCatalyst; import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -public class TEWritingTable extends TEInventory implements ISidedInventory +public class TEWritingTable extends TEInventory implements ISidedInventory, IUpdatePlayerListBox { public static final int sizeInv = 7; @@ -59,7 +60,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory } @Override - public String getInventoryName() + public String getName() { return "aw.TEWritingTable"; } @@ -298,7 +299,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory } @Override - public void updateEntity() + public void update() { int progressNeeded = 100; long worldTime = worldObj.getWorldTime(); @@ -322,7 +323,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldTime % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); + SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); } if (progress >= progressNeeded) @@ -337,7 +338,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldObj != null) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } return; @@ -353,7 +354,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldObj != null) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } return; @@ -374,7 +375,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldObj != null) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } } } @@ -386,7 +387,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldTime % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); + SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); } if (progress >= progressNeeded) @@ -401,7 +402,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldObj != null) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } return; @@ -417,7 +418,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldObj != null) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } return; @@ -429,7 +430,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory this.setInventorySlotContents(6, flaskStack); } else { - worldObj.createExplosion(null, xCoord + 0.5, yCoord + 1, zCoord + 0.5, 2, false); + worldObj.createExplosion(null, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, 2, false); } this.decrStackSize(this.getPotionFlaskPosition(), 1); @@ -439,7 +440,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldObj != null) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } } } @@ -452,7 +453,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldTime % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); + SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); } if (progress >= progressNeeded) @@ -466,7 +467,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldObj != null) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } return; @@ -479,7 +480,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldObj != null) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } } } @@ -491,7 +492,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldTime % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); + SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); } if (progress >= progressNeeded) @@ -505,7 +506,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldObj != null) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } return; @@ -520,7 +521,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldObj != null) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } } } @@ -533,7 +534,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldTime % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); + SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); } if (progress >= progressNeeded) @@ -547,7 +548,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldObj != null) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } return; @@ -564,7 +565,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldObj != null) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } } } @@ -584,7 +585,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldObj != null) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } } @@ -599,7 +600,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldTime % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); + SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); } progress += acceleration; @@ -620,14 +621,14 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldObj != null) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } } } else if (getStackInSlot(6).getItem() == getResultingItemStack().getItem() && getResultingItemStack().stackSize <= (getStackInSlot(6).getMaxStackSize() - getStackInSlot(6).stackSize)) { if (worldTime % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); + SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); } if (!SoulNetworkHandler.syphonFromNetworkWhileInContainer(getStackInSlot(0), amountUsed * acceleration)) @@ -655,7 +656,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory if (worldObj != null) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + worldObj.markBlockForUpdate(pos); } } } @@ -737,10 +738,9 @@ public class TEWritingTable extends TEInventory implements ISidedInventory } @Override - public int[] getAccessibleSlotsFromSide(int side) + public int[] getSlotsForFace(EnumFacing facing) { - ForgeDirection dir = ForgeDirection.getOrientation(side); - switch(dir) + switch(facing) { case DOWN: return new int[]{6}; @@ -750,13 +750,13 @@ public class TEWritingTable extends TEInventory implements ISidedInventory } @Override - public boolean canInsertItem(int slot, ItemStack stack, int side) + public boolean canInsertItem(int slot, ItemStack stack, EnumFacing facing) { return slot != 6; } @Override - public boolean canExtractItem(int slot, ItemStack stack, int side) + public boolean canExtractItem(int slot, ItemStack stack, EnumFacing facing) { return slot == 6; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java index 135de81b..587178d7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java @@ -1,8 +1,11 @@ package WayofTime.alchemicalWizardry.common.tileEntity.gui; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; +import net.minecraftforge.fml.common.network.IGuiHandler; import WayofTime.alchemicalWizardry.common.items.sigil.holding.ContainerHolding; import WayofTime.alchemicalWizardry.common.items.sigil.holding.GuiHolding; import WayofTime.alchemicalWizardry.common.items.sigil.holding.InventoryHolding; @@ -10,7 +13,6 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerTeleposer; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable; -import cpw.mods.fml.common.network.IGuiHandler; public class GuiHandler implements IGuiHandler { @@ -19,11 +21,12 @@ public class GuiHandler implements IGuiHandler public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { TileEntity tileEntity; + BlockPos pos = new BlockPos(x, y, z); switch (id) { case 0: - tileEntity = world.getTileEntity(x, y, z); + tileEntity = world.getTileEntity(pos); if (tileEntity instanceof TEWritingTable) { @@ -31,7 +34,7 @@ public class GuiHandler implements IGuiHandler } case 1: - tileEntity = world.getTileEntity(x, y, z); + tileEntity = world.getTileEntity(pos); if (tileEntity instanceof TETeleposer) { @@ -50,11 +53,14 @@ public class GuiHandler implements IGuiHandler public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { TileEntity tileEntity; - + BlockPos pos = new BlockPos(x, y, z); + + ItemStack held = player.getHeldItem(); + switch (id) { case 0: - tileEntity = world.getTileEntity(x, y, z); + tileEntity = world.getTileEntity(pos); if (tileEntity instanceof TEWritingTable) { @@ -64,7 +70,7 @@ public class GuiHandler implements IGuiHandler break; case 1: - tileEntity = world.getTileEntity(x, y, z); + tileEntity = world.getTileEntity(pos); if (tileEntity instanceof TETeleposer) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiTeleposer.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiTeleposer.java index 050849d6..35187582 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiTeleposer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiTeleposer.java @@ -2,6 +2,7 @@ package WayofTime.alchemicalWizardry.common.tileEntity.gui; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerTeleposer; +import net.minecraft.client.gui.inventory.GuiBrewingStand; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; diff --git a/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang b/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang index 47e8fca7..9893f913 100644 --- a/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang +++ b/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang @@ -328,7 +328,7 @@ tooltip.attunedcrystal.desc1=A tool to tune alchemy tooltip.attunedcrystal.desc2=reagent transmission tooltip.blankspell.desc=Crystal of infinite possibilities. tooltip.bloodframe.desc=Stirs bees into a frenzy. -tooltip.bloodletterpack.desc=This pack really chaffs... +tooltip.bloodletterpack.desc=This pack really chaffes... tooltip.bloodlightsigil.desc=I see a light! tooltip.boundarmor.devprotect=Devilish Protection tooltip.boundaxe.desc=Axe me about my puns! @@ -393,7 +393,7 @@ tooltip.ritualdiviner.ritualtunedto=Ritual tuned to face: tooltip.ritualdiviner.waterstones=Water Stones: tooltip.ritualdiviner.dawnstones=Dawn Stones: tooltip.ritualdiviner.totalStones=Total Stones: -tooltip.dismatler.desc=You can turn this upside down? +tooltip.dismatler.desc=You could turn this upside down? tooltip.sacrificialdagger.desc1=A slight draining feeling tickles your fingers tooltip.sacrificialdagger.desc2=Just a prick of the tooltip.sacrificialdagger.desc3=finger will suffice... @@ -468,53 +468,9 @@ message.routerfocus.limit=Focus' Item Limit set to: #Achievements achievement.alchemicalwizardry:firstPrick=Your First Prick! -achievement.alchemicalwizardry:firstPrick.desc=Craft a Sacrificial Knife/Orb -achievement.alchemicalwizardry:weakOrb=Faintly Glowing Red -achievement.alchemicalwizardry:weakOrb.desc=Pickup a Weak Blood Orb -achievement.alchemicalwizardry:bloodLettersPack=Gathering More Blood -achievement.alchemicalwizardry:bloodLettersPack.desc=Create a Blood Letter's Pack -achievement.alchemicalwizardry:waterSigil=Infinite Water! -achievement.alchemicalwizardry:waterSigil.desc=Make a Water Sigil with your Weak Blood Orb -achievement.alchemicalwizardry:blankRunes=Stepping Towards Tier 2 -achievement.alchemicalwizardry:blankRunes.desc=Make a couple of Blank Runes -achievement.alchemicalwizardry:apprenticeOrb=Getting Stronger -achievement.alchemicalwizardry:apprenticeOrb.desc=Pickup an Apprentice Orb -achievement.alchemicalwizardry:airSigil=Whoosh! -achievement.alchemicalwizardry:airSigil.desc=Craft an Air Sigil -achievement.alchemicalwizardry:daggerSacrifice=Sacrificing Others -achievement.alchemicalwizardry:daggerSacrifice.desc=Pickup a Dagger of Sacrifice -achievement.alchemicalwizardry:brewingPotions=Alchemical Chemistry -achievement.alchemicalwizardry:brewingPotions.desc=Craft an Alchemical Chemistry set -achievement.alchemicalwizardry:magicianOrb=Even Stronger -achievement.alchemicalwizardry:magicianOrb.desc=Pickup a Magician's Orb -achievement.alchemicalwizardry:sigilHolding=Hold All The Sigils! -achievement.alchemicalwizardry:sigilHolding.desc=Make a Sigil of Holding -achievement.alchemicalwizardry:boundBlade=More Pain -achievement.alchemicalwizardry:boundBlade.desc=Create a Bound Blade from a Ritual of Binding -achievement.alchemicalwizardry:boundArmor=Uncrackable -achievement.alchemicalwizardry:boundArmor.desc=Craft Bound Armor from the Armor Forge -achievement.alchemicalwizardry:complexSpells=Not Quite Hemomancy -achievement.alchemicalwizardry:complexSpells.desc=Pickup a Complex Spell Crystal -achievement.alchemicalwizardry:ritualDiviner=Ritual Making -achievement.alchemicalwizardry:ritualDiviner.desc=Craft a Ritual Diviner -achievement.alchemicalwizardry:masterOrb=Getting Very Strong -achievement.alchemicalwizardry:masterOrb.desc=Pickup a Master Orb -achievement.alchemicalwizardry:demonSpawn=Demon Spawn -achievement.alchemicalwizardry:demonSpawn.desc=Summon and slay a demon/elemental -achievement.alchemicalwizardry:phantomBridgeSigil=Walking In Mid-Air -achievement.alchemicalwizardry:phantomBridgeSigil.desc=Make the Sigil of the Phantom Bridge -achievement.alchemicalwizardry:teleposer=Teleposed! -achievement.alchemicalwizardry:teleposer.desc=Craft a Teleposer -achievement.alchemicalwizardry:suppressionSigil=Suppress! -achievement.alchemicalwizardry:suppressionSigil.desc=Create a Suppression Sigil -achievement.alchemicalwizardry:archmageOrb=Too Strong -achievement.alchemicalwizardry:archmageOrb.desc=Pickup an Archmage Orb -achievement.alchemicalwizardry:energyBazooka=BOOM!!! -achievement.alchemicalwizardry:energyBazooka.desc=Create the all powerful, Energy Bazooka!! -achievement.alchemicalwizardry:demons=Demon Hunter -achievement.alchemicalwizardry:demons.desc=Kill a Demon -achievement.alchemicalwizardry:trancsendentOrb=OVERPOWERED -achievement.alchemicalwizardry:trancsendentOrb.desc=Pickup a Transcendent Blood Orb +achievement.alchemicalwizardry:firstPrick.desc=The first drop of life into the Altar... +achievement.alchemicalwizardry:weakOrb=Faintly Glowing Red... +achievement.alchemicalwizardry:weakOrb.desc=This orb will suffice...for now... #G-API Downloading bm.versioning.getGAPI=["[BM] You don't have Guide-API installed! Install it to get it to unlock the book! [",{"text":"Download","color":"red","hoverEvent":{"action":"show_text","value":{"text":"Click this to auto-magically download the latest version","color":"red"}},"clickEvent":{"action":"run_command","value":"/bloodmagic-download-g-api"}},"]"] diff --git a/src/main/resources/assets/alchemicalwizardry/lang/zh_CN.lang b/src/main/resources/assets/alchemicalwizardry/lang/zh_CN.lang index 8dfb70c2..d49998b6 100644 --- a/src/main/resources/assets/alchemicalwizardry/lang/zh_CN.lang +++ b/src/main/resources/assets/alchemicalwizardry/lang/zh_CN.lang @@ -51,30 +51,17 @@ tile.blockSpellEffect.fire.name=火焰效应器 tile.blockSpellEffect.ice.name=冰霜效应器 tile.blockSpellEffect.wind.name=风暴效应器 tile.blockSpellEffect.earth.name=尘土效应器 -tile.alchemicCalcinator.name=炼金煅烧炉 +tile.alchemicCalcinator.name=元素煅烧炉 tile.crystalBelljar.name=玻璃钟罩 -tile.blockReagentConduit.name=炼金中续器 +tile.blockReagentConduit.name=元素中续器 tile.lifeEssenceFluidBlock.name=生命本质 -tile.crystalBlock.fullCrystal.name=碎片集晶 -tile.crystalBlock.crystalBrick.name=碎片集晶砖 -tile.demonPortal.name=恶魔传送站 -tile.demonChest.name=恶魔的箱子 -tile.enchantmentGlyph.enchantability.name=图符: 魔咒专家 -tile.enchantmentGlyph.enchantmentLevel.name=图符: 神秘潜能 -tile.stabilityGlyph.stability1.name=图符: 刚硬稳定 -tile.schematicSaver.name=Schematic Saver -tile.blockMimic.name=Mimic Block -tile.blockSpectralContainer.name=Spectral Container -tile.blockBloodLightSource.name=血之光源 -tile.spectralBlock.name=影桥方块 -tile.blockCrucible.name=香炉 #Item Localization item.weakBloodOrb.name=虚弱气血宝珠 item.apprenticeBloodOrb.name=学徒气血宝珠 -item.magicianBloodOrb.name=法师气血宝珠 +item.magicianBloodOrb.name=法师的气血宝珠 item.masterBloodOrb.name=导师气血宝珠 -item.archmageBloodOrb.name=贤者气血宝珠 +item.archmageBloodOrb.name=大法师的气血宝珠 item.energyBlast.name=能源爆破枪 item.energySword.name=约束之剑 item.lavaCrystal.name=熔岩晶体 @@ -96,9 +83,8 @@ item.fireScribeTool.name=元素铭文:火 item.earthScribeTool.name=元素铭文:地 item.airScribeTool.name=元素铭文:风 item.duskScribeTool.name=元素铭文: 幽暗 -item.activationCrystalWeak.name=[虚弱]激活水晶 +item.activationCrystalWeak.name=[低等]激活水晶 item.activationCrystalAwakened.name=[觉醒]激活水晶 -item.activationCrystalCreative.name=[创造模式]激活水晶 item.boundPickaxe.name=约束之镐 item.boundAxe.name=约束之斧 item.boundShovel.name=约束之锹 @@ -179,10 +165,6 @@ item.bloodMagicBaseItem.CostCore.name=代价核心 item.bloodMagicBaseItem.PotencyCore.name=效能核心 item.bloodMagicBaseItem.ObsidianBrace.name=黑曜石支架 item.bloodMagicBaseItem.EtherealSlate.name=悬幽石板 -item.bloodMagicBaseItem.LifeShard.name=生命碎片 -item.bloodMagicBaseItem.SoulShard.name=灵魂碎片 -item.bloodMagicBaseItem.LifeBrace.name=生命支架 -item.bloodMagicBaseItem.SoulRunicPlate.name=灵魂文板 item.bloodMagicAlchemyItem.Offensa.name=攻势粉末 item.bloodMagicAlchemyItem.Praesidium.name=防守粉末 item.bloodMagicAlchemyItem.OrbisTerrae.name=环境粉末 @@ -200,48 +182,14 @@ item.itemCombinationalCatalyst.name=组合催化剂 item.sanguineRobe.name=血红法袍 item.sanguinePants.name=血红护腿 item.sanguineBoots.name=血红靴子 -item.itemAttunedCrystal.name=炼金通递仗 -item.itemTankSegmenter.name=炼金分配仗 -item.destinationClearer.name=炼金清通器 +item.itemAttunedCrystal.name=元素通递仗 +item.itemTankSegmenter.name=元素分配仗 +item.destinationClearer.name=元素清通器 item.demonPlacer.name=恶魔水晶 item.creativeDagger.name=[创造模式]牺牲匕首 item.itemBloodPack.name=血液背包 item.itemHarvestSigil.name=丰收印记 item.itemCompressionSigil.name=压缩印记 -item.itemAssassinSigil.name=刺客印记 -item.transcendentBloodOrb.name=卓越气血宝珠 -item.itemMailCatalogue.name=邮购目录 -item.inputRoutingFocus.name=输入路由核心 -item.bloodMagicBaseItem.EnderShard.name=末影碎片 -item.outputRoutingFocus.default.name=输出路由核心(默认) -item.outputRoutingFocus.modItem.name=输出路由核心(ModItem) -item.outputRoutingFocus.ignMeta.name=输出路由核心(数据值忽视) -item.outputRoutingFocus.matchNBT.name=输出路由核心(NBT匹配) -item.outputRoutingFocus.global.name=输出路由核心(Global) -item.dawnScribeTool.name=元素铭文:破晓 -item.boundHelmetEarth.name=土`欧米伽头盔 -item.boundPlateEarth.name=土`欧米伽胸甲 -item.boundLeggingsEarth.name=土`欧米伽护腿 -item.boundBootsEarth.name=土`欧米伽之靴 -item.boundHelmetWind.name=风`欧米伽头盔 -item.boundPlateWind.name=风`欧米伽胸甲 -item.boundLeggingsWind.name=风`欧米伽护腿 -item.boundBootsWind.name=风`欧米伽之靴 -item.boundHelmetFire.name=火`欧米伽头盔 -item.boundPlateFire.name=火`欧米伽胸甲 -item.boundLeggingsFire.name=火`欧米伽护腿 -item.boundBootsFire.name=火`欧米伽之靴 -item.boundHelmetWater.name=水`欧米伽头盔 -item.boundPlateWater.name=水`欧米伽胸甲 -item.boundLeggingsWater.name=水`欧米伽护腿 -item.boundBootsWater.name=水`欧米伽之靴 - -item.bloodMagicIncenseItem.Woodash.name=木灰粉末 -item.bloodMagicIncenseItem.Byrrus.name=玫香粉末 -item.bloodMagicIncenseItem.Livens.name=晶香粉末 -item.bloodMagicIncenseItem.Viridis.name=翠香粉末 -item.bloodMagicIncenseItem.Purpura.name=紫香粉末 - #Creative Tab itemGroup.tabBloodMagic=血魔法 @@ -251,10 +199,6 @@ bm.string.drain=消耗 bm.string.tier=层数 bm.string.crafting.orb.shaped=特定血宝珠合成 bm.string.crafting.orb.shapeless=不定血宝珠合成 -text.recipe.altar=血之祭坛 -text.recipe.altar.tier=层数: %s -text.recipe.altar.bloodRequired=LP: %s -text.recipe.shapedOrb=合适宝珠合成 #Entities entity.AWWayofTime.EarthElemental.name=土之元素精灵 @@ -271,199 +215,3 @@ entity.AWWayofTime.WingedFireDemon.name=火翼恶魔 entity.AWWayofTime.BileDemon.name=胆汁恶魔 entity.AWWayofTime.LowerGuardian.name=低等守护者 entity.AWWayofTime.FallenAngel.name=堕天使 -entity.AWWayofTime.MinorDemonGruntGuardian.name=格伦魔守卫 -entity.AWWayofTime.MinorDemonGruntGuardianWind.name=风格伦魔守卫 -entity.AWWayofTime.MinorDemonGruntGuardianFire.name=火格伦魔守卫 -entity.AWWayofTime.MinorDemonGruntGuardianIce.name=冰格伦魔守卫 -entity.AWWayofTime.MinorDemonGruntGuardianEarth.name=土格伦魔守卫 -entity.AWWayofTime.MinorDemonGruntWind.name=风格伦魔 -entity.AWWayofTime.MinorDemonGruntFire.name=火格伦魔 -entity.AWWayofTime.MinorDemonGruntIce.name=冰格伦魔 -entity.AWWayofTime.MinorDemonGruntEarth.name=土格伦魔 -entity.AWWayofTime.MinorDemonGrunt.name=格伦魔 - -#Commands -commands.soulnetwork.usage=/soulnetwork <玩家> -commands.bind.usage=/bind <玩家> -commands.bind.success=物品成功绑定! -commands.bind.failed.noPlayer=没有指定玩家 -commands.bind.failed.alreadyBound=物品已经被绑定; 使用 /unbind 来解除绑定 -commands.bind.failed.notBindable=物品无法被绑定 -commands.unbind.usage=/unbind -commands.unbind.success=物品成功解除绑定! -commands.unbind.failed.notBindable=物品无法解除绑定 -commands.soulnetwork.usage=/soulnetwork <玩家> <add|subtract|fill|empty|get> [数量] -commands.soulnetwork.add.success=成功添加 %dLP 到 %s 的灵魂网络! -commands.soulnetwork.subtract.success=成功从 %s 的灵魂网络中减去 %dLP ! -commands.soulnetwork.fill.success=成功填满 %s 的灵魂网络! -commands.soulnetwork.empty.success=成功掏空 %s 的灵魂网络! -commands.soulnetwork.get.success=目前有 %dLP 在 %s 的灵魂网络! -commands.soulnetwork.noPlayer=没有指定玩家 -commands.soulnetwork.noCommand=命令不够详细 -commands.soulnetwork.notACommand=这不是有效的命令 - -#Tooltips -tooltip.activationcrystal.creativeonly=创造模式独有 - 激活任何仪式 -tooltip.activationcrystal.lowlevelrituals=激活低级仪式 -tooltip.activationcrystal.powerfulrituals=激活更多强大的仪式 -tooltip.airsigil.desc=我感觉已经轻盈。。。 -tooltip.alchemy.coords=坐标: -tooltip.alchemy.damage=攻击伤害: -tooltip.alchemy.dimension=绑定世界: -tooltip.alchemy.direction=方向: -tooltip.alchemy.forrecipe=了解配方 -tooltip.alchemy.press=对着物品按 -tooltip.alchemy.recipe=材料: -tooltip.alchemy.ritualid=仪式ID: -tooltip.alchemy.shift=shift -tooltip.alchemy.usedinalchemy=用于炼金术 -tooltip.alchemyflask.caution=警 告: 内部异常 -tooltip.alchemyflask.swigsleft=药水剩余: -tooltip.armorinhibitor.desc1=用来约束一个灵魂的 -tooltip.armorinhibitor.desc2=不自然的能力. -tooltip.attunedcrystal.desc1=一个用于调整 -tooltip.attunedcrystal.desc2=炼金试剂传输的工具 -tooltip.blankspell.desc=拥有无限可能性的水晶. -tooltip.bloodframe.desc=Stirs bees into a frenzy. -tooltip.bloodletterpack.desc=这个背包穿起来真的挺疼... -tooltip.bloodlightsigil.desc=我看见一个光芒! -tooltip.boundarmor.devprotect=邪恶的保护 -tooltip.boundaxe.desc=Axe me 我的双关语! -tooltip.boundpickaxe.desc1=被诅咒的灵魂 -tooltip.boundpickaxe.desc2=不喜欢石头... -tooltip.boundshovel.desc=不, 不是那种类型的铁锹. -tooltip.caution.desc1=注意: 可能会导致 -tooltip.caution.desc2=一个糟糕的一天... -tooltip.cheatyitem.desc1=右键填充网络, -tooltip.cheatyitem.desc2=Shift+右键清空. -tooltip.complexspellcrystal.desc=拥有难以想象能力的水晶 -tooltip.crystalbelljar.contents=当前储存 -tooltip.crystalbelljar.empty=- 空的 -tooltip.demonictelepfocus.desc1=一个强化的核心 -tooltip.demonictelepfocus.desc2=与恶魔气血碎片合成 -tooltip.demonplacer.desc=用来生成恶魔. -tooltip.destclearer.desc1=用于清除一个炼金试剂容器 -tooltip.destclearer.desc2=的连接目标列表 -tooltip.diablokey.desc=绑定其他物品到主人的灵魂网络 -tooltip.divinationsigil.desc1=凝视着灵魂 -tooltip.divinationsigil.desc2=获取当前生命本质的情况 -tooltip.energybazooka.desc=Boom. -tooltip.energybattery.desc=存储原始的生命本质 -tooltip.energyblast.desc1=用于发射 -tooltip.energyblast.desc2=毁灭性的炮弹. -tooltip.enhancedtelepfocus.desc=一个核心在祭坛中进一步加强 -tooltip.fluidsigil.beastmode=野兽模式 -tooltip.fluidsigil.desc=一个对液体有秀丽亲和力的印记 -tooltip.fluidsigil.draintankmode=排水槽模式 -tooltip.fluidsigil.filltankmode=满水槽魔石 -tooltip.fluidsigil.fluidplacementmode=流动模式 -tooltip.fluidsigil.forcesyphonmode=强迫虹吸模式 -tooltip.fluidsigil.syphoningmode=虹吸魔石 -tooltip.harvestsigil.desc=得豆种豆, 得瓜种瓜. -tooltip.infusedstone.desc1=在祭坛中为 -tooltip.infusedstone.desc2=石头输入生命本质 -tooltip.item.iteminslot=集合的印记 -tooltip.item.currentitem=目前印记: -tooltip.lavacrystal.desc1=储存生命 -tooltip.lavacrystal.desc2=去烧炼熔炉中的材料. -tooltip.lavasigil.desc1=接触液体是 -tooltip.lavasigil.desc2=非常不推荐的. -tooltip.lp.storedlp=现储存的LP: -tooltip.mode.creative=创造模式独有 -tooltip.owner.currentowner=当前所有者: -tooltip.owner.demonsowner=恶魔的主人: -tooltip.packratsigil.desc=金刚石般的双手 -tooltip.reagent.selectedreagent=当前选定的炼金试剂: -tooltip.reinforcedtelepfocus.desc1=一个强化的核心 -tooltip.reinforcedtelepfocus.desc2=与恶魔气血碎片合成 -tooltip.ritualdiviner.airstones=空气仪式石: -tooltip.ritualdiviner.blankstones=空白仪式石: -tooltip.ritualdiviner.cannotplace=无法放置幽暗仪式石 -tooltip.ritualdiviner.canplace=可以放置幽暗仪式石 -tooltip.ritualdiviner.canplacedawn=可以放置幽暗和破晓仪式石 -tooltip.ritualdiviner.desc=用于探索新的仪式 -tooltip.ritualdiviner.duskstones=幽暗仪式石: -tooltip.ritualdiviner.earthstones=地之仪式石: -tooltip.ritualdiviner.firestones=火之仪式石: -tooltip.ritualdiviner.moreinfo=按 shift 了解详细信息 -tooltip.ritualdiviner.ritualtunedto=仪式朝向: -tooltip.ritualdiviner.waterstones=水之仪式石: -tooltip.ritualdiviner.dawnstones=破晓仪式石: -tooltip.ritualdiviner.totalStones=仪式石总数: -tooltip.sacrificialdagger.desc1=手指感到一股轻微的排失似的发痒 -tooltip.sacrificialdagger.desc2=只是刺一下, -tooltip.sacrificialdagger.desc3=手指就有能力了... -tooltip.sanguinearmor.desc1=一双充满力量的护目镜 -tooltip.sanguinearmor.desc2=灌入被禁止的力量的长袍 -tooltip.sanguinearmor.visdisc=灵气减免: -tooltip.scribetool.desc=书写是在墙壁上的... -tooltip.seersigil.desc=看到更多总会有所不足 -tooltip.sigilofelementalaffinity.desc1=在火中呼吸的鱼 -tooltip.sigilofelementalaffinity.desc2=是多么的完美! -tooltip.sigilofenderseverance.desc=使末影人遇上一个严峻的形势! -tooltip.sigilofgrowth.desc1=谁需要有特殊的园艺才能, -tooltip.sigilofgrowth.desc2=你有一个绿丛印记吗? -tooltip.sigilofhaste.desc=一剂兴奋剂后... -tooltip.sigilofholding.desc=用来装几个符印! -tooltip.sigilofmagnetism.desc=我有一个非常具有吸引力的人格ww -tooltip.sigilofsupression.desc=比念力更好 -tooltip.sigiloftheassassin.desc=现在该待在阴暗处了... -tooltip.sigilofthebridge.desc1=激活来创造一座幻影桥 -tooltip.sigilofthebridge.desc2=在你的双脚之下. -tooltip.sigilofthefastminer.desc=继续, 继续, 继续... -tooltip.sigilofwind.desc=最好不要穿裙子. -tooltip.sigil.state.activated=已激活 -tooltip.sigil.state.deactivated=停用 -tooltip.tanksegmenter.desc1=用于指定哪种炼金试剂 -tooltip.tanksegmenter.desc2=可以进入容器 -tooltip.telepositionfocus.desc=一个末影珍珠灌输本质 -tooltip.voidsigil.desc=比拖把的更好! -tooltip.watersigil.desc=无限的水, 任何人? -tooltip.routingFocus.limit=限制: -tooltip.routingFocus.desc=一个传送物件的核心 -tooltip.alchemy.usedinincense=用于香炉的精炼熏香粉末 - -#Messages -message.altar.capacity=容量: %s LP -message.altar.consumptionrate=消耗率: -message.altar.currentessence=祭坛目前的生命本质: %s LP -message.altar.currenttier=祭坛目前的层数: %s -message.altar.progress=祭坛的进展: -message.altar.inputtank= 输入槽: %s LP -message.altar.outputtank= 输出槽: %s LP -message.altar.hunger=[BM] 你的高级再生效果使你变得饥饿... -message.attunedcrystal.clearing=清除已保存的容器... -message.attunedcrystal.error.cannotfind=无法找到连接的容器. -message.attunedcrystal.error.noconnections=连接的容器没有剩余线路! -message.attunedcrystal.error.toofar=连接的两个容器离得太远或是不在同个世界. -message.attunedcrystal.linked=容器现在连接完成. 传输: -message.attunedcrystal.linking=连接到选择容器. -message.attunedcrystal.setto=调整水晶设置为: -message.demon.shallfollow=我将会跟随并且保护你! -message.demon.willstay=我会在这待着的, 主人. -message.destinationclearer.cleared=目标列表已清除. -message.divinationsigil.amount=数额: -message.divinationsigil.currentessence=目前的生命本质: -message.divinationsigil.reagent=炼金试剂: -message.masterstone.crystalvibrates=你的水晶弱弱的振动着. -message.masterstone.energyflows=一股能量流经这个仪式! -message.masterstone.nothinghappened=似乎什么都没发生... -message.masterstone.ritualresistyou=仪式似乎在积极的抵抗你! -message.masterstone.somethingstoppedyou=有什么东西使你的路径堵塞... -message.masterstone.youfeelapull=你感到一股拉力, 但没有足够的能量促进其发生. -message.ritual.currentritual=目前仪式: -message.ritual.side.east=东 -message.ritual.side.north=北 -message.ritual.side.south=南 -message.ritual.side.west=西 -message.ritualdemonportal.missingjar=柱子上的玻璃钟罩似乎不够... -message.tanksegmenter.nowhas=容器的槽 -message.tanksegmenter.setto=容器分配设置为: -message.tanksegmenter.tankssetto=槽设置为: -message.routerfocus.limit=核心的物品限制设置为: - -#Achievements -achievement.firstPrick=你第一次的疼痛! -achievement.alchemicalwizardy:firstPrick!.desc=第一滴祭坛中的生命... -achievement.alchemicalwizardry:weakOrb=微弱的红热... -achievement.alchemicalwizardry:weakOrb.desc=这个宝珠应该够了...就目前而言... diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_air.png b/src/main/resources/assets/bloodutils/textures/blocks/area_air.png new file mode 100644 index 0000000000000000000000000000000000000000..4fe5519d445e2322df8ea541190a75c5d074fe16 GIT binary patch literal 1405 zcmV-@1%mpCP)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00009a7bBm000W> z000W>0fLJSS^xk52XskIMF-vq8wfWf%>Qsr000FXNkl<ZSi|kqTWl0{6vy%J-1ag% zEoHkU5`6c;7>$sScnPQxk=7a_lv0Es7u$-0Kx;`56^c-*Aqc%-VpK|7jj<^UBud0s z6N%9TBhhCXo0!y6F5TVP*`3*)@nOqOO=h=!un7<SKmT*i`Tui%A7RbvY9|(pv0%Xh z#>U0~2!%rU{eCi;46-b9_XGj~Y}+Of2w<8fmSrLP{eD(#8p>a~GEhk{7{szHB9RET zZ8I`50zfz%=FwGO=kNahZ4L6>4u4**L)Uf6$}|!Qor;PICMG7xX0wFDVPsimbaa$I zzN^EuOcqZT5^dWCK-YDaz8K}fXZmme)3gYO!;FspgD6S>tk^WfL(lf3g+c&Gl7yH_ zrMNOsiJ~X~{C#x?k|>hRW-yEtnx>)a34A^um(DB)z_x9E9;`-HRYX-)NvG2Yg1}$D z)RRaguq=z)x9^a(?ffSyib5b5<jO!5ARq`r?g{C1ns7MGjT<*er%hy8CY4H&N~OtI zCI|wNNQ7iENqIO-Jdq%oOd^V6u7IK_l$Mq<Z{9p4St6UYS-9{%N=r+S6$LdI1R$MG z1CY&TN$5Hb4whvhT9(DcL<~*S0I)I^s;c7m`v|Ej4i1jvAW0G>B^r_>k<Df?k|`uf zLJoyOB$Ed5cml_9h{fWRXc~eb;P?AUCJiJ}B$-TN+YTjK2oO+Jl}sjsIDYdcq9~&H zd?<=Sd8C~2@o{8X#<p!jY7oOPC@U*Nk|fgUG@2H|G;>c9B~ipkrLePE9$0pUcq~pJ z5FnW}ux%U5val=*$AL(soTuw9BZwk~k;)bD`~5t&`aG6p0kEWM0K-V(^C?)CmCr;l z7~uXTUHLU$UV8~m(~yHfHMdo=%*d||T)#ey&z~j`@B<Kw#V9Q;MUo`0U0O#Z5<wL1 z<QGcTbsd1E)q?=sx>bX1+hj5s9LGUba}7+>L{StLE$(E|<P?cS0%2p_Iwz6P(X<e% zsuGXK^JAK(nV(?({Q2m*j$s)2$d8SUAsdE)t|thERECF#|Kq{k2m{39xzCklIqyM5 zMMchox+d3yXm@cBR%~`XxZE?vgQ5PJdGJGD&V%PRdw5W}J<786g*~Wi8se!99v(!y zT@S8(Q`m#P4_pr}eC*-D)eF;m5bd7xV0JxteC_le)V%58L3O?B!OAU#J$Pi5>%p3x z9v=L5vA74{pDp4+<+e!=dWw7S@bjJdDefT;>RVk8dfSS7@X{{VgTYf%Jh;$3GY`&p z<vduk%fo}(rYKbng*~Wm9isX*4-b0VTn~QwvakoI-*!FdZ};$EsCRk~dfVnam|YK6 zZkyhNt?znxu;DG&gSER0d+_9X*MnCMczEz*UvUr4brkWScJHJIr;2;<MD0E4K}(nG zK}U0O54Ik1J^1XsDIT0XJTnh^T5}$3JLKU(!_g=&?=S2@OV<#a4tRLb(d>F~v9quT zZH=x6T`e9Socm~c4?3FXJeXY%YFnoFVDCu}4|W`LJ=lJ@um>-^?s~BMgog*wlf^yw z{9q9e8jcL+15(U`svY;F2M2px584}xd+^3_*MrWcDIR>hZ)P5xZpnGD^SFlxdrn1p z^=M%a4)zSuaLmJl_D0u(uZ|V=;GK=G2OsY6@Sy+w={;y~obzCIJ=oGZy$1(A_3)s% z)AeB2iNYSN+vj?){}T@nzBp3cgRbTx9_%?em=8!X4{BQeXAk}b5^GtFN8rU900000 LNkvXXu0mjflplah literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_air.png.mcmeta b/src/main/resources/assets/bloodutils/textures/blocks/area_air.png.mcmeta new file mode 100644 index 00000000..3ca39cc0 --- /dev/null +++ b/src/main/resources/assets/bloodutils/textures/blocks/area_air.png.mcmeta @@ -0,0 +1,16 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 3, + 2, + 1, + 0 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_darkness.png b/src/main/resources/assets/bloodutils/textures/blocks/area_darkness.png new file mode 100644 index 0000000000000000000000000000000000000000..831839fdff29a6a0a7b3eb99a6119ac03f6f6688 GIT binary patch literal 1581 zcmV+|2GaS7P)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00009a7bBm000W> z000W>0fLJSS^xk52XskIMF-vq8wm>rYpx<;000HdNkl<ZSi|ku+ix6q6~OWD+;(?n zXV>e!L~$D>qE#ZNA*!oHsR)V)5rIUG3{g>|TCwOGh>A-5B_I&IAOV4rg3=p-CQWeK z6sS@qO{hsqOKD=uu3cZ_cz5o<of#h1o?s2T_5+r9$UGmN-}(K{IiH7-zIl8guGi~q z+O&z;*;xSc`8?TdmS(ews;aDfxm=DYipb@11VMlh0yUe>a`DpTB<T1+Kf10XgrHij z5=9Z?<KqC7%Vkdg?xiI5<TFpBuAK1f&>*&LW11$GWmBuwSXx>l3`5H0GODUFJw460 zP7V@?fESk&$x##mVB0olUim%0_|<QSfgli+%VnmgXOLwDfQy$dbLxfDnE5;ailQKU zp2zWlel$%3;QP-%ha$^_VH4N&FijKNw#Z~M96odqfGCQ1>Kg+XhJkDt2EOkjNfO`t z?zgcl3n2uHi}whlD0xIp)5z&M#|Mr95|SjfuHgGV<#L(1xjB44Kvh*d&%^V4nj!#6 zqFSxuI1ZI^nTBQII1aKbw-RWYMzL6=tE&q|RS3g~o}SGViv?6o!_ajAeBTEk3_~p2 zCMHG*fh>ezX{nBBngEEVz%UH5*$jEZASNb`V-!W9P%u#xg)j_p9S=oOQ1kgbj^om3 zSj2Hmz22Z;nn;pFHk-w9TohTxaU7y3reNj)3BxdGHk-)v3k%4yjF!ouX&RMkh57k; zR8=L4BJzfg>$;RmB@{)$_kBz=PY|@OBrCFv>v=?B$j^R$iblObE|<e`T%ssK2!RlS zIEHGq!nq5>NV1IUdaVT6Y?fDEJBttkfZv{Z8Q1m5WHf{j$xi5cjvxN`r^y)q@%#l$ z(?r#Eqcv5k%Ja{ChdXyh@dKY+E(<`tUZ+?rq9_VOgD0p~t1K?wO9o1{Z5x0yFTa{B zNEAghn@!?4#xPn31VMnNY5d?vKS`>vEDLF9@I-7`Hl~@!Fbo=vMiLMNK~h0?cQ>|e z<GOCL^0TwEsIKc`+ZOq}!RYAdDi2mx7@*N;J+7*%i3hb>t>wYB8zaf72M_G;=)w7m zmy+22BZu#M@bzOy*X6-L|4{-F@WyhYRUQn#^=DrD!@0H|T)Q#C+1JmfJvew^f8xQj zLxXKS*!#reN&60c=|I|plg~W8rUwTPeDQ$?8|uMJuby4ggDY3Br#*P<?Y|@*To`_{ ztp}%Gcrh8{ciz34_F!o6L`M&f9sO#14~E~ooGeHu4}SUU)Bleij7>~2HZcXjuHNk( zJ$UbLe@`mhx2NyE2m7DgyDksDux~Gc2)MqSXq5*ew?5>ZcdxbeU~FQFD_7r3d$6l_ zd*VU=k;830*tX@Nq<y;|>rH#`wXb}6O%HbU?s(wAhI;V!U$3m`!6&2RX%BAw<D<lb z8zVQ{dT{Q-a5Bap-yThSaOCizjvhR@_lfo%jNJTyk((c|Z%<!G4_<%cPpdpoGZ~Ft zy*pAKgki|s++0#Y9LKDT{mRNuPEP)hJn%%s_~bMIl~SRj2cLd6n_OY*!<+AW@W{3; z>+;}pTelF1fXU@Vt2~&QU*z`KL|YF$5ivUcY1)HIsgQWEr*C5J9w69h!r9F83 z^E=n{pi(M6@L)qd_~$31YkFY0LE3})yY~_gre@~adT?XpRx-wQ+r>0Z<p1=bZ}(#q z^E!UuqbN$sgKb-S*weQgS(4Kp%*-t?Gq=Fjhc|ch;QISF(;iex#dUj7DHS%r16j*4 zzgS1sa_AYQqX&1FtmF#S?&5t9HrLAQ@}Q^ZAp#MwxSVK}2Mx#Pv)P5V9>`jbnfbeE z5A=+Zc(8NFqisD1121V`K9@;*u>Fy3YkHt()CV4Hs0R~MGi!PfNov{y$7}r;t5ho7 zYuIf)_~>7Ek}+<^Qrd$`semfQZ9S-!yV$wo(f{s2!**%h9;4db)zO0wKfayzK+mY_ f_CU`lt33EO3Yu{&gU?Qx00000NkvXXu0mjf@uvKl literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_darkness.png.mcmeta b/src/main/resources/assets/bloodutils/textures/blocks/area_darkness.png.mcmeta new file mode 100644 index 00000000..3ca39cc0 --- /dev/null +++ b/src/main/resources/assets/bloodutils/textures/blocks/area_darkness.png.mcmeta @@ -0,0 +1,16 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 3, + 2, + 1, + 0 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_earth.png b/src/main/resources/assets/bloodutils/textures/blocks/area_earth.png new file mode 100644 index 0000000000000000000000000000000000000000..137ad65d3c88d4e77ba64d9e13773af3fad2bdbd GIT binary patch literal 1492 zcmV;_1uOcAP)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00009a7bBm000W> z000W>0fLJSS^xk52XskIMF-vq8weu+-cm!!000GZNkl<ZSi|kqX>1gA7{~GNTzkw; zmv*}?VvO;K#CSyUPUKp_iyl;?0;NTi7b+ex#5cxBcxNyY6R#H%4&@40DGHXJKqQDo z!YdU+l!O;j3y9s_+1Z)@?u;+C%-Srw<%J}?U|#?8d!GONpXVbz_e`^wOeU$XuV;98 z7=TD5LNFL4m&>85Di^;{D1_^}ghC-4$3X~z8Vm;MzxPPt#P!g8au(rm7$F4lcpTSt zIeq#x0I^t%tvBrP0~h?+jC!#``|z`vrioE)kWQP_)zvXFGD1F|Cl-sLswzW6L$qnn z;s}Rrqd~Ikx&WA_Nyp9Id|kH_4{#hoEEZ#E=r3eh0igfhBW#@5ff0!SpePD*Hk+mS z<SaBz1K=&O1Vxs~=W|$A7Q-+w%`|~PfX9wM0)XqfwEX@Ax~?PZx{htzNRq@->qXM( zG(re2T=<8)>-s-Y(=<ZiFwG}t0}_%X6|P|0HnCWYvuDp@+YYL#lFeqxW^Ho90ZAer zkCVw{sEx%)rPE|G8Dv>51ZbK@G#X{Xgb66BLO$;@Y0`B>qgAMyh8_+BVB0nT`Fx(V zY2x7_gg_QTFfx+FFbn`hPN3^L!C-)huH)h1c^-<QP*r81C<^&}9xIbYQ54ijBtj-* zkxHfUJdb2DMU`P7NfN<ekW9uxk!3QO46f@@Wkdi8UDwIwa>(b-pGTHuv_Jq&)2NNt za_-zYR8_@wT_SoI%d)7hu0~N5Y}>{#A~;UrO0pu$SlKLYKF`{kt)!AELZJ|ujD_pE z2q6$c;CT>_*V290AtYJGva*GMU@*w;TYC^f0I>bWy;xS3KtMwX;qOE^9OBc!T7QhY z?l_2H7^vZ}UYIIX<@M}h{`lh*cF-mi3IdQ!CW%I)D2hVsnYqN{aV|*z_yeVyrU`NA zxT&kKAl1#du1hYL!}C0Jy->h$95hYi6KxID7rIEN(@5>D^SpH0#4sZ0x=t#U^4oMA z$M2w~rUuhAu`J79`QhPVRLin3%`}mS&Z$$U#&~dXg#l8j!p~Jz)%T#TuCCz0Kw_{^ z@=j<POjPt>+uh&!9nSx`vFJhDZ!MSQ!NL<QIKpB3XwVoBcHP&@hRM6idN7a}WYg`P zr5-d5CVUUx9Db>+2Z@1){O6nd)9g|YUi-6sTo0NCAG_wk74=}<E!)TSpl90QQV+g) zpwIVU$30zTJ@{<mdVh@fJ^FpA2TRW^s_4OjUz*Bz0PLF5U09I68!LM7Y5lsZ(u0<x ze$}SlnUy`5+Ew)6aKnE*7@T`~9{f1B;K69nSPv3?Y<RG<yaz2u+4S)4OL)*bv*^Le z#pONN^<dG1{#lps;McbCJ?Kqb^We&QFlER19yI=N2@huV7d@E1ue=A7zbbk#=g=iQ zIMH6&gC80zcrdeP)Psh~9^6(`=_>MI|J%p>s*S6sSM*?eTep99-sY!^9xU9}bXgv> zZf(L54m(DJ#(2>A(f}Ku|E8=5``<ps=6T<ideFFfy6?doy^G3vF!SU4{pV|5lPLAz z)vnfYJ!o7#<C+Io)PwcUbd2jk?;AgsdhqR%{k{h~7xk3&;PWRo_+#9?^l+&MukBk{ z(S!M0=9KrKb8(-)AeB7$?D4O!Mh_0GI__6(SU$C)2Rq*F_0PVr^2wqHt*aU?%Yy|U zHQ)$`ouffxJlMVb0GpQWDeJ+3Rma)#&fZcF8kSG>J$QX>TUifgESus#U(<>ir5?QU z<@|9yXjne&ng>_ZgRkD|9M^-sl}AfG*t6oG??K0VePuoPV#y|djC(#fQtH90s~1%C uVBUvMmG@xx`vd-hRPx~SmpA^u9{dX>GGj|&9&c*^0000<MNUMnLSTa9ndQ|0 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_earth.png.mcmeta b/src/main/resources/assets/bloodutils/textures/blocks/area_earth.png.mcmeta new file mode 100644 index 00000000..3ca39cc0 --- /dev/null +++ b/src/main/resources/assets/bloodutils/textures/blocks/area_earth.png.mcmeta @@ -0,0 +1,16 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 3, + 2, + 1, + 0 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_fire.png b/src/main/resources/assets/bloodutils/textures/blocks/area_fire.png new file mode 100644 index 0000000000000000000000000000000000000000..230033d44e300de17c7c7bb2e20c846379a43c44 GIT binary patch literal 1274 zcmV<W1O@wvP)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00009a7bBm000W> z000W>0fLJSS^xk52XskIMF-vq8we~eg&b1J000D;Nkl<ZSi|kq&ubiY7{~GV{My-_ znQYU|Zm_6O5fOiuf_f0aD2RvFXrQz<ZKVg%+KML+p%;}FdlI2F;z^0WK+>d*2TR4( zcv1+0Cq*d@^wKp+ZL>SSzdJJ?cDsx)&hEiL5BdH9&-e2@JkLwoGcletn@vVXM_E}} z0l+j(bX}+2ZlkIyH(#+>B#vW>#Uf!CB7{KIb)6mcMF6$|m&SKdDwPmIP_0&p<CrT~ zt^iP}RJi@Cv%P{>_wPl$`NQg=NgT&v*s`!~hgz-1`uaLi6j7;EP*s&iqk(pCl2C-) z(Jds$aSVXtIBcI^p!(?-BtRGnDwPV2#$U*?0>F;?BBP&wiDjAqD2jsY`#zV(ccEz- z0PQ!9p~x~()W-9CEX%@iYzl<}zdk(%Kpe+heqkKLFpv$yAP52^Ny0z+Dz<GSgy8!1 z8$@y38=|IZ6iX#8jqe5|BuVPD5Cj30N`=+cRe~TyRaJc7$M*x;A_PgITCL)`E+dr+ zE!)O*U1VAA6wow{a=FZwEn84jg(!;Iw(T~`<sno}!zh&i2!a5BD2lKhhlB(n1hNo< z_4Ou}WdR`C0>d!S^#Z10kdTlh35udHG-RPD3Q-i{xju@bpqi$M>w2_WHc67uY_=G( zEF?)n*L7UiLy=`%*Cmb<hAb11FbsosyN$ed?HaNyqZJBhn#M?VgtfIbR8=L8V@#uj z=Xned52GjwK@ebBCSllVNmgVT&-aO=h~bZCXf<0Di$z@5BaUN)5C|bi5~x;3c;Mo9 zNV1IQ`JDo~u5<VKuMt83aOdnCp6632Xb2&CH&H4T(awC>TjTpKT*R_0)KbalY?Z1K z96Q40%gYqPfMQVxpxJCvE|*ahg~sGQs?{p;^&7o~QXR)(1lT@z4uIkPdx_(icDqfI zBp62LgD?!yG!6CiG_`ID+qRJoP3}u<+rhF-48x$+YV~4<Vc1Ksb?a6f$HDWw-pQ}5 zte|?HhvV3oror;^^1nQ|dBOm#R%f`Xs`fmn)oL9N#=0Kd4=nZZ;K7s!zok9+b3hON z=z8!_mIpiM7q}<KgR%M|_hxypl=5IT$AceI9{iH!!PNmgSlaYpgFU!w01uwX^5Bt_ z2M_0XFq-n<@hlG-eLVR6zdQig+4bP>J|5I=O%D!tJph>P<H7Ef2j8SU_;x@KE_OY5 zF3W?7`30WI@!)WMk!Q0!m`!=Gl;goCDG%ndJosq<4`w$#*kBKy8o+~tSsv_3c`%;i z!DA^8CbK;FxsL}I@;sOr(1S-$Pxn&XLLMAVc`(z*gS{ya&Za#$KcENax*qJy^5DSy z0?+4oaJ0V2M3x6LDGz?k@nAaT!Dm?>)CcfjX48WW_F&fl9=wv}!AmI*Ud-`eEakz= zSsr}f$Ah^%4-O3I!IQV92WL_qO!e{Lt&|5R(jJ@|(1Ulo9=x69!O8grrgA(uQ(xqG zmIqTQ4?fEA;PsRT$Fn^6U;q!MHa*y258fQWgZHyMIF<6?og5EdOL_2KmIu>)JUE%> k!O5-%C;E7B<p1{IA5TJKHqY%!761SM07*qoM6N<$g30hv2mk;8 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_fire.png.mcmeta b/src/main/resources/assets/bloodutils/textures/blocks/area_fire.png.mcmeta new file mode 100644 index 00000000..3ca39cc0 --- /dev/null +++ b/src/main/resources/assets/bloodutils/textures/blocks/area_fire.png.mcmeta @@ -0,0 +1,16 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 3, + 2, + 1, + 0 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_light.png b/src/main/resources/assets/bloodutils/textures/blocks/area_light.png new file mode 100644 index 0000000000000000000000000000000000000000..d8650ad5341df7e37b2647e5d98f31654783fbbf GIT binary patch literal 1495 zcmV;|1t|K7P)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00009a7bBm000W> z000W>0fLJSS^xk52XskIMF-vq8wfi!3i=<j000GcNkl<ZSi|kqTW?fV6u|NSxy|Lw zX(`hw(Ql#A=!=O4!p&fzPz4Gt6y(-YE^?_<5JD|tluMxjv{F!zOR-Rt`^`6vL=ry% zBs|qpz|PE>GjsOLIX<*((oAN`gCsn#pI6q}d#|;AN_ADGACJcwH*OsL{rvz$A`ybY zAlYmdUDtVXLZJ|z=Mf5pa9tN61bQ$S<npzfGN`($l5jYT5Q11NhUa<QzkeTqXf(>P z6Q^bDg86gNpHx`9uom04DJv@@nY5{>s9<n#kX$ZDG#W+Mb^7}HShS!PSGXJ>PNaIC z2Y_wcoH}!s?~nY554f%%8jaG|_YbP70dV=+O}c(Kh82kbplKRvI-RDvsuII609e0v z6`HD&%Vlw#G?ryy+erd}08=JT0KoG+KAKg9X_}~}X_CogP!xqVO${WINrVtQe*7;v z&y$~M7zUwmnChzOfP$hZLr=(LGDM?M9z1wJCgY;(I_Y$pbUH&;xS%M+Vlh&w6y?z< ziDZ&gDut@5LkSGSptQ7<F=NJ{=^DA5$E&ZtLTPCUx?y03!vJJ5831y*97)^8$43Z( zDuiHgFpgze0En!>G);oR01?x~$H(`5G)<$V#6r_Fa=9E%DvhRT=#fZ-RLUWdNaFiG z@pys~%R*5Ug25oEl!K<Kq*5t7&!@zS01BpQlFepO2Od5|RaJ~Y0K+gSkCihpFo3S> zc%DbZ4C6QsWo2b(nnos*!LlN_?$DD|O;vHyX}nyHL!DhD;t4{b5UG@d=XnSr5JKSl z5Q~-b>!qtGs*2;JhY|#XLC*A?LkI!DPp7(ZoHT)efe=FOL^vE`*WUedjL%=Vgk@Ri z;jlS0Rl3gFRgK)edyhacKqwRhARdoXT3U*xX)LU*Ar_0FDykeP-L`E2PIdn*7sT^C zve_)Y?_-)n1zgv~Fbuxgvrpb4nM|V8*39;kNgK<GV45b0L_!9*t}AaacI;Se+s1Jm zx$^z}{pgP4VB1L|5tDoO?v3!^$qEA`5<{P>>$>!yqM~BRgZ7StvT957`l23e+14s! z+qQ3g>cLk#TA#^-oo%hS!sYYfL?b-d-nNsCn>H8ppuOWDpMJI_--DLs_0ogy4t5mu zU{&J^*}l!2n)5w4uz&BU9<(%Xc<I4&_282YpN{ImuD$#7J!t##E9t@3?Ozo1U|B<x z9OJKd@6Gq%U`KmV4|cR}E9}AcFLuZUDdxe_6)Rsv51L!H$f_OfyNi0Tc<Blmd*u6X zpL%fY=;3Gb;Kw6}afQpr!-+<Cu)J{<^A{{C=s|PK7V7F3=X=o6zFT^5;r!Wx9_(yu zmF+vQzdhfB-k$DJJ?LoP^U{Oo>cO0Ob)$N)ZsVqW4;q_ROAnSTZz$-&2Qy~LF<!fV zW4;IH&z>pj!O_Ft74~3x!%Ddz#XOiceddek!MwV9S+%#PyQl|~-~T|yUcYkjsRzH^ zxcW>U+`4`hSGY_WPBg-UY13!&-h@d7J(yQl&-jUx^F8S8>6RY+edl&T503wEM7Hmj zb3OSU{PpMWqk7QWbLOQ7&((u>-W@-x2eWHx^F5eeHA{Lhby{UX4_<%sZ8^pt&Z)`w z;Lhzoih6M4>ZQUSOskv$z@tZxihA(c8*jac9yG04C#!aK9xCd=-1!S+?CBH7o_f&J zee#(+`1$lnT;WnPoM?mxb@d-J^TRm>J!o39j_TQS^F8S5JS081b^S^~5BBZZCEIuO zaA&>;*DhZe)q}3iZ(n-wTs^3)svgyY6)RWgdr-f4iS%Gz-NJ$%OqeuPj`6aFmH8fA xzjCpt2i+%+7xtiT;Uc*p#XJ~4amxSe!G8<APU@lV%`X4|002ovPDHLkV1oZY;rsvq literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_light.png.mcmeta b/src/main/resources/assets/bloodutils/textures/blocks/area_light.png.mcmeta new file mode 100644 index 00000000..3ca39cc0 --- /dev/null +++ b/src/main/resources/assets/bloodutils/textures/blocks/area_light.png.mcmeta @@ -0,0 +1,16 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 3, + 2, + 1, + 0 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_rainbow.png b/src/main/resources/assets/bloodutils/textures/blocks/area_rainbow.png new file mode 100644 index 0000000000000000000000000000000000000000..bc3382dd1f306e4ec7cbc29f657d411957d538b3 GIT binary patch literal 1608 zcmV-O2DkZ%P)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00009a7bBm000W> z000W>0fLJSS^xk52XskIMF-vq8wmsyACFJw000H&Nkl<ZSi|kuTZ|R;9l-JL+|FfY z_Hg#>SrA@GW7CH=r3vku!mc$bE39lpDi&O&(MB4L#NHDU5^U2%Vr$!If+iZMU=^W& zpj?-w)z-EuNz*n~6WErN=5%+-a?Y7KbNQc{>BAi6K+o+3l0Goc|NQ>9-|v&(f26hd ztd1&`3iIdBXL@=X0K+gyr_<EybyQX5%9qJx2*Z#}CWG($2q93@=`_brm4FfeYsPLR zo6RDGpja#th9MU&TmYa@D6r?Xza|04*Dpc6GQ-y&T#9Ym<ntz$WivQ9NV!}l2m%U) z0;;M~DwWtcz7${hyxIsPhhYeSZQJbK|1mG``j80leL<m6pj7$~vaA4b{8WjZubjm+ z3;+~GL3Ul2HDkA;X&M0E+I%O9EE5EE9LL2pO>EmDl}hoIJ8uCX3`5r5^BHtqN7i*6 z&-0KZi6<T#!m=!c5X{Y8CJ4ji5H(FBlg+Yb?9+gRBuViWJkO(0C@?cKgXj6Es*3Bn zxUNTC_#jCXi$!X+8Uuv_Rm-AQt0BvB96-}Fa=9Gy=FLM<6@nmS;lf+U<@!)H4LzF$ z!1Fu+f*`=MZ6YFs5XeFZ%H;~CX#ybX0$tZhr&AcZPDDf$MJS3wU!RGhC<H-(Q*%)i z1=TPNYBh&y)gp=_DwQgIrimm;q|<3?H3vnOsnu$PVML#401~>cQ?J*NXD?ksmSwb5 z3Qf}(C=M_?JBzBSgkgxGXK@^dd_Iq&D0rTSX&U%`yd_zYWgOQf3<6$!>5o(^RWg|j zwVFd1h6o`LLJ&nzEDrG2v40`SGLGZM0n+I-`wx7A5CVW-?fn~$<C02g2qBW1$YwJ< z`-{^_8Xtc9pO~hJn$7BQR;enRA0OuY`6*Iqk4z>FK&4V4m&>6j3J-4h0>xqxS-PAg zlxo{H0DJd+1boE!`Xz*6NWESsiXwD9p1}8gG)?2DKc7feVObW^`1*B`W!adffv)RR ztJP$H@B7IL`uqE_Z5zjNl9HdEo<?;X2ivwV44tW|scSsAQo;b$YJ9k=swN%`4i3g1 ze6Z+jJmn%7DlhBm!Lif{@Z;etrIDrws~N?%ZOk4X+`VuVU-%qPooMx7!kFYxbhx7j zA1pe{Vd+S#2Sep$i3bn$k9YLoix-zB*LO#CxYdIVeP8S8!BBbmO%HCU2m8f=o*w*R z{-0VsIMa6~@!&+}WJeEvd3kqIXumJMca;ZW?7;)M^_)LHh1bD@Rl!{pi$&(<{?~&n zOz0C(ftC4@t{&`~d*vDr)Kp4isJy)CfnQDTduC=PSwR#<xUS2Pvn(n3i_;gclLrgl zk3CobSi{{tP>!C!X>37S)$kw$l(E=@yxHA@g{xx^)T3=Y$efy_ez3C#3*J9V_+}dq ztl_2y#f_akD1E8vLG8<JJjg%L+XHL(rUy6H19x9<4+h?A<AHIy>4A2<vj>-UH9hG6 z-BlilMt{&h9($1T+k3!h(}Un@4^lwp<OFj-epPo5W_Pynz#3lO(jRp4z!|>EgNxV8 zgV}c{nQbg<@ru!|9{l~_8_5<vyJlUpKUi|#hPXd4^Ibjo{8u;N3!jf0fv)l3+*=3v z^Xt1idNBL$B!78hPpb!uSBxee3_bdIM-K*WyCd=7Q+JKEdT`srn|gY%c*Wf}J-DGB ze7I+4PY+6GPPTgRkE4eY4?cNwUq=sq`{MIS8vpzBvDWv(?T>sj?hpJ_TMs^W@BIxA z<kt7Xxg)>kT%$m`dGMPTp8J1%FKmD3sbtn|BTskr;Clz2NX9;M?{iHLeztB$qd(~G z!L#@6z!yH>Zv?u=gDpqC&F0r0?dZYwcb?+Oy_;G+*f#QX;=!&>uXps|ySHymuJ4B{ zpK0~rrAPMk^kCb__M0BuP!As4{cukYemuFg)q|~Xe<$(a2ZuIy^kCx)_a|xmqlqo8 z9=!aGR~!97dk=oH_WAh#K|2q&9DXt>kZvA4v}4`%_29n@GivAddZk_f0000<MNUMn GLSTZd_X5-a literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_rainbow.png.mcmeta b/src/main/resources/assets/bloodutils/textures/blocks/area_rainbow.png.mcmeta new file mode 100644 index 00000000..3ca39cc0 --- /dev/null +++ b/src/main/resources/assets/bloodutils/textures/blocks/area_rainbow.png.mcmeta @@ -0,0 +1,16 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 3, + 2, + 1, + 0 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_water.png b/src/main/resources/assets/bloodutils/textures/blocks/area_water.png new file mode 100644 index 0000000000000000000000000000000000000000..1b60e8c9a29b9862820acf60f9cdb6249c14f6b4 GIT binary patch literal 1295 zcmV+q1@QWbP)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00009a7bBm000W> z000W>0fLJSS^xk52XskIMF-vq8wfT9nT=6W000E8Nkl<ZSi|kuO=uit7{KxWeC_Of zWSeYun?^*iMSJt01u3G4AmX9HpdgkMy$OmDD_#UEJyb#jD-{omV2Fqx1dE6$7FxWv z=uuD$Ne!vSZQ3Ne^RYAU&WwkhE~89m_h6uhyyu7ai|6_Aysz}k^i<Mnwb;9NFU@8X z0L!w_b)9avi>j*J9OZJEIF2co%Y<Qw5CT=#b<Uk{^n<3Sj$;@GLI`TL8gU%6y1EKL zwOZw~FHiMjXP$ct_2vpM96O2Yy4dz8j^k3V*V*3QCW<1e)hep0vcA5~^D`$2Mabvr zL~<O*0JyHp(%E?yJ~=@GgrT5Xt+KxUH?ph%aPEAA#ZTYHwk!Y?MM3U#I!sR;N7FO_ zUYk9GBFjWk7vJw-+cvK2P%4#p{IM4Sh~t>2pLzq+G?7iyBnSc|N#d24-otSmgb-|Q zZV|<C{}MG#qih&VPrVLENRre$LJ$O0t5vRDyG9U%sH#e*)1lJ|=!y^|iCV3O=Xs1* ztF#>l&-0LFxi^8PX;dl|_Uze%qAEmD%;e-gDwPpbO~W({0D>R@Ac`U!*CioA2!Skw zV0*iTZQB5duD~=+biIUSnj|D7NrIv%jEvYQib51c_+AG^QBW<*!t;FEZHFXDXtmmm z*fx?Rq3b%H=cC9np63zA2_v=zNSLNcx7$VDxPBd3meEQjG)-f?HqOSz2CAwO$1#>^ z;QKzKqoXK_LJ$PlwnZ5BjwCCxjNj=HM-d-={3h*In{v5~=lR5Oj1U4L1W5w5+Bo0+ z@F9{c<NKZ71iG$s_Um^MLICi^(mVKmhf+yH2+^+z!zlCq2e0<i_}lN#VB0pTVVJ$F zQdMSOKF#v-3PD(+T-E_-wOUjv6%<9`*wGWzYBe@D<$gk`uImD@^wnIyK;k&2+wGDh z38vXwAPhq^P2=>L+5RpZ$3Z%F^x4F5Tx{FIG)>y=c0V8t!~PD&#>Q}67vJ~$CEsi| zQGMUXbsa3rWMyULUmn~nVSskKce$#n_C2WA>!}A$1Dw=@i2)v5$#}3o>%qN4dT>wb z!IeA@uFkXYTY(2ogT>2v9!z9Bc(A|&E91dro(B&M;laeN2RrP+FGF~+mFK}<84p$q zJh+tc;6|PYhX#0XpvZ%@IauozNTCN8Z%+@52DAYKrsV-1xTjz{^<X6H!Pt-<Or{>V zc^-uGEZivYz-X|zmFIz+@nC;}2VTYlHP3^)hVVe%^<alRXb$0lmghk?<AGn`!Aiyh zCF_BgdT{3e4=P0-1at5Q%#053VEOj+;9&Y*7=!7x0UnH}{eccMn^_OqsRyG2JkU}P z#`8SbH_w7y;K9KLi<LYN)-oQb1s?pG@!-!q4;aFOwOtQ(*n{#A9vsN?;Es$3^#Tu~ zj0bn;^#@Ywfqn}Qwo(tI|9W7-(!?AjLwL}gg^}COgCm*$g9`&ZIGlMeT+Dj#^N=3= zlzMPD&x1$iS-8KzgCh+V59N7qA>+Yvfd}7YJoqusgWren;KHs4JM6)ILwN9Ho(GR+ zJb0+Ug98~4p2+jy@&FGm-O2-C>EZPM;Kl$C_W#fQ!9Q#&Vs01fSc(7u002ovPDHLk FV1l}jWA6X} literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_water.png.mcmeta b/src/main/resources/assets/bloodutils/textures/blocks/area_water.png.mcmeta new file mode 100644 index 00000000..3ca39cc0 --- /dev/null +++ b/src/main/resources/assets/bloodutils/textures/blocks/area_water.png.mcmeta @@ -0,0 +1,16 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 3, + 2, + 1, + 0 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/blocks/block_bloodDiamond.png b/src/main/resources/assets/bloodutils/textures/blocks/block_bloodDiamond.png new file mode 100644 index 0000000000000000000000000000000000000000..0ad1e5313baeb92dceb50abf9c2c768136bc31f7 GIT binary patch literal 281 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#9;Y;yrApwB&b2_H9iA?ZAr_~XPIlxwq#)pGpBgkt?bwEwZsKtVv@7Gk%N=ly zm3H3MaN$Dhr9};zZ`V}T|NA3(V`;9enF!+nM~*iZ$LD=k`myRt^n*Jlt`9Cp?P+6V z2w1yOx3fSfNp7LBT2;xK*D23a*ccM-&QUdNJ2%6_Md&H3&5kX5UV9jo6kWI4yK8~q z(+BmbbDMwVBno|4skc?X^TUN*HNACZ@3-Az66gGLXw?&;;t$~+E3<uaHCoggqwlZ( bcTV}qq;OmF%S(!Yeqiu)^>bP0l+XkKPF8RY literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/blocks/block_bloodIron.png b/src/main/resources/assets/bloodutils/textures/blocks/block_bloodIron.png new file mode 100644 index 0000000000000000000000000000000000000000..1ad95d99f1521990d382fb59da087ed5b4e440ff GIT binary patch literal 194 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4q_)-xzH&6Cpyif|Tq zL>4nJa0`PlBg3pY5<o%r5>H=O_IsRCe7aUvZ`LRQh5S8T978NlCx1yy`0>Ayk%>j( z19Q%+2nir~BYA>ZJdy2Bf`a^pnuLUe3a4ey_<4AEbeMpIR*KYz(ktAH;~c&<@hpw2 haOxCKP@BljV4orR@9+AMy+ETGJYD@<);T3K0RSU%HCF%t literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/blocks/builder.png b/src/main/resources/assets/bloodutils/textures/blocks/builder.png new file mode 100644 index 0000000000000000000000000000000000000000..4c5c6192f3b7c43e31478369d95764a0b01bc70f GIT binary patch literal 821 zcmV-51Iqk~P)<h;3K|Lk000e1NJLTq000mG000mO0ssI2kdbIM00009a7bBm000XU z000XU0RWnu7ytkO2XskIMF-vq4GJVRu~y9h0000TX;fHrLvL+uWo~o;00000Lvm$d zbY)~9cWHEJAV*0}P-HG;2LJ#9t4TybR4C6qP~U45X8@e<*WR~#W#KOC#l4)>n#Kl` zORuIzV;d9FV8v9$DnedF{Ih%z@xhiB3vJU<;%TTMZ6eg5Nl;oefgWDai)=1<x4Yl> z?fJ0aJPpGz%nZ47;as!XEEEdo?l0dMI$+x$WHK48HRl`v04ZgXBvQ&aj+Ih0lgXqi zfNM`SZQC}+c%J9FZV&`P5X5mD$MNe%Lu*Y4p=pxVI?Yo`_Y`xJzub$$H~wC?P$=}y zE%a3vXO>ozqyvB_Ns`TG&&(~Z#vy<Xpkf7Jy80Nv?9}M`_=qJ0s*AQQwbnEY!<pr^ zy3u7zmMzIBZH0J`{lCxeHg|;(0D@r0aUAYA&do|+E|)t$|FCA%#f5)rMuCajBZGus zW_itf@}IxHQD>YG0)R$Ql+Wi!s()3#nJh7p7W?(9;~>QIJOB-&uMd2*G&xEs1;9S5 z47sk0wP&Nx|F0XJp=4?Nn6xD&#InR=zpHillYs{h$7`?FKin&X;7X~To#uok>qh&G zFI+tR#SgOv9R>oxptEuLY}t|k+O063%h7B$dwza7b$@?+Xzb1(KI0`Oe8yAKXl#FX zY_Mk3l}Ast*1WO3ox1N%PjnHIo|7)|7ze-@i=t@d)Y#u)=mL~c`sbI!cgBW0z;1IF zz;9EP@aoyJCFe&6ea1bn%XM8sX}cW)V3kkHTInQ7iba2F_I}N%&o^K9tiGrleWLyb zK(Ml^D}&k?N=ZJSr?%}Vr5We`tsm<~mzYQ^`HcT`a`?fwUzaV}|MMIrln|OE2|LvH zvE$gKQct75_jz&8)BVN%&6f#qcj71j&iTIw_Z@jr+w4Cm1dpPK9jOexecMthrj$le z1mM|$o{ds>5ClR9DP_CeUg^%aS}jWH*4EZLZ}2f?&3EFd00000NkvXXu0mjf??!w} literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/blocks/discoball.png b/src/main/resources/assets/bloodutils/textures/blocks/discoball.png new file mode 100644 index 0000000000000000000000000000000000000000..576c0289a37ceef075de8cd8dbf6dd583904bdb9 GIT binary patch literal 244 zcmeAS@N?(olHy`uVBq!ia0vp^0zllr!2~3Gzt@!lDb50q$YKTtZeb8+WSBKa0w~B{ z;_2(kevea{M}zBD)$Id7A=%83h!W@g+}zZ>5+Ij>!MP|ku_QG`p**uBL&4qCHy}kX zl^rOa<>}%W5^?zLwS~M51|qH(oj8OVRSqiNXqDV>=Ae?!VU~!ngCdRx!zayo-oNvt zfAkTHwmDN3iy1!12W%-`EX1&+I^tKHDnmtB?BSI_-uH(q%BM0Y+&#RlOpDRsm%gtS h<ALvXE>jsE+~qC!#1-@@jnx<A98Xt2mvv4FO#t*nPi+7I literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/blocks/discoball.png.mcmeta b/src/main/resources/assets/bloodutils/textures/blocks/discoball.png.mcmeta new file mode 100644 index 00000000..df255549 --- /dev/null +++ b/src/main/resources/assets/bloodutils/textures/blocks/discoball.png.mcmeta @@ -0,0 +1,22 @@ +{ + "animation": { + "frametime": 4, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 6, + 5, + 4, + 3, + 2, + 1, + 0 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/blocks/essence_darkness.png b/src/main/resources/assets/bloodutils/textures/blocks/essence_darkness.png new file mode 100644 index 0000000000000000000000000000000000000000..8af84933c61b14fa1987c482f404622ce3e187cf GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#9;Y-9i`EU*3Cn;&vY8<fCC>S|xv6<2KrRD=b5UwyNotBhd1gt5g1e`0K#E=} zJ4m6Yi(`nz>0}X6(b}U9j0s5#1bU<lvJR|ZY(C1s@O>MjXZV>KN014gu6{1-oD!M< Dai%Fu literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/blocks/essence_light.png b/src/main/resources/assets/bloodutils/textures/blocks/essence_light.png new file mode 100644 index 0000000000000000000000000000000000000000..df123cf2e502ff87f8f9f8b88e179f5d326af838 GIT binary patch literal 168 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#9;Y-9s|4rE59vT5+02lL66gHf+|;}hAeVu`xhOTUBsE2$JhLQ2!QIn0AVn{g z9Vjm6>Eak-aXNWV{r`X3Y+MY&%&iGm8UmT!cqMdz_D(EdUcP7krQ0AQJYD@<);T3K F0RXDZDZKyy literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/blocks/essence_rainbow.png b/src/main/resources/assets/bloodutils/textures/blocks/essence_rainbow.png new file mode 100644 index 0000000000000000000000000000000000000000..07f0ee69be9f3c22ea51376150455f3030bcf715 GIT binary patch literal 188 zcmeAS@N?(olHy`uVBq!ia0vp^0ze$V!3JWj{>lraI14-?iy0WWUV|`WQ#WrEP>{XE z)7O>#9;Y;q5Nm#pga%M3+SA1`B;xSf8w&*+3`AHi{`Fz&b~x@DAUa7%vw>?vCW9lV z;ld7yBXNxWYxcaTwU)eb<N*r{%Ri<irS&};3JMGY?&sDEva+x=T=9wp3mmbH|Hsb6 c#Ka)~>>t<WLuDuGfYva0y85}Sb4q9e05jt@6aWAK literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/blocks/essence_rainbow.png.mcmeta b/src/main/resources/assets/bloodutils/textures/blocks/essence_rainbow.png.mcmeta new file mode 100644 index 00000000..4275d180 --- /dev/null +++ b/src/main/resources/assets/bloodutils/textures/blocks/essence_rainbow.png.mcmeta @@ -0,0 +1,16 @@ +{ + "animation": { + "frametime": 8, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 3, + 2, + 1, + 0 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/blocks/progress.png b/src/main/resources/assets/bloodutils/textures/blocks/progress.png new file mode 100644 index 0000000000000000000000000000000000000000..ccf8b1f49a4ced8108e5cbd02bfd7e996641526b GIT binary patch literal 799 zcmV+)1K|9LP)<h;3K|Lk000e1NJLTq000mG000mO0ssI2kdbIM00009a7bBm000XU z000XU0RWnu7ytkO2XskIMF-vq4GJ0rp-t9D0000TX;fHrLvL+uWo~o;00000Lvm$d zbY)~9cWHEJAV*0}P-HG;2LJ#9l}SWFR4C6SlHE^KM;M2HGw+-^AG=E`3xbPiSlM8L zsVHR?77;&Us5kzpO?uNb7;Iq$Rslg%Z5m?I3oQyqBkUe`&&)g1i@kiVp5)0RR+18c zfuA3RTC;P`xh%^D*S7$Cxw{aBp)p2CDTL_!{uF>%NlK<ZtCgZ4uzxlIxcR!ZmWY&6 zzPSY;et0hkf-s7XfB9A1UtBB}3boc=%KZM?R1`&(odW=6qLlfhQ4hngw6;+u`ugOt z6oRfyOgQK0!+#&=W^@z<L0~5*aJBZiGLjCRBPoTHG<~)A&*ABX5mHK$l%los@62>u zC}^#xws#?fb&iOLXn1SKT5F7HKUnIluCcYU*Xsc&4GajN_WVW4oMoB!-g_U0A%Lmv z-8|2&wE()^E?ucs-Pnccm-|N}Lm!6+vr8AT*@|nE?RJ|tHnYa9Z<oidG390}z4;>% z$??5608(a?=hoUzrxV^=I=A}AXlqY4ZU;*Bx?SgenTV||H(L^bV=fa(B4!3)jVVZZ z#3swK+!zP}0D$uzfIME9>$3ooLP06T&8@%dH|*Ta=+*1f)6+c9i6~_bl=`|fPh*uz zw0H2WaVyXBv7Lh-j*iXpB7}hVxODOI{$JJOFP+J%uT{;)W-?WizOQqRnLp3}R3-|; zkccFaQmRaJ*r>-zVx0qEnCblRu&<0>KX`jIdR}Y&VQ5fm9Rz{%UTd9>SBk}=Bnp3f z`f28x)>=V`+?bU4#_M;7jk@=~KSIh3;M2mK{QiC5S+gHQ5s8(g)SI0VLL^CI*PjEh z_1QQ{NJ>eRt*!xxA1t4>+udHTxc^4<_twjI;y6A#J7Z=k<;eCf0RQB%A`(J4?@vxn d@@MM+{s(mmIgJIGLze&m002ovPDHLkV1g5{YS91y literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/gui/altar.png b/src/main/resources/assets/bloodutils/textures/gui/altar.png new file mode 100644 index 0000000000000000000000000000000000000000..d287d05d6f6b1609d2c0fca7fc5c9e1465485b22 GIT binary patch literal 3371 zcmd^>c{E$w8o)!*Hj4I^_7*oa6*ZJ+t|FA0V<?Im(g{Ulo`)O5LY2_QR8)+OCM2O| zHP$lbs(Gp*G*k&SRD=q7$N%q-_x^tS?6dY+d+q%V`}=+0*~wNGMm%6aFbD+VF)=o{ z4+60PpKPFWT)^NQ@WCAzxSp698Gu-)Pf=@m1~7Bp&)6{#1mf*Hec2k{cy9ueXM;>& z_s%Yy7vR=VsWquf1%WO!ni%NWhJD?fpY_cQhV<?X1-`wRz1C@glg{FB8pZx=;kAS4 zxUO6Ltl!HdgKzR9++8qOYUC1U{zd}qX(}?N->2ol*mH^3MLQQKz3@1<*=w5MguC@u z*7uf!+%a9Q|0s9;qbScg@ObIi^xWD~?rM1A>d|pDGU-tC)Q$hpVj@vHA`5$My^v1| zTeM$hIbkLK`Wt8IJwkZA&!MXO=vw6WVE0i^jQgBoMgvHM?Z54f_A@P<74~b&4E0~P znRV0pz{W~{MN(Y5;i}r?kBG@}K&Mm2(Ghd>M*OfC+uWEBR=~BQAaVdsb^UtjWkK?v zXF$5_|3mi+trj2tOY>(0$)EJ1tTPe9mwn_z!`hTv5Y`zHk&&dC6EEsw(SlC!I<ZYE z`cB9JYjdOJ`_WcA>jY2q?oInkYodtV0oB<#f+q2Cv4xRb>^(frTFQI?P2$;qY;Mw1 z;y32oLM2RCe;*-&Uo6N?`Den)SKMoMwG|kKGxg?Vv}c}@xeaEEysg#GaC6B1$I2MJ zteG}vZkQ-RVXQP0fh7Xq{*Q9~!Kd4z+P8aEV2<_jT`Kh1z1n&P-2{EIzYjG<cX;7J zG9W9qxtP*Cg~6AY9PVknOn9QGLVng(vr?SygNw`=b4f<@SZ40vfaUw;NK6zZhgtMe z@j|~Mxc{?yzz*%GZBC^6E%xSYy&Zj6|D(RBXGHVz*ED=$Ie)|887OxZkz~1vK%mPC zj*ov2Etg&Bdc76C>uldf8(>6VOB4;qENdt^+h;%St4GY#%ggfLmln=;n?-vL*i|7L zx6Ck7rP4RUFj5L|JBRG3u}rD{U>DRo?Fv8~x@^B*jleC#7Q<0x2%P+JJ1;Ns;0|WB zf6(2{7;I<P&zrO&l=yL`QfaOBW14uEN?@{BepXGbgj7K`Rb$t=VHltE`EhQ&JVkN2 znfT7!kVx(0mf@rXuiQ@im{uAjS@TWxIM}c1TgMIEtBZ-`lPvQ33pH8j^X}H7Lf<_1 z;&+TFIELzsn1?B=^NRF`3Lg^lE7+spuG^Ye1o@onP^e2T8t~XH5Aa7NmF5~KH6#nf z`OBy1E&c(dNr1NHoueZ<Z9H?Xh<nkkW>?tARW0AU)kS@3N`ZBUB}HNJnMRYsv~=x_ zT%svM!I$Iox@&S2ygiV}$1g-EJbipt>=H4m1a>0t3D1QK(vXxa<{UU7K>R2>%X=pt zq#mzMxY&n|>U!;ww;S)H=kMf`$?{n`Yk!ubwWKJgEKCj?8yov-3j7-6Q_LzXJduSk zWqDho1pIz7C~l6~l_fZ+xb&2pqmrB~Lz_In2}GnbrWh_d4eRP_wXj}Xm3_&LWct_9 z8D^gjyW?Zy<4aS|0P)D?;^N9QmH;}@gxv$la<PyUr~CrThnwJh|7;TB!yY|zOvrZ8 zyACbXh?<g5<>SwHc97;kYF)9>f+#p!`U`*nlWI&&9tAwsd!Xpxk>^fyV;tYL?~s$F z1G?=v>*dAYUXde$P2*TYP_wx913}Oq9SCVwx>wt?ZIafa%#GOO1kNUmRBv#g9)zP& zfR{|f18{w*+fOXEl9rhLSXNZmfN-*-O_7Pj>}$NMJy*<aa_-}3T*wm|^U<R9;200+ z{Ne+COSUUH)ARH5uMA7clCj*}+)XPjc6Lnyu^1`!j5qm%1O4uS%3ONr?f8|>L<wkq z)>S#4`n#fz^@RTJZnyaMx;i_fG+|sAsuIj`eo?K-Zz)btP;l>izVEGkjxSOfd5r<@ zhld(oI2GgZb58)<>`#OYANO=Hw3;wEP8`b`zY$)h9wcW+wSxwqdHk8Pyu+u4g*f7v zIc4UOrLB<+Kv2j&!~5HS08Ao7^NzB3!d<1iqBDAb^zoegQ%PSm0TN-H!Og8%XuckG z@j#XndBXgA#9TLA9pqrfH*VUo+r(-C#K;s_(7tu22tpta5C}r^r%&{i9JtII;}3uf zI}YZE%}une14+Sz(n_CvwJLWq&lD@%U4*YO552X+wjV7)(st(JII1EJ**f$le$0cR z>D^DfJU!n?3=R&uAcALS1yZ_A(J^Ir#iaSRO<&pX3n-`!6jGC=Fb?}na@u2#GqDx( z5*$EzEN1$8dX8*wS3#optb;>BWQ2KX2Rl?RAD_u=d8eR_>1woI^EcgF7F=1GBt<!$ zEgGra^`Lq5Fo(v)zjgT(9xMMt)>m)RO~Cx>YHJ%C8_kf7w<RMV_BUoq*VnyxczAFG z0&FLYnFqRM$wkJEm-x=s!<PIU<mKhb7*<E@nTV}c262rGBoX8E{5WM|auQD@TF~iq z&FJ5?7rKVWETJyv4vZzlhJFPt_g!+#e$S_K@Tj|^4THfz3hsnj%r^K=k=jr2X=!N! zL-1R0&Zyu0Qd+Hz0LXH>hx_ou_wC_O7PIF2_wSje?`x~7M7k9BChXy!)E?AFgwsx# z^N`L_Wnxm2s*+O4&!0Ys>8hnfQfWnn89?L1hYv@Cs%VxHe>D9(Ov!-xuY8UZv0|$n z4JgFU)_A0Qd3$G>OR8#V$&IPhMKXK}w8HO0PYz1mJv{8}?aO`J4h>K3JN&g;2PmGc zpO~MQA5-D(O-G^nRbZQxcDR%!CbR7G4!YKjoQ<X$85z0dVb^Iido9)^!AVs|$8`tu z769>)fK2qR<pAQ#4t)wP%MV@yn3>$zsQmKoc4_Z*r1RBV&Q^heHJX~5ws1Hp9eUEZ zJdMNM)ZXnA4_!Xk<rrR=#5%wW4b(wFY(8zw>q0_fJt!gIYT*0a-{1PGf~#$GbZgn% z=XXJx1T0n(m74mYsmU>k_pi~m=%c*>S(0={|6Db7jSDC{Jt12Q1Y?O3AS=>!ej8uD zd>Kz5*l89#(ASUe>FH5XS1$+t!>+U`($oq$M^#z5G;sBc=kw>r0HC282SD5~w!@r_ z*T|@o-Y5S;06gTY`%dO6djN%upEv3B;F6Qi149KCYl!uf$u-C0a3)d~@2q69&|60U zA8n<*IZxF<-kr@9pC8*xT{l)(n0BoSK)Lq-t1F3*>@Q4!x4WWHC}8IZli7la+BE?J zt5;J~6CiAql9IB%zCMbD<&Tey6#HpZ+RD7oagA6@gRr{zpvGu-cXt(SZNmP3h)Y|* zJ=X8lUI51O(jfpN%8fN($uf>hAf}f21F0f7k$hQ-KiR-khg}$DNT2a2#8p>UZ^sr< zd(*vxf^2D%gt5_4G{A`}6pHLk-&$K6xeAZ6-ht%ufS!T`<kWvthKEIZ{Q)*r6cvj` zMy&6ZTJ!Mn$qJ&b#3?}1WpmAe+OS;DnX|XqKv|fel0UIAS4E518`E}okyAvMR|aCI zse-SlppzBae=H?kKaIow7KL;wOYBlpXPOR>Z~FTB0PR3NhHf6TFkgVo;`KPK^n86u ztj{S54_+MS=jQ{o5xcwZO^lEK$o0UC6zeB}p+iUr^6$T0sZ=VU=k(A5hqTLy#9Qz0 z<35EjD@bh*tHEJQ-B)vYIRrWa2*~Q@W=)udh1auZ1~3>bp@{*@SIdfmK(kEy{e?Hb z)|u5KPCY8HpwOx0EtCw%7Bpq;d}1Va39-=PXsJ!lypPMomX`xH3>>}D)O7oJZ_H9q zNXW*;rJ(KT=N*^kAQK?0KwdV}dhMH~7TxDVg-nA&Lb5YiE61!O6K`+tV)mEa)Zcp< zmMR(=eUhSKRhM-S8K0N7qYu+_aNAJu=`H{Nw4Eq0`M8i1Pp2hHl24Do<er5A@$RFz Fe*?a06FmR` literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/gui/crafting.png b/src/main/resources/assets/bloodutils/textures/gui/crafting.png new file mode 100644 index 0000000000000000000000000000000000000000..eee97376163f2218d042defe741523311397b5d0 GIT binary patch literal 551 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G$6&6<n8Xl@E-&h>|H(?D8gCb z5n0T@z;_UY8Fx&~ehU<2FY)wsWxvNM%E>49G|SQvXv`K*7srr_TW{}d<ZLhyaSaqz z+`H7+a-DJHGXJH_5gjfMC(ki<Fi;ZDxn}@000ms^v5l*WzP|Zr_1oiyzm`-czx(>g z+v{rjlb}O$CVPK0{e0_*XafTS69Wf>0s~HlfZz6Jg?Qc!7whH6!o5AGb+RbfbUXat zBYxVYjuGfh76t(Z2atcUGZyr@E;x2B^QomkLwqF5F5{<9#qn!!U}!MlX)-C}L-ET{ a;`r-ve0SX$7rS;g$km>%elF{r5}E*AYG1kl literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/gui/front.png b/src/main/resources/assets/bloodutils/textures/gui/front.png new file mode 100644 index 0000000000000000000000000000000000000000..67c7bf1be79f18b14c9896fb40d61645dca8d6d7 GIT binary patch literal 2881 zcmcgu2Uk<s7Cs5ZP(o1#LJO!F1*A$>7(fxoAWe}bB@QAjgeD-;F5u|cU?>Tl0aQXj z1B!HsJbfkz2nqs9P*4m(0U4wX31u$K%v<mMfp^!s>+E&T-QW54-skS`Ty=J|MT;tk z0szo>JL?kwAYc;#P{Q!w9aVJ>9)y3gx3vZiKozKZ30T#_Ga?aop3wkEJl%Q`tnjL{ z@Z^s3c!y&<#t>LpjF4Ri1BMdq#ammsUKp8u7wXQoK{DrUA82>VDHUJ7L_Gb7T2!2q z+?ZIL*tj?o+$Q$!Y|cK#UH(LzXaCIgPI`o{k)UqS#$#iGHpO7btWf?YP6TQwW_xsY zCyzP5HtDNL7r1hwDiZW)Z0-)Y89lQLxrB!D))_RnHAkr`xy!jcv?A{L8s8UF8t=2d zTD|GRP0{A@pKYFAW4jdYM8=?@5DxX@L`9wa9rfMLR8aOU+;=iQ8>iDv*&w~0GnN*- z)N!uac#uo|7EZ|vus^Ue6Bk$h&F|snxa@LH(S?Dh->vr)<bP`#apUkErKakLLXT!v z&|0YpN}yiy{HbRtQ}KyN3NJU{TDMd_+STnSSTO_I)oZSa#euPIVC8~%S;+iDNwSK2 znBhmPFd(Z;|5VpJi2xn_V0<dGJ66t049IqV9rqSQZj}TA%?E8_BjtMp%7lRZ(vx4~ zfgk|eOZ=B;RY1rho=L+9qzVGfk9yL-0O0%-5R#28#kQO~3PJwO$$m8WN>^-GpPKOk zUpKDbIXwO(xWiG(u2}T87>o}rK^c7tyA#yKi$etv3?u<avi1Pzdy89xjy<E_<pbyi z!cq?Yv|2(v?V@0ZDn4KIhFI7s#vFM)1uL1HK)SnrO1UREDj`Bs+WiQ$H{~X>Okx;` zi>IfcuZ)NsH4knGX~RB7U&+?vvC?-ah9S<ULG>U;1ggPQ(tao{4e^o@^>I(QN2x$d z?3DM%v9jL&9_!1!xE6IDXPV*bs?nxrlQBVjBm}MtsP-Ogm(TpJm5#N|$~GHT#V<CY zg*zzR&(C^$nN16ahMy+V<^z+Li2}A8s}lJECj!_l3NQPC$%|;y?8YR&_ItINA}oA` zWaQn4YBJ6AQiGxpKBK?lW%zFv(=IZ>1|=HLqYcfS#+uk6xwZ`}R4Px2rJ*sma<t}7 z*{hdxPs<tXk$zG=?FnXmVao2E?&|?J`+;xmaTRv$y523t1DXSE^B#DY&N!c0o2*7T zQgnOB;r*VKD--v#&D@Q}8-|G*`sWx}r;4D@QEudCI_asd^y%qaw^k1-2V-^fw77E> zb}5u;Hk`LGBMzy`Ftxi)pNeQwK;!#aCPVz^*1_}cF(tA;zh~X|Dy5d_zJ92-IF^&6 z|6(FD@@^%UHo;d2ED)a0%es<dFsPc*FdXvPv+2MvW;Qpo{9yJclLdk<v(wdAjuYzN z)5ZD3oXUJ<haMiRC%J3&4HV_<`aV9HHfv_~!_aHYtWnXA3*Ju+%<HjoT7iRy7*k7= z-MsifTZ=sMd++k%)1}l%%I64!6WuF=i%H5<+GVA7xT?RHIVHTPRG`;bWlyd2{TAa| zdSubZy|2w@w!v%UK&D;6?MEl#8`CYF3LVTzMqGiw!4kICV`Gl=Ts1{25UxPpqN+Hj zh2DBb%{0TYa-gAU;p`!Dq!OG^EGg_W%hC45GyY`l{o;V>=B|LQRTmk2b}OTnMIN5k z4!z7pz7)!b(-*cQRXFl)CY5^87#qr7;WX2KIKJ;tsUw-&(qrn-<Efvx+@Qv9$>QRf zQ?nN|_tH50i_I}hXQ%<)1r+k9*$a1@Cguw!ms;5c<hc(meo=2@l!R_F3w~_qjiTI} z(D?abtZAD)L&3l5lpw^QrI}yb<M814gyu;%nZnyNVSL5A2Ra)hv!RF&ovl5Qg<U2Y z$zNhQZGnnrj(2D}_<`^@@$C<giDMy2gL8gyhXd#IYCbXZ^?fd#>h|PLCAf$MVOZ|k z+-cpEVzYaIj~st`wgT5T_$`UU3_4h%5o91^pm0cC2NP_P0UzH_J74rX!I)+zD@%Nj zPo1c8|2oc??$Wbi4bYyL47nsO$%}>c<?Ic1Ud}QfZeNUTr5|wE#~VAl$Nz?7zbpI9 zg-XS`uTk2f)uWg@@$@pK%&JB}_v$5xj~AJtj>_Xx9QW~ZaUnvf$;2j(Ne1>(xfi2$ zCFkmfiK)x$AUjS=C@T`@-%I?(zvmHtWI0J5ZxI$g9p7|dY+;eElo+jSn=sor8s$tn zjCwd2)H7DYdtXDDFjnA|zjGtqfLSl`rtE4nGjcV(XJcQ*^5`{l?64MkjU<&Ss(>~} zrRjGwf=p|MT(V<t+0pfQD?tXE?I%5(V!Gp(N7My6SNqQvJZ7#(%yL70m-&;<etm+8 z&E*TL;Y@$HD)8BZ|DNa8Dmm8cv8Nrz0wv%4>O>~o&FEChuo=l){4x$jUp2}=csJcu z%jL8<)*mmO{$kSoI-+>>vk3&M?z3EOuP~>^|L}-XI#x=h2IwoQf)MR*X6s1_MNT~I zc>g?`bw)}RKxjj&`Wt*?zYxerS&M-ii0vK=3#oJ5AS*r6R2KoR|4xwlyS+n6@4!B! zG^iUUO4YG;-9`bp!4pk+18e&MxJv8zr`toovP5sI6>~1Ep<sj<#)qrNRY63b@&GIY zKnehobeIk?dH<rBGDY&htRNyzXdfUH!Hu35WnYJVW(7L5>+Mq$&Zv>^A#{a7cZ8J` z0u&XNc}pAzKxthBKwP90s1uPBkOp9z#<tEth5lGrOYA;AxBMS2yM6`GGZQgO0J57E zU^__*w8GS3AK5O90IW=r;H3~e%wvGoHW28J)Pr|~0A%P7#F4Pz$Waj@TjBn-Y|jK3 zK^!3HoP*c?i@=r#x>;Rq%M}(YIFW=MUs2Xu1{`*s<9?LdwpKzT6UqMptI>Qf9h6%s zBl@>j8Donoqz8!AYwE~Rp;7TmvOtqbhPHP%IwQ3e&DQqYnQRxbksjAJQM!pE8w-B8 z2*H{+GfK)iY39)=KuL%ACB1$YIPf(Exb{smbM+~m4~SS~I_{O4Lxa=((M>&YF80Gg zE$~`%8x92stC+t6BG#LrI@7ICz~h>Inh5Y98c6~}5y&cAR|Vu9ksGJ95sa6ZgSbEq zU4kb#pGJ63_1Dntz<>xEW$$)PzFgbZXy)Kw%;C!Xla(#zC@`8LX}akIKphTj=wnZg z<n#Y6L*RRXOQ5<@);HR|jvW`OeE+S3RrPZx3#qDLaHHS#mVx;SQ#A+YqAwmS{85~w z;+_NE<ehK6{oEamcoTZRr4MZtx)an&NEB~fwi*RxEq?dKWG~AuCCFJ!UvDhfFEFOf zt$hDSz~k`hdr*iw@Q7U;(~;bh+hr~Z1?(oUU(L~%ZuNy;tmU;WWQ@B9|4Zw%5&3Z? zqRtWJ9eDC$Nl8@Wt|6LOlwT8V1ipI>8-R1WRZA>%QEe}HYpxp#J1h+ap<}Me;Q#xK a53Q^0mFi+i*r{yYi2?qYqc!~qA?;7ghqkT& literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/gui/guide.png b/src/main/resources/assets/bloodutils/textures/gui/guide.png new file mode 100644 index 0000000000000000000000000000000000000000..f99e309d59f5524c2640e73c90e98948acf775af GIT binary patch literal 8642 zcmb7qc{r3`*#9$QF!mYA9%C%YP9zkA8OD~Ske!I^N+`=1l6~Kjva2XdktN%V5Q<Q; zubC`a#;&ox^L_vM{rmo|=bY<2*SXHQ&N<J0KlkTz-}i|#xuMI#$jb--0E-?LZ3X}! z>MIC<(oq}R2W76*hVG7mE*d!d?<s73lR@oa@WWd90|0Bse-+g2TjoOTq<^SqgrT2d zU}b}-jdGM10ssQgLu=l8G_h`H;Kx52aJ@Q29f0CF+Ea)r*tDT)FRe^z(~m1=oY|ER zL~G2mk+Kz-8o#b`@qMvBPiuR==$U6*xX-VpXWIT@v&-%Xm9k0x_P{i|;x>D^nc-I? z28$3fMKFL7_~$Dd&$<kio7@gHPF}3|-?qc_85$ovJWwIe9Bs6+A)v({VOIR4-jgFy zS*7{tH?p>{7DjC;K#bz{xRQZutpv(k4P5&aPWX5(yx5{+BskCV`dwRZ#fmfE%Fzqq zlMZYX%6;m%0`g4tQSG;WF^uDFTH*~Hd%@<p7k^wckaC7#)b<ivr5OmgrP#l7z4~AW z298ImoBY_O=$(d|4k;QxctJiNaf};aOKbN}|MKiR-M{BzBacrElHikP7d@2v0xR$r z56I6xLg;P-eSCj)k2}~dfPv6IFJ|ZL#9=d!{)o2h?r;G>_(_U!$){}}68WnCUk<== zXBhJOfS-6g_1MtxM%~HDD@g$F8%802n1O>Xo49j<?x5`Oh#b<{S7n0cHWw^rLoL3f z;4$Kq#(XmJxicFL9&@^KoqqHC_$&?Zx}Ll}HTv>AA{q@ey$M?*DGR-Q@tBKI0(@U5 z92m?s$Whss`~Fh(ZXB`bDA^hb>-G?#>!aP|qdff)$5JL-9*-|hZfyCxVXa?s{$H3` z6McWwJqMkltFmv3Z<S=cspJ10WbSOo78WLy4&9}>3As^lEkcdl#<%0Y6sAGWszx!# z0Xe5_nA81p?s2F!L6f}AN8OUqB)E%(L~1I`?uaMQN$v`oDAGD9|4V;2&5&0oWcIJv zawT6}+6-%e3twqH=RXzg=Ai)hE05boYkmEP9?(vqUyVC1H#`KtXPxuSKeV|>xhxt6 zP%2wP4lFYzO1&~}mPz27_8O)i!0LzWM|0CKC~?M8ClqSyI4nAi<#Fa$G5Vn=STZO5 zW(}D7i9Ub*?NQi_WiFykm8G1Egu%3)D((vW4oX?pGQAUrzxW|DZ7dRznT#<1oR?92 zt8(a?#Bl{)z*6(4N%^gw&X<L$$C^08JmQS5Xn4>y>=qmvwv!3>WWt=5vBe}2Jp#bg zqE-HMqRAPwIE*k21TFtNP7$Dh1+H&D4df@zuZ~=6Xwf~jzf-=#uOElAS-UgX8kgE& zC4PR=BF5yeiEf})9Yb~Th&Il$zXoCmznw!c{F2p6yZIGjYm>WP{2s*66+?R6JBj}t zD@@YGHA8bYP-ayq_RmA!VYiWmx3qB2JQ7|ef)3wmLzt&$-MF&kp@}L|pmPg0Uu+MY z1W*i8fOi<k_}V`ufOvU8;}17QoAOLY*k+rHTg#N+Mx#o%kh{#;E<2YXil{TkdY{jl zC>53gh`-p!tgA1xIgUvI${$CncGVr>Z@`n;L~KOtvM()ZUBD}mq!UgU>SBMt5toAT z3!4Yav~^_5eFT78x^K2iJzRAan5DPiDze)#agW74rYF{X@FTXLhpTuLlE89hfr0i_ z(aZ9CJ0fRadLb7@p0aQ>Mfd=;g(epG<>Q3Qs{78gSnl<{PIa2txO9zTD0Jmv0_$`T zhoyQ;l$tB6O|`q73cw6u{R9kOS+9u<ca@V<9fqJ07li!Ifo?)SC*Z*t)1qCKesLjh zg3_Vyjgi#!Dhd?irEez2jAhKu9dULy6^(~^rAkWhbeOykH`>=|SSCC#1Uf(e(&<p* za`gJ9+0Eg|ziq%>bk6oOkCqO41(t>>^oB313pe+q<{-J?jtVeo03a@t+Qvx61AJd~ zAnCD2uujw$AYI`o<3$ixm>p{x^ggCI5~d!A8Y%)xA(wL}?H1jajj-C2WwgtlBx8@= zEW2lDy{xOz+AU~_Zc~mr6SmyU_1PNl;22*UxjR@}AjDvEqu9K%F1>JE_6QN*Ah@P< zBE~XaTaEWKq=<SdbsqdWk6CBuYuMRbPR*R#Eox;201IEQ<7qp_Yo_l&FB$pmxg6Ig ztU_1Do`Dcr2sw8H)Wj9#?V~|cxJu68R<iR&f*)lm94(rLc=w!1&VS8GO4{BPmMV`Q zPV7_HxJc7mAfl2XGj?A%{B{jJgC@DRp@*LlHPV@+S`*^Ukk}m$T~{DE(SEc^c;%8O zVu%Zb^8et*b0N>u@YuB#n!UVszbLlq5z3+p-#1kQGnpvwjTWeidso?;z;P;{7ylaM z#b6--+PoObgcpe4j5pJJIjEP~`64ISxE0lG6`R`#Exj1*aW%qJH(2%hV|Bbp_$OQZ z#Bw0n8hAA!*81s_dX&CX&unW!kJn#sV3FJ`_4MaOW5);Il8Mu|nHASK@n-8!%Jd^w z2q!6rtsgmxzPL8*(bIJ?#!7+f1J0KYbsA`dw_At694+U}ngC~;Q|PP)#cp&1rRf^@ zfMneLZ_9IieS>aUUMeQEN6>XoWHhGYCnqzY(=GPCzUjkZnngK&S2m3a0E!jjCweRr zZ_NDOuF8KqFzf4|gi?0I+DLVZhAVHV2eMJ8^t32IiNAD&7vp7{Fv0$k+hrPSsS4w` zm;&6I(CXPfw%y|JtYZN@_C&?mLhpUl@Tkz9n85X86@Zvxe<o`TmrHcfIrWP5HDF=A zJ>NZD$`x0jYeqV-=1^k1V*DxPaP<n@adJ?I9Uxc(M@_(wdxzHGlXw&-DQFP_F=hxX zeJ=^iDTQ+QlY%<1qnA6Z@J`7fY~0A9`L!*gB?uU3*~~N9KxJyZD9$-H1&8pBL>kUD z_ST>3-`PE&xeWRy0@%H;0n=pY6epl&PTNKm9TdWtU7&DrbxOocK7Nhy+Aw%-XD+&j zpGgvoVc4g&0x5K@w6rucg!J=zy_nG)$ub8-O3$XkvG98heSx!dN<Rc=SW?Rq@L31G zVaDXQ1Sd?P*^ADVjEg;rj3`;#E|f#itc#~}EzbnTJ>)_Xcd(28mrB<}39zf=);?qV zjUPw!UMKRcOTdgu2p!YTGkMi3KCRyaK>CYduZh4O#?$BR#H#{<Lp>XRf^>suqL{Xh zg6Kc{ECxfSZ8S(1#etKKP@rp5ELqi`K0a;LSH=r@XV`D-CcXnN32{sD8W)*l+Z)S% z^6ykqgTE<ZJP&ZGXBl{~H&@zAJ`VeJ`%=3r`(S0zRGhN?<G2dRI@-c&Z7A(q>!)vZ z_{~*I2#ShW=bUGm=_={=4OfEF5-j^wG=lQIN`PI8W6*$s!IL04dM*(Y$nL+D>&#%* zPqdDxh$7{!v7zq&s_;wq{?&5nmwa>on$HcNqh0+;);UeWmojguy=yI1R*sYhG{!tZ z?7_hcA9tiv+hu=x{^og1VrxzjNLVw3NYnw?d#g+qlJ9S?g0cN!Vuixs(*$2vSNf|u zrVUDv1tqXv%CS=o`w@eSjGZ0WPvGWc(EQh!XSN#Wsvo}OzRE;Im$J4`bNKUZG2Lb0 zAb3AJ>XAJsbgi8mFIij<+Nlv~aldHh@X(oiP8a9CT%J1XZC)7vTJxvkOll1jbw=Yk z>9tXA&K2*xD;o`s<?bBz=Zt=sJnL0)#0Vmy3x6=+-C33^|KMvYRC;E=T^9W;uG{D! zDQ&(r9^Rc7QQ*W}2m!x$pDfA`01bP@ilxbro|&=jQs|8#H3cl#2cnK@O_sD`@iFb# ziUV#6rpLl*{rsa$eg<jnYM#`XL8v$?Rt(vZ7p4d5SuDD2J<<fsdu3WXkjSI#vBLb* z*TGM!zkX44;-mo6OPuxcaV8Rc$iiwJ)x}N{=Kw!&^cg`Vl=bP)wE1aLRij{A9w6IZ zhp8&np;FV*8#s5YrBnO^+oD@qX%1tNA4jXNI$sME8f=s>>4g;fnpr5QCZ~(HmV~-- ztO{+E%}N(KVNksNev*)L9Ds6X744=dK}wEtJz1!RX`ePtqe67<9wWQ<f0S{v4=keZ z0ur%jl0%WWwEm?!xL|R<mLjRgaE#+Y<&odw@FieF1)$0}4cN6~f-THTOCI+YoW6|W zq0gC6S~ya<3~l^ntr^d44Z@0@Z~R9x4qn;P6efuNllcVfzb-^mw^#s1_-?alN!{F~ zoX!c!b)0KudIA%T1)&AM?}9E8grO$6LmCn}jE10P)#lu4D3tm1!R&aGjKacX!>gq_ z@1JUe9_h=k&Qp!@e!evom`r2vYx?ee;dkUx!+0(Fs%kbCp3m!--hn{Ecq5@sby&fu zA&nJ`=36D5qi>SHas`v$c5|8=q_pViS4dxT_l%s-`uT{D`m~00GB=q~4l#<>Cch+f zzW63@p`sIbyQS|NHHTg;XnblIb1ak_Y2lG^ud<B|xNUFUIlOQ8i2Tw&3AiF4nE{9> zNU+pHZ~G8aGiEz~+)+Csp9C%0&KBHulid0N#ajilzu`pOhLBKkDAVaokseuZ&B+Av zzc)D956JhnoT!mHpbG|CxkQ8EJz){<<j7O~J*72Q6|zx#I#37FmjWvH-d(Q)oD{zN zxboPpoTph%d^W8$FZv}rMHm`s^}lF(d|GGuzO7#COO`$0l@@+k`syuXVt!1^Z%J_1 zUs`d07)X?FJA@&U<&AMZ(e7YsX%c=f@G%cn;hMp2iS75>N(EGSdOqB0FnhV&jQ?@p z0R0yU6Ny?ECH{=-c(?Z=*uHstUbI4LKafKqZXnxH+Xpn35P`I$3pD&%(FA6pIgXMw z+HQ7oI#r<Z;s;^Ao~_B1d#d|JhMTWhYJtq{OeQgKbWuQ0L6Njb2LlUJWb{j;51ycF zhDQ;icW-Ddir}u4oNd?~%=fKUgMsh)xapNAHT;b(9q!;dfU@^b&=A{!M~8e{m<U(` zwHzN;s~mDcKK%lVOtX3oemSdfr8C?PV!AgOZ+1BeL^b~r4*cQY4=z*9Tr=>{1Elo} z#BJne44ASgMFuoO_4S@a`;Z2{3@o3|I_wb#=C%ljOaRdrcZ>u$X|e`rd&YLjF~=+2 zye@A^16@hmR*nyY$=+T}_JJU|T`Ev+$Cj`XH`Q1!%U*Y3#h<hr-ys>>L(p$al^bjw z-&du`pnyBSKv)JW%cju7T-WfXgoLkXw9vuxv{aHq4k5AYsi%v*6)n-*2w&&v_F?7q z<TbiJ4^m9%W+;wlQWffN)bg5tve@Fj9lxTPa4L)>IF2?h06S_=?aw{AFnCVrDdHvf z$6i_6g9a&1;XbQ40XR%w`Xw|9akf~_kZ9}^;Js!&q=^4R{1XS-^>)t=O**vKAlN9P zTSWWqAiCnc9E%UDS=VT*m~WYZVm(+m93UbtYxtaHo|FE&ts(s<Ndt_S+cw2l3=H8g z6aIJLN-4X#Q;o21_6pT&;6XCGQ-?bP^cmbC_>k;`EkJK7Btswl5q!^s?WHAFvKC%x z%0tf0@A$%O1F_X;u>gCdWA|=8O-_NQGR=iaMZHBTI;Y$7y_b@Y!0GY3o|Oi3@a6_B z6>P;xCr2WZKt$U#%CG7X-_HlexKUp7(jhM{=t{5y(&Ts?G{0r-D}c(EWNPk*iePY~ z^r^MLpBf+vR(4BS)BGLZPeUgg!y`k3S9ckpMcT3RJ$_7{n9e%L8tK`D2kFF$<u(`; z%RJ5~4R%kR-MJ<XX8nDXbo}CtnA91e8$7q{Aj3thpat*?vL}W8(&)a3)hc$wgxxT9 zZ|8{{{~96VFV38TX`=(_InL|fZIM;Ri>J}1j^zRj*5KFAHKbnS7PIlcrH0KU7GPN) zOlGS;2%CI@5Gy$g>u^fSaBRkIyT~`?f6ua^+<BP}C7)s!zcx4G?(+N$VQpjr?0_%8 zVLe3E=C(q&z?O3-s4wb5itNYO0!xyHJ6z6-a$4NPQ@3SPLEu`HJvc1<2z)(HgFT73 zF`4*GTKDOlN5!Ige)F)@Hr$OK#&7#l2KCaNP-~zI?c@pxUZwjXOo*%cA{D(c)kn@| zNB(B)k)o3*2X<|^Onl%d7kKOsrLv0zt$M(H7nWZLL`B+26JLAB9G=?O<(@338S~aG z8$c$yFrP<*<r1Uo>KJ?{BL&K0zct9S;pOoWB7_&vF*P!&HZUT*`F?H9`;aVw6^z&O z&=()F{$RRib6=Z6zKQ^8qYx;x@sHlAK--wUV@KujxqvVLex%mg!v<*G3c;XWk2-HI zwl?>+)G*?UrkCx`5#MnZ5=qLX$~-0K#h$`J@U0`rS}XCmhb#eBn5HZF#rq`eRT7B# z$v8PgQ`k~eUywb4o5ZHE-5iHvCn+xgX8Wi0RONEH;0z2Io+<WJDP=p}QwD%Kqo1_M zaK@^*VeJCrW!FOZf6mEE^~d1J*FlaOc|k7^A|z?D41g%rXkGHrO`@FNaYOgyq9TX* zKBw8G3_(C*Pp>fF)-9KG2#-Y{FzKG|MwR_)O!f$?JqUBuz&~KXkF=<7y5dwx1Me8H zO%}1R&qMr~;*Xi<47%Hxx#{vL1#gtmPGLoEyMnmw?!BE1j+7kIv-CcyH@9@a#z;w! zpKvog71zDDXB`snxUWKs0D|Amk1;-;kCFl?rnk4X9iEu^>m0wKMt?}dt~FJC^8f2o z7hb9PWeJPtmh2(G%f&fY)Rs4(x5_`TT%|>nQUpiu^w>g>1-{wB1ZjpIshJN2dYyqD z(XH)o5-osR<wjbbGAf7Q;7aDs*M*{fp!~<Dmr$ncvUFdE&0`Hu6=iCnB7^|1`Ki+3 zVC52b@96r!V~1U5t=p0V$tZ|35ch>OUJv*D97T9)@rIua!{-pE(3<tdx?KJhgH<qE zhE5_~O)izxP>^uu2EGj3J=;5@GU^Wph{}i`)_|*gYAXUOcI_{R+ae--`(0LW*`%}@ zt<`7A_dIFGK0L8W0cS^j$*6~*SPqy7xaJ*ituEwFszdpW&CfT1DcgQk0ky-c0!L%Q zd~Au_Uu^wM%g8(IpcT`2?>Lm8FhS)cX!N?S-~R4uSxREY{kth3k$O37d1_)#S(a+z zcVvZGy&4ZgK<7_hm==qjUfHcLPRpJ!xJ_h$bFl?YuF=f4(|P<wfn(l5uiwwP+MHWo zSISaNUPh2GQ--m*8gfoR8TJ=z1F_vcX?_MUJ)yda0Pwej|6~RH2$51nG<%!YfJ`}! zuId;Jz-k}*cyAj(O#{4c?1YyJ)0LP=ER1lj9R6KLt@V9~0RfXfGxLWkRm^A*D&V1n z|27*_>5y0}j1i40O3I{baTSw-r@rr*m7V&EZ!jVwR>c7yW48oS%GJYf&@jqL&#W*Q zLhG1H<%2Bul0@$%y+Zd22FfRCikwAL3X-7}Qqqoh-9c13u3}HN=kt3GBF=N--SWd3 z%YJQk(m2%Fzf1Bl?qV++v&P-k*iIPUSK76R8SYKj2!P+V?aE@4O$(sak{6bf=bD4` z{g?~(a3v@vW^$cC#RwTwm-3#PJylGHFZACuWGn_A&RH`R-U8VL1<@m+niit%^JpS! z*Bb9w>i`u+Zuxu6in6@pcoh0TQs(9LCzI;I+@n=jrGY?NndbnsD9V9bq*y8St^@ua z5{5>@DZJ6=BGh|lb+=N=y!w!~S3|zQPtH=pkJ2vF5zA3cfZiua*LhI;8<uqslrj~Z z)O*@^O?>M;LCNYqC9&)`AX><89z?&(G`&ZEkqL{r_kRYfjl_-EGETE5X5mHQ_%;s^ z<3;d#_RPLvvlIrwS74Nc!QoqhOMr}=O~g1&gy-mY)>tUyVEce8GCdXrkvre$0;am9 z<;0pSt3}5L2|>)rEpH9AL}+JD_Sy{yQePbC3jJ%KA6#v~e(pay)^`%_b<%GQFrxMc zst5J{#imYka>}yMIzB=>$}z}tC<$)++IIRaS*=uxOa*+iyRL@{?30mo{xt5T3=xXf z2CA;`Uf*eU-5h9>!Iy9%vgjx52Q<dCpW8tq-+(a>NGalAvB23TwxxlVl?yb>5YT~< zq2p{P<PA*>2B;rd9pMb+WZ)_gSMpq~r0Ee;8VT2bpMykn&{=55<68ysioDdg;nYo* zvhhf~B_9iQ?TjoQWSvURyQFAI%1s+C#E%D-3IPTvah!BZ78*^IVqm?&!Wr@T;?I}n zY2UGDZv;c21j<$dD-)hu0kkQ=W5b=-@@nVo#(IN;G@h%%HT(X_Z=CM(v0WSvgV6i2 z+W)RzIO+2}nf(e@Lla=C8{G=RRK|#e4wNii0#mAI5^h!E1%e7!RmTisCZi5~=y*?v zU>(o#KmjF#L8I-<=TgCQs_fT;Nld8PxP@x<Nuh(XqbDnRhmLS@8A=8hXjHPe@-aof zenI!zLgD$BeJ({%^Qhd{LoDJMz`qf2lvpV0DvBqQUg83LQ;eXob(i0=&lswD+sgXk z@kzqMK-yzkP4zm!ZWX+o)YVBvt!R1d$}63!?)1Z^I*N|r9ow6gpQ6g`E|-l=JO)vr zWcMRvRp8_~y~$^8y!AAMyAu6|hDBSlRdn$5?_Tnmpu;^Eoyev-dp8HXQv=W<SVMYK zL^r^`IawTPUSf32-|Nc;o7mbAoY|UM@+fJqB6f%XKF{$hngb>fI-wUP%zZt^T#is$ z$4}!QuMFtkayLGywA0W4kg!S|qTi4>SmG!6CKW>IcPCo-CmBk<01SscEN~4MrdPqx zSII_`tmlW>m#goUL6HdIsXOlXMn(>vm`^v7lavnk5<xEUjYyN3A9FpW2QO9|_8^L@ zpv9%{&cOqq#3WzFkNk0KsnjTtna8Dg{9g(1MlB8IVyNn6+7CKMFp}~Izb)zRSud#B z1CSim2<2jMJef|}v7&{+u|!1D?mQY*=^Zg++n0B&v!l8=`vT+Lsn-AEIbPHs#2j`Z zx-Gfxl~skTLsYsW*yKI;$A&-#Z+6$VK0OFbA5tSiSPLGwXW#vz`jj(9V-EwMTGf*& zpLTL4+L%1w@!gCP31^VT@BK+g-XJ>Lu)fCik+R#e;TTk@2)KR1uG}Yjq$yv5vfk;? z`r*#W*>uC~mwDqbxM1HYtE7SCSW_7N;*!PtU}tK;r52#>f*(j<y8iW|Bsh50`r0-< z#~!wPf$Fm~wFNDo3;(e*@%i{JH9xc9VmB@ggs8ozf`m2F0u?MAI^+z-5zw_&Nk!Fr zMvr9u&yrKZdE@WZb?NwOnNOztqOT=%9EW`WU9EBSw_qV=mcpe_T_KOZlYIQ6o@J=t zTw*<1sOFbg&>-iN<C|(hzt_mP2>k$d7}(<#EA)JgzjU=j>y2zvAXxWoqu%j;hH+$% z?5mBjiRwB9;jqR!nx9YJiUlRSO2B#*%p{fPscrqO#x*)&ur$xy9H<M|KH6!hzOysZ zpB$EqTLdXo_sIZ2qT$+x(!D(~j=B*p%Cvx4$-7~tukz{a5p(8IKd<^V6ZI>TI+ic< z8ApGBss6+V{yY=bRd=-l^??cj$l;4<0hx1#rn;em`W<iDrUze`WV%cmd*=OZ&<`l~ zg%8&0pd(gJTHr`FqWLYm+;?B07jWu1VZV@P2^uG&>JLcHz{GRBn?v}yApTRRm1Q94 z--yOp-Z$;npu9_xrqj&hO{}KVYkH^RQ3t|aKcI&*iaP?o(`PP;4Vm4y^qs=<Bz{ae z7PJqZMV?(042A9Ze~+vVDed%({Kk?s0;Z<TGQTa~j8WuGy&#k-eE_7-@J<nbAPSlV zZ{&rt#J{yBopr3t+JI3ez@~9Hh3y|{iQJ`KK;R;r8oL=cGA*eS^MYpidxu4~yZ<Kf zHGT-aFc3z**tirCa)CtfUZkcuyaii-1~??2cA;LUm2;h)gbQ0i&>yxoCVdw^kxx32 zr___aQraHX(UJEjwdIF#a#dNi6MfubzeV0n>Ad@onyCCEHF5G^BJfY1AZ{6!zZ(0Q zx`k&!&OP!waVgHT>-6`3JA~s$3qojohEm7>++CyD+<nTV2&c0G3>z8RJxU_v--fLW zNdvCNC`KZ_8`uZs>^05@!VzB+eEbVoG-J>}ew&}>e_78gd$*ZeM=WkfOAjcm(+3k| zW%7cs{Fn@i+Y*mx(FxBz(?$aJNR#>@S@O`8#FY!XDh=>!$+SxWUg_ajT0|mL#9cq; zv3P%sUyg06=7~{YK><n7jQZOHer(L_f1+1*GLEU~R_fxhKB>nLP1ygXfMV^QDjj_Z z53x8{SKIy6_O@AIznuSC`&ao$Ec1t8aDM3i<b#8Dp3wuDe6=K8Z}{2wyee|*aXWpB zGb9a>c~$uMgKnFQ{ptADu+Ag)Jj4SIz(0zO9pwK}*;-Q0T5`UJ;Q6d2eChija&vxy zSKZcTArBcV1(_q&&SoEk@5^)d-~AUyT;n^F4ibDBF=R_u>gDUyLkN<k4t-Jp&G7-^ zjA1-qfGa(-_U$A0><>61u24FvA9`LSsMG|7p5&9oC=5t?(AE8((XL)Mp#%Pw3(Dki z8eovma-MVZCm%H;P9ErY+L*E#^WO}7L`w&n>wIMZ#<#fN0V@YIjZL75pp4^DUKU#$ zdpZv#FTo3crjfB9?eNYip>}<FAxzZSDm^o;<GsEc{##S-)UI!qkSb}}h1|-px|M}V zWi^ViZIj5LSG^n1_>e<WgmFM+FJk~_v!U{+nfzUhvVJsnw(n2xlbf@7l8C`gs_zpR zBC)1`q1I8WVDuUeId`Dmd*lDfYo!agJ*N%(qh&0gI%<m>gAxQ=;zI|$6h0fnR8R~% zMbE+mr<8w_-BcjBgAg)B=U8x2GPvA}dZj@7zq<g%#gMd0U@ReoDzgjN(`kA)@Ec~M zv5YYL)43<8?OB4q+gzrQCQQ#7$oriyPOC|k!-qknBctY6WZ}`l#w#cc%_)yhW_iCw zNTt=(*$LK#z*H?@^@tu05RiBthMoY+oy}C3&-w4<Uyq>G#MjCY$#~aff)xkHEtt!O zKh7y)JOYyT8pwHiO)SkQV}=7H8-)z7jcefKs^ky<S*nadVCAs5NUXs1(!co|2{$=N zPd6g-uVOSInx#~d?Pv=7zbWwlMalm^#>k8O3s?Va5<j%k1*hJ&0Q4|7&{bNFk^cie C{L3Q% literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/items/bloodShard_royal.png b/src/main/resources/assets/bloodutils/textures/items/bloodShard_royal.png new file mode 100644 index 0000000000000000000000000000000000000000..30f584f92befaad8d4951dc10b7eb65a2101cf0a GIT binary patch literal 400 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqrwl&>!;fUCDL^6F%#er@=ltB<)VvZPmw~~#C^fMp zHASI3vm`^o-P1Q9MK6^dDE`IM#WBR<^wLQi`I-y_+Wuc|kr3}-X4YG_?gQH%;q^)4 z@jXXf&15<C+HM?p-@uk_dZohia?Ja8+3(+Tdj3f^{*%d<u>0z@$u1_<$$uDLZ%w;> z>u4q4nP%I)468*8tVBP3naVUP?Z#e)R7){thuciowKv>s5xDpz>!EGpPL{mw+>=sl zPH!?i&!i((_VFjrk;0B;lF7CA7q4r-%P7;|y64hKC%$&>MI0+uwQpEbI?;!BQb*b> zrqW#QH?|(0OfC~|&l7iW30~>goz88~IEAT6!6lTps>VktbFInUixSL}_?MQ~^zZ-0 mx8Svv`pam;lP}|EY_h(-V6EB3W5Ttdfbn$ob6Mw<&;$U)W|o5h literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/items/diamond_blood.png b/src/main/resources/assets/bloodutils/textures/items/diamond_blood.png new file mode 100644 index 0000000000000000000000000000000000000000..1d5cf9c6d945457ee9523870b48e0d03aa137cf6 GIT binary patch literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4q_)-xzH&6Cpyif|Tq zL>4nJa0`PlBg3pY5<o%r5>H=O_IsRCe7xeXwqN-Q6guhY;uvCa`sn11Tug>MZTn9Z z%Di~?PN$=wTc(z2{(<d<Uvg`h*wY24GYhha7uw!&$y@E+I;%Uq)NsPW`q_W#XR-Xt zeRj8%Reaue*Sx&jMtZARw~OT+{Mz+rGZS|nV+i9lR=)#5fs-;0mOqes@LX)GEbkr$ z=Y$8fPd-W-+?%GqR7J{q5lh1_Y1Uk|P?cMYxn5}h@H;5Q$>+c(!#a;qSmEp4j42x! zjrnI7J@hZTdFq(_65X%Y4HxGe^tD~h6Q|jnlJxDt^4gBA?33CZ(<*hs%YmL^@O1Ta JS?83{1ON^uaz6k7 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_air.png b/src/main/resources/assets/bloodutils/textures/items/gem_air.png new file mode 100644 index 0000000000000000000000000000000000000000..1c16c230011af9d78171833e016ba82304d18c5a GIT binary patch literal 525 zcmV+o0`mQdP)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00006VoOIv0KWjQ z03d>%9xng@010qNS#tmY3hMv>3hM!aiw#-;000McNliru-U%8FIthaL_xk_<0h&of zK~z}7?Uu1_!axj$|BIpu5!9(->VPr=8$wJ--TEM%yY~^gGxtH*keE=#MlwbnIz>!X zg1WUsF}hrAk|@`q<vd#cefFLG=@gC@EwU>BozY|O0{~v0MqkkE;W<)ZtmGu&ZNF3S zzo(yUB4vt6NCGn5uP0Han1tahNB^b=07&;4l1*?*q$g3PIGp7Ga1xWH`wRe(Y=S}( zkGmLCEcpOHnWs}=emE2YgKoFb4r#n|r%dMwrt{=%C2R{#%r`GeKjC#9mIObS85HM0 zx(7~N>lNt9s(kha$;v2OStc$~)jE4R528hO-E<Bd4}Oye!^y4?7;neTc~Gai);#d) zY}~mR#{<WMf5HP_+BkEau^qG1$nu~h)|hZfJm8qf@xT{PIYQL&!116p4`>==ZIx^P z5A;zUPIk@y2d#J@iKR;H^B^|1kZZvz55)h0UP&wv+40~qcyM?B1^`$s2hDjvVzSk8 zP@e~;Sn{zvkOK8eL>^R$xfr`Vpo^+%p^^tuD`x-VD{z%a)!7-Ozs-YhvvtTtzQc1a P00000NkvXXu0mjf%$42B literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_air.png.mcmeta b/src/main/resources/assets/bloodutils/textures/items/gem_air.png.mcmeta new file mode 100644 index 00000000..3ca39cc0 --- /dev/null +++ b/src/main/resources/assets/bloodutils/textures/items/gem_air.png.mcmeta @@ -0,0 +1,16 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 3, + 2, + 1, + 0 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_darkness.png b/src/main/resources/assets/bloodutils/textures/items/gem_darkness.png new file mode 100644 index 0000000000000000000000000000000000000000..04d44fc16e8df7486653ea1d26e077929499d050 GIT binary patch literal 499 zcmV<P0Sx|$P)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3hMv>3hM!aiw#-;000McNliru-U%BACJE7{NEHA80f0$F zK~z}7?Upfa!!Qg*zl@{^gu323dDfEK<O-cTr$=b!%)LTx<HfV4ZjJ(@K!$cH4M`DW z8CHkF;z;OIBt<?*;Mbbt<pIEE`}%kWfRDHBH!OR3Zv+B%<0N7Iym9>c^D7ug_+k>0 zfXw#WL4+?R;o)>e-}e9jDJAy1^$^GoB7E`TbOnGxOeUoS0PJ^bCrA-$j4$SV03iI^ z>0sA&&cUjxoN`E0+`GjX17pnHOoAm$v6bH_`-ZYCZv@m#=NY*^gv3#=;NQae(hX9Q zQBJZ<p+IBnT-ZElj+dvYbC7xPmpsr~yFIAu={$(ZZZ;2!n2pOk$UIm84_4g9h1NMV zjX@sxVn4`Ic)&F=>J_Av14J_qG7o0+fTq!2<>>!`J<3|^Y5#*+JmAD!Ch2+LZ{Zjh zXY-(l;Q>eF%!6g{plw?KfKqBY4@gX=l#1tpFXntf9&iWkOjsU_i9=`7@_-sOR>CL` pxKjN3*;fc<!ey6ckp4FhegMfU$4GMJ+HU{=002ovPDHLkV1k+Z+VcPa literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_darkness.png.mcmeta b/src/main/resources/assets/bloodutils/textures/items/gem_darkness.png.mcmeta new file mode 100644 index 00000000..3ca39cc0 --- /dev/null +++ b/src/main/resources/assets/bloodutils/textures/items/gem_darkness.png.mcmeta @@ -0,0 +1,16 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 3, + 2, + 1, + 0 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_earth.png b/src/main/resources/assets/bloodutils/textures/items/gem_earth.png new file mode 100644 index 0000000000000000000000000000000000000000..a8108ae97d54ff3de5ceb2c07e07931e093dcdff GIT binary patch literal 508 zcmV<Y0R#StP)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3hMv>3hM!aiw#-;000McNliru-U%8FBqsf7^?d*U0f|XO zK~z}7?Uuhz!!QuWKSycQ0aao_{exgeeJo~%Zae~8ht51!)VURqhy^L?fa*#xz(uxu z7duKAN`2$$zVrEf_mdTVEnn?20K@siMFjxQkMl1WcK?(sFm~i5;q}$f^1r-)vWb){ zCLsyPOuv~#xndG7all|S008JpV}Z0zWF}Frc!>i5)M7GSX#l_isg)$*8smy39{?!# zbPC*m?5)7;GPABjnxyHJqAXFAWn(4m71~(pHp)C<G9DiZewvxub0GDB69>HlJ(<tf z-yroe%DpTTm&muyiOGX}wHvjagUExw<iTdWwE}PNZrbx8q`J;LNJ2KQDJJqD^5CEF zAeA<bTW4+>Ssu7zH_5s1Kx$&pE9gqs5RE*DJm|~=nnrV#gZ~HSC~wx=cK?G;Jdngv zCH?cj-9jH1JM$n3;ekZt$b<9X!P{#A0GQ4u?Rh|AvgvFR&I4C0`B)xEfo3Hl4}4-S yre7XVqkLEJ@<6(Zdw=m2xJsnz`Wd9t=D|14o3REj%|V#}0000<MNUMnLSTZ`DBTkP literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_earth.png.mcmeta b/src/main/resources/assets/bloodutils/textures/items/gem_earth.png.mcmeta new file mode 100644 index 00000000..3ca39cc0 --- /dev/null +++ b/src/main/resources/assets/bloodutils/textures/items/gem_earth.png.mcmeta @@ -0,0 +1,16 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 3, + 2, + 1, + 0 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_empty.png b/src/main/resources/assets/bloodutils/textures/items/gem_empty.png new file mode 100644 index 0000000000000000000000000000000000000000..fab0d2a77f79411ae57f5b9a2a55dbed22cb79de GIT binary patch literal 315 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4q_)-xzH&6Cpyif|Tq zL>4nJ@ErzW#^d=bQh<W&C7!;n?DsgOcuftWQj%?eLMJ?3978NlubphjcgTRpb-$p} zR3`1D2W)$}xYJii+_ZEmcRRANh?(sON60Gmh=M09?xI@tTfW4}99OIn>N_vlu<G9V z_Y4JgSM*ny<SIz~)Z*F^7v}l5=(Vrl(+v$w9wo8f8ttq#Ysxwk3T<5{P7C1Uelf?J z<&2DLl+i{u<qhBE?o|g%te-G{UE<tzuanewac^#x(YwlUqbWX#YsuY(Q6EJ=Sx$L( ze@o-CX;WuDoa5~`HC<=jrxmVD4Z00yXN3McoxaJ%`TkGdAp7oKRo#D+fqr7}boFyt I=akR{04u|DfdBvi literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_fire.png b/src/main/resources/assets/bloodutils/textures/items/gem_fire.png new file mode 100644 index 0000000000000000000000000000000000000000..66b0cf837586ad021c7f24a593d64b55ee449452 GIT binary patch literal 464 zcmV;>0WbcEP)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00006VoOIv0KWjQ z03d>%9xng@010qNS#tmY3hMv>3hM!aiw#-;000McNliru-U%8FI6HV4#Q6XK0bNN% zK~z}7?Uuhz!!QuWKU-B*ONfyP9sp(V>i1!0?;~XI%=>utVDSKDVnmf%vA|+i#+=<t zlOUn^q%4>F&hh>EDFVU#?yv^1>7H*s0N`cYeIc=@-U|@+%Nd3DcbgynxAzm7NaW%u zjDl#XKTRTXaTM-*k7IbJ06c8FbD}hf$i@5K1Hf5~Bnd*IG>N1Nb7cAeK;);#z|Smj zon0qtWbKsK@YG@?M%pSbRC>ZAAyCvHmFhr=SzS;}-*kgC$tX{<OjM#v>nu|q_}$@l z=o~a2%*g|n1?p>f!1=n-Jdm7?YdmN?SO5=JrH!N3S#f#b3KiE2<AGz`zt{zpK(z6o z@nAF$9I?vm|ATat-O&GoQ9N*!mbpLSfvyDWId~vBJkX5?i{^n1@60tku-Vnj5FS{j zkK}>9P<2z|fn~JK&dLMB5Eu>*Ec5=wE*Pe7x<UHiJopB*hEWW=&py}y0000<MNUMn GLSTY!L(DJ$ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_fire.png.mcmeta b/src/main/resources/assets/bloodutils/textures/items/gem_fire.png.mcmeta new file mode 100644 index 00000000..3ca39cc0 --- /dev/null +++ b/src/main/resources/assets/bloodutils/textures/items/gem_fire.png.mcmeta @@ -0,0 +1,16 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 3, + 2, + 1, + 0 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_light.png b/src/main/resources/assets/bloodutils/textures/items/gem_light.png new file mode 100644 index 0000000000000000000000000000000000000000..3cad4c546c44331af456a29cc8552b3ff34c03a2 GIT binary patch literal 502 zcmV<S0SW$zP)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3hMv>3hM!aiw#-;000McNliru-U%BADIsHs{2%}T0fR|I zK~z}7?Uu1>!!Qtrf0<AMF14mkCEA_G$fI;FWb7k!3}o)3<T0#0AyX&2M9{5WdPY)o zv5eKBST`Q}Pj{!g4+;EQv%lN{Sgv30KLOzVb^Q&?p5GdQfL%FB`1H7R{O6CaU?Aa( zNk{@R+iwREzL<oo%?@Q*0sxFLI32cqAUlZg#jDK@0D3W*F$Mr|I&7UFMW`{pnDYUE z@NcJsRaH3$yRLJ}Ax&}X7AYm9ls7X8mN3Q^exvLg+P1wCP&1up<oXa2N4<i73+GEW zNJ&OH$uflk4Xtxw^Pt&Z9>&f==D}a`Kq=)MJRXnZc@UG`WF8bT8<%;Ic`ySWEVzve zt#fD^gFNuXevrBFfNNsZD;Q&Xh-MyS9!%x|O{2Za(f<Q`l$BEB{s)tIz=^p`((}OI z!XYkB=0Op|1CGd<2lL=TUDp5rt@U^wkeEzs9nS+_%=v;m;11fEusj$Nht8zs0X1r< sgh3u~rTF!;uMo<F%P!3z{cj%p01;xzuVK5Sd;kCd07*qoM6N<$f=6}IQUCw| literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_light.png.mcmeta b/src/main/resources/assets/bloodutils/textures/items/gem_light.png.mcmeta new file mode 100644 index 00000000..3ca39cc0 --- /dev/null +++ b/src/main/resources/assets/bloodutils/textures/items/gem_light.png.mcmeta @@ -0,0 +1,16 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 3, + 2, + 1, + 0 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_rainbow.png b/src/main/resources/assets/bloodutils/textures/items/gem_rainbow.png new file mode 100644 index 0000000000000000000000000000000000000000..2ee41e32718303d4084e3e736345bdf934ec7f55 GIT binary patch literal 422 zcmeAS@N?(olHy`uVBq!ia0vp^0ze$V!3JWj{>lra*pj^6T^Rm@;DWu&Cj&(|3p^r= z85p=;gD_)LH*XYBkiEpy*OmPqr!>2fJokMqK?Vj!V^0^ykch*{DGg1lC-2{2Xkbu~ z@%&RwQbIz)jOc}b=QDDul*go|9AGkFNt8-GVi9m;{+?frR~6h!&KmR@@ESDe^yP3U z?@F6-Y{|F%8f<4)r?g48fJI7rUnIn-8h0uB@Q5(E1?3!n#?=*T@PUn|DPn<_(;}~+ zWnO8A(gYU1Inxp&7c=)yYyTSunVP4LFE1b0U@P%HEfg-dAlrrg?xjs8I{X|r`_76U z-e|L+UME0Rv3DAK^Hv)R171@p*-aff{1;3YF}LePO=E8X+S2tfLhgdS*osLL+)g(i zjFR(tyT2*Pp==>v;Zw$4ZY2|9S2!R3)G*=gjTl3j)6Bn)GldFW%BVDmIL-Wc-%Aa) zIl8A**4a2*@8CNpmU?M}jY5jGSvb$}PYwSzI!tXb*>akhfj?aI`#tk5{lE}q@O1Ta JS?83{1OOEqqBj5l literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_rainbow.png.mcmeta b/src/main/resources/assets/bloodutils/textures/items/gem_rainbow.png.mcmeta new file mode 100644 index 00000000..3ca39cc0 --- /dev/null +++ b/src/main/resources/assets/bloodutils/textures/items/gem_rainbow.png.mcmeta @@ -0,0 +1,16 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 3, + 2, + 1, + 0 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_water.png b/src/main/resources/assets/bloodutils/textures/items/gem_water.png new file mode 100644 index 0000000000000000000000000000000000000000..f042df5e6705f5140430c800691b38ab940e38c9 GIT binary patch literal 484 zcmV<A0UQ2_P)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3hMv>3hM!aiw#-;000McNliru-U%8FDIQ?OGp+yt0dYx0 zK~z}7?Up@m0x=MUpDhFwRvM&KxdGS74I;|4h$BR_lo2=JI(vguk+z9kKt+n(Vf{0+ z>jkHX)*~UI*?Hp`d;G}?tyKp*2e4efn;!r;?$%d0_V!UJFcvvU`0~8;{9oT^HjxU& zBqRZu>vxl=P)x$@=PLl)el^%{PPasE5*3OYAsjJoNdREKIeAGmShI;fK*g&!fi{RY z23|X)(S562F3qnmMra}3X7NUKD=ZeA#KeOn?E@!HJOz{J%QZ+@Mmfu6;t~yAXYKN! zI@qVNb5MBjmprIzKXA3Wg9j<qJ<J20a^ngQ3J)g0gPC;W;_GbLX=Hg2ihU+bhX*_p zP3kF_cGn9J3J)^yfToeAaMb(29p&c#i1)!mJdngvCHZ;KJ!Rw;vhqO7Jm_D!@L)PT zsB7EK!5usxaW_mOco2#uAIk$N(5*z|!H}4X$;$)UsG$}Hc_6hC_Aj0SSBX?zo<aKG aJop7I9CHaWkJ%*v0000<MNUMnLSTaA^u#~_ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_water.png.mcmeta b/src/main/resources/assets/bloodutils/textures/items/gem_water.png.mcmeta new file mode 100644 index 00000000..3ca39cc0 --- /dev/null +++ b/src/main/resources/assets/bloodutils/textures/items/gem_water.png.mcmeta @@ -0,0 +1,16 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 3, + 2, + 1, + 0 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/items/guide.png b/src/main/resources/assets/bloodutils/textures/items/guide.png new file mode 100644 index 0000000000000000000000000000000000000000..b7cb1d9995aeb71ec713bc64f4f5dfed3acd7686 GIT binary patch literal 421 zcmV;W0b2fvP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_000McNliru-U$v4Bsr~Ih8X|=0WwKM zK~y-)m6Wk=!Y~kqzoQJ-1>PVMZ_uglfW(-+j8)XNdmjR!j$voC)R~o?87XhzEOijl zbqG!k3Y6Y-lKuU6=ijzWR|{f%y}a??7~TO|l1s0^EpR>>p&|q`%DT2o5xEAwj>iB5 z@6njIB4?aj1?|*%3&5!pfKTr`R#GsSp&~qr@NL$Ks0g8jx^AM#0AQZ95zJcHdsL*G zKZS!?Wb6U>cmj@1gQ_w-RnzngR2ixg%sAFHG!40P91aHtv2yMl!TSyl-nSzqLew?S z%O$yUR8@6u<76@+caHUJc6MlS_6TKJMpad8i-L9Hg3W>V-H!c!|0|M!09lrGYh|B} zsYr}i^%6{Nq)%kC*#NLDieB*MO-yYqZ|t3}7QJsl%0C_u_by(G^b7a_U;d{#y6!2J P00000NkvXXu0mjf2H32= literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/items/iron_blood.png b/src/main/resources/assets/bloodutils/textures/items/iron_blood.png new file mode 100644 index 0000000000000000000000000000000000000000..5e7ed49b9678cb427256a69f4dd615876a69c2c1 GIT binary patch literal 286 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#9;Y-nr&Ve33y=YOJzX3_EKXmYWXRWSz~effQLwa8QQQ5Y(3~mWUle3#Xr($% zUFFhLqItr>^ZGacvPIvYTFC!%o4a-6X0vzapGt4Jk~)o1;MvT3mX@YBoO449KiBP* z-*bP)2}zb52i;tyxmyFBH9yE5T2}8P%<2#w8gqQ&u^B2QmG2)WFkFy0{J^%?(39hV z<@xN`7ZYFGq<@%ab$;@Mu#GyYh8~TIZcVSMpQrq74eE{RlDW5PVZY-gwWS_HR=$hQ eIdlEe-OG>~mbt+FX_!0EBMhFdelF{r5}E)IL2LQ| literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/items/sigil_advancedDivination.png b/src/main/resources/assets/bloodutils/textures/items/sigil_advancedDivination.png new file mode 100644 index 0000000000000000000000000000000000000000..0afc91cb7af6e399bb3792db4949d31259022557 GIT binary patch literal 616 zcmV-u0+;=XP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_000McNliru-U$^60WIAkM3?{o03B&m zSad^gZEa<4bN~PV002XBWnpw>WFU8GbZ8()Nlj2>E@cM*00GQNL_t(I%bk<4YE(fK zhQBj&XYP7;V<kkvynqBDVf7_!QduaNN>CJ2h^;RW(gaN{C|0SIU?Dz%nhhy@0L5Ts zvDtg??%g|cEH*c~>?*{+oCDwd|9@sgRRQ?&EcZa`%ENY_Ge{ahcV$JbwK(S(mL;l+ zh=2$HpL#v{C*bPxvRV<+R*O0WG)8uAU*f^*9{|6BCu)GEIq=S5tz|SE((<02waMuD zt&7+s!CH%m5JH%8kWBj#Y?4ro$879b%JLh|dphkld7e|0CDs_CDxECzgQBQTBQ!lU zw}iR|5w_NsSf~pa9YcGOdoRBO&^tVoSqDH>Rcx&<&6KtARv6bu_%xls=SDcu)7_sW z$z(L>_es+f=RJw{7-J~@2591xWr<Hywr>Q$0g)%~C#B|j&gX-J({-5X4h82NF-Ep; zUVwA~+KZ4bu(@`gLBG$rESqv`=0#{ac>JaU;L+{?fXzFX;g8bi0-6|iUwp-ga14~g zA@^S$0T5%H{}NS|>)ozaqY)y45y7P?s!FJ9R2A<%Ap}0|@6UE{ZFN;+j3m|~fEYul zYhnl_&Jk4^kH_r2`yg{20Ccj<0t|{GocTBYuYLg?aLrPb^x;MT0000<MNUMnLSTZK CwE?jJ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/items/sigil_ritual.png b/src/main/resources/assets/bloodutils/textures/items/sigil_ritual.png new file mode 100644 index 0000000000000000000000000000000000000000..235e6c5351bd145a392967f0b62fa0b1cf764685 GIT binary patch literal 587 zcmV-R0<`^!P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00009a7bBm000XU z000XU0RWnu7ytkO2XskIMF-vq4GB95Q6&LD0000TX;fHrLvL+uWo~o;00000Lvm$d zbY)~9cWHEJAV*0}P-HG;2LJ#8!AV3xR5;6>lTT|CK^Vq=@668Z8go>z#rh{8iWH$G zdJqxRgXm}R<M>rn6e=jii`tYP>O}=>iArxFn@x6i=Jk+nG&TzLIlcqGd7kH;5mg0X z_i^rl?CPVF1CAkS0Nu4UwbtUCV_X!dDk1_R0KDt<<ez|RtE*~7NVAMO1T;qO?S13r z`DK7#z(X}a(+s?GSZkS#$7J4fqSXT6?w39`NwC%;B7_j;93=C81e+w3RfREz=gX&Y z-qX%9@;ql$6j)=3s<c}zKOBw9S%jvC=9W;`Aj19r0S2g5nW(aPZV7<i&W;>)0F-6P zgZ=^WkNIY2g{rRc-cR8RBOL1Wr3)m<^k_I3kftflITG(N#xVLDpovoy1wKuA_<4VJ zwsEBcK%VEk-`<|B!_0RmIOm8la_7??xkgG=a*f>l@R8wQFx$>TK%?9HKLB`hxkH8W z>f%`dZhid@zm>ia(8PGUbP6Lv5hKNT%!`#X0K^y<zeH8#Mz^cwWP*rbL~v<}suJoN zRh@1i1m13K9qr)y`ntv#NvuTxF@{jr#1KfFBdStW6;GaR$U+AI?N-YI3`e7I?BDpm Z`U%6y*xeD&x{v?>002ovPDHLkV1g2k{yP8w literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/items/tool_creative.png b/src/main/resources/assets/bloodutils/textures/items/tool_creative.png new file mode 100644 index 0000000000000000000000000000000000000000..3722483e7d5f90e1ba6323db3105a75aba7bc135 GIT binary patch literal 214 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=DjSL74G){)!Z!AbW|YuPggKPElS(6|>?3C!kQWr;B5V#p&dP1p)>_E8p4c+4>yG z;#0ZY`d?B);vc(HrpfdP>vo=4GNZB4<M0Qd%rOR?bH`rEswpLN$xV2DF{yb;L`1); zmSkt|wy!SBWOM$hSaGeCey+0IqR7-(=#-8LJHz&B=cd4)7af4sF?hQAxvX<aXaWGq C%tj^v literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/misc/screenshots/t1.png b/src/main/resources/assets/bloodutils/textures/misc/screenshots/t1.png new file mode 100644 index 0000000000000000000000000000000000000000..35ac670f0fc99d87168f59dcf71a3876739ba4b4 GIT binary patch literal 53606 zcmV(^K-IsAP)<h;3K|Lk000e1NJLTq00UM400H0#0ssI2DKcw)004jhNkl<Zc-ri} z`426}b?4W=WH3R11V}PKk{^Nq0X*8dOVmb5lr*+QiJQ2K6eW>-5@}MKEm>omlJ{98 zD{%6IotYmD2%`Z!Gr<4`1`uG(@BXvW_x9~m-#X{isZ(3uzW3cm8IT{}yH#CXUG?d+ ze9!dsZ$0qToA;~j>E9}C52&rn??3a-18RHn&HL2$!uLO{wlBZ^fZANY|E<uT|Ne)m zz3|(iML+vaXwSU!AhhuNPrZ2`wbbupOOHSNKK^;P-~aZ5ODq5Jhp6Gd#TAnJbLx~g zm`_|$@q~v~{QJ;w0i+g8>F=i|`MK{sL@oM#XsMTi{xJ39&wuYBYSlmP{QWP-KO0(N z0-v~Z@7x|gHvIcfy>&meFTHUuw0o#|e*f|H#|QoXGXACEi}1uZPYnm~_#2@;{nq`| zp8fWN)Smd}z0`2>)gM3S@56e)$;98mHz+<DU{NI|IofST{yt8W{o~63;sY*hgE+|4 zS%3q>zmF|>fTn&waWCoL*T;bWHrn>_t%31ub|#knxbr}VcKYRGd%hPih~F<c(6{*g z`F~6_*Q1BH*(~_6FM4gDrTUFedOR#)DJM?)hzvZx53geU*L2j2fB!+==rz{v{n_t4 zNG&xUam&fSro+v5AEM@)QsfUE7G1yZI9l+iOC33-d=USBIBvWBKKwcR{h}j$ImM}6 zB!#@?pb%*Irl;P@VhY*v_W=v=-?G0JeHtY;)rd0?5fcA4`uzlpq`n+nzYm)^`+eG= zQUo8d2z-sa_&Xn=rhd~t18efxZ|~{%vtQB2Cc7JA0!W-Y9ur9sk<^@(cyKtrx=YXc z)MNF0)u(=cgD#xEKkfD=le=f`#1%}VuiY<~Z_pLkq%PBVLr;E?wP8mmtSRh*okNE4 zKz(WPH$7Nj+b2$K6Z?wi@b(~k3miC&k-fS|!U3E*skh$hI$?HwVty`bEA1k(@i>0p zz6<rG#x;W<BrpB&Bh*qG2)5Lwu|XI1?@RkG8y>!8(Vhmthg~4qq)f;yzhB+OvVPFD zl{&C+NU7Jv{HQ*^M}ip(kjq=X+g)~n?>zY2VAF$#1kkvU+9;k%+f(CXG&IjPo3bC{ zk}m!IBlq9$Z`1sL%ql>wO9yqgkvbBdOwANL3F|JvOKALT%F39Us1!=_@A6a^$V|yD zG^69PFO>R3-gdn_e$PmqTc^>p6FCmvy5DD$sJD5TW)-lrI$rgfE)rzpVFHc?cy2Xg z!BFxz_VO^b)Z&cDAmIYzWbnO*)aHT@XBRDegI&ZMY3lK%KKVRwFt=x8nmJb&21Tg> z9?uw|3$a79G<3n$MPYOVw~zP&FbW+AO~wMWUN?4uk3MDcFj?xJqT|(bd>bct%E6Kb zkNZ-stc$m`D1zEZyp(U#0JHgDO&urVcwnn>f%+)f4Me>_bKY<|woLDWHUG4xXsI&P z<82E@i#;r*PMkOIH*C6oW_sxdADJ8f0!z`xJNjA94p9t@TYldUG+Q!FAK*ZyiF-*c zAx{_1UW{*CG@9biF3)8(royY2K6N7ENlYm|ktfjpddJm^rwiE&wPY7Q%Ll#}hPfgY z$%LS9gh6|HNd`;#dP#NhO#J3XXZGv&P&4iwUsybPqEW#rO?6@Pf<J}phnu@n@Bv+@ z3t(A7%WukM6FU>ayJJLRU>sh|+<AXRV=%_EPRGmI_~-pQO%{YkJ4NUM2i$P7KOOtl z6-sdgS^DEFU1q|>KQ{mX|AMEB$ziJmX7r7t@m8G^s-jXs>}q^cCPO+f0xvfHmqv|L z1dbH<vV>e90r+Ajl8zO6|Gz21I|^+ZjqV}0hp5TCQDxz<XhYr5**CohHJrUP(#AGS zGp-lI4TPqPl*z3UYocDlKY!MPHNIZhQ^tQD#ZdsxK7J>O9k`9)&$54#vK4jjg^phI z#V7eG-HX0)t)Bhjc!|VY>4}$cMtw8}e#pSn9)Y19VmB*|7s+gxgts)EaAVA#IF3KO zG%L0(u_{t%aSVkFr&x01O825|k35=FrpROiF8PUeY*Q}BCpw8={Ou1@^G;bJG_@j! z)OceJSG5(RIs%oBjk<Uy9V6l-j3mUQeJFLoD4t$C{vf~Ag!yn&d#;h(gPUmuWH@an zd<`Trb=dNzKYzB00B~~`1aL%|*N-#<e_lZ|tfS|?^AI)sCu{&X&rUlH8s3a(5bNMi zK>*A-^CNqDu{uih!a6b{TT;-^<}<Y*@rY#~DxLsMf5>vGqsCrXNAtX?U$)FXo$8c5 zwNzjn|Ah9Krg%p%1BqT(N2y+9?CDp2`0&z<IeaetQP=9waJo$r&KdN~1m}!!0U0L< ze!VlNq<VlF$Fy-$8=53lJm89}PO*)OH&VjFsbXOXO(Y=rDKn#V;vXgNBxySJD@JN+ zPS+zwft<8Qqq@i3SUgrL+|?PV;S2{cf=(*pTAog$Qe;2-e!e5yZ*p{<=&V*@#&G(8 z+U+H5GtG9S7&D}sh9a?;F(VN~k#x=29l<_@E7OQ6spyDpyVQ$u_78vzILLh+RWMUs zM`+?=3NOy_7(TmHN5)_4&{1j<-b{AH_Hg_KT$x|_-G{LyfhOj1Gv8&4ju=Wt9j$zJ zK(sWZR)lIe148tUG;?(_CL}%uJYEzd)kb=9bb|C{!?d5^PD@8eR5$?xe8g5{uCN!% zqia#uku%UApWWmX@^Iz^83D5fB(ZM`Z+7ZCmNZ7n-JA+*bqatnjWNTfWmrdySPJ7) zrqxT5cE=b2!t6wJx?}W?8VJUH<Tn{GhO&jTBZHQVkRbLh;Osf^!uT5DztGkZOU<k3 zXz43#P4VvGWIG(s%Rl-kw&Wh@>xlIgcl0neW3#R3h=D}}L+KCu2xVAoJ3>Z0dyO3( z`_i@U*n&@W#QNfHgtqX|!*^E{gqlcns|wq2c4Q~jWjm@5t9U2*dR91aj)n<vP?qQ1 zSRK8Sw6hTJX47I)>Yh*BY0kg#$%NJ6inAj+WL3-e(x$q5ivmz$AE>dXd*nh4#SlX@ zq)s;^7bmM9y+YNcIL@OkprkHxg}KF@?j$3k&UEzL&z&RMr>)`Z;YN!$la3gkU!s0S zyR9RP<otdv+Y<Bg?>@XV`{PQrTiCk>{;LA8aP}2%g^PB>a{^+lo6=}WjppeKF^7nV zbbOKrVpO*14otMKI^76PykHZEo4G&B&C5*jBTjALuD(t&6=COOuabc>spx9{IUVmm zQD5;UWA=578<TNRR-nj(vM&}W5=r8fct7lb(Hc*SFX0AVI?pUFokZG=1vCz`$SL$F zO4uq-i%Dn37<yrqDL85EGpGDnikga~HjL9&rsGVl`W@^?zja@#Mu=Z~kFA@EklR3G zio^bX<L&i_bfm0VlpL+7H^m7b&Sz$$fHzbn?Q3A?U&`T9;&X9%kq+##5|SU1{Oof0 z%MjV-WS8!C5snm0<0HW?3}4tTbFRMFuI<eFVpM?-CA8z<nGXy5vckZPzS66xy04T6 zkRA5;RcvfB7)`|ks!VTVsxQ_Z8+@uSwp|!~2{;Q|0XxZ@Y{9k*TyI}|?H+9S_`3AP zmc$odzlU1*^W(=)vM<4B_*%sQqp`=SA~H1@oLU(=QXM_QS<`eVc_PFNn--53q`?=# zfU~b|;E{(MVQo!_ZwOf^OH(YpYZ<=T$&<xXr$XY-OX6|;f(SEOA*B(i<`;HWrOXk` zYaxp_DkT^GlJu~Y3w%7!Y&L0&iy)-?`#N;$oJXhb!0DE<PcU;xyWK@Iy@ZYaX?J#f zU3Y#aW3Pk3F6@90pHlC5*~Q?bB)c46Hz&LJQAzb7j6({x5>oiWy7QZS2GJ6|9c;Uf zf^*U~o9J8Un-MzjFp?NeQnYjcrj&gs4)|d|XmrQEc~X5Hx&x{3I@w{XeufC`=o_!% zkB!N6r@4KKa$@R|Z&?1#lWF1iYI}`fl7P{M71^*-87VSFSu!ab&Ea&zM45P#F*e~y zX5>4`?k3M5GHF3({*fgS!W2-;HO~y$v!@5J5yK;cjk4W&LPPvvC|%q)kGt{6-yKJm z_*2;Et`1ouYI&!`1Y%$Wv+l$jR;9(Im|8xxG<<f}(ViiR@UK`-++*MP5H@^vUAkk* z-7VdvVh{}uGlF^<2N;H#op+~Z>t}+z(`(p>-Z7+<cG#T?J*%DX)C>(H-n$v4>WL>g zV4TriY}W15o%TvrI%iHZ_MmC$&>catJE!02*-UpX!wS#%Npx4FoLVQ*n#ssvsXuS} zG}OLd)7_NJ&|do}(jW0B=J@4KVj&V!Q|+C4Qc0=BGUd-mGuDg(k+pqO5hux@6QNgB z7I#t=Ps2iL3=}gwM3E<@!OFrcAIAAtVEGteXz|;1>_Z)0QD1!BWQZ81M<dIrM+dU7 z9_>dK#bTG7>xS)NG_^2ru|k~V9{okMZB8<#!Uh+dZN7dObNISrJsRB|mJ{0K%oD_z z3foxz%0K@oHTyRWoe|dXX|nFTSw!CzDBupm6+QYQap%XxqghP<Ny_|D6(gH>*O+Sa zHO{CEpGDn82R#q|b1B0YafMTW*00@G1Wuj=>M2=e%bbFgPMe)lWT>^-f^B}i`viw& zB7ZY#XC;_ocr*(1)rxwI-<&R_f;|>_g_vW=PbwL77{Er=u!21n!3yIQcJ3PVzzh#| zLcM`Ub|g@;yM`W(lZmZ=_N3T^3$s~rCmqqFy>}Zu8loq2d*$~&ip@xGWX4*)>e5ys z4oPS2(U8hI_87G&7Czq6jd0aW7ExN<@t}(|wnrYZ$9iPvuO0rI3jgR8ZQ}Rd^a`gj zqIawWqf}nDnU3SJ!XR(>WnzWh=YcxHQF`<-RW^ZIW&%yATpmkiHU}uqG$lJz$)BvG zD#LY%hjnYiuJW*Yv~Pjntr;$p31LY`%&0*#9t(#wa<GroE=G=Ovq~>Rj@oJ3vSM;W zM4u(xU>R2`*@$)OXCu2)7BbZh9pV}I>hFCNn?(<1kH*(ReUEXcse3G?2R2mW-DmW` zkj3Al-KoFFr%N)H*jZJONR&?QnH!5S!0$JIE|H`bGovV4c<eK^E`f>lcnSq6&-KZa z>#Pl}Dayz;;=Z2FgdjiQ^jQ_Tbo|ztLGZ(VXB7O9`0f%*_I5&7Zk3jsYI*4Xl#;ET zkyM?OL=aXHW?L9(YYDrE<nXA|lryC-prjy-j(m?V#&*Z}0VV4I(p^q%RODe4n~FS) zVq;1*F|=XI$FNm*YA+1x&IJuDhamE^+-GPXuueIttV%RXbN1M=Q|E1#a>D^u;9H+X zLmJtCEwI82481z_-=^HtSh^c`bs6bIELb-FD780IXOH<#+2)h(6eG{(W^^j8J4WCv zTetqW7duq<7#tiz%KQ$c7B7}Ryr)+Jke#4ioui$#6ZyHQ$WFvwUN(lT4BTY+m~Ghf z_f$k+_CGX2T;*!kf65V8>le0_@2wHZTh!^&Z*(T5%Xk<uF-2i9MUgSA-%O{m>oC*l zJ0+f`fBsR!*)+ncQDjPy{YHRtj!q>Qot;sz(?xg9=(l61Sn={j$ITjEErS?%(H#?0 zFc|;k1F78a?9}ep-|1JHJALfyAELJ43w?)_K!df-+EB|rehOiww$nl^8x^oy6$T?a zwHYps_K8|14LqH7o(eH?T2+i=I+rwEX*|jTiL(r25if;KV@~sE!>L)@lcF;>fWY|C z?iPWwb>JNFv&o3vaWK>u!m1rE45X_4N@LN4>54b>y8)eSiA0zZG`CZa>&eRN7Zvtv zeNLEL1_Y!ZUMTyHc(5;Hg@ox*_RHSlZ8}~0#j}kEq<-5<>SQTaU-;Swu`!rn#vyj5 zZqsjLr}$FXbI!~>Hm0zX(#|N)^c&w%QNP^h`;8A_vx#4(e$x(SFF$|eZcFfPQ9@Nw zC{BAc4t}~6<Y>E{U3QvwQKoi<eW%r!6{CnJYg<j+p6v29c4ms5eSP|@{L#Z%`8O@4 zC@INXR8$}lqH76V8mhTZ6+(&KuL@!9fiL4?U!+Ir*xiSyZPqVs`U$5}AH#{)cCu0t zzoS_FxTs$@hiUyXBwBma5#j3}#I{2;Y3=t1AHnAD_edxA<&NQ~*;XR<OmkpV(ys|d z8}zFO9J4A|CZn*8l*^dee!A`YEtnjm-=YxSj#0cySWc&SWk)#B>E*3R2`@6fy!_8U zdT0ZTKK^9wY`%7}oy!ASq~lWtT1RQ<BK$InBIxCh+$97&2}I}^HT3<9$_bR>2!0M` z@ypqDd(cTycuijt8VX@53=M%2BBAkI!UDH5Tr%G;w7Px+mw=OQZftt_kGJpv;~~*6 zjuVb0N56F5Ct_tzXu?p8x{g2hv0v<3N*~OP?LzE;XHx-!<j3QdMXiyyC?~l<{aSPq z|G4d&v)xs+v#DJt`xS~Chj6iY>Ds#rd+5?YXw#dBREyr$qOObj6+mY7i#eBH{r!*4 z&Hiz=3^Fmq@q3|#5%-B*=5*VThpu#;#<E8DR3cgX{%o>#Y07q~F{sE0<pHo%yrxPZ zQ)9X~%NRc-?8Kklw(__wHK$}JnJi+bMCEHPrRxzh5n!cj7WTXBdOiYkgtkPmTNK(- z990t^)oc&4F-Yk;17YavoFVK(*m4${OvG-Hr6dwkZ?lw~(KuvxE#q>E$iRjYDbPS< zfIJk;56-TSzX^-~a3I-GLS2ghshEcnW)jvlpMQ#QIw`jcA<5IJc^a_#tzXF{=^FNa zBubf5`gUzQWZ8dx_4hx9P36(>$^F|OHncOOB$?gy0%6oLU5n-gGGEvJgr|JY)3CUm zz9B<Jp-O7k8{}(CItoUj$j<}DDKo0lFXE$iUBzZmp>USLJym6fC)q1aA$As0{Ip(+ zA}!>XL3Ma<HtQ-A<U0nx$dPK>!`LD&4QH_#s62wFz#ufpS49h^z-^SnplT926&Q&B z6(fdH9AP@8>>E968A`?^y>TzP9!@wSCS;8@KDBlJPixgEV-tN>uvsGASIwGBuo%|i zaUST=FRMjHDX}wHb(~4hI1i|QL+P4&U%IASqqP?d$;X5en1o1R_CzG&Sum62tAFq@ zZ1C-L_%)hUwQKr9gHD6!De7b`i;z`KrB2mkbJ8tii%@<XG89v_z@8I2z^ZwbMwm)m z-~zuv%s-h1{w2}79hD`mLF}Ikd0{I9J$2*Ge1aC|RYmgC29Z32f~w2BXYQ=+0hXhW z7{%3!3WZy>!cA<O>gpdT^aB9o%5pNrej9V0igK)EniX!=r3IZ10Q9Z<GSS2kKgY;V z2_k8WU+Eh<bNo1tOp--WJK5f|J0P3MSbP26tcxM#sH!lHkagtogiVMIRqj*FIG^l2 zBCvbt(}=-$G5{Q^-D7kx_I_ZI1^7}d5|=Y)ED~^JJzbhf=;OzB>OG~Q%42#$2Ix|+ zowsEM0u985YWn@9_mtm?^-ljU(==dktoV;&CSb2KGaRM_6SBRtlBW0>uzU&N1kyJc zGZCc%_W8LhK6rTV@%IlI4n$b$$q&HHLhG9qEv-X4xm;o_5U_O`=lcJOIFQH%!Mc93 zG~-J49yiuI^SyYwR^xp=p*8tXV>2hcF|g<HJ3Ygh>g0QRn3H_QtZyWZS+c@si?B|q zybj{r)B;|fJaZ$rs5GsqG_$ERntK3yC1RK~`bpuJFvI8pE2XhAjo~s`_fQ_cVzYtW zyR<^BcYR;7O2_Fndw>H$yfK{+gc9uY3=~<pgf-~o*AAwBje!V*n8%z^$N@yOjB)}I zC9WA5NMaCEsFMEr<;TDF?#GwL_KTE9hE6ij#6QH@1abeh-gzAcvCn-_<y@<lCs<_J zwdmn42P!RK+G>~o8bs{k>5|*Mv-hPt8DGVo1)X*aJyS?%$o@V~ni3myoMeVX^k3=k zv)UVn<#&A6OIDezH~*WjesFGNo>|_qxv_d*tg<|No#nA~a#Y1WeX=8l-oN(2rOh`! z-xQNpP;ew>R(AU`(~}*psf5tw$64=k04FEl`U1*lgnQ025Nk^&XZr}t^#0wXDuO5G zxG~(hG}yW*)JKUjl1OCso{e!bl!Ls6p13jNh%hrn_$XPZ$jsDi<O&0rO7pr)Q@hoy zawCJOwEjV9{#0oSRcZE?!l`Dwu)<!kbytm&P6nxn;22rZhLLD#bWS!v$3FlrlD^*Z z$sv`9(V?471x?#NDZ?$r$i9~)CY0gU0Eh;_4$EiOgH75*od^<U_;~y4@o*nA1<|l+ z0tpcW107n3k6tsz+!PWq5MdB85Y42@K=gz1_gC7!pPAg)*GPz%iPtT|poM`12Hh(& zz0~<3@|K@N*!wa7{6LorZ|Q|X_){pr3SEZzS)UXW5@We9WFck)pe*vB$YYv?Xg))< zRvd>e^HN#p1!S9oc`s50ic;W{G_ZbvE%QJK!Z25o(DGkH3QI8097d~zrf4J-aAci8 za`UNa>2o`|@>g9<9?=22WkvECv7pS0R|9W4gdjHt9TkQ=<wbmAw_7&mN(OWp19<k^ zruD~B{4+9sZN*^JCQs^kY4&(FaoqqfHD4*4vQ!$JD<#2Le6AK9{7_+Z@PkFM$qc;g z$Y_@H$k<B_h{*<~$h2$5aB^WWZ>-!SSj9%9pMxJtBzLFagRN}(@G|J<G|6$HMkoC& zWB9_?Lxc+dzE|icf)CQyWGhx0<W%}00Ft<a2mB%QUg3`@?1PDry&x73jU)v?%OhjP zr@65^3Il+R3EhRPP!j!qDr|@zH@%W6QxIcx#z3h7&=_Q<8VlJb1W^;-$rd%YWe$UB zJQ&H2<6Qq=+E<w<1|Pt>s9226L4Nr-a%s(4W*#2asVxtSSmf7V`M}ax;unZ7K7c@P z4`4o1rD=+pPKjUHIuACX_`6OXiYLo1jU?ukPzNjyC=AMl>zz{9>;+-&8d{$RFJ9z% z$fTfwbv)#{sRLkJ0qjnP#y~Sdu>~xgsqwk&c=|kGiTN@&AJ02aIC5hkP%2#=Gp_m$ zpj1Vu!WmeNM)fu+Q`~1t$rq=~cz?LAxK_3(=T|-H;&Dusr0Jr1P<9<EcXE~$4%{9Q zoR3Eq2@N8`fWO$Q_^>|;=l(=n5B~VG+jvh-v_YT6QYh{?faTnJ;#(nUfBF5x%8B1J zrw1z7eqakbor|XJ=V1PcU0^Ju&9J_(S59uMEKrZey!1$g;8Nxvde^e_qZnY~{URmz z#pp*-{PEEbjh4|50nq#))_YvxBL;T{9}<8FJt3}qrPamA_rr&m#sG*`0?czX2I`0& zTu9P7!U3&+_L)xiPFo!Hr2-H#5IX{CHL3%kF&rul9N$@K`l5MT);ZlHb$v1ztUFck znz1)R#QZVq0__{Y33xO<$sc54A#^Wn!sTg4i|6#`G#>V;zb2&`7AYpoMvs_P%#!ZK z#dH@w8sq(3hCQ$V21(Vd%$+o6EVfDf>@UiZe?p1xa^<C|S#d^Kwj6^$F31^}l$G-F zgobAYeMF|<g9eJ#&{&C!Qp)SR;zK5MPb;D@r8(g?a=EB0R<9mMT~KJ@BSqo2+2G&y z_}>6t>oE{+S%4RN30V>Y4Mx6QJbiCX(o`dF=0=Y-9HO8qd>9EB$?V{pQm<3B+lzKv zeCL<>*^GM_`k?)T8Gg|2Vq-@O`Y;bHCA&%6&uI+nhC*gM_6aKkKv^oEEO-#;=V-vA zzaV4XSh|e#ZY=MGvDY)<t`PsUerX{3%<U=RB0Qbe>#jv)#!R8|v<{Jf+8Ac;k+DHc zYJmR9G8+bNf(!mI=W;@r83_b3GGmZ}x9n?&mKHe^nedkMiZIZTmU4D?`7x{kh_piZ z=jGa%;)V>p2&~Ct+)3Fuirk_XDwr^084f(fm)~SD1GLg)+z8XalWuNiJqo$%<SJbg z4x-z<b1y_B$Naj!ZgLYo&D&}KOD1!~`SSiWHGh!$DO2qY1^yaCm9knwS(jZ_QAp-Z zmWm1)rQ4k)<JnZ}IQOmlrl;QOoc=8{z}u6+Eo~lGiLE^Od1_B(%TG~Q1B*1rEkjzE z^C8dhmSWH`z2TV4JU1d98DAKM+Js~}9&ICQP6VH+67dsBj?KeZPT$}7>Ias_f`4VU z7t0w`c4~s2IB7#Vyyyj6&VDuqG`Gw*i;h&q+_LVls<}m)e8}pPH2JK!AJT-^F9eyl zkL;x~$KnhMXLHu-vkv=Uy*R!XWF&KP&*KU1A@q^h!I&dLpX0Ep(=7VXohH%e4S_x) zIQp?~M2a>FcEm(W?;4A&C;E|los1}AsjO01M@64QC05})TGpxrZuT7|)68jd*oTBH zjml(k5@R^5)nyE{PJ%3ds4Q@LWGwlYhAkaRrzu)rJ!uFC-&DuG<XWXWRr6PnAj9k( z-$BWFj2>2Hi5N+(<i^qK2DLbdv@S)x|$I%GP4yLDEj?Oje8X)wFCmnJ^b5gwhO@ zjMx^U_iD)aGeW68%Yth3RMLm0nUk`zK9A=_g`TanYIU-#xfLIY2&a_Zpp1QPOf?sU zt$HGtzwRd@*UM{54r6`HED~#(QyE_@LyYM!fQ6a+XITVp>aBZ5$Y@7V%qilD_kvV} z4F%cAh~R=KpY<ir2KpqyE9YZ6S}0Gai%mR7S68$rJ{c2_3O!Hwj6D)KRNCkVJv<tT z&PaAn7{g%7fAES$-crosXSTH9IwW7%%AG8ZTfTH`7&M=-s2*gJG0a0JV_D=aVE8<y zJX5Fxi|^LBCqE3v95mI;icg<9v_z>FW{sdDIn-LD7{1s<6uh(oedI7$P#udFC5DrQ zr&vn$A*(v}QqiB&n=bzo%Z-z-JY!9oH;TQJr2DlWe|&DlA9RpQQeU<^`3PjH3Ue>e zUyy1V6r;HeL%IlPszZ+a!kXgs<SHlYIYmYzDF@5GGYJIa+Sw<bI~`jrbAPemip>4f zmUt%^4pYhd{^U7-{+vrrD30M)^o-IR7Nn=mcq$oE<#F`cDbHW%;$X~~x{?LuBa2(~ zRTepdJ=ka5q5KHWrgoR+mSdsMRDL@Xy?jxW)uPH;kIP}mwCz+~FC&62k!CL+uuP#! zWml!biYr2!d35v1V(&_`LbDvp#i5_lf_qMr#(b9`$+0?T*W8Y92E<ul*89(MzV2~) zm&n1C@^D2?uK1ZUXa+M++S2m|A4bsg6bJCKVM*m9`CY_v1_^o|6O?Hhdlcfqtvp2= zGISveJz<+00X=K-joeJ>Jb)J@n)Vd*7~CUGLDK)i0wR&USg9!a!LaoH^&fwHX~aDW zsjvGIy$(z2ZirG?Uoq*81sXVnPO8ILMo1$GpS7_ILcTb1>9SKzzGCv>vaeqn259*P z0*f3JVp(cRZ1+Td+x4V8Zhg_Nn367%4t;tG$_sKFFcDHpAQQ2PX&A|`2$^A~Y8V+B z0&@LBY{}{4P=)}}{4Zyd{Op%;DQx*=W6EV%xg<_zV3uL!T7=aD%yX4@Io1SvWpL2r z*kln|iV3X65_jAsCWW`;&6t!EVV|gEn$+aG!$VLN_i^mE4F-Ht_mDvzggC))a-Xx3 zSSV{F(tdda@wx=bq9)0PS@lwZ%uBEr=COWB+I!dWJO;>>WgX_Plu;?6h~GO@iHisM zIs<x)k<c-d@@lm@w$|m5!X0Vgp)XE(6g~I7$i^cfqshjzKE4$0Na8VYhmx{W#KR)J zuwIj-SVlZFy%a5K5RZ&*VR%726yn}O@k1U?{`H@HVs1n{fxOqpN@tHu<Dmb<d^+J1 zTvSh&wGeR_bE6M1iA}*iO2KDwc23ZY73LpWHZs<eCE&wIqR2%W2^zPSGn>MLpu7{0 zVVBuUOg|z8J(xky494;`p)gbWLwUdSYdq#P)SBm$CMTAewP*nH6H6W+bXY7FxR3`X zGQj9|q{rh_KW1GC()=TTHf*O$_S^awr1Ml#!oh!aH2zVB_2U1LVFprFAP6AD>HIPb zSMJP;q`+~JNQan`R~MH>m0xHS%_+xhM477+k7|xZR_IZUP}j8{SEo7Cdc?p%rz=v8 z{>pkprBn3a*Ycy<YN4A_c~Ua=(3TF8>Os1IkZ3mcEs5)y3hN?qN#419w9?e4rEcAe z43tXU!gq$M9?Q?Bl*w9Fan|COh4Cy7VV1(>Tovp)!L5vYx`^Y60%+tnRyL03XakFQ zMTz4PkxBA{I5^+e6+a*C7%j)5!qN7bb!i3GS;NS{rA4nt<kCu5cQVekly&E5;Q7ST zf`Ny~do|lE8LYv&vwpx4e8}*TU?Y^cV^Ws^8EE6djk_1_5b+d&7oGPMki_aT$&#Rk zVpf)T;GvubASDvRNT^KHx-bIq#1^mc4HJlmOZ!R-lM-gMaE9=(%gDCWNN_OAzopxu zenSG;`XiFF!`!ah7wQ$`--NI3HENzhjYUc#aqaRra3mNMfnTb$9_W#A=|Lzs!7>Tx z^$B4Q<Val??V4jAB5;_|E)XH;sHd=lp7Iky?^hKwl7dPeO(jKGK)7!4ePK!q)j4)j zVA7*8d2$eaOEKNak<1HeiT4O0QgH-JDhf+#Jz8>)tISzSZ}K+<guMtcGoU)D>po`P zq=xk4OFu|zPo{8ia@I>VDrcPDUU%tIHP49UvZ<9wc!89V3~}0IWd@weTc@uOijH3o zo0?p$b)%P-tq>`k4OkY)MMENPlinZsEgN!B#LPob)X6BV2JT?Ql@YsRBbNZ3N;lTY zleK`(GSA;sJXryBVxJnx7-f+w3p)6PDp{ujbmsPrpL}9zF4h54D1c7*0%>9$n4;C* zc6zMAsJ5<iVjY@8R#W&{5NkMDoe!nMR~IUIsN<|j>PV*b&};-dx&R0nGEe`BdR&W` z>m$LJk(Q{mXF%3Ac?=`17W(XwZa8`eAxQt!<c+`*JuPEnFib>)ELBqNLI&eXI}@E% z%+pF{?_YoU{Y#V49rAOUutV93*Bw|of*A48F(#wn>7$5FF(`I?%F2@GC9^FlBLR~z z+d_>fd1<F1=wZ8x++OH!l3WYDP)zC^2P3_T3nkMNr@xR=b~Mx_4UqvUu_UW*C|U<1 zwvVOUMOk-+N|U<Sq{xhs0F#0cTGfciQE1k0TcKG>O(tR4IfZ7urVCHnPD{W0R1<&< zv@ks_L`Jej{bEU;b@U>lQz_UYB-!Lg%tBg<xZoR^I_?<xo+>1d9AjwnNYg7nTH@3b zOwN)YQnX5f5S@rA1gT;Ey&^yN)i`B6T>87oaA_$im#W8A6taW6Mn&+Dd^!@lyI6Fj z4@<hS=m@FsrX7xaGU}`c3`07PQ3pXs8nBt=h9zfUz6+0e(gtIK4i__%XHSZCOwc*i z!K<S#G7HJo;$a<n?krGDVI2|OA;F7Qi#?c=X0OoYrX87#Tc@?L{#!cmXnH9jfaXDw znWb-3VVjYDm{q7N8VqBm@G%p6If-B>yhKs(UiTatFcE;<sU+^m^nW>+1FS5YWXu*a z2a9f&EC|wyNeh)|_@8~{{Y#V9ecE*cerYj3?44z27OA*N<2ok6ob;8}BqzYH(+7hg zu|!Kk);bT_1LOgxY#uUv`f~41c3h{@q%RRLr8kKL#-dgh<5U!>C8N>})k&ePA?3KU zVPglMYHT5r1~2AN^?EXenMMh3i)(RxNm%+ON0oY=w9MplGyhzO@yNh`PbRzzwqieK zl!`@udWwWwU#)C57A9n6^TMQ#9lcl57r<ca$u||Ry1_Rg5?Q=0N|?@isIY`eb=&px zRurit5r;O}H|t$ja!+aGtro-?N;xtF5at%Dz8+hk9GZlfa^`ljx~>23KYRK8OOrk( z8J<YW3kv1X+)_Z~Iv7y=S;1nR0r)07-3xU=H|_x)844}`6TJuub*0B6mpz%Cf@de; zR-=(a;NwGUv>CbY*Qf(>V!q7*LYk0`!H^L`O5_CAi2_|B2MaBX&%OA*rO6LYGGI#q zTNxSb8P7@80`|ji{NX3&Mo&{_?n}gxTc}L6p&OS7BB7iHL%|6$SA(WY9;3e*#|Y{Y zO9_Qbe9ieQ{KJRo2g&;^zwnuo$UKas#$<@<&d3fpl?Rvr!eRbJxOP}4>j-5`1)1NN zoE}A}FR6-b+xG{lBVHRU!47dL!m@sQ+!xT$9lmvp;Nl80+`6o|H$SYoH#uLKzSe+) z6XQIvq9^qR<=b*{1ViFNs!+YGRj-z-H!^^vjY{r}($*ES+~d;qPs2B*w7y!fB@)3T zE%_pm*BzEp)7QoEMG+QFj{uIJq>D$|@a1^=M(4ax7%D^yQPx|Ne+P9w*(4C{(fkB4 z<d;9Nv^u9%nFnpPf5@+b`G22mIjfVd%$BpJG?|EV!cZ6DthXcWF*qI-agcHdaEmBM z*0S_b&iYlE9?v}N6y?xX;G&!(g3QgJ96C|zs0+ul+`9!jV)HceTIg+}Kam^^@tP5J z&5fRgJ)RTjB+3cmK`3LyrKyj+iWCGwKS+A!^v`KYsNlu+9~{rJ;nTFx4+fnC@y$;Y zB{vX}sB|CAhFaL2L7ud}hn+udvXT*5Db*+Zs19yi@ogh@)a5}>Hl4KQB^N{RNKPhl z1fvgwSo-@^PC|OdWi*sbD#{Chf9t;I$^yF9^D72`r%RN;zx=imp@<bh6g_a%;(pEY zdD0?LOZYCKO;ZB1)_RL+%#vT#O6WaglLX0+IAB&ybeBVa28%Al0k$$CO(8AeaWImt zj39$RHb&;xIuBar*C|^qkQOC>t$ooBu9B9l^dQUB$aCwovHs{`2{&?vS)Rw!Jzy&t zltVrjkE1FLHzA9e9A|0R%JJ5{#9Pbfko>^4tvKWOMp%_7aXaXmX8Go|Kl<d-<Wx(( zp)*zT4Xzn!s}33j>!JR+7v8rt>P1>^B;wGE7Q`mj*GhW#=sc5e_v?TB$)(XR(?2Ks zhms*~jz_JZj>UDPb?s%4Bc<m^wpcpFY4ytJ#z0*}c+%IS4C&O4{+z?j%6pV<DSGi~ zhJWLg4=hcF&&%aalTZ6+u*0nmLD1xSAXPJW`3nbGM=V>vE>S7;6CxtkNelD8zHu_+ zjeOaLBad1fViEb*o{vA~F>Xp44x~9#p1IN<Pjen#PmlalkX&BhWso(&bI>VAfOgQV zFhW`i>Uh|#!w8<JvXsHYOBX)67RNV;T|YA*o?hCOA~A3&RVXahB$>(S|8*_OEA0rC zi4EuoC3iVX^*g15WQ2T#sZ475$oy?qmyBF*h;(!?D3}FdjQHau-6S&GPb{w%s%N>J za)E|i*L6Y(bYz~FG$KaXUh!+N<el+suk~TeoRtv%ygrf0?0j4<gj}?0X+c1lulutR z(Agm9W%U;Y;*<pjt&axF>`0ra+y^D;vOuM;M=mP<VO`{+lE#~2ubJDP^ccK=v;b(m zL6E~ktD*h$gM@TwYY%+0S~w)l7$zl)x7O)eo@~T7Kgz?++$d~Ldi+hkxhIcY>zbq? z(dQf+lFB#qSw%<Gp%LN;Gd68F5^*G7)*+W1Qph@jDGgd*D_=4#y1CJ3kNlvO^;G2B zA(4xonoNYE?VYv)m2zY?RXHcL2`iK%A`~H7opfG!Y>Yu&DtJlBA$rT`c`-R8G|FNq zJd;q6p@A&)1=U;QPscUOWId{A%OYi5X=N}1t_;!d3jNCk52QVhEO54BLq3Br767l) z056EJ7wn}JPK?FCr4ooY2u-*~zZAuxouv0@NHXU}X0oRW#xCC4Nzv>PnQ=@#s0g#V zB(bZ)IaX3VVU{o^2SYK*AH)@7NN|!_clldqrgzEMZKy!S1MkX1o==UXn=M1)QO^Qv zVzP-uH1O>F{7dg!nzWHnaEynv{II2Zre1S<raaCv`LzRNb6OZOqBOwPYDr?SMV6b< zWRroLHCCN|lU^nHy?gq$S;^)pARAnnWM+_XBcldoj0dd;TB7tPlx*=u;fDL->mff^ zj%u07!$G)m#?cvl*qTF;9{Pw9@eK5L<`$@eOwQ|95UmF~_-R(@y`x7UjUsef$RVLq zN!s$mhP=*ztP&)J9%P&ot{HyfLN#sa=dy-G?~&kxSZsoS?Z{6W`6o0sTD0_hgTGir z_(X4adQ>!-Z2ixTW=uL;=?hkk^N|&4X~v|OrQDEZ1rAy&`0PT0?fQjJYfNTdMq`Va z><bC~OVotQ=yCoo*W)B@LZ-*LxFfQH37G#YkGY@^C8Uw+5(?D>M@h_dc)7yBNWnm0 zOr<z^TV&dTG0((x>TP-O$tq2|ZatKJ69QR;8ynwAx-0p%1b^Qeyh*kw+E}IRdxTly zEMzGx_?-uC%F}s+=KT;6wQf4DTzV1Q8rP-ilV7GvT!tX3^~dWXo$<w>;BM*TC<?x= z4g;duAWH^5BYJR8h={#VPTN6Rk@yiC(zim?lspDJHk*tksm+XJTavI0F?R`(*=GGa zI0-;DC)RP1&6=(u$p($qGB#9>${-socBCl32oWgheKyFZnzwLB%gVuf2e?^_(TQ|I zI$vq3GjKy6Dgtg~<ba2_=0-mr)D1-(aHs^hK1aFc(Jrp=4OJc!$VKwM@?FCc%y19} zOCdXbsL5wUtA)()bEEmEUSRQ`HXnLf$Y>f48gc>gINivQ$wzgRsaw_(%@_@dx{D-# z$<MI9q_VPwG~m4;K3VCXqu0ozR29&9HK~vSA|j3|hgl(>AQ2~%>?oqqjATbVKov1? zVIqCZ5rQ9;A(m12by)%M0Zc|ask$HhsOyR~{HW2VOI+lZ{$xri13ATkWGGm~SnDS^ zgkEJB3nORor({5@d<V!nO4CH!@gZ~Gz$~HSO^YcSgMwM7_kU4KKYZ(~8!K%b5zwrM z(35LszMWH+3~i1uD++OSViuCt$ry9k-`7KK{c-6E$CX+W{R5a)N?HbH9lTNN%uDZ> z!8GWGmIPVEGzeQoHY7CA)?p1j5j>dbRhL*pcPgW%)bAN%RMI7Z`y)82c$QMIc?h=} zgeZhnO)CoX98cC|+C$d=Bu9k<qvQjc$xus8*t1nHAx$#H#?ev<N2~}Kn48RVl4=^B zQO%740Eld;7y3JN@3b<>Vu~bc<VZ;Y2Q;J72np<zQLV24t<pnL1k&@PA{G#>$ZQxg zj0qpBWM5f9o<=1zB=GH9jE?gJ%9jX5Ar?lFwGGj711_oc_$Rm_ZT4VfQNDS?4F*-t zQ!k77*W7|%Wu1RyYl+eG^fHGGO*>^ALp|C18s#}LhP6?<YSDIR$u*494Xe^0k8$}Y zS5Hj_<eQNfo4a>~N;%eyM!!>e44YmpW}(38w20Husrbcnz_>*$UWAN5KH6$>2a|&| zEO|2Iqa=B$bFuC$GD&`J^wg!;uRKD~a#okIb)e^Oa~Wqx64{}dd1PFv2p<Q{>JuVH z#ExhNL|%Tuiuj>FA-BkjX3)>N0Pe$YQ1W6>kJ7{_gMMN=&3ZzJxSx|ICkTNeI>?O) zLXo&t8@mqcYCYy{>ygh?b00GxMX!nQn0pLJ8PcK(Z=!}hX8RsSb$rTnv-B-aj#}J? zB-2P6iDVilY^fobHf$}xCz&R~8WFNBnHUXGGJ(beTY|R^&4R6^e#UXDfifp6){xRH z#qzI<kVZAPkaZ`L00_3|P{eOG$y>4{34Orh<DgIL(>tY;4gYwXn=Iu*9g%HJey-!= zmR?;CZ|MVD@)4m%wzOZy7U-ns0YRUhvdpFm@qFvfNq>UQ^nhG<_y#CP_4Hdxf?dc# z5t3~|*A@;1`f4hYuZk3`Rs|W4q85p2sj}qsktVGeYAPgsT_jT>kIl%2lvPr3gQcB3 z0G#+dUc$p(`axtMC%1_eslT!fJ`OAuvotHJ?HeDej<uT@?$F+62>*mP^ZO4`az=1} z2=1}vh$LXCjHM_NVG)(}gX~mmQcaB4-ZWVVA-L@+%LYybc*#G+T1bD^6UUaPWhJsv zE}JuoxjL{~jjc8qi!kdk4YQQm3`VTao$ywmNz(9$8Sb#&m~}d^@$VNIX`DbqG~=`$ z(Jt@=Do&dND*_tYB5^&_o<(1x(zK?M7Hv#2{39|Tt=Os#j0<H0)9~Iw(^akYE=!Mu z(k8;hh_FSs_PU4xRR>0?807YP{ZAfQnp&wzx;PT9MvgThoNJv}8ET1=iW0V7|C3KH zEj6%Zmmv6~*FV}r#2ZA9M#|6}#nn!yrmV=KLWwL8KwZl~Sd=NII*`Paw8qr$ZP;p7 z%o5uLzT+~HPF9-6SC2$zWcVFDQ+zeZW)s}^;v1EO_rLbzkISsyfRdR0D5N?e8+uKY zUbAb1bm$tbG&fe(!d4Gu>Iz9Ut2G+$#Zt`&_~@b)MSHkW8zxesNGC^Pf}<6+FYLre z$0;GQUMEJ)B`~YS+@k_ws$h&7=cb0bO;{>km-$(juUbkj)OB9(S?2G=;zK98r;a3F zV;v`%AcK2WQ6~H;8GiZxpd_93!ADXTj{JNqu@b)dM3_0ANp`Z>s$rp2e3FrExbaCd zs*Ga603$;*QDrQd{UmqfC92vN;sf7~$0cM09;vZMMn!=q)!3s|<p=EniZ4ujN1_>E zgxyH>)6uaV>S_Myql$%QeHPMgq?(TC?gGugd!d<*)(r?Y2l*C+fuX;KNNYI^4y1K& zie{WZgMvO1Xx{jfN0vrLm*1qYFesOlBds-1Ix#TDGy!N>eeE~z$IU@HchuL1o+F+5 z3TeR(Y`_+JHrd$b|3T|kNd$cBekpbs%B{jWr~gWKCq1n((<EVw?hc<_%AJZe%AW;Q zhY;XFZU^$B!p2CTL%DA9e!l?ravF9B-4l9>XuDDd23r$_-qMo|#)x&Lk%xC~w8InX z!9lLjgDjw>Ze@l>`aC2}CVkyASGJRyR)$h~EF=0cYBCxxc)FlgSyumni)}enDeQE~ z@WsBiD2`u{v6@{#Bx;n3DM&Dgb7fLBW2hCCjhQ04f~a9HU9A&G>yPA1SSC(NYKR5q z=aSx+n4uFjDs%<UgUsX4r?c^mg#3eH5~|iLBg8-@HG|TV9hL~7=78l)TSLZ@At_h@ zFa(ya{}9g0kI2A+*Z%O6OABGtE5Xl=Zb9>ZeM~Zze3^B|5+O&DvCs=9U0^!O2uIA} z!3iw`Ig^B0ubS>T1UtiMgw<}!Q08|Olu>EMK$!$)o%Uipew4BO=_5<Sqn#cfxn}6O z<C&_u_)l)Z-wP`AK>=sowbki`awA-SR4qjA92@-zJwA-Dk~BjL6_*O3HvOy`f+O9C zP}n}aV)S3>l?-EpPgc?-qNgU~ES~`lVS1EOJrQZ1RgPvm7+H?#@yTe{x%tP&Ob=ib ze^APP(fT3g!y}NGhLXu-A$WA7(_$dwoN71$^<!QYbKxzvm#SYHTzwjR(DYMrG!z%a zmYLUTqudTW)@6lHtibu%7vB51W0T6AQcM&#@JIn$Ahjk0vAVf|v^*;A*>W{h_m3Mm zphyYspYrq%*^`=RqAV4I(;K|8>pxU|gLYbHQO%f>XYz-cvN61J%n@Lg#W|^3j=G%V zY7RVXcI*CY2n*qdouMs+6<{RNQ3m+YNq-{QIE0g{;~MGrsNzUx7{+jTGVqg0_$Rx_ zNx5fkCm4q>X<P@MJT=@;L#mn(O~4O689I&8(?;mDGkO|7zhq3e9o8M014E?IYO#m( za8C^NA*SaD3Wph6AG-AMMgFh#1cmq3bj)cF-Ehnuf)GlqGH5YU_lWQ@0KQ|(VuXOT z{_?Vt=NXnNgD7N$f-FG_c>U!k1j^v#7$}3tsGv**W{JQC6|)EqB+8(Q3aw$9Rh&ce z?FN)tPb|DI8Yi77cmDJdYD#(Hb#m~bOVXNOZF-2LuqX=;kh^(qG$c9~!7=xMq!}78 z0+~Wuv_nF0o@Z=_;r;O^S=cvPk7PlqAfyjZlNOBnWhe`U(PDm9+uuk)SdB!-v5|8I zyv%F8B9RJ;KSF(htk~&iKl}W9sY$C3eFx4h16v}RTxve6X#_zpeOWec$#joudRBfb zEq8ioh?qg~6m-F;+S@CuB#jZEnX6l)r5_0AF9uu7EKiggAgiH~<+-S&rE11FlMuWy za<AQ^2xLNE^GGHvdxx)_tU!Rfl}ASCq$I@93jFsnUtRUqORp1VLP)wgY<%gIdpo3E zYT_VWg;z+^vXOBik6~`wdXJK>)bzBMAp%T>O9v@6Fg`=L^nEgR_^C8q>7m?^{NV(w z*Z%mEuf>3cpPRwwwK5-0lo4QL#~3*Q%XY~jW0B1d)5*z2V%uX3h(V5#wjz~d)E$i$ zA-z74J6@Qw@U@-)!cw1u7Cik!{1TwYcjwPPwKP@rjRI$}3#qe(=e;ZeOi%W6s|8|i zp5Y-YM3H==bUMv8TBj6_ftV+#Eq<~d-TAXesL`mxSDcAia%?ob`A5_U0a@x)*339) z#**~LdKW5bNpaeUwAN*b*h=>(hxe4I#QK?M-$So0KB;g0i%%~NO-(Z0iguFlE`ZBh zl2%mq6s`NQ2XJnWKKGub$>DwT&p$<tJVkQxkPhYCqy`P964FGeF45Dg^k<)v@Qoq~ z(xgHHd#XS$j^y-#3U)PoQnWKjVNqRM6rR+pIeF2g8KS4Q?&<MdK5ddjPEsSnmWi1E zt5LcpqhA4Az101{7c;2OlF9k?d#t=q3Ymk`mS%v0Ra9!i!tR)vz{-%yEK+8lK1K6m z@EAn&O(@m4AVo?v2n8f*XOwD<&w%2T3|hp(DYC}As%aEbN#0Zhgy`!5Wn!ec8#hFm zW3Q*#!_ls#+21SELY;IKXMU}obZ$k{qoi@3B_f>mzPLhz{6@sA6lowtg#sgj8?#OI zxFV4}h&LYMidI`Gl7us~NG8Cd1xtoK;RsQD$F{^MJ}<HosXi~Kp$Mo#8j3IjP8l93 z(V!h`*}l=p_rl6#<o?55yB%WCv>#b_>KW@(^Co_h^;u^=cFIVI3Ew>PKVKT12WqOO zWGuw2;H`uE4VXo$L$Ef~;RTL~>m+fGp{Sd6<>0!S0c&ZYqUO4mzV$CZO-*7JZu%L_ z$_;P%W$FuGx1ggY3hbhwnCt?Vki@KrwANP!AEgYd|K`8=6g3%m{Y6NjkOfZA$}TlZ z)QDJVws{JYI>TEDp$;@xAiS@n????Mge|Jsqvk8nOfq8+FK`O4xuWPEY)F=<`%y}a ztDjO4)F(By`Q^MIy)dTC6|ptdZji+-%<46E0h>e(8>k$(u2{mD<$PqPDwEnsB?GAT zMWvVxpsG<t&`wlPYYF1gRg);Dq%dQetGHsg$Xg6t^#>t{n+&irtnIMQ*6G&MKIl_# zU0ABrRw}8UIVjb<`V3mZLXpWINLTYF%Tm2C+bcx!VVX#shW4d5qCg61Y>TBCR(l)x zB7v?>|Fw>;jBuiZh3V)-Q1P7xknnTShhSJglCBW2WJHk~R21G!@Wd^1@&)GVTH_<5 z?$)O)@dXJc*he9kO`1<4O<D!8?sozfGh$_}MEJ!5_;QcTDhT)zX@)B!q|J*AC+Pm5 z-800B2t!c>STMFX|J7%fCIhWdg#e#B9o3RxB8U+MRloSU^5ygCXZ|TQa1=hkhG&d$ zp|N1FgolW4)@dh!8o^QnAG?#*2o!KtW8vlQhm9=R`tVjWlA3Wz=6@Uvy_NKhhihJb zhX9&DWxwN^kqQzvW})MSia8-D6Gl)NH~t{)GxXK^`4`_u944n%UHmwcs6Mv*SE(wB z+Ptbjv5aV(8*SR3f9d^mn<o$rT2fsIACr{t!6_mFjvfTd`vL8k`NPbpqZ60XIqfZY zF3VtXTXPia#g(db*)s3XYAy~%8047tL2)UD?1r6uiTRg7O<JvIvknH=n>RNU^BF`v z2s8#86%OY%MU_e33PCFLC&(6tKBOuUNy#jcUJ(MXkStoFXqo2@^8ux55qd=>S0V68 zk!Rdo@R*^$N%tO#1-*ISkya10L~j=+5JBGA`>BOEfOYRf3Y4j5YW7)_w2@AWLqtA3 z{$n&47(`FQ#+Yc@9MRls#6+th+qi1w{)@3hGLXoKC1PPf6z7x(b-F(aCpvBiWCKGp zSP-o>eQ*bSS@#9$gIj2Wx#4p5A;p44=Bv5ML*h#yeG=?L&%B44f-nE_)6|@R6*;CW z0E-SD?W0-Z3ldBMUmj$Dg^VQuYi@GC!}ajizy8e9@MUq15RD)5d)n!8@-x=rvR@i? zmtidT2#EmDo(FcO)hPzsJMG45T3cW&coxKna)wcTB8oGnC%zu@xRa|jX=HRDZa9hz z7C;Ocp(8n@pgMH=6SU;fmZ(Om(9=Pix6HZ=8T3E+2#!$Eb=UNk>7Tr$h3lwx4MW{s zm7T}ROitzbNPK?1SvBcCDc2R3)kz4WT2f-R(uG<)P!(Wek&8wy=4t+a$6H0PB2_dh zCm1I)u!@5Cj;HRF1>H>uRjL}~V;WcCTeQ3+SUVZ(j|F^$^&tg{PzRhIa8ww3Jy0W= zq8N>n5=y`{iLCy$tdPi;M5Pb33DF)Z6Z_{z8$k#%C`dQ^kgS{-p%r~{twM%&Hr%t{ z4sKlOcTR?B+wnspiFIxgt*|73idI48Qj2g38w4PcZW*d_Z!xq|=?Z@kj6<KMCh5v{ zz|kO6_Ms+r(JDc!fd}$9IntF<0YcK%0kA~XOT6pPzVP0q;XkL34Ox<8ZuA+Tsy@-& zO1k2JrG*`nMuQw74sr=*o!d+v^k1c317@=!pwRAtC`QXZ02bU}&?kd)l-3O7*oGIA z*a&Yy4iXP|`b@%aX<0~mZuBk_ed6*^!^ogi&zh+aG1lo>KL+`d!D6=#8^@r^bE;kf zX(`8`F4fr@wEaYhc`Or!-=(q!L9B_v84KezqwoAM$kopGmG_6hk9BU5+lY*1urD4` zDtv$s?OrLf7bO;~;SFC0O#rAIdrEM`U0sd9IfmTC+Nf|amFm4`>+9g@AbI0p5?YT@ zwW?uOT#UIT(JLiWGch|85mv&bUExqIa;PScGOHOYh!vMQJn181dU8O(gTf6gcU5m% zO~_ECJq!g%Rgs8^5=p@%WM|sEXkaK~VQVH~JcqCee-J%-YHkXBMyvi}+!4a|C-Tb< z`TUxVSE_{1Eg0vta!fJ<Zf=i0_ui#NIF$&0W?@5UNzK@V;Df<ND=G042R7X!W3(xL z{7`sX*q-s*OAQ{PuWfvzX!23JF1X$nJK4YbbfgrZ87<0PZ-K7z;Nthb#g?J@X3>-@ z%S@qhs25$~Uy$IUvJ1vqNpMNAi<ho2kW0{&V~`(J*kv`YpgkbS%4mNW0TzVPFAeR` zl=#vLSn42u|6>dK;K9j?c`QwqXH=~Shzm5m2S@7KRD~~vu>fD_GakW0X3;H!Tpm+M zJJ3waXdhM2f}o#ZGZvh?GN>IR@YGNxly{~U26=Q`VB|fP<~sP?M7`I!g-|OkGZab; zV6w&O^g*95?Wihdty}cNszoaDRFZ_k@nJoi&`HHpUh1U!rBZDf*SwM|24)CzY!o8( zho3mKT&5=FtY9I*R4u{C%ya|{J(m<-YV|Fk`;tz=L)2g@+clQNKg8xyVBUJ5PpeL2 z6p^}$J+6b+m4^bvP>=!c>4pRm!Uvw~G@B7reN!oeD@Br)61~zDNarigj*+^rX74|W z+551Oog%>g>=BNer}U+;3&;figCvcQtB{rs@mO)ZGYfe}HH4+%3ebbH1y><jp+=p; zRbVcq8KAK7HxH5Hr&HYU2?~GK2dGJ8`I6~zLu$cUm0Xo_y3x(XXr&mg476fJRt%dE znuUs}g&J+~C^n(nu0+8VjF^#wB)XbcIQ}?|96xW!PIG*46fLfRi&Pk%8`*x~Pr{R; zFFjo0^k313{^;>-ef0T=uB7tI{Gh$y0_;MbO}ufL@iVtTS6~QHLxCk-&5c&0ZNb8E z(xDaQ5{fDXn8k%_LncFf0Wwv|J~}s=_IS@Eg$~6IO-mFHR~Y2|vZ={KI5z49EitOb zE&V1Yy73gc<s@E%d8BYLmT^M$U>U?Rx06a-9Dn>(UL^Av1V$=0QK224sDbq}Y2NU^ zQnU=dH6h^_&Sjb_%%r3fTul>3YQax6qsmT{>mUSE^M!Wcp{Nm}QqoneZKxJqH0my< z3JGHBF|Icmsn3Nw#6rSzFeH+~_GnZ)Op2okbKnx3;K_oRPDWAOXzsYw9V3B9*hAG& z1Ns8{95^omtO%ivxv6OHQAJulc4eZ;+*J4f@?AcY+|zFdsFmsZ{*3)7(+&7Z&E%Jw z0#a5Wl}(0$%=8W)^4-=|67fn1#8w2r?O1G#m<$Wxdm$W~OdYTO{>Nmr_%UGo)Z_AQ zq(X&|4pnPV#8q}Y6S~_(JQIdA#ist%Y6Sp6HXFlgMFyCq9)@iYLYok}^W-jnunDav z2Y%3J&`LL41s_?)a7Bvq-}O=pGIR@CAzg`lYOdBH(F(_je@O43Dwdgz{L9eQTahn} zh0lKp0`FA1!c9-7t2IJE9VfOR6a^L(S)6ljfv#YCR4s*}oCCnOe6!|8yB5AXG|AC8 zgI3u?QtcIwSbA_sHninNmcR82B+^L<fE5no09bIchTJBM;w8WW<wY9CvAdJLmHOQh z@=~>eld&~ujeUaolsfHE4xA?TL4(BCg#Il)))4Rb4aH6o6<S;e85aM+u*9Y5Rdss5 zK)t^dP%Q8IK`A#8GnP{ES*p)2n1zXA%NwVtWT1!#+`BAw=-2T$euwa6(~xiawJ11J zEzOdO`SIjMOv_wE-%KK1g|PxXGgU1NgTrVU*&0ZZK#XP&LyMy!gY-l$KmTZ}SViez zp&(R|nxdM6qAJNn6XnwpKq&#F>V>GX8D#$W>p0Er0U3g=LKSjVWUnfZ6Nmb<_s9sL zQ;?8|2ckbjY?5J27|C>6b+wK*2UjTwg$D*5SB=&n{A{SO2I1GCZMDMWP#lR&+dO_# zoz981yzFuuo=kUjXhpA8w4JT%3V$<$R@yfeZbb8%kxqGBg!EGw_^;;V2DE~`p8h6g zfCVS4R)83{m*d28k%8<uX&Pz5mps{}q2C#~gc?nVy3wHtJOCLCkGmjFQX`7a7mX85 zJE?J=!o0NLq6iJO^?*=C4PSPeQe;P6!ij=~;MvhQ(W)xT;2wq=^XM`X@{Op0hH8YU z8u*A*rvetfchbo|KPJkhQ{`P3{lb&766Bq*FU(`PosUc7Jw|1yCI(pz2sNTrsgy|b z3pRf#^_nTb_<JAwf+<F;DrWdgOJl)9Th`+#t-$nS31ttdL37eS&Q+RTicKS*$V`dJ zP;TVnjkK!JM4^@IPRUCyO@*77Gmxm(P*zNhTwhmP`UtnA!-G7Pj(JcGT*I$ndLDEm zpNCR_>ZTJ(G_5NGZwmiHN<Ki=YE$KZza$hcFtrVD|CN<@5qaat>r+!BuhBk1aX(RP z;txa7XWHCx3m{&}!pi55lZ*%FF@Q-aVS<qZQ4Eu52MYEot=5p=UUeAiaUQ^d6*<}v z;3TY|DM+m;mofzvn5@?AAZfA^Tt!DIJBkv#a!)C*AX=&EERoepa229ev^+GglR&Ev zA+KbG81Q(G&}wZ7t_o+NAFXIhw9qOpCXPdm@_0n)>ba5BqUxoIkY(Kv@Hf>o`Djh9 z_Gzr9N_U5kPnGz_H-%;upD+Dad^^<dAIi-_1gCE^m97x5qF|);UZOJAWLZJF(hwh? zZ;0Q3BSVJEqo?a|+^oxwygK+y>4j1iiRbpJR^*0YBKFUoKI-t9%A$)#-9<yM9?vZN zsi-WF30P=3lbWwl;UX;{4-ZFK@Y<+(O{-c8Xv{5Cm)6|MxR62+#UFi=O0A-W%PI7M zm8NleUk;|q`$*I#sF5t^>9L{Bj}{fZ@{?0ZGAkyD@(?(=DjKRbDmCO57au-s&^r3W zp&eOx4IqnRvku{mM>fJyF``lwkJi~&BURC@fMx^Q(<8lrbxGmwfLqmJ>BpI3M^PwO zI$JWM4I*jShaiJ0m8dW<JRi3th-w+C5fX$^K{2T)Q9&wHsZy?^q3YoKUQ6BRMxYgB z53r(r->a~K%Sp{3>1nTmPZ3&U%j7R!C)%N+2{d6P$yMu1<mW0xD@3TkRgeLu4^<et zFdhiQcko|jd4>KE;|{TgxQbRZ5?uK*5@;#8$wHTKs5n{-oTC4o<rUQojMJ{}Ex+~C zN2!rP8trQ8@e!3M5SsvwHu75u!_^`4G^FkYgLH%}nvM^Bnd5UoSI=o5{=-k;HWG3o zQHyS+aQSI5H#8hXl^BFB;M@+|!f}5<fpN8XX_Ui3bOrk)?d{ZK2uwdVEC>{s-qh~K zT?ltSyU6wYvm}^BuF|+T5b={z94M|26oN^z?;{B8)BBjId99YcPKg|om7U4#hZ@s= z%*E7x(=Gau*8Na23YHgPv9qXowCZX>Ya)$m*`irC#e}y_8y3CT%qB;N3eJVJB`5-t z$G@q_@PdFOYDmT^m&Z5;k$6upjIM74-_XcIYBZrL;Hi2@)!2nd7)g_2Lhmrs2w2Ry zc$~`=Hq2tfBRr}MwhkLNP>IwB8zd6dI<TnD4;97%jd<01p(Zy`NH|6Up%(^Mzl;P* z1}#ONh!4uRB|Q6eOO+b81ZM!jx@xH+sLFcQ+ATnJ#wz40KU5)C;cVEX631EJXLFTm zufji+P?h2;oNzx^sRm09E8;Ui<tl`gNULSN7nQ3Jt$yogk5Z#BP?f82v}*MyG-ctJ z20c*R1|?T9M`w_2g0R293K{_*T4BlvJ{r|2MDH)I$q*R*!-u8H-P}S+61Xp9JGF=r z{UN?J_&{l!#h+5O6mY9o3v<h%VgZ#y(9u`kzo<JQTZBDd^OesnBqe|wlorg_&>_3- z8}rQ2UpOUl9akFdfxiwfySgMupJ8rl7(K$njDSWN##EIcRc7C=W0WmrMD=5{m9Mj! zwWO_f6jr-emghlvHML?>Tspxm0|IBXD*h7DWGH3ypep*NW!BzH4uL7F6^Tl0QDqoS z5>_orsD4aic!Bx~VGyNSzTzlobZRGC;IYv`o?5JaoWc(XF1(c11yFG+rC$*Fg3B}4 zQpsy7QTdbX=B9>$<I<Ek#UjCrVt{1Bhwcwo!Z;zBG@T+UgesM&m<KRql$*96#1u6V ztj_$CwN$l0m4PWpDqBJoa+L~IIACM6iw7Sem6j;J8fr-;v_49xN^w<GC8da~*0>Aj zXql!`YE{@=g<Ao}OUTmO%q162blAA?QPLApD+t@8oo5E`m({#p+S`BeS!$|A0UZi+ zlUy~o$S$@1P0X>21TxpZKssD=qvse#`!XNx^3Q3l&I3bM4i1^f@dBFFYrm1s@X96h zyyj(tCl}o#mJ>u8Rux-Rw2CAn^wFN?aDM1vyVGg~$#OxSf<}&_kxKDvs(;O}5))jE z64)$t0hg=PS!0E;rPLa#tz}g~mhxsxLk6Y$!nX`pqbgv6XKv61oc|JTJ$TmA28z$v zqYoM7@f~OCMG!GZ?3J$Pl$0e-$^sLo%C<qFT8~_@m6oz%OG0ny)R2Zl93Jo-lLI*E zn!>GxKp$9Ys<%B#Sc69{6V~4NlL)6|V%=|o`o`R3Zry8t7#Xo;Zr$9}XiH4)Ls<|z z^k;5C>NDX@s|!>@!zw*Bq{e)#QWRFT5|x&UUT64eC#tMZ4WUXUs-y?-XOBuuQ5gj> z1z!pks#HtWS)i&frlg<>xk`m9<SG@akgL?u;((W-p5osj4*1dM-m^5E9F?o^*53K~ zXQ@f3Iw}=}E@&O5xQhNJey&FW`(m`}fRDcZW&1j8ai^@+rL6-)zL7G#hxA0)!EmFH zTy;RJ)jNrc6G4+?+mGhMQyhpYqqB~aqt&vv&#yCT&f^18<y|leSv|Q_{l6$V128LB zF7g3cF^?3=SkXvas93m+GHpNo%zLOMwf9A3qm%sp@qJh2_x&{jvRbx&Iop%++PX^B zT1sj;>{LZ;yfs57WN8?e5>)!N?Aw&2$+SGDNPA36u)+fdKNjhgz+Z3(S0YQD6yUH6 zb?vH>MW|X7%SArmR9E5xOQ(d#SYYY+?d8e;N1VdVMVBf7L1rv^hDJV_q?XE4dlHIs zqv6L+sYAo6%2I0F_Y>bL#wpw6gX77Ye17_wI6mo+{Ob=<Vy?8hfGS2*L#;kYRH}_C z>-%dZs@{elgesM&wzO3BWfT>v{yuSS09A7r_ywY}JAM{Mf*>$98>*12aGya#J3$rl ztIAdW0kdQUwH(=7Km80fboI&)T_$rwQ=K~g=xoC0g6|O>F_HYm+o49eKHwuzN@Exa zxTK<|KK1lJU79MAJU28zs&##24b>;&7;Z!>soo!zbb2G$Wn?kERDB~~i6d_f$;gEW zHVDK!t7O1Q+E(%Dt5pMzv6TlX7ZtIExJrp;h>#6Y)L4@WCo5n`PujA*OkjV)P{flQ zF|Hmp3<9Q4SE|GSZJhV$JIoZTlzNq1rs#KLIVB+}gmOwLMJ1GwKqtMbR*h~2c)A~? zd5g5EF<@@}48kWZ;m?zs76njiX_8-XWYW?1>-q_MX!w{S&#!8oLaBY9b&A4$oRLXL zC(+BcSDf0$<TJ=dMRZ~i6)wopR-csbui8w7V^#-@jFK|^*nl#(zc0TmOO*yyXsJ@6 zN*(arbVf;JfU06|?NEhWr9xH2RoZ}Y%xcQ&<B-*d+@Qudh0y01svddj*QjAk1$Bpu zFyboMI;i0ei30fcfDr_-i?@IFC^hs>1WW;ZR7)`6=Me58>RF%ikVp+kEFg(BB(sGs zQIH?UrV8?_g|M^Lx>IGD4$@TX>8#4!qS7s{SS&w_A3Rc#m%?nAF%=(lsfvh9V^FP| zN6nKZr-W;sOi}j0svLnIg%L;r5G152gJzgtoswDgpqdC+p;aMGEyF)6p=7BjMRFvk zfMqq$|G-k~c%m2!OvTm6ECMOCyJ##m4^>S`qq%x1#U)Uim}SpNmcqH!6X;ft#_Jg9 z{qhI=EM++R8r^4zCMrvv-8v=dB#S0UC-|2~7^rMB6<zk2d(p`THYy}4)kcM5{`-dO zj&}V_yX3!RM1@e*fv8^NM5O_Wk`tN)6b-6ybIU>%KB)$%;sd5JFMp2n2{mv-7uYra z2tZX>Bq{DxCGK$3KqgRMMx1;$=7mur5IjaeF2h^u;+#tOtf?L$>f=uyL5mknK5h<b z4asa7Nyb%_k&4e<J-<@*#PMrtnM_Z?ZYF~a#hF&xPSg>IN;GMbw<*=zNW;i2(5q_n z9u!5uuc(TOpsol$HSF3WDu-#i)8Q@BmA=Cevtr-4)+2#ExPKyLRgUtcNVx`AE^C)% z;NsS{xH~2Md1RAb{e7P3fW1VS=NQ5-WC*wtL85LlJtxcp!ABC+Xx1{CQ;D2e8&8xs zx1Ox{X_)nz9aw5j)IyNL1pYd^R4RM!3!vDknt67}Qn-U>$Gi;NY3WI!N!B`rI2D`Z z15UN@O=`@4f4e$SAe-teQK>en6j7--C5cKdZ-Y)GRAq?@p(;yM2vu34N<kGHGrjN8 z$LcyZjIYODFqAfgLc#o}pb8&ifGS{)NM9BvguZ5R6H~{0fGVuz_{zyRhl+!EUuppe zRg>>fOcJJ-ehs%roFyzMiV;M1>C0sGOZbwMRhpJ#9m{0Pf&!_U0#N$pllb)>E8sp% zRy4Kld6XR+>GiG^5TfwYfOKkD>Inp6fjOp#5}A0_EMA`|%2X=t{Y9ver;1PN`jba* zv`SHEbH<p{h@ymACZ%Y}jfs7dE;W2pTSICjdOkmh`9<kDnzSYkNfjVCXb`}HQ#A;j zAXVWns|KkeA74=@dTQ9qXe(?yMRuv8P^6S;O0`QBg-?0RJZS03nt7P-4B6sc?J5P7 zi@UzR;dRG-ssCIK-icEwqEd0H&PK)1Bt<7Uyd4r14qFn{$;1G&ilj?J!q3H2NiC_v z$B7E=F@mb~5J4ir$w?)O*<;3G&sY=5FRYW0(qzC>826m7{lUi<c^W*z@Sz8~IF#)U zoJYG~BsroLt;KRpDCvy$v%{Z=GEPjBRhPom>P%)!41E4YUAxy)5J8piJt+86A_NMm zXnJ!87KH5MpgIE4Wvb*H$)rr2{Fs(E)J9Al)oRirE_9qA)xUtUlW2*=Uhw>jL^9V? z7Kg2hWa6;r&!bR>>Zp*k7>e;n@CCq_IaSZ;pgTZHBAT8P)|ozi$FJW3>MMt~UsZa* z<K1f~5|2fy+QHWaq^kX8)sfxZ1E*54Q>jg`)W(y7p=tyy!XSSysq0<$_5J-_-6?Rn zc8*hsCMuVB&?Jjf9->lls+6cw!;a7d++Px>Ori=O(h*Uue*wc(C^dC%_}p<+xT(_S znItN0*r$;ndq+L8RLX@~x%*fN^OV1mBC5C;=6lyxSrCCrVlD@bS{}wIG!>-WpqO4% z<U^>s3US=vD2pPyNP7-UY<LUd00lK)6!cZ)=a>TBDf2@l3^5jbEVjo@;e!wLV<0zT z8RAJ{5>EXn2~-oA#6e?z4Q?6uP}jMO)Z-$AdP7fx!q*8qMa&|@IBprZBP_QmB$1TV z{gZ}MmDYfe8#pccBEMccMK$6`mZI#yBPT_9K*}DrGoTwmDjR#`37NvEscgtpd(>3Q zz+)4eico$u*$e^SEx8(pst&-<a6fCi)Za`YV2VprmMX=mBI}d~r&J0o<&rKqg+x`2 zQ>l@w!=Cpy^vvRqXNd}N3U`boQNgrer>c!A%JobTl{)g&u%n19Eop-(o?r=YYH9(e zR1GKGficT<AwOOlGglrHW66FaPUBUNGZy$BmmUa^qo&KK%Dzn87vG4eT*A5tanDa3 z#K<A^>OKBO@E%MvZ;`PyDlZGeHOOyKlABvXRq}z1s$@b~66?my4Ksyt<0B+el`!Xa z;!Yv66cK%H<O}>QxBTY6`V2MvL2!bUWy7^N^@=FUX^Yw*Ev}TJin94iN8ZIv=85K3 zgQZI2rLqn_zu$8l0(uzEZ!l}O!!<JKW(ZhBfgU2s*m(M}ln1AZSc*p82qh`&R1r?8 zEY%&SEGY5d6j*;FqFS-ugH!liqEuNhZsCcR$0=>(tdRF<13$JXAJ$cN{B-Qv^_)(1 zGPC6p;AK$@P_Y_RsU%36pGY?s<`eHi75YW3-`APeuckDY)TaY?a6-o9L({?mWOl;o zKB+z)+NbeZmhuxmo|Hg&lpV~aFApu!8iePnDhM)!N)?3BwVF~^s7ODBf&xzn)d(V+ zAyj+%UPbJ7$Aq}P6lIUxaFDh5$ht&Isop(*=$oHE+Og)+5s=M{ZHDyULXpi+ML-Wr zMMRRrk&9-jClfZF?krV`Q$;N0#Hpy%cp@nzUu`_G&8BcF6%k~V9hW*~MI&eRY1R7U z)g{P}Eqs<_%X@n2QDI3cwSWSzp%Ag)M{V8Txgil@hH{YpO-K==@0cmpO{&0KEFgYw zg@Cw+{J!)?RMG>Z03*4}FaJ|&S;b2fy;K!1QS|ajCVE-RPg#T-9jv`Kgv!Pk^+Kq# z#GA9hcL_G?6?N`30qzq4{X<P%gLu(@6;W&p1$GCiY8)wIscMkw%Tj(KQSDM&vQ#Nf zNtR+Y$4gntiBsA7<8#9&C}o3LnRT^bdUo)+B2SM{!}ldym<nrCWeZbbF@;x{1~90C zJPE#FDjw*m0YNM%mxL-{htY~?xnE{%LgQ9ki6!`_qhc&D?j%2<UW}%1c@R2>-<Nf- z7oqd4#AO%z)4BLbB2<P#_QX$J5UOLmcK5`+mfSsc@Qq<c9;e>iJoL~GPk#C-N`1H{ z1gy>!aU$S(L8`^Ha}glL249CGjVx6JQXN?;vIOT!kbA0-r^=>#DyMsjr(^x}iox3z zs*EC47+ZyEGRw1G6dbd)6+Gn?jQXENRUsA}WGCJ91TVc3YO|zfFsl-Nh<pUcGj24j z4yi3}?u5S<6V8S5Q{Q~I(oDVWqszD9r_JJ`vg5C|<y-^;R!0`zC6Y0oab6rqrC4NF z7O5LZRkM^)JTqVLGgm_0Q$^iVNZnIQ-N}M#In7j^1zu_aY<2Vyf8!NhA=nTJMmriF zaFMogqM8W(__Xww)dV+X!Gj|h=NBmu$IZpT*8}WP5H$ad8$8|kX>)$sCL(G?Tof5{ z>iBPCFYtWbR0A0WmQK!Y{d!J{@_<yGQRfCyI{_)@`0I*)dg_0cmaXzs0rk{Xx5od{ z`_!@vyz+u37+j|roUIu#`Qa}s1x{^!z`V5X-pJ_&PjdYG=cf@t<)z_7=L#*)I`Zle za9oP(#UWr3Hy3%X)fujypDVCM4WcM??Oi%W-9Snm|8fidTA-eCpcNox6a}>lnWpM* zc|h>%KK<Z>gfMiCCkWoo{0oy+0VZX0f-12QHi0vjl>ojJa%vZdItw|S5uQo|$#)A+ z@)mkUly4bSel8Q>b)a4^?|Bht7tPx*fBDN($>uaawIkHhHbAKT*rKSV5adEB$^(Ks zp{Q1nD!hekIV+>0RZA_dmU3KiMXrx~Zh_r}wAP;r#HC8UoT|R82k^lHxhlmRe*M`~ zOJmc=ipVd;9M|Ntleds!jx#D6jLXH#>KdF2o>=@-$5?W93##R&mkY1L%UK$+cQ+$o zi{?(L)zC)3zWme?p%(u0TcOT~P_0fqaSL?_bw*oMBSq2pFN>l|OPi+dB2|~cD9zAP z<Mf3@T?wPKL`n>JZu8(@JGSXUv5AG4jKHQ1Y)*|53?Am#fSd+p;Td-^BKT=1@lW<$ zWSw^lAN<kraz?ooA>dtW1uUZK(uC!Ty3CvL)2N^*lLEV2p*C>mb+M({@KIV_y#k@i zZBfMtrQU^~qC5!IQsdNFpvzOE%X1e-rG`|cu3p8umNq%-x^%QQ4H7J<fIpA5sUtQG z%DJmEo2kGtC~UlA{#|?UyGl-jBA+_OkNe}dN)sL0VP%_K-OEZJQ75xB=CU0DhkEh$ z#!u`nY%5eLKkd*8#qNS`q#dCci1b3J(lVzNci|~^Y9LevMS1FVl@>lV?n1p0XZcgL z@Wj+&FdJcN>ZnuD7^h|5ND(tNX4`d?Eod~GEjQ8yn;O&ZdIda{-iVBO>KHlRCG2T? zd)3{HfTd_yM1jWd_kt%61v=qrKlY~zell+4jQrG6CZ1tO9S9DwLba7VZA2*Mg-hLt zAECOG?`o_-;Vgx!-pDl0&Xk3}aUQz!nwp$8vlMEaH_xsjTd;!vaQiziHZ{h)SMVR( z6iOX-*_fwx6QF^BUGV5vzxve;0UHg0DRS!QylaOiNr6NCcTN{x3Z5G6PuXxT$sFxo zyy}wiL-|SGh~%e=@~15oP}@t%SJ!dvQjMabAceCg#dMaarV1yc3V+@0OpV$E6$%SA zuEzCV{LIvtVOJ3$UXdzT%715xbLtZ6l;uC?y{O*0aVEfCc=W5|b@dcjI=w}~lryfC zlGFCVPeY@)dO7d5fu{;9nsF~4c&aELzm5H=h@a$*?24b**H=qfGJj>VmiiP@WqF!k zW&<*YI_5S8rqsPur_@!b5^QE?D!P}uhnZ6M(pRdWBG0ZOS}PT>wR007A>h?hU>5{T zQD9%^<KbNxV|J==+ierV#qOn}<*BHAe4X>IuN92}M@2Q%ih`&WHC-zVY0i78sP9!% zrJ}q_Sw*3;(tDYDxffMok@H%ZDm;uW@Mnt=^aZ90VX9t!Mq69K0Hz9gCueNaxC}uj z|KaU8!^53Ux{3&KKLVzhqZb0EAn#Xj-6*gQ0S_4=0~~g}>}QQJPiH5mMiZJr8x^JG z4a*bT1_xQ5DnQU#9QEw*)Wwjd-b+Q@3TM$TXWcSq0gkEKAJ^AZhVW<5QniwJmX@4R zS$(Z#*6kz+qaBzkB&o&$lX*L?sHR@31l8f~&h)^#+bPYh+YkR44&Psi>xO_86nLT7 zR7Zi04!dzSC);P&*Z(+(oESW%$jPugrO2r}2zDv@RaEq~qI#LLfLV17GqsF`vyz2W zWu6+HaeZw|BTQvkf85?^sjrN}a!0*#=$v8-&V0a)4Q9RK!TUxv_00|3Ap%Om`;~Ux z5U|1!X!snn0q-N?oOXy!HU*BrroIk4r_ISCr`IxfBss$%CnFUvg-tslr|caua&p$Q za27Lj)-!XKG;`L2^;9*R{C2W-Ph7j)RNr8%I{2$dnroMy+KiT*chpWxPCfL#$$;JY zk4dg~bj($RH2L|j;%Y%aMtHwUT#dZ-U((kZp>yc``<ZDopQDqR`ugeGW3~)zs=K4J zW7B5NNBfRSYrq<1V4am<+l#?E>%kV?ky_!xS>DW9s-v!2$J8-yz0^*&PgH7GOsFuG z)uGZ*+mbT@u&=eOKP~w*sM_P%+miwDrs}+M8}mmI0wQ(&s_^<R&DS94JUap|slgR? zrn7`<wNqf7la66i1v44eCa3YNJ!XsDRE4$4z$W(Bc7jbF5Uju^qsSQ}rxZ4M>zt)a zojL2=8a3PGO{x0LM)8iNe#g`$VyUl7u~DME+N#tpabAZ?PWY?1sV=D0p8D6G{nyBU z)iF%%0t)R>SxyawLGaO{{G6h$8v=HuK)=~6<!!X>Ozi8u!aX<C&eTqUcvF|fOhes{ zb=D?EIVomxmWMSe#CE|ZCkRSxYAJixUNE+<id%{WC)-F??R~o-PV(Ey>Nu%RU#iZk z)SmI@F_jgel2b0B4wZ(+uzUEgD1fQm8E1rKNjNBt_Um5!<5!)oi$=f=!ZGVCOzptr zq`=X@G&D}D&f#c;YPH*$wq&Mu<Cy`11~WOU#nu&!wQI(vn5n(~t#MOxOBF&hYN554 zke%CfE@$GF_M|#NsYXun-`8k;ggQ>DQ)zGHzoJ<0I#g<xOQ;KAH~7zpVRuF^sbo+} z7(Yv2cMk%N;KEV_ETup@A8<>roYTTIf&%vdOlPy435R2fnOMTaHg={#%;X2b()zJB zGo>n`8Rc;6D&iVNaqH^hF89TXeM}btNu}`T(JpUyy^Z!K)@ib{`*JEH)MfekIjK%4 zYXtxG4O;3RiB*^Mw?h-)lAmEy-FXpkv$7?|ocA&Wj<cEVik9|ZHrv?3#DIyNIDNg1 z6(FeYdnsV5s3I$w$?)v88_yUsRooXVkXBbCt+Y&<S|(SxUiGSPlgEv?fhFmTkW>nP zSxBl=LpUQOHS%APEJ8)BQc=YEmO<+V|M?@9+SC2Im;eVMU<$vo_POm5aHw~<!tz=~ zf!o-YJi+W;;@QtgOZzdKIcaHE7ABA7tQrLO08IW$xkj;E#)9mnNZl8^wPi5bs%hD( zxzix?SdkmCf{?m<+`4!Y{qUD{CSEQi4dOo!By|s0A04so=Rft<mc78we_MKioe1cm zzzq;E8z9(7hZW>qnipai%xqNZ?uqlG(rBAm>ee=}Esgdwb~l^(X^8<7!<2SfI-})` z-I}w~tiN!sQ9GB3s9^0}qkOKvf^Mpa?&P!~b@3r~F^^Tl-<E__CmcG$lV}H%IYkgg z>mZDSq*DG{?yfOPX>@)c24HnD0p7WDXGC3KgTS1zdfOnN(?Ps*1S|^18s}c@=!V-5 zDz)3pifl`4mvf?07u!-7vzZeFFOHTZ2r?FA_I2m2;oY%nYR-ac)dh9uHnlhqOI64l z9c^8Fh?N5CC3kn}gw#cHUEW>aguW3uef}u*F46bP-FZTk48NPdBE@{&NnG6(0i{s0 zhw9FPfPM#YqmQ_wFF5sF207rm`xg6BU`MM`sT*z^RI0nXB2;?9jY^D`Y$xMR%w~9Z z43!uyv3X{+gxRr1P2IY(y8g<#j0Fu4^xWOl-8R;xsE&-XYR4nL(t%$iw2OJn??aS2 z4(&;NBM7OBg{+bP+9Q+N6%YzS)ZKAch=4^!$?l}D4G@rVSP`p@L%<>j@gM~3Xb2pU zz*yvcJ1-~s4QA~WC{fAaq!CsnhDs@`k}S|Q+GaKamDmwkhf0i=3{<ksW=u}bd3SYH zcKwBR{k3*kx!tLy=1i%7t<HLM7Wm6*9QZ|{s_|%qdCV{3kh;N^3_gEYx<83;P-ME3 z|3*Yy`Lp@Dm;eWPf&cFB{?0(L6s!H`|NNh~6oo0W4qk*Iuoooxy^8)AEJlGw3|4g* zR-N~4droRGn6-1#2=^jGC4-X~DzRtOVlz`Y$wnm}8I?w*FETe;{5RREFhr4=ohSu@ zHVYQrV5;=)Qhj$CZ5TuN>*ZYYvr%1q)i&Nkc8`Yj$e*?6*ErZ1k8Jap&3|3e_xw5z z)nVy=?W^kiM7+l$6QB(fgAh=qzy-(*1e6rm9RZiI8IYF+#O~!lIwGLQrP%0n+cP9J zQea=#+X#Eo2EN6V!R%T&$!{}D-r#YSvavBPN)_O(uEFam!%K}FRkR^YEn!u?3}Zv# zZ~tsmZyT%f9@-jL)hT=3v-Ud5H`FOOv`Ak0WkRcCt%?wE%hJGzfGG;J5s+Q~NxS|- z;`;v**WYPZg--RLqHrAzfrI>sHU%1iWsCy-mZWNzB7-FRW6WtP>*ZCntz`xzF-|fd zsoJr~ILUw{o0GWlC=G(f4a$2=LDC>jk_Izu?04`V`azJfpaFvH9_0<Ds`9eJyfQs^ zs<VpCtqzQ;orY&OjQK0)%&kr{{ZiPdMHha#$M!gMzi>mZQ1o6oi5?xVY$(zOCO{&L zIy6MmQc-W82$<!<{UhKwLaH_+Rr?dWQ{WCQNeq(w6xhpJhPPR5Oe%sT#z}riVw|)A z2(o)*8hNZt8e7Sj+rZu<c3!CEd8r|HvDb?IO(zH<3r?kAWKhvI@OO4F+TJi$U23q1 zjSNw%UMiry@(^42uTJ1<P>5A^pnZ`ROodEfqjhlMIfDWhwi|(ff0MZWR=X-pgN+Di zL}VHiXgonD1^PXS?RK)hL07vXq#_DT-DW8vF-Y<gQmG}$2}uSab+ML}LJ~7hb%!Li zEJ7U!+AQb<!J>k_cFo?oO>`8sl#Z#^LqCgEtffLuT``%nfKjzZL(6R%VALx|uU8Uc zFGcuLQTX=ws$Tpz4gn<vdQfk^{+)LH+r;&6w5uHfQxqugu_D8I8w5NT9`*7hwo~9x z8xkWVzYWPIBtHeVo60<d#2~4fkQgLY6Vf0MOx@;sC`4gt%&Nui1-E+kH(6uHD034T z$2voN_Cexj!GM5$O=8vXcNQwDmU=Jp7*@j{yVGimQ41LLGK~4F<uvkNolJwR)ZmXj zAC!c+X9Ucmp-O>%{@VirrZBfoXJ;oA=np1KQD9#e+gb3aI`rOYCo9FHB0{QmCfbB# z;L!+EStB8_^SwJEHG-hcg3jAqSjDL2i{*Uh#^Tx7KV;upQ*{uPzW~k-O=9v+>ug2) zr=sfGIO?5_PReTmBfp$!5&u<)npT8W`7;np`L7Q0>VD9lAUxw&7X<vNxc=|N^$YDv z86%xO-}54%UBRy}8};%b7Ez$nReG*is}?-!MS=c1?TAM<A@#zevw)x^B;+4<#MpPr z4#c;9`Wb8tKiI7yWif8?gP@ZIr=d||1b-DsG{{l7Lti1?>Ci;H^HNb?{u>u>-V$=& zOQy??tiMnML<jNTCa!;zxPG3veyUv_1T0Ez{#ozqPVH4%$GNWq@mkp^Ya}bW(_LAQ z`r?tF0<(8|DR`uUAY;LCcgn`V4yH$*`Za8b0c=R@onj-LdhyT*Bx)2XW$<?{Bsz;p ztmS5VW#P3X8@A*dR@eL~z1enGT4}ubHvBgf0Wa~|2?drS;Czh(qmC3<;U_&W8&zA# zwl|V_@MsVljl(0hm$rjo3XfQvD{J;~z>eeSXp3i<ofPb`R)e6E1*eYix7*mMoxtBX zM`16Ks?AJd&YSI+h1aNDS`<y+F`)h|2w44trSWPv1RPC)jpngy1*44}h@07sy0cMt z5VYBd;n8{7Xfy~KEV$eP8wQS${VbaqwyN39vVS|Borgx)!!FB3xS2gnz2A#QqK;{X zp8Gv-jCn;C$d(9bkK}GP1eQhw*2NK~Mt&|T8bpCt2}UD8u$_(e21cVnkd2CcDY1Q< z1v4;eva@9D98h)(1_*Xx!Kn`Zu9b&I@ZYua&>;RB6k6UQ#MLp5eoF-0*bBS|{>#cN zcURA@zPclzL4osCN`Y5NMT02ty1}R;2wo5v?EwVQ9&cw{Jo?;wv9Vz=3StN`NfNp^ zW7xIA&>;AeFm#DLv@QRgKYS{6v~Otw9Q2#r5w@?nZhHjmZU~HA!<TFuyFM!FNP+B@ zuN902fgn3x*#clE0(*DZ(qikMy;-cWd1hxTJ1<7C;N&DfNkTWzpmEFB3qv0s#DC-T zsD|bho)-ZPTC(YCV?w$i;AVzEXRu%v0Xrhm-C!HDk?5NIhFvJIFBpxpkZlHn*;{5K zu}x|0IkFYP?qV8BLPO!Nk%TVPGuU$1TZ$}fmQL80|KwfoA#kdq5LtKryCL9+9_vO@ z{cz<H+M!|0roi1I(Qa*H?4~Y-ie#eCmLQ0S5j#@Zam?9?B}=UG;MCZRv6GHHXy#%a z0fLhaf9J9ZHJZWB7#23SeUi`_MYcS5y-hCRe$oj&2v}W+c2@}aZtZ3N$bQUnBM{J@ z?P?QmYAvY<IJcen3io3e^W61SB9TFX?I73-iTawy*jZczf|3QhgCIRD`P#B0lAVBT z{-?b;1fB4AE}PJ1VPPXIVNMJhN<v#^5%!Xk@B~ZsjhFJLKJ-O|YU~@qK!a?ABjWQm zM!>#?K)M>OVp~Rx5e06*Ll@*Obl&y$NOVTqST7KK>4zVg8|#|Q@Z9)ch|5wiBw$aU z{bhzppLzB@tg%&E2ZECge_00FGCIDmLvWlKY_yodP*trn@?T@*_|O!>vGMY+>F`%= zl-ih_ZV33ZG1r!cKvrB>rNBlQx?HPR<Bgw@hlU!)8bQ#$>$w#nk<CM;wlOw`3;$8u z5(F!59J~JP^Y6tbkDjTTfzECN+uj;<E{C8W{+#^h#Gs*RgMBjx`|_W9<JDnO&PXYL z{aG7FwkM}S0JQy$NDAyS+G-)_L55x%0k<@XjiA6@u~Qf1DC`w9c9lG2P+%_*q*ICU z7VDiWAIGPmT+9r>7?!ZV%tp@U++e{e3x8QV&?Pd^Ha4(EZ(v^;tzDVH?0atv7;h9) zD9s#fkCazW;=3FHTgLNl!!-g}?=)Q78v;uM#rj%?`kKUcMS=3(i(shKQ7GBHqgAXF z1Z@he@Q}9f5Q8CU8)N4t`*9wq`fc9!1A^+k<GVJGXKDeU^TJ<aE$T)!(ev8C8f8@J z-s>2sF<WqG!eEyF8kHmH-n*m?rjFqq^56CbxvN3I%Q6IZC!t3FU`Gn9AfZN+SSbw2 zM7lGEi?Ms(7=|Pd6~Ry`2ugVB2!b#F=wSvAYz@n0!(JJ-$Qhi-q;K|}#+D7fZc|;& z>5TzsV*^;D15~~JY5>aWW^HT(+n)bg)Ds%B1xF+d+VHne1U!pR_AC^*PXw$RQeA}= zPl%YG0=qZ|cSS;33hZbS^N`Ru7okc*r7$E-Zkt)fN?~ZRim_&!joCVR{(BFx#?oYM z5R@!f1cH(U?R#Hte;RH5YSfM|g}+h-`JDq$scvdJ{}lnyXz8p*^{i6<D;11TZ{Hag zHG==f+3N0c1iaAN#C1KM#WPqMA~uKuyEzBHQ)Um_gMYA#Nh}3JLrExW6=Ni{XAoTe zgqf%q5lQmn0S0E~)7)^SO)c=(B?^8s>sP4<uv9CxLNvcfCE+3fXk-4{ve-_kde#jA z+poXBT@4i27Xb$u!#2a9(IH}^?O}#Fu%k`LAfc?-icLaNKzBbNxJ)>^9hv`XAFu46 z%j41xqLaAQ7X;-2cS67srmybsR~r5$`ETd+Gg>RPivx61`Ov|NSy}!o4T^WBM$-PZ zG5?i<+6}y}00HYLaGX!DG&n3vfu%0djufaeP<IR}4H4U$J<Of~i9wQt7zSlYNFJ;n z48mrEVAjsk2!h!ez<Xcrh|RFbp!gVT?0%;a@MoY;sX(Y-Bh+d7Diw?G82(jc{pv_R zr4m`)>E~ShSDhHxF%~Kn5no3GEr|{{mO9sk5dU@aDnh^!Lv3^jcDIBf1)hb0vc|Ad z3Ou`4G>bv<j`oZ}9uRce!~7s9O-}5g%kzSLtFT2VL5(d-HavMpHV8@<3<y|_KBdy| z-2=Zmn!W}Jgtp6Kb=OB7%70z*0X>qTeT5;qYeRVCA#Mmb^m;3IeZ#zdWL|HZmu<(b zK)@|8X$foe29}0}?a&g|?h-va19dlsWxb+V5X`EJ$c15JkVNfLdzgf8wvF3a2it>S z-6TY7`>p$@?d@J8tUjgE@a=(L{gv^{C!tXwv>koA>p`^hUxi$LV?JP=FvRuo-#5ke zTJCz)yljSh-MnrHSa*#8pi(nfFAA&<kiQ5^*yt<)oP;Z5pdt{ICtCF+q)Oo4`Lj=9 zljjTLD;ZzG?ns)h*n^HlVJ?n)wzqpN^U$$QPP-J=9!y`={8udynoR?2*GJ7JLiUP+ z-wy&lZ(cSkebc<oh=5rNydmIn{ZG?_b3+7d3<%q&D{v1KSZWE|0{~?$VUmI5C$vq0 z8+b+Kv*zD9;;z}Flu@v3V&${u@eE=?+8`)d@bMfA)`8%(S-e-N)AP!>=e+z^S}?J@ z21JDnM0>HI_QH{J9va0U(6hD^pXoRR%u?VD0ndnl3;Zzz+zI_uBuI9oz!4T8rx{EF zklggfg@tvugq;z9Bm-SK2redb`LNjfk%MFpi`C<p2>z}Ndb04>9`bJ(|9Tb1xemKm zBmWJ`{%cpmYD|H=0t9R{1hybxqc8X_M?mC1iGUTMVC@umW%RQp1<I)?as{dYBxCz* z`jG&nWcHZ!a~7AV2L#!vAs03~HL~m>&oZuOB7T9zPILspX>S&<x?rzH=ou96HQMMk zj{iD}pjPOhZlL~9Ap=%D6{)bN8v@=CaC-z~@W&AFvOIu0q`)hqpR=36B>hMLk_>Ir zkF<ob!nSi`OIIErmk5IM1C^0@Qyu(O5YGsU*9cGF2%}eaDy|HAHs(K74S#gfUwhd5 zMIhkNaKKk{*9`$j!=E1kM;O35Qs8;f=PWj`q0Uf0{m26}yK~y;vyB;S1PB^aL1e|O zW-?xmhbsuxWEPSq=Su!2Tiy`@wwt>~xH~Jtyh<%z9^z>iJFU<=&8psS<MgcHzpU`- z2*rmA(T8>g)C%zn8v*~1>FK%MZ3uYAq~N;^0S*33A)wO`c=jmxofyD6QsBj*&j=fs z1i`F1(3lOCe!i&sEyYS;%kT3qzK=Dw4CI+5O>EskP_m#C1g9<GucM9U3}Ifow0I37 zo_4vfF8o(f7`wd=(%jnPoIE*?5&_Qwf;R+Y*Sqh&`^V<>WAn17>#OE9;`z=i%H}^r zz&%*MwxK{Z7|uqYEcfih09N4%l^`g0#cCT^ihItBK1CoXSKxU;kRH99QU)z@owM({ z>5RCujk&AB-I+E1RY+T9McykkPOpjox}^A3NS;<?J6333q!J!g1Z1c3MI&I5FZfAu z{d@EJzs&0y^RhK`c7=ey{N*pJ;SX0-mj5IIZWI2sP+%{6Pe<$5HWXM91m=&2Gtg&* z0ZgJ#mU|@nD7*S#XJ{!1(#YlAF^M|);N+@foyz#P?CaA4g40gmFB|LDMb&*92VWO+ zR~P=vPDq8wdxgG3h0JM}GT0SbU%e*88R29g;AS8=L!NDl`%&&{5iEStylx1%ARu0) z{AVNJe>eT__^-M^&xpwPOQgV!9e<L0B+_NMCrg161hW*_#Q;Wg;^!WTJ~F)Zb1%M+ zHTIkG43+)b6gUV3B@5O~$kaEqtBb8`o9M1C0sa*g9_O|bbJw}}uR`L>$$#BtPP;_7 z8!8V@o6S%JeARK?5O6;T=mfzm0?zQaG#dfC1b%gKfEJ~KUK8}RP+)gAsMGo-xhD%f zl6yS%<91J|1VQ<m8-U<a#)4%{$orL*FIeWTT+i}h;rvX!YWNHa?XL*!O7Y)?vQCAr z{UCRzF(>|nz6x=#F3JvFG90_8d{rReXb`+1;N6CRznCV8fW4AHcjfQv;sD(b1xo12 zT6%U1J-w`7UFKx|k#~OnS!^%;;3KR_lYs;>b{t5vi+p$Fk8BBo(`fkXXz1$V*Xt76 zzY|~Q1+mUh{;Mc+lr;f*0^8e_9U3FIoYx<%*OejQI10RC1f1b-X%YcjLcS#NRK)%d zvU~NSz!Ai=AJbPCA855XuoQY^nTAs9*W6?;i~{RGQ2K=`Kv2pCSA(GaB2Rsb_G}i^ zwV9zyP3>$~Z?BLrt+RDi_&PV^KefhXv6{meL5D%PjUEInO5x06AG`L3fR|_pyif%E zhZX*^2)J3`e^Crvi;X9XJ7=_e4WhuJNVu~TPZ!gd2L$CTbpb)!9JriZ5<jxUB^QtU zD3W87>E6b>Je}9dRTSk`ZP6JQ)OAKfSA~kbJuTxvXP}ywga0Z@8;vjlrb618a@!37 zZwNR70cZYeLBNZ{oy{n)OA@Gh*CXs+9^&cZ0QG=imI6EaK*jOOHG^fws=RB45b~eM zCXcYaf#8(wepi&UnU$+Tw!Y5z_q-;B(_X-FKZY(R|J4ZDyZLVe9f#_yMyGi1o)PdC z4oKJhvwK58;=e2cw)^-b?qm`0EJiO$fqikO!sxY4?EhwVFE%ZH-0=`k1@5S3><SQ+ zEU^<1TvoUgW06ad7l_+{at6U)yYcVrlv7c?`?C1Ysa!fpzM+?-#h`q~WoFb84$Fak zL%>D^wEMLI(MCYyANEDSUnVXm0wVvFBH(6z&$(6j_%>smol~IG``K>v8izX-6gUn9 zt7qn|pMD0Lbd$<?kZw{LYsXfRJbEM-6@lP1+Qg;u-%d<iz4)&S{B`HQ(dByTw7cr~ zZ!;a&QWIdij+cRe1_kaA0slIE-4L)E0e=ox5dzA!^bZ>UAp&;s?$xnQ7tq-`1@4V? zc5d{lo1CoC>x+=0N==^N9uSlV8Kb~nASiFDBM45L*|*MX;u-{h>f~&OIGYK#?vwx8 zmFouyHxy+uW{>Upkgm%M-Vy=-+PrQE*aZRc8i9a2kMU}!z?;RZOAMSnIeym3TD(RW zy)Fd=jmdfBsb5=~<P$ky`N6}+KV2F8Z5+sTMiW=5SXbXDw?SeJy;Qq;@!z=+5KnG8 zs&5E*L%=Qw_>;j1n4-XI0-ezoua?QVXp7gSfFL`7ltVKfj67N7%8|p97(o2j3k0W* z{8!C4n}u*)2gy?VNB{s)AxT6*RQz2K-&{2RZ4<igM?eOG6$toOfAv>`5O5p?-Vm@O z0{&!eDgy4%uXni=I0AI8(%jWDIi(h_xyj>9HVG2)_>jj?mIC()g46zuTf5@Fn|*6D z{u`%FI#j@-B73n20SN@12>4gxs-VC#BA`uycP9dRY`|(<>0O0@6_j%`cU6GkMS#ww zgW!A@vM>3sBwcwRl;8I@uNlTnG*e^AI!GvcLe{a9$W~+>l_g82#a1yhcFFcp$iDAe z_N=2tg;0?t%OF{@j3p6fesAC3KmKyxcka3Op7WgNIrqFjOvD$Xjy^olrYZB@Sr<G= zaevao_MmL#*!-<l)t}NFmNm6#IeqeV_+G_ZKU27e71c48<SqP}kphoqfV}v&oo<`I z5jh~?)vtE!-mjX+l;nFqBu#{Uuf>~B>j$7RGijr#-s^7jDefuNEO)Hw-z|$r&g<*G z8PP!h%6^)-EkeB-$;_dHGbVSDydFW{x{2aNXC@aQ^nh1YUM8r@^8uesBVYE0T@mzD z_&%GCBb1-XK>qfAxK~qfw<6xVI+BrD-|#}PgSRwf_o@DGnv=*MU-%djLOfH=#W#EZ z=kM5^tL4a!Q^5LU??NGEo3~Zw8BpQA+#Y@3A5~dES-JjSGh^xghN~%uW%@49+T}<0 zy#{=IZ`I2)f~YmJ3_szFj+lFE=D8QdzNV|T#{f0VkgnuTyWYUDg^7@qP8k4_I{sZ8 zD3+k9?)|iskn2<C6OE7Z9az{|RWMn_CFN+;eH1QpZ&i1#Te$ySn{a~`P~}#oVc67Y z-{h~Ol(FgD##Sq@*WsI=A4j_XsN@{1oVZ=_>Q~ME(T&CG4q<Q++jMa4<!G9?oq^m@ z@?EF)ws7Fj8)ZJeR;As*FM6Egtv}DCW~#sYAs)BFcqVQli?Tl6mWNeo9Bc4TtH17Y z_#Nj(Z`H`~J9$;Qdq`gY?!1(~ZiPrJX~P2>c;VlgvO~s4LP?CZoi31MhA1oDy=qQ1 zd;LnOm=ZUY<(+T0XOJ+=JHKfySt|&wkf<HiE3!8K;hA(Ud1|%cZc}j&ajM-<m$}LR z&bPB!6{?k|&URn0j`b_Oq~B&95eL%cU|eE{#G(kZTAUEI$ZhB9m|vC>=2;c7wfFoU z1o%U>2la|@iB&@TR-W;>4%U`f{rIm15jKcWR%km%@g~Ljy-xDleOEbC!-cANx2pKV zQHzMi8`Xy{%L2(K*ADeWMGKJt9p=CtMN$Hf(NGNOEfH)~c}2;c?Z*TOXqE>r2`IZa z+#C7y+;bs4;}USMB2`HJ(m+_smPBeID|F;?(wa8G6Pm6OzGB12c;eufG2XBaes?<A zaVafj%qlZKO7k5SdKmlGPnW_6T!L0|%<}rol%Iz>v5!Acz8kme_bn;z<elLQ$$kOl z*wT>gQF88IX$#iSd(~hvb>&u!*y;<jf`W1H`5C3Vb|ZOzb^8z(gVV$IYCaTSt$H<L z;a`!?XtF7myG$x0J-A{JT?oF$O_J6Qmmu!`-tm)!+j_z$ZQ!Gh24u;~@oevbrC(Ao z?Li0E60euGWoN=_Iu7oByLIV}dv<Vw_dSgdZM){!P-=tx(1T-NCZ=;oQW;9u?5lQf z-x(wpyt_Sea-p3qrf0u{{ohOOp=p~tzg@Q#-ohEZ?N9U8A&|8dLh6ml6`l{y0>6Id zRI47O^v>{oZ!Q<e8bSL`eIl>Ecm6wTXluppdoSV~(U3AZS@`RVF4+uaJ(J6Y%G`DP zG%>a}Dk4JEW~ma`axN%7-2ELf5J56|RMN}ceh&J$c((PX6U#k~J5C3N6n!{2QCor6 zUBS5-Q9!_r$%(4eueUj@#kJIK2Cvx*8oIA!%z%tZNjxi545q4W4yrq-XE)OZIC~8a zo0ZecWJIhT%@3a*jz+jO)krGZC3-io5njBsj!PWgpOWV{Kg#fZF?!y;1LPCldMN_& zO3)Lq6opSJIa7_6xf(ZFzOF*OhNU}(Ki?+h7UIO={x9SoPTg9~eE8#|?xpDh)!IQ# zhSN6{fa8Me)iwoX<e+Me^8GuyRoA}{^{deDub5j`B*mHO>>#V%Ow^<n|NPtRL&X#m zJ&NaT4?f5vSmDOku8YHUBW7fG_w>&_RiB*({O{u%PAI-fgi2nNyI^xw@cxSY8btfI zkWwgh80{MQ(=Fa?@In4lD}_!w%U@^r2hZP@CNCD~OJtskj!SQdGu-<JPCP1eh;sT6 z(7T<Es8<c_66>u}4IzrBRDG5)bFZ|&`9-(w?zziJwWA+2oR1#-F$e8tU4Pp!jM|W+ z(sZ81%`rvN%R$ke`&pUQ$jUh_c{}&68aBdt=;6Xc5Kv}I(jrOM>GkN^0tNl|dQt5C zcHfykX-W<)&++?=-)mL5T5R#6UzhBJs=UAoZu|5nnOF(5NtW>`t8=5$2Z(f@!?n1Z znf{fX??eXsh}=HCtyp^Bz;}4iRnb4S7Q>=`N0x1O;DM=FDnR6fe~=*XX=QzVb=~y5 z``tUcMYxjdUW>T;xY+vF{7ae2joDR`Uq+;EUkrJE>c>H;psFCEL7PzSe`A;Z<4oS> zhN_C&dHVhG6&sI)#u9$j2ys<p1=ra`pBU2Ff1wovvC`nZ6z+V**<Fv)_P%%|38)Ek z+tnqH{KVZJw@Yt_m3+2ytQaJ22!E?)hL!}Y%EvI8{=9cg7O2Q#5LPChTW5WY3>Fi& zvldr64^cq8wR(K9$_k!VL}`OSDj0bhehj7H@u46Acwh?YXhn*ZSo*DTqQU>fg1=0< zg|>O{-vPxl$6=tI*4G3P)+J^a3RFtWd{#G2&Gy<jqA$jxD-MQzSmhm`?|?d*?<_5) z>}LIFX-V%EJ3I6i#umfTA_mak@BCJN^-C*lbhN)h_4%zuxRD*H17-f4Yh(ReJMe7t zee+r-FnHsuXWokyiRPmW<^`ehWiAEsRgJm@X_bTlIHdU{-Us!xOB=;E--R})WXHN` z9ggNJ_qf$qc;}0Ktu0td0|QY(*kdTrncmi!(MB%_0-+lWa`a`01t>1>%ape!GB^LM zmY^Zbe>x~teUWGeliB5&<n6Lf$$?(?mB$Yy2q?H&@N*R<Il4TZPg`!_UgGHLTko`v zlrN)v(Q!Vx%GabX77PA321!){AoUm!TlMMV+9-H1+qSJ&757$RZT1l=Y`h=#jV0Uk z=I(@#-SDuLZe94-&n5KqlhCX5GNpezt{SqqYTEIXxQKYOVGrAq;;Pg>9JP_@lT3do zL-(@a{oW5vW0$)k@B@T}d4-m>Kf0cs-;5-gK^r6q5&%~WAY-z?t@%%mkotYwDe=Ou z6Oy$eomJ0n4!90kY7ZHc&%#wdfq!-{u+Blh94oyN$JymL@$Va_-vXtmnwv$wyg$c9 z$9D1Ep0iyktyF1+dg)8`O~^n8f0x)VV;<1{o@91?iWH0<H3^0eOX%UdBnDWSY7#w; zHDVwnYNyiuWSZSf9%mpz%@EfA-e`88+WugK!nFTbEbfzO@X|`$2je9$4~`yd<eHx` z|Fhsn?JL?A%6KDkJ0_+5HJ4w^I&f0*<v1F?G<dcH3{7T;&POOhPEh)HbG%82F7j<= zU&(kD5U}tqGvjgkie#CpdeKgeXW%vN+9-fe+dK;@4lh3vMA002y14vrvr%Sxf`jr7 zN26s6ir%$W#IE&1m$WIZ1TZ2^z|;Pks!=zbOKQLx9d|>DH<`+%cI{?h$Rk_(8cL<l z<?C(v6t0|Nji>@)1Et^5HN`ls|F>XM8uQ4-hEHTHdq=`h#ro$z1wJ<5O$HC%M=woG z@(O+SYV>U?YZ}trIZVzYOp+1Gy13`S9}-FHk~1-}vr~!Ms)nwu5vC#F#WuF~0a0## zx4s9NUY`n12bV~az;{3QtL$NT3R+G1!lE(#{%`LQ_99#Coy^(tN7M<WSIGYuO7)KH zuBmsyy)N-hC2qjs^?K_KP>GJdbnFtM+JIt1eRwh8sO!})@t?m7CjFX)@%pNAGJJDg zFbHFFr)$7eCSyIjrE~9I-gLhuq8$hwpMKUzzL;1gAN-yB%Jn0!0Q#y`U75caXw7YN zMCezJIAY}dmMX=SZ)TzAP+2jywkv<^O#Thd)*IKMhkdvI_PN0KF0D^U1M#^OFC9t* z0|i;$*qDhPaV&Y0JU$dJJ7Sz3CSeZi=0Z&N<VluTq}Q35X2}0O&~6kcJ#OOYCWzpN zgqq#Qqv2+t;yj&u&~Z_w`J*Fk@JA1|t|KMQ*{rgy)O-H	ZlkAr%Hm_1C4G=LP=6 zkjl9OorJ-pqi?d`MDfOy1}4xz?V2IVI}cnge`VH*^B=Fh^F3O%@ctT7>Y7p5_i67+ zR>yjLp9W7gnA>H{8I8Y~REdzQNa$h*iih*S<j56nbnY#V;;Hp>e7xw95#0?lHub!0 z;Ff5o_xz`wFsc%!<;6uX5U-pnq~G^5?t5f0Q*#<<3a@kw-}JpRRpu&MF~am_M04M_ z;mH_W_+_Wvjq#_6p3of({1sUAiN#i*Vulz(=biNwzwbhP9=WB)=2Fnu=#xg<1=-g_ zrbPT;<w8o**rh@oAGAc9wm92$x3g*eUHjl_qq-2|!Zknd;p2S5!rwYFafT=H7eL@M z<Se=#Njd@P%6DYxKV|$i^4_OYXxhE3v^C6FmgB(E`^o<2%dFl0h=w@ZVa<crk6f)r zBU>FStcC@kZB}?SxY=7`L6U0*u421YDqyM6yD+7V%=l~O_UI=FckAJ$BEvZ)HAHtO zEi-3lV`n}rb&yEk?u76C=XO!Bu=leL**>&yA-!h61Vja?$Rf%o96|H?aKzj4+m{cT zZ5(s@w(>htQbS37t8poDJbC=Hml4yPKnNpHBe_k`t8G=N>k_mOEMjn{pGV1=kVOyg zv^6?9O2C{TEsB;@x^|*}h{mgxUqb(xR#g`7Rtw52!Od*m5S5ch^l39np=eP>(cLgo ztbU0iKM0uzGe-Y>@@oE<59nia9lyOZpfDbWcVU2O^)&bX_w6rg{B_7V#LeL0;i6JO zjdGFfhiT;*3_%G3n3IosR<>%=`Gox+I(65^{sc$O#hBf7jDwe2;*tMAW+dsmD0a(P z7TOLV+Q+M9LIEG~GZ#7%!<%@oRvOaVzT*h3rz(`r(}Rk4<^mVm4+9LK{N<+%-f!Qt zD?ypZtp|wUpNNBC!4$5t4U)Noci`%>b(0c9T195JPOZIdM@rT{xU^u>`<hT<Lhic1 zIkVeS-WJ7Z9bCENC&G&+<l)>y-MJt>*)76UKP-0BSq&&}zn98ay=zPsO>`YJ>+i(0 zh{4O}-iDlS`kPVy=-QEWAC@{0N8~KLw>;2`oYPXO;4VSEOs<2RfTXTaSpIFHk0+I( ziYS^a_2IeTBfq~2X?3E&f5@>gQd^y!qbuq=>{PXk%(JS4%JTbLa~qFsmHf&|Wg}Ei zKL?swyUPUVXXRXd3-A4*Im=pJtT9@3HGb!>hsy_D?cDF?_rDnOHAH8>BmKXilTe_G zLJvQ_d^z%E>Q>_w-CR(Or<{w!1RCG<_FXaTS#)}w<Gr$X^_V5Y4H2)*+--o60=hp^ zp4CT<IOmjD4wT19y36`B6e*33o03*cKgI}%AJ-PX7Fc>7>M%h^n~RkTWsKU~8=XlX z{Vhz*sZ14u$Rl~siJLiOl07eQ717>8sA$Usntwb;V?aGG?w_@a-JTzPRFudKF;R96 zpnqp8UY)eO`iVH@NHNf)ro2W8aK5gC?<Euy6`J!2xGv*mvF*Qq*g-=67b>yZ`)$b+ zl9q8A69|^CoE`P7n@|X?$^wpR>xxFoefcv?$zlEEmAC%#ti7-Pu51Kb`+$AV1jmPA z1=Bj=q{R#Li~GLfcY664`{MqYf^Sn^<HImFVo|i5!{dySLJADRjgYFsJl3Un>Ejf) zq-o8EzRVD-W6du*Jk48<QsVn85fA?B&31WbOy;|F{;5Ag_Wrpm?jt8ld*lk`)_-Zy z!@XA?T(Hb#4+WKmxY*(iPV+9)v<cVE842M7`G@$h)7`tiz%7i5DApoZkMaua786N2 z3w&X?{hKl)iT*M7X`jC?HD#R|0kkDwYMb9OAYVt_(mEIz)H?UwL~Ad4Vwl-+LHhU8 zYm&8a=n-a&Beaa^{p|zu@~pR|Yo|?TLwQ^idB(8DV|iyNT=H;tTTWd{k+HL!NbU@` zcZKc@iiSX;_(Z7v#1VL)%v9X{2-`I>z#38GlQ=YyYCU|>M(D*QvLtH93Jen2Q~XOg z)3+Znk6<sv#mjp>+O}|FW%y75&D7K0ZGvehAy;+re=c={ass^c-gMjYuh`{ZWjiBC z$Y<}T|C>_KtX3pxB$9G;vsX|-hBZj~dvS9@$BI<E$#EFh3uY^!6*Waxna}VQ$5Qtv z;yX7csy2`BZ>Tc4GSk0fFH5U+ct@UtVp%?tI3>xAvE&PG*Xjs3|LPeOq0=d$W+UBZ zio|X;qlq?`c@Bdl9F}0IyTZF`uTmbFJM-z0xuYcQCn_v4wzoL=e_*mR5S;p#f>z3} z-L$j{m}LbkuSR;h@*dPhF*W+LF5KC#`D}RGNXuJ_xh<;PT=X*OI#m7P&XYHgW^G(p z9KA6}BfHH>xdsjQFsHJ>jp84P0}5d;sa*<S@rz|6>pS)^z_3NC=8bKmJnWiE#6n?N zx1Dpy0fcB}aoW{!D-7@Ha-c2e_qGspT$qhp0l$Vh_BYyLu}WMd>A9{rQxfO-NsZiT zGN~_bS_tA3{8Q^fO~5CxcHa-agn?P3QG2p6q(@3n&^ID@7D6RzHT>gD>%Q8Gg?4Jn z*ds=Vjln5Pq9&^@5?0bQ_un@4blp9SGFcO;w6a%~Xe;fCzYnQ57OaA($)pQPn)}hZ zUxk3-9SfG~sA*I5xr<@{?u2koD{AF>XS%+6*>&$Yrsbr8F&Xq6|270w<vu<s^j_OV zx!>PvMQ=}B@kq~M_{X0C14P&`WAU5Jk)810+7~-Evh21mmS5DZ@A<j#Fv_g&%7DTn z7(bid$~u9KYGfMXNQ;QlR_yt!?<XVTF@a7*S2WCj5Wi$Zc2{K0SH1T{)!NM{xJqMt zfVs|9o3P?>_)Ad5FQ&K*3==*Lf=V*>n$=7c^OLzxNR`IW9X^1)yhRVne+yWRCDnBP zT|q8ahypkKP<E$@L3=a7C_-kOXQnXWJfhv<{D_$Z;keoCLd)Y{B{@l^(r!uVSAGv0 zJ^x6v!Xuzp5tl=$p(Gpc)Cpq`J2l2yuVSM;ozI4)p-<h$sLQQF(;Azbe3nHRlsN<W zflhnBqMm)vzr1mzI@Qb{S~`?<N#ubt)CrO`DPevs{%Tg7{&r^QNiA40PR`G6Uy@J? zu1$6N-9NM$%~!V?ZhPuYm7H%SHKT*8tQgH+UEqDiwkYP1PXVAp>?Btc;8g?Cd3M;q zS*_zh_7p0x-eT<qkY(XD^~t)<_}`rt1k|cx_zKzPCP(JVQ{ue!`H8HqfO<#I#X}p# zk@@gW)f92wB)w(O*Bk+pk4NCPYe@R`+pAHg`jh}&oEAV|m?%dR?(h|SGy_)J-d3zV z0r-5Z7w=sI5hn5iYjNo2FyH0i_Sqw|jElq?rb|tWU5*jO(ms4u44He3`39%9TjmcR zDAvJ^{#8V1`8pBrI4OhLGC-eSCcenf!~H#Y1TUI-m2vN&G9s(s<A5aLQHflJ&qS-$ zjM7R+q56vi_1|8e+y9Ku4BQctnh}%mc~tUa08~4=e!yc!?=ECVrZc@?F8#!=;cB1) zUg!A&hICz=gD{fuTZgh1{LJwfSzxNW&ChC@6SHT>ig0kV7yMJk6rd5RCBHh1UM`_v z;9M5?h>L`Ydc!&s%h%)kHStEfx1UW!GMWM)YVME1C_!8o77Qu-9yPkStGu93<`c!6 zP>UUeLAZt{h(}UP7XQ;Qr|xcg-g|BJPCX?>A-7bTbEih|uRbOX=oUdtCR`+V${YH9 ze6~7wSOur^-AbDH&q#^dB_o!tM1c5~ZOw>zPQOrlp-R09bx2PJeEgR9fQQw?c)Hc! zOUv)9zk7is{C|9);tU+Hd=B_n+-@$k5Cj@adBN@fUvZg?2TQMRauo7q`Y#<yze|!q z-&UscDa|rp=xAL!2tWr2JX5(XL}Ogl#i`F{UC^mM0U-jTfBJv1ZI|;6nxPW+uIN+5 zE`!B2m<0<CKXd=j!(&>of%}h4zm@&ZLI`NA1WoEEW!T74E8jr7@C-kZu=Qpp$W<XS zy<q(WJ^8*<-n^Xk*G7}z5}7%=yF7#!9__9^5hw#PB|mnQmw#!ck6!7o;DuBqH3&c$ z4?FBow4&z>Yp^6J;9jXPAu+7(wSbglZNY6%kHQJMBzO>A{vMS1RSaBR@waSthK80A zY(Xq;$#tqcNnVlPN9z>W2D+wNP4k23_4h<asAJoQzd2J-TW-nc`ji}xNQyu7Ff&Nw zrc=}C$QiIA00g&vFOWLtessN{A9TV4xpeWVJQt3`){~8@699Y6<-_{}yFQJ(tCLT5 z_lKF!=2I+D{5~9+J+6kkBSznKRbRg*^3{I;i$ct~30Z7}#CYA*#~-BtnJQUe;veO3 zBnk#jL1;Tx7re2U%FA2abPjQO)@<dmvB1}rnDGd}M7tIV<G8?T_Q?GG(mSGVaFY8= z{j3N^B-ewpS-UbKPVS#Kd80^1<ZzPKZ5+i?7sUMm@gyWDZI#~z1YmxHH=gnGs%R-% z&5B46N*#Mom3>S7|EH#e;<*u*O%M2pf8lDzB|gAs)zA;-y2Btc@0s=J=}$=6;I$hn zv;M@8Izzz#10|2Rp^CIQ8Ep#s6*ihw$+PKuy1E`qWeNGn=<3+EZ>^N53v}$CYJU&S zh36|)?XhYrKEObW@@_W@v!Gpvm`*)_#taQnb>394)hzbJ1VsfwguLPfHTVa{pSSt1 zRaQQK@k`H9CxF<twfZ;MtExX;;S&4TbnC&=pa5}4bLutJBx8)BsnfD`TByr!W6tg{ z#<RIG7z*)|eA|d#PG?l-w97<$^UkR5oGr0FkxL>OA{_K^F92Dp>_vc{u(xbLnGo_I zk;Lh0B2=yCM9s=y6VbCKBHz2GR1}8OADEKuwFxL#c4$c>@o^QO3!10A`MZ}n^(>r= zna;PO6aQ1|Id%fZc)@0&%i8R@IWzQK-QAe<WWMdzi^WXfdq$`|4S+yqG!71%_x8i~ z_GkXGazPTLDQali2jU_;P#B_m0vP#vJ4FiMH0R5*(9NZ659CeA9*+$)_c~uL&57V= z4+UUc5}U`#jN%G&4;>7KvG#aRi961#XkHdo>)+oce;mSS*x8re+-~0sYNmgTA(bQ` zfD}tEG@;iAQ33bhPev@84CGT%%p%e+1a*4$1jpHXiiRs$<Z{7vEb#2mSW$W(RR`cr za^tF{4__<luDXw=WdaHNU0%?~H<^Im0tmwzqyh}F_ybt?1*jD9pcG4u0kT3rWLvZb zNerdw>sVqH;DSOnpXanLnZMj0yyvOK3k)oP4^WRgR57H?ivTAe-00fF`TKu2&U;zZ z=igqz@G$Aw;pC)YPM9lee;VxMM>`!B2g?gba)9j|)zDi%yO!aB5_{kyN+?J0mS}E0 z${i?%PGMe?e)!7{9=Q3d8^*{&CB_$?f?38}=HYIk+LtyeM;N2)(_Jl|S~hFVa7UEX zkFL*$i|JZhH0M8DJmGWPXqs#h|2H!zh9)8n(EkeM1iVWik-AEWo}0Z{@W8v0MsbXI z_y_X|7?6*JOA^Mo9L%kK1{|w~y@(+`y-}iI7IWxI?fUW8Di8{N)p*<8s*pq?UYzez zPM;?c9sYU<=UxU0y1n6%#piz)r8l>K{dJcC==+1j>2T8M7VQE<K=W8p1SbEr-dD2< zCHn$@+^|#Og(q8PWIL?w5H(@H{tkUx0wUt@?FSq(C`k(^8NM_WfVd)_p=r&(2P@_l z?;LGE+hYS)dhjgZBo6hYDZ?Rg`(c>UcoO!rVghE#jzdc3wL9DX@wb4WeEQX2#b+A& z(pC3Br7+?B{zV|$Dpv;3yv8_mIz&PI(B>_@L1+l~e!|&j2w=_%uS~o=STt^x>vfT~ zw*=*GKGUDYeKm$#v+oTNUa)UC^I4CLwx{ce#e<VR3CK7BpUud66drisCt`J*DD&wr z)sm<bEx?K@Wwlr2tnqh(H9@*sRwLkw&xmK^?oO*@E%d%%-rk@<P=9MySr~(G8dr}! zgaKS4RCVYxwNM*0?dOOg62iAHTY_qd0Tv%7k<LC7MNGD$qjLT-dB#@wyL+#BSsvV1 z#Ss)?g4(sWmefl(oy`_*&#h(FpT-FvD#`;hpOHaik~m6Tm^ybAuK*wlAm>G?^@Ez{ z9Pa;lx);<$e|3Ey+{k`D60M18I#iE6rptw(Ap7RwW|kqB&00z6$mQQ%Ge%?qY^gr^ z3Dy?6cV3PNqw`6tz5Ce}(_DY<63L$R?y1YSvQ&`sDjWq;!K$cQS5-w7U|RJ6KK$Ef zQ}i$)7`_Mg9x|kOAu#^;U!MJeO@Dz>5#!h}3f&q>t!?EFj%nByI~=K(Ft^~Sw4h2| ztbLHtHJ|o|;(waqGuI^<X3KtNi_eG@)|1DE8C!yV$5OxA<oL$qYz%8Pzr7*^^tLDo zKxAzRCxJVjh7{rBVN!OhDt7ZuBqQ_CAL_Bd&9v8}k2c?K{}CL0r&SmDIrG>J_s+eI z$7+$iW@iuG<zlrWp<~gcsKx8a%$#VN!I3D~e)#tlH)#8H#^FroU=Vu?JRibgl;OoH zdxupj=xr`e-^zARQfcko>^m8n@mfvk5k`Eq&GsA|o^}yQA-1L`Yus<3<#an<jz5hH z)AoqPc!ZG@U?(8%!qmzbp4$<WH}`(%6c^#9Jn-y+p6|!2l!creLT}{jlPj>cO$aj; zjgr>G5*UA4dh(p~<tJRV-9@Wg{{1VDt-V8@X@fI$QidhqKu0brj2FG1dGoy)7>I<9 z5ajBYqUtbzJ!bo+`5VJ_?2(>Y5!h}Ii(IBqd&$}>98xJiHw5YTlP)6P5LLM3=zf`S z(IHPv3!|7i29L&TI-R=`3|9%3_!uHg(1Qxr3qa~+{kUKudq2+k6gP5L5*~hIS-(?+ zgFu@t@lpJx9*9v~t;c4Lm`@_(nCg}90Z{)v`sA#8&!~$u$aZ}u!Qnij#BVN|O`^FA zYw$G3#QV=nUai61)D%Qw{r7+9no}LD0>8#%-ZflLi)7}bpZ8LW;BE1g3leew_#cX{ zNI@T<H8a%UK3BMPL>XD4xdGdEt5GVW9Mj|ROauHY7zr}f0P(;b;q2YJ&t`uvFP7UE zvZ`eCfw&iW^L?Yq6J^<PBhr&MzREsN)@kRZq5Sd;DG&y4g*K}uaH~b9Xx+c1X*bc` zX!;VuVTr}U1fBkC40uM!A5p6CA3!+!ut7MhdW;U0xi1V27o!iOq#$Oi{;Q}=f05iH zxB~$S9nSPTWc{T+0Vj)saAKb)258H$bhp6AN=}Aw4Tt#WU3g6bY!)adVi;frP3@uk zO^EV(Y;c9B6d(vI0Vy16SIoBWRTN5(P^XQ{;DQ?JP|y0nDHa9n8E`vR*ja<2pSvOw zmekGXwg)R3jGu2Be@{72IyeYCA<^c2|E&d#YbB96)^$&o$vtqfYniK7&Z!USsiMHo zhc*{{RNN-(qHY+_BpQw4Au09THajIj*lct-*i;LVzgGBfxFaQ%-&Tg2pqk7L-T{JG z3*Gyy;B+<V{C`HIID1i1ypLBM*tSW!v>rt`?n#LpR7a3cN)p0<o<6*H2S*0r2Kf|I zd#hrc!7cjvWu=jk7f-+QMLD&^OF>pdsAmRRNL_iE+R#-T<&Nx_%~pTG8r+LDr>Q4( zJ1rAn_4#yWPE|G!@KRu*YHcKb?j}BClJ$SDNw_xul=o1$C9V~&(y>i_7*MJ-izKu7 z%e7GT5DhUbn)`FX0U;svO`i5xbu!1goi>hd+eZ1;xA(+ak!0>1`A8@alfv%OWj)H* z^-?3#*2wvtvFmcewXOk59pa1kSR@IP>+Q5}aob`ZBCmS{NWORd%)xUaz;q3yrsyUf z3M*SVcPhx$uy$jBfA;)Jd^7Hj%8-v*RxBwcan{VUZYQ(^Ne<2wemsxYFq|?Nj+w33 z#z-hueN!^qyDLMjfkD+I%$d455Ua_|vDfwnQ{OB-V<d`_O4t!No|F^0aY%L7Eu&*u zY`hS12Q`+Rm-W;dx9}=RmJ7?N!?H)8(~P{BAFBQQmIT01Qei*Dwq}+R#|PN&c`BqE zlRiwbtZ0-#;G#^xN)M#1gZk=D!8*-eHgdj_9(ENm{F|TKh82duj%kA{<o~~!VLb2% z?#GYh&of{YWX5<C`~=m5drW^=iW5lp%a&QUV0ujuhrU)4BAJ*L;^sZ5=eqU}r~YWR zwa5sDXnV-g28d}}|5-)JlR(qTMw6asu*U1132zDu)S<ppf?=OpV<fzjdj+$!q9#N+ zJAblHR8;Z8vcvE%<%uQD+_pV^l>NcVkCc93{refmCft&{p4_Q!wD}#C+HT}j!zrCb z$rjYu6gQA@Q53cw!?K=7dH1@)CB;1P^?g*fCo8<#5>KA%x;rhR!g%4wL$arge!n&I zF<NfqSo;Y6;hQqA2)1r_JzA(=vm}#KOJ640ii*@~vpDF5&zR0G$hM0>zoeUy72qix z^f&x?uKyVQkxy4snILQW;VxV$@X}SltAQ7aN1~w6KcU|@)Op@>tpw(Mf2{i1GgF70 z(X?!h*NOf$J}OjR#k@9>LZ~(^p=hFpizp}F*zROVp9fu1LMo)czVR7Tw<GndnQ5jc zODM^${*!^>CrrRuCi^iYnd(oYXL-Iyx~PRWLnMd3U}VhWihgu`1<)y!4t*0SG>NH9 zdR!E%^QP=6N%7R1!cPw*QKtz%|80UD6LQHX)sA9Bam7*uBiC9?(M9qE!_S-Rq}wS} z?ag`|zrpAk(ZDy_Gj6l>?*@K;HNtrCvsWJ7241mkgl`8}8^0#Xr*j2wgP)AGv=srq zDaB5lh@eck!I+Q-=+nj$w2_%$3+juK6%!Sai1%%*P$Y)2aF_FFH^uCSR{148%0!53 zEw?dw>fi!Q3WZ9<w6tCq65RYPf}wAMt1Zn9b{*ME`0s=m?%g!N8#|6le0>6KJ|^pF zQiyZu8n_}dn<M<#sxVAb2*$;nR{Qi>5`&2k`GIJLPAmuiaavZoF!v45e*m}Bjo+r| zUMFf)DaL~(RP4VTp63kUm+>>E#-{$K;?bl6w7CXH;G_b=WFBQc#gVN;4&&vJldL@s zjbOYh<G1}lq^5E`cmuU^J$qQv>2*=8C=))`;br|?0$P3NRAntxpZvmf_8o7?(eZ?w zniHKl_#_5@jPXTLSC!GU@;6Yl91rkQk&78g7WHS(5jP^kF)e$n2xq5RGJlGBPbwVV zN0c|x`KiS%4Wpi*3jP;eB|gjACxx!%I|G<p!T>d?s+R+8o;#T51}oO?9&yrTXNQx2 zl^loKfV6UDeGH@Y^!4-@(Y-<M`5V#3(^jr~aCnjUD;$p7i54CAD~ydhm__D<o0CNC z2I*v{)oYuU1i%%=uT3su7F{|mvYnF;P0K5y*aC0wlKs#GlrfKJZtO0w;Y4W8*1LK4 zB*2mjHn2%yKiQoF&7<78Xg-CJ5p+GRNY~|&{7>6hA%&@+l@ia(c~dkODXT)Nh(1p^ zz1yD@s~Hyi`z`X%w-ociY0$?@N)eO5P%q3lwe5`5<xz`Kaj8R}$h~VqUZ2i$fud1) z&A343dD|zV6Uf)@eNun!IJ8R%!{X&4eDcX+wtQq61`Ho9`3ZVa4A-E3om3q<23GHi zdPx4wy4c(rKz(S*f_Q*ouM9?aZuT-SR=lNxAL{x7=aVPFyk7--e2US-9Zp+j_JpEC zL?Up%*S52z`9OyT{0D5b*SCi=EU>8kmREWd^e3Ul#k5J?@RieYO{6w43VQpaf?CWh zdMHh}UBcMO($y-Q!VyWkA;}xS^8@rNU!7HFoay1Up71eK&?AIIlNxK1W3TDq=-Xe6 zRXteCgkP<T^L)PA+8Q?PdRn%l$lQrGP>gbnOq9=05N>ba1|PDJ5x8z-vIIdf;l-AU zOvzLCsLtpi6&%YuqPb6@l?Z8CjqQdJ$;pBGl_MPj#Q+aa$%Zb&d|}adA`^)nF>B&F zrh?b<D8Ftz+S(0n6eE5vJmASPr^2mTsHKKKv|cc1%Pvnyg)$HwcCP8JnBhbn5$ci( zUguPqJv_WFtRxDMZDkK9mK-{soaQM6QE3ad@IC*g^GztKJql|O+3y4>;&4CQ01<G- zy3Ys`8j?L`uA+4R4dzz1ICu4$eGf(=ELR>jXUL4)mt|3Hkwb+Ulgw`3GCwN3jV4HF z3>oi;K>f|J=}+|#dIdNaq2o0zNHdB1B~jiBT9*vd4i|NR!iP{E(d|&uJhYHUDZhhT z-3ShDRQaX6;DHZkpx~%e(6v7ndwe+u%Ow$F?F;4bQt<S&xOhC23WH5bLni*9P>?rR zyt3+BuEedtZnZVMr;!RqqDv!Jg4Xi9CYUxhw-U11OS~xr%f{7auIF8<<{J+<p1V1d zUG=n^{pjlliUa;2NJOpqgrSBA@DKxZAdNg6VQiAL*5L>n@Ee}PC{!}gC*^@<m^P3; zJrF%$0h}QUhF}SK6?8FDPQFggiT3V}*_HqDE~Kz5Nna?YY#WMe?SA*2DV4sy9hnbK zq0MwwhtBtw_ympPoIzEQ6=R_AIp9relrd_kGsikuS>qmaIx5<Ym9IJS@&0abl-T`R zTKaQ_q2d3Vm}`D$3`>7=Ti~|@Z=U}9Ok)zW1C?h8bsQ}Ge)55DLRuj2-G|3)WDkE@ z_LMhUvUIiR+Q>B?#53)oY(VYu?0=bz8>lxe-yqH>sFenZ$G!=p2@kAlxjk}G@H?y- zL12C2U5ttZZ(v6rtn2p9TjDHdfp+mM7CBY}<q6{%)-TXreyQzK2#0$V@a^9_F3LuB z^RJcl@X*6q<{m|6dpd={7c=Y|UK2+T-Lc%Jvs%u1FD1EZ?{I&Z>^_;4e-lh_-{yvr ztlFvC^AT$i6ui6w4)N^D7bDExk#mTFZNf~ep{>p*WlL%ld}%<Y{|#|n3V+rhO@{VN zUPSHBvwU<1zDnb_&M_;yOMkAUndp;aTXwe&a!#hy%7Qf&EZtqAxnEm&z$Lm3v3N;h z4)0+Sqez0IvDE#h$nFT9WqF)zU^1%IRiO9nP#ki7@{MF34uxnBoMPj4`B3A0YV@%M z)#Z8Mp|Yz-v@6o+*foMM#OzggZ=iivdgT1$H<ECb(zxLe`}!CI1sKN(0HRBN)N~cR z2(TxV@WI#jMdpvN%emlEvs&aH3k{Q~O=K8sJIl2ZF5U3v2h5U~K)w6eH7pSN7LvS! zTFs+K>R@vPCXL9AU4P=VG%f5|hfi`z*216%61BO%5l`p4dSZlKaNXGqOJmX_J41-> zP0}CpPdXIIn|ixDiGN)qj_KrbtF;s)<L|N&%Sfa`%JpIb8-<8@awFha{|X;_F((We z_ez&?{ho!~S3(L3KE|z3{i2~LE|(cH|L;f2NYvU6JW<<nK6VNIf^+*EM8_i35SsZ# z6%kKz!3n3K;L)TErO`%TBZT!cX3l_Jz+~chZe1^NFB(OW*wIw1zImS+sqf93*7C{) z2k9a!CZKp&Fh*o^OyHhnpX`-=iw}e^fh?RGC(!$YERYwRCcl6L1B$x8a50L96Y|DG zzYwR0csyIhH~K3>E706_%jS^?jBCr;nqF`Tl#Cj>Fi%8;!EfPMo)dv_Ow9N)4oc!p z1lNTJJ?z7~K4VlcP~`scD24=Da!UwJ%O^i`0{8V0-BQ9+57*!Q`U6J7!RV1rYrH<9 zT@SbAEX44MU~Ub6#`OJ9>RB|JFiH0;(`!IVLY->bHZ&eOR4AVDO$IHA<3vc6?fGi) z4~al$wJt+1OQ6vZ&gMYB)Md^IEZz*Us+nO%X>REe#!3>jU|a-xftE@t<FyINewHLN zdxkCwSc*-Ak=P<ARc+ogx|a}7^~m~J3<-|1Z6PsA!fK7Z3ciNK4V`3WWsB26kOkU~ zePA^M8FwJEkn+{Q<{a&55d8^Bk#%v)*$BCJqu}n_yizV<bfV0xAoRfsj1Ng(BcSRY zJ;Qj^_ZeO=4LK0_7BIc{toE8}vKicn&i9E}%T?R{xmFrD`A*oDdrTI%v7+nZpo0Rx zb&Oi#;J`}~MrtpakZ1mW7Uv%IOm5*X<ufI}Lo&K|qs*Q%IbpH(&_pquEqBY!8lSg$ znQ$Z7y$0ToOijL+8HtAGFo-1WBlm`yOwc*k!_rM5O&Aw<7Ubl<?*r)2O%*9mP49f9 zckSr<p|(h_p{&ZWQ#^2Ttv~IpIsU*&mg8t|bEE5Y<w?*(=^&&&?$;OsJ6Pm`H#%z! zuJ9VxV-p!o5`e47b4YkMd&Ls+Q7SKQQf^DoUgbP~C=Tn@CAvrwIH4ux_>UB#OB(3} zwiB9mR_G@;MBMC{g&sw{0|<$r#Q4{)`#T$ngK3_X6L_}1nazpA?i5jY;VD_OUD}6H zHEco6FiA*u4W$l+9ukDu1Wev8Ak92Wa~38r{3~|iWMnMyObDqbhpF#R>iyK}a>UvP z@Vf_w&k%U-#WL{%kuE^VTK;%A#o!FjcbQrcVnI*CKw+**&B^Ul=!e6_=JS|wK=5Hf zyO(J+T!jOo(W?{R->t5LSA#ut4+ZO9Qo$kpICA6SnJ&J;92a56LJZTcaBiG<w7M48 zILzP<dMb=ma3PNpm;b>@?w-|$vnMMr1)HgXqVFzduY+;e?-D%wf{6b1wMJ7ycK;RF zCFkyY;s*_g3K!utFH=GU8gix2f{3GXkzYB{CQS`lLbEU`!yE=2uza7t@05d|CnPl3 z*q@Z7!9&G38Dv8y@qEf;6Vs2jAC7I5ICz@esh_-%q<PXBNKPHkI0x1F-c6S@-y65d z)2G+96;pKR-#-$Q%&~<~@HmⅇrLSLlYJ|txl$kL4Sff`Ks-f^s$PwWry{mRv_;W z=4AgRGlo<sjeJXXfTBNHG>-{AWWz6KtRhv9isnMJr=k8-jcQ8D?kicJf`FH$u(tf0 zGb#cS_j$b=VEnoO|67P2PK3JhjTHw$kUJ&J1Dm#Zs3R9r0UP3OIL6jsI|l+K{lYbn zKqcW>XrvqXleTz!A(tcfIf1B&?nltPUopak6dK01dSCVgbahdSc83(`h)vNIp)k9= zRMRyS#m_`1^6<+EK)O4qpLOt20#Cn5s3!eybyqC$Y*N7N_KXK|%n~@p3~~FH1*gH& zt|9Wdy<Z)W_~p`p01>RDx$B>Z0`2LeZPu&6_RP|?q0eX>Gm>YVbw>sg?@u;lh4`R` zWTCe{gq!Y!vWHXhP_?}f1?c6~<5(E4IdyikntrgLMg0B1qYyOmHV@>OE>nmYWm!gU z?^YsBH8BACU=8M;7;5mnds>%V@c!*Eg4&=~G3d@|fs&~G@uN#p8k=;PvV0=<Pvp>b zZHnA&xyMj`4WU~P_zB_MnVy%70@cO@U`~vU3TKy~uy!k|3nz}wr@?wF8OpP~r<}nO zDhp{v0<GJS7}8g?c{58XGidPHHL4Z+g9`l$v1gfp3FxJnjo1h`*fV>vJ)2jcJKxcv zQh@34aFA<(tWrl#GAd>cTH5^|M$Y~_u*z7f13mV^?%*6qGZBul5!S~yDA3F)b`)OW zgXgKsTJ*bm*e)IFPG@44KW+9@_3nl00nTY-@_{&OGLV6)O<)ija+U>{AX3z2N9^8L z912BvaE=L0xN_>pCS<b%&y2{Ffqv`F)j&1<J!WV{H4{$6fCydeOSe!bGt&&PUJcDG zt99YWjozGf6V8=ADTf2iYW3mSr6G+2v;?6+;4)&hB3y?KGMrYexVhU}U)=#wEOiN+ z`%uiBepmI>>1@=}!s^T=^4B#y*iTICklO6r;<RXFUd-C%KyxNlU}g3Om%DScf&L-n zJtwx1;~|HU<`26w&gLCZ|4g4`y209(i|e}-c=)X&*6X*V^nWw|0$z?Rn_N%Xh7E8_ z_Cpy@=@B&T821~bX65qM;L5lV4t^TeWb@i&L+fniNL6Kbj_SW5?2K1~A!rEmD~i0? z(J^?MFbB^Y$OB#&5;R!s?Cy8vAB_)#!k>~<FknKv)r&e5VFV>HNrI9^UO4V2WzGW6 z1a%00FZgXGRRrvoqYcuOkW+^uK)x^*EXu^$LJN-!q0q9Z<6XR7hL*_1Bmm4lAJB4Q z$9;cjZRK3jF#j$5@1HxgEU{-`+0M)_AF5P`TreWrVI)X+i&?D|jimiSX~1%8d0tC| z+VUUI-D$o+A_mAq5uh-qD~YzjBb81p1_;FhFvYC(R$X5H)A%nuuK%~Bvby|t|34-T z5o+#s_H>RIV899dc?v6&W(Hj>*wP7W)iShE0Bwn4$drrJPU}K<Vo4{DKkDh4K+7ed z0-ZR&z7Op$0(CDV#H1Cc7#}0zCCLws8s9)B{}loJF)Vv7gB+wlCtC4qLOK)DfP8?K zI}4NPtQ!a@(VNqfMdS3@5^p3R7(sW*!NPc!4)J5a!_81X<jpyk;}?VikApendkg&9 zki$`DO=qL#6O!PbtP?abiD-BN&%@n<hJ<D9Ou?6mm=*K5)prVy&p`1~|2*QvyxmcH zWp>6Bj4f(!&<0BQD?ividWK$rTz&Z`8P4+^IgtBjh+}t*_g*>sY{zC}+n+wK-*;!t z@y73nUtI-dU1a@l%bbX0!EkapoqVjO{$ai=#KW5K!hXp|VHB?9nbJarE_Ol-Gn zmt;nGL%NSJwhrL3ou5wq%B}k^<=;*VPC}t>0nuWB<!X#LH1ZfsbGsml%f=)H|2sz; z;b2HPIt&02yOMKxE%7v4ZIOEWF*+7d)yGwB;aAQTqIkY=aG8A{X*Oi18-dhy?eLy# zKjippVwp^cTr$)04#a>SLyF}*G5?fx=Rg8ljwFNlzNG1zcv6*Mi?nPaSQ)p~)*FIw z(8oPSNYw&Y3eB$AQAYdvAVQKGSD>raiOULCPS+16aj#myy+MJ}9yq)Jy44|WaOVr@ zK!;MHJU@E^3`ez8R$wn*FikoMKMQ(l#fWdm<AjIs93MOo-WP-Zh=Pu|Naxb<Q(_Z5 z_fxwvKl%M<s<Q}H5c+mBkpDu+!zavtF~FiA?JTC{38`CxzzMl&g=f3CtZWN4cb(2K z?H4ix`hNn<BKQ*-$5|ouLES5U3NpVF&LcRY0H0MV4HNjM!%+5{P3OVO5x>7IoB@Z6 zpMm05W(mk#3ni@siwV3ZlItamdiBRD0`Li^;6a@g(N0G+;|?$E`dNY8$j8H|jdcs4 z5c$|qd}nV?7{8~2^&aa>{rcWKR}9v<+kJEKm&xE%ee1QZcPSX#(9M~PfaOFUbO{Y9 zTgM4w&HBX6_z5qqZy?nh!U`gRL1#7DqZNxFN2Zy%EqyX9oFRjf3u`oFlPg53&pEvR z7>I@xh~&1u=dS#ftV2~%3%pX6xjo*uK{RucUjE{Zu^l#~n2(a@w7^u+fjjL>yhZ;E z0&>+LBu$u_t%7&+dv7y6a~Zy)Lw@gT*jMiuQGXR04(j74zmkAhxefOBquZQoTdt6( zBqqP(e$J<epaGye9<+VL!TXcI-SUNZ0fN^{nj>XFbr=ETI&?@q#rO<li$M$;cON$f zoq!yazjN&Ai|95K9x{M??~e*%ef`G4vVj-3E%1HLm@vSEiGDtoDg8R7vlW+Xu%Gce zF#Q#!^P#r72zII?#z`)Mk_G#!LN~QNiy14NO#(J0Y6Fk^X>aBjB2~UzHCuPU*JH6< zKsnbjKY`It+2*FgR)`+A!|&jQ4K!dcVg8Oo$%~y0M;23OXzMfiN#kXUod#G21Hn=a zIM0S&&h#=HC+pKinDcP|WXKh1#EvT%pE$jWFVAX~a#63NDS_{Uo_chtaR=V`L^^o5 zj*@fdC*1k;Aam)gsFswZT(-cm5nhE3H<|4IlY=vDt(xsvj$}rz9j+Rk7%%8ZWzwe5 zKFf&US!8+6Q;YP;ZaUa!0>?NJ4SAG#^tY{q+d;3_Ft(XnGud!_dwu2!tet4I_V{V# z-;+~+QFWrXh~wev1CR)ugc{FTOzBmn=IO_Qzs)@^zI!TJn>+OjyX}mZexC!&yb4&C zWd^!mM9aAtesGbWdVUH1z@4?(in@ZnPf`zR%tU%%Y^C;Pr?u~VB(AUT=_E68o?~6a z1}HC&iUK;H4zAYx8y*2BbhMxa`08esvSwrJu4t|yLTZgmE`r~V;=-#vC-B4R-jM~G zFz3MY*h=<RLu|0H=-I_|3p+uxSfEh|qHBqFQ7b_r(@s$L5vUb$;EW#S-JG`njslV_ zj2_Aj)ZEgifBb9rysRH3Ck{)=G!WeP6#;tG-kn+*d`fz-^W|Z;uq16+C}gYFE`Ig5 zY#j^eo}>N|k1vt8PBJXseLMv{_LMYyZ;X114Kj+H_e~U+6#yg2>wgEZ=s%{iITR#J z7#qR=u)A9VJotQ)Aa1bKia1=1X4Dz0=uwWrjfA7%JjWrd0<$ubH1R^5141fj&sP<& ze4Pi49!J*IhnIp6X+)t)!X1u3DnPaTn-}$E)8O$Pg(SvfW74oM?|uS&$pr9L@4Ed% z8+;pOWMT903@j1@_*Hm}IC}51NQ>rjF<k5@!bfVCNP4(SD)Fd9o!s%lnTF))2k1nM zN`AQKTAK9pZ~w`Al~Cp)7<Kyr&zLkWkzN=cC~Z08p@rP-s>{tu{}uGS@?fpNV&SlC zp*rc3t9^PLj}THyT(q~zYC+*zwNQ8{seu+vBBSLV=WErX(k3~aqzmV-f8A=ZAGj`! z@Geu-M@UH@MwLyfT-cC+<a3^&e#}yT2Ll1VnhwXg@>oORM1Pvg$E7bS0V3yNT#?QH z*;62H-Eyz>|7U97IkCUn9MRX$7B0>_-g_AQhg;dkCRVyEf@C3Cd-}op7z_}D><WA* z#bug_f>lM#Q2x8#%pzFBM=D^XAN{hd?i0i+qu|U6@LJ(-ZuN4*Qc4dEkz<zuZ>{<l zGxvC*rvZg``m!obsM5f4J4^h{SRFjVTN_jqW82R0dq65oNb3WuV`1viB+=d&?U0Av zvk|!2(Y+MbJ27B_k3vZO(Bh~6N@nV~d^c8LTEU-u62vIy)%?R_bv2%LP_q^q-1|2` zWxSZe1y$sL@is?d!Gv=h$oGJ37~(vY9*~)LLMyLX51-F~^SnWRtCBc4)pZuLG|X`Z z<_`vu9%2ugBFYH5yngVU>8O<gK_%9)V}PD`=7B1SL`c`m2wYc{u!}@(E$sBzZBw?P zMx?qb`~&S;p_<cC4}?7&cgSpS0k<y1;e=7=!QPr@3}ni;+X(jGmfNhrc>a`RamDKr z$PeTD@<SWfqDi#^!XX{_F3FI~AnJ{t<o&YMZ_k523F8XqO8nu;UJUhkoWxxWRe24I zJmH--DFVdHln17p1`3;h<}l+yv~O=`j8+ukc|Y2x0<j22gnD^Flg}5}w6jgw4SO)@ z!e_&^BL1;fc8*!}dU5A=Uq5Mu9B#znIl!_!50?1}7GLuXJOb#UM}}}8H3WG&f@12| zII%fy`A8bRln%tIGUThCzXh_-LFO{Qf=|q42MjdIC80MEWNeY&QHxXHubvgp%mc5> z<hTnrjmZ(Wg9%8La%l9%w}_3&)4+r%RjTpKA@(?e{K230XXeOTRI*9Eg6m%n9XBzg z3jAHr8s#D|u?=ngG#w>NkHSmGIJ^@`qB6gqJT!YFlH0+(Y6s`vK}OQ}Il@Ql8c^n` z0N*(f`ElK(*C#NwHjxZXNW-@$Us3dMoX|pRUD+}4B+qbY&iwlBt5w&^o5Oqtb{0Y2 ztr7<N-Z0tYJRr^6GngE+%`KKz%E>TNHCm1)oOSk9PB-!zH(=lCA^m77l+=nT1-m8# zS0!py7P{oPYE8|~J-@Oz4D+8tezCz1-{xW6S%(F1kJ0lw576LG;*6ji%flV8%)SH8 zJ!M+|(dBIs+)CjHB}Kw{euw+>j)m&rY-Mf#c-Bas433i=Y7{uehtSKV{HG2C>QPGH z-#^BN`Uc}T2`x0zh4!z)!hR_hNXmtQ$xY>mZTD=K2AYy7EPaVI9!k=A@kt{)hO`QQ zVSjUvEbWMB;09dQ@MGq=cf)A^6kM07;Ej6eU)I7PkN|Q%-QSmufi6wKG^H*lb0}3E z7aTi2gI4%}EH+BkgNHYUfpHz~TqOFVs@fD|+pw3g>#(Q!>2w_SQLohW_+{wRaFWtp zO8ARl1UYFH&xug~zmBdxp2_u%+v8bg(;CL492=&|+wyXd%Iu6JDet1K$BA<!X-WDW zdD*-iiLn!tepJqnP~N75lsud)PD)6LWT_k~h4NP7ckk@q?X%DQe6H)huJ6lrKlk=k znclJZ!<9bBt-Dg%%eJDYP#HYvb@-)TvyoSVf&8)igW|_1?_Jsp%Ge0;r7k|NwO!Ps ze*q%2IK&E3cfp86dk%@+E(K0@yJvchU(lm2J)q#@gg;7RXXYY9OJv9DPT|e|7+cz9 zhJ?btZ(5aT3FBW*7!*g<{pM7V;&PJ#Kf+@hip)d@_j=1A$oQ30tgv90K)Cm<k@D~v zK~RTldN!N-jh+4et7Kr&;^-5Ko3KzJ?=mp>%$X{&1rwZO9ISXq!kEB6JOh?-?{(eL zAfU!7c-O0?oNH?8Vq8<4TmPjJQh^w1U76if^Xx{g)068TOvE@h*yF6gH|&gngJ!<p z$mk{kzI}gS5qkjMu@kTt-*Q0zZ@hAHw_04@3ENmWT(jb^c7h`g(X%eZSp)1j$WgJB zp{1UV5D&N%uJDUC_uJ_w(}O%Sl*=@roiE0aEFcXV0S@pPR8#Mqwtt*}q0=?BEh_^U zp`g7abWJ(rsEoXIq47!3FJ<V@T}eSWH>Ye3Dp&p<o2a9SnZynUaI;J|{@a3dF*B7P zV~Ql-m!ECIcxQDPW6Gk1w+WWhAw_u1dX*0~%^mHTo4ZOipu;LTj61c7pI-k{c{3^8 z36kx|P!2}77_r{87fSwCj5MCC^lX{_Szm@@Q>T#fKhgZwh2;5&BcNvGxU11w8&yd! zurGa1f4o<qbJdIwhXRx$oY+E!o>P*w@$v5lRC)qlyEVyL>(w!KUPy>e<@fk2@I;Mz z>eYAyWHbE2_jJ}j3yMyw7CWtw$ZE@nwC%Clq3eIwX428u)dz$*AqG@+{;x~D=Rk1w z<MJMSTCThE^|ob0mEYoUssLOG6;H1V$DGbn%E5JR^B4FgB5=_T%9_tQYkJ0gaH$#q zXB1CAJep+Y!;q?D22A+Y&^eG9f8%s!)r`R-YCY(AkV?#sC?VNjS@!%?Dbp{Vc~F@t z_>Cbg6)BZTltk;~YMw>4H6Gj*LWW@d@AbWe2B6ol<tMRE6UDLxi3N1c2Qh@=%F%XQ zF@E*=DdE195Rw?js4cQm`^6}e$BYDnM^++AMZ+r9hr!R++g54INrN&8E140PZ+czY z##xsiVr4r~S!MI|I=T2av$!@K8>z-oW@^H04S*Wia9O&AF>TUF4m5UEIuwZh;dwBg z@}GRz4P2j=`rM{~DY_6cCg7!_Wrynazv{n&?q?$f`=~)FeAT~_9O)>!B|aXoQmG-F zmGHHUjWUn3JZSuX9&%-59amf^gRhCrchhDLoF4>QE#X52B^6RrXZ}ff5s;q$EcR$I zs-Fv`q(f_g^D%STazUhltWhQ1B2KnpSu7dm=sSLt4&flqLs3K@P*+O6uvPi_{}Q0P z_G~nDPg^*Tud^XrVTTN!JkmM$?bV#qw!{M((3%@Br_B*}!Aq{3x!w$rIJhYI?1#Tg zNfVt!S4PJ`!r^$Q_%ninbPIF2k%pW@Y4R84@m%jsZ!#!;?nYFGQ$@-K6_#XZOB!pa zE%W`C0K2=n!wX>`L7&~-V2*gGlG?CD{)7hDw6cNl!|0x@5HDP*UezLD*HmJ<thIUM z!g^<6So6eKFZ9R+<9S?o^)?Cf-9TPdCP(@naFi{|NjhD`mmHxe33;t`5I8c$GY5?n zQ2212igoA)V|Bg_6c;lZ9oI&NMBp4%=jR39x58U3?ZCH(u|ZThXC*Tf<9JS~t$#st zQ{5glsF}r@`{T}C63Ibe>vgJY66=F|;VW)WdipW3!l$^IWS<G`{(z&>(T+6!2IG<d z%n*P+)M~r9wi=+CC(uS08&zVC@%5aA@7Qu2-nTx5U?@nWvo>1@xd^Dp|K&JFDF+^- z;wIV&^A<4g{A0|gAb&^Xs*jxGsN+Bm)WH<J#9EogXn8;}ub|r#*qJmzXQNfA3yX3b z4c|lKhAjbEgHYL$3QlptSkL+t<$cIZM^dM@v=(#c1f4|@Q8}y!*GtFR?UBuvf#2<N zH}RSpzh9x{>f;nYPf3HYz&9`yP;e96BNs9S7Dg!I%tAAmHX~;QygNvDnYjPq+VYd= zZJF&K&?da_@K3^TCeqY;0e544p3)>_*r>cIFF0BB3fahy3u_qdr(1&mN`ttAZNHEM z#Y;K7U^iIJ7?Zq^9BLo_Trjzn2%h$bEs{n(jI~cO!Ex|YLBY>x(r>BSlt#<Yd?l_5 z=IYIRu4ug;P1d1$(oQ)IO(o;#aDMDcNw2FaXaGqJ8_fU?NN2yZ{fE9@QdGQ(F*BQ? z&ZIX^DTRSPs^*F>?FN2r2#MsNZvZpLN5-2Zyq2hBSBh892)fk8$4wQ*>fT7zlOQ)? zDf;p2wpHuamA>zy%I_^t&I%N&oc5~7m37Tb0j~TLyu)`T1FV~((enAxY{aUyiWgD` zsy_(*+>yYGMYX)~C=wXzMS>)0WH;E?vNtJVNwczYO+0wr012z@E_l;=9Osrnmx4l2 zZ|QZ-j0_C}7Shz5jXp^<YnUFj$Je{EW-nW;E=iQC*9CypF##hAo5>WAp@H2oNs`3R z5|x?&N9!wB(Bv*Kn>VoZNm@}$!jw0mb?RabLJNWyHv4^*IO=OYHJG|ULzs9o$E6$% zIT?;Qb^Z4kVTPa$T%z#p7EY&+;AsJa0m}_hu`T`0<KA){T;w85)1Kz2KJGq1n5<2U z5#}~3AJN)8C)ojed<1Eqm-)GCc;TY|x6{$E!dNq@rlo01@vHRi0EcK{t_p^0NHza4 zwOFeK*#O&ULPrh`oahYZo-pBqpQ~a2CI{MM$K&Y^{>SO8HJH~1)DA5JY9ZV8NyLNU z>)(gBQZRbY+qN*I9FfxX4yy*ZlPW(Gbkr<hKFEMtTw+gck;~ZId4rEv;GxlcLy|a_ z?+CRw{7&Yt?2ay5lds6b^QIE5`r?+7Y*JiXbi&i9FfP}S#BV0KIqKZ7Egj@2&Dd(W z3u1)ah2)B&tBSCe*cXT0ir{tuN5byrbU)FvPuII)_TV{XiK1ceZ><Z>_d6rVQqG=F z{+0U|3(zzs6{{T=f$REOp@H~Pn(D%p^((yYSG(w~)v+boj~v)w1V?RMF@YNlsXqxR zTETaU%7FLoE(ke*JZsPe;AO&qsN?GIJfEB}m&PPlcnZt==kuPLcKbT$);O#30b%#> z2ST(VHL~~T@yc<Y%$>$;(2G1+-}C)T^wGWp4K#Vo${`Alj-FU4DITLA*bB#q1iL(a zSe6BBWV2)7VmYtml62fq9z(E?px}~W@Q%I<RVo>N>X^R_5x3xn=P4ev#}`S1UX3D4 z*?iKJJ>JY>F^5ZiZNze+6hz?FnOczN@&Nr#F`Fi41KO+5%~Ik!_KaS4CI^ON?&m5k z+(t1``*B%<lw^Rl_Fvh(cdaHsY_c0EmX`)GpLEY#;(dQYotN)hkgQdi)rB%DRpAO= zEi0W%29sRUSpHP-^Obu;>Y$lL#ch9d1!WTkGhzEvO%}=U89AiliaJlBINV@Bi-p?F z>AGuTg%H)zCmD4p%$8J;E22~=LFl{&weu~$tKWCMVio=W%d;W^c(u-jRnC@AH6E+4 z+EaT`9Sl>e>;=9L;XmtE|6B^kfxv>oyALicl!2r|4$-Ei9fgTW;cr^2$rHPAF}=Fp z$Wl)rRNw7IpXoh!8x;-<wQM8bF{Hq@)wxgbw~$*ygPb4w)y1*WIEM6Irc#-x?{==z z$SoA-43vJ4nB?(^Dh`WviYIL$H8trK%4WfY_$hX=qhnwuM2Lo&p{8Mxs*f)cvcPy_ zRmfQehZWa0Z@c_<ctN!?!E%k_<&kP;aB@17xps962TR8^AAvLU;EiVmUwYdOsg7)B zAv>GG@7n##-6%NA9JV4?xCz5dSKm4~nqc~{t^~;2d1ga}iZd%Uo0P+wHvV6Pu$71h zYZ_`xoRR}IV%G<2cfl@Q=Q}W__mQWf*0458>$1{$jZ7j4<T+@-L@LcVr`QD-!#tLZ z%%SE&qFxVS&7D&cHdPl(WTQ&ev<?#>HkJ{#u_4&Weq`+vD!^!Ve%CEE&8tZ|r&%7? z_93eJm&@S-f2cH;4X6H#FJ6`Sf;kszH2qoZn=kt0AT&>DMqRABSy7JTwro1}m;v_@ zFY&r(Z-@71FY93r1p@+!x{{11GC-6k=RBrTfq=xf!0t$Ve<}aw<jHyoL|DpMZcJaT z_^$%-_rJeD+w2X73BK0ajIO@@RX4zJdHp^lgyN>Mn#N&WGX^`K%HHl{PXo(Uf4B5@ z!Kv};JCKW}*hf2A?t;6EmVbt_fhGdw+xX>n1LAPcWb(xFRw?(}**(IvWxKr9c|$5) zb9OWw%qBGC$K-wPJ7h{vLnCpFfH~XKk?oe=h$$2`2Dm|Y(hPC80rI0N6WnFK)e>xx zpHMz|v2$+d-Vd)74I4Cugyr%??>?&%!p0u#kCpGl>GT!^&<|2m(7-IF#qIP>7d(jk Z>N?4idBfXVaG4VL>~its)Uc7{{{yYF=AQrn literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/misc/tab.png b/src/main/resources/assets/bloodutils/textures/misc/tab.png new file mode 100644 index 0000000000000000000000000000000000000000..4226a378f26046fdcde5bd1a756beeccc0d2e33c GIT binary patch literal 277 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1SFYWcSQjy&H|6fVg?3oVGw3ym^DWND9B#o z>FdgVk5gJu#mLK8rVuD3n;8;O;+&tGo0?Yw<T5Zg7o{eaq^2m8XO?6rxO@5rr0Aux z1I4>NT^vI!P9L4($aTnphvB&CM6s9Jd%i5TTm1jk(QuKMNkJb3G#;%Lykq%BGttTH zWag}QDS{49)~q^U5W^_Qxa-{~$?(_Q1?35m^BQJyE?D(Cs<EPfW^>^lS>4@luBvJL zaky!H<<Ot6+Vv*ez56a^C-xQQC-#YYzbiI4-|w?&=GWTkHf--^|DI;SmhbW2d};S& RnGTS9Jzf1=);T3K0RTFfV#xpi literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/models/model_guide.png b/src/main/resources/assets/bloodutils/textures/models/model_guide.png new file mode 100644 index 0000000000000000000000000000000000000000..dba3d66291bbe219fafdae92f8619154008ac4df GIT binary patch literal 322 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzwj^(N7l!{JxM1({$v_d#0*}aI z1_r*vAk26?e?<yVkiEpy*OmPqr;LyULtfjacR-=@o-U3d5r^MSHWX@B5OEP#Z*65( z|1kfAaD~BZ8HJ_lO6n69ZcuhTp!ma=tK`z3>pv1@3(CS<PuQGiWLUG6fkDa1Z>K#^ z^C8YVeR>|Rk6f(N&6>5$!KI={`F~sS`{mcx)Rg<peZ;^}a_-=A$%gAvYYiD1Oj*L# z_ce5wMc3L`oK@ZbrHY-w=JB25-q%uZDn0lTC6)bl-ABu{hS5CX7ap9iDQQsde=vz( z!~2@J>goSXe)e0LV{I(*t0OPvSM6n<d3IiB!(~=S0Tv)yI88i%Ua<DJWpCJlUSsfd L^>bP0l+XkKF5`MT literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodutils/textures/models/model_reviver.png b/src/main/resources/assets/bloodutils/textures/models/model_reviver.png new file mode 100644 index 0000000000000000000000000000000000000000..96b286ac2b2b85c2ddba1261cea631a1a8551517 GIT binary patch literal 1058 zcmV+-1l{|IP)<h;3K|Lk000e1NJLTq004jh002M;1^@s6($;@}00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY4#NNd4#NS*Z>VGd000McNliru-U%KKIXC5zkevVk1FuO$ zK~#9!?b$(Y+eQ?|@xLgFW^4&bV*x3Q0PZ5lsk-gDC+HEn?isqsg#rVG0at+msjw|d zp=O3;7b58)BgTd)Kr#INHXLd+l7Kgw_l7gT^D7i1AO@B|)&2_xboelRS6J&XxdY(j zC<b7)Nq4?K3PMJsu<=@-@fY*!&fg{vYed2VpI*J<x36Ct?T4Jd{)sq_>-#iK;dp{^ zmbpopMln%1s^636Imvnjz}%$0#$PCg`<nnCf#1vE`|XDqXBmIK;1pN@=j9dPZF#Nw zs%!f5`^NaYyR`g4+ds6UDEk~laA#81W>b%;`laUt_yY=C{`<T5@A<PM9kc^{S_QYf zw)<v4;+o%@ILkO3)$P=52!dhVf8$Ku&yMl(gbDDEm+P+|(cWdYPI%i2a25EdY)@K~ z;Ci*J^Z9I@)Sops8?vGR1`G#avy7|cj^Q8x;M%JVq99ZR`%VDsEz^%_w@srMBADDP zSa^Y+c)_PEDo?$>^T`{pvfI`IXUCH|&xc`%b8cG?0JHUyv*SsfGAft13q`Td1o&76 zxXSwvwcFOtVT-&Da627DtyQ6}0rIRY=n8C+W1OpNftY}lyzxD+k79x#;3~Ooqyaf_ z3a~|vE%MHqfbt(-rGs|P9}R+U#;4>&1Q>EQS+?zWmQexYa8%a{ssZ+t0xYm@Rqc;W z0e<j|7i81kDeMToKi+1J%jHd-+lyAI8HFKpld1sR_XPO+I}dptYZ}Fkg3r(Srfg3- z##H-!|Gvuge(taG{%oCac09g+5TqFH?>RspUE9E@qi<H$0QIu(-5X~c_wD{&_wqEs zzCLJI@T;ZYv~~cy>h`WBy($j1?Ej!EfVGY<HmRTf`GNKezxD+AT-5;Oc$2&O`TuH@ za&i=7oFmIJ{#`8zg8<_kN27=@tK^&W1Ub+In2yJs3`Z<)7rY0qT04NQ6!FWOQ<C)x zdju!L?Y1tCW70Ie-{(j7Ilp}t0FbO#ssVcHT>yTVzAL6tjLY+#&*u|onMU!>oLw#H zea7oF@CPXZ+rj%U^-d9^X26YeL}9qs@$$qK;Lzv!haUgZSC9}6d!B#j@h`oG2&;W} zpY!<VK3>lOyrRlc;3!C(W$qo*!uCAA>fg05f9~U7Yz<(Xt6#|TtZ^Qn6)+qO>ht(2 z*ZTSNIgh`*U1%2}A|fIpA|fIpA|fIpA|fIpA|fIpA|fIpA|fIpA|fIpA|fIpA|fIp cA|i+MKMA2UL1-lEY5)KL07*qoM6N<$g50P4L;wH) literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/minecraft/textures/gui/container/creative_inventory/tab_blood.png b/src/main/resources/assets/minecraft/textures/gui/container/creative_inventory/tab_blood.png new file mode 100644 index 0000000000000000000000000000000000000000..d52684dc3751830e8b429267ce3085eb4093b7b8 GIT binary patch literal 1023 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G$6&6<n8Xl@E-&h>|H(?D8gCb z5n0T@z;_UY8Fx&~ehU<2FY)wsWxvNM%EvD5VXdRdz`)$&>EaktaqI1!gTAjFMA|M| zPptOfeiLC`8^{`(D!ko6cxB=ZhCZbw3OR<xcZ#R^``5dq)T`801t*0vf6|OMcQ{+l z?eqHlyMO8r@5X!W?R79?H@BZz8}mCezv1OS{%NU&p%aeToDa<Q{q32sYyZ!9fAw%y z%{?)CFYh-upJrfT5MXcs`38;Au+XRf-=V^G@yf0abL%p*H*?B&=<UBP*dSkV?}t*j zby?Ysn^m!Kci-=0Vqjw6073<Z1_m$_oze67VI_nA#`FIdZ%b}xWPY$j%G&nL1q}v4 zzf~JAALpCLh*cNJK&VM7k6aY2ok3baIu7&oG6_5c8dCe_fh0@`ru864DKI!F`LS#= zJ_6J-K-Ly~lWSZL37I7oYz227y3VP}PJi8(9tiTqmMD-fw2ANq>o(&f=i=XT9gtPu zctQF4Qm~o(LzNa?i&9ofiWGa#k$L9xo_iciUDj?*;c>X*#t`&R%}1)?@UPF};f$I2 z|7ORxY1%W^d@^j<^4;;6|G}f~^(Rj6XTlL@nBhsRhyuesChSQHGm#N3f|fXm)`!O- em`48VEa&?0($e=vt^qKsGI+ZBxvX<aXaWEh{P<e{ literal 0 HcmV?d00001 From e9562e37cb5b1722bddc8420f6446d7f7df18f4f Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Wed, 29 Jul 2015 08:59:13 -0400 Subject: [PATCH 03/33] Started to continue the long process of fixing all the errors. --- .../alchemicalWizardry/client/ClientProxy.java | 10 +++++----- .../client/gui/ConfigGuiFactory.java | 6 +++--- .../common/renderer/model/ModelBloodAltar.java | 4 +--- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java b/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java index 5f1075af..2def5126 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java @@ -1,10 +1,13 @@ package WayofTime.alchemicalWizardry.client; -import WayofTime.alchemicalWizardry.common.thread.GAPIChecker; import net.minecraft.item.ItemBlock; import net.minecraft.world.World; import net.minecraftforge.client.MinecraftForgeClient; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.fml.client.FMLClientHandler; +import net.minecraftforge.fml.client.registry.ClientRegistry; +import net.minecraftforge.fml.client.registry.RenderingRegistry; +import net.minecraftforge.fml.common.FMLCommonHandler; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; import WayofTime.alchemicalWizardry.client.renderer.RitualDivinerRender; @@ -85,6 +88,7 @@ import WayofTime.alchemicalWizardry.common.renderer.model.ModelWingedFireDemon; import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBazookaMainProjectile; import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBlastProjectile; import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderMeteor; +import WayofTime.alchemicalWizardry.common.thread.GAPIChecker; import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; @@ -98,10 +102,6 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; -import cpw.mods.fml.client.FMLClientHandler; -import cpw.mods.fml.client.registry.ClientRegistry; -import cpw.mods.fml.client.registry.RenderingRegistry; -import cpw.mods.fml.common.FMLCommonHandler; public class ClientProxy extends CommonProxy { diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGuiFactory.java b/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGuiFactory.java index e4705728..9cea4d60 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGuiFactory.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGuiFactory.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.client.gui; -import cpw.mods.fml.client.IModGuiFactory; +import java.util.Set; + import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; - -import java.util.Set; +import net.minecraftforge.fml.client.IModGuiFactory; public class ConfigGuiFactory implements IModGuiFactory { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java index ade3d47e..8443086a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java @@ -6,14 +6,12 @@ import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.model.AdvancedModelLoader; -import net.minecraftforge.client.model.IModelCustom; +import net.minecraftforge.fml.client.FMLClientHandler; import org.lwjgl.opengl.GL11; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import cpw.mods.fml.client.FMLClientHandler; public class ModelBloodAltar extends ModelBase { From 59b8ecc2716403ffb0908effe89fdb00bffbc130 Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Wed, 29 Jul 2015 09:08:46 -0400 Subject: [PATCH 04/33] Fixed more issues --- .../AlchemicalWizardry.java | 83 +++-- .../BloodMagicConfiguration.java | 4 +- .../alchemicalWizardry/ModItems.java | 45 ++- .../api/RoutingFocusPosAndFacing.java | 6 +- .../api/event/ItemDrainNetworkEvent.java | 2 +- .../api/event/PlayerAddToNetworkEvent.java | 2 +- .../api/event/PlayerDrainNetworkEvent.java | 2 +- .../api/event/SacrificeKnifeUsedEvent.java | 4 +- .../api/items/ItemSpellMultiTool.java | 2 - .../api/spell/APISpellHelper.java | 2 +- .../api/spell/EntitySpellProjectile.java | 4 +- .../common/AlchemicalWizardryEventHooks.java | 11 +- .../common/ClientToServerPacketHandler.java | 6 +- .../common/CommonProxy.java | 4 +- .../common/MessageKeyPressed.java | 6 +- .../common/ModLivingDropsEvent.java | 4 +- .../common/NewPacketHandler.java | 14 +- .../achievements/AchievementTrigger.java | 4 +- .../common/achievements/ModAchievements.java | 2 +- .../common/demonVillage/BlockSet.java | 4 +- .../common/entity/mob/EntityElemental.java | 4 +- .../entity/mob/MailOrderEntityItem.java | 2 +- .../common/renderer/model/ModelConduit.java | 4 +- .../rituals/RitualEffectApiaryOverclock.java | 16 +- .../routing/RoutingFocusLogicModItems.java | 2 +- .../spell/complex/effect/SpellHelper.java | 2 +- .../common/thread/GAPIChecker.java | 3 +- .../common/tileEntity/TEReagentConduit.java | 4 +- .../common/tweaker/Alchemy.java | 257 ++++++++------- .../common/tweaker/Binding.java | 260 ++++++++-------- .../common/tweaker/BloodAltar.java | 266 ++++++++-------- .../common/tweaker/BloodOrb.java | 294 +++++++++--------- .../common/tweaker/FallingTower.java | 278 ++++++++--------- .../common/tweaker/HarvestMoon.java | 180 +++++------ .../common/tweaker/MTHelper.java | 164 +++++----- .../tweaker/MineTweakerIntegration.java | 38 +-- 36 files changed, 1007 insertions(+), 978 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index 48574a7f..c2ee21bb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -50,10 +50,6 @@ import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import thaumcraft.api.ItemApi; -import thaumcraft.api.ThaumcraftApi; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.aspects.AspectList; import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; @@ -287,7 +283,6 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiHandler; -import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration; @Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v1.3.3", guiFactory = "WayofTime.alchemicalWizardry.client.gui.ConfigGuiFactory") @@ -1149,39 +1144,39 @@ public class AlchemicalWizardry GameRegistry.registerItem(ModItems.sanguinePants, "sanguinePants"); GameRegistry.registerItem(ModItems.sanguineBoots, "sanguineBoots"); - ItemStack itemGoggles = ItemApi.getItem("itemGoggles", 0); - Item itemThaumChest = GameRegistry.findItem("Thaumcraft", "ItemChestplateThaumium"); - Item itemThaumLeggings = GameRegistry.findItem("Thaumcraft", "ItemLeggingsThaumium"); - Item itemThaumBoots = GameRegistry.findItem("Thaumcraft", "ItemBootsThaumium"); - - AspectList aspectList = new AspectList(); - aspectList.add(Aspect.ARMOR, 5).add(Aspect.MAGIC, 5); - - ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguineHelmet), aspectList); - ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguineRobe), aspectList); - ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguinePants), aspectList); - ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguineBoots), aspectList); - - - if (itemGoggles != null) - { - BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineHelmet), itemGoggles); - } - - if (itemThaumChest != null) - { - BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineRobe), new ItemStack(itemThaumChest)); - } - - if (itemThaumLeggings != null) - { - BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguinePants), new ItemStack(itemThaumLeggings)); - } - - if (itemThaumBoots != null) - { - BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineBoots), new ItemStack(itemThaumBoots)); - } +// ItemStack itemGoggles = ItemApi.getItem("itemGoggles", 0); +// Item itemThaumChest = GameRegistry.findItem("Thaumcraft", "ItemChestplateThaumium"); +// Item itemThaumLeggings = GameRegistry.findItem("Thaumcraft", "ItemLeggingsThaumium"); +// Item itemThaumBoots = GameRegistry.findItem("Thaumcraft", "ItemBootsThaumium"); +// +// AspectList aspectList = new AspectList(); +// aspectList.add(Aspect.ARMOR, 5).add(Aspect.MAGIC, 5); +// +// ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguineHelmet), aspectList); +// ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguineRobe), aspectList); +// ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguinePants), aspectList); +// ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguineBoots), aspectList); +// +// +// if (itemGoggles != null) +// { +// BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineHelmet), itemGoggles); +// } +// +// if (itemThaumChest != null) +// { +// BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineRobe), new ItemStack(itemThaumChest)); +// } +// +// if (itemThaumLeggings != null) +// { +// BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguinePants), new ItemStack(itemThaumLeggings)); +// } +// +// if (itemThaumBoots != null) +// { +// BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineBoots), new ItemStack(itemThaumBoots)); +// } //LogHelper.log(Level.INFO, "Loaded RP2 World addon"); } catch (Exception e) @@ -1231,11 +1226,11 @@ public class AlchemicalWizardry AlchemicalWizardry.logger.info("Loaded Harvestcraft Handlers!"); } - if(Loader.isModLoaded("MineTweaker3")) - { - MineTweakerIntegration.register(); - AlchemicalWizardry.logger.info("Loaded MineTweaker 3 Integration"); - } +// if(Loader.isModLoaded("MineTweaker3")) +// { +// MineTweakerIntegration.register(); +// AlchemicalWizardry.logger.info("Loaded MineTweaker 3 Integration"); +// } // if(Loader.isModLoaded("AgriCraft")) // { @@ -1264,7 +1259,7 @@ public class AlchemicalWizardry @Optional.Method(modid = "guideapi") public static void registerBMBook() { - BloodMagicGuide.registerGuide(); +// BloodMagicGuide.registerGuide(); } public static void blacklistAccelerators() diff --git a/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java b/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java index 290756c1..0789ad02 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java +++ b/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java @@ -9,6 +9,8 @@ import java.util.Map.Entry; import net.minecraft.entity.EntityList; import net.minecraft.entity.EntityLivingBase; import net.minecraftforge.common.config.Configuration; +import net.minecraftforge.fml.common.FMLCommonHandler; +import net.minecraftforge.fml.relauncher.Side; import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.client.renderer.ColourThreshold; import WayofTime.alchemicalWizardry.client.renderer.RenderHelper; @@ -16,8 +18,6 @@ import WayofTime.alchemicalWizardry.common.demonVillage.DemonVillagePath; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm; -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.relauncher.Side; /** * Created with IntelliJ IDEA. diff --git a/src/main/java/WayofTime/alchemicalWizardry/ModItems.java b/src/main/java/WayofTime/alchemicalWizardry/ModItems.java index 2d274ade..aea436af 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/ModItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/ModItems.java @@ -1,11 +1,53 @@ package WayofTime.alchemicalWizardry; -import WayofTime.alchemicalWizardry.common.items.*; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Items; import net.minecraft.item.Item; +import net.minecraftforge.fml.common.registry.GameRegistry; import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; +import WayofTime.alchemicalWizardry.common.items.AWBaseItems; +import WayofTime.alchemicalWizardry.common.items.ActivationCrystal; +import WayofTime.alchemicalWizardry.common.items.AirScribeTool; +import WayofTime.alchemicalWizardry.common.items.ApprenticeBloodOrb; +import WayofTime.alchemicalWizardry.common.items.ArchmageBloodOrb; +import WayofTime.alchemicalWizardry.common.items.ArmourInhibitor; +import WayofTime.alchemicalWizardry.common.items.BlankSpell; +import WayofTime.alchemicalWizardry.common.items.BloodShard; +import WayofTime.alchemicalWizardry.common.items.BoundAxe; +import WayofTime.alchemicalWizardry.common.items.BoundPickaxe; +import WayofTime.alchemicalWizardry.common.items.BoundShovel; +import WayofTime.alchemicalWizardry.common.items.CheatyItem; +import WayofTime.alchemicalWizardry.common.items.CreativeDagger; +import WayofTime.alchemicalWizardry.common.items.DaggerOfSacrifice; +import WayofTime.alchemicalWizardry.common.items.DawnScribeTool; +import WayofTime.alchemicalWizardry.common.items.DemonPlacer; +import WayofTime.alchemicalWizardry.common.items.DemonicTelepositionFocus; +import WayofTime.alchemicalWizardry.common.items.DuskScribeTool; +import WayofTime.alchemicalWizardry.common.items.EarthScribeTool; +import WayofTime.alchemicalWizardry.common.items.EnergyBattery; +import WayofTime.alchemicalWizardry.common.items.EnergyBazooka; +import WayofTime.alchemicalWizardry.common.items.EnergyBlast; +import WayofTime.alchemicalWizardry.common.items.EnergySword; +import WayofTime.alchemicalWizardry.common.items.EnhancedTelepositionFocus; +import WayofTime.alchemicalWizardry.common.items.FireScribeTool; +import WayofTime.alchemicalWizardry.common.items.ItemAlchemyBase; +import WayofTime.alchemicalWizardry.common.items.ItemBloodLetterPack; +import WayofTime.alchemicalWizardry.common.items.ItemComplexSpellCrystal; +import WayofTime.alchemicalWizardry.common.items.ItemComponents; +import WayofTime.alchemicalWizardry.common.items.ItemDiabloKey; +import WayofTime.alchemicalWizardry.common.items.ItemIncense; +import WayofTime.alchemicalWizardry.common.items.ItemRitualDismantler; +import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; +import WayofTime.alchemicalWizardry.common.items.LavaCrystal; +import WayofTime.alchemicalWizardry.common.items.LifeBucket; +import WayofTime.alchemicalWizardry.common.items.MagicianBloodOrb; +import WayofTime.alchemicalWizardry.common.items.MasterBloodOrb; +import WayofTime.alchemicalWizardry.common.items.ReinforcedTelepositionFocus; +import WayofTime.alchemicalWizardry.common.items.SacrificialDagger; +import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; +import WayofTime.alchemicalWizardry.common.items.TranscendentBloodOrb; +import WayofTime.alchemicalWizardry.common.items.WaterScribeTool; import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourEarth; import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourFire; @@ -51,7 +93,6 @@ import WayofTime.alchemicalWizardry.common.items.sigil.SigilSeer; import WayofTime.alchemicalWizardry.common.items.sigil.SigilVoid; import WayofTime.alchemicalWizardry.common.items.sigil.SigilWater; import WayofTime.alchemicalWizardry.common.items.sigil.holding.SigilOfHolding; -import cpw.mods.fml.common.registry.GameRegistry; /** * Created with IntelliJ IDEA. diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusPosAndFacing.java b/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusPosAndFacing.java index a6ee34a9..a49ffee1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusPosAndFacing.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusPosAndFacing.java @@ -1,13 +1,13 @@ package WayofTime.alchemicalWizardry.api; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; public class RoutingFocusPosAndFacing { public Int3 location; - public ForgeDirection facing; + public EnumFacing facing; - public RoutingFocusPosAndFacing(Int3 location, ForgeDirection facing) + public RoutingFocusPosAndFacing(Int3 location, EnumFacing facing) { this.location = location; this.facing = facing; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainNetworkEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainNetworkEvent.java index d75fd7dc..aa9c32d2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainNetworkEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainNetworkEvent.java @@ -2,7 +2,7 @@ package WayofTime.alchemicalWizardry.api.event; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import cpw.mods.fml.common.eventhandler.Cancelable; +import net.minecraftforge.fml.common.eventhandler.Cancelable; @Cancelable public class ItemDrainNetworkEvent extends PlayerDrainNetworkEvent diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerAddToNetworkEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerAddToNetworkEvent.java index f7522557..c4a3820c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerAddToNetworkEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerAddToNetworkEvent.java @@ -2,7 +2,7 @@ package WayofTime.alchemicalWizardry.api.event; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import cpw.mods.fml.common.eventhandler.Cancelable; +import net.minecraftforge.fml.common.eventhandler.Cancelable; @Cancelable public class PlayerAddToNetworkEvent extends AddToNetworkEvent diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerDrainNetworkEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerDrainNetworkEvent.java index dacb26d8..d70c3267 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerDrainNetworkEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerDrainNetworkEvent.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.api.event; import net.minecraft.entity.player.EntityPlayer; -import cpw.mods.fml.common.eventhandler.Cancelable; +import net.minecraftforge.fml.common.eventhandler.Cancelable; @Cancelable public class PlayerDrainNetworkEvent extends SoulNetworkEvent diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/SacrificeKnifeUsedEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/SacrificeKnifeUsedEvent.java index 04acf352..1849c6c9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/SacrificeKnifeUsedEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/SacrificeKnifeUsedEvent.java @@ -1,8 +1,8 @@ package WayofTime.alchemicalWizardry.api.event; import net.minecraft.entity.player.EntityPlayer; -import cpw.mods.fml.common.eventhandler.Cancelable; -import cpw.mods.fml.common.eventhandler.Event; +import net.minecraftforge.fml.common.eventhandler.Cancelable; +import net.minecraftforge.fml.common.eventhandler.Event; @Cancelable public class SacrificeKnifeUsedEvent extends Event diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java index b74bc2a3..c734d12b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java @@ -9,7 +9,6 @@ import java.util.Set; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; @@ -25,7 +24,6 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.util.Constants; -import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; import WayofTime.alchemicalWizardry.api.spell.SpellEffect; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/APISpellHelper.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/APISpellHelper.java index 00e46c22..452085ec 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/APISpellHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/APISpellHelper.java @@ -19,10 +19,10 @@ import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import net.minecraftforge.fml.common.registry.GameRegistry; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import cpw.mods.fml.common.registry.GameRegistry; public class APISpellHelper { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java index 243349ab..556f6c0a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java @@ -22,8 +22,8 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class EntitySpellProjectile extends Entity implements IProjectile { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java index 98b24b52..4ab35e17 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java @@ -42,7 +42,6 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.oredict.OreDictionary; -import vazkii.botania.api.internal.IManaBurst; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.BloodMagicConfiguration; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; @@ -817,11 +816,11 @@ public class AlchemicalWizardryEventHooks @Optional.Method(modid = "Botania") private boolean isManaBurst(Entity entity) { - if(entity instanceof IManaBurst) { - ItemStack lens = ((IManaBurst)entity).getSourceLens(); - return !(lens.getItemDamage()!=8 && lens.getItemDamage()!=11); - } - else +// if(entity instanceof IManaBurst) { +// ItemStack lens = ((IManaBurst)entity).getSourceLens(); +// return !(lens.getItemDamage()!=8 && lens.getItemDamage()!=11); +// } +// else return false; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/ClientToServerPacketHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/ClientToServerPacketHandler.java index 077bf2c4..7a5f2fed 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/ClientToServerPacketHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/ClientToServerPacketHandler.java @@ -1,8 +1,8 @@ package WayofTime.alchemicalWizardry.common; -import cpw.mods.fml.common.network.NetworkRegistry; -import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; -import cpw.mods.fml.relauncher.Side; +import net.minecraftforge.fml.common.network.NetworkRegistry; +import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; +import net.minecraftforge.fml.relauncher.Side; public class ClientToServerPacketHandler { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java b/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java index ee1a7d93..867e2b15 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java @@ -1,6 +1,8 @@ package WayofTime.alchemicalWizardry.common; import net.minecraft.world.World; +import net.minecraftforge.fml.common.registry.EntityRegistry; +import net.minecraftforge.fml.common.registry.GameRegistry; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; import WayofTime.alchemicalWizardry.common.entity.mob.BookEntityItem; @@ -22,8 +24,6 @@ import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile; import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import cpw.mods.fml.common.registry.EntityRegistry; -import cpw.mods.fml.common.registry.GameRegistry; public class CommonProxy { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/MessageKeyPressed.java b/src/main/java/WayofTime/alchemicalWizardry/common/MessageKeyPressed.java index ae4377f8..055f91ff 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/MessageKeyPressed.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/MessageKeyPressed.java @@ -3,10 +3,10 @@ package WayofTime.alchemicalWizardry.common; import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.common.network.simpleimpl.IMessage; +import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; +import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; -import cpw.mods.fml.common.network.simpleimpl.IMessage; -import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; -import cpw.mods.fml.common.network.simpleimpl.MessageContext; public class MessageKeyPressed implements IMessage, IMessageHandler<MessageKeyPressed, IMessage> { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/ModLivingDropsEvent.java b/src/main/java/WayofTime/alchemicalWizardry/common/ModLivingDropsEvent.java index 663c52c0..185c1584 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/ModLivingDropsEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/ModLivingDropsEvent.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.common; -import WayofTime.alchemicalWizardry.ModItems; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraftforge.event.entity.living.LivingDropsEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import WayofTime.alchemicalWizardry.ModItems; public class ModLivingDropsEvent { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java index aed92485..1902d47b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java @@ -19,6 +19,13 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; +import net.minecraftforge.fml.common.FMLCommonHandler; +import net.minecraftforge.fml.common.network.FMLEmbeddedChannel; +import net.minecraftforge.fml.common.network.FMLIndexedMessageToMessageCodec; +import net.minecraftforge.fml.common.network.FMLOutboundHandler; +import net.minecraftforge.fml.common.network.NetworkRegistry; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.ColourAndCoords; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; @@ -33,13 +40,6 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.network.FMLEmbeddedChannel; -import cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec; -import cpw.mods.fml.common.network.FMLOutboundHandler; -import cpw.mods.fml.common.network.NetworkRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public enum NewPacketHandler { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementTrigger.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementTrigger.java index e05804aa..69e07158 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementTrigger.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementTrigger.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.common.achievements; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.PlayerEvent; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.Achievement; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.common.gameevent.PlayerEvent; public class AchievementTrigger { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ModAchievements.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ModAchievements.java index 44de1c39..ed4238ed 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ModAchievements.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ModAchievements.java @@ -3,8 +3,8 @@ package WayofTime.alchemicalWizardry.common.achievements; import net.minecraft.stats.Achievement; import net.minecraft.util.StatCollector; import net.minecraftforge.common.AchievementPage; +import net.minecraftforge.fml.common.FMLCommonHandler; import WayofTime.alchemicalWizardry.ModItems; -import cpw.mods.fml.common.FMLCommonHandler; public class ModAchievements { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java index 24532279..527b60dc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java @@ -17,13 +17,13 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.fml.common.registry.GameRegistry.UniqueIdentifier; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.common.demonVillage.loot.DemonVillageLootRegistry; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.IBlockPortalNode; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.ITilePortalNode; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier; public class BlockSet { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java index 621c390c..99934c7f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java @@ -20,10 +20,10 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class EntityElemental extends EntityDemon { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/MailOrderEntityItem.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/MailOrderEntityItem.java index c1ac2bc7..26ddfa57 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/MailOrderEntityItem.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/MailOrderEntityItem.java @@ -5,8 +5,8 @@ import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import net.minecraftforge.fml.common.Optional; import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.common.Optional; public class MailOrderEntityItem extends EntityItem { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelConduit.java index a6a510c4..83f3ddc8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelConduit.java @@ -9,7 +9,7 @@ package WayofTime.alchemicalWizardry.common.renderer.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; public class ModelConduit extends ModelBase { @@ -147,7 +147,7 @@ public class ModelConduit extends ModelBase setRotation(spacer8, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output) + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, EnumFacing input, EnumFacing output) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java index c6d784eb..e0657394 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java @@ -1,19 +1,19 @@ package WayofTime.alchemicalWizardry.common.rituals; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import java.util.ArrayList; +import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; import net.minecraft.util.BlockPos; import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class RitualEffectApiaryOverclock extends RitualEffect { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicModItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicModItems.java index 8770d605..c5f9d035 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicModItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicModItems.java @@ -2,8 +2,8 @@ package WayofTime.alchemicalWizardry.common.routing; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.common.registry.GameData; import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; -import cpw.mods.fml.common.registry.GameData; public class RoutingFocusLogicModItems extends RoutingFocusLogic { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java index 97175a80..7e040efe 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java @@ -43,6 +43,7 @@ import net.minecraft.world.World; import net.minecraft.world.WorldServer; import net.minecraftforge.common.util.FakePlayer; import net.minecraftforge.fluids.IFluidBlock; +import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.oredict.OreDictionary; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles; @@ -52,7 +53,6 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; import WayofTime.alchemicalWizardry.common.NewPacketHandler; import WayofTime.alchemicalWizardry.common.items.sigil.SigilDivination; -import cpw.mods.fml.common.FMLCommonHandler; public class SpellHelper extends APISpellHelper { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/thread/GAPIChecker.java b/src/main/java/WayofTime/alchemicalWizardry/common/thread/GAPIChecker.java index 3b4ce3ba..fa7bda35 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/thread/GAPIChecker.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/thread/GAPIChecker.java @@ -19,6 +19,7 @@ import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; +import net.minecraftforge.fml.relauncher.FMLInjectionData; public class GAPIChecker { @@ -34,7 +35,7 @@ public class GAPIChecker public void init() { FMLCommonHandler.instance().bus().register(this); - File mcDir = (File)cpw.mods.fml.relauncher.FMLInjectionData.data()[6]; + File mcDir = (File)FMLInjectionData.data()[6]; this.modsDir = new File(mcDir, "mods"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java index 02ad475a..7cabc726 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java @@ -19,6 +19,8 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.api.ColourAndCoords; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler; @@ -29,8 +31,6 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import WayofTime.alchemicalWizardry.api.alchemy.energy.TileSegmentedReagentHandler; import WayofTime.alchemicalWizardry.common.entity.projectile.EntityParticleBeam; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class TEReagentConduit extends TileSegmentedReagentHandler implements IUpdatePlayerListBox { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Alchemy.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Alchemy.java index 68ae82e1..1cf2a2a3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Alchemy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Alchemy.java @@ -1,131 +1,126 @@ -package WayofTime.alchemicalWizardry.common.tweaker; - -import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; -import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStacks; -import minetweaker.IUndoableAction; -import minetweaker.MineTweakerAPI; -import minetweaker.api.item.IItemStack; -import net.minecraft.item.ItemStack; -import stanhebben.zenscript.annotations.ZenClass; -import stanhebben.zenscript.annotations.ZenMethod; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; - -/** - * MineTweaker3 Alchemy Recipe Handler by joshie * - */ -@ZenClass("mods.bloodmagic.Alchemy") -public class Alchemy -{ - @ZenMethod - public static void addRecipe(IItemStack output, IItemStack[] input, int tier, int lp) { - MineTweakerAPI.apply(new Add(new AlchemyRecipe(toStack(output), (int) (((double) lp) / 100), toStacks(input), tier))); - } - - private static class Add implements IUndoableAction - { - private final AlchemyRecipe recipe; - - public Add(AlchemyRecipe recipe) - { - this.recipe = recipe; - } - - @Override - public void apply() - { - AlchemyRecipeRegistry.recipes.add(recipe); - } - - @Override - public boolean canUndo() - { - return AlchemyRecipeRegistry.recipes != null; - } - - @Override - public void undo() - { - AlchemyRecipeRegistry.recipes.remove(recipe); - } - - @Override - public String describe() - { - return "Adding Alchemy Recipe for " + ((AlchemyRecipe) recipe).getResult().getDisplayName(); - } - - @Override - public String describeUndo() - { - return "Removing Alchemy Recipe for " + ((AlchemyRecipe) recipe).getResult().getDisplayName(); - } - - @Override - public Object getOverrideKey() - { - return null; - } - } - - @ZenMethod - public static void removeRecipe(IItemStack output) { - MineTweakerAPI.apply(new Remove(toStack(output))); - } - - private static class Remove implements IUndoableAction - { - private final ItemStack output; - private AlchemyRecipe recipe; - - public Remove(ItemStack output) - { - this.output = output; - } - - @Override - public void apply() - { - for (AlchemyRecipe r : AlchemyRecipeRegistry.recipes) - { - if (r.getResult() != null && r.getResult().isItemEqual(output)) - { - recipe = r; - break; - } - } - - AlchemyRecipeRegistry.recipes.remove(recipe); - } - - @Override - public boolean canUndo() - { - return AlchemyRecipeRegistry.recipes != null && recipe != null; - } - - @Override - public void undo() - { - AlchemyRecipeRegistry.recipes.add(recipe); - } - - @Override - public String describe() - { - return "Removing Alchemy Recipe for " + output.getDisplayName(); - } - - @Override - public String describeUndo() - { - return "Restoring Alchemy Recipe for " + output.getDisplayName(); - } - - @Override - public Object getOverrideKey() - { - return null; - } - } -} +//package WayofTime.alchemicalWizardry.common.tweaker; +// +//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; +//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStacks; +//import net.minecraft.item.ItemStack; +//import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe; +//import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +// +///** +// * MineTweaker3 Alchemy Recipe Handler by joshie * +// */ +//@ZenClass("mods.bloodmagic.Alchemy") +//public class Alchemy +//{ +// @ZenMethod +// public static void addRecipe(IItemStack output, IItemStack[] input, int tier, int lp) { +// MineTweakerAPI.apply(new Add(new AlchemyRecipe(toStack(output), (int) (((double) lp) / 100), toStacks(input), tier))); +// } +// +// private static class Add implements IUndoableAction +// { +// private final AlchemyRecipe recipe; +// +// public Add(AlchemyRecipe recipe) +// { +// this.recipe = recipe; +// } +// +// @Override +// public void apply() +// { +// AlchemyRecipeRegistry.recipes.add(recipe); +// } +// +// @Override +// public boolean canUndo() +// { +// return AlchemyRecipeRegistry.recipes != null; +// } +// +// @Override +// public void undo() +// { +// AlchemyRecipeRegistry.recipes.remove(recipe); +// } +// +// @Override +// public String describe() +// { +// return "Adding Alchemy Recipe for " + ((AlchemyRecipe) recipe).getResult().getDisplayName(); +// } +// +// @Override +// public String describeUndo() +// { +// return "Removing Alchemy Recipe for " + ((AlchemyRecipe) recipe).getResult().getDisplayName(); +// } +// +// @Override +// public Object getOverrideKey() +// { +// return null; +// } +// } +// +// @ZenMethod +// public static void removeRecipe(IItemStack output) { +// MineTweakerAPI.apply(new Remove(toStack(output))); +// } +// +// private static class Remove implements IUndoableAction +// { +// private final ItemStack output; +// private AlchemyRecipe recipe; +// +// public Remove(ItemStack output) +// { +// this.output = output; +// } +// +// @Override +// public void apply() +// { +// for (AlchemyRecipe r : AlchemyRecipeRegistry.recipes) +// { +// if (r.getResult() != null && r.getResult().isItemEqual(output)) +// { +// recipe = r; +// break; +// } +// } +// +// AlchemyRecipeRegistry.recipes.remove(recipe); +// } +// +// @Override +// public boolean canUndo() +// { +// return AlchemyRecipeRegistry.recipes != null && recipe != null; +// } +// +// @Override +// public void undo() +// { +// AlchemyRecipeRegistry.recipes.add(recipe); +// } +// +// @Override +// public String describe() +// { +// return "Removing Alchemy Recipe for " + output.getDisplayName(); +// } +// +// @Override +// public String describeUndo() +// { +// return "Restoring Alchemy Recipe for " + output.getDisplayName(); +// } +// +// @Override +// public Object getOverrideKey() +// { +// return null; +// } +// } +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Binding.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Binding.java index 5f5eac4f..01384dc6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Binding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Binding.java @@ -1,130 +1,130 @@ -package WayofTime.alchemicalWizardry.common.tweaker; - -import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; -import minetweaker.IUndoableAction; -import minetweaker.MineTweakerAPI; -import minetweaker.api.item.IItemStack; -import net.minecraft.item.ItemStack; -import stanhebben.zenscript.annotations.ZenClass; -import stanhebben.zenscript.annotations.ZenMethod; -import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe; -import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; - -/** - * MineTweaker3 Binding Recipe Handler by joshie * - */ -@ZenClass("mods.bloodmagic.Binding") -public class Binding -{ - @ZenMethod - public static void addRecipe(IItemStack input, IItemStack output) { - MineTweakerAPI.apply(new Add(new BindingRecipe(toStack(output), toStack(input)))); - } - - private static class Add implements IUndoableAction - { - private final BindingRecipe recipe; - - public Add(BindingRecipe recipe) - { - this.recipe = recipe; - } - - @Override - public void apply() - { - BindingRegistry.bindingRecipes.add(recipe); - } - - @Override - public boolean canUndo() - { - return BindingRegistry.bindingRecipes != null; - } - - @Override - public void undo() - { - BindingRegistry.bindingRecipes.remove(recipe); - } - - @Override - public String describe() - { - return "Adding Binding Recipe for " + ((BindingRecipe) recipe).getResult().getDisplayName(); - } - - @Override - public String describeUndo() - { - return "Removing Binding Recipe for " + ((BindingRecipe) recipe).getResult().getDisplayName(); - } - - @Override - public Object getOverrideKey() - { - return null; - } - } - - @ZenMethod - public static void removeRecipe(IItemStack output) { - MineTweakerAPI.apply(new Remove(toStack(output))); - } - - private static class Remove implements IUndoableAction - { - private final ItemStack output; - private BindingRecipe recipe; - - public Remove(ItemStack output) - { - this.output = output; - } - - @Override - public void apply() - { - for (BindingRecipe r : BindingRegistry.bindingRecipes) - { - if (r.getResult() != null && r.getResult().isItemEqual(output)) - { - recipe = r; - break; - } - } - - BindingRegistry.bindingRecipes.remove(recipe); - } - - @Override - public boolean canUndo() - { - return BindingRegistry.bindingRecipes != null && recipe != null; - } - - @Override - public void undo() - { - BindingRegistry.bindingRecipes.add(recipe); - } - - @Override - public String describe() - { - return "Removing Binding Recipe for " + output.getDisplayName(); - } - - @Override - public String describeUndo() - { - return "Restoring Binding Recipe for " + output.getDisplayName(); - } - - @Override - public Object getOverrideKey() - { - return null; - } - } -} +//package WayofTime.alchemicalWizardry.common.tweaker; +// +//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; +//import minetweaker.IUndoableAction; +//import minetweaker.MineTweakerAPI; +//import minetweaker.api.item.IItemStack; +//import net.minecraft.item.ItemStack; +//import stanhebben.zenscript.annotations.ZenClass; +//import stanhebben.zenscript.annotations.ZenMethod; +//import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe; +//import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; +// +///** +// * MineTweaker3 Binding Recipe Handler by joshie * +// */ +//@ZenClass("mods.bloodmagic.Binding") +//public class Binding +//{ +// @ZenMethod +// public static void addRecipe(IItemStack input, IItemStack output) { +// MineTweakerAPI.apply(new Add(new BindingRecipe(toStack(output), toStack(input)))); +// } +// +// private static class Add implements IUndoableAction +// { +// private final BindingRecipe recipe; +// +// public Add(BindingRecipe recipe) +// { +// this.recipe = recipe; +// } +// +// @Override +// public void apply() +// { +// BindingRegistry.bindingRecipes.add(recipe); +// } +// +// @Override +// public boolean canUndo() +// { +// return BindingRegistry.bindingRecipes != null; +// } +// +// @Override +// public void undo() +// { +// BindingRegistry.bindingRecipes.remove(recipe); +// } +// +// @Override +// public String describe() +// { +// return "Adding Binding Recipe for " + ((BindingRecipe) recipe).getResult().getDisplayName(); +// } +// +// @Override +// public String describeUndo() +// { +// return "Removing Binding Recipe for " + ((BindingRecipe) recipe).getResult().getDisplayName(); +// } +// +// @Override +// public Object getOverrideKey() +// { +// return null; +// } +// } +// +// @ZenMethod +// public static void removeRecipe(IItemStack output) { +// MineTweakerAPI.apply(new Remove(toStack(output))); +// } +// +// private static class Remove implements IUndoableAction +// { +// private final ItemStack output; +// private BindingRecipe recipe; +// +// public Remove(ItemStack output) +// { +// this.output = output; +// } +// +// @Override +// public void apply() +// { +// for (BindingRecipe r : BindingRegistry.bindingRecipes) +// { +// if (r.getResult() != null && r.getResult().isItemEqual(output)) +// { +// recipe = r; +// break; +// } +// } +// +// BindingRegistry.bindingRecipes.remove(recipe); +// } +// +// @Override +// public boolean canUndo() +// { +// return BindingRegistry.bindingRecipes != null && recipe != null; +// } +// +// @Override +// public void undo() +// { +// BindingRegistry.bindingRecipes.add(recipe); +// } +// +// @Override +// public String describe() +// { +// return "Removing Binding Recipe for " + output.getDisplayName(); +// } +// +// @Override +// public String describeUndo() +// { +// return "Restoring Binding Recipe for " + output.getDisplayName(); +// } +// +// @Override +// public Object getOverrideKey() +// { +// return null; +// } +// } +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodAltar.java index e1b7d3f7..9ca40713 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodAltar.java @@ -1,133 +1,133 @@ -package WayofTime.alchemicalWizardry.common.tweaker; - -import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; -import minetweaker.IUndoableAction; -import minetweaker.MineTweakerAPI; -import minetweaker.api.item.IItemStack; -import net.minecraft.item.ItemStack; -import stanhebben.zenscript.annotations.Optional; -import stanhebben.zenscript.annotations.ZenClass; -import stanhebben.zenscript.annotations.ZenMethod; -import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; -import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; - -/** - * MineTweaker3 Blood Altar Recipe Handler by joshie * - */ -@ZenClass("mods.bloodmagic.Altar") -public class BloodAltar -{ - @ZenMethod - public static void addRecipe(IItemStack output, IItemStack input, int tier, int lp, @Optional int consume, @Optional int drain) { - consume = consume > 0 ? consume : 20; - drain = drain > 0 ? drain : 20; - MineTweakerAPI.apply(new Add(new AltarRecipe(toStack(output), toStack(input), tier, lp, consume, drain, false))); - } - - private static class Add implements IUndoableAction - { - private final AltarRecipe recipe; - - public Add(AltarRecipe recipe) - { - this.recipe = recipe; - } - - @Override - public void apply() - { - AltarRecipeRegistry.altarRecipes.add(recipe); - } - - @Override - public boolean canUndo() - { - return AltarRecipeRegistry.altarRecipes != null; - } - - @Override - public void undo() - { - AltarRecipeRegistry.altarRecipes.remove(recipe); - } - - @Override - public String describe() - { - return "Adding Blood Altar Recipe for " + ((AltarRecipe) recipe).getResult().getDisplayName(); - } - - @Override - public String describeUndo() - { - return "Removing Blood Altar Recipe for " + ((AltarRecipe) recipe).getResult().getDisplayName(); - } - - @Override - public Object getOverrideKey() - { - return null; - } - } - - @ZenMethod - public static void removeRecipe(IItemStack output) { - MineTweakerAPI.apply(new Remove(toStack(output))); - } - - private static class Remove implements IUndoableAction - { - private final ItemStack output; - private AltarRecipe recipe; - - public Remove(ItemStack output) - { - this.output = output; - } - - @Override - public void apply() - { - for (AltarRecipe r : AltarRecipeRegistry.altarRecipes) - { - if (r.getResult() != null && r.getResult().isItemEqual(output)) - { - recipe = r; - break; - } - } - - AltarRecipeRegistry.altarRecipes.remove(recipe); - } - - @Override - public boolean canUndo() - { - return AltarRecipeRegistry.altarRecipes != null && recipe != null; - } - - @Override - public void undo() - { - AltarRecipeRegistry.altarRecipes.add(recipe); - } - - @Override - public String describe() - { - return "Removing Blood Altar Recipe for " + output.getDisplayName(); - } - - @Override - public String describeUndo() - { - return "Restoring Blood Altar Recipe for " + output.getDisplayName(); - } - - @Override - public Object getOverrideKey() - { - return null; - } - } -} +//package WayofTime.alchemicalWizardry.common.tweaker; +// +//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; +//import minetweaker.IUndoableAction; +//import minetweaker.MineTweakerAPI; +//import minetweaker.api.item.IItemStack; +//import net.minecraft.item.ItemStack; +//import stanhebben.zenscript.annotations.Optional; +//import stanhebben.zenscript.annotations.ZenClass; +//import stanhebben.zenscript.annotations.ZenMethod; +//import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; +//import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; +// +///** +// * MineTweaker3 Blood Altar Recipe Handler by joshie * +// */ +//@ZenClass("mods.bloodmagic.Altar") +//public class BloodAltar +//{ +// @ZenMethod +// public static void addRecipe(IItemStack output, IItemStack input, int tier, int lp, @Optional int consume, @Optional int drain) { +// consume = consume > 0 ? consume : 20; +// drain = drain > 0 ? drain : 20; +// MineTweakerAPI.apply(new Add(new AltarRecipe(toStack(output), toStack(input), tier, lp, consume, drain, false))); +// } +// +// private static class Add implements IUndoableAction +// { +// private final AltarRecipe recipe; +// +// public Add(AltarRecipe recipe) +// { +// this.recipe = recipe; +// } +// +// @Override +// public void apply() +// { +// AltarRecipeRegistry.altarRecipes.add(recipe); +// } +// +// @Override +// public boolean canUndo() +// { +// return AltarRecipeRegistry.altarRecipes != null; +// } +// +// @Override +// public void undo() +// { +// AltarRecipeRegistry.altarRecipes.remove(recipe); +// } +// +// @Override +// public String describe() +// { +// return "Adding Blood Altar Recipe for " + ((AltarRecipe) recipe).getResult().getDisplayName(); +// } +// +// @Override +// public String describeUndo() +// { +// return "Removing Blood Altar Recipe for " + ((AltarRecipe) recipe).getResult().getDisplayName(); +// } +// +// @Override +// public Object getOverrideKey() +// { +// return null; +// } +// } +// +// @ZenMethod +// public static void removeRecipe(IItemStack output) { +// MineTweakerAPI.apply(new Remove(toStack(output))); +// } +// +// private static class Remove implements IUndoableAction +// { +// private final ItemStack output; +// private AltarRecipe recipe; +// +// public Remove(ItemStack output) +// { +// this.output = output; +// } +// +// @Override +// public void apply() +// { +// for (AltarRecipe r : AltarRecipeRegistry.altarRecipes) +// { +// if (r.getResult() != null && r.getResult().isItemEqual(output)) +// { +// recipe = r; +// break; +// } +// } +// +// AltarRecipeRegistry.altarRecipes.remove(recipe); +// } +// +// @Override +// public boolean canUndo() +// { +// return AltarRecipeRegistry.altarRecipes != null && recipe != null; +// } +// +// @Override +// public void undo() +// { +// AltarRecipeRegistry.altarRecipes.add(recipe); +// } +// +// @Override +// public String describe() +// { +// return "Removing Blood Altar Recipe for " + output.getDisplayName(); +// } +// +// @Override +// public String describeUndo() +// { +// return "Restoring Blood Altar Recipe for " + output.getDisplayName(); +// } +// +// @Override +// public Object getOverrideKey() +// { +// return null; +// } +// } +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodOrb.java index 3997fd74..b3af37db 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodOrb.java @@ -1,147 +1,147 @@ -package WayofTime.alchemicalWizardry.common.tweaker; - -import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toObjects; -import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toShapedObjects; -import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; - -import java.util.List; - -import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; -import minetweaker.IUndoableAction; -import minetweaker.MineTweakerAPI; -import minetweaker.api.item.IIngredient; -import minetweaker.api.item.IItemStack; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.item.crafting.IRecipe; -import stanhebben.zenscript.annotations.ZenClass; -import stanhebben.zenscript.annotations.ZenMethod; -import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; - -/** - * MineTweaker3 Blood Orb Recipe Handler by joshie * - */ -@ZenClass("mods.bloodmagic.BloodOrb") -public class BloodOrb -{ - @ZenMethod - public static void addShaped(IItemStack output, IIngredient[][] ingredients) - { - MineTweakerAPI.apply(new Add(false, toStack(output), toShapedObjects(ingredients))); - } - - @ZenMethod - public static void addShapeless(IItemStack output, IIngredient[] ingredients) - { - MineTweakerAPI.apply(new Add(true, toStack(output), toObjects(ingredients))); - } - - private static class Add implements IUndoableAction { - private IRecipe iRecipe; - private final boolean isShapeless; - private final ItemStack output; - private final Object[] recipe; - - public Add(boolean isShapeless, ItemStack output, Object... recipe) - { - this.isShapeless = isShapeless; - this.output = output; - this.recipe = recipe; - } - - @Override - public void apply() - { - if (isShapeless) iRecipe = new ShapelessBloodOrbRecipe(output, recipe); - else iRecipe = new ShapedBloodOrbRecipe(output, recipe); - CraftingManager.getInstance().getRecipeList().add(iRecipe); - } - - @Override - public boolean canUndo() - { - return CraftingManager.getInstance().getRecipeList() != null; - } - - @Override - public void undo() - { - CraftingManager.getInstance().getRecipeList().remove(iRecipe); - } - - @Override - public String describe() { - return "Adding Blood Orb Recipe for " + output.getDisplayName(); - } - - @Override - public String describeUndo() - { - return "Removing Blood Orb Recipe for " + output.getDisplayName(); - } - - @Override - public Object getOverrideKey() - { - return null; - } - } - - @ZenMethod - public static void removeRecipe(IItemStack output) { - MineTweakerAPI.apply(new Remove(toStack(output))); - } - - private static class Remove implements IUndoableAction { - private final ItemStack output; - private IRecipe iRecipe; - - public Remove(ItemStack output) - { - this.output = output; - } - - @Override - public void apply() - { - for (IRecipe r : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) - { - if((r instanceof ShapedBloodOrbRecipe || r instanceof ShapelessBloodOrbRecipe) && r.getRecipeOutput() != null && r.getRecipeOutput().isItemEqual(output)) { - iRecipe = r; - break; - } - } - - CraftingManager.getInstance().getRecipeList().remove(iRecipe); - } - - @Override - public boolean canUndo() - { - return CraftingManager.getInstance().getRecipeList() != null && iRecipe != null; - } - - @Override - public void undo() - { - CraftingManager.getInstance().getRecipeList().add(iRecipe); - } - - @Override - public String describe() { - return "Removing Blood Orb Recipe for " + output.getDisplayName(); - } - - @Override - public String describeUndo() - { - return "Restoring Blood Orb Recipe for " + output.getDisplayName(); - } - - @Override - public Object getOverrideKey() - { - return null; - } - } -} +//package WayofTime.alchemicalWizardry.common.tweaker; +// +//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toObjects; +//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toShapedObjects; +//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; +// +//import java.util.List; +// +//import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; +//import minetweaker.IUndoableAction; +//import minetweaker.MineTweakerAPI; +//import minetweaker.api.item.IIngredient; +//import minetweaker.api.item.IItemStack; +//import net.minecraft.item.ItemStack; +//import net.minecraft.item.crafting.CraftingManager; +//import net.minecraft.item.crafting.IRecipe; +//import stanhebben.zenscript.annotations.ZenClass; +//import stanhebben.zenscript.annotations.ZenMethod; +//import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; +// +///** +// * MineTweaker3 Blood Orb Recipe Handler by joshie * +// */ +//@ZenClass("mods.bloodmagic.BloodOrb") +//public class BloodOrb +//{ +// @ZenMethod +// public static void addShaped(IItemStack output, IIngredient[][] ingredients) +// { +// MineTweakerAPI.apply(new Add(false, toStack(output), toShapedObjects(ingredients))); +// } +// +// @ZenMethod +// public static void addShapeless(IItemStack output, IIngredient[] ingredients) +// { +// MineTweakerAPI.apply(new Add(true, toStack(output), toObjects(ingredients))); +// } +// +// private static class Add implements IUndoableAction { +// private IRecipe iRecipe; +// private final boolean isShapeless; +// private final ItemStack output; +// private final Object[] recipe; +// +// public Add(boolean isShapeless, ItemStack output, Object... recipe) +// { +// this.isShapeless = isShapeless; +// this.output = output; +// this.recipe = recipe; +// } +// +// @Override +// public void apply() +// { +// if (isShapeless) iRecipe = new ShapelessBloodOrbRecipe(output, recipe); +// else iRecipe = new ShapedBloodOrbRecipe(output, recipe); +// CraftingManager.getInstance().getRecipeList().add(iRecipe); +// } +// +// @Override +// public boolean canUndo() +// { +// return CraftingManager.getInstance().getRecipeList() != null; +// } +// +// @Override +// public void undo() +// { +// CraftingManager.getInstance().getRecipeList().remove(iRecipe); +// } +// +// @Override +// public String describe() { +// return "Adding Blood Orb Recipe for " + output.getDisplayName(); +// } +// +// @Override +// public String describeUndo() +// { +// return "Removing Blood Orb Recipe for " + output.getDisplayName(); +// } +// +// @Override +// public Object getOverrideKey() +// { +// return null; +// } +// } +// +// @ZenMethod +// public static void removeRecipe(IItemStack output) { +// MineTweakerAPI.apply(new Remove(toStack(output))); +// } +// +// private static class Remove implements IUndoableAction { +// private final ItemStack output; +// private IRecipe iRecipe; +// +// public Remove(ItemStack output) +// { +// this.output = output; +// } +// +// @Override +// public void apply() +// { +// for (IRecipe r : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) +// { +// if((r instanceof ShapedBloodOrbRecipe || r instanceof ShapelessBloodOrbRecipe) && r.getRecipeOutput() != null && r.getRecipeOutput().isItemEqual(output)) { +// iRecipe = r; +// break; +// } +// } +// +// CraftingManager.getInstance().getRecipeList().remove(iRecipe); +// } +// +// @Override +// public boolean canUndo() +// { +// return CraftingManager.getInstance().getRecipeList() != null && iRecipe != null; +// } +// +// @Override +// public void undo() +// { +// CraftingManager.getInstance().getRecipeList().add(iRecipe); +// } +// +// @Override +// public String describe() { +// return "Removing Blood Orb Recipe for " + output.getDisplayName(); +// } +// +// @Override +// public String describeUndo() +// { +// return "Restoring Blood Orb Recipe for " + output.getDisplayName(); +// } +// +// @Override +// public Object getOverrideKey() +// { +// return null; +// } +// } +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java index 84263c3e..68a52b6a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java @@ -1,139 +1,139 @@ -package WayofTime.alchemicalWizardry.common.tweaker; - -import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm; -import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; -import minetweaker.IUndoableAction; -import minetweaker.MineTweakerAPI; -import minetweaker.api.item.IItemStack; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; -import stanhebben.zenscript.annotations.ZenClass; -import stanhebben.zenscript.annotations.ZenMethod; - -import java.util.Iterator; - -import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; - -/** - * MineTweaker3 Falling Tower Paradigm Handler by hilburn * - */ -@ZenClass("mods.bloodmagic.FallingTower") -public class FallingTower -{ - @ZenMethod - public static void addFocus(IItemStack stack, int radius, String[] components) - { - MineTweakerAPI.apply(new Add(toStack(stack),radius, components)); - } - - @ZenMethod - public static void addFocus(IItemStack stack, int radius, String components) - { - MineTweakerAPI.apply(new Add(toStack(stack),radius, components.split("\\s*,\\s*"))); - } - - @ZenMethod - public static void removeFocus(IItemStack output) { - MineTweakerAPI.apply(new Remove(toStack(output))); - } - - private static class Add implements IUndoableAction - { - private MeteorParadigm paradigm; - - public Add(ItemStack stack, int radius, String[] components) - { - paradigm = new MeteorParadigm(stack,radius); - paradigm.parseStringArray(components); - } - - @Override - public void apply() - { - MeteorRegistry.registerMeteorParadigm(paradigm); - } - - @Override - public boolean canUndo() - { - return MeteorRegistry.paradigmList!= null; - } - - @Override - public void undo() - { - MeteorRegistry.paradigmList.remove(paradigm); - } - - @Override - public String describe() { - return "Adding Falling Tower Focus for " + paradigm.focusStack.getDisplayName(); - } - - @Override - public String describeUndo() - { - return "Removing Falling Tower Focus for " + paradigm.focusStack.getDisplayName(); - } - - @Override - public Object getOverrideKey() - { - return null; - } - } - - private static class Remove implements IUndoableAction { - private final ItemStack focus; - private MeteorParadigm paradigm; - - public Remove(ItemStack focus) - { - this.focus = focus; - } - - @Override - public void apply() - { - for (Iterator<MeteorParadigm> itr = MeteorRegistry.paradigmList.iterator(); itr.hasNext();) - { - MeteorParadigm paradigm = itr.next(); - if (OreDictionary.itemMatches(paradigm.focusStack,focus,false)) - { - this.paradigm = paradigm; - itr.remove(); - break; - } - } - } - - @Override - public boolean canUndo() - { - return MeteorRegistry.paradigmList!= null && paradigm != null; - } - - @Override - public void undo() - { - MeteorRegistry.paradigmList.add(paradigm); - } - - @Override - public String describe() { - return "Removing Falling Tower Focus for " + focus.getDisplayName(); - } - - @Override - public String describeUndo() - { - return "Restoring Falling Tower Focus for " + focus.getDisplayName(); - } - - @Override - public Object getOverrideKey() - { - return null; - } - } -} +//package WayofTime.alchemicalWizardry.common.tweaker; +// +//import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm; +//import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; +//import minetweaker.IUndoableAction; +//import minetweaker.MineTweakerAPI; +//import minetweaker.api.item.IItemStack; +//import net.minecraft.item.ItemStack; +//import net.minecraftforge.oredict.OreDictionary; +//import stanhebben.zenscript.annotations.ZenClass; +//import stanhebben.zenscript.annotations.ZenMethod; +// +//import java.util.Iterator; +// +//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; +// +///** +// * MineTweaker3 Falling Tower Paradigm Handler by hilburn * +// */ +//@ZenClass("mods.bloodmagic.FallingTower") +//public class FallingTower +//{ +// @ZenMethod +// public static void addFocus(IItemStack stack, int radius, String[] components) +// { +// MineTweakerAPI.apply(new Add(toStack(stack),radius, components)); +// } +// +// @ZenMethod +// public static void addFocus(IItemStack stack, int radius, String components) +// { +// MineTweakerAPI.apply(new Add(toStack(stack),radius, components.split("\\s*,\\s*"))); +// } +// +// @ZenMethod +// public static void removeFocus(IItemStack output) { +// MineTweakerAPI.apply(new Remove(toStack(output))); +// } +// +// private static class Add implements IUndoableAction +// { +// private MeteorParadigm paradigm; +// +// public Add(ItemStack stack, int radius, String[] components) +// { +// paradigm = new MeteorParadigm(stack,radius); +// paradigm.parseStringArray(components); +// } +// +// @Override +// public void apply() +// { +// MeteorRegistry.registerMeteorParadigm(paradigm); +// } +// +// @Override +// public boolean canUndo() +// { +// return MeteorRegistry.paradigmList!= null; +// } +// +// @Override +// public void undo() +// { +// MeteorRegistry.paradigmList.remove(paradigm); +// } +// +// @Override +// public String describe() { +// return "Adding Falling Tower Focus for " + paradigm.focusStack.getDisplayName(); +// } +// +// @Override +// public String describeUndo() +// { +// return "Removing Falling Tower Focus for " + paradigm.focusStack.getDisplayName(); +// } +// +// @Override +// public Object getOverrideKey() +// { +// return null; +// } +// } +// +// private static class Remove implements IUndoableAction { +// private final ItemStack focus; +// private MeteorParadigm paradigm; +// +// public Remove(ItemStack focus) +// { +// this.focus = focus; +// } +// +// @Override +// public void apply() +// { +// for (Iterator<MeteorParadigm> itr = MeteorRegistry.paradigmList.iterator(); itr.hasNext();) +// { +// MeteorParadigm paradigm = itr.next(); +// if (OreDictionary.itemMatches(paradigm.focusStack,focus,false)) +// { +// this.paradigm = paradigm; +// itr.remove(); +// break; +// } +// } +// } +// +// @Override +// public boolean canUndo() +// { +// return MeteorRegistry.paradigmList!= null && paradigm != null; +// } +// +// @Override +// public void undo() +// { +// MeteorRegistry.paradigmList.add(paradigm); +// } +// +// @Override +// public String describe() { +// return "Removing Falling Tower Focus for " + focus.getDisplayName(); +// } +// +// @Override +// public String describeUndo() +// { +// return "Restoring Falling Tower Focus for " + focus.getDisplayName(); +// } +// +// @Override +// public Object getOverrideKey() +// { +// return null; +// } +// } +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/HarvestMoon.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/HarvestMoon.java index 7dc4d07b..222f8acf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/HarvestMoon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/HarvestMoon.java @@ -1,90 +1,90 @@ -package WayofTime.alchemicalWizardry.common.tweaker; - -import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; -import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; -import WayofTime.alchemicalWizardry.common.harvest.GenericItemStackHarvestHandler; -import minetweaker.IUndoableAction; -import minetweaker.MineTweakerAPI; -import minetweaker.api.item.IItemStack; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.IPlantable; -import stanhebben.zenscript.annotations.ZenClass; -import stanhebben.zenscript.annotations.ZenMethod; - -/** - * MineTweaker3 Harvest Moon Handler by hilburn * - */ -@ZenClass("mods.bloodmagic.HarvestMoon") -public class HarvestMoon -{ - - @ZenMethod - public static void addHarvestable(IItemStack block, IItemStack seed) - { - addHarvestable(block,block.getDamage(),seed); - } - - @ZenMethod - public static void addHarvestable(IItemStack block, int meta, IItemStack seed) - { - ItemStack seedStack = MTHelper.toStack(seed); - Block plantBlock = Block.getBlockFromItem(MTHelper.toStack(block).getItem()); - if (!(plantBlock==null || plantBlock== Blocks.air || seedStack==null || !(seedStack.getItem() instanceof IPlantable))) - { - MineTweakerAPI.apply(new Add(plantBlock, meta, seedStack)); - } - else - { - throw new IllegalArgumentException("Invalid Harvest Block or Seed"); - } - } - - private static class Add implements IUndoableAction - { - private IHarvestHandler handler; - private String name; - - public Add(Block block, int meta, ItemStack seed) - { - handler = new GenericItemStackHarvestHandler(block,meta,seed); - name = seed.getDisplayName(); - } - - @Override - public void apply() - { - HarvestRegistry.registerHarvestHandler(handler); - } - - @Override - public boolean canUndo() - { - return HarvestRegistry.handlerList!=null; - } - - @Override - public void undo() - { - HarvestRegistry.handlerList.remove(handler); - } - - @Override - public String describe() { - return "Adding Harvest Moon Support for " + name; - } - - @Override - public String describeUndo() - { - return "Removing Harvest Moon Support for " + name; - } - - @Override - public Object getOverrideKey() - { - return null; - } - } -} +//package WayofTime.alchemicalWizardry.common.tweaker; +// +//import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; +//import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; +//import WayofTime.alchemicalWizardry.common.harvest.GenericItemStackHarvestHandler; +//import minetweaker.IUndoableAction; +//import minetweaker.MineTweakerAPI; +//import minetweaker.api.item.IItemStack; +//import net.minecraft.block.Block; +//import net.minecraft.init.Blocks; +//import net.minecraft.item.ItemStack; +//import net.minecraftforge.common.IPlantable; +//import stanhebben.zenscript.annotations.ZenClass; +//import stanhebben.zenscript.annotations.ZenMethod; +// +///** +// * MineTweaker3 Harvest Moon Handler by hilburn * +// */ +//@ZenClass("mods.bloodmagic.HarvestMoon") +//public class HarvestMoon +//{ +// +// @ZenMethod +// public static void addHarvestable(IItemStack block, IItemStack seed) +// { +// addHarvestable(block,block.getDamage(),seed); +// } +// +// @ZenMethod +// public static void addHarvestable(IItemStack block, int meta, IItemStack seed) +// { +// ItemStack seedStack = MTHelper.toStack(seed); +// Block plantBlock = Block.getBlockFromItem(MTHelper.toStack(block).getItem()); +// if (!(plantBlock==null || plantBlock== Blocks.air || seedStack==null || !(seedStack.getItem() instanceof IPlantable))) +// { +// MineTweakerAPI.apply(new Add(plantBlock, meta, seedStack)); +// } +// else +// { +// throw new IllegalArgumentException("Invalid Harvest Block or Seed"); +// } +// } +// +// private static class Add implements IUndoableAction +// { +// private IHarvestHandler handler; +// private String name; +// +// public Add(Block block, int meta, ItemStack seed) +// { +// handler = new GenericItemStackHarvestHandler(block,meta,seed); +// name = seed.getDisplayName(); +// } +// +// @Override +// public void apply() +// { +// HarvestRegistry.registerHarvestHandler(handler); +// } +// +// @Override +// public boolean canUndo() +// { +// return HarvestRegistry.handlerList!=null; +// } +// +// @Override +// public void undo() +// { +// HarvestRegistry.handlerList.remove(handler); +// } +// +// @Override +// public String describe() { +// return "Adding Harvest Moon Support for " + name; +// } +// +// @Override +// public String describeUndo() +// { +// return "Removing Harvest Moon Support for " + name; +// } +// +// @Override +// public Object getOverrideKey() +// { +// return null; +// } +// } +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MTHelper.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MTHelper.java index 019bc5f3..d16df05e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MTHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MTHelper.java @@ -1,82 +1,82 @@ -package WayofTime.alchemicalWizardry.common.tweaker; - -import static minetweaker.api.minecraft.MineTweakerMC.getItemStack; - -import java.util.ArrayList; - -import minetweaker.api.item.IIngredient; -import minetweaker.api.item.IItemStack; -import minetweaker.api.oredict.IOreDictEntry; -import net.minecraft.item.ItemStack; - -/** - * MineTweaker3 Helper by joshie * - */ -public class MTHelper { - public static ItemStack toStack(IItemStack iStack) { - return getItemStack(iStack); - } - - public static ItemStack[] toStacks(IItemStack[] iStack) { - if (iStack == null) return null; - else { - ItemStack[] output = new ItemStack[iStack.length]; - for (int i = 0; i < iStack.length; i++) { - output[i] = toStack(iStack[i]); - } - - return output; - } - } - - public static Object toObject(IIngredient iStack) { - if (iStack == null) return null; - else { - if (iStack instanceof IOreDictEntry) { - return toString((IOreDictEntry) iStack); - } else if (iStack instanceof IItemStack) { - return getItemStack((IItemStack) iStack); - } else return null; - } - } - - public static Object[] toObjects(IIngredient[] ingredient) { - if (ingredient == null) return null; - else { - Object[] output = new Object[ingredient.length]; - for (int i = 0; i < ingredient.length; i++) { - if (ingredient[i] != null) { - output[i] = toObject(ingredient[i]); - } else output[i] = ""; - } - - return output; - } - } - - public static Object[] toShapedObjects(IIngredient[][] ingredients) { - if (ingredients == null) return null; - else { - ArrayList prep = new ArrayList(); - prep.add("abc"); - prep.add("def"); - prep.add("ghi"); - char[][] map = new char[][] { { 'a', 'b', 'c' }, { 'd', 'e', 'f' }, { 'g', 'h', 'i' } }; - for (int x = 0; x < ingredients.length; x++) { - if (ingredients[x] != null) { - for (int y = 0; y < ingredients[x].length; y++) { - if (ingredients[x][y] != null && x < map.length && y < map[x].length) { - prep.add(map[x][y]); - prep.add(toObject(ingredients[x][y])); - } - } - } - } - return prep.toArray(); - } - } - - public static String toString(IOreDictEntry entry) { - return ((IOreDictEntry) entry).getName(); - } -} +//package WayofTime.alchemicalWizardry.common.tweaker; +// +//import static minetweaker.api.minecraft.MineTweakerMC.getItemStack; +// +//import java.util.ArrayList; +// +//import minetweaker.api.item.IIngredient; +//import minetweaker.api.item.IItemStack; +//import minetweaker.api.oredict.IOreDictEntry; +//import net.minecraft.item.ItemStack; +// +///** +// * MineTweaker3 Helper by joshie * +// */ +//public class MTHelper { +// public static ItemStack toStack(IItemStack iStack) { +// return getItemStack(iStack); +// } +// +// public static ItemStack[] toStacks(IItemStack[] iStack) { +// if (iStack == null) return null; +// else { +// ItemStack[] output = new ItemStack[iStack.length]; +// for (int i = 0; i < iStack.length; i++) { +// output[i] = toStack(iStack[i]); +// } +// +// return output; +// } +// } +// +// public static Object toObject(IIngredient iStack) { +// if (iStack == null) return null; +// else { +// if (iStack instanceof IOreDictEntry) { +// return toString((IOreDictEntry) iStack); +// } else if (iStack instanceof IItemStack) { +// return getItemStack((IItemStack) iStack); +// } else return null; +// } +// } +// +// public static Object[] toObjects(IIngredient[] ingredient) { +// if (ingredient == null) return null; +// else { +// Object[] output = new Object[ingredient.length]; +// for (int i = 0; i < ingredient.length; i++) { +// if (ingredient[i] != null) { +// output[i] = toObject(ingredient[i]); +// } else output[i] = ""; +// } +// +// return output; +// } +// } +// +// public static Object[] toShapedObjects(IIngredient[][] ingredients) { +// if (ingredients == null) return null; +// else { +// ArrayList prep = new ArrayList(); +// prep.add("abc"); +// prep.add("def"); +// prep.add("ghi"); +// char[][] map = new char[][] { { 'a', 'b', 'c' }, { 'd', 'e', 'f' }, { 'g', 'h', 'i' } }; +// for (int x = 0; x < ingredients.length; x++) { +// if (ingredients[x] != null) { +// for (int y = 0; y < ingredients[x].length; y++) { +// if (ingredients[x][y] != null && x < map.length && y < map[x].length) { +// prep.add(map[x][y]); +// prep.add(toObject(ingredients[x][y])); +// } +// } +// } +// } +// return prep.toArray(); +// } +// } +// +// public static String toString(IOreDictEntry entry) { +// return ((IOreDictEntry) entry).getName(); +// } +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MineTweakerIntegration.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MineTweakerIntegration.java index e95af3f9..ae6d45ab 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MineTweakerIntegration.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MineTweakerIntegration.java @@ -1,19 +1,19 @@ -package WayofTime.alchemicalWizardry.common.tweaker; - -import minetweaker.MineTweakerAPI; - -/** - * MineTweaker3 Integration by joshie * - */ -public class MineTweakerIntegration -{ - public static void register() - { - MineTweakerAPI.registerClass(Alchemy.class); - MineTweakerAPI.registerClass(Binding.class); - MineTweakerAPI.registerClass(BloodAltar.class); - MineTweakerAPI.registerClass(BloodOrb.class); - MineTweakerAPI.registerClass(FallingTower.class); - MineTweakerAPI.registerClass(HarvestMoon.class); - } -} +//package WayofTime.alchemicalWizardry.common.tweaker; +// +//import minetweaker.MineTweakerAPI; +// +///** +// * MineTweaker3 Integration by joshie * +// */ +//public class MineTweakerIntegration +//{ +// public static void register() +// { +// MineTweakerAPI.registerClass(Alchemy.class); +// MineTweakerAPI.registerClass(Binding.class); +// MineTweakerAPI.registerClass(BloodAltar.class); +// MineTweakerAPI.registerClass(BloodOrb.class); +// MineTweakerAPI.registerClass(FallingTower.class); +// MineTweakerAPI.registerClass(HarvestMoon.class); +// } +//} From b090d154eb800f5c0ddfe68ee82d6126346e707f Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Wed, 29 Jul 2015 09:15:43 -0400 Subject: [PATCH 05/33] Doing more cleanup --- .../projectile/EnergyBlastProjectile.java | 6 +- .../common/items/forestry/ItemBloodFrame.java | 290 +++++++++--------- .../renderer/block/TEAltarRenderer.java | 14 +- .../renderer/model/ModelSpellEffectBlock.java | 4 +- .../model/ModelSpellEnhancementBlock.java | 4 +- .../model/ModelSpellModifierBlock.java | 4 +- .../model/ModelSpellParadigmBlock.java | 4 +- 7 files changed, 158 insertions(+), 168 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java index fa7daebc..4dc6faf7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java @@ -17,10 +17,10 @@ import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import net.minecraftforge.fml.common.registry.IThrowableEntity; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.common.registry.IThrowableEntity; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; //Shamelessly ripped off from x3n0ph0b3 public class EnergyBlastProjectile extends Entity implements IProjectile, IThrowableEntity diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/forestry/ItemBloodFrame.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/forestry/ItemBloodFrame.java index 1a10f2da..8acc4636 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/forestry/ItemBloodFrame.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/forestry/ItemBloodFrame.java @@ -1,145 +1,145 @@ -package WayofTime.alchemicalWizardry.common.items.forestry; - -import java.util.List; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import forestry.api.apiculture.IBee; -import forestry.api.apiculture.IBeeGenome; -import forestry.api.apiculture.IBeeHousing; -import forestry.api.apiculture.IHiveFrame; - -public class ItemBloodFrame extends EnergyItems implements IHiveFrame -{ - public ItemBloodFrame() - { - super(); - this.maxStackSize = 1; - this.setMaxDamage(10); - setEnergyUsed(1000); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.bloodframe.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodFrame"); - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) - { - if (par1ItemStack.getItemDamage() > 0) - { - if(EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) - { - par1ItemStack.setItemDamage(par1ItemStack.getItemDamage() - 1); - } - } - } - return par1ItemStack; - } - - @Override public float getTerritoryModifier(IBeeGenome genome, float currentModifier) - { - // TODO Auto-generated method stub - return 1; - } - - @Override public float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) - { - // TODO Auto-generated method stub - return 1; - } - - @Override public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) - { - // TODO Auto-generated method stub - return 0.0001f; - } - - @Override public float getProductionModifier(IBeeGenome genome, float currentModifier) - { - // TODO Auto-generated method stub - return 0; - } - - @Override public float getFloweringModifier(IBeeGenome genome, float currentModifier) - { - // TODO Auto-generated method stub - return 1; - } - - @Override public float getGeneticDecay(IBeeGenome genome, float currentModifier) - { - // TODO Auto-generated method stub - return 1; - } - - @Override public boolean isSealed() - { - // TODO Auto-generated method stub - return false; - } - - @Override public boolean isSelfLighted() - { - // TODO Auto-generated method stub - return false; - } - - @Override public boolean isSunlightSimulated() - { - // TODO Auto-generated method stub - return false; - } - - @Override public boolean isHellish() - { - // TODO Auto-generated method stub - return false; - } - - @Override public ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear) - { - // TODO Auto-generated method stub - if(EnergyItems.canSyphonInContainer(frame, getEnergyUsed()*wear)) - { - EnergyItems.syphonWhileInContainer(frame, getEnergyUsed()*wear); - return frame; - }else - { - frame.setItemDamage(frame.getItemDamage() + wear); - if(frame.getItemDamage()>=frame.getMaxDamage()) - { - return null; - } - return frame; - } - - } - - - -} +//package WayofTime.alchemicalWizardry.common.items.forestry; +// +//import java.util.List; +// +//import net.minecraft.client.renderer.texture.IIconRegister; +//import net.minecraft.entity.player.EntityPlayer; +//import net.minecraft.item.ItemStack; +//import net.minecraft.util.StatCollector; +//import net.minecraft.world.World; +//import WayofTime.alchemicalWizardry.AlchemicalWizardry; +//import WayofTime.alchemicalWizardry.common.items.EnergyItems; +//import cpw.mods.fml.relauncher.Side; +//import cpw.mods.fml.relauncher.SideOnly; +//import forestry.api.apiculture.IBee; +//import forestry.api.apiculture.IBeeGenome; +//import forestry.api.apiculture.IBeeHousing; +//import forestry.api.apiculture.IHiveFrame; +// +//public class ItemBloodFrame extends EnergyItems implements IHiveFrame +//{ +// public ItemBloodFrame() +// { +// super(); +// this.maxStackSize = 1; +// this.setMaxDamage(10); +// setEnergyUsed(1000); +// setCreativeTab(AlchemicalWizardry.tabBloodMagic); +// } +// +// @Override +// public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) +// { +// par3List.add(StatCollector.translateToLocal("tooltip.bloodframe.desc")); +// +// if (!(par1ItemStack.getTagCompound() == null)) +// { +// par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); +// } +// } +// +// @Override +// @SideOnly(Side.CLIENT) +// public void registerIcons(IIconRegister iconRegister) +// { +// this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodFrame"); +// } +// +// @Override +// public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) +// { +// if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) +// { +// if (par1ItemStack.getItemDamage() > 0) +// { +// if(EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) +// { +// par1ItemStack.setItemDamage(par1ItemStack.getItemDamage() - 1); +// } +// } +// } +// return par1ItemStack; +// } +// +// @Override public float getTerritoryModifier(IBeeGenome genome, float currentModifier) +// { +// // TODO Auto-generated method stub +// return 1; +// } +// +// @Override public float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) +// { +// // TODO Auto-generated method stub +// return 1; +// } +// +// @Override public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) +// { +// // TODO Auto-generated method stub +// return 0.0001f; +// } +// +// @Override public float getProductionModifier(IBeeGenome genome, float currentModifier) +// { +// // TODO Auto-generated method stub +// return 0; +// } +// +// @Override public float getFloweringModifier(IBeeGenome genome, float currentModifier) +// { +// // TODO Auto-generated method stub +// return 1; +// } +// +// @Override public float getGeneticDecay(IBeeGenome genome, float currentModifier) +// { +// // TODO Auto-generated method stub +// return 1; +// } +// +// @Override public boolean isSealed() +// { +// // TODO Auto-generated method stub +// return false; +// } +// +// @Override public boolean isSelfLighted() +// { +// // TODO Auto-generated method stub +// return false; +// } +// +// @Override public boolean isSunlightSimulated() +// { +// // TODO Auto-generated method stub +// return false; +// } +// +// @Override public boolean isHellish() +// { +// // TODO Auto-generated method stub +// return false; +// } +// +// @Override public ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear) +// { +// // TODO Auto-generated method stub +// if(EnergyItems.canSyphonInContainer(frame, getEnergyUsed()*wear)) +// { +// EnergyItems.syphonWhileInContainer(frame, getEnergyUsed()*wear); +// return frame; +// }else +// { +// frame.setItemDamage(frame.getItemDamage() + wear); +// if(frame.getItemDamage()>=frame.getMaxDamage()) +// { +// return null; +// } +// return frame; +// } +// +// } +// +// +// +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java index 054e1201..2b836d86 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java @@ -8,7 +8,7 @@ import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; import org.lwjgl.opengl.GL11; @@ -122,7 +122,7 @@ public class TEAltarRenderer extends TileEntitySpecialRenderer return scaleFactor; } - private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection) + private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, EnumFacing forgeDirection) { if (ghostItemStack != null) { @@ -166,11 +166,6 @@ public class TEAltarRenderer extends TileEntitySpecialRenderer return; } - case UNKNOWN: - { - return; - } - default: { return; @@ -216,11 +211,6 @@ public class TEAltarRenderer extends TileEntitySpecialRenderer return; } - case UNKNOWN: - { - return; - } - default: { return; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEffectBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEffectBlock.java index d816ae3d..fcf03321 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEffectBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEffectBlock.java @@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.common.renderer.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; public class ModelSpellEffectBlock extends ModelBase { @@ -184,7 +184,7 @@ public class ModelSpellEffectBlock extends ModelBase setRotation(outputSpacer4, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output) + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, EnumFacing input, EnumFacing output) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEnhancementBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEnhancementBlock.java index e83b4084..19e20c45 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEnhancementBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEnhancementBlock.java @@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.common.renderer.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; public class ModelSpellEnhancementBlock extends ModelBase @@ -185,7 +185,7 @@ public class ModelSpellEnhancementBlock extends ModelBase setRotation(outputSecond, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output) + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, EnumFacing input, EnumFacing output) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellModifierBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellModifierBlock.java index a879889b..28faaf7e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellModifierBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellModifierBlock.java @@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.common.renderer.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; public class ModelSpellModifierBlock extends ModelBase { @@ -149,7 +149,7 @@ public class ModelSpellModifierBlock extends ModelBase setRotation(output4, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output) + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, EnumFacing input, EnumFacing output) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellParadigmBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellParadigmBlock.java index 9fd4d551..4053b60b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellParadigmBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellParadigmBlock.java @@ -10,7 +10,7 @@ package WayofTime.alchemicalWizardry.common.renderer.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.EnumFacing; public class ModelSpellParadigmBlock extends ModelBase { @@ -100,7 +100,7 @@ public class ModelSpellParadigmBlock extends ModelBase setRotation(Shape5, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output) + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, EnumFacing input, EnumFacing output) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); From 3578a431e81672f02492fd4b614753b4049fbd31 Mon Sep 17 00:00:00 2001 From: Arcaratus <byou64@gmail.com> Date: Wed, 29 Jul 2015 09:20:39 -0400 Subject: [PATCH 06/33] Added CB Files --- build.gradle | 6 ++--- build.properties | 9 ++++---- .../AlchemicalWizardry.java | 22 ++++++++----------- 3 files changed, 16 insertions(+), 21 deletions(-) diff --git a/build.gradle b/build.gradle index dca746fd..9be2f8af 100644 --- a/build.gradle +++ b/build.gradle @@ -51,9 +51,9 @@ repositories { } dependencies { -// compile "codechicken:CodeChickenLib:1.7.10-1.1.1.99:dev" -// compile "codechicken:CodeChickenCore:" + config.mc_version + "-" + config.ccc_version + ":dev" -// compile "codechicken:NotEnoughItems:" + config.mc_version + "-" + config.nei_version + ":dev" + compile "codechicken:CodeChickenLib:" + config.mc_version + "-" + config.cclib_version + ":dev" + compile "codechicken:CodeChickenCore:" + config.mc_version + "-" + config.ccc_version + ":dev" + compile "codechicken:NotEnoughItems:" + config.mc_version + "-" + config.nei_version + ":dev" // compile name: 'MineTweaker3', version: config.minetweaker_version, ext: 'jar' // compile "codechicken:ForgeMultipart:1.7.10-1.1.0.314:dev" // compile "info.amerifrance.guideapi:Guide-API:" + config.mc_version + "-" + config.guideapi_version + ":deobf" diff --git a/build.properties b/build.properties index 5c65da81..a40914e6 100644 --- a/build.properties +++ b/build.properties @@ -1,9 +1,8 @@ -# -#Mon Jul 20 20:59:46 EDT 2015 mod_name=BloodMagic -forge_version=11.14.1.1334 -ccc_version=1.0.4.29 -nei_version=1.0.3.64 +forge_version=11.14.3.1499 +cclib_version=1.1.2.133 +ccc_version=1.0.5.36 +nei_version=1.0.5.104 //=Dependency Information guideapi_version=1.0.1-20 package_group=com.wayoftime.bloodmagic diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index 48574a7f..05150a8f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -50,10 +50,10 @@ import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import thaumcraft.api.ItemApi; -import thaumcraft.api.ThaumcraftApi; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.aspects.AspectList; +//import thaumcraft.api.ItemApi; +//import thaumcraft.api.ThaumcraftApi; +//import thaumcraft.api.aspects.Aspect; +//import thaumcraft.api.aspects.AspectList; import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; @@ -848,7 +848,6 @@ public class AlchemicalWizardry ItemStack strengthenedCatalystStackCrafted = new ItemStack(ModItems.baseAlchemyItems, 2, 3); ItemStack fracturedBoneStackCrafted = new ItemStack(ModItems.baseAlchemyItems, 4, 5); - //TODO NEW RECIPES! AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.weakBindingAgent), 10, new ItemStack[]{simpleCatalystStack, simpleCatalystStack, new ItemStack(Items.clay_ball)}, 2); AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.standardBindingAgent), 15, new ItemStack[]{new ItemStack(ModItems.weakBindingAgent), sanctusStack, new ItemStack(ModItems.crystallos)}, 3); @@ -887,7 +886,6 @@ public class AlchemicalWizardry AlchemyRecipeRegistry.registerRecipe(reductusStack, 20, new ItemStack[]{redstoneStack, goldIngotStack, strengthenedCatalystStack, new ItemStack(Blocks.soul_sand), new ItemStack(Items.carrot)}, 3); AlchemyRecipeRegistry.registerRecipe(potentiaStack, 20, new ItemStack[]{glowstoneDustStack, strengthenedCatalystStack, lapisStack, lapisStack, new ItemStack(Items.quartz)}, 3); - HomSpellRegistry.registerBasicSpell(new ItemStack(Items.flint_and_steel), new SpellFireBurst()); HomSpellRegistry.registerBasicSpell(new ItemStack(Blocks.ice), new SpellFrozenWater()); HomSpellRegistry.registerBasicSpell(new ItemStack(Blocks.tnt), new SpellExplosions()); @@ -939,8 +937,6 @@ public class AlchemicalWizardry EntityRegistry.registerModEntity(EntityMinorDemonGruntGuardianIce.class, "MinorDemonGruntGuardianIce", 42, this, 80, 3, true); EntityRegistry.registerModEntity(EntityMinorDemonGruntGuardianEarth.class, "MinorDemonGruntGuardianEarth", 43, this, 80, 3, true); - - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.standardBindingAgent), 1, 3, this.standardBindingAgentDungeonChance / 5)); ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.mundanePowerCatalyst), 1, 1, this.mundanePowerCatalystDungeonChance / 5)); ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.mundaneLengtheningCatalyst), 1, 1, this.mundaneLengtheningCatalystDungeonChance / 5)); @@ -1133,7 +1129,7 @@ public class AlchemicalWizardry { proxy.registerPostSideObjects(); //TODO Thaumcraft Integration - if (Loader.isModLoaded("Thaumcraft")) +/* if (Loader.isModLoaded("Thaumcraft")) { isThaumcraftLoaded = true; @@ -1162,7 +1158,6 @@ public class AlchemicalWizardry ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguinePants), aspectList); ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguineBoots), aspectList); - if (itemGoggles != null) { BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineHelmet), itemGoggles); @@ -1242,7 +1237,8 @@ public class AlchemicalWizardry // HarvestRegistry.registerHarvestHandler(new AgriCraftCropHarvestHandler()); // AlchemicalWizardry.logger.info("Loaded AgriCraft Handlers!"); // } - +*/ + isThaumcraftLoaded = Loader.isModLoaded("Thaumcraft"); //this is temp. isBotaniaLoaded = Loader.isModLoaded("Botania"); isPneumaticCraftLoaded = Loader.isModLoaded("PneumaticCraft"); isFMPLoaded = Loader.isModLoaded("ForgeMultipart"); @@ -1261,12 +1257,12 @@ public class AlchemicalWizardry // this.createItemTextureFiles(); } - @Optional.Method(modid = "guideapi") +/* @Optional.Method(modid = "guideapi") public static void registerBMBook() { BloodMagicGuide.registerGuide(); } - +*/ public static void blacklistAccelerators() { if (Loader.isModLoaded("Torcherino")) From f046b07a8214e17a43518fea4056e4edc382a8f8 Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Wed, 29 Jul 2015 11:25:11 -0400 Subject: [PATCH 07/33] Reworked more rituals, allowed Int3 to be created from BlockPos - note for future, may replace Int3 with Vec3i for future use --- .../alchemicalWizardry/api/Int3.java | 6 ++++ .../items/routing/InputRoutingFocus.java | 6 ++-- .../common/items/routing/RoutingFocus.java | 33 ++++++++++--------- .../rituals/RitualEffectInterdiction.java | 16 ++++----- .../rituals/RitualEffectItemRouting.java | 21 ++++++------ .../rituals/RitualEffectItemSuction.java | 18 +++++----- .../common/rituals/RitualEffectJumping.java | 2 +- .../common/rituals/RitualEffectLeap.java | 2 +- .../rituals/RitualEffectLifeConduit.java | 13 ++++---- .../common/rituals/RitualEffectMagnetic.java | 25 +++++++------- .../rituals/RitualEffectOmegaStalling.java | 6 ++-- .../common/rituals/RitualEffectOmegaTest.java | 1 - .../common/rituals/RitualEffectSpawnWard.java | 28 +++++++--------- 13 files changed, 90 insertions(+), 87 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/Int3.java b/src/main/java/WayofTime/alchemicalWizardry/api/Int3.java index 16facc02..bf29e713 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/Int3.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/Int3.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.api; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.BlockPos; public class Int3 @@ -9,6 +10,11 @@ public class Int3 public int yCoord; public int zCoord; + public Int3(BlockPos pos) + { + this(pos.getX(), pos.getY(), pos.getZ()); + } + public Int3(int xCoord, int yCoord, int zCoord) { this.xCoord = xCoord; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java index 5e3250ff..eb0ce04e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java @@ -1,8 +1,8 @@ package WayofTime.alchemicalWizardry.common.items.routing; -import net.minecraft.client.renderer.texture.IIconRegister; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; +import codechicken.lib.render.TextureUtils.IIconRegister; public class InputRoutingFocus extends RoutingFocus { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/RoutingFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/RoutingFocus.java index 32e456a7..cdcc8f61 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/RoutingFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/RoutingFocus.java @@ -8,10 +8,11 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumFacing; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; @@ -41,18 +42,18 @@ public class RoutingFocus extends Item // // public void cycleDirection(ItemStack itemStack) // { -// ForgeDirection dir = this.getSetDirection(itemStack); +// EnumFacing dir = this.getSetDirection(itemStack); // int direction = dir.ordinal(); // direction++; -// if(direction >= ForgeDirection.VALID_DIRECTIONS.length) +// if(direction >= EnumFacing.VALID_DIRECTIONS.length) // { // direction = 0; // } // -// this.setSetDirection(itemStack, ForgeDirection.getOrientation(direction)); +// this.setSetDirection(itemStack, EnumFacing.getOrientation(direction)); // } - public ForgeDirection getSetDirection(ItemStack itemStack) + public EnumFacing getSetDirection(ItemStack itemStack) { if(!itemStack.hasTagCompound()) { @@ -61,10 +62,10 @@ public class RoutingFocus extends Item NBTTagCompound tag = itemStack.getTagCompound(); - return ForgeDirection.getOrientation(tag.getInteger("direction")); + return EnumFacing.getFront(tag.getInteger("direction")); } - public void setSetDirection(ItemStack itemStack, ForgeDirection dir) + public void setSetDirection(ItemStack itemStack, EnumFacing dir) { if(!itemStack.hasTagCompound()) { @@ -96,14 +97,14 @@ public class RoutingFocus extends Item } @Override - public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) + public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) { if(world.isRemote) { return false; } - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); if(tile instanceof IInventory) { if(player.isSneaking()) @@ -111,7 +112,7 @@ public class RoutingFocus extends Item if(this instanceof ILimitedRoutingFocus) { int pastAmount = ((ILimitedRoutingFocus)this).getRoutingFocusLimit(stack); - int amount = SpellHelper.getNumberOfItemsInInventory((IInventory)tile, ForgeDirection.getOrientation(side)); + int amount = SpellHelper.getNumberOfItemsInInventory((IInventory)tile, side); if(amount != pastAmount) { ((ILimitedRoutingFocus)this).setRoutingFocusLimit(stack, amount); @@ -120,8 +121,8 @@ public class RoutingFocus extends Item } } - this.setCoordinates(stack, x, y, z); - this.setSetDirection(stack, ForgeDirection.getOrientation(side)); + this.setCoordinates(stack, pos); + this.setSetDirection(stack, side); return true; } @@ -129,7 +130,7 @@ public class RoutingFocus extends Item return true; } - public void setCoordinates(ItemStack itemStack, int x, int y, int z) + public void setCoordinates(ItemStack itemStack, BlockPos pos) { if(!itemStack.hasTagCompound()) { @@ -138,9 +139,9 @@ public class RoutingFocus extends Item NBTTagCompound tag = itemStack.getTagCompound(); - tag.setInteger("xCoord", x); - tag.setInteger("yCoord", y); - tag.setInteger("zCoord", z); + tag.setInteger("xCoord", pos.getX()); + tag.setInteger("yCoord", pos.getY()); + tag.setInteger("zCoord", pos.getZ()); } public int xCoord(ItemStack itemStack) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java index 46a510f7..63447ab4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java @@ -37,7 +37,7 @@ public class RitualEffectInterdiction extends RitualEffect { int d0 = 5; - List<EntityLivingBase> list = SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, d0, d0); + List<EntityLivingBase> list = SpellHelper.getLivingEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, d0, d0); boolean flag = false; boolean hasOffensa = this.canDrainReagent(ritualStone, ReagentRegistry.magicalesReagent, magicalesDrain, false); @@ -47,9 +47,9 @@ public class RitualEffectInterdiction extends RitualEffect { if (!((!hasOffensa && entityLiving instanceof EntityPlayer) && (SpellHelper.getUsername((EntityPlayer) entityLiving).equals(owner)))) { - double xDif = entityLiving.posX - x; - double yDif = entityLiving.posY - (y + 1); - double zDif = entityLiving.posZ - z; + double xDif = entityLiving.posX - (pos.getX() - 0.5); + double yDif = entityLiving.posY - ((pos.getY() - 0.5) + 1); + double zDif = entityLiving.posZ - (pos.getZ() - 0.5); entityLiving.motionX = 0.1 * xDif; entityLiving.motionY = 0.1 * yDif; entityLiving.motionZ = 0.1 * zDif; @@ -77,7 +77,7 @@ public class RitualEffectInterdiction extends RitualEffect int horizontalRadius = 5; int verticalRadius = 5; - List<EntityItem> itemList = world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(x, y, z, x + 1, y + 1, z + 1).expand(horizontalRadius, verticalRadius, horizontalRadius)); + List<EntityItem> itemList = world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(pos, pos.add(1, 1, 1)).expand(horizontalRadius, verticalRadius, horizontalRadius)); if (itemList != null) { @@ -85,9 +85,9 @@ public class RitualEffectInterdiction extends RitualEffect for (EntityItem entity : itemList) { - double xDif = entity.posX - x; - double yDif = entity.posY - (y + 1); - double zDif = entity.posZ - z; + double xDif = entity.posX - (pos.getX() - 0.5); + double yDif = entity.posY - ((pos.getY() - 0.5) + 1); + double zDif = entity.posZ - (pos.getZ() - 0.5); entity.motionX = 0.1 * xDif; entity.motionY = 0.1 * yDif; entity.motionZ = 0.1 * zDif; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java index 5d7c6b72..73defce4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java @@ -11,8 +11,8 @@ import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.RoutingFocusParadigm; import WayofTime.alchemicalWizardry.api.RoutingFocusPosAndFacing; @@ -48,7 +48,8 @@ public class RitualEffectItemRouting extends RitualEffect for(int i=0; i<4; i++) //Check output foci chests, return if none available { Int3 outputFocusChest = this.getOutputBufferChestLocation(i); - TileEntity outputFocusInv = world.getTileEntity(x + outputFocusChest.xCoord, y + outputFocusChest.yCoord, z + outputFocusChest.zCoord); + BlockPos newPos = pos.add(outputFocusChest.xCoord, outputFocusChest.yCoord, outputFocusChest.zCoord); + TileEntity outputFocusInv = world.getTileEntity(newPos); if(outputFocusInv instanceof IInventory) { outputList.add((IInventory)outputFocusInv); @@ -68,7 +69,7 @@ public class RitualEffectItemRouting extends RitualEffect RoutingFocusParadigm parad = new RoutingFocusParadigm(); TileEntity outputChest = null; //Destination - ForgeDirection inputDirection; + EnumFacing inputDirection; { IInventory outputChestInventory = null; @@ -108,9 +109,9 @@ public class RitualEffectItemRouting extends RitualEffect continue; } inputDirection = posAndFacing.facing; - if(outputChest == null || !posAndFacing.location.equals(new Int3(outputChest.xCoord, outputChest.yCoord, outputChest.zCoord))) + if(outputChest == null || !posAndFacing.location.equals(new Int3(outputChest.getPos()))) { - outputChest = world.getTileEntity(posAndFacing.location.xCoord, posAndFacing.location.yCoord, posAndFacing.location.zCoord); + outputChest = world.getTileEntity(new BlockPos(posAndFacing.location.xCoord, posAndFacing.location.yCoord, posAndFacing.location.zCoord)); if(outputChest instanceof IInventory) { outputChestInventory = (IInventory)outputChest; @@ -123,7 +124,7 @@ public class RitualEffectItemRouting extends RitualEffect for(int i=0; i<4; i++) { Int3 inputFocusChest = this.getInputBufferChestLocation(i); - TileEntity inputFocusInv = world.getTileEntity(x + inputFocusChest.xCoord, y + inputFocusChest.yCoord, z + inputFocusChest.zCoord); + TileEntity inputFocusInv = world.getTileEntity(pos.add(inputFocusChest.xCoord, inputFocusChest.yCoord, inputFocusChest.zCoord)); if(inputFocusInv instanceof IInventory) { for(int ji=0; ji<((IInventory) inputFocusInv).getSizeInventory(); ji++) //Iterate through foci inventory @@ -132,15 +133,15 @@ public class RitualEffectItemRouting extends RitualEffect if(inputFocusStack != null && inputFocusStack.getItem() instanceof InputRoutingFocus) { InputRoutingFocus inputFocus = (InputRoutingFocus)inputFocusStack.getItem(); - TileEntity inputChest = world.getTileEntity(inputFocus.xCoord(inputFocusStack), inputFocus.yCoord(inputFocusStack), inputFocus.zCoord(inputFocusStack)); + TileEntity inputChest = world.getTileEntity(new BlockPos(inputFocus.xCoord(inputFocusStack), inputFocus.yCoord(inputFocusStack), inputFocus.zCoord(inputFocusStack))); if(inputChest instanceof IInventory) { IInventory inputChestInventory = (IInventory)inputChest; - ForgeDirection syphonDirection = inputFocus.getSetDirection(inputFocusStack); + EnumFacing syphonDirection = inputFocus.getSetDirection(inputFocusStack); boolean[] canSyphonList = new boolean[inputChestInventory.getSizeInventory()]; if(inputChest instanceof ISidedInventory) { - int[] validSlots = ((ISidedInventory) inputChest).getAccessibleSlotsFromSide(syphonDirection.ordinal()); + int[] validSlots = ((ISidedInventory) inputChest).getSlotsForFace(syphonDirection); for(int in : validSlots) { canSyphonList[in] = true; @@ -158,7 +159,7 @@ public class RitualEffectItemRouting extends RitualEffect if(canSyphonList[ni]) { ItemStack syphonedStack = inputChestInventory.getStackInSlot(ni); //Has a syphoned item linked, next need to find a destination - if(syphonedStack == null || (inputChestInventory instanceof ISidedInventory && !((ISidedInventory)inputChestInventory).canExtractItem(ni, syphonedStack, syphonDirection.ordinal()))) + if(syphonedStack == null || (inputChestInventory instanceof ISidedInventory && !((ISidedInventory)inputChestInventory).canExtractItem(ni, syphonedStack, syphonDirection))) { continue; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java index f2eb38c8..cccb4273 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java @@ -8,8 +8,8 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; @@ -32,7 +32,7 @@ public class RitualEffectItemSuction extends RitualEffect World world = ritualStone.getWorldObj(); BlockPos pos = ritualStone.getPosition(); - TileEntity tile = world.getTileEntity(x, y + 1, z); + TileEntity tile = world.getTileEntity(pos.offsetUp()); IInventory tileEntity; if (tile instanceof IInventory) @@ -53,7 +53,7 @@ public class RitualEffectItemSuction extends RitualEffect SoulNetworkHandler.causeNauseaToPlayer(owner); } else { - List<EntityItem> itemDropList = SpellHelper.getItemsInRange(world, x + 0.5f, y + 0.5f, z + 0.5f, 10, 10); + List<EntityItem> itemDropList = SpellHelper.getItemsInRange(world, pos.getX() + 0.5f, pos.getY() + 0.5f, pos.getZ() + 0.5f, 10, 10); boolean hasReductus = this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); @@ -65,16 +65,16 @@ public class RitualEffectItemSuction extends RitualEffect for (EntityItem itemEntity : itemDropList) { - hasReductus = hasReductus && this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); - if (hasReductus && itemEntity.age < this.timeDelayMin) - { - continue; - } +// hasReductus = hasReductus && this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); +// if (hasReductus && itemEntity.age < this.timeDelayMin) +// { +// continue; +// } ItemStack item = itemEntity.getEntityItem(); ItemStack copyStack = itemEntity.getEntityItem().copy(); int pastAmount = copyStack.stackSize; - ItemStack newStack = SpellHelper.insertStackIntoInventory(copyStack, tileEntity, ForgeDirection.DOWN); + ItemStack newStack = SpellHelper.insertStackIntoInventory(copyStack, tileEntity, EnumFacing.DOWN); if (newStack != null && newStack.stackSize < pastAmount) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java index 7daa6b31..be388038 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java @@ -31,7 +31,7 @@ public class RitualEffectJumping extends RitualEffect BlockPos pos = ritualStone.getPosition(); double range = 0.5; - List<EntityLivingBase> livingList = SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 1.5, z + 0.5, range, range); + List<EntityLivingBase> livingList = SpellHelper.getLivingEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 1.5, pos.getZ() + 0.5, range, range); if (currentEssence < this.getCostPerRefresh() * livingList.size()) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java index aa7e0e04..47c54f00 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java @@ -35,7 +35,7 @@ public class RitualEffectLeap extends RitualEffect double range = 2.0; - List<EntityLivingBase> livingList = SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range); + List<EntityLivingBase> livingList = SpellHelper.getLivingEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, range, range); if (livingList == null) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java index 3cc98a4c..65b28ff9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java @@ -5,8 +5,8 @@ import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; import WayofTime.alchemicalWizardry.AlchemicalWizardry; @@ -37,9 +37,10 @@ public class RitualEffectLifeConduit extends RitualEffect { for (int k = -10; k <= 10; k++) { - if (world.getTileEntity(x + i, y + k, z + j) instanceof IBloodAltar) + BlockPos newPos = pos.add(i, j, k); + if (world.getTileEntity(newPos) instanceof IBloodAltar) { - tileAltar = (IBloodAltar) world.getTileEntity(x + i, y + k, z + j); + tileAltar = (IBloodAltar) world.getTileEntity(newPos); testFlag = true; } } @@ -60,7 +61,7 @@ public class RitualEffectLifeConduit extends RitualEffect int vertRange = 20; EntityPlayer entityOwner = null; - List<EntityPlayer> list = SpellHelper.getPlayersInRange(world, x, y, z, d0, vertRange); + List<EntityPlayer> list = SpellHelper.getPlayersInRange(world, pos.getX(), pos.getY(), pos.getZ(), d0, vertRange); for (EntityPlayer player : list) { @@ -75,10 +76,10 @@ public class RitualEffectLifeConduit extends RitualEffect return; } - int fillAmount = Math.min(currentEssence / 2, ((IFluidHandler)tileAltar).fill(ForgeDirection.UP, new FluidStack(AlchemicalWizardry.lifeEssenceFluid, 10000), false)); + int fillAmount = Math.min(currentEssence / 2, ((IFluidHandler)tileAltar).fill(EnumFacing.UP, new FluidStack(AlchemicalWizardry.lifeEssenceFluid, 10000), false)); { - ((IFluidHandler)tileAltar).fill(ForgeDirection.UP, new FluidStack(AlchemicalWizardry.lifeEssenceFluid, fillAmount), true); + ((IFluidHandler)tileAltar).fill(EnumFacing.UP, new FluidStack(AlchemicalWizardry.lifeEssenceFluid, fillAmount), true); if (entityOwner.getHealth() > 2.0f && fillAmount != 0) { entityOwner.setHealth(2.0f); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java index 5a4945e0..ab661c3a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java @@ -8,6 +8,7 @@ import java.util.Map; import net.minecraft.block.Block; import net.minecraft.block.BlockOre; import net.minecraft.block.BlockRedstoneOre; +import net.minecraft.block.state.IBlockState; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -87,9 +88,7 @@ public class RitualEffectMagnetic extends RitualEffect SoulNetworkHandler.causeNauseaToPlayer(owner); } else { - int xRep = 0; - int yRep = 0; - int zRep = 0; + BlockPos posRep = null; boolean replace = false; outer: @@ -99,11 +98,10 @@ public class RitualEffectMagnetic extends RitualEffect { for (int k = -1; k <= 1; k++) { - if ((!replace) && world.isAirBlock(x + i, y + j, z + k)) + BlockPos newPos = pos.add(i, j, k); + if ((!replace) && world.isAirBlock(newPos)) { - xRep = x + i; - yRep = y + j; - zRep = z + k; + posRep = newPos; replace = true; break outer; } @@ -115,7 +113,7 @@ public class RitualEffectMagnetic extends RitualEffect { Int3 lastPos = this.getLastPosition(ritualStone.getCustomRitualTag()); - int j = y - 1; + int j = pos.getY() - 1; int i = 0; int k = 0; @@ -132,13 +130,14 @@ public class RitualEffectMagnetic extends RitualEffect { while(k <= radius) { - Block block = world.getBlock(x + i, j, z + k); - int meta = world.getBlockMetadata(x + i, j, z + k); + BlockPos newPos = new BlockPos(pos.getX() + i, j, pos.getZ() + k); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); - if (isBlockOre(block, meta)) + if (isBlockOre(block, block.getMetaFromState(state))) { //Allow swapping code. This means the searched block is an ore. - BlockTeleposer.swapBlocks(this, world, world, x + i, j, z + k, xRep, yRep, zRep); + BlockTeleposer.swapBlocks(this, world, world, newPos, posRep); SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); if (hasPotentia) @@ -171,7 +170,7 @@ public class RitualEffectMagnetic extends RitualEffect return; } - j = y - 1; + j = pos.getY() - 1; this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); return; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java index e8f741d6..b3fe7231 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java @@ -34,16 +34,16 @@ public class RitualEffectOmegaStalling extends RitualEffect return; } - TileEntity tile = world.getTileEntity(x, y + 5, z); + TileEntity tile = world.getTileEntity(pos.offsetUp(5)); if(tile instanceof TileEntityBeacon) { - int levels = ((TileEntityBeacon) tile).getLevels(); + int levels = ((TileEntityBeacon) tile).getField(0); if(levels >= 4) { int horizontalRadius = 100; int verticalRadius = 100; - List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, x + 0.5, y + 0.5, z + 0.5, horizontalRadius, verticalRadius); + List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, horizontalRadius, verticalRadius); for(EntityPlayer player : playerList) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java index 401823fd..47b6bc16 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java @@ -12,7 +12,6 @@ import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java index 056f6611..07a11c4d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java @@ -1,17 +1,17 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import net.minecraft.util.BlockPos; +import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks; import WayofTime.alchemicalWizardry.common.CoordAndRange; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; public class RitualEffectSpawnWard extends RitualEffect { @@ -39,34 +39,30 @@ public class RitualEffectSpawnWard extends RitualEffect List<CoordAndRange> list = AlchemicalWizardryEventHooks.respawnMap.get(new Integer(dimension)); if (list != null) { - if (!list.contains(new CoordAndRange(x, y, z, horizRange, vertRange))) + if (!list.contains(new CoordAndRange(pos, horizRange, vertRange))) { - boolean hasFoundAndRemoved = false; for (CoordAndRange coords : list) { - int xLocation = coords.xCoord; - int yLocation = coords.yCoord; - int zLocation = coords.zCoord; + BlockPos locationPos = coords.getPos(); - if (xLocation == x && yLocation == y && zLocation == z) + if (locationPos.equals(pos)) { list.remove(coords); - hasFoundAndRemoved = true; break; } } - list.add(new CoordAndRange(x, y, z, horizRange, vertRange)); + list.add(new CoordAndRange(pos, horizRange, vertRange)); } } else { list = new LinkedList(); - list.add(new CoordAndRange(x, y, z, horizRange, vertRange)); + list.add(new CoordAndRange(pos, horizRange, vertRange)); AlchemicalWizardryEventHooks.respawnMap.put(new Integer(dimension), list); } } else { List<CoordAndRange> list = new LinkedList(); - list.add(new CoordAndRange(x, y, z, horizRange, vertRange)); + list.add(new CoordAndRange(pos, horizRange, vertRange)); AlchemicalWizardryEventHooks.respawnMap.put(new Integer(dimension), list); } From e5abfd03e5bfc722ad182769b29c726cb19ae3fd Mon Sep 17 00:00:00 2001 From: Arcaratus <byou64@gmail.com> Date: Wed, 29 Jul 2015 11:30:24 -0400 Subject: [PATCH 08/33] Did ModBlocks --- .../AlchemicalWizardry.java | 11 +- .../BloodMagicConfiguration.java | 233 ++++-------------- .../alchemicalWizardry/ModBlocks.java | 211 ++++++++-------- ...ArmourForge.java => BlockArmourForge.java} | 25 +- .../{BloodRune.java => BlockBloodRune.java} | 4 +- ...neBrick.java => BlockBloodStoneBrick.java} | 4 +- ...itingTable.java => BlockChemistrySet.java} | 6 +- ...encyRune.java => BlockEfficiencyRune.java} | 4 +- ...EmptySocket.java => BlockEmptySocket.java} | 4 +- ...lockSocket.java => BlockFilledSocket.java} | 48 +--- ...ne.java => BlockImperfectRitualStone.java} | 4 +- ...rucible.java => BlockIncenseCrucible.java} | 4 +- ...ck.java => BlockLargeBloodStoneBrick.java} | 4 +- ...ssenceBlock.java => BlockLifeEssence.java} | 4 +- .../{MimicBlock.java => BlockMimic.java} | 6 +- ...RitualStone.java => BlockRitualStone.java} | 4 +- ...crifice.java => BlockRuneOfSacrifice.java} | 4 +- ...ice.java => BlockRuneOfSelfSacrifice.java} | 4 +- ...{SpectralBlock.java => BlockSpectral.java} | 4 +- .../{SpeedRune.java => BlockSpeedRune.java} | 4 +- ...lockHomHeart.java => BlockSpellTable.java} | 4 +- .../bloodAltarUpgrade/UpgradedAltars.java | 8 +- .../common/items/ItemRitualDismantler.java | 4 +- .../assets/alchemicalwizardry/lang/en_US.lang | 4 +- 24 files changed, 216 insertions(+), 396 deletions(-) rename src/main/java/WayofTime/alchemicalWizardry/common/block/{ArmourForge.java => BlockArmourForge.java} (92%) rename src/main/java/WayofTime/alchemicalWizardry/common/block/{BloodRune.java => BlockBloodRune.java} (98%) rename src/main/java/WayofTime/alchemicalWizardry/common/block/{BloodStoneBrick.java => BlockBloodStoneBrick.java} (90%) rename src/main/java/WayofTime/alchemicalWizardry/common/block/{BlockWritingTable.java => BlockChemistrySet.java} (96%) rename src/main/java/WayofTime/alchemicalWizardry/common/block/{EfficiencyRune.java => BlockEfficiencyRune.java} (89%) rename src/main/java/WayofTime/alchemicalWizardry/common/block/{EmptySocket.java => BlockEmptySocket.java} (91%) rename src/main/java/WayofTime/alchemicalWizardry/common/block/{BlockSocket.java => BlockFilledSocket.java} (73%) rename src/main/java/WayofTime/alchemicalWizardry/common/block/{ImperfectRitualStone.java => BlockImperfectRitualStone.java} (97%) rename src/main/java/WayofTime/alchemicalWizardry/common/block/{BlockCrucible.java => BlockIncenseCrucible.java} (98%) rename src/main/java/WayofTime/alchemicalWizardry/common/block/{LargeBloodStoneBrick.java => BlockLargeBloodStoneBrick.java} (89%) rename src/main/java/WayofTime/alchemicalWizardry/common/block/{LifeEssenceBlock.java => BlockLifeEssence.java} (94%) rename src/main/java/WayofTime/alchemicalWizardry/common/block/{MimicBlock.java => BlockMimic.java} (98%) rename src/main/java/WayofTime/alchemicalWizardry/common/block/{RitualStone.java => BlockRitualStone.java} (97%) rename src/main/java/WayofTime/alchemicalWizardry/common/block/{RuneOfSacrifice.java => BlockRuneOfSacrifice.java} (88%) rename src/main/java/WayofTime/alchemicalWizardry/common/block/{RuneOfSelfSacrifice.java => BlockRuneOfSelfSacrifice.java} (88%) rename src/main/java/WayofTime/alchemicalWizardry/common/block/{SpectralBlock.java => BlockSpectral.java} (97%) rename src/main/java/WayofTime/alchemicalWizardry/common/block/{SpeedRune.java => BlockSpeedRune.java} (90%) rename src/main/java/WayofTime/alchemicalWizardry/common/block/{BlockHomHeart.java => BlockSpellTable.java} (97%) diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index 05150a8f..4fe093a4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -33,7 +33,6 @@ import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.ModContainer; -import net.minecraftforge.fml.common.Optional; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLInterModComms; @@ -83,7 +82,7 @@ import WayofTime.alchemicalWizardry.common.ModLivingDropsEvent; import WayofTime.alchemicalWizardry.common.NewPacketHandler; import WayofTime.alchemicalWizardry.common.achievements.ModAchievements; import WayofTime.alchemicalWizardry.common.alchemy.CombinedPotionRegistry; -import WayofTime.alchemicalWizardry.common.block.ArmourForge; +import WayofTime.alchemicalWizardry.common.block.BlockArmourForge; import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars; import WayofTime.alchemicalWizardry.common.compress.AdvancedCompressionHandler; import WayofTime.alchemicalWizardry.common.compress.BaseCompressionHandler; @@ -117,18 +116,14 @@ import WayofTime.alchemicalWizardry.common.entity.mob.EntityShadeElemental; import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem; import WayofTime.alchemicalWizardry.common.entity.mob.EntityWaterElemental; import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon; -import WayofTime.alchemicalWizardry.common.guide.RecipeHolder; import WayofTime.alchemicalWizardry.common.harvest.BloodMagicHarvestHandler; import WayofTime.alchemicalWizardry.common.harvest.CactusReedHarvestHandler; import WayofTime.alchemicalWizardry.common.harvest.GourdHarvestHandler; -import WayofTime.alchemicalWizardry.common.harvest.PamHarvestCompatRegistry; import WayofTime.alchemicalWizardry.common.items.ItemIncense; -import WayofTime.alchemicalWizardry.common.items.ItemMailOrderCatalogue; import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; import WayofTime.alchemicalWizardry.common.items.forestry.ItemBloodFrame; import WayofTime.alchemicalWizardry.common.items.sigil.holding.HoldingPacketHandler; -import WayofTime.alchemicalWizardry.common.items.thaumcraft.ItemSanguineArmour; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmEarth; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmFire; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmWater; @@ -586,7 +581,7 @@ public class AlchemicalWizardry { int craftingConstant = OreDictionary.WILDCARD_VALUE; - ModBlocks.registerBlocksInInit(); + ModBlocks.init(); //blocks proxy.registerRenderers(); @@ -810,7 +805,7 @@ public class AlchemicalWizardry //Gui registration UpgradedAltars.loadAltars(); - ArmourForge.initializeRecipes(); + BlockArmourForge.initializeRecipes(); TEPlinth.initialize(); initAlchemyPotionRecipes(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java b/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java index 0789ad02..3eed0062 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java +++ b/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java @@ -32,6 +32,8 @@ public class BloodMagicConfiguration public static Configuration config; + public static String[] blocksToBeDisabled; + public static String[] itemsToBeDisabled; public static String[] teleposerBlacklist; public static String[] blacklist = {}; @@ -193,6 +195,9 @@ public class BloodMagicConfiguration AlchemicalWizardry.isDemonRitualCreativeOnly = config.get(tempDemonConfigs, "IsDemonRitualCreativeOnly", false).getBoolean(); BoundArmour.tryComplexRendering = config.get("WimpySettings", "UseFancyBoundArmour", true).getBoolean(true); + + blocksToBeDisabled = config.getStringList("Disable blocks here", "WimpySettings", new String[]{""}, "Type in the unlocalized name of the block you want disabled here (separate them using ENTER)"); + itemsToBeDisabled = config.getStringList("Disable items here", "WimpySettings", new String[]{""}, "Type in the unlocalized name of the item you want disabled (separate them using ENTER)"); // ItemIncense.itemDuration = config.get("TestIncenseSettings", "ItemDuration", 100).getInt(); // ItemIncense.minValue = config.get("TestIncenseSettings", "MinValue", 0).getInt(); @@ -248,187 +253,49 @@ public class BloodMagicConfiguration config.save(); } - public static void blacklistRituals() - { - if (AlchemicalWizardry.ritualDisabledWater) - { - Rituals.ritualMap.remove("AW001Water"); - Rituals.keyList.remove("AW001Water"); - } - if (AlchemicalWizardry.ritualDisabledLava) - { - Rituals.ritualMap.remove("AW002Lava"); - Rituals.keyList.remove("AW002Lava"); - } - if (AlchemicalWizardry.ritualDisabledGreenGrove) - { - Rituals.ritualMap.remove("AW003GreenGrove"); - Rituals.keyList.remove("AW003GreenGrove"); - } - if (AlchemicalWizardry.ritualDisabledInterdiction) - { - Rituals.ritualMap.remove("AW004Interdiction"); - Rituals.keyList.remove("AW004Interdiction"); - } - if (AlchemicalWizardry.ritualDisabledContainment) - { - Rituals.ritualMap.remove("AW005Containment"); - Rituals.keyList.remove("AW005Containment"); - } - if (AlchemicalWizardry.ritualDisabledBinding) - { - Rituals.ritualMap.remove("AW006Binding"); - Rituals.keyList.remove("AW006Binding"); - } - if (AlchemicalWizardry.ritualDisabledUnbinding) - { - Rituals.ritualMap.remove("AW007Unbinding");//007 reporting for duty - Rituals.keyList.remove("AW007Unbinding"); - } - if (AlchemicalWizardry.ritualDisabledHighJump) - { - Rituals.ritualMap.remove("AW008HighJump"); - Rituals.keyList.remove("AW008HighJump"); - } - if (AlchemicalWizardry.ritualDisabledMagnetism) - { - Rituals.ritualMap.remove("AW009Magnetism"); - Rituals.keyList.remove("AW009Magnetism"); - } - if (AlchemicalWizardry.ritualDisabledCrusher) - { - Rituals.ritualMap.remove("AW010Crusher"); - Rituals.keyList.remove("AW010Crusher"); - } - if (AlchemicalWizardry.ritualDisabledSpeed) - { - Rituals.ritualMap.remove("AW011Speed"); - Rituals.keyList.remove("AW011Speed"); - } - if (AlchemicalWizardry.ritualDisabledAnimalGrowth) - { - Rituals.ritualMap.remove("AW012AnimalGrowth"); - Rituals.keyList.remove("AW012AnimalGrowth"); - } - if (AlchemicalWizardry.ritualDisabledSuffering) - { - Rituals.ritualMap.remove("AW013Suffering"); - Rituals.keyList.remove("AW013Suffering"); - } - if (AlchemicalWizardry.ritualDisabledRegen) - { - Rituals.ritualMap.remove("AW014Regen"); - Rituals.keyList.remove("AW014Regen"); - } - if (AlchemicalWizardry.ritualDisabledFeatheredKnife) - { - Rituals.ritualMap.remove("AW015FeatheredKnife"); - Rituals.keyList.remove("AW015FeatheredKnife"); - } - if (AlchemicalWizardry.ritualDisabledFeatheredEarth) - { - Rituals.ritualMap.remove("AW016FeatheredEarth"); - Rituals.keyList.remove("AW016FeatheredEarth"); - } - if (AlchemicalWizardry.ritualDisabledGaia) - { - Rituals.ritualMap.remove("AW017Gaia"); - Rituals.keyList.remove("AW017Gaia"); - } - if (AlchemicalWizardry.ritualDisabledCondor) - { - Rituals.ritualMap.remove("AW018Condor"); - Rituals.keyList.remove("AW018Condor"); - } - if (AlchemicalWizardry.ritualDisabledFallingTower) - { - Rituals.ritualMap.remove("AW019FallingTower"); - Rituals.keyList.remove("AW019FallingTower"); - } - if (AlchemicalWizardry.ritualDisabledBalladOfAlchemy) - { - Rituals.ritualMap.remove("AW020BalladOfAlchemy"); - Rituals.keyList.remove("AW020BalladOfAlchemy"); - } - if (AlchemicalWizardry.ritualDisabledExpulsion) - { - Rituals.ritualMap.remove("AW021Expulsion"); - Rituals.keyList.remove("AW021Expulsion"); - } - if (AlchemicalWizardry.ritualDisabledSuppression) - { - Rituals.ritualMap.remove("AW022Suppression"); - Rituals.keyList.remove("AW022Suppression"); - } - if (AlchemicalWizardry.ritualDisabledZephyr) - { - Rituals.ritualMap.remove("AW023Zephyr"); - Rituals.keyList.remove("AW023Zephyr"); - } - if (AlchemicalWizardry.ritualDisabledHarvest) - { - Rituals.ritualMap.remove("AW024Harvest"); - Rituals.keyList.remove("AW024Harvest"); - } - if (AlchemicalWizardry.ritualDisabledConduit) - { - Rituals.ritualMap.remove("AW025Conduit"); - Rituals.keyList.remove("AW025Conduit"); - } - if (AlchemicalWizardry.ritualDisabledEllipsoid) - { - Rituals.ritualMap.remove("AW026Ellipsoid"); - Rituals.keyList.remove("AW026Ellipsoid"); - } - if (AlchemicalWizardry.ritualDisabledEvaporation) - { - Rituals.ritualMap.remove("AW027Evaporation"); - Rituals.keyList.remove("AW027Evaporation"); - } - if (AlchemicalWizardry.ritualDisabledSpawnWard) - { - Rituals.ritualMap.remove("AW028SpawnWard"); - Rituals.keyList.remove("AW028SpawnWard"); - } - if (AlchemicalWizardry.ritualDisabledVeilOfEvil) - { - Rituals.ritualMap.remove("AW029VeilOfEvil"); - Rituals.keyList.remove("AW029VeilOfEvil"); - } - if (AlchemicalWizardry.ritualDisabledFullStomach) - { - Rituals.ritualMap.remove("AW030FullStomach"); - Rituals.keyList.remove("AW030FullStomach"); - } - if (AlchemicalWizardry.ritualDisabledConvocation) - { - Rituals.ritualMap.remove("AW031Convocation"); - Rituals.keyList.remove("AW031Convocation"); - } - if (AlchemicalWizardry.ritualDisabledSymmetry) - { - Rituals.ritualMap.remove("AW032Symmetry"); - Rituals.keyList.remove("AW032Symmetry"); - } - if (AlchemicalWizardry.ritualDisabledStalling) - { - Rituals.ritualMap.remove("AW033Stalling"); - Rituals.keyList.remove("AW033Stalling"); - } - if (AlchemicalWizardry.ritualDisabledCrafting) - { - Rituals.ritualMap.remove("AW034Crafting"); - Rituals.keyList.remove("AW034Crafting"); - } - if (AlchemicalWizardry.ritualDisabledPhantomHands) - { - Rituals.ritualMap.remove("AW035PhantomHands"); - Rituals.keyList.remove("AW035PhantomHands"); - } - if (AlchemicalWizardry.ritualDisabledSphereIsland) - { - Rituals.ritualMap.remove("AW036SphereIsland"); - Rituals.keyList.remove("AW036SphereIsland"); - } - } + public static void blacklistRituals() + { + if (AlchemicalWizardry.ritualDisabledWater) r("AW001Water"); + if (AlchemicalWizardry.ritualDisabledLava) r("AW002Lava"); + if (AlchemicalWizardry.ritualDisabledGreenGrove) r("AW003GreenGrove"); + if (AlchemicalWizardry.ritualDisabledInterdiction) r("AW004Interdiction"); + if (AlchemicalWizardry.ritualDisabledContainment) r("AW005Containment"); + if (AlchemicalWizardry.ritualDisabledBinding) r("AW006Binding"); + if (AlchemicalWizardry.ritualDisabledUnbinding) r("AW007Unbinding"); // "A medium dry martini, lemon peel. Shaken, not stirred." + if (AlchemicalWizardry.ritualDisabledHighJump) r("AW008HighJump"); + if (AlchemicalWizardry.ritualDisabledMagnetism) r("AW009Magnetism"); + if (AlchemicalWizardry.ritualDisabledCrusher) r("AW010Crusher"); + if (AlchemicalWizardry.ritualDisabledSpeed) r("AW011Speed"); + if (AlchemicalWizardry.ritualDisabledAnimalGrowth) r("AW012AnimalGrowth"); + if (AlchemicalWizardry.ritualDisabledSuffering) r("AW013Suffering"); + if (AlchemicalWizardry.ritualDisabledRegen) r("AW014Regen"); + if (AlchemicalWizardry.ritualDisabledFeatheredKnife) r("AW015FeatheredKnife"); + if (AlchemicalWizardry.ritualDisabledFeatheredEarth) r("AW016FeatheredEarth"); + if (AlchemicalWizardry.ritualDisabledGaia) r("AW017Gaia"); + if (AlchemicalWizardry.ritualDisabledCondor) r("AW018Condor"); + if (AlchemicalWizardry.ritualDisabledFallingTower) r("AW019FallingTower"); + if (AlchemicalWizardry.ritualDisabledBalladOfAlchemy) r("AW020BalladOfAlchemy"); + if (AlchemicalWizardry.ritualDisabledExpulsion) r("AW021Expulsion"); + if (AlchemicalWizardry.ritualDisabledSuppression) r("AW022Suppression"); + if (AlchemicalWizardry.ritualDisabledZephyr) r("AW023Zephyr"); + if (AlchemicalWizardry.ritualDisabledHarvest) r("AW024Harvest"); + if (AlchemicalWizardry.ritualDisabledConduit) r("AW025Conduit"); + if (AlchemicalWizardry.ritualDisabledEllipsoid) r("AW026Ellipsoid"); + if (AlchemicalWizardry.ritualDisabledEvaporation) r("AW027Evaporation"); + if (AlchemicalWizardry.ritualDisabledSpawnWard) r("AW028SpawnWard"); + if (AlchemicalWizardry.ritualDisabledVeilOfEvil) r("AW029VeilOfEvil"); + if (AlchemicalWizardry.ritualDisabledFullStomach) r("AW030FullStomach"); + if (AlchemicalWizardry.ritualDisabledConvocation) r("AW031Convocation"); + if (AlchemicalWizardry.ritualDisabledSymmetry) r("AW032Symmetry"); + if (AlchemicalWizardry.ritualDisabledStalling) r("AW033Stalling"); + if (AlchemicalWizardry.ritualDisabledCrafting) r("AW034Crafting"); + if (AlchemicalWizardry.ritualDisabledPhantomHands) r("AW035PhantomHands"); + if (AlchemicalWizardry.ritualDisabledSphereIsland) r("AW036SphereIsland"); + } + + private static void r(String ritualID) + { + Rituals.ritualMap.remove(ritualID); + Rituals.keyList.remove(ritualID); + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java b/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java index 765653b9..d766c912 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java @@ -1,24 +1,25 @@ package WayofTime.alchemicalWizardry; import net.minecraft.block.Block; +import net.minecraft.item.ItemBlock; import net.minecraftforge.fml.common.registry.GameRegistry; -import WayofTime.alchemicalWizardry.common.block.ArmourForge; +import WayofTime.alchemicalWizardry.common.block.BlockArmourForge; import WayofTime.alchemicalWizardry.common.block.BlockAlchemicCalcinator; import WayofTime.alchemicalWizardry.common.block.BlockAltar; import WayofTime.alchemicalWizardry.common.block.BlockBelljar; import WayofTime.alchemicalWizardry.common.block.BlockBloodLightSource; import WayofTime.alchemicalWizardry.common.block.BlockConduit; -import WayofTime.alchemicalWizardry.common.block.BlockCrucible; +import WayofTime.alchemicalWizardry.common.block.BlockIncenseCrucible; import WayofTime.alchemicalWizardry.common.block.BlockCrystal; import WayofTime.alchemicalWizardry.common.block.BlockDemonPortal; import WayofTime.alchemicalWizardry.common.block.BlockEnchantmentGlyph; -import WayofTime.alchemicalWizardry.common.block.BlockHomHeart; +import WayofTime.alchemicalWizardry.common.block.BlockSpellTable; import WayofTime.alchemicalWizardry.common.block.BlockMasterStone; import WayofTime.alchemicalWizardry.common.block.BlockPedestal; import WayofTime.alchemicalWizardry.common.block.BlockPlinth; import WayofTime.alchemicalWizardry.common.block.BlockReagentConduit; import WayofTime.alchemicalWizardry.common.block.BlockSchematicSaver; -import WayofTime.alchemicalWizardry.common.block.BlockSocket; +import WayofTime.alchemicalWizardry.common.block.BlockFilledSocket; import WayofTime.alchemicalWizardry.common.block.BlockSpectralContainer; import WayofTime.alchemicalWizardry.common.block.BlockSpellEffect; import WayofTime.alchemicalWizardry.common.block.BlockSpellEnhancement; @@ -26,20 +27,20 @@ import WayofTime.alchemicalWizardry.common.block.BlockSpellModifier; import WayofTime.alchemicalWizardry.common.block.BlockSpellParadigm; import WayofTime.alchemicalWizardry.common.block.BlockStabilityGlyph; import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; -import WayofTime.alchemicalWizardry.common.block.BlockWritingTable; -import WayofTime.alchemicalWizardry.common.block.BloodRune; -import WayofTime.alchemicalWizardry.common.block.BloodStoneBrick; -import WayofTime.alchemicalWizardry.common.block.EfficiencyRune; -import WayofTime.alchemicalWizardry.common.block.EmptySocket; -import WayofTime.alchemicalWizardry.common.block.ImperfectRitualStone; -import WayofTime.alchemicalWizardry.common.block.LargeBloodStoneBrick; -import WayofTime.alchemicalWizardry.common.block.LifeEssenceBlock; -import WayofTime.alchemicalWizardry.common.block.MimicBlock; -import WayofTime.alchemicalWizardry.common.block.RitualStone; -import WayofTime.alchemicalWizardry.common.block.RuneOfSacrifice; -import WayofTime.alchemicalWizardry.common.block.RuneOfSelfSacrifice; -import WayofTime.alchemicalWizardry.common.block.SpectralBlock; -import WayofTime.alchemicalWizardry.common.block.SpeedRune; +import WayofTime.alchemicalWizardry.common.block.BlockChemistrySet; +import WayofTime.alchemicalWizardry.common.block.BlockBloodRune; +import WayofTime.alchemicalWizardry.common.block.BlockBloodStoneBrick; +import WayofTime.alchemicalWizardry.common.block.BlockEfficiencyRune; +import WayofTime.alchemicalWizardry.common.block.BlockEmptySocket; +import WayofTime.alchemicalWizardry.common.block.BlockImperfectRitualStone; +import WayofTime.alchemicalWizardry.common.block.BlockLargeBloodStoneBrick; +import WayofTime.alchemicalWizardry.common.block.BlockLifeEssence; +import WayofTime.alchemicalWizardry.common.block.BlockMimic; +import WayofTime.alchemicalWizardry.common.block.BlockRitualStone; +import WayofTime.alchemicalWizardry.common.block.BlockRuneOfSacrifice; +import WayofTime.alchemicalWizardry.common.block.BlockRuneOfSelfSacrifice; +import WayofTime.alchemicalWizardry.common.block.BlockSpectral; +import WayofTime.alchemicalWizardry.common.block.BlockSpeedRune; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.BlockDemonChest; import WayofTime.alchemicalWizardry.common.items.ItemBlockCrystalBelljar; import WayofTime.alchemicalWizardry.common.items.ItemBloodRuneBlock; @@ -51,6 +52,8 @@ import WayofTime.alchemicalWizardry.common.items.ItemSpellModifierBlock; import WayofTime.alchemicalWizardry.common.items.ItemSpellParadigmBlock; import WayofTime.alchemicalWizardry.common.items.ItemStabilityGlyphBlock; +import java.util.ArrayList; + /** * Created with IntelliJ IDEA. * User: Pokefenn @@ -62,11 +65,11 @@ public class ModBlocks public static Block bloodStoneBrick; public static Block largeBloodStoneBrick; public static BlockAltar blockAltar; - public static BloodRune bloodRune; - public static SpeedRune speedRune; - public static EfficiencyRune efficiencyRune; - public static RuneOfSacrifice runeOfSacrifice; - public static RuneOfSelfSacrifice runeOfSelfSacrifice; + public static BlockBloodRune bloodRune; + public static BlockSpeedRune speedRune; + public static BlockEfficiencyRune efficiencyRune; + public static BlockRuneOfSacrifice runeOfSacrifice; + public static BlockRuneOfSelfSacrifice runeOfSelfSacrifice; public static Block blockMasterStone; public static Block ritualStone; public static Block imperfectRitualStone; @@ -74,7 +77,7 @@ public class ModBlocks public static Block emptySocket; public static Block armourForge; public static Block blockWritingTable; - public static Block blockHomHeart; + public static Block blockSpellTable; public static Block blockPedestal; public static Block blockPlinth; public static Block blockLifeEssence; @@ -90,7 +93,7 @@ public class ModBlocks public static Block blockBuildingSchematicSaver; public static Block blockDemonPortal; public static Block blockReagentConduit; - public static Block blockAlchemicCalcinator; + public static Block blockAlchemicalCalcinator; public static Block blockCrystalBelljar; public static Block blockDemonChest; public static Block blockCrystal; @@ -99,98 +102,94 @@ public class ModBlocks public static Block blockStabilityGlyph; public static Block blockCrucible; + public static ArrayList<String> blocksNotToBeRegistered = new ArrayList<String>(); + public static void init() { - blockAltar = new BlockAltar(); - bloodRune = new BloodRune(); - speedRune = new SpeedRune(); - efficiencyRune = new EfficiencyRune(); - runeOfSacrifice = new RuneOfSacrifice(); - runeOfSelfSacrifice = new RuneOfSelfSacrifice(); - blockTeleposer = new BlockTeleposer(); - spectralBlock = new SpectralBlock(); - ritualStone = new RitualStone(); - blockMasterStone = new BlockMasterStone(); - imperfectRitualStone = new ImperfectRitualStone(); - bloodSocket = new BlockSocket(); - armourForge = new ArmourForge(); - emptySocket = new EmptySocket(); - largeBloodStoneBrick = new LargeBloodStoneBrick(); - bloodStoneBrick = new BloodStoneBrick(); - blockWritingTable = new BlockWritingTable(); - blockHomHeart = new BlockHomHeart(); - blockPedestal = new BlockPedestal(); - blockPlinth = new BlockPlinth(); - blockConduit = new BlockConduit(); - blockBloodLight = new BlockBloodLightSource(); - blockSpellEffect = new BlockSpellEffect(); - blockSpellParadigm = new BlockSpellParadigm(); - blockSpellModifier = new BlockSpellModifier(); - blockSpellEnhancement = new BlockSpellEnhancement(); - blockSpectralContainer = new BlockSpectralContainer(); - blockDemonPortal = new BlockDemonPortal(); - blockBuildingSchematicSaver = new BlockSchematicSaver(); - blockReagentConduit = new BlockReagentConduit(); - blockAlchemicCalcinator = new BlockAlchemicCalcinator(); - blockCrystalBelljar = new BlockBelljar(); - blockDemonChest = new BlockDemonChest(); - blockCrystal = new BlockCrystal(); - blockMimic = new MimicBlock(); + blockAltar = (BlockAltar) registerBlock(new BlockAltar(), "altar"); + bloodRune = (BlockBloodRune) registerBlock(new BlockBloodRune(), ItemBloodRuneBlock.class, ModBlocks.bloodRune.getUnlocalizedName()); + speedRune = (BlockSpeedRune) registerBlock(new BlockSpeedRune(), "speed_rune"); + efficiencyRune = (BlockEfficiencyRune) registerBlock(new BlockEfficiencyRune(), "efficiency_rune"); + runeOfSacrifice = (BlockRuneOfSacrifice) registerBlock(new BlockRuneOfSacrifice(), "sacrifice_rune"); + runeOfSelfSacrifice = (BlockRuneOfSelfSacrifice) registerBlock(new BlockRuneOfSelfSacrifice(), "self_sacrifice_rune"); + blockTeleposer = registerBlock(new BlockTeleposer(), "teleposer"); + spectralBlock = registerBlock(new BlockSpectral(), "spectral_block"); + ritualStone = registerBlock(new BlockRitualStone(), "ritual_stone"); + blockMasterStone = registerBlock(new BlockMasterStone(), "master_ritual_stone"); + imperfectRitualStone = registerBlock(new BlockImperfectRitualStone(), "imperfect_ritual_stone"); + emptySocket = registerBlock(new BlockEmptySocket(), "empty_socket"); + bloodSocket = registerBlock(new BlockFilledSocket(), "filled_socket"); + armourForge = registerBlock(new BlockArmourForge(), "soul_armour_forge"); + largeBloodStoneBrick = registerBlock(new BlockLargeBloodStoneBrick(), "large_bloodstone_brick"); + bloodStoneBrick = registerBlock(new BlockBloodStoneBrick(), "bloodstone_brick"); + blockWritingTable = registerBlock(new BlockChemistrySet(), "chemistry_set"); + blockSpellTable = registerBlock(new BlockSpellTable(), "spell_table"); + blockPedestal = registerBlock(new BlockPedestal(), "pedestal"); + blockPlinth = registerBlock(new BlockPlinth(), "plinth"); + blockConduit = registerBlock(new BlockConduit(), "conduit"); + blockBloodLight = registerBlock(new BlockBloodLightSource(), "blood_light"); + blockSpellEffect = registerBlock(new BlockSpellEffect(), "spell_effect"); + blockSpellParadigm = registerBlock(new BlockSpellParadigm(), ItemSpellParadigmBlock.class, "spell_paradigm"); + blockSpellModifier = registerBlock(new BlockSpellModifier(), ItemSpellEnhancementBlock.class, "spell_modifier"); + blockSpellEnhancement = registerBlock(new BlockSpellEnhancement(), ItemSpellModifierBlock.class, "spell_enhancement"); + blockSpectralContainer = registerBlock(new BlockSpectralContainer(), ItemSpellEffectBlock.class, "spectral_container"); + blockDemonPortal = registerBlock(new BlockDemonPortal(), "demon_portal"); + blockBuildingSchematicSaver = registerBlock(new BlockSchematicSaver(), "schematic_saver"); + blockReagentConduit = registerBlock(new BlockReagentConduit(), "reagent_conduit"); + blockAlchemicalCalcinator = registerBlock(new BlockAlchemicCalcinator(), "alchemical_calcinator"); + blockCrystalBelljar = registerBlock(new BlockBelljar(), ItemBlockCrystalBelljar.class, "belljar"); + blockDemonChest = registerBlock(new BlockDemonChest(), "demon_chest"); + blockCrystal = registerBlock(new BlockCrystal(), ItemCrystalBlock.class, "crystal_block"); + blockMimic = registerBlock(new BlockMimic(), "mimic_block"); - blockLifeEssence = new LifeEssenceBlock(); - blockEnchantmentGlyph = new BlockEnchantmentGlyph(); - blockStabilityGlyph = new BlockStabilityGlyph(); - blockCrucible = new BlockCrucible(); + blockLifeEssence = registerBlock(new BlockLifeEssence(), "life_essence"); + blockEnchantmentGlyph = registerBlock(new BlockEnchantmentGlyph(), ItemEnchantmentGlyphBlock.class, "enchantment_glyph"); + blockStabilityGlyph = registerBlock(new BlockStabilityGlyph(), ItemStabilityGlyphBlock.class, "stability_glyph"); + blockCrucible = registerBlock(new BlockIncenseCrucible(), "incense_cruicible"); } - public static void registerBlocksInPre() + public static Block registerBlock(Block block, String unlocalizedName) { - GameRegistry.registerBlock(ModBlocks.blockAltar, "Altar"); - GameRegistry.registerBlock(ModBlocks.bloodRune, ItemBloodRuneBlock.class, "AlchemicalWizardry" + (ModBlocks.bloodRune.getUnlocalizedName().substring(5))); - GameRegistry.registerBlock(ModBlocks.blockLifeEssence, "lifeEssence"); - GameRegistry.registerBlock(ModBlocks.speedRune, "speedRune"); - GameRegistry.registerBlock(ModBlocks.efficiencyRune, "efficiencyRune"); - GameRegistry.registerBlock(ModBlocks.runeOfSacrifice, "runeOfSacrifice"); - GameRegistry.registerBlock(ModBlocks.runeOfSelfSacrifice, "runeOfSelfSacrifice"); - GameRegistry.registerBlock(ModBlocks.ritualStone, "ritualStone"); - GameRegistry.registerBlock(ModBlocks.blockMasterStone, "masterStone"); - GameRegistry.registerBlock(ModBlocks.bloodSocket, "bloodSocket"); - GameRegistry.registerBlock(ModBlocks.imperfectRitualStone, "imperfectRitualStone"); + block.setUnlocalizedName(unlocalizedName); - GameRegistry.registerBlock(ModBlocks.armourForge, "armourForge"); - GameRegistry.registerBlock(ModBlocks.emptySocket, "emptySocket"); - GameRegistry.registerBlock(ModBlocks.bloodStoneBrick, "bloodStoneBrick"); - GameRegistry.registerBlock(ModBlocks.largeBloodStoneBrick, "largeBloodStoneBrick"); - GameRegistry.registerBlock(ModBlocks.blockWritingTable, "blockWritingTable"); - GameRegistry.registerBlock(ModBlocks.blockHomHeart, "blockHomHeart"); - GameRegistry.registerBlock(ModBlocks.blockPedestal, "blockPedestal"); - GameRegistry.registerBlock(ModBlocks.blockPlinth, "blockPlinth"); - GameRegistry.registerBlock(ModBlocks.blockTeleposer, "blockTeleposer"); - GameRegistry.registerBlock(ModBlocks.spectralBlock, "spectralBlock"); - GameRegistry.registerBlock(ModBlocks.blockBloodLight, "bloodLight"); +// if (!) + { + block.setCreativeTab(AlchemicalWizardry.tabBloodMagic); + } - GameRegistry.registerBlock(ModBlocks.blockConduit, "blockConduit"); - GameRegistry.registerBlock(ModBlocks.blockSpellParadigm, ItemSpellParadigmBlock.class, "AlchemicalWizardry" + (ModBlocks.blockSpellParadigm.getUnlocalizedName())); - GameRegistry.registerBlock(ModBlocks.blockSpellEnhancement, ItemSpellEnhancementBlock.class, "AlchemicalWizardry" + (ModBlocks.blockSpellEnhancement.getUnlocalizedName())); - GameRegistry.registerBlock(ModBlocks.blockSpellModifier, ItemSpellModifierBlock.class, "AlchemicalWizardry" + (ModBlocks.blockSpellModifier.getUnlocalizedName())); - GameRegistry.registerBlock(ModBlocks.blockSpellEffect, ItemSpellEffectBlock.class, "AlchemicalWizardry" + (ModBlocks.blockSpellEffect.getUnlocalizedName())); + blocksNotToBeRegistered.clear(); + for (String unlocName : BloodMagicConfiguration.blocksToBeDisabled) + { + if (unlocName.equals(unlocalizedName)) + { + blocksNotToBeRegistered.add(unlocName); + } + } + if (!blocksNotToBeRegistered.contains(unlocalizedName)) + { + GameRegistry.registerBlock(block, unlocalizedName); + } - GameRegistry.registerBlock(ModBlocks.blockSpectralContainer, "spectralContainer"); - GameRegistry.registerBlock(ModBlocks.blockDemonPortal, "demonPortalMain"); - GameRegistry.registerBlock(ModBlocks.blockBuildingSchematicSaver, "blockSchemSaver"); - GameRegistry.registerBlock(ModBlocks.blockReagentConduit, "blockReagentConduit"); - GameRegistry.registerBlock(ModBlocks.blockAlchemicCalcinator, "blockAlchemicCalcinator"); - GameRegistry.registerBlock(ModBlocks.blockCrystalBelljar, ItemBlockCrystalBelljar.class, "blockCrystalBelljar"); - GameRegistry.registerBlock(ModBlocks.blockDemonChest, "blockDemonChest"); - GameRegistry.registerBlock(ModBlocks.blockCrystal, ItemCrystalBlock.class, "blockCrystal"); - GameRegistry.registerBlock(ModBlocks.blockMimic, "blockMimic"); - GameRegistry.registerBlock(ModBlocks.blockEnchantmentGlyph, ItemEnchantmentGlyphBlock.class, "blockEnchantmentGlyph"); - GameRegistry.registerBlock(ModBlocks.blockStabilityGlyph, ItemStabilityGlyphBlock.class, "blockStabilityGlyph"); - - GameRegistry.registerBlock(ModBlocks.blockCrucible, "blockCrucible"); + return block; } - public static void registerBlocksInInit() + public static Block registerBlock(Block block, Class<? extends ItemBlock> itemBlockClass, String unlocalizedName) { + block.setCreativeTab(AlchemicalWizardry.tabBloodMagic); + + for (String unlocName : BloodMagicConfiguration.blocksToBeDisabled) + { + System.out.println(unlocName); + if (unlocName.equals(unlocalizedName)) + { + blocksNotToBeRegistered.add(unlocName); + } + } + if (!blocksNotToBeRegistered.contains(unlocalizedName)) + { + GameRegistry.registerBlock(block, itemBlockClass, unlocalizedName); + } + + return block; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/ArmourForge.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockArmourForge.java similarity index 92% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/ArmourForge.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockArmourForge.java index 96e80b9c..01097ac0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/ArmourForge.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockArmourForge.java @@ -7,11 +7,8 @@ import WayofTime.alchemicalWizardry.common.ArmourComponent; import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -20,31 +17,25 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.List; -public class ArmourForge extends Block +public class BlockArmourForge extends Block { - public static List<ArmourComponent> helmetList = new ArrayList(); - public static List<ArmourComponent> plateList = new ArrayList(); - public static List<ArmourComponent> leggingsList = new ArrayList(); - public static List<ArmourComponent> bootsList = new ArrayList(); + public List<ArmourComponent> helmetList = new ArrayList(); + public List<ArmourComponent> plateList = new ArrayList(); + public List<ArmourComponent> leggingsList = new ArrayList(); + public List<ArmourComponent> bootsList = new ArrayList(); - public ArmourForge() + public BlockArmourForge() { super(Material.iron); setHardness(2.0F); setResistance(5.0F); setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setBlockName("armourForge"); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:SoulForge"); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodRune.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodRune.java similarity index 98% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/BloodRune.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodRune.java index 9b1cdf56..f5357004 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodRune.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodRune.java @@ -14,7 +14,7 @@ import net.minecraft.util.IIcon; import java.util.List; -public class BloodRune extends Block +public class BlockBloodRune extends Block { //private Icon bloodRuneIcon; @SideOnly(Side.CLIENT) @@ -28,7 +28,7 @@ public class BloodRune extends Block @SideOnly(Side.CLIENT) private IIcon accelerationRuneIcon; - public BloodRune() + public BlockBloodRune() { super(Material.iron); this.setBlockName("bloodRune"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodStoneBrick.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodStoneBrick.java similarity index 90% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/BloodStoneBrick.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodStoneBrick.java index 054cd8b8..ba3ec9ac 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodStoneBrick.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodStoneBrick.java @@ -7,9 +7,9 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; -public class BloodStoneBrick extends Block +public class BlockBloodStoneBrick extends Block { - public BloodStoneBrick() + public BlockBloodStoneBrick() { super(Material.iron); setHardness(2.0F); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java similarity index 96% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/BlockWritingTable.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java index c55e50a8..bcdf4dce 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java @@ -22,7 +22,7 @@ import net.minecraft.world.World; import java.util.List; import java.util.Random; -public class BlockWritingTable extends BlockContainer +public class BlockChemistrySet extends BlockContainer { @SideOnly(Side.CLIENT) private IIcon topIcon; @@ -31,13 +31,11 @@ public class BlockWritingTable extends BlockContainer @SideOnly(Side.CLIENT) private IIcon bottomIcon; - public BlockWritingTable() + public BlockChemistrySet() { super(Material.wood); setHardness(2.0F); setResistance(5.0F); - this.setBlockName("blockWritingTable"); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/EfficiencyRune.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEfficiencyRune.java similarity index 89% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/EfficiencyRune.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEfficiencyRune.java index 6226b917..5660b090 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/EfficiencyRune.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEfficiencyRune.java @@ -5,9 +5,9 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; -public class EfficiencyRune extends BloodRune +public class BlockEfficiencyRune extends BlockBloodRune { - public EfficiencyRune() + public BlockEfficiencyRune() { super(); this.setBlockName("efficiencyRune"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/EmptySocket.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEmptySocket.java similarity index 91% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/EmptySocket.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEmptySocket.java index f6964f63..ab399564 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/EmptySocket.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEmptySocket.java @@ -7,9 +7,9 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; -public class EmptySocket extends Block +public class BlockEmptySocket extends Block { - public EmptySocket() + public BlockEmptySocket() { super(Material.iron); setHardness(2.0F); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSocket.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockFilledSocket.java similarity index 73% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSocket.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockFilledSocket.java index 9cfd5bcd..ec53d53d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSocket.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockFilledSocket.java @@ -8,6 +8,7 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -15,58 +16,27 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.util.IIcon; import net.minecraft.world.World; import java.util.Random; -public class BlockSocket extends BlockContainer +public class BlockFilledSocket extends BlockContainer { - @SideOnly(Side.CLIENT) - private IIcon topIcon; - @SideOnly(Side.CLIENT) - private IIcon sideIcon2; - @SideOnly(Side.CLIENT) - private IIcon bottomIcon; - - public BlockSocket() + public BlockFilledSocket() { super(Material.rock); setHardness(2.0F); setResistance(5.0F); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setBlockName("bloodSocket"); //func_111022_d("AlchemicalWizardry:blocks"); } @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) + public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState blockState, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { - this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket"); - this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket"); - this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket"); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta) - { - switch (side) - { - case 0: - return bottomIcon; - case 1: - return topIcon; - default: - return sideIcon2; - } - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) - { - TESocket tileEntity = (TESocket) world.getTileEntity(x, y, z); + TESocket tileEntity = (TESocket) world.getTileEntity(blockPos); if (tileEntity == null || player.isSneaking()) { @@ -96,12 +66,12 @@ public class BlockSocket extends BlockContainer tileEntity.setActive(); return true; } - world.markBlockForUpdate(x, y, z); + world.markBlockForUpdate(blockPos); return false; } @Override - public void breakBlock(World world, int x, int y, int z, Block par5, int par6) + public void breakBlock(World world, BlockPos blockPos, Block par5, int par6) { dropItems(world, x, y, z); super.breakBlock(world, x, y, z, par5, par6); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/ImperfectRitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockImperfectRitualStone.java similarity index 97% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/ImperfectRitualStone.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockImperfectRitualStone.java index cde800fc..c86ebfc9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/ImperfectRitualStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockImperfectRitualStone.java @@ -16,9 +16,9 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; -public class ImperfectRitualStone extends Block +public class BlockImperfectRitualStone extends Block { - public ImperfectRitualStone() + public BlockImperfectRitualStone() { super(Material.iron); setHardness(2.0F); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrucible.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockIncenseCrucible.java similarity index 98% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrucible.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockIncenseCrucible.java index 195375ed..100ce1c9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrucible.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockIncenseCrucible.java @@ -21,7 +21,7 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TECrucible; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockCrucible extends BlockContainer +public class BlockIncenseCrucible extends BlockContainer { @SideOnly(Side.CLIENT) private IIcon topIcon; @@ -30,7 +30,7 @@ public class BlockCrucible extends BlockContainer @SideOnly(Side.CLIENT) private IIcon bottomIcon; - public BlockCrucible() + public BlockIncenseCrucible() { super(Material.anvil); this.setHardness(2.0f); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/LargeBloodStoneBrick.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLargeBloodStoneBrick.java similarity index 89% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/LargeBloodStoneBrick.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLargeBloodStoneBrick.java index 623c2418..b560badd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/LargeBloodStoneBrick.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLargeBloodStoneBrick.java @@ -7,9 +7,9 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; -public class LargeBloodStoneBrick extends Block +public class BlockLargeBloodStoneBrick extends Block { - public LargeBloodStoneBrick() + public BlockLargeBloodStoneBrick() { super(Material.iron); setHardness(2.0F); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/LifeEssenceBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLifeEssence.java similarity index 94% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/LifeEssenceBlock.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLifeEssence.java index 79c6f8a4..67aa1730 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/LifeEssenceBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLifeEssence.java @@ -10,9 +10,9 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fluids.BlockFluidClassic; -public class LifeEssenceBlock extends BlockFluidClassic +public class BlockLifeEssence extends BlockFluidClassic { - public LifeEssenceBlock() + public BlockLifeEssence() { super(AlchemicalWizardry.lifeEssenceFluid, Material.water); AlchemicalWizardry.lifeEssenceFluid.setBlock(this); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/MimicBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMimic.java similarity index 98% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/MimicBlock.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMimic.java index 84dcdcb6..b8e7cdc9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/MimicBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMimic.java @@ -21,9 +21,9 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TEMimicBlock; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class MimicBlock extends BlockContainer +public class BlockMimic extends BlockContainer { - public MimicBlock() + public BlockMimic() { super(Material.water); setHardness(2.0F); @@ -151,7 +151,7 @@ public class MimicBlock extends BlockContainer break; } - MimicBlock.addHitEffect(TE, target, xOffset, yOffset, zOffset, null, effectRenderer); + BlockMimic.addHitEffect(TE, target, xOffset, yOffset, zOffset, null, effectRenderer); return true; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/RitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRitualStone.java similarity index 97% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/RitualStone.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRitualStone.java index ae839bed..656dbbfd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/RitualStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRitualStone.java @@ -14,7 +14,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; -public class RitualStone extends Block implements IRitualStone +public class BlockRitualStone extends Block implements IRitualStone { @SideOnly(Side.CLIENT) private IIcon blankIcon; @@ -31,7 +31,7 @@ public class RitualStone extends Block implements IRitualStone @SideOnly(Side.CLIENT) private IIcon dawnStoneIcon; - public RitualStone() + public BlockRitualStone() { super(Material.iron); setHardness(2.0F); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSacrifice.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSacrifice.java similarity index 88% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSacrifice.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSacrifice.java index 2094e97a..babad0ae 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSacrifice.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSacrifice.java @@ -5,9 +5,9 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; -public class RuneOfSacrifice extends BloodRune +public class BlockRuneOfSacrifice extends BlockBloodRune { - public RuneOfSacrifice() + public BlockRuneOfSacrifice() { super(); this.setBlockName("runeOfSacrifice"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSelfSacrifice.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSelfSacrifice.java similarity index 88% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSelfSacrifice.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSelfSacrifice.java index 2c13ce41..0ccfdc9c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSelfSacrifice.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSelfSacrifice.java @@ -5,9 +5,9 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; -public class RuneOfSelfSacrifice extends BloodRune +public class BlockRuneOfSelfSacrifice extends BlockBloodRune { - public RuneOfSelfSacrifice() + public BlockRuneOfSelfSacrifice() { super(); this.setBlockName("runeOfSelfSacrifice"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/SpectralBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectral.java similarity index 97% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/SpectralBlock.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectral.java index 9ff5313a..0573f3dc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/SpectralBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectral.java @@ -17,9 +17,9 @@ import net.minecraft.world.World; import java.util.Random; -public class SpectralBlock extends BlockContainer +public class BlockSpectral extends BlockContainer { - public SpectralBlock() + public BlockSpectral() { super(Material.rock); this.setBlockName("spectralBlock"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/SpeedRune.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpeedRune.java similarity index 90% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/SpeedRune.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpeedRune.java index ac628ad6..8f3cc784 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/SpeedRune.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpeedRune.java @@ -5,9 +5,9 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; -public class SpeedRune extends BloodRune +public class BlockSpeedRune extends BlockBloodRune { - public SpeedRune() + public BlockSpeedRune() { super(); this.setBlockName("speedRune"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockHomHeart.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java similarity index 97% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/BlockHomHeart.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java index 07ccaa3c..28a4299d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockHomHeart.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java @@ -15,7 +15,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; -public class BlockHomHeart extends BlockContainer +public class BlockSpellTable extends BlockContainer { @SideOnly(Side.CLIENT) private IIcon bottomIcon; @@ -24,7 +24,7 @@ public class BlockHomHeart extends BlockContainer @SideOnly(Side.CLIENT) private IIcon sideIcon; - public BlockHomHeart() + public BlockSpellTable() { super(Material.rock); setHardness(2.0F); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java index 07333fba..7b064de4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java @@ -10,7 +10,7 @@ import net.minecraft.util.BlockPos; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.IFadedRune; -import WayofTime.alchemicalWizardry.common.block.BloodRune; +import WayofTime.alchemicalWizardry.common.block.BlockBloodRune; public class UpgradedAltars { @@ -46,7 +46,7 @@ public class UpgradedAltars if (ac.isBloodRune()) { - if (!(block instanceof BloodRune)) + if (!(block instanceof BlockBloodRune)) { return false; } @@ -85,14 +85,14 @@ public class UpgradedAltars Block testBlock = state.getBlock(); int meta = testBlock.getMetaFromState(state); - if (testBlock instanceof BloodRune) + if (testBlock instanceof BlockBloodRune) { if (testBlock instanceof IFadedRune && altarTier > ((IFadedRune)testBlock).getAltarTierLimit(meta)) { return UpgradedAltars.getUpgrades(world, pos, ((IFadedRune)testBlock).getAltarTierLimit(meta)); } - switch (((BloodRune) testBlock).getRuneEffect(meta)) + switch (((BlockBloodRune) testBlock).getRuneEffect(meta)) { case 1: upgrades.addSpeedUpgrade(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java index 9da448a8..597177ca 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java @@ -4,7 +4,7 @@ import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.Rituals; -import WayofTime.alchemicalWizardry.common.block.RitualStone; +import WayofTime.alchemicalWizardry.common.block.BlockRitualStone; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -75,7 +75,7 @@ public class ItemRitualDismantler extends EnergyItems for (RitualComponent rc : ritualList) { - if (!world.isAirBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)) && world.getBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)) instanceof RitualStone) + if (!world.isAirBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)) && world.getBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)) instanceof BlockRitualStone) { if (freeSpace >= 0) { diff --git a/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang b/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang index 9893f913..6334adbf 100644 --- a/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang +++ b/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang @@ -18,7 +18,7 @@ tile.armourForge.name=Soul Armour Forge tile.emptySocket.name=Empty Socket tile.bloodStoneBrick.name=Bloodstone Brick tile.largeBloodStoneBrick.name=Large Bloodstone Brick -tile.blockWritingTable.name=Alchemic Chemistry Set +tile.chemistry_set.name=Alchemical Chemistry Set tile.blockHomHeart.name=Spell Table tile.bloodPedestal.name=Arcane Pedestal tile.bloodPlinth.name=Arcane Plinth @@ -51,7 +51,7 @@ tile.blockSpellEffect.fire.name=Crucible of Fire tile.blockSpellEffect.ice.name=Ice Maker tile.blockSpellEffect.wind.name=Wind Generator tile.blockSpellEffect.earth.name=Earth Former -tile.alchemicCalcinator.name=Alchemic Calcinator +tile.alchemical_calcinator.name=Alchemical Calcinator tile.crystalBelljar.name=Crystal Belljar tile.blockReagentConduit.name=Alchemy Relay tile.lifeEssenceFluidBlock.name=Life Essence From 86b753d09850dfa3245444adb3886d506676834a Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Wed, 29 Jul 2015 14:26:37 -0400 Subject: [PATCH 09/33] Finished almost all rituals. --- .../rituals/RitualEffectAnimalGrowth.java | 24 ++-- .../rituals/RitualEffectAutoAlchemy.java | 23 ++-- .../common/rituals/RitualEffectBinding.java | 97 +++++++-------- .../rituals/RitualEffectBiomeChanger.java | 102 +++++++--------- .../rituals/RitualEffectContainment.java | 30 ++--- .../common/rituals/RitualEffectCrafting.java | 26 ++--- .../common/rituals/RitualEffectCrushing.java | 96 ++++----------- .../rituals/RitualEffectDemonPortal.java | 17 ++- .../common/rituals/RitualEffectEllipsoid.java | 40 +++---- .../rituals/RitualEffectEvaporation.java | 110 ++++++------------ .../common/rituals/RitualEffectExpulsion.java | 54 +++++---- .../rituals/RitualEffectFeatheredEarth.java | 27 ++--- .../rituals/RitualEffectFeatheredKnife.java | 8 +- .../common/rituals/RitualEffectFlight.java | 8 +- .../rituals/RitualEffectFullStomach.java | 10 +- .../common/rituals/RitualEffectGrowth.java | 28 +++-- .../common/rituals/RitualEffectHarvest.java | 24 ++-- .../common/rituals/RitualEffectHealing.java | 21 ++-- 18 files changed, 321 insertions(+), 424 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java index 191d186b..4274305b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java @@ -1,10 +1,8 @@ package WayofTime.alchemicalWizardry.common.rituals; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import java.util.ArrayList; +import java.util.List; + import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.inventory.IInventory; @@ -13,9 +11,11 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.BlockPos; import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; public class RitualEffectAnimalGrowth extends RitualEffect { @@ -39,7 +39,7 @@ public class RitualEffectAnimalGrowth extends RitualEffect double range = 2; - AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 3), (double) (z + 1)).expand(range, 0, range); + AxisAlignedBB axisalignedbb = new AxisAlignedBB(pos.offsetUp(), pos.add(1, 3, 1)).expand(range, 0, range); List<EntityAgeable> list = world.getEntitiesWithinAABB(EntityAgeable.class, axisalignedbb); int entityCount = 0; @@ -79,14 +79,14 @@ public class RitualEffectAnimalGrowth extends RitualEffect if (hasVirtus && SoulNetworkHandler.canSyphonFromOnlyNetwork(owner, breedingCost)) { List<EntityAnimal> animalList = world.getEntitiesWithinAABB(EntityAnimal.class, axisalignedbb); - TileEntity tile = world.getTileEntity(x, y + 1, z); + TileEntity tile = world.getTileEntity(pos.offsetUp()); IInventory inventory = null; if (tile instanceof IInventory) { inventory = (IInventory) tile; } else { - tile = world.getTileEntity(x, y - 1, z); + tile = world.getTileEntity(pos.offsetDown()); if (tile instanceof IInventory) { inventory = (IInventory) tile; @@ -112,7 +112,7 @@ public class RitualEffectAnimalGrowth extends RitualEffect if (stack != null && entityAnimal.isBreedingItem(stack)) { inventory.decrStackSize(i, 1); - entityAnimal.func_146082_f(null); + entityAnimal.setInLove(null); this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, true); SoulNetworkHandler.syphonFromNetwork(owner, breedingCost); break; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java index 7dd7beaf..d8e916f8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java @@ -8,8 +8,8 @@ import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.oredict.OreDictionary; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; @@ -44,7 +44,7 @@ public class RitualEffectAutoAlchemy extends RitualEffect int flag = 0; - TileEntity topEntity = world.getTileEntity(x, y + 1, z); + TileEntity topEntity = world.getTileEntity(pos.offsetUp()); if (!(topEntity instanceof IBloodAltar) || !(topEntity instanceof IBloodAltar)) { return; @@ -65,10 +65,10 @@ public class RitualEffectAutoAlchemy extends RitualEffect IInventory inputInv1 = null; IInventory inputInv2 = null; - TileEntity northEntity = world.getTileEntity(x, y, z - 1); - TileEntity southEntity = world.getTileEntity(x, y, z + 1); - TileEntity eastEntity = world.getTileEntity(x + 1, y, z); - TileEntity westEntity = world.getTileEntity(x - 1, y, z); + TileEntity northEntity = world.getTileEntity(pos.offsetNorth()); + TileEntity southEntity = world.getTileEntity(pos.offsetSouth()); + TileEntity eastEntity = world.getTileEntity(pos.offsetEast()); + TileEntity westEntity = world.getTileEntity(pos.offsetWest()); if (northEntity instanceof TEWritingTable) { @@ -271,7 +271,7 @@ public class RitualEffectAutoAlchemy extends RitualEffect continue; } - if(!inputInv1.isItemValidForSlot(j, curItem) || (inputInv1 instanceof ISidedInventory && !((ISidedInventory) inputInv1).canExtractItem(j, curItem, ForgeDirection.DOWN.ordinal()))) + if(!inputInv1.isItemValidForSlot(j, curItem) || (inputInv1 instanceof ISidedInventory && !((ISidedInventory) inputInv1).canExtractItem(j, curItem, EnumFacing.DOWN))) { continue; } @@ -385,10 +385,11 @@ public class RitualEffectAutoAlchemy extends RitualEffect if (flag > 0) { - world.markBlockForUpdate(x, y, z + 1); - world.markBlockForUpdate(x, y, z - 1); - world.markBlockForUpdate(x + 1, y, z); - world.markBlockForUpdate(x - 1, y, z); + for(EnumFacing face : EnumFacing.HORIZONTALS) + { + world.markBlockForUpdate(pos.offset(face)); + } + SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * flag); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java index 358b7efd..5e1343db 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java @@ -1,11 +1,9 @@ package WayofTime.alchemicalWizardry.common.rituals; -import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -15,10 +13,12 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.BlockPos; import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; +import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class RitualEffectBinding extends RitualEffect { @@ -46,7 +46,7 @@ public class RitualEffectBinding extends RitualEffect if (ritualStone.getVar1() == 0) { int d0 = 0; - AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 2), (double) (z + 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = new AxisAlignedBB(pos.offsetUp(), pos.add(1, 2, 1)).expand(d0, d0, d0); List list = world.getEntitiesWithinAABB(EntityItem.class, axisalignedbb); Iterator iterator = list.iterator(); EntityItem item; @@ -66,7 +66,7 @@ public class RitualEffectBinding extends RitualEffect { ritualStone.setVar1(BindingRegistry.getIndexForItem(itemStack) + 1); itemStack.stackSize--; - world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z)); + world.addWeatherEffect(new EntityLightningBolt(world, pos.getX(), pos.getY() + 1, pos.getZ())); ritualStone.setCooldown(ritualStone.getCooldown() - 1); if(itemStack.stackSize <= 0) { @@ -77,7 +77,7 @@ public class RitualEffectBinding extends RitualEffect if (world.rand.nextInt(10) == 0) { - SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.getDimensionId(), 1, x, y, z); + SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, world.provider.getDimensionId(), 1, pos); } } @@ -90,40 +90,8 @@ public class RitualEffectBinding extends RitualEffect { int lightningPoint = world.rand.nextInt(8); - switch (lightningPoint) - { - case 0: - world.addWeatherEffect(new EntityLightningBolt(world, x + 4, y + 3, z + 0)); - break; - - case 1: - world.addWeatherEffect(new EntityLightningBolt(world, x - 4, y + 3, z + 0)); - break; - - case 2: - world.addWeatherEffect(new EntityLightningBolt(world, x + 0, y + 3, z + 4)); - break; - - case 3: - world.addWeatherEffect(new EntityLightningBolt(world, x + 0, y + 3, z - 4)); - break; - - case 4: - world.addWeatherEffect(new EntityLightningBolt(world, x + 3, y + 3, z + 3)); - break; - - case 5: - world.addWeatherEffect(new EntityLightningBolt(world, x - 3, y + 3, z + 3)); - break; - - case 6: - world.addWeatherEffect(new EntityLightningBolt(world, x + 3, y + 3, z - 3)); - break; - - case 7: - world.addWeatherEffect(new EntityLightningBolt(world, x - 3, y + 3, z - 3)); - break; - } + BlockPos newPos = getPositionForLightning(pos, lightningPoint); + world.addWeatherEffect(new EntityLightningBolt(world, newPos.getX(), newPos.getY(), newPos.getZ())); } if (ritualStone.getCooldown() <= 0) @@ -133,7 +101,7 @@ public class RitualEffectBinding extends RitualEffect if (spawnedItem != null) { - EntityItem newItem = new EntityItem(world, x + 0.5, y + 1, z + 0.5, spawnedItem.copy()); + EntityItem newItem = new EntityItem(world, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, spawnedItem.copy()); world.spawnEntityInWorld(newItem); } @@ -143,6 +111,39 @@ public class RitualEffectBinding extends RitualEffect } } + public BlockPos getPositionForLightning(BlockPos pos, int lightning) + { + switch (lightning) + { + case 0: + return pos.add(4, 3, 0); + + case 1: + return pos.add(-4, 3, 0); + + case 2: + return pos.add(0, 3, 4); + + case 3: + return pos.add(0, 3, -4); + + case 4: + return pos.add(3, 3, 3); + + case 5: + return pos.add(-3, 3, 3); + + case 6: + return pos.add(-3, 3, -3); + + case 7: + return pos.add(3, 3, -3); + + default: + return pos.add(0, 3, 0); + } + } + @Override public int getCostPerRefresh() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java index d356547e..fd1d6c92 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java @@ -1,13 +1,10 @@ package WayofTime.alchemicalWizardry.common.rituals; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; +import java.util.ArrayList; +import java.util.List; + import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -19,12 +16,17 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.chunk.Chunk; - -import java.util.ArrayList; -import java.util.List; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; public class RitualEffectBiomeChanger extends RitualEffect { @@ -43,7 +45,7 @@ public class RitualEffectBiomeChanger extends RitualEffect if (world.rand.nextInt(15) == 0) { - world.addWeatherEffect(new EntityLightningBolt(world, x - 1 + world.rand.nextInt(3), y + 1, z - 1 + world.rand.nextInt(3))); + world.addWeatherEffect(new EntityLightningBolt(world, pos.getX() - 1 + world.rand.nextInt(3), pos.getY() + 1, pos.getZ() - 1 + world.rand.nextInt(3))); } return; @@ -89,49 +91,25 @@ public class RitualEffectBiomeChanger extends RitualEffect { if (boolList[i][j]) { - if (i - 1 >= 0 && !boolList[i - 1][j]) - { - Block block = world.getBlock(x - range + i - 1, y + 1, z - range + j); - - if (!ModBlocks.largeBloodStoneBrick.equals(block) && !ModBlocks.bloodStoneBrick.equals(block)) - { - boolList[i - 1][j] = true; - isReady = false; - } - } - - if (j - 1 >= 0 && !boolList[i][j - 1]) - { - Block block = world.getBlock(x - range + i, y + 1, z - range + j - 1); - - if (!ModBlocks.largeBloodStoneBrick.equals(block) && !ModBlocks.bloodStoneBrick.equals(block)) - { - boolList[i][j - 1] = true; - isReady = false; - } - } - - if (i + 1 <= 2 * range && !boolList[i + 1][j]) - { - Block block = world.getBlock(x - range + i + 1, y + 1, z - range + j); - - if (!ModBlocks.largeBloodStoneBrick.equals(block) && !ModBlocks.bloodStoneBrick.equals(block)) - { - boolList[i + 1][j] = true; - isReady = false; - } - } - - if (j + 1 <= 2 * range && !boolList[i][j + 1]) - { - Block block = world.getBlock(x - range + i, y + 1, z - range + j + 1); - - if (!ModBlocks.largeBloodStoneBrick.equals(block) && !ModBlocks.bloodStoneBrick.equals(block)) - { - boolList[i][j + 1] = true; - isReady = false; - } - } + BlockPos position = pos.add(i - range, 1, j - range); + + for(EnumFacing face : EnumFacing.HORIZONTALS) + { + int iP = i + face.getFrontOffsetX(); + int jP = j + face.getFrontOffsetY(); + + if(iP >= 0 && iP <= 2 * range && jP >= 0 && jP <= 2 * range && !boolList[iP][jP]) + { + BlockPos newPos = position.add(face.getDirectionVec()); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); + if (!ModBlocks.largeBloodStoneBrick.equals(block) && !ModBlocks.bloodStoneBrick.equals(block)) + { + boolList[iP][jP] = true; + isReady = false; + } + } + } } } } @@ -151,7 +129,8 @@ public class RitualEffectBiomeChanger extends RitualEffect } boolean isItemConsumed = false; - TileEntity tileEntity = world.getTileEntity(x + i, y, z + j); + BlockPos newPos = pos.add(i, 0, j); + TileEntity tileEntity = world.getTileEntity(newPos); if (!(tileEntity instanceof TEPlinth)) { @@ -169,7 +148,7 @@ public class RitualEffectBiomeChanger extends RitualEffect { if (itemTest instanceof ItemBlock) { - Block item = ((ItemBlock) itemTest).field_150939_a; + Block item = ((ItemBlock) itemTest).getBlock(); if (item == (Blocks.sand)) { humidity -= 0.1f; @@ -230,8 +209,8 @@ public class RitualEffectBiomeChanger extends RitualEffect if (isItemConsumed) { tilePlinth.setInventorySlotContents(0, null); - world.markBlockForUpdate(x + i, y, z + j); - world.addWeatherEffect(new EntityLightningBolt(world, x + i, y + 1, z + j)); + world.markBlockForUpdate(newPos); + world.addWeatherEffect(new EntityLightningBolt(world, newPos.getX(), newPos.getY() + 1, newPos.getZ())); } } } @@ -269,10 +248,11 @@ public class RitualEffectBiomeChanger extends RitualEffect { if (boolList[i][j]) { - Chunk chunk = world.getChunkFromBlockCoords(x - range + i, z - range + j); + BlockPos newPos = pos.add(i - range, 0, j - range); + Chunk chunk = world.getChunkFromBlockCoords(newPos); byte[] byteArray = chunk.getBiomeArray(); - int moduX = (x - range + i) % 16; - int moduZ = (z - range + j) % 16; + int moduX = (newPos.getX()) % 16; + int moduZ = (newPos.getZ()) % 16; if (moduX < 0) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java index 0871c350..231a638a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java @@ -1,13 +1,8 @@ package WayofTime.alchemicalWizardry.common.rituals; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.ReflectionHelper; +import java.util.ArrayList; +import java.util.List; + import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.EntityCreeper; @@ -15,9 +10,14 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.PotionEffect; import net.minecraft.util.BlockPos; import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; +import net.minecraftforge.fml.relauncher.ReflectionHelper; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class RitualEffectContainment extends RitualEffect { @@ -41,7 +41,7 @@ public class RitualEffectContainment extends RitualEffect } else { int d0 = 5; - List<Entity> entityList = SpellHelper.getEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, d0, d0); + List<Entity> entityList = SpellHelper.getEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, d0, d0); boolean flag = false; boolean hasCrepitous = this.canDrainReagent(ritualStone, ReagentRegistry.crepitousReagent, crepitousDrain, false); boolean hasTerrae = this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false); @@ -62,9 +62,9 @@ public class RitualEffectContainment extends RitualEffect } - double xDif = livingEntity.posX - (x + 0.5); - double yDif = livingEntity.posY - (y + 3); - double zDif = livingEntity.posZ - (z + 0.5); + double xDif = livingEntity.posX - (pos.getX() + 0.5); + double yDif = livingEntity.posY - (pos.getY() + 3); + double zDif = livingEntity.posZ - (pos.getZ() + 0.5); livingEntity.motionX = -0.05 * xDif; livingEntity.motionY = -0.05 * yDif; livingEntity.motionZ = -0.05 * zDif; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java index a675082a..630665a0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java @@ -16,8 +16,8 @@ import net.minecraft.item.crafting.CraftingManager; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.oredict.OreDictionary; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; @@ -92,8 +92,8 @@ public class RitualEffectCrafting extends RitualEffect { int gridSpace = (i+1)*3 + (j+1); - Int3 pos = this.getSlotPositionForDirection(gridSpace, direction); - TileEntity inv = world.getTileEntity(x + pos.xCoord, y + pos.yCoord, z + pos.zCoord); + Int3 position = this.getSlotPositionForDirection(gridSpace, direction); + TileEntity inv = world.getTileEntity(pos.add(position.xCoord, position.yCoord, position.zCoord)); if(inv instanceof IInventory) { if(((IInventory) inv).getSizeInventory() <= slotDesignation || !((IInventory) inv).isItemValidForSlot(slotDesignation, ((IInventory) inv).getStackInSlot(slotDesignation))) @@ -133,10 +133,10 @@ public class RitualEffectCrafting extends RitualEffect List<IInventory> invList = new ArrayList(); - TileEntity northEntity = world.getTileEntity(x, y-1, z - 2); - TileEntity southEntity = world.getTileEntity(x, y-1, z + 2); - TileEntity eastEntity = world.getTileEntity(x + 2, y-1, z); - TileEntity westEntity = world.getTileEntity(x - 2, y-1, z); + TileEntity northEntity = world.getTileEntity(pos.add(0, -1, -2)); + TileEntity southEntity = world.getTileEntity(pos.add(0, -1, 2)); + TileEntity eastEntity = world.getTileEntity(pos.add(2, -1, 0)); + TileEntity westEntity = world.getTileEntity(pos.add(-2, -1, 0)); switch(direction) { @@ -239,7 +239,7 @@ public class RitualEffectCrafting extends RitualEffect if (outputInv != null) { - if(!(!limitToSingleStack ? SpellHelper.canInsertStackFullyIntoInventory(returnStack, outputInv, ForgeDirection.DOWN) : SpellHelper.canInsertStackFullyIntoInventory(returnStack, outputInv, ForgeDirection.DOWN, true, returnStack.getMaxStackSize()))) + if(!(!limitToSingleStack ? SpellHelper.canInsertStackFullyIntoInventory(returnStack, outputInv, EnumFacing.DOWN) : SpellHelper.canInsertStackFullyIntoInventory(returnStack, outputInv, EnumFacing.DOWN, true, returnStack.getMaxStackSize()))) { tag.setBoolean("didLastCraftFail", true); return; @@ -331,7 +331,7 @@ public class RitualEffectCrafting extends RitualEffect /* The recipe is valid and the items have been found */ - SpellHelper.insertStackIntoInventory(CraftingManager.getInstance().findMatchingRecipe(inventory, world), outputInv, ForgeDirection.DOWN); + SpellHelper.insertStackIntoInventory(CraftingManager.getInstance().findMatchingRecipe(inventory, world), outputInv, EnumFacing.DOWN); for(Entry<Integer, Map<Integer, Integer>> entry1 : syphonMap.entrySet()) { @@ -366,10 +366,10 @@ public class RitualEffectCrafting extends RitualEffect this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, true); } - world.markBlockForUpdate(x, y-1, z + 2); - world.markBlockForUpdate(x, y-1, z - 2); - world.markBlockForUpdate(x + 2, y-1, z); - world.markBlockForUpdate(x - 2, y-1, z); + world.markBlockForUpdate(pos.add(0, 1, 2)); + world.markBlockForUpdate(pos.add(0, 1, -2)); + world.markBlockForUpdate(pos.add(2, 1, 0)); + world.markBlockForUpdate(pos.add(-2, 1, 0)); // long endTime = System.nanoTime(); // diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java index 6601a171..f5d4296a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityItem; import net.minecraft.init.Blocks; import net.minecraft.inventory.IInventory; @@ -12,8 +13,8 @@ import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -44,7 +45,7 @@ public class RitualEffectCrushing extends RitualEffect return; } - TileEntity tile = world.getTileEntity(x, y + 1, z); + TileEntity tile = world.getTileEntity(pos.offsetUp()); IInventory tileEntity; if (tile instanceof IInventory) @@ -107,30 +108,32 @@ public class RitualEffectCrushing extends RitualEffect { for (int k = -1; k <= 1; k++) { - Block block = world.getBlock(x + i, y + j, z + k); - int meta = world.getBlockMetadata(x + i, y + j, z + k); - if(block.getBlockHardness(world, x + i, y + j, z + k) == -1) + BlockPos newPos = pos.add(i, j, k); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); + + if(block.getBlockHardness(world, newPos) == -1) { continue; } - if (block != null && !world.isAirBlock(x + i, y + j, z + k)) + if (block != null && !world.isAirBlock(newPos)) { if ((block.equals(ModBlocks.ritualStone) || block.equals(ModBlocks.blockMasterStone)) || SpellHelper.isBlockFluid(block)) { continue; } - if (isSilkTouch && block.canSilkHarvest(world, null, x + i, y + j, z + k, meta)) + if (isSilkTouch && block.canSilkHarvest(world, newPos, state, null)) { - ItemStack item = new ItemStack(block, 1, meta); + ItemStack item = new ItemStack(block, 1, block.getMetaFromState(state)); ItemStack copyStack = item.copyItemStack(item); - SpellHelper.insertStackIntoInventory(copyStack, tileEntity, ForgeDirection.DOWN); + SpellHelper.insertStackIntoInventory(copyStack, tileEntity, EnumFacing.DOWN); if (copyStack.stackSize > 0) { - world.spawnEntityInWorld(new EntityItem(world, x + 0.4, y + 2, z + 0.5, copyStack)); + world.spawnEntityInWorld(new EntityItem(world, pos.getX() + 0.5, pos.getY() + 2, pos.getZ() + 0.5, copyStack)); } if (hasCrystallos) @@ -139,7 +142,7 @@ public class RitualEffectCrushing extends RitualEffect } } else { - ArrayList<ItemStack> itemDropList = block.getDrops(world, x + i, y + j, z + k, meta, fortuneLevel); + List<ItemStack> itemDropList = block.getDrops(world, newPos, state, fortuneLevel); if (itemDropList != null) { @@ -156,10 +159,10 @@ public class RitualEffectCrushing extends RitualEffect this.canDrainReagent(ritualStone, ReagentRegistry.incendiumReagent, incendiumDrain, true); } - SpellHelper.insertStackIntoInventory(copyStack, tileEntity, ForgeDirection.DOWN); + SpellHelper.insertStackIntoInventory(copyStack, tileEntity, EnumFacing.DOWN); if (copyStack.stackSize > 0) { - world.spawnEntityInWorld(new EntityItem(world, x + 0.4, y + 2, z + 0.5, copyStack)); + world.spawnEntityInWorld(new EntityItem(world, pos.getX() + 0.5, pos.getY() + 2, pos.getZ() + 0.5, copyStack)); } } @@ -177,8 +180,8 @@ public class RitualEffectCrushing extends RitualEffect } } } - world.setBlockToAir(x + i, y + j, z + k); - world.playSoundEffect(x + i, y + j, z + k, "mob.endermen.portal", 1.0F, 1.0F); + world.setBlockToAir(newPos); + world.playSoundEffect(newPos.getX(), newPos.getY(), newPos.getZ(), "mob.endermen.portal", 1.0F, 1.0F); SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); @@ -197,7 +200,7 @@ public class RitualEffectCrushing extends RitualEffect Item item = stack.getItem(); if (item instanceof ItemBlock) { - Block block = ((ItemBlock) item).field_150939_a; + Block block = ((ItemBlock) item).getBlock(); if (block == Blocks.cobblestone || block == Blocks.stone) { @@ -221,7 +224,7 @@ public class RitualEffectCrushing extends RitualEffect Item item = stack.getItem(); if (item instanceof ItemBlock) { - Block block = ((ItemBlock) item).field_150939_a; + Block block = ((ItemBlock) item).getBlock(); if (hasIncendium) { @@ -240,65 +243,6 @@ public class RitualEffectCrushing extends RitualEffect return stack; } - public boolean isSilkTouch(World world, int x, int y, int z) - { - int index = 0; - for (int i = -2; i <= 2; i++) - { - for (int j = -2; j <= 2; j++) - { - int index1 = Math.abs(i); - int index2 = Math.abs(j); - - if ((index1 == 2 && (index2 == 2 || index2 == 1)) || (index1 == 1 && index2 == 2)) - { - Block block = world.getBlock(x + i, y + 1, z + j); - if (block == Blocks.gold_block) - { - index++; - } - } - } - } - - return index >= 12; - } - - public int getFortuneLevel(World world, int x, int y, int z) - { - int index = 0; - for (int i = -2; i <= 2; i++) - { - for (int j = -2; j <= 2; j++) - { - int index1 = Math.abs(i); - int index2 = Math.abs(j); - - if ((index1 == 2 && (index2 == 2 || index2 == 1)) || (index1 == 1 && index2 == 2)) - { - Block block = world.getBlock(x + i, y + 1, z + j); - if (block == Blocks.emerald_block || block == Blocks.diamond_block) - { - index++; - } - } - } - } - - if (index >= 12) - { - return 3; - } else if (index >= 8) - { - return 2; - } else if (index >= 4) - { - return 1; - } - - return 0; - } - @Override public int getCostPerRefresh() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java index f4313d20..2a93bb54 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java @@ -67,7 +67,7 @@ public class RitualEffectDemonPortal extends RitualEffect { if(rand.nextInt(10) == 0) { - this.createRandomLightning(world, x, y, z); + this.createRandomLightning(world, pos.getX(), pos.getY(), pos.getZ()); } reagentAmount += drainAmount; @@ -81,9 +81,9 @@ public class RitualEffectDemonPortal extends RitualEffect if(reagentsFulfilled && checkCreatePortal(ritualStone)) { - world.setBlock(x, y+1, z, ModBlocks.blockDemonPortal); + world.setBlockState(pos.offsetUp(), ModBlocks.blockDemonPortal.getDefaultState()); - TEDemonPortal portal = (TEDemonPortal) world.getTileEntity(x, y + 1, z); + TEDemonPortal portal = (TEDemonPortal) world.getTileEntity(pos.offsetUp()); portal.start(); ritualStone.setActive(false); @@ -95,11 +95,12 @@ public class RitualEffectDemonPortal extends RitualEffect public boolean checkCreatePortal(IMasterRitualStone ritualStone) { - TileEntity entity = ritualStone.getWorld().getTileEntity(ritualStone.getXCoord(), ritualStone.getYCoord() + 1, ritualStone.getZCoord()); + BlockPos pos = ritualStone.getPosition(); + TileEntity entity = ritualStone.getWorldObj().getTileEntity(pos.offsetUp()); if(entity instanceof IBloodAltar) { IBloodAltar altar = (IBloodAltar)entity; - if(altar.hasDemonBlood() && ritualStone.getWorld().isAirBlock(ritualStone.getXCoord(), ritualStone.getYCoord() + 2, ritualStone.getZCoord())) + if(altar.hasDemonBlood() && ritualStone.getWorldObj().isAirBlock(pos.offsetUp(2))) { return true; } @@ -131,13 +132,11 @@ public class RitualEffectDemonPortal extends RitualEffect public boolean checkJars(IMasterRitualStone ritualStone) { - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); + BlockPos position = ritualStone.getPosition(); for(Int3 pos : jarLocations) { - if(!(ritualStone.getWorld().getTileEntity(x + pos.xCoord, y + pos.yCoord, z + pos.zCoord) instanceof TEBellJar)) + if(!(ritualStone.getWorldObj().getTileEntity(position.add(pos.xCoord, pos.yCoord, pos.zCoord)) instanceof TEBellJar)) { return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java index 3ed4f53b..a44aae46 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java @@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.common.rituals; import java.util.ArrayList; import java.util.List; -import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemBlock; @@ -13,6 +13,7 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -32,7 +33,7 @@ public class RitualEffectEllipsoid extends RitualEffect World world = ritualStone.getWorldObj(); BlockPos pos = ritualStone.getPosition(); - TileEntity tile = world.getTileEntity(x, y + 1, z); + TileEntity tile = world.getTileEntity(pos.offsetUp()); if (!(tile instanceof IInventory) || ((IInventory) tile).getSizeInventory() < 3) { @@ -61,7 +62,7 @@ public class RitualEffectEllipsoid extends RitualEffect entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); } else { - tile = world.getTileEntity(x, y-1, z); + tile = world.getTileEntity(pos.offsetDown()); if(!(tile instanceof IInventory)) { return; @@ -114,7 +115,7 @@ public class RitualEffectEllipsoid extends RitualEffect while(j <= ySize) { - if(y + j < 0) + if(pos.getY() + j < 0) { j++; continue; @@ -143,36 +144,29 @@ public class RitualEffectEllipsoid extends RitualEffect count--; - Block block = world.getBlock(x + i, y + j, z + k); - - if (!block.isAir(world, x + i, y + j, z + k)) + BlockPos newPos = pos.add(i, j, k); + + if (!world.isAirBlock(newPos)) { k++; continue; } else { //This is pulled from the ItemBlock's placing calls - int i1 = placedBlock.getMetadata(stack.getItemDamage()); - int j1 = placedBlock.field_150939_a.onBlockPlaced(world, x + i, y + j, z + k, 0, 0, 0, 0, i1); + int newState = placedBlock.getMetadata(stack.getMetadata()); + IBlockState iblockstate1 = placedBlock.block.onBlockPlaced(world, newPos, EnumFacing.UP, 0, 0, 0, newState, null); - if (placedBlock.placeBlockAt(stack, null, world, x + i, y + j, z + k, 0, 0, 0, 0, j1)) + if (placedBlock.placeBlockAt(stack, null, world, pos, EnumFacing.UP, 0, 0, 0, iblockstate1)) { - world.playSoundEffect((double)(x + i + 0.5F), (double)(y + j + 0.5F), (double)(z + k + 0.5F), placedBlock.field_150939_a.stepSound.func_150496_b(), (placedBlock.field_150939_a.stepSound.getVolume() + 1.0F) / 2.0F, placedBlock.field_150939_a.stepSound.getPitch() * 0.8F); + world.playSoundEffect((double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), placedBlock.block.stepSound.getPlaceSound(), (placedBlock.block.stepSound.getVolume() + 1.0F) / 2.0F, placedBlock.block.stepSound.getFrequency() * 0.8F); --stack.stackSize; - if(stack.stackSize <= 0) - { - inv.setInventorySlotContents(slot, null); - } - - this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); - - incrementNext = true; - SoulNetworkHandler.syphonFromNetwork(owner, cost); - } -// world.setBlock(x + i, y + j, z + k, Blocks.stone); - + this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); + + incrementNext = true; + SoulNetworkHandler.syphonFromNetwork(owner, cost); + k++; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java index 1c4717db..7d83e46c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java @@ -1,21 +1,23 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.world.World; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; public class RitualEffectEvaporation extends RitualEffect { @@ -40,7 +42,8 @@ public class RitualEffectEvaporation extends RitualEffect entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); } else { - Block block1 = world.getBlock(x, y - 1, z); + IBlockState state1 = world.getBlockState(pos.offsetDown()); + Block block1 = state1.getBlock(); int range = this.getRadiusForModifierBlock(block1); boolean[][][] boolList = new boolean[range * 2 + 1][range * 2 + 1][range * 2 + 1]; @@ -71,65 +74,26 @@ public class RitualEffectEvaporation extends RitualEffect { if (boolList[i][j][k]) { - if (i - 1 >= 0 && !boolList[i - 1][j][k]) - { - Block block = world.getBlock(x - range + i - 1, y - range + j, z - range + k); - if (world.isAirBlock(x - range + i - 1, y - range + j, z - range + k) || block == ModBlocks.blockSpectralContainer) - { - boolList[i - 1][j][k] = true; - isReady = false; - } - } - - if (j - 1 >= 0 && !boolList[i][j - 1][k]) - { - Block block = world.getBlock(x - range + i, y - range + j - 1, z - range + k); - if (world.isAirBlock(x - range + i, y - range + j - 1, z - range + k) || block == ModBlocks.blockSpectralContainer) - { - boolList[i][j - 1][k] = true; - isReady = false; - } - } - - if (k - 1 >= 0 && !boolList[i][j][k - 1]) - { - Block block = world.getBlock(x - range + i, y - range + j, z - range + k - 1); - if (world.isAirBlock(x - range + i, y - range + j, z - range + k - 1) || block == ModBlocks.blockSpectralContainer) - { - boolList[i][j][k - 1] = true; - isReady = false; - } - } - - if (i + 1 <= 2 * range && !boolList[i + 1][j][k]) - { - Block block = world.getBlock(x - range + i + 1, y - range + j, z - range + k); - if (world.isAirBlock(x - range + i + 1, y - range + j, z - range + k) || block == ModBlocks.blockSpectralContainer) - { - boolList[i + 1][j][k] = true; - isReady = false; - } - } - - if (j + 1 <= 2 * range && !boolList[i][j + 1][k]) - { - Block block = world.getBlock(x - range + i, y - range + j + 1, z - range + k); - if (world.isAirBlock(x - range + i, y - range + j + 1, z - range + k) || block == ModBlocks.blockSpectralContainer) - { - boolList[i][j + 1][k] = true; - isReady = false; - } - } - - if (k + 1 <= 2 * range && !boolList[i][j][k + 1]) - { - Block block = world.getBlock(x - range + i, y - range + j, z - range + k + 1); - if (world.isAirBlock(x - range + i, y - range + j, z - range + k + 1) || block == ModBlocks.blockSpectralContainer) - { - boolList[i][j][k + 1] = true; - isReady = false; - } - } + BlockPos position = pos.add(i - range, j - range, k - range); + + for(EnumFacing face : EnumFacing.VALUES) + { + int iP = i + face.getFrontOffsetX(); + int jP = j + face.getFrontOffsetY(); + int kP = k + face.getFrontOffsetZ(); + + if(iP >= 0 && iP <= 2 * range && jP >= 0 && jP <= 2 * range && kP >= 0 && kP <= 2 * range && !boolList[iP][jP][kP]) + { + BlockPos newPos = position.add(face.getDirectionVec()); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); + if (world.isAirBlock(newPos) || block == ModBlocks.blockSpectralContainer) + { + boolList[iP][jP][kP] = true; + isReady = false; + } + } + } } } } @@ -147,11 +111,13 @@ public class RitualEffectEvaporation extends RitualEffect continue; } - Block block = world.getBlock(x + i - range, y + j - range, z + k - range); + BlockPos newPos = pos.add(i - range, j - range, k - range); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); if (block == ModBlocks.blockSpectralContainer) { - world.setBlockToAir(x + i - range, y + j - range, z + k - range); + world.setBlockToAir(newPos); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java index a7342a9d..92e57285 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java @@ -1,5 +1,24 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumParticleTypes; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.living.EnderTeleportEvent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -9,23 +28,6 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport; -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.living.EnderTeleportEvent; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; public class RitualEffectExpulsion extends RitualEffect { @@ -52,10 +54,10 @@ public class RitualEffectExpulsion extends RitualEffect int teleportDistance = hasVirtus ? 300 : 100; int range = hasPotentia ? 50 : 25; - List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range); + List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, range, range); boolean flag = false; - TileEntity tile = world.getTileEntity(x, y + 1, z); + TileEntity tile = world.getTileEntity(pos.offsetUp()); IInventory inventoryTile = null; if (tile instanceof IInventory) { @@ -116,7 +118,7 @@ public class RitualEffectExpulsion extends RitualEffect int teleportDistance = hasVirtus ? 300 : 100; int range = hasPotentia ? 50 : 25; - List<EntityLivingBase> livingList = SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range); + List<EntityLivingBase> livingList = SpellHelper.getLivingEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, range, range); boolean flag = false; for (EntityLivingBase livingEntity : livingList) @@ -195,18 +197,22 @@ public class RitualEffectExpulsion extends RitualEffect double d5 = lastZ; SpellTeleport.moveEntityViaTeleport(entityLiving, event.targetX, event.targetY, event.targetZ); boolean flag = false; + + int i = MathHelper.floor_double(entityLiving.posX); int j = MathHelper.floor_double(entityLiving.posY); int k = MathHelper.floor_double(entityLiving.posZ); int l; - if (entityLiving.worldObj.blockExists(i, j, k)) +// if (entityLiving.worldObj.blockExists(i, j, k)) { boolean flag1 = false; while (!flag1 && j > 0) { - Block block = entityLiving.worldObj.getBlock(i, j - 1, k); + BlockPos newPos = new BlockPos(i, j - 1, k); + IBlockState state = entityLiving.worldObj.getBlockState(newPos); + Block block = state.getBlock(); if (block != null && block.getMaterial().blocksMovement()) { @@ -222,7 +228,7 @@ public class RitualEffectExpulsion extends RitualEffect { SpellTeleport.moveEntityViaTeleport(entityLiving, entityLiving.posX, entityLiving.posY, entityLiving.posZ); - if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.boundingBox)) + if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.getBoundingBox()).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.getBoundingBox())) { flag = true; } @@ -246,7 +252,7 @@ public class RitualEffectExpulsion extends RitualEffect double d7 = d3 + (entityLiving.posX - d3) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; double d8 = d4 + (entityLiving.posY - d4) * d6 + entityLiving.worldObj.rand.nextDouble() * (double) entityLiving.height; double d9 = d5 + (entityLiving.posZ - d5) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; - entityLiving.worldObj.spawnParticle("portal", d7, d8, d9, (double) f, (double) f1, (double) f2); + entityLiving.worldObj.spawnParticle(EnumParticleTypes.PORTAL, d7, d8, d9, (double) f, (double) f1, (double) f2); } return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java index a3f2ae1b..cd446a38 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java @@ -1,18 +1,18 @@ package WayofTime.alchemicalWizardry.common.rituals; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import java.util.ArrayList; +import java.util.List; + import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.BlockPos; import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; public class RitualEffectFeatheredEarth extends RitualEffect //Nullifies all fall damage in the area of effect { @@ -33,6 +33,10 @@ public class RitualEffectFeatheredEarth extends RitualEffect //Nullifies all fal if (ritualStone.getCooldown() > 0) { + int x = pos.getX(); + int y = pos.getY(); + int z = pos.getZ(); + world.addWeatherEffect(new EntityLightningBolt(world, x + 4, y + 5, z + 4)); world.addWeatherEffect(new EntityLightningBolt(world, x + 4, y + 5, z - 4)); world.addWeatherEffect(new EntityLightningBolt(world, x - 4, y + 5, z - 4)); @@ -46,14 +50,11 @@ public class RitualEffectFeatheredEarth extends RitualEffect //Nullifies all fal int range = this.getHorizontalRangeForReagent(hasTerrae, hasOrbisTerrae); int verticalRange = hasAether ? 60 : 30; - List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(x, y, z, x + 1, y + 1, z + 1).expand(range, verticalRange, range)); + List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(pos, pos.add(1, 1, 1)).expand(range, verticalRange, range)); int entityCount = 0; boolean flag = false; - for (EntityLivingBase entity : entities) - { - entityCount++; - } + entityCount += entities.size(); if (currentEssence < this.getCostPerRefresh() * entityCount) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java index 57ae3848..8d0e9579 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java @@ -50,9 +50,10 @@ public class RitualEffectFeatheredKnife extends RitualEffect { for (int k = -10; k <= 10; k++) { - if (world.getTileEntity(x + i, y + k, z + j) instanceof IBloodAltar) + BlockPos newPos = pos.add(i, k, j); + if (world.getTileEntity(newPos) instanceof IBloodAltar) { - tileAltar = (IBloodAltar) world.getTileEntity(x + i, y + k, z + j); + tileAltar = (IBloodAltar) world.getTileEntity(newPos); testFlag = true; } } @@ -68,10 +69,9 @@ public class RitualEffectFeatheredKnife extends RitualEffect double range = hasReductus ? 8 : 15; double vertRange = hasReductus ? 8 : 20; - List<EntityPlayer> list = SpellHelper.getPlayersInRange(world, x + 0.5, y + 0.5, z + 0.5, range, vertRange); + List<EntityPlayer> list = SpellHelper.getPlayersInRange(world, pos.getX(), pos.getY(), pos.getZ(), range, vertRange); int entityCount = 0; - boolean flag = false; if (currentEssence < this.getCostPerRefresh() * list.size()) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java index d2423a38..b3b7102a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java @@ -32,10 +32,10 @@ public class RitualEffectFlight extends RitualEffect BlockPos pos = ritualStone.getPosition(); int range = 20; - int verticalRange = 30; - AxisAlignedBB axis = new AxisAlignedBB(x, y, z, x + 1, y + 1, z + 1).expand(range, verticalRange, range); - axis.maxY = 256; - axis.minY = 0; + int verticalRange = 70; + AxisAlignedBB axis = new AxisAlignedBB(pos, pos.add(1, 1, 1)).expand(range, verticalRange, range); +// axis.maxY = 256; +// axis.minY = 0; List<EntityPlayer> entities = world.getEntitiesWithinAABB(EntityPlayer.class, axis); int entityCount = 0; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java index 3447421b..36bb9bf8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java @@ -38,7 +38,7 @@ public class RitualEffectFullStomach extends RitualEffect double horizRange = 16; double vertRange = 16; - List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, x + 0.5, y + 0.5, z + 0.5, horizRange, vertRange); + List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, horizRange, vertRange); if (playerList == null) { @@ -50,14 +50,14 @@ public class RitualEffectFullStomach extends RitualEffect SoulNetworkHandler.causeNauseaToPlayer(owner); } else { - TileEntity tile = world.getTileEntity(x, y + 1, z); + TileEntity tile = world.getTileEntity(pos.offsetUp()); IInventory inventory = null; if (tile instanceof IInventory) { inventory = (IInventory) tile; } else { - tile = world.getTileEntity(x, y - 1, z); + tile = world.getTileEntity(pos.offsetDown()); if (tile instanceof IInventory) { inventory = (IInventory) tile; @@ -81,8 +81,8 @@ public class RitualEffectFullStomach extends RitualEffect { ItemFood foodItem = (ItemFood) stack.getItem(); - int regularHeal = foodItem.func_150905_g(stack); - float saturatedHeal = foodItem.func_150906_h(stack) * regularHeal * 2.0f; + int regularHeal = foodItem.getHealAmount(stack); + float saturatedHeal = foodItem.getSaturationModifier(stack) * regularHeal * 2.0f; if (saturatedHeal + satLevel <= 20) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java index 4b833b9c..6502585e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java @@ -1,19 +1,20 @@ package WayofTime.alchemicalWizardry.common.rituals; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.block.IGrowable; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.common.IPlantable; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import net.minecraft.block.Block; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.IPlantable; -import net.minecraft.block.IGrowable; - -import java.util.ArrayList; -import java.util.List; public class RitualEffectGrowth extends RitualEffect { @@ -55,7 +56,8 @@ public class RitualEffectGrowth extends RitualEffect { if (this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, false)) { - if (SpellHelper.hydrateSoil(world, x + i, y + 1, z + j)) + BlockPos newPos = pos.add(i, 1, j); + if (SpellHelper.hydrateSoil(world, newPos)) { this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, true); } @@ -71,13 +73,15 @@ public class RitualEffectGrowth extends RitualEffect { for (int j = -range; j <= range; j++) { - Block block = world.getBlock(x + i, y + 2, z + j); + BlockPos newPos = pos.add(i, 2, j); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); if (block instanceof IPlantable || block instanceof IGrowable) { { - SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.getDimensionId(), 3, x, y, z); - block.updateTick(world, x + i, y + 2, z + j, world.rand); + SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, world.provider.getDimensionId(), 3, pos); + block.updateTick(world, newPos, state, world.rand); flag++; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java index 790d2986..c0f7dcf6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java @@ -1,21 +1,22 @@ package WayofTime.alchemicalWizardry.common.rituals; -import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import java.util.ArrayList; +import java.util.List; + import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.BlockPos; import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; +import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class RitualEffectHarvest extends RitualEffect { @@ -47,7 +48,8 @@ public class RitualEffectHarvest extends RitualEffect return; } - Block block = world.getBlock(x, y - 1, z); + IBlockState state = world.getBlockState(pos.offsetDown()); + Block block = state.getBlock(); int flag = 0; int range = this.getRadiusForModifierBlock(block); int vertRange = 4; @@ -58,7 +60,7 @@ public class RitualEffectHarvest extends RitualEffect { for (int k = -range; k <= range; k++) { - if (HarvestRegistry.harvestBlock(world, x + i, y + j, z + k) && flag < maxCount) + if (HarvestRegistry.harvestBlock(world, pos.add(i, j, k)) && flag < maxCount) { flag++; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java index b3c86d7b..f2eac94b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java @@ -1,20 +1,20 @@ package WayofTime.alchemicalWizardry.common.rituals; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import java.util.ArrayList; +import java.util.List; + import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.BlockPos; import net.minecraft.world.World; - -import java.util.ArrayList; -import java.util.List; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class RitualEffectHealing extends RitualEffect { @@ -43,9 +43,8 @@ public class RitualEffectHealing extends RitualEffect int range = 15 * (hasPraesidium ? 3 : 1); int vertRange = 15 * (hasPraesidium ? 3 : 1); - List<EntityLivingBase> list = SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, vertRange); + List<EntityLivingBase> list = SpellHelper.getLivingEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, range, vertRange); int entityCount = 0; - boolean flag = false; for (EntityLivingBase livingEntity : list) { From 419f532502a15e798773ddaf8b313d64c492b58e Mon Sep 17 00:00:00 2001 From: Arcaratus <byou64@gmail.com> Date: Wed, 29 Jul 2015 14:35:00 -0400 Subject: [PATCH 10/33] Finished all Blocks --- .../AlchemicalWizardry.java | 11 +- .../alchemicalWizardry/ModBlocks.java | 11 +- ...or.java => BlockAlchemicalCalcinator.java} | 39 ++--- .../common/block/BlockAltar.java | 89 ++++-------- .../common/block/BlockArmourForge.java | 67 +++++---- .../common/block/BlockBelljar.java | 40 +++--- .../common/block/BlockBloodLightSource.java | 29 +--- .../common/block/BlockBloodRune.java | 67 +-------- .../common/block/BlockBloodStoneBrick.java | 13 -- .../common/block/BlockChemistrySet.java | 74 +++------- .../common/block/BlockConduit.java | 53 +------ .../common/block/BlockCrystal.java | 47 +----- .../common/block/BlockDemonPortal.java | 28 ++-- .../common/block/BlockEfficiencyRune.java | 14 -- .../common/block/BlockEmptySocket.java | 13 -- .../common/block/BlockEnchantmentGlyph.java | 50 ++----- .../common/block/BlockFilledSocket.java | 18 +-- .../block/BlockImperfectRitualStone.java | 40 ++---- .../common/block/BlockIncenseCrucible.java | 80 +++-------- .../block/BlockLargeBloodStoneBrick.java | 13 -- .../common/block/BlockLifeEssence.java | 30 +--- .../common/block/BlockMasterStone.java | 36 ++--- .../common/block/BlockMimic.java | 119 +++++++--------- .../common/block/BlockOrientable.java | 28 ++-- .../common/block/BlockPedestal.java | 68 ++------- .../common/block/BlockPlinth.java | 68 ++------- .../common/block/BlockReagentConduit.java | 26 +--- .../common/block/BlockRitualStone.java | 82 ++--------- .../common/block/BlockRuneOfSacrifice.java | 14 -- .../block/BlockRuneOfSelfSacrifice.java | 14 -- .../common/block/BlockSchematicSaver.java | 12 +- .../common/block/BlockSpectral.java | 40 ++---- .../common/block/BlockSpectralContainer.java | 27 +--- .../common/block/BlockSpeedRune.java | 14 -- .../common/block/BlockSpellEffect.java | 13 +- .../common/block/BlockSpellEnhancement.java | 12 +- .../common/block/BlockSpellModifier.java | 12 +- .../common/block/BlockSpellParadigm.java | 26 ++-- .../common/block/BlockSpellTable.java | 51 ++----- .../common/block/BlockStabilityGlyph.java | 35 +---- .../common/block/BlockTeleposer.java | 64 ++------- .../common/omega/OmegaParadigm.java | 3 +- .../common/tileEntity/TECrucible.java | 43 +++--- .../common/tileEntity/TEMimicBlock.java | 4 +- .../assets/alchemicalwizardry/lang/en_US.lang | 134 +++++++++--------- 45 files changed, 478 insertions(+), 1293 deletions(-) rename src/main/java/WayofTime/alchemicalWizardry/common/block/{BlockAlchemicCalcinator.java => BlockAlchemicalCalcinator.java} (77%) diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index 4fe093a4..806e4e8b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -122,7 +122,7 @@ import WayofTime.alchemicalWizardry.common.harvest.GourdHarvestHandler; import WayofTime.alchemicalWizardry.common.items.ItemIncense; import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; -import WayofTime.alchemicalWizardry.common.items.forestry.ItemBloodFrame; +//import WayofTime.alchemicalWizardry.common.items.forestry.ItemBloodFrame; import WayofTime.alchemicalWizardry.common.items.sigil.holding.HoldingPacketHandler; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmEarth; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmFire; @@ -282,7 +282,7 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiHandler; -import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration; +//import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration; @Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v1.3.3", guiFactory = "WayofTime.alchemicalWizardry.client.gui.ConfigGuiFactory") @@ -560,7 +560,6 @@ public class AlchemicalWizardry FluidRegistry.registerFluid(lifeEssenceFluid); ModBlocks.init(); - ModBlocks.registerBlocksInPre(); ModItems.init(); ModItems.registerItems(); @@ -656,7 +655,7 @@ public class AlchemicalWizardry ItemStack largeBloodStoneBrickStack = new ItemStack(ModBlocks.largeBloodStoneBrick); ItemStack bloodStoneBrickStackCrafted = new ItemStack(ModBlocks.bloodStoneBrick, 4); ItemStack growthSigilStack = new ItemStack(ModItems.growthSigil); - ItemStack blockHomHeartStack = new ItemStack(ModBlocks.blockHomHeart); + ItemStack blockHomHeartStack = new ItemStack(ModBlocks.blockSpellTable); ItemStack redWoolStack = new ItemStack(Blocks.wool, 1, 14); ItemStack simpleCatalystStack = new ItemStack(ModItems.simpleCatalyst); ItemStack duskRitualDivinerStack = new ItemStack(ModItems.itemRitualDiviner); @@ -795,7 +794,7 @@ public class AlchemicalWizardry ModBlocks.bloodStoneBrick.setHarvestLevel("pickaxe", 0); ModBlocks.largeBloodStoneBrick.setHarvestLevel("pickaxe", 0); ModBlocks.blockWritingTable.setHarvestLevel("pickaxe", 1); - ModBlocks.blockHomHeart.setHarvestLevel("pickaxe", 1); + ModBlocks.blockSpellTable.setHarvestLevel("pickaxe", 1); ModBlocks.blockPedestal.setHarvestLevel("pickaxe", 2); ModBlocks.blockPlinth.setHarvestLevel("pickaxe", 2); ModBlocks.blockTeleposer.setHarvestLevel("pickaxe", 2); @@ -1068,7 +1067,7 @@ public class AlchemicalWizardry GameRegistry.addRecipe(new ItemStack(ModItems.itemTankSegmenter), "gqi", " rq", "q g", 'q', quartzRodStack, 'i', ironIngotStack, 'r', strengthenedCatalystStack, 'g', goldIngotStack); GameRegistry.addRecipe(new ItemStack(ModItems.itemDestinationClearer), "qcq", "c c", "qcq", 'q', quartzRodStack, 'c', simpleCatalystStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockAlchemicCalcinator), "pgp", "gsg", "ccc", 'p', crackedRunicPlateStack, 'g', glassStack, 's', strengthenedCatalystStack, 'c', cobblestoneStack); + GameRegistry.addRecipe(new ItemStack(ModBlocks.blockAlchemicalCalcinator), "pgp", "gsg", "ccc", 'p', crackedRunicPlateStack, 'g', glassStack, 's', strengthenedCatalystStack, 'c', cobblestoneStack); GameRegistry.addRecipe(new ItemStack(ModBlocks.blockCrystalBelljar), "GGG", "GcG", "www", 'G', glassStack, 'c', concentratedCatalystStack, 'w', new ItemStack(Blocks.wooden_slab, 1, craftingConstant)); GameRegistry.addRecipe(new ItemStack(ModBlocks.blockReagentConduit), "isi", "scs", "isi", 'c', concentratedCatalystStack, 's', stringStack, 'i', ironIngotStack); diff --git a/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java b/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java index d766c912..8b030819 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java @@ -4,7 +4,7 @@ import net.minecraft.block.Block; import net.minecraft.item.ItemBlock; import net.minecraftforge.fml.common.registry.GameRegistry; import WayofTime.alchemicalWizardry.common.block.BlockArmourForge; -import WayofTime.alchemicalWizardry.common.block.BlockAlchemicCalcinator; +import WayofTime.alchemicalWizardry.common.block.BlockAlchemicalCalcinator; import WayofTime.alchemicalWizardry.common.block.BlockAltar; import WayofTime.alchemicalWizardry.common.block.BlockBelljar; import WayofTime.alchemicalWizardry.common.block.BlockBloodLightSource; @@ -126,7 +126,7 @@ public class ModBlocks blockSpellTable = registerBlock(new BlockSpellTable(), "spell_table"); blockPedestal = registerBlock(new BlockPedestal(), "pedestal"); blockPlinth = registerBlock(new BlockPlinth(), "plinth"); - blockConduit = registerBlock(new BlockConduit(), "conduit"); + blockConduit = registerBlock(new BlockConduit(), "spell_conduit"); blockBloodLight = registerBlock(new BlockBloodLightSource(), "blood_light"); blockSpellEffect = registerBlock(new BlockSpellEffect(), "spell_effect"); blockSpellParadigm = registerBlock(new BlockSpellParadigm(), ItemSpellParadigmBlock.class, "spell_paradigm"); @@ -136,7 +136,7 @@ public class ModBlocks blockDemonPortal = registerBlock(new BlockDemonPortal(), "demon_portal"); blockBuildingSchematicSaver = registerBlock(new BlockSchematicSaver(), "schematic_saver"); blockReagentConduit = registerBlock(new BlockReagentConduit(), "reagent_conduit"); - blockAlchemicalCalcinator = registerBlock(new BlockAlchemicCalcinator(), "alchemical_calcinator"); + blockAlchemicalCalcinator = registerBlock(new BlockAlchemicalCalcinator(), "alchemical_calcinator"); blockCrystalBelljar = registerBlock(new BlockBelljar(), ItemBlockCrystalBelljar.class, "belljar"); blockDemonChest = registerBlock(new BlockDemonChest(), "demon_chest"); blockCrystal = registerBlock(new BlockCrystal(), ItemCrystalBlock.class, "crystal_block"); @@ -145,14 +145,15 @@ public class ModBlocks blockLifeEssence = registerBlock(new BlockLifeEssence(), "life_essence"); blockEnchantmentGlyph = registerBlock(new BlockEnchantmentGlyph(), ItemEnchantmentGlyphBlock.class, "enchantment_glyph"); blockStabilityGlyph = registerBlock(new BlockStabilityGlyph(), ItemStabilityGlyphBlock.class, "stability_glyph"); - blockCrucible = registerBlock(new BlockIncenseCrucible(), "incense_cruicible"); + blockCrucible = registerBlock(new BlockIncenseCrucible(), "incense_crucible"); } public static Block registerBlock(Block block, String unlocalizedName) { + //TODO Insert Model Code here block.setUnlocalizedName(unlocalizedName); -// if (!) +// if (!) //creative tab blacklist { block.setCreativeTab(AlchemicalWizardry.tabBloodMagic); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicalCalcinator.java similarity index 77% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicCalcinator.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicalCalcinator.java index e9e98e44..2413fa19 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicCalcinator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicalCalcinator.java @@ -1,31 +1,30 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; -import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import java.util.Random; -public class BlockAlchemicCalcinator extends BlockContainer +public class BlockAlchemicalCalcinator extends BlockContainer { - public BlockAlchemicCalcinator() + public BlockAlchemicalCalcinator() { super(Material.rock); setHardness(2.0F); setResistance(5.0F); - this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setBlockName("alchemicCalcinator"); } @Override @@ -34,12 +33,6 @@ public class BlockAlchemicCalcinator extends BlockContainer return new TEAlchemicCalcinator(); } - @Override - public boolean renderAsNormalBlock() - { - return false; - } - @Override public int getRenderType() { @@ -53,7 +46,7 @@ public class BlockAlchemicCalcinator extends BlockContainer } @Override - public boolean hasTileEntity() + public boolean hasTileEntity(IBlockState blockState) { return true; } @@ -65,16 +58,16 @@ public class BlockAlchemicCalcinator extends BlockContainer } @Override - public void breakBlock(World world, int x, int y, int z, Block par5, int par6) + public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) { - dropItems(world, x, y, z); - super.breakBlock(world, x, y, z, par5, par6); + dropItems(world, blockPos); + super.breakBlock(world, blockPos, blockState); } - private void dropItems(World world, int x, int y, int z) + private void dropItems(World world, BlockPos blockPos) { Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(x, y, z); + TileEntity tileEntity = world.getTileEntity(blockPos); if (!(tileEntity instanceof IInventory)) { @@ -92,9 +85,7 @@ public class BlockAlchemicCalcinator extends BlockContainer float rx = rand.nextFloat() * 0.8F + 0.1F; float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, - x + rx, y + ry, z + rz, - new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); + EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { @@ -112,9 +103,9 @@ public class BlockAlchemicCalcinator extends BlockContainer } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) + public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { - TEAlchemicCalcinator tileEntity = (TEAlchemicCalcinator) world.getTileEntity(x, y, z); + TEAlchemicCalcinator tileEntity = (TEAlchemicCalcinator) world.getTileEntity(blockPos); if (tileEntity == null || player.isSneaking()) { @@ -160,7 +151,7 @@ public class BlockAlchemicCalcinator extends BlockContainer } } - tileEntity.getWorldObj().markBlockForUpdate(x, y, z); + tileEntity.getWorld().markBlockForUpdate(blockPos); return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAltar.java index 1b425496..736658bd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAltar.java @@ -2,67 +2,33 @@ package WayofTime.alchemicalWizardry.common.block; import java.util.Random; -import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.api.items.IAltarManipulator; import WayofTime.alchemicalWizardry.common.items.EnergyBattery; import WayofTime.alchemicalWizardry.common.items.sigil.holding.SigilOfHolding; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class BlockAltar extends BlockContainer { - @SideOnly(Side.CLIENT) - private IIcon topIcon; - @SideOnly(Side.CLIENT) - private IIcon sideIcon2; - @SideOnly(Side.CLIENT) - private IIcon bottomIcon; - public BlockAltar() { super(Material.rock); setHardness(2.0F); setResistance(5.0F); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setBlockName("bloodAltar"); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_Top"); - this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_SideType2"); - this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_Bottom"); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta) - { - switch (side) - { - case 0: - return bottomIcon; - case 1: - return topIcon; - default: - return sideIcon2; - } } @Override @@ -72,9 +38,9 @@ public class BlockAltar extends BlockContainer } @Override - public int getComparatorInputOverride(World world, int x, int y, int z, int meta) + public int getComparatorInputOverride(World world, BlockPos blockPos) { - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(blockPos); if (tile instanceof TEAltar) { @@ -94,9 +60,9 @@ public class BlockAltar extends BlockContainer } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) + public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { - TEAltar tileEntity = (TEAltar) world.getTileEntity(x, y, z); + TEAltar tileEntity = (TEAltar) world.getTileEntity(blockPos); if (tileEntity == null || player.isSneaking()) { @@ -111,7 +77,7 @@ public class BlockAltar extends BlockContainer { if (player.worldObj.isRemote) { - world.markBlockForUpdate(x, y, z); + world.markBlockForUpdate(blockPos); } else { tileEntity.sendChatInfoToPlayer(player); @@ -122,7 +88,7 @@ public class BlockAltar extends BlockContainer { if (player.worldObj.isRemote) { - world.markBlockForUpdate(x, y, z); + world.markBlockForUpdate(blockPos); } else { tileEntity.sendMoreChatInfoToPlayer(player); @@ -141,7 +107,7 @@ public class BlockAltar extends BlockContainer { if (player.worldObj.isRemote) { - world.markBlockForUpdate(x, y, z); + world.markBlockForUpdate(blockPos); } else { tileEntity.sendChatInfoToPlayer(player); @@ -152,7 +118,7 @@ public class BlockAltar extends BlockContainer { if (player.worldObj.isRemote) { - world.markBlockForUpdate(x, y, z); + world.markBlockForUpdate(blockPos); } else { tileEntity.sendMoreChatInfoToPlayer(player); @@ -176,21 +142,21 @@ public class BlockAltar extends BlockContainer tileEntity.setInventorySlotContents(0, null); tileEntity.setActive(); } - world.markBlockForUpdate(x, y, z); + world.markBlockForUpdate(blockPos); return true; } @Override - public void breakBlock(World world, int x, int y, int z, Block par5, int par6) + public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) { - dropItems(world, x, y, z); - super.breakBlock(world, x, y, z, par5, par6); + dropItems(world, blockPos); + super.breakBlock(world, blockPos, blockState); } - private void dropItems(World world, int x, int y, int z) + private void dropItems(World world, BlockPos blockPos) { Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(x, y, z); + TileEntity tileEntity = world.getTileEntity(blockPos); if (!(tileEntity instanceof IInventory)) { @@ -208,9 +174,7 @@ public class BlockAltar extends BlockContainer float rx = rand.nextFloat() * 0.8F + 0.1F; float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, - x + rx, y + ry, z + rz, - new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); + EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { @@ -227,12 +191,6 @@ public class BlockAltar extends BlockContainer } } - @Override - public boolean renderAsNormalBlock() - { - return false; - } - @Override public int getRenderType() { @@ -246,15 +204,16 @@ public class BlockAltar extends BlockContainer } @Override - public boolean hasTileEntity() + public boolean hasTileEntity(IBlockState blockState) { return true; } @Override - public void randomDisplayTick(World world, int x, int y, int z, Random rand) + @SideOnly(Side.CLIENT) + public void randomDisplayTick(World world, BlockPos blockPos, IBlockState blockState, Random rand) { - TEAltar tileEntity = (TEAltar) world.getTileEntity(x, y, z); + TEAltar tileEntity = (TEAltar) world.getTileEntity(blockPos); if (!tileEntity.isActive()) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockArmourForge.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockArmourForge.java index 01097ac0..7d6c7d6f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockArmourForge.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockArmourForge.java @@ -9,6 +9,7 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -16,19 +17,19 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.List; public class BlockArmourForge extends Block { - public List<ArmourComponent> helmetList = new ArrayList(); - public List<ArmourComponent> plateList = new ArrayList(); - public List<ArmourComponent> leggingsList = new ArrayList(); - public List<ArmourComponent> bootsList = new ArrayList(); + public static List<ArmourComponent> helmetList = new ArrayList<ArmourComponent>(); + public static List<ArmourComponent> plateList = new ArrayList<ArmourComponent>(); + public static List<ArmourComponent> leggingsList = new ArrayList<ArmourComponent>(); + public static List<ArmourComponent> bootsList = new ArrayList<ArmourComponent>(); public BlockArmourForge() { @@ -39,23 +40,23 @@ public class BlockArmourForge extends Block } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) + public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { if (world.isRemote) { return false; } - int armourType = getArmourType(world, x, y, z); + int armourType = getArmourType(world, blockPos); if (armourType == -1) { return false; } - int direction = getDirectionForArmourType(world, x, y, z, armourType); + int direction = getDirectionForArmourType(world, blockPos, armourType); - if (!isParadigmValid(armourType, direction, world, x, y, z)) + if (!isParadigmValid(armourType, direction, world, blockPos)) { return false; } @@ -110,27 +111,27 @@ public class BlockArmourForge extends Block switch (direction) { case 1: - tileEntity = world.getTileEntity(x + xOff, y, z - zOff); + tileEntity = world.getTileEntity(blockPos.add(xOff, 0, -zOff)); break; case 2: - tileEntity = world.getTileEntity(x + zOff, y, z + xOff); + tileEntity = world.getTileEntity(blockPos.add(zOff, 0, xOff)); break; case 3: - tileEntity = world.getTileEntity(x - xOff, y, z + zOff); + tileEntity = world.getTileEntity(blockPos.add(-xOff, 0, zOff)); break; case 4: - tileEntity = world.getTileEntity(x - zOff, y, z - xOff); + tileEntity = world.getTileEntity(blockPos.add(-zOff, 0, -xOff)); break; case 5: - tileEntity = world.getTileEntity(x + xOff, y + zOff, z); + tileEntity = world.getTileEntity(blockPos.add(xOff, zOff, 0)); break; case 6: - tileEntity = world.getTileEntity(x, y + zOff, z + xOff); + tileEntity = world.getTileEntity(blockPos.add(0, zOff, xOff)); break; default: @@ -140,15 +141,13 @@ public class BlockArmourForge extends Block if (tileEntity instanceof TESocket) { ItemStack itemStack = ((TESocket) tileEntity).getStackInSlot(0); - int xCoord = tileEntity.xCoord; - int yCoord = tileEntity.yCoord; - int zCoord = tileEntity.zCoord; + BlockPos tilePos = tileEntity.getPos(); ((TESocket) tileEntity).setInventorySlotContents(0, null); - world.setBlockToAir(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); + world.setBlockToAir(tilePos); for (int i = 0; i < 8; i++) { - SpellHelper.sendIndexedParticleToAllAround(world, xCoord, yCoord, zCoord, 20, world.provider.getDimensionId(), 1, xCoord, yCoord, zCoord); + SpellHelper.sendIndexedParticleToAllAround(world, tilePos, 20, world.provider.getDimensionId(), 1, tilePos); } if (itemStack != null) @@ -168,19 +167,19 @@ public class BlockArmourForge extends Block { int xOff = (world.rand.nextInt(11) - 5); int zOff = (int) (Math.sqrt(25 - xOff * xOff) * (world.rand.nextInt(2) - 0.5) * 2); - world.addWeatherEffect(new EntityLightningBolt(world, x + xOff, y + 5, z + zOff)); - world.spawnEntityInWorld(new EntityItem(world, x, y + 1, z, armourPiece)); + world.addWeatherEffect(new EntityLightningBolt(world, blockPos.getX() + xOff, blockPos.getY() + 5, blockPos.getZ() + zOff)); + world.spawnEntityInWorld(new EntityItem(world, blockPos.getX(), blockPos.getY() + 1, blockPos.getZ(), armourPiece)); } return true; } //0 for plate, 1 for leggings, 2 for helmet, 3 for boots - public int getArmourType(World world, int x, int y, int z) + public int getArmourType(World world, BlockPos blockPos) { for (int i = 0; i <= 3; i++) { - if (getDirectionForArmourType(world, x, y, z, i) != -1) + if (getDirectionForArmourType(world, blockPos, i) != -1) { return i; } @@ -189,11 +188,11 @@ public class BlockArmourForge extends Block return -1; } - public int getDirectionForArmourType(World world, int x, int y, int z, int armourType) + public int getDirectionForArmourType(World world, BlockPos blockPos, int armourType) { for (int i = 1; i <= 6; i++) { - if (isParadigmValid(armourType, i, world, x, y, z)) + if (isParadigmValid(armourType, i, world, blockPos)) { return i; } @@ -202,7 +201,7 @@ public class BlockArmourForge extends Block return -1; } - public boolean isParadigmValid(int armourType, int direction, World world, int x, int y, int z) + public boolean isParadigmValid(int armourType, int direction, World world, BlockPos blockPos) { List<ArmourComponent> list = null; @@ -238,7 +237,7 @@ public class BlockArmourForge extends Block switch (direction) { case 1: - if (!(world.getTileEntity(x + xOff, y, z - zOff) instanceof TESocket)) + if (!(world.getTileEntity(blockPos.add(xOff, 0, -zOff)) instanceof TESocket)) { return false; } @@ -246,7 +245,7 @@ public class BlockArmourForge extends Block break; case 2: - if (!(world.getTileEntity(x + zOff, y, z + xOff) instanceof TESocket)) + if (!(world.getTileEntity(blockPos.add(zOff, 0, xOff)) instanceof TESocket)) { return false; } @@ -254,7 +253,7 @@ public class BlockArmourForge extends Block break; case 3: - if (!(world.getTileEntity(x - xOff, y, z + zOff) instanceof TESocket)) + if (!(world.getTileEntity(blockPos.add(-xOff, 0, zOff)) instanceof TESocket)) { return false; } @@ -262,7 +261,7 @@ public class BlockArmourForge extends Block break; case 4: - if (!(world.getTileEntity(x - zOff, y, z - xOff) instanceof TESocket)) + if (!(world.getTileEntity(blockPos.add(-zOff, 0, -xOff)) instanceof TESocket)) { return false; } @@ -270,7 +269,7 @@ public class BlockArmourForge extends Block break; case 5: - if (!(world.getTileEntity(x + xOff, y + zOff, z) instanceof TESocket)) + if (!(world.getTileEntity(blockPos.add(xOff, zOff, 0)) instanceof TESocket)) { return false; } @@ -278,7 +277,7 @@ public class BlockArmourForge extends Block break; case 6: - if (!(world.getTileEntity(x, y + zOff, z + xOff) instanceof TESocket)) + if (!(world.getTileEntity(blockPos.add(0, zOff, xOff)) instanceof TESocket)) { return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java index e04354f3..fa724cc9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java @@ -3,8 +3,10 @@ package WayofTime.alchemicalWizardry.common.block; import java.util.ArrayList; import java.util.List; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -13,15 +15,15 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class BlockBelljar extends BlockContainer { @@ -30,8 +32,6 @@ public class BlockBelljar extends BlockContainer super(Material.glass); setHardness(2.0F); setResistance(5.0F); - this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setBlockName("crystalBelljar"); } @@ -73,9 +73,9 @@ public class BlockBelljar extends BlockContainer } @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLiving, ItemStack stack) + public void onBlockPlacedBy(World world, BlockPos blockPos, IBlockState blockState, EntityLivingBase entityLiving, ItemStack stack) { - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(blockPos); if (tile instanceof TEBellJar) { @@ -93,12 +93,6 @@ public class BlockBelljar extends BlockContainer return new TEBellJar(); } - @Override - public boolean renderAsNormalBlock() - { - return false; - } - @Override public int getRenderType() { @@ -112,7 +106,7 @@ public class BlockBelljar extends BlockContainer } @Override - public boolean hasTileEntity() + public boolean hasTileEntity(IBlockState blockState) { return true; } @@ -124,9 +118,9 @@ public class BlockBelljar extends BlockContainer } @Override - public int getComparatorInputOverride(World world, int x, int y, int z, int meta) + public int getComparatorInputOverride(World world, BlockPos blockPos) { - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(blockPos); if (tile instanceof TEBellJar) { return ((TEBellJar) tile).getRSPowerOutput(); @@ -135,18 +129,18 @@ public class BlockBelljar extends BlockContainer } @Override - public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player) + public void onBlockHarvested(World world, BlockPos blockPos, IBlockState blockState, EntityPlayer player) { - this.dropBlockAsItem(world, x, y, z, meta, 0); - super.onBlockHarvested(world, x, y, z, meta, player); + this.dropBlockAsItem(world, blockPos, blockState, 0); + super.onBlockHarvested(world, blockPos, blockState, player); } @Override - public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) + public ArrayList<ItemStack> getDrops(IBlockAccess world, BlockPos blockPos, IBlockState blockState, int fortune) { - ArrayList<ItemStack> list = new ArrayList(); + ArrayList<ItemStack> list = new ArrayList<ItemStack>(); - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(blockPos); if (tile instanceof TEBellJar) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodLightSource.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodLightSource.java index 4b0dfb9a..827fd08e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodLightSource.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodLightSource.java @@ -1,12 +1,12 @@ package WayofTime.alchemicalWizardry.common.block; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -18,18 +18,10 @@ public class BlockBloodLightSource extends Block public BlockBloodLightSource() { super(Material.cloth); - this.setBlockName("blockBloodLightSource"); } @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:BlockBloodLight"); - } - - @Override - public int getLightValue(IBlockAccess world, int x, int y, int z) + public int getLightValue(IBlockAccess world, BlockPos blockPos) { return 15; } @@ -41,13 +33,7 @@ public class BlockBloodLightSource extends Block } @Override - public boolean renderAsNormalBlock() - { - return false; - } - - @Override - public void randomDisplayTick(World world, int x, int y, int z, Random rand) + public void randomDisplayTick(World world, BlockPos blockPos, IBlockState blockState, Random rand) { if (rand.nextInt(3) != 0) { @@ -55,13 +41,12 @@ public class BlockBloodLightSource extends Block float f1 = f * 0.6F + 0.4F; float f2 = f * f * 0.7F - 0.5F; float f3 = f * f * 0.6F - 0.7F; - world.spawnParticle("reddust", x + 0.5D + rand.nextGaussian() / 8, y + 0.5D, z + 0.5D + rand.nextGaussian() / 8, f1, f2, f3); + world.spawnParticle(EnumParticleTypes.REDSTONE, blockPos.getX() + 0.5D + rand.nextGaussian() / 8, blockPos.getY() + 0.5D, blockPos.getZ() + 0.5D + rand.nextGaussian() / 8, f1, f2, f3); } } @Override - - public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity) + public void addCollisionBoxesToList(World par1World, BlockPos blockPos, IBlockState blockState, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity) { this.setBlockBounds(0.40F, 0.40F, 0.40F, 0.60F, 0.60F, 0.60F); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodRune.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodRune.java index f5357004..78edb95f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodRune.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodRune.java @@ -1,54 +1,26 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; public class BlockBloodRune extends Block { - //private Icon bloodRuneIcon; - @SideOnly(Side.CLIENT) - private IIcon altarCapacityRuneIcon; - @SideOnly(Side.CLIENT) - private IIcon dislocationRuneIcon; - @SideOnly(Side.CLIENT) - private IIcon orbCapacityRuneIcon; - @SideOnly(Side.CLIENT) - private IIcon betterCapacityRuneIcon; - @SideOnly(Side.CLIENT) - private IIcon accelerationRuneIcon; - public BlockBloodRune() { super(Material.iron); - this.setBlockName("bloodRune"); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); setHardness(2.0F); setResistance(5.0F); } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:BlankRune"); - this.altarCapacityRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:AltarCapacityRune"); - this.dislocationRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:DislocationRune"); - this.orbCapacityRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:OrbCapacityRune"); - this.betterCapacityRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:BetterCapacityRune"); - this.accelerationRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:AccelerationRune"); - } - public int getRuneEffect(int metaData) { switch (metaData) @@ -75,6 +47,7 @@ public class BlockBloodRune extends Block return 0; } + @Override @SideOnly(Side.CLIENT) /** @@ -97,36 +70,8 @@ public class BlockBloodRune extends Block } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta) + public int damageDropped(IBlockState blockState) { - switch (meta) - { - case 0: - return blockIcon; - - case 1: - return altarCapacityRuneIcon; - - case 2: - return dislocationRuneIcon; - - case 3: - return this.orbCapacityRuneIcon; - - case 4: - return this.betterCapacityRuneIcon; - - case 5: - return this.accelerationRuneIcon; - default: - return blockIcon; - } - } - - @Override - public int damageDropped(int metadata) - { - return metadata; + return blockState.getBlock().damageDropped(blockState); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodStoneBrick.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodStoneBrick.java index ba3ec9ac..dea4dc65 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodStoneBrick.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodStoneBrick.java @@ -1,11 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; public class BlockBloodStoneBrick extends Block { @@ -14,14 +10,5 @@ public class BlockBloodStoneBrick extends Block super(Material.iron); setHardness(2.0F); setResistance(5.0F); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setBlockName("bloodStoneBrick"); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodStoneBrick"); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java index bcdf4dce..fabb3416 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java @@ -2,12 +2,9 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -16,7 +13,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import java.util.List; @@ -24,13 +22,6 @@ import java.util.Random; public class BlockChemistrySet extends BlockContainer { - @SideOnly(Side.CLIENT) - private IIcon topIcon; - @SideOnly(Side.CLIENT) - private IIcon sideIcon2; - @SideOnly(Side.CLIENT) - private IIcon bottomIcon; - public BlockChemistrySet() { super(Material.wood); @@ -39,33 +30,9 @@ public class BlockChemistrySet extends BlockContainer } @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) + public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { - this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:AlchemicChemistrySet"); - this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_SideType2"); - this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_Bottom"); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta) - { - switch (side) - { - case 0: - return bottomIcon; - case 1: - return topIcon; - default: - return sideIcon2; - } - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int metadata, float what, float these, float are) - { - TileEntity tileEntity = world.getTileEntity(x, y, z); + TileEntity tileEntity = world.getTileEntity(blockPos); if (tileEntity == null || player.isSneaking()) { @@ -73,21 +40,21 @@ public class BlockChemistrySet extends BlockContainer } //code to open gui explained later - player.openGui(AlchemicalWizardry.instance, 0, world, x, y, z); + player.openGui(AlchemicalWizardry.instance, 0, world, blockPos.getX(), blockPos.getY(), blockPos.getZ()); return true; } @Override - public void breakBlock(World world, int x, int y, int z, Block par5, int par6) + public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) { - dropItems(world, x, y, z); - super.breakBlock(world, x, y, z, par5, par6); + dropItems(world, blockPos); + super.breakBlock(world, blockPos, blockState); } - private void dropItems(World world, int x, int y, int z) + private void dropItems(World world, BlockPos blockPos) { Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(x, y, z); + TileEntity tileEntity = world.getTileEntity(blockPos); if (!(tileEntity instanceof IInventory)) { @@ -105,9 +72,7 @@ public class BlockChemistrySet extends BlockContainer float rx = rand.nextFloat() * 0.8F + 0.1F; float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, - x + rx, y + ry, z + rz, - new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); + EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { @@ -130,12 +95,6 @@ public class BlockChemistrySet extends BlockContainer return new TEWritingTable(); } - @Override - public boolean renderAsNormalBlock() - { - return false; - } - @Override public int getRenderType() { @@ -149,20 +108,21 @@ public class BlockChemistrySet extends BlockContainer } @Override - public boolean hasTileEntity() + public boolean hasTileEntity(IBlockState blockState) { return true; } @Override - public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity) + public void addCollisionBoxesToList(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, List list, Entity collidingEntity) { this.setBlockBounds(0.4375F, 0.0F, 0.4375F, 0.5625F, 0.9375F, 0.5625F); - super.addCollisionBoxesToList(par1World, par2, par3, par4, par5AxisAlignedBB, par6List, par7Entity); + super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity); this.setBlockBoundsForItemRender(); - super.addCollisionBoxesToList(par1World, par2, par3, par4, par5AxisAlignedBB, par6List, par7Entity); + super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity); } + @Override public void setBlockBoundsForItemRender() { this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockConduit.java index 8be5b305..0974291e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockConduit.java @@ -1,61 +1,24 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; public class BlockConduit extends BlockOrientable { - @SideOnly(Side.CLIENT) - private IIcon topIcon; - @SideOnly(Side.CLIENT) - private IIcon sideIcon2; - @SideOnly(Side.CLIENT) - private IIcon bottomIcon; - public BlockConduit() { super(); setHardness(2.0F); setResistance(5.0F); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setBlockName("blockConduit"); } @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) + public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) { - this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_Top"); - this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_SideType2"); - this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_Bottom"); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta) - { - switch (side) - { - case 0: - return bottomIcon; - case 1: - return topIcon; - default: - return sideIcon2; - } - } - - @Override - public void breakBlock(World world, int x, int y, int z, Block par5, int par6) - { - super.breakBlock(world, x, y, z, par5, par6); + super.breakBlock(world, blockPos, blockState); } @Override @@ -64,12 +27,6 @@ public class BlockConduit extends BlockOrientable return new TEConduit(); } - @Override - public boolean renderAsNormalBlock() - { - return false; - } - @Override public int getRenderType() { @@ -83,7 +40,7 @@ public class BlockConduit extends BlockOrientable } @Override - public boolean hasTileEntity() + public boolean hasTileEntity(IBlockState blockState) { return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrystal.java index 57184a4f..1c917c3c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrystal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrystal.java @@ -1,48 +1,28 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; public class BlockCrystal extends Block { - //private Icon bloodRuneIcon; - @SideOnly(Side.CLIENT) - private IIcon fullIcon; - @SideOnly(Side.CLIENT) - private IIcon brickIcon; - - public BlockCrystal() { super(Material.iron); - this.setBlockName("crystalBlock"); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); setHardness(2.0F); setResistance(5.0F); } @Override @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:BlankRune"); - this.fullIcon = iconRegister.registerIcon("AlchemicalWizardry:ShardCluster"); - this.brickIcon = iconRegister.registerIcon("AlchemicalWizardry:ShardClusterBrick"); - } - - @SideOnly(Side.CLIENT) - /** * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) */ @@ -59,25 +39,8 @@ public class BlockCrystal extends Block } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta) + public int damageDropped(IBlockState blockState) { - switch (meta) - { - case 0: - return fullIcon; - - case 1: - return brickIcon; - - default: - return blockIcon; - } - } - - @Override - public int damageDropped(int metadata) - { - return metadata; + return blockState.getBlock().damageDropped(blockState); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockDemonPortal.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockDemonPortal.java index eb3ab934..9dee123f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockDemonPortal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockDemonPortal.java @@ -1,14 +1,13 @@ package WayofTime.alchemicalWizardry.common.block; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; public class BlockDemonPortal extends BlockContainer @@ -18,27 +17,18 @@ public class BlockDemonPortal extends BlockContainer super(Material.rock); setHardness(1000); setResistance(10000); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setBlockName("demonPortal"); } @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) + public void onBlockHarvested(World world, BlockPos blockPos, IBlockState blockState, EntityPlayer player) { - this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:DemonPortal"); - } - - @Override - public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player) - { - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(blockPos); if(tile instanceof TEDemonPortal) { ((TEDemonPortal) tile).notifyPortalOfBreak(); } - super.onBlockHarvested(world, x, y, z, meta, player); + super.onBlockHarvested(world, blockPos, blockState, player); } @Override @@ -48,16 +38,16 @@ public class BlockDemonPortal extends BlockContainer } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are) + public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { if (world.isRemote) { return false; } - TEDemonPortal tileEntity = (TEDemonPortal) world.getTileEntity(x, y, z); + TEDemonPortal tileEntity = (TEDemonPortal) world.getTileEntity(blockPos); - tileEntity.rightClickBlock(player, side); + tileEntity.rightClickBlock(player, side.getIndex()); return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEfficiencyRune.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEfficiencyRune.java index 5660b090..2dbb1792 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEfficiencyRune.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEfficiencyRune.java @@ -1,28 +1,14 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; - public class BlockEfficiencyRune extends BlockBloodRune { public BlockEfficiencyRune() { super(); - this.setBlockName("efficiencyRune"); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); setHardness(2.0F); setResistance(5.0F); } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:EfficiencyRune"); - } - @Override public int getRuneEffect(int metaData) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEmptySocket.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEmptySocket.java index ab399564..8aa7e951 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEmptySocket.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEmptySocket.java @@ -1,11 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; public class BlockEmptySocket extends Block { @@ -14,8 +10,6 @@ public class BlockEmptySocket extends Block super(Material.iron); setHardness(2.0F); setResistance(5.0F); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setBlockName("emptySocket"); } @Override @@ -23,11 +17,4 @@ public class BlockEmptySocket extends Block { return false; } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:EmptySocket"); - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEnchantmentGlyph.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEnchantmentGlyph.java index 9cd21a37..bc61a6a8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEnchantmentGlyph.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEnchantmentGlyph.java @@ -4,55 +4,22 @@ import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.omega.IEnchantmentGlyph; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph { - @SideOnly(Side.CLIENT) - private IIcon enchantability; - @SideOnly(Side.CLIENT) - private IIcon enchantmentLevel; - public BlockEnchantmentGlyph() { super(Material.iron); setHardness(2.0F); setResistance(5.0F); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setBlockName("enchantmentGlyph"); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:LargeBloodStoneBrick"); - this.enchantability = iconRegister.registerIcon("AlchemicalWizardry:GlyphEnchantability"); - this.enchantmentLevel = iconRegister.registerIcon("AlchemicalWizardry:GlyphEnchantmentLevel"); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta) - { - switch (meta) - { - case 0: - return enchantability; - case 1: - return enchantmentLevel; - default: - return this.blockIcon; - } } @Override @@ -92,7 +59,8 @@ public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph return 0; } } - + + @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { @@ -101,10 +69,10 @@ public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph par3List.add(new ItemStack(par1, 1, i)); } } - - @Override - public int damageDropped(int metadata) + + @Override + public int damageDropped(IBlockState blockState) { - return metadata; + return blockState.getBlock().damageDropped(blockState); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockFilledSocket.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockFilledSocket.java index ec53d53d..d59b4cb9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockFilledSocket.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockFilledSocket.java @@ -1,15 +1,10 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -18,7 +13,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; -import net.minecraft.util.IIcon; import net.minecraft.world.World; import java.util.Random; @@ -71,16 +65,16 @@ public class BlockFilledSocket extends BlockContainer } @Override - public void breakBlock(World world, BlockPos blockPos, Block par5, int par6) + public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) { - dropItems(world, x, y, z); - super.breakBlock(world, x, y, z, par5, par6); + dropItems(world, blockPos); + super.breakBlock(world, blockPos, blockState); } - private void dropItems(World world, int x, int y, int z) + private void dropItems(World world, BlockPos blockPos) { Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(x, y, z); + TileEntity tileEntity = world.getTileEntity(blockPos); if (!(tileEntity instanceof IInventory)) { @@ -98,7 +92,7 @@ public class BlockFilledSocket extends BlockContainer float rx = rand.nextFloat() * 0.8F + 0.1F; float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, x + rx, y + ry, z + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); + EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockImperfectRitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockImperfectRitualStone.java index c86ebfc9..6e409014 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockImperfectRitualStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockImperfectRitualStone.java @@ -1,19 +1,18 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.monster.EntityZombie; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; public class BlockImperfectRitualStone extends Block @@ -23,37 +22,28 @@ public class BlockImperfectRitualStone extends Block super(Material.iron); setHardness(2.0F); setResistance(5.0F); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setBlockName("imperfectRitualStone"); } @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:ImperfectRitualStone"); - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float xOff, float yOff, float zOff) + public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { if(SpellHelper.isFakePlayer(player)) { return false; } { - Block block = world.getBlock(x, y + 1, z); + Block block = world.getBlockState(blockPos.add(0, 1, 0)).getBlock(); if (block == Blocks.water) { if (!player.capabilities.isCreativeMode && !world.isRemote) { - EnergyItems.drainPlayerNetwork(player, 5000); + SoulNetworkHandler.hurtPlayer(player, 5000); } if (!world.isRemote) { - world.addWeatherEffect(new EntityLightningBolt(world, x, y + 2, z)); + world.addWeatherEffect(new EntityLightningBolt(world, blockPos.getX(), blockPos.getY() + 2, blockPos.getZ())); } world.getWorldInfo().setRaining(true); @@ -71,11 +61,11 @@ public class BlockImperfectRitualStone extends Block { if (!player.capabilities.isCreativeMode && !world.isRemote) { - EnergyItems.drainPlayerNetwork(player, 5000); + SoulNetworkHandler.hurtPlayer(player, 5000); } EntityZombie zomb = new EntityZombie(world); - zomb.setPosition(x + 0.5, y + 2, z + 0.5); + zomb.setPosition(blockPos.getX() + 0.5, blockPos.getY() + 2, blockPos.getZ() + 0.5); zomb.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2000)); zomb.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 20000, 7)); zomb.addPotionEffect(new PotionEffect(Potion.resistance.id, 20000, 3)); @@ -83,7 +73,7 @@ public class BlockImperfectRitualStone extends Block if (!world.isRemote) { world.spawnEntityInWorld(zomb); - world.addWeatherEffect(new EntityLightningBolt(world, x, y + 2, z)); + world.addWeatherEffect(new EntityLightningBolt(world, blockPos.getX(), blockPos.getY() + 2, blockPos.getZ())); } return true; @@ -91,24 +81,24 @@ public class BlockImperfectRitualStone extends Block { if (!player.capabilities.isCreativeMode && !world.isRemote) { - EnergyItems.drainPlayerNetwork(player, 5000); + SoulNetworkHandler.hurtPlayer(player, 5000); } if (!world.isRemote) { - world.addWeatherEffect(new EntityLightningBolt(world, x, y + 2, z)); + world.addWeatherEffect(new EntityLightningBolt(world, blockPos.getX(), blockPos.getY() + 2, blockPos.getZ())); world.setWorldTime((world.getWorldTime() / 24000) * 24000 + 13800); } } else if (block == Blocks.bedrock) { if (!player.capabilities.isCreativeMode && !world.isRemote) { - EnergyItems.drainPlayerNetwork(player, 5000); + SoulNetworkHandler.hurtPlayer(player, 5000); } if (!world.isRemote) { - world.addWeatherEffect(new EntityLightningBolt(world, x, y + 2, z)); + world.addWeatherEffect(new EntityLightningBolt(world, blockPos.getX(), blockPos.getY() + 2, blockPos.getZ())); } player.addPotionEffect(new PotionEffect(Potion.resistance.id, 60 * 20, 1)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockIncenseCrucible.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockIncenseCrucible.java index 100ce1c9..d12a848c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockIncenseCrucible.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockIncenseCrucible.java @@ -2,48 +2,36 @@ package WayofTime.alchemicalWizardry.common.block; import java.util.Random; -import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.sacrifice.IIncense; import WayofTime.alchemicalWizardry.common.tileEntity.TECrucible; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class BlockIncenseCrucible extends BlockContainer { - @SideOnly(Side.CLIENT) - private IIcon topIcon; - @SideOnly(Side.CLIENT) - private IIcon sideIcon; - @SideOnly(Side.CLIENT) - private IIcon bottomIcon; - public BlockIncenseCrucible() { super(Material.anvil); this.setHardness(2.0f); this.setResistance(1.5f); - this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setBlockName("blockCrucible"); this.setBlockBounds(0.3125F, 0.0F, 0.3125F, 0.6875F, 0.625F, 0.6875F); } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) + public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { - TECrucible tileEntity = (TECrucible) world.getTileEntity(x, y, z); + TECrucible tileEntity = (TECrucible) world.getTileEntity(blockPos); if (tileEntity == null || player.isSneaking()) { @@ -63,34 +51,10 @@ public class BlockIncenseCrucible extends BlockContainer // player.inventory.addItemStackToInventory(tileEntity.getStackInSlot(0)); // tileEntity.setInventorySlotContents(0, null); } - world.markBlockForUpdate(x, y, z); + world.markBlockForUpdate(blockPos); return true; } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:Crucible_Top"); - this.sideIcon = iconRegister.registerIcon("AlchemicalWizardry:Crucible_Side"); - this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:Crucible_Bottom"); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta) - { - switch (side) - { - case 0: - return bottomIcon; - case 1: - return topIcon; - default: - return sideIcon; - } - } - // @Override // public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) // { @@ -98,7 +62,7 @@ public class BlockIncenseCrucible extends BlockContainer // } @Override - public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) + public void setBlockBoundsBasedOnState(IBlockAccess world, BlockPos blockPos) { this.setBlockBounds(0.3125F, 0.0F, 0.3125F, 0.6875F, 0.625F, 0.6875F); } @@ -108,12 +72,6 @@ public class BlockIncenseCrucible extends BlockContainer { return false; } - - @Override - public boolean renderAsNormalBlock() - { - return false; - } @Override public TileEntity createNewTileEntity(World world, int meta) @@ -122,20 +80,20 @@ public class BlockIncenseCrucible extends BlockContainer } @Override - public void randomDisplayTick(World world, int x, int y, int z, Random rand) + public void randomDisplayTick(World world, BlockPos blockPos, IBlockState blockState, Random rand) { if (rand.nextInt(3) != 0) { - TECrucible tile = (TECrucible)world.getTileEntity(x, y, z); - tile.spawnClientParticle(world, x, y, z, rand); + TECrucible tile = (TECrucible)world.getTileEntity(blockPos); + tile.spawnClientParticle(world, blockPos, rand); } } @Override - public void breakBlock(World world, int x, int y, int z, Block par5, int par6) + public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) { - dropItems(world, x, y, z); - super.breakBlock(world, x, y, z, par5, par6); + dropItems(world, blockPos); + super.breakBlock(world, blockPos, blockState); } @Override @@ -145,9 +103,9 @@ public class BlockIncenseCrucible extends BlockContainer } @Override - public int getComparatorInputOverride(World world, int x, int y, int z, int meta) + public int getComparatorInputOverride(World world, BlockPos blockPos) { - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(blockPos); if (tile instanceof TECrucible) { return ((TECrucible) tile).getRSPowerOutput(); @@ -155,10 +113,10 @@ public class BlockIncenseCrucible extends BlockContainer return 15; } - private void dropItems(World world, int x, int y, int z) + private void dropItems(World world, BlockPos blockPos) { Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(x, y, z); + TileEntity tileEntity = world.getTileEntity(blockPos); if (!(tileEntity instanceof IInventory)) { @@ -176,9 +134,7 @@ public class BlockIncenseCrucible extends BlockContainer float rx = rand.nextFloat() * 0.8F + 0.1F; float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, - x + rx, y + ry, z + rz, - new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); + EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLargeBloodStoneBrick.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLargeBloodStoneBrick.java index b560badd..1f12e28d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLargeBloodStoneBrick.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLargeBloodStoneBrick.java @@ -1,11 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; public class BlockLargeBloodStoneBrick extends Block { @@ -14,14 +10,5 @@ public class BlockLargeBloodStoneBrick extends Block super(Material.iron); setHardness(2.0F); setResistance(5.0F); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setBlockName("largeBloodStoneBrick"); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:LargeBloodStoneBrick"); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLifeEssence.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLifeEssence.java index 67aa1730..37276de0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLifeEssence.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLifeEssence.java @@ -1,11 +1,8 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fluids.BlockFluidClassic; @@ -16,34 +13,17 @@ public class BlockLifeEssence extends BlockFluidClassic { super(AlchemicalWizardry.lifeEssenceFluid, Material.water); AlchemicalWizardry.lifeEssenceFluid.setBlock(this); - this.setBlockName("lifeEssenceFluidBlock"); } @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta) + public boolean canDisplace(IBlockAccess world, BlockPos blockPos) { - return this.blockIcon; + return !world.getBlockState(blockPos).getBlock().getMaterial().isLiquid() && super.canDisplace(world, blockPos); } @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) + public boolean displaceIfPossible(World world, BlockPos blockPos) { - this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:lifeEssenceStill"); - AlchemicalWizardry.lifeEssenceFluid.setFlowingIcon(blockIcon); - AlchemicalWizardry.lifeEssenceFluid.setStillIcon(blockIcon); - } - - @Override - public boolean canDisplace(IBlockAccess world, int x, int y, int z) - { - return !world.getBlock(x, y, z).getMaterial().isLiquid() && super.canDisplace(world, x, y, z); - } - - @Override - public boolean displaceIfPossible(World world, int x, int y, int z) - { - return !world.getBlock(x, y, z).getMaterial().isLiquid() && super.displaceIfPossible(world, x, y, z); + return !world.getBlockState(blockPos).getBlock().getMaterial().isLiquid() && super.displaceIfPossible(world, blockPos); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java index 096dc60e..d30f3e5e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java @@ -1,17 +1,16 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.items.ActivationCrystal; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.Explosion; import net.minecraft.world.World; @@ -22,34 +21,25 @@ public class BlockMasterStone extends BlockContainer super(Material.iron); setHardness(2.0F); setResistance(5.0F); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setBlockName("blockMasterStone"); } @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) + public void onBlockHarvested(World world, BlockPos blockPos, IBlockState blockState, EntityPlayer player) { - this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:MasterStone"); - } - - @Override - public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player) - { - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(blockPos); if (tile instanceof TEMasterStone) { ((TEMasterStone) tile).useOnRitualBroken(); } - super.onBlockHarvested(world, x, y, z, meta, player); + super.onBlockHarvested(world, blockPos, blockState, player); } @Override - public void onBlockDestroyedByExplosion(World world, int x, int y, int z, Explosion explosion) + public void onBlockDestroyedByExplosion(World world, BlockPos blockPos, Explosion explosion) { - super.onBlockDestroyedByExplosion(world, x, y, z, explosion); - TileEntity tile = world.getTileEntity(x, y, z); + super.onBlockDestroyedByExplosion(world, blockPos, explosion); + TileEntity tile = world.getTileEntity(blockPos); if (tile instanceof TEMasterStone) { ((TEMasterStone) tile).useOnRitualBrokenExplosion(); @@ -57,9 +47,9 @@ public class BlockMasterStone extends BlockContainer } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) + public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { - TEMasterStone tileEntity = (TEMasterStone) world.getTileEntity(x, y, z); + TEMasterStone tileEntity = (TEMasterStone) world.getTileEntity(blockPos); if (tileEntity == null || player.isSneaking()) { @@ -82,8 +72,8 @@ public class BlockMasterStone extends BlockContainer ActivationCrystal acItem = (ActivationCrystal) item; // tileEntity.setOwner(acItem.getOwnerName(playerItem)); - tileEntity.activateRitual(world, acItem.getCrystalLevel(playerItem), playerItem, player, acItem.getOwnerName(playerItem)); - world.markBlockForUpdate(x, y, z); + tileEntity.activateRitual(world, acItem.getCrystalLevel(playerItem), playerItem, player, ActivationCrystal.getOwnerName(playerItem)); + world.markBlockForUpdate(blockPos); return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMimic.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMimic.java index b8e7cdc9..7737d3ac 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMimic.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMimic.java @@ -5,21 +5,19 @@ import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; import net.minecraft.client.particle.EffectRenderer; import net.minecraft.client.particle.EntityDiggingFX; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.IIcon; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; +import net.minecraft.util.*; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.common.tileEntity.TEMimicBlock; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class BlockMimic extends BlockContainer { @@ -28,15 +26,14 @@ public class BlockMimic extends BlockContainer super(Material.water); setHardness(2.0F); setResistance(5.0F); - this.setBlockName("blockMimic"); // this.setBlockBounds(0, 0, 0, 0, 0, 0); } @Override @SideOnly(Side.CLIENT) - public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) + public boolean shouldSideBeRendered(IBlockAccess world, BlockPos blockPos, EnumFacing side) { - TileEntity TE = world.getTileEntity(x, y, z); + TileEntity TE = world.getTileEntity(blockPos); if(!(TE instanceof TEMimicBlock)) { return true; @@ -45,36 +42,16 @@ public class BlockMimic extends BlockContainer Block block = mimic.getBlock(); - return block == null || block.shouldSideBeRendered(world, x, y, z, side); + return block == null || block.shouldSideBeRendered(world, blockPos, side); } - @SideOnly(Side.CLIENT) - public int getRenderBlockPass() - { - return 1; - } - @Override - public boolean canCollideCheck(int meta, boolean bool) + public boolean canCollideCheck(IBlockState blockState, boolean bool) { - return meta == 1; + return blockState.getBlock().getMetaFromState(blockState) == 1; } - - @SideOnly(Side.CLIENT) - @Override - /** - * Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side - */ - public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) - { - TileEntity TE = blockAccess.getTileEntity(x, y, z); - TEMimicBlock mimic = (TEMimicBlock)TE; - Block block = mimic.getBlock(); - int meta = mimic.getMetaOfMimic(); - return block != null ? block.getIcon(side, meta) : this.blockIcon; - } - + @Override public boolean isOpaqueCube() { return false; @@ -87,21 +64,21 @@ public class BlockMimic extends BlockContainer } @Override - public boolean canSilkHarvest(World world, EntityPlayer player, int x, int y, int z, int metadata) + public boolean canSilkHarvest(World world, BlockPos pos, IBlockState state, EntityPlayer player) { return false; } @Override - public int quantityDropped(int meta, int fortune, Random random) + public int quantityDropped(Random random) { return 0; } @Override - public boolean isBlockSolid(IBlockAccess world, int x, int y, int z, int meta) + public boolean isBlockSolid(IBlockAccess world, BlockPos blockPos, EnumFacing side) { - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(blockPos); if(tile instanceof TEMimicBlock) { Block block = ((TEMimicBlock) tile).getBlock(); @@ -109,16 +86,16 @@ public class BlockMimic extends BlockContainer if(block != null) { - return block.isBlockSolid(world, x, y, z, mimicMeta); + return block.isBlockSolid(world, blockPos, side); //side was mimicM } } - return super.isBlockSolid(world, x, y, z, meta); + return super.isBlockSolid(world, blockPos, side); } @Override public boolean addHitEffects(World world, MovingObjectPosition target, EffectRenderer effectRenderer) { - TileEntity tile = world.getTileEntity(target.blockX, target.blockY, target.blockZ); + TileEntity tile = world.getTileEntity(target.func_178782_a()); TEMimicBlock TE = (TEMimicBlock)tile; @@ -126,32 +103,33 @@ public class BlockMimic extends BlockContainer { Block block = TE.getBlock(); - double xOffset = target.blockX + world.rand.nextDouble() * (block.getBlockBoundsMaxX() - block.getBlockBoundsMinX() - 0.1F * 2.0F) + 0.1F + block.getBlockBoundsMinX(); - double yOffset = target.blockY + world.rand.nextDouble() * (block.getBlockBoundsMaxY() - block.getBlockBoundsMinY() - 0.1F * 2.0F) + 0.1F + block.getBlockBoundsMinY(); - double zOffset = target.blockZ + world.rand.nextDouble() * (block.getBlockBoundsMaxZ() - block.getBlockBoundsMinZ() - 0.1F * 2.0F) + 0.1F + block.getBlockBoundsMinZ(); + double xOffset = target.func_178782_a().getX() + world.rand.nextDouble() * (block.getBlockBoundsMaxX() - block.getBlockBoundsMinX() - 0.1F * 2.0F) + 0.1F + block.getBlockBoundsMinX(); + double yOffset = target.func_178782_a().getY() + world.rand.nextDouble() * (block.getBlockBoundsMaxY() - block.getBlockBoundsMinY() - 0.1F * 2.0F) + 0.1F + block.getBlockBoundsMinY(); + double zOffset = target.func_178782_a().getZ() + world.rand.nextDouble() * (block.getBlockBoundsMaxZ() - block.getBlockBoundsMinZ() - 0.1F * 2.0F) + 0.1F + block.getBlockBoundsMinZ(); - switch (target.sideHit) { + switch (target.subHit) + { case 0: - yOffset = target.blockY + block.getBlockBoundsMinY() - 0.1D; + yOffset = target.func_178782_a().getY() + block.getBlockBoundsMinY() - 0.1D; break; case 1: - yOffset = target.blockY + block.getBlockBoundsMaxY() + 0.1D; + yOffset = target.func_178782_a().getY() + block.getBlockBoundsMaxY() + 0.1D; break; case 2: - zOffset = target.blockZ + block.getBlockBoundsMinZ() - 0.1D; + zOffset = target.func_178782_a().getZ() + block.getBlockBoundsMinZ() - 0.1D; break; case 3: - zOffset = target.blockZ + block.getBlockBoundsMaxZ() + 0.1D; + zOffset = target.func_178782_a().getZ() + block.getBlockBoundsMaxZ() + 0.1D; break; case 4: - xOffset = target.blockX + block.getBlockBoundsMinX() - 0.1D; + xOffset = target.func_178782_a().getX() + block.getBlockBoundsMinX() - 0.1D; break; case 5: - xOffset = target.blockX + block.getBlockBoundsMaxX() + 0.1D; + xOffset = target.func_178782_a().getX() + block.getBlockBoundsMaxX() + 0.1D; break; } - BlockMimic.addHitEffect(TE, target, xOffset, yOffset, zOffset, null, effectRenderer); +// BlockMimic.addHitEffect(TE, target, xOffset, yOffset, zOffset, null, effectRenderer); return true; @@ -161,33 +139,33 @@ public class BlockMimic extends BlockContainer } @Override - public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) + public AxisAlignedBB getCollisionBoundingBox(World world, BlockPos blockPos, IBlockState blockState) { - TEMimicBlock tile = (TEMimicBlock)world.getTileEntity(x, y, z); + TEMimicBlock tile = (TEMimicBlock)world.getTileEntity(blockPos); Block block = tile.getBlock(); - return block != null ? block.getCollisionBoundingBoxFromPool(world, x, y, z) : super.getCollisionBoundingBoxFromPool(world, x, y, z); + return block != null ? block.getCollisionBoundingBox(world, blockPos, blockState) : super.getCollisionBoundingBox(world, blockPos, blockState); } @Override @SideOnly(Side.CLIENT) - public int colorMultiplier(IBlockAccess blockAccess, int x, int y, int z) + public int colorMultiplier(IBlockAccess blockAccess, BlockPos blockPos, int renderPass) { - TEMimicBlock TE = (TEMimicBlock)blockAccess.getTileEntity(x, y, z); + TEMimicBlock TE = (TEMimicBlock)blockAccess.getTileEntity(blockPos); if (TE != null) { Block block = TE.getBlock(); if(block != null) { - return block.colorMultiplier(blockAccess, x, y, z); + return block.colorMultiplier(blockAccess, blockPos); } } - return super.colorMultiplier(blockAccess, x, y, z); + return super.colorMultiplier(blockAccess, blockPos); } - @Override - public void velocityToAddToEntity(World world, int x, int y, int z, Entity entity, Vec3 vec) +/* @Override + public void velocityToAddToEntity(World world, BlockPos, Entity entity, Vec3 vec) { TEMimicBlock TE = (TEMimicBlock)world.getTileEntity(x, y, z); if (TE != null) @@ -199,20 +177,21 @@ public class BlockMimic extends BlockContainer } } } - - public static void addHitEffect(TEMimicBlock TE, MovingObjectPosition target, double x, double y, double z, ItemStack itemStack, EffectRenderer effectRenderer) + No longer in 1.8 apparently + + public static void addHitEffect(TEMimicBlock TE, MovingObjectPosition target, double x, double y, double z, ItemStack itemStack, EffectRenderer effectRenderer) { - EntityDiggingFX particle = new EntityDiggingFX(TE.getWorldObj(), x, y, z, 0.0D, 0.0D, 0.0D, TE.getBlock(), TE.getMetaOfMimic()); - effectRenderer.addEffect(particle.applyColourMultiplier(target.blockX, target.blockY, target.blockZ).multiplyVelocity(0.2F).multipleParticleScaleBy(0.6F)); + EntityDiggingFX particle = new EntityDiggingFX(TE.getWorld(), x, y, z, 0.0D, 0.0D, 0.0D, TE.getBlock(), TE.getMetaOfMimic()); + effectRenderer.addEffect(particle.func_174846_a(target.func_178782_a()).multiplyVelocity(0.2F).multipleParticleScaleBy(0.6F)); } - +*/ @Override - public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) + public void onEntityCollidedWithBlock(World world, BlockPos blockPos, Entity entity) { - TEMimicBlock TE = (TEMimicBlock)world.getTileEntity(x, y, z); + TEMimicBlock TE = (TEMimicBlock)world.getTileEntity(blockPos); if (TE != null) { - if(TE.getBlockEffectWhileInside(entity, x, y, z)) + if(TE.getBlockEffectWhileInside(entity, blockPos)) { return; }else @@ -220,12 +199,12 @@ public class BlockMimic extends BlockContainer Block block = TE.getBlock(); if(block != null) { - block.onEntityCollidedWithBlock(world, x, y, z, entity); + block.onEntityCollidedWithBlock(world, blockPos, entity); return; } } } - super.onEntityCollidedWithBlock(world, x, y, z, entity); + super.onEntityCollidedWithBlock(world, blockPos, entity); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockOrientable.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockOrientable.java index 6836b7ff..0e919d8e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockOrientable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockOrientable.java @@ -1,13 +1,14 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.tileEntity.TEOrientable; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; public class BlockOrientable extends BlockContainer { @@ -16,7 +17,6 @@ public class BlockOrientable extends BlockContainer super(Material.rock); setHardness(2.0F); setResistance(5.0F); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -26,7 +26,7 @@ public class BlockOrientable extends BlockContainer } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are) + public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { //Right-click orients the output face. Shift-right-click orients the input face. if (world.isRemote) @@ -34,20 +34,20 @@ public class BlockOrientable extends BlockContainer return false; } - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(blockPos); if (tile instanceof TEOrientable) { TEOrientable newTile = (TEOrientable) tile; if (player.isSneaking()) { - int nextSide = TEOrientable.getIntForForgeDirection(newTile.getInputDirection()) + 1; + int nextSide = TEOrientable.getIntForEnumFacing(newTile.getInputDirection()) + 1; if (nextSide > 5) { nextSide = 0; } - if (ForgeDirection.getOrientation(nextSide) == newTile.getOutputDirection()) + if (EnumFacing.getFront(nextSide) == newTile.getOutputDirection()) { nextSide++; if (nextSide > 5) @@ -56,16 +56,16 @@ public class BlockOrientable extends BlockContainer } } - newTile.setInputDirection(ForgeDirection.getOrientation(nextSide)); + newTile.setInputDirection(EnumFacing.getFront(nextSide)); } else { - int nextSide = TEOrientable.getIntForForgeDirection(newTile.getOutputDirection()) + 1; + int nextSide = TEOrientable.getIntForEnumFacing(newTile.getOutputDirection()) + 1; if (nextSide > 5) { nextSide = 0; } - if (ForgeDirection.getOrientation(nextSide) == newTile.getInputDirection()) + if (EnumFacing.getFront(nextSide) == newTile.getInputDirection()) { nextSide++; if (nextSide > 5) @@ -74,17 +74,17 @@ public class BlockOrientable extends BlockContainer } } - newTile.setOutputDirection(ForgeDirection.getOrientation(nextSide)); + newTile.setOutputDirection(EnumFacing.getFront(nextSide)); } } - world.markBlockForUpdate(x, y, z); + world.markBlockForUpdate(blockPos); return true; } @Override - public int damageDropped(int metadata) + public int damageDropped(IBlockState blockState) { - return metadata; + return blockState.getBlock().damageDropped(blockState); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPedestal.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPedestal.java index d057b4a3..0a7ce6f4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPedestal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPedestal.java @@ -2,71 +2,35 @@ package WayofTime.alchemicalWizardry.common.block; import java.util.Random; -import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class BlockPedestal extends BlockContainer { - @SideOnly(Side.CLIENT) - private IIcon topIcon; - @SideOnly(Side.CLIENT) - private IIcon sideIcon2; - @SideOnly(Side.CLIENT) - private IIcon bottomIcon; - public BlockPedestal() { super(Material.rock); setHardness(2.0F); setResistance(5.0F); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setBlockName("bloodPedestal"); float f = 0.3125F; this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.6F, 0.5F + f); } @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) + public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { - this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:ArcanePedestal"); - this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket"); - this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket"); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta) - { - switch (side) - { - case 0: - return bottomIcon; - case 1: - return topIcon; - default: - return sideIcon2; - } - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) - { - TEPedestal tileEntity = (TEPedestal) world.getTileEntity(x, y, z); + TEPedestal tileEntity = (TEPedestal) world.getTileEntity(blockPos); if (tileEntity == null || player.isSneaking()) { @@ -87,21 +51,21 @@ public class BlockPedestal extends BlockContainer tileEntity.setInventorySlotContents(0, null); tileEntity.setActive(); } - world.markBlockForUpdate(x, y, z); + world.markBlockForUpdate(blockPos); return true; } @Override - public void breakBlock(World world, int x, int y, int z, Block par5, int par6) + public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) { - dropItems(world, x, y, z); - super.breakBlock(world, x, y, z, par5, par6); + dropItems(world, blockPos); + super.breakBlock(world, blockPos, blockState); } - private void dropItems(World world, int x, int y, int z) + private void dropItems(World world, BlockPos blockPos) { Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(x, y, z); + TileEntity tileEntity = world.getTileEntity(blockPos); if (!(tileEntity instanceof IInventory)) { @@ -119,7 +83,7 @@ public class BlockPedestal extends BlockContainer float rx = rand.nextFloat() * 0.8F + 0.1F; float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, x + rx, y + ry, z + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); + EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { @@ -142,12 +106,6 @@ public class BlockPedestal extends BlockContainer return new TEPedestal(); } - @Override - public boolean renderAsNormalBlock() - { - return false; - } - @Override public int getRenderType() { @@ -161,7 +119,7 @@ public class BlockPedestal extends BlockContainer } @Override - public boolean hasTileEntity() + public boolean hasTileEntity(IBlockState blockState) { return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPlinth.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPlinth.java index 56d47c64..6d4b79e7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPlinth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPlinth.java @@ -2,71 +2,35 @@ package WayofTime.alchemicalWizardry.common.block; import java.util.Random; -import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class BlockPlinth extends BlockContainer { - @SideOnly(Side.CLIENT) - private IIcon topIcon; - @SideOnly(Side.CLIENT) - private IIcon sideIcon2; - @SideOnly(Side.CLIENT) - private IIcon bottomIcon; - public BlockPlinth() { super(Material.rock); setHardness(2.0F); setResistance(5.0F); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setBlockName("bloodPlinth"); float f = 0.0625F; this.setBlockBounds(f, 0.0F, f, 1.0f - f, 0.875f, 1.0f - f); } @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) + public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { - this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:ArcanePlinth"); - this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket"); - this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket"); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta) - { - switch (side) - { - case 0: - return bottomIcon; - case 1: - return topIcon; - default: - return sideIcon2; - } - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) - { - TEPlinth tileEntity = (TEPlinth) world.getTileEntity(x, y, z); + TEPlinth tileEntity = (TEPlinth) world.getTileEntity(blockPos); if (tileEntity == null || player.isSneaking()) { @@ -87,21 +51,21 @@ public class BlockPlinth extends BlockContainer tileEntity.setInventorySlotContents(0, null); tileEntity.setActive(); } - world.markBlockForUpdate(x, y, z); + world.markBlockForUpdate(blockPos); return true; } @Override - public void breakBlock(World world, int x, int y, int z, Block par5, int par6) + public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) { - dropItems(world, x, y, z); - super.breakBlock(world, x, y, z, par5, par6); + dropItems(world, blockPos); + super.breakBlock(world, blockPos, blockState); } - private void dropItems(World world, int x, int y, int z) + private void dropItems(World world, BlockPos blockPos) { Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(x, y, z); + TileEntity tileEntity = world.getTileEntity(blockPos); if (!(tileEntity instanceof IInventory)) { @@ -119,7 +83,7 @@ public class BlockPlinth extends BlockContainer float rx = rand.nextFloat() * 0.8F + 0.1F; float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, x + rx, y + ry, z + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); + EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { @@ -142,12 +106,6 @@ public class BlockPlinth extends BlockContainer return new TEPlinth(); } - @Override - public boolean renderAsNormalBlock() - { - return false; - } - @Override public int getRenderType() { @@ -161,7 +119,7 @@ public class BlockPlinth extends BlockContainer } @Override - public boolean hasTileEntity() + public boolean hasTileEntity(IBlockState blockState) { return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockReagentConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockReagentConduit.java index eeae6acc..f6cb50a5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockReagentConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockReagentConduit.java @@ -2,14 +2,13 @@ package WayofTime.alchemicalWizardry.common.block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class BlockReagentConduit extends BlockContainer { @@ -18,15 +17,6 @@ public class BlockReagentConduit extends BlockContainer super(Material.cloth); setHardness(2.0F); setResistance(5.0F); - this.setBlockName("blockReagentConduit"); - this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:SimpleTransCircle"); } @Override @@ -42,9 +32,9 @@ public class BlockReagentConduit extends BlockContainer } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are) + public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { - return super.onBlockActivated(world, x, y, z, player, side, what, these, are); + return super.onBlockActivated(world, blockPos, state, player, side, hitX, hitY, hitZ); } @Override @@ -53,12 +43,6 @@ public class BlockReagentConduit extends BlockContainer return false; } - @Override - public boolean renderAsNormalBlock() - { - return false; - } - @Override public int getRenderType() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRitualStone.java index 656dbbfd..6a5ed2db 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRitualStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRitualStone.java @@ -1,66 +1,34 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.rituals.IRitualStone; import WayofTime.alchemicalWizardry.common.items.ScribeTool; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; public class BlockRitualStone extends Block implements IRitualStone { - @SideOnly(Side.CLIENT) - private IIcon blankIcon; - @SideOnly(Side.CLIENT) - private IIcon waterStoneIcon; - @SideOnly(Side.CLIENT) - private IIcon fireStoneIcon; - @SideOnly(Side.CLIENT) - private IIcon earthStoneIcon; - @SideOnly(Side.CLIENT) - private IIcon airStoneIcon; - @SideOnly(Side.CLIENT) - private IIcon duskStoneIcon; - @SideOnly(Side.CLIENT) - private IIcon dawnStoneIcon; - public BlockRitualStone() { super(Material.iron); setHardness(2.0F); setResistance(5.0F); - this.setBlockName("ritualStone"); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.blankIcon = iconRegister.registerIcon("AlchemicalWizardry:RitualStone"); - this.waterStoneIcon = iconRegister.registerIcon("AlchemicalWizardry:WaterRitualStone"); - this.fireStoneIcon = iconRegister.registerIcon("AlchemicalWizardry:FireRitualStone"); - this.earthStoneIcon = iconRegister.registerIcon("AlchemicalWizardry:EarthRitualStone"); - this.airStoneIcon = iconRegister.registerIcon("AlchemicalWizardry:AirRitualStone"); - this.duskStoneIcon = iconRegister.registerIcon("AlchemicalWizardry:DuskRitualStone"); - this.dawnStoneIcon = iconRegister.registerIcon("AlchemicalWizardry:LightRitualStone"); - } - - @Override - public int damageDropped(int metadata) + public int damageDropped(IBlockState blockState) { return 0; } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) + public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { ItemStack playerItem = player.getCurrentEquippedItem(); @@ -88,46 +56,14 @@ public class BlockRitualStone extends Block implements IRitualStone playerItem.setItemDamage(playerItem.getItemDamage() + 1); } - world.setBlockMetadataWithNotify(x, y, z, scribeTool.getType(), 3); - world.markBlockForUpdate(x, y, z); + world.setBlockState(blockPos, state.getBlock().getStateFromMeta(scribeTool.getType()), 3); + world.markBlockForUpdate(blockPos); return true; } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int metadata) - { - switch (metadata) - { - case 0: - return blankIcon; - - case 1: - return waterStoneIcon; - - case 2: - return fireStoneIcon; - - case 3: - return earthStoneIcon; - - case 4: - return airStoneIcon; - - case 5: - return duskStoneIcon; - - case 6: - return dawnStoneIcon; - - default: - return blankIcon; - } - } - @Override - public boolean isRuneType(World world, int x, int y, int z, int meta, int runeType) + public boolean isRuneType(World world, BlockPos blockPos, IBlockState blockState, int runeType) { - return meta == runeType; + return blockState.getBlock().getMetaFromState(blockState) == runeType; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSacrifice.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSacrifice.java index babad0ae..a5786b30 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSacrifice.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSacrifice.java @@ -1,28 +1,14 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; - public class BlockRuneOfSacrifice extends BlockBloodRune { public BlockRuneOfSacrifice() { super(); - this.setBlockName("runeOfSacrifice"); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); setHardness(2.0F); setResistance(5.0F); } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:RuneOfSacrifice"); - } - @Override public int getRuneEffect(int metaData) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSelfSacrifice.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSelfSacrifice.java index 0ccfdc9c..c7b729a0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSelfSacrifice.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSelfSacrifice.java @@ -1,28 +1,14 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; - public class BlockRuneOfSelfSacrifice extends BlockBloodRune { public BlockRuneOfSelfSacrifice() { super(); - this.setBlockName("runeOfSelfSacrifice"); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); setHardness(2.0F); setResistance(5.0F); } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:RuneOfSelfSacrifice"); - } - @Override public int getRuneEffect(int metaData) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java index 813e00ad..7c0f86e3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java @@ -1,11 +1,13 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.tileEntity.TESchematicSaver; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; public class BlockSchematicSaver extends BlockContainer @@ -15,8 +17,6 @@ public class BlockSchematicSaver extends BlockContainer super(Material.rock); setHardness(2.0F); setResistance(5.0F); -// setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setBlockName("schematicSaver"); } @Override @@ -26,16 +26,16 @@ public class BlockSchematicSaver extends BlockContainer } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are) + public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { if (world.isRemote) { return false; } - TESchematicSaver tileEntity = (TESchematicSaver) world.getTileEntity(x, y, z); + TESchematicSaver tileEntity = (TESchematicSaver) world.getTileEntity(blockPos); - tileEntity.rightClickBlock(player, side); + tileEntity.rightClickBlock(player, side.getIndex()); return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectral.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectral.java index 0573f3dc..5ad9f527 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectral.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectral.java @@ -1,19 +1,20 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Facing; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.Random; @@ -22,20 +23,11 @@ public class BlockSpectral extends BlockContainer public BlockSpectral() { super(Material.rock); - this.setBlockName("spectralBlock"); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:SpectralBlock"); } @Override public boolean isOpaqueCube() { - Block d; return false; } @@ -45,12 +37,13 @@ public class BlockSpectral extends BlockContainer return 0; } + @Override @SideOnly(Side.CLIENT) - public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) + public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, BlockPos blockPos, EnumFacing side) { - Block block = p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_); + Block block = p_149646_1_.getBlockState(blockPos).getBlock(); - if (p_149646_1_.getBlockMetadata(p_149646_2_, p_149646_3_, p_149646_4_) != p_149646_1_.getBlockMetadata(p_149646_2_ - Facing.offsetsXForSide[p_149646_5_], p_149646_3_ - Facing.offsetsYForSide[p_149646_5_], p_149646_4_ - Facing.offsetsZForSide[p_149646_5_])) + if (p_149646_1_.getBlockState(blockPos) != p_149646_1_.getBlockState(blockPos.add(-side.getFrontOffsetX(), -side.getFrontOffsetY(), -side.getFrontOffsetZ()))) { return true; } @@ -60,20 +53,11 @@ public class BlockSpectral extends BlockContainer return false; } - return block != this && super.shouldSideBeRendered(p_149646_1_, p_149646_2_, p_149646_3_, p_149646_4_, p_149646_5_); - } - - @SideOnly(Side.CLIENT) - /** - * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha - */ - public int getRenderBlockPass() - { - return 1; + return block != this && super.shouldSideBeRendered(p_149646_1_, blockPos, side); } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) + public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { if (player.isSneaking()) { @@ -86,7 +70,7 @@ public class BlockSpectral extends BlockContainer { if (playerItem.getItem() instanceof ItemBlock) { - world.setBlock(x, y, z, ((ItemBlock) (playerItem.getItem())).field_150939_a, playerItem.getItemDamage(), 3); + world.addBlockEvent(blockPos, ((ItemBlock) playerItem.getItem()).getBlock(), playerItem.getItemDamage(), 3); if (!player.capabilities.isCreativeMode) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectralContainer.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectralContainer.java index adf845bb..9b024b1b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectralContainer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectralContainer.java @@ -1,14 +1,13 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -20,17 +19,9 @@ public class BlockSpectralContainer extends BlockContainer public BlockSpectralContainer() { super(Material.cloth); - this.setBlockName("blockSpectralContainer"); this.setBlockBounds(0, 0, 0, 0, 0, 0); } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:BlockBloodLight"); - } - @Override public boolean isOpaqueCube() { @@ -38,30 +29,22 @@ public class BlockSpectralContainer extends BlockContainer } @Override - public boolean renderAsNormalBlock() - { - return false; - } + public void addCollisionBoxesToList(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, List list, Entity collidingEntity) {} @Override - public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity) - { - - } - public int quantityDropped(Random par1Random) { return 0; } @Override - public boolean isReplaceable(IBlockAccess world, int x, int y, int z) + public boolean isReplaceable(World world, BlockPos blockPos) { return true; } @Override - public boolean isAir(IBlockAccess world, int x, int y, int z) + public boolean isAir(IBlockAccess world, BlockPos blockPos) { return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpeedRune.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpeedRune.java index 8f3cc784..4db82016 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpeedRune.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpeedRune.java @@ -1,28 +1,14 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; - public class BlockSpeedRune extends BlockBloodRune { public BlockSpeedRune() { super(); - this.setBlockName("speedRune"); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); setHardness(2.0F); setResistance(5.0F); } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:SpeedRune"); - } - @Override public int getRuneEffect(int metaData) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEffect.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEffect.java index 18e6d1bb..c7f31294 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEffect.java @@ -2,23 +2,21 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; - public class BlockSpellEffect extends BlockOrientable { public BlockSpellEffect() { super(); - this.setBlockName("blockSpellEffect"); } @Override @@ -27,12 +25,6 @@ public class BlockSpellEffect extends BlockOrientable return new TESpellEffectBlock(); } - @Override - public boolean renderAsNormalBlock() - { - return false; - } - @Override public int getRenderType() { @@ -45,6 +37,7 @@ public class BlockSpellEffect extends BlockOrientable return false; } + @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEnhancement.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEnhancement.java index b58d36c0..1a0f3ddf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEnhancement.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEnhancement.java @@ -2,13 +2,13 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; @@ -17,7 +17,6 @@ public class BlockSpellEnhancement extends BlockOrientable public BlockSpellEnhancement() { super(); - this.setBlockName("blockSpellEnhancement"); } @Override @@ -26,12 +25,6 @@ public class BlockSpellEnhancement extends BlockOrientable return new TESpellEnhancementBlock(); } - @Override - public boolean renderAsNormalBlock() - { - return false; - } - @Override public int getRenderType() { @@ -44,6 +37,7 @@ public class BlockSpellEnhancement extends BlockOrientable return false; } + @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellModifier.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellModifier.java index 80c384cc..241f9fd8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellModifier.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellModifier.java @@ -2,13 +2,13 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; @@ -17,7 +17,6 @@ public class BlockSpellModifier extends BlockOrientable public BlockSpellModifier() { super(); - this.setBlockName("blockSpellModifier"); } @Override @@ -26,6 +25,7 @@ public class BlockSpellModifier extends BlockOrientable return new TESpellModifierBlock(); } + @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { @@ -47,12 +47,6 @@ public class BlockSpellModifier extends BlockOrientable return false; } - @Override - public boolean renderAsNormalBlock() - { - return false; - } - @Override public int getRenderType() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellParadigm.java index 9f2f456a..6c8d15b9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellParadigm.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellParadigm.java @@ -3,15 +3,18 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.common.items.ItemComplexSpellCrystal; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; @@ -20,7 +23,6 @@ public class BlockSpellParadigm extends BlockOrientable public BlockSpellParadigm() { super(); - this.setBlockName("blockSpellParadigm"); } @Override @@ -29,8 +31,8 @@ public class BlockSpellParadigm extends BlockOrientable return new TESpellParadigmBlock(); } + @Override @SideOnly(Side.CLIENT) - /** * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) */ @@ -49,7 +51,7 @@ public class BlockSpellParadigm extends BlockOrientable } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are) + public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { ItemStack stack = player.getCurrentEquippedItem(); @@ -61,14 +63,14 @@ public class BlockSpellParadigm extends BlockOrientable } NBTTagCompound itemTag = stack.getTagCompound(); - itemTag.setInteger("xCoord", x); - itemTag.setInteger("yCoord", y); - itemTag.setInteger("zCoord", z); + itemTag.setInteger("xCoord", blockPos.getX()); + itemTag.setInteger("yCoord", blockPos.getY()); + itemTag.setInteger("zCoord", blockPos.getZ()); itemTag.setInteger("dimensionId", world.provider.getDimensionId()); return true; } - return super.onBlockActivated(world, x, y, z, player, side, what, these, are); + return super.onBlockActivated(world, blockPos, state, player, side, hitX, hitY, hitZ); } @Override @@ -77,12 +79,6 @@ public class BlockSpellParadigm extends BlockOrientable return false; } - @Override - public boolean renderAsNormalBlock() - { - return false; - } - @Override public int getRenderType() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java index 28a4299d..af6bfe66 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java @@ -1,66 +1,31 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.items.BlankSpell; import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; public class BlockSpellTable extends BlockContainer { - @SideOnly(Side.CLIENT) - private IIcon bottomIcon; - @SideOnly(Side.CLIENT) - private IIcon topIcon; - @SideOnly(Side.CLIENT) - private IIcon sideIcon; - public BlockSpellTable() { super(Material.rock); setHardness(2.0F); setResistance(5.0F); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setBlockName("blockHomHeart"); } @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) + public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { - this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:HomHeart_top"); - this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:HomHeart_bottom"); - this.sideIcon = iconRegister.registerIcon("AlchemicalWizardry:HomHeart_side"); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta) - { - switch (side) - { - case 0: - return bottomIcon; - case 1: - return topIcon; - default: - return sideIcon; - } - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) - { - TEHomHeart tileEntity = (TEHomHeart) world.getTileEntity(x, y, z); + TEHomHeart tileEntity = (TEHomHeart) world.getTileEntity(blockPos); if (tileEntity == null || player.isSneaking()) { @@ -79,9 +44,9 @@ public class BlockSpellTable extends BlockContainer } NBTTagCompound itemTag = playerItem.getTagCompound(); - itemTag.setInteger("xCoord", x); - itemTag.setInteger("yCoord", y); - itemTag.setInteger("zCoord", z); + itemTag.setInteger("xCoord", blockPos.getX()); + itemTag.setInteger("yCoord", blockPos.getY()); + itemTag.setInteger("zCoord", blockPos.getZ()); itemTag.setInteger("dimensionId", world.provider.getDimensionId()); return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockStabilityGlyph.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockStabilityGlyph.java index 50cddbf5..5884f4a8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockStabilityGlyph.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockStabilityGlyph.java @@ -4,50 +4,21 @@ import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.omega.IStabilityGlyph; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class BlockStabilityGlyph extends Block implements IStabilityGlyph { - @SideOnly(Side.CLIENT) - private IIcon stability1; - public BlockStabilityGlyph() { super(Material.iron); setHardness(2.0F); setResistance(5.0F); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setBlockName("stabilityGlyph"); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconRegister) - { - this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:LargeBloodStoneBrick"); - this.stability1 = iconRegister.registerIcon("AlchemicalWizardry:GlyphStability1"); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta) - { - switch (meta) - { - case 0: - return stability1; - default: - return this.blockIcon; - } } @Override @@ -62,7 +33,7 @@ public class BlockStabilityGlyph extends Block implements IStabilityGlyph } } - + @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java index f776d189..56a31494 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java @@ -17,64 +17,27 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; -import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.common.Optional; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +//import net.minecraftforge.fml.common.Optional; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.event.TeleposeEvent; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; -import codechicken.multipart.MultipartHelper; -import codechicken.multipart.TileMultipart; - +//import codechicken.multipart.MultipartHelper; +//import codechicken.multipart.TileMultipart; public class BlockTeleposer extends BlockContainer { - @SideOnly(Side.CLIENT) - private IIcon topIcon; - @SideOnly(Side.CLIENT) - private IIcon sideIcon2; - @SideOnly(Side.CLIENT) - private IIcon bottomIcon; - public BlockTeleposer() { super(Material.rock); setHardness(2.0F); setResistance(5.0F); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setUnlocalizedName("bloodTeleposer"); } -// @Override -// @SideOnly(Side.CLIENT) -// public void registerBlockIcons(IIconRegister iconRegister) -// { -// this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Top"); -// this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Side"); -// this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Side"); -// } -// -// @Override -// @SideOnly(Side.CLIENT) -// public IIcon getIcon(int side, int meta) -// { -// switch (side) -// { -// case 0: -// return bottomIcon; -// case 1: -// return topIcon; -// default: -// return sideIcon2; -// } -// } - @Override public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { @@ -232,17 +195,17 @@ public class BlockTeleposer extends BlockContainer { TileEntity newTileEntityI = TileEntity.createAndLoadEntity(nbttag1); - if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityI)) +// if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityI)) { - newTileEntityI = createMultipartFromNBT(worldF, nbttag1); +// newTileEntityI = createMultipartFromNBT(worldF, nbttag1); } worldF.setTileEntity(posf, newTileEntityI); newTileEntityI.setPos(posf); - if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityI)) +// if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityI)) { - sendDescriptorOfTile(worldF, newTileEntityI); +// sendDescriptorOfTile(worldF, newTileEntityI); } } @@ -251,30 +214,30 @@ public class BlockTeleposer extends BlockContainer if (tileEntityF != null) { TileEntity newTileEntityF = TileEntity.createAndLoadEntity(nbttag2); - if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityF)) +// if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityF)) { - newTileEntityF = createMultipartFromNBT(worldI, nbttag2); +// newTileEntityF = createMultipartFromNBT(worldI, nbttag2); } worldI.setTileEntity(posi, newTileEntityF); newTileEntityF.setPos(posi); - if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityF)) +// if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityF)) { - sendDescriptorOfTile(worldI, newTileEntityF); +// sendDescriptorOfTile(worldI, newTileEntityF); } } return true; } - @Optional.Method(modid = "ForgeMultipart") +/* @Optional.Method(modid = "ForgeMultipart") public static boolean isMultipart(TileEntity tile) { return tile instanceof TileMultipart; } - + @Optional.Method(modid = "ForgeMultipart") public static TileEntity createMultipartFromNBT(World world, NBTTagCompound tag) { @@ -286,4 +249,5 @@ public class BlockTeleposer extends BlockContainer { MultipartHelper.sendDescPacket(world, tile); } + */ } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigm.java index c60b30d2..0952bff3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigm.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigm.java @@ -5,6 +5,7 @@ import java.util.Random; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; @@ -132,7 +133,7 @@ public class OmegaParadigm } - public boolean getBlockEffectWhileInside(Entity entity, int x, int y, int z) + public boolean getBlockEffectWhileInside(Entity entity, BlockPos blockPos) { return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java index d1855d08..b498a309 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java @@ -24,23 +24,21 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class TECrucible extends TEInventory implements IUpdatePlayerListBox { - private int radius = 5; + private float rColour; + private float gColour; + private float bColour; + + private int ticksRemaining = 0; + private int minValue = 0; + private int maxValue = 0; + private float incrementValue = 0; - public float rColour; - public float gColour; - public float bColour; - - public int ticksRemaining = 0; - public int minValue = 0; - public int maxValue = 0; - public float incrementValue = 0; - - public int state = 0; //0 is when it gives off gray particles, 1 is when it gives off white particles (player can't use this incense anymore), 2 is the normal colour of the incense, 3 means no particles (it is out) + private int state = 0; //0 is when it gives off gray particles, 1 is when it gives off white particles (player can't use this incense anymore), 2 is the normal colour of the incense, 3 means no particles (it is out) public TECrucible() { super(1); - float f = (float) 1.0F; + float f = 1.0F; float f1 = f * 0.6F + 0.4F; float f2 = f * f * 0.7F - 0.5F; float f3 = f * f * 0.6F - 0.7F; @@ -52,15 +50,16 @@ public class TECrucible extends TEInventory implements IUpdatePlayerListBox @Override public void update() { - if(worldObj.isRemote) - return; - + int radius = 5; + + if (worldObj.isRemote) return; + boolean stateChanged = false; - if(ticksRemaining <= 0) + if (ticksRemaining <= 0) { ItemStack stack = this.getStackInSlot(0); - if(stack != null && stack.getItem() instanceof IIncense) + if (stack != null && stack.getItem() instanceof IIncense) { IIncense incense = (IIncense)stack.getItem(); @@ -152,21 +151,21 @@ public class TECrucible extends TEInventory implements IUpdatePlayerListBox } } - public void spawnClientParticle(World world, int x, int y, int z, Random rand) + public void spawnClientParticle(World world, BlockPos blockPos, Random rand) { switch(state) { case 0: - world.spawnParticle(EnumParticleTypes.REDSTONE, x + 0.5D + rand.nextGaussian() / 8, y + 0.7D, z + 0.5D + rand.nextGaussian() / 8, 0.15, 0.15, 0.15); + world.spawnParticle(EnumParticleTypes.REDSTONE, blockPos.getX() + 0.5D + rand.nextGaussian() / 8, blockPos.getY() + 0.7D, blockPos.getZ() + 0.5D + rand.nextGaussian() / 8, 0.15, 0.15, 0.15); break; case 1: - world.spawnParticle(EnumParticleTypes.REDSTONE, x + 0.5D + rand.nextGaussian() / 8, y + 0.7D, z + 0.5D + rand.nextGaussian() / 8, 1.0, 1.0, 1.0); + world.spawnParticle(EnumParticleTypes.REDSTONE, blockPos.getX() + 0.5D + rand.nextGaussian() / 8, blockPos.getY() + 0.7D, blockPos.getZ() + 0.5D + rand.nextGaussian() / 8, 1.0, 1.0, 1.0); break; case 2: - world.spawnParticle(EnumParticleTypes.REDSTONE, x + 0.5D + rand.nextGaussian() / 8, y + 0.7D, z + 0.5D + rand.nextGaussian() / 8, rColour, gColour, bColour); - world.spawnParticle(EnumParticleTypes.FLAME, x + 0.5D + rand.nextGaussian() / 32, y + 0.7D, z + 0.5D + rand.nextGaussian() / 32, 0, 0.02, 0); + world.spawnParticle(EnumParticleTypes.REDSTONE, blockPos.getX() + 0.5D + rand.nextGaussian() / 8, blockPos.getY() + 0.7D, blockPos.getZ() + 0.5D + rand.nextGaussian() / 8, rColour, gColour, bColour); + world.spawnParticle(EnumParticleTypes.FLAME, blockPos.getX() + 0.5D + rand.nextGaussian() / 32, blockPos.getY() + 0.7D, blockPos.getZ() + 0.5D + rand.nextGaussian() / 32, 0, 0.02, 0); break; case 3: diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java index 5b76fe26..bc0774a9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java @@ -225,14 +225,14 @@ public class TEMimicBlock extends TileEntity implements IUpdatePlayerListBox return block.getStateFromMeta(getMetaOfMimic()); } - public boolean getBlockEffectWhileInside(Entity entity, int x, int y, int z) + public boolean getBlockEffectWhileInside(Entity entity, BlockPos blockPos) { if(reagent != null) { OmegaParadigm paradigm = OmegaRegistry.getParadigmForReagent(reagent); if(paradigm != null) { - return paradigm.getBlockEffectWhileInside(entity, x, y, z); + return paradigm.getBlockEffectWhileInside(entity, blockPos); } } diff --git a/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang b/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang index 6334adbf..93b52d6c 100644 --- a/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang +++ b/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang @@ -1,73 +1,73 @@ #Block Localization -tile.bloodAltar.name=Blood Altar -tile.bloodRune.blank.name=Blood Rune -tile.bloodRune.fill.name=Rune of Augmented Capacity -tile.bloodRune.empty.name=Rune of Dislocation -tile.bloodRune.orb.name=Rune of the Orb -tile.bloodRune.betterCapacity.name=Rune of Superior Capacity -tile.bloodRune.acceleration.name=Rune of Acceleration -tile.speedRune.name=Speed Rune -tile.efficiencyRune.name=Efficiency Rune -tile.runeOfSacrifice.name=Rune of Sacrifice -tile.runeOfSelfSacrifice.name=Rune of Self-Sacrifice -tile.ritualStone.name=Ritual Stone -tile.blockMasterStone.name=Master Ritual Stone -tile.bloodSocket.name=Filled Socket -tile.imperfectRitualStone.name=Imperfect Ritual Stone -tile.armourForge.name=Soul Armour Forge -tile.emptySocket.name=Empty Socket -tile.bloodStoneBrick.name=Bloodstone Brick -tile.largeBloodStoneBrick.name=Large Bloodstone Brick +tile.altar.name=Blood Altar +tile.blood_rune.blank.name=Blood Rune +tile.blood_rune.fill.name=Rune of Augmented Capacity +tile.blood_rune.empty.name=Rune of Dislocation +tile.blood_rune.orb.name=Rune of the Orb +tile.blood_rune.betterCapacity.name=Rune of Superior Capacity +tile.blood_rune.acceleration.name=Rune of Acceleration +tile.speed_rune.name=Speed Rune +tile.efficiency_rune.name=Efficiency Rune +tile.sacrifice_rune.name=Rune of Sacrifice +tile.self_sacrifice_rune.name=Rune of Self-Sacrifice +tile.ritual_stone.name=Ritual Stone +tile.master_ritual_stone.name=Master Ritual Stone +tile.filled_socket.name=Filled Socket +tile.imperfect_ritual_stone.name=Imperfect Ritual Stone +tile.soul_armour_forge.name=Soul Armour Forge +tile.empty_socket.name=Empty Socket +tile.bloodstone_brick.name=Bloodstone Brick +tile.large_bloodstone_brick.name=Large Bloodstone Brick tile.chemistry_set.name=Alchemical Chemistry Set -tile.blockHomHeart.name=Spell Table -tile.bloodPedestal.name=Arcane Pedestal -tile.bloodPlinth.name=Arcane Plinth -tile.bloodTeleposer.name=Teleposer -tile.blockConduit.name=Spell Conduit -tile.blockSpellParadigm.projectile.name=Particle Generator -tile.blockSpellParadigm.self.name=Self Augmentator -tile.blockSpellParadigm.melee.name=Melee Aggregator -tile.blockSpellParadigm.tool.name=Tool Forger -tile.blockSpellEnhancement.power1.name=Unstable Spell Empowerer -tile.blockSpellEnhancement.power2.name=Standard Spell Empowerer -tile.blockSpellEnhancement.power3.name=Reinforced Spell Empowerer -tile.blockSpellEnhancement.power4.name=Imbued Spell Empowerer -tile.blockSpellEnhancement.power5.name=Demonic Spell Empowerer -tile.blockSpellEnhancement.cost1.name=Unstable Spell Dampener -tile.blockSpellEnhancement.cost2.name=Standard Spell Dampener -tile.blockSpellEnhancement.cost3.name=Reinforced Spell Dampener -tile.blockSpellEnhancement.cost4.name=Imbued Spell Dampener -tile.blockSpellEnhancement.cost5.name=Demonic Spell Dampener -tile.blockSpellEnhancement.potency1.name=Unstable Spell Augmentor -tile.blockSpellEnhancement.potency2.name=Standard Spell Augmentor -tile.blockSpellEnhancement.potency3.name=Reinforced Spell Augmentor -tile.blockSpellEnhancement.potency4.name=Imbued Spell Augmentor -tile.blockSpellEnhancement.potency5.name=Demonic Spell Augmentor -tile.blockSpellModifier.default.name=Default Spell Modifier -tile.blockSpellModifier.offensive.name=Offensive Spell Modifier -tile.blockSpellModifier.defensive.name=Defensive Spell Modifier -tile.blockSpellModifier.environmental.name=Environmental Spell Modifier -tile.blockSpellEffect.fire.name=Crucible of Fire -tile.blockSpellEffect.ice.name=Ice Maker -tile.blockSpellEffect.wind.name=Wind Generator -tile.blockSpellEffect.earth.name=Earth Former +tile.spell_table.name=Spell Table +tile.pedestal.name=Arcane Pedestal +tile.plinth.name=Arcane Plinth +tile.teleposer.name=Teleposer +tile.spell_conduit.name=Spell Conduit +tile.spell_paradigm.projectile.name=Particle Generator +tile.spell_paradigm.self.name=Self Augmentator +tile.spell_paradigm.melee.name=Melee Aggregator +tile.spell_paradigm.tool.name=Tool Forger +tile.spell_enhancement.power1.name=Unstable Spell Empowerer +tile.spell_enhancement.power2.name=Standard Spell Empowerer +tile.spell_enhancement.power3.name=Reinforced Spell Empowerer +tile.spell_enhancement.power4.name=Imbued Spell Empowerer +tile.spell_enhancement.power5.name=Demonic Spell Empowerer +tile.spell_enhancement.cost1.name=Unstable Spell Dampener +tile.spell_enhancement.cost2.name=Standard Spell Dampener +tile.spell_enhancement.cost3.name=Reinforced Spell Dampener +tile.spell_enhancement.cost4.name=Imbued Spell Dampener +tile.spell_enhancement.cost5.name=Demonic Spell Dampener +tile.spell_enhancement.potency1.name=Unstable Spell Augmentor +tile.spell_enhancement.potency2.name=Standard Spell Augmentor +tile.spell_enhancement.potency3.name=Reinforced Spell Augmentor +tile.spell_enhancement.potency4.name=Imbued Spell Augmentor +tile.spell_enhancement.potency5.name=Demonic Spell Augmentor +tile.spell_modifier.default.name=Default Spell Modifier +tile.spell_modifier.offensive.name=Offensive Spell Modifier +tile.spell_modifier.defensive.name=Defensive Spell Modifier +tile.spell_modifier.environmental.name=Environmental Spell Modifier +tile.spell_effect.fire.name=Crucible of Fire +tile.spell_effect.ice.name=Ice Maker +tile.spell_effect.wind.name=Wind Generator +tile.spell_effect.earth.name=Earth Former tile.alchemical_calcinator.name=Alchemical Calcinator -tile.crystalBelljar.name=Crystal Belljar -tile.blockReagentConduit.name=Alchemy Relay -tile.lifeEssenceFluidBlock.name=Life Essence -tile.crystalBlock.fullCrystal.name=Crystal Cluster -tile.crystalBlock.crystalBrick.name=Crystal Cluster Brick -tile.demonPortal.name=Demon Portal -tile.demonChest.name=Demon's Chest -tile.enchantmentGlyph.enchantability.name=Glyph of the Adept Enchanter -tile.enchantmentGlyph.enchantmentLevel.name=Glyph of Arcane Potential -tile.stabilityGlyph.stability1.name=Glyph of Rigid Stability -tile.schematicSaver.name=Schematic Saver -tile.blockMimic.name=Mimic Block -tile.blockSpectralContainer.name=Spectral Container -tile.blockBloodLightSource.name=Blood Light -tile.spectralBlock.name=Spectral Block -tile.blockCrucible.name=Incense Crucible +tile.crystal_belljar.name=Crystal Belljar +tile.reagent_conduit.name=Alchemy Relay +tile.life_essence.name=Life Essence +tile.crystal_block.fullCrystal.name=Crystal Cluster +tile.crystal_block.crystalBrick.name=Crystal Cluster Brick +tile.demon_portal.name=Demon Portal +tile.demon_chest.name=Demon's Chest +tile.enchantment_glyph.enchantability.name=Glyph of the Adept Enchanter +tile.enchantment_glyph.enchantmentLevel.name=Glyph of Arcane Potential +tile.stability_glyph.stability1.name=Glyph of Rigid Stability +tile.schematic_saver.name=Schematic Saver +tile.mimic_block.name=Mimic Block +tile.spectral_container.name=Spectral Container +tile.blood_light.name=Blood Light +tile.spectral_block.name=Spectral Block +tile.incense_crucible.name=Incense Crucible #Item Localization item.weakBloodOrb.name=Weak Blood Orb From 1aa343624e4b1171a0150103b5bdfe49be72a9d1 Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Wed, 29 Jul 2015 14:37:45 -0400 Subject: [PATCH 11/33] Finished the rituals --- .../common/omega/OmegaStructureHandler.java | 133 ++++-------------- .../common/rituals/RitualEffectOmegaTest.java | 21 +-- 2 files changed, 43 insertions(+), 111 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureHandler.java index 7289c491..2d96a753 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureHandler.java @@ -1,6 +1,9 @@ package WayofTime.alchemicalWizardry.common.omega; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.Int3; @@ -14,7 +17,7 @@ public class OmegaStructureHandler return true; } - public static OmegaStructureParameters getStructureStabilityFactor(World world, int x, int y, int z, int expLim, Int3 offset) + public static OmegaStructureParameters getStructureStabilityFactor(World world, BlockPos pos, int expLim, Int3 offset) { int range = expLim; @@ -46,107 +49,33 @@ public class OmegaStructureHandler { if (boolList[i][j][k] == 1) { - if (i - 1 >= 0 && !(boolList[i - 1][j][k] == 1 || boolList[i - 1][j][k] == -1)) - { - Block block = world.getBlock(x - range + i - 1, y - range + j, z - range + k); - if (world.isAirBlock(x - range + i - 1, y - range + j, z - range + k) || block == ModBlocks.blockSpectralContainer) - { - if(i - 1 == 0) //One of the found air blocks is at the range boundary, and thus the container is incomplete - { - return emptyParam; - } - boolList[i - 1][j][k] = 1; - isReady = false; - }else - { - boolList[i - 1][j][k] = -1; - } - } - - if (j - 1 >= 0 && !(boolList[i][j - 1][k] == 1 || boolList[i][j - 1][k] == -1)) - { - Block block = world.getBlock(x - range + i, y - range + j - 1, z - range + k); - if (world.isAirBlock(x - range + i, y - range + j - 1, z - range + k) || block == ModBlocks.blockSpectralContainer) - { - if(j - 1 == 0) - { - return emptyParam; - } - boolList[i][j - 1][k] = 1; - isReady = false; - }else - { - boolList[i][j - 1][k] = -1; - } - } - - if (k - 1 >= 0 && !(boolList[i][j][k - 1] == 1 || boolList[i][j][k - 1] == -1)) - { - Block block = world.getBlock(x - range + i, y - range + j, z - range + k - 1); - if (world.isAirBlock(x - range + i, y - range + j, z - range + k - 1) || block == ModBlocks.blockSpectralContainer) - { - if(k - 1 == 0) - { - return emptyParam; - } - boolList[i][j][k - 1] = 1; - isReady = false; - }else - { - boolList[i][j][k - 1] = -1; - } - } - - if (i + 1 <= 2 * range && !(boolList[i + 1][j][k] == 1 || boolList[i + 1][j][k] == -1)) - { - Block block = world.getBlock(x - range + i + 1, y - range + j, z - range + k); - if (world.isAirBlock(x - range + i + 1, y - range + j, z - range + k) || block == ModBlocks.blockSpectralContainer) - { - if(i + 1 == range * 2) - { - return emptyParam; - } - boolList[i + 1][j][k] = 1; - isReady = false; - }else - { - boolList[i + 1][j][k] = -1; - } - } - - if (j + 1 <= 2 * range && !(boolList[i][j + 1][k] == 1 || boolList[i][j + 1][k] == -1)) - { - Block block = world.getBlock(x - range + i, y - range + j + 1, z - range + k); - if (world.isAirBlock(x - range + i, y - range + j + 1, z - range + k) || block == ModBlocks.blockSpectralContainer) - { - if(j + 1 == range * 2) - { - return emptyParam; - } - boolList[i][j + 1][k] = 1; - isReady = false; - }else - { - boolList[i][j + 1][k] = -1; - } - } - - if (k + 1 <= 2 * range && !(boolList[i][j][k + 1] == 1 || boolList[i][j][k + 1] == -1)) - { - Block block = world.getBlock(x - range + i, y - range + j, z - range + k + 1); - if (world.isAirBlock(x - range + i, y - range + j, z - range + k + 1) || block == ModBlocks.blockSpectralContainer) - { - if(k + 1 == range * 2) - { - return emptyParam; - } - boolList[i][j][k + 1] = 1; - isReady = false; - }else - { - boolList[i][j][k + 1] = -1; - } - } + BlockPos position = pos.add(i - range, j - range, k - range); + + for(EnumFacing face : EnumFacing.VALUES) + { + int iP = i + face.getFrontOffsetX(); + int jP = j + face.getFrontOffsetY(); + int kP = k + face.getFrontOffsetZ(); + + if(iP >= 0 && iP <= 2 * range && jP >= 0 && jP <= 2 * range && kP >= 0 && kP <= 2 * range && !(boolList[iP][jP][kP] == 1 || boolList[iP][jP][kP] == -1)) + { + BlockPos newPos = position.add(face.getDirectionVec()); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); + if (world.isAirBlock(newPos) || block == ModBlocks.blockSpectralContainer) + { + if(iP == 0 && iP == 2 * range && jP == 0 && jP == 2 * range && kP == 0 && kP == 2 * range) + { + return emptyParam; + } + boolList[iP][jP][kP] = 1; + isReady = false; + }else + { + boolList[iP][jP][kP] = -1; + } + } + } } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java index 47b6bc16..d2460140 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java @@ -11,6 +11,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler; @@ -48,7 +49,7 @@ public class RitualEffectOmegaTest extends RitualEffect return; } - OmegaStructureParameters param = OmegaStructureHandler.getStructureStabilityFactor(world, x, y, z, 5, new Int3(0,1,0)); + OmegaStructureParameters param = OmegaStructureHandler.getStructureStabilityFactor(world, pos, 5, new Int3(0,1,0)); int stab = param.stability; int enchantability = param.enchantability; int enchantmentLevel = param.enchantmentLevel; @@ -62,7 +63,7 @@ public class RitualEffectOmegaTest extends RitualEffect double range = 0.5; - List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, x + 0.5, y + 1.5, z + 0.5, range, range); + List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, pos.getX() + 0.5, pos.getY() + 1.5, pos.getZ() + 0.5, range, range); Reagent reagent = null; @@ -70,11 +71,12 @@ public class RitualEffectOmegaTest extends RitualEffect for(int i=0; i<4; i++) { Int3 jarLoc = this.getJarLocation(i); - TileEntity tile = world.getTileEntity(x + jarLoc.xCoord, y + jarLoc.yCoord, z + jarLoc.zCoord); + BlockPos newPos = pos.add(jarLoc.xCoord, jarLoc.yCoord, jarLoc.zCoord); + TileEntity tile = world.getTileEntity(newPos); if(tile instanceof IReagentHandler) { IReagentHandler container = (IReagentHandler)tile; - ReagentContainerInfo[] containerInfoArray = container.getContainerInfo(ForgeDirection.UP); + ReagentContainerInfo[] containerInfoArray = container.getContainerInfo(EnumFacing.UP); if(containerInfoArray == null) { continue; @@ -121,7 +123,7 @@ public class RitualEffectOmegaTest extends RitualEffect for(EntityPlayer player : playerList) { OmegaParadigm waterParadigm = OmegaRegistry.getParadigmForReagent(reagent); - if(waterParadigm != null && waterParadigm.convertPlayerArmour(player, x, y, z, stab, affinity, enchantability, enchantmentLevel)) + if(waterParadigm != null && waterParadigm.convertPlayerArmour(player, pos.getX(), pos.getY(), pos.getZ(), stab, affinity, enchantability, enchantmentLevel)) { APISpellHelper.setPlayerCurrentReagentAmount(player, tickDuration); APISpellHelper.setPlayerMaxReagentAmount(player, tickDuration); @@ -139,16 +141,17 @@ public class RitualEffectOmegaTest extends RitualEffect break; } Int3 jarLoc = this.getJarLocation(i); - TileEntity tile = world.getTileEntity(x + jarLoc.xCoord, y + jarLoc.yCoord, z + jarLoc.zCoord); + BlockPos newPos = pos.add(jarLoc.xCoord, jarLoc.yCoord, jarLoc.zCoord); + TileEntity tile = world.getTileEntity(newPos); if(tile instanceof IReagentHandler) { IReagentHandler container = (IReagentHandler)tile; - ReagentStack drained = container.drain(ForgeDirection.UP, new ReagentStack(reagent, drainLeft), true); + ReagentStack drained = container.drain(EnumFacing.UP, new ReagentStack(reagent, drainLeft), true); if(drained != null) { drainLeft -= drained.amount; - world.markBlockForUpdate(x + jarLoc.xCoord, y + jarLoc.yCoord, z + jarLoc.zCoord); - world.addWeatherEffect(new EntityLightningBolt(world, x + jarLoc.xCoord, y + jarLoc.yCoord, z + jarLoc.zCoord)); + world.markBlockForUpdate(newPos); + world.addWeatherEffect(new EntityLightningBolt(world, newPos.getX(), newPos.getY(), newPos.getZ())); } } } From cfed9f5ab3fda67159fbc1872b248f2ca3f77cac Mon Sep 17 00:00:00 2001 From: Arcaratus <byou64@gmail.com> Date: Wed, 29 Jul 2015 14:44:14 -0400 Subject: [PATCH 12/33] Add BlockRender code --- .../alchemicalWizardry/AlchemicalWizardry.java | 2 ++ .../WayofTime/alchemicalWizardry/ModBlocks.java | 5 +++++ .../alchemicalWizardry/client/BlockRenderer.java | 14 ++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/BlockRenderer.java diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index 806e4e8b..99836f43 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -288,6 +288,8 @@ import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiHandler; @Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v1.3.3", guiFactory = "WayofTime.alchemicalWizardry.client.gui.ConfigGuiFactory") public class AlchemicalWizardry { + public static String MODID = "AWWayofTime"; //Temporary + public static boolean parseTextFiles = false; public static boolean doMeteorsDestroyBlocks = true; diff --git a/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java b/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java index 8b030819..fe8d95a6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry; +import WayofTime.alchemicalWizardry.client.BlockRenderer; import net.minecraft.block.Block; import net.minecraft.item.ItemBlock; import net.minecraftforge.fml.common.registry.GameRegistry; @@ -171,6 +172,8 @@ public class ModBlocks GameRegistry.registerBlock(block, unlocalizedName); } + BlockRenderer.registerBlock(block); + return block; } @@ -191,6 +194,8 @@ public class ModBlocks GameRegistry.registerBlock(block, itemBlockClass, unlocalizedName); } + BlockRenderer.registerBlock(block); + return block; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/BlockRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/client/BlockRenderer.java new file mode 100644 index 00000000..8ade0296 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/client/BlockRenderer.java @@ -0,0 +1,14 @@ +package WayofTime.alchemicalWizardry.client; + +import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; +import net.minecraft.client.resources.model.ModelResourceLocation; +import net.minecraft.item.Item; + +public class BlockRenderer +{ + public static void registerBlock(Block block) + { + Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation("alchemicalwizardry:" + block.getUnlocalizedName().substring(5), "inventory")); + } +} From dd07defe1f657fb3beda8da420c3c1e1532a79b8 Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Wed, 29 Jul 2015 14:46:53 -0400 Subject: [PATCH 13/33] Quick render stuff --- .../client/ClientProxy.java | 2 +- .../common/renderer/mob/RenderBileDemon.java | 3 +- .../renderer/mob/RenderBoulderFist.java | 3 +- .../common/renderer/mob/RenderElemental.java | 3 +- .../renderer/mob/RenderFallenAngel.java | 9 ++-- .../common/renderer/mob/RenderIceDemon.java | 5 ++- .../renderer/mob/RenderLowerGuardian.java | 5 ++- .../renderer/mob/RenderMinorDemonGrunt.java | 3 +- .../mob/RenderMinorDemonGruntGuardian.java | 3 +- .../common/renderer/mob/RenderShade.java | 3 +- .../renderer/mob/RenderSmallEarthGolem.java | 3 +- .../renderer/mob/RenderWingedFireDemon.java | 3 +- .../RenderEnergyBazookaMainProjectile.java | 12 +++++- .../RenderEnergyBlastProjectile.java | 39 +++++++++++++----- .../projectile/RenderFireProjectile.java | 41 ------------------- .../renderer/projectile/RenderMeteor.java | 13 +++++- 16 files changed, 77 insertions(+), 73 deletions(-) delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderFireProjectile.java diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java b/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java index 2def5126..c8a076b6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java @@ -169,7 +169,7 @@ public class ClientProxy extends CommonProxy MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellEnhancement), new TESpellEnhancementBlockItemRenderer()); MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellParadigm), new TESpellParadigmBlockItemRenderer()); MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellModifier), new TESpellModifierBlockItemRenderer()); - MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockAlchemicCalcinator), new TEAlchemicalCalcinatorItemRenderer()); + MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockAlchemicalCalcinator), new TEAlchemicalCalcinatorItemRenderer()); MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockCrystalBelljar), new TEBellJarItemRenderer()); ShaderHelper.initShaders(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBileDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBileDemon.java index 6e7674a3..a44fb4c3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBileDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBileDemon.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; import WayofTime.alchemicalWizardry.common.entity.mob.EntityBileDemon; +import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; @@ -12,7 +13,7 @@ public class RenderBileDemon extends RenderLiving public RenderBileDemon(ModelBase par1ModelBase, float par2) { - super(par1ModelBase, par2); + super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); } public ResourceLocation func_110832_a(EntityBileDemon par1EntityBileDemon) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBoulderFist.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBoulderFist.java index 8ff9516f..4b3f1691 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBoulderFist.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBoulderFist.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; import WayofTime.alchemicalWizardry.common.entity.mob.EntityBoulderFist; +import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; @@ -12,7 +13,7 @@ public class RenderBoulderFist extends RenderLiving public RenderBoulderFist(ModelBase par1ModelBase, float par2) { - super(par1ModelBase, par2); + super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); } public ResourceLocation func_110832_a(EntityBoulderFist par1EntityBoulderFist) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderElemental.java index 91d92f8d..82ae9f1a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderElemental.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; import WayofTime.alchemicalWizardry.common.entity.mob.*; +import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; @@ -17,7 +18,7 @@ public class RenderElemental extends RenderLiving public RenderElemental(ModelBase par1ModelBase, float par2) { - super(par1ModelBase, par2); + super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); } public ResourceLocation func_110832_a(EntityElemental par1EntityElemental) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java index 24c69cf9..adc58c3d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFallenAngel; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityFallenAngel; @SideOnly(Side.CLIENT) public class RenderFallenAngel extends RenderLiving @@ -15,7 +16,7 @@ public class RenderFallenAngel extends RenderLiving public RenderFallenAngel(ModelBase par1ModelBase, float par2) { - super(par1ModelBase, par2); + super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); } public ResourceLocation func_110832_a(EntityFallenAngel par1EntityFallenAngel) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderIceDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderIceDemon.java index 4b36e492..92ea947a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderIceDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderIceDemon.java @@ -1,10 +1,11 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon; +import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon; public class RenderIceDemon extends RenderLiving { @@ -12,7 +13,7 @@ public class RenderIceDemon extends RenderLiving public RenderIceDemon(ModelBase par1ModelBase, float par2) { - super(par1ModelBase, par2); + super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); } public ResourceLocation func_110832_a(EntityIceDemon par1EntityIceDemon) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderLowerGuardian.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderLowerGuardian.java index a1c39675..7407e47f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderLowerGuardian.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderLowerGuardian.java @@ -1,10 +1,11 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; +import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; public class RenderLowerGuardian extends RenderLiving { @@ -12,7 +13,7 @@ public class RenderLowerGuardian extends RenderLiving public RenderLowerGuardian(ModelBase par1ModelBase, float par2) { - super(par1ModelBase, par2); + super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); } public ResourceLocation func_110832_a(EntityLowerGuardian par1EntityLowerGuardian) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGrunt.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGrunt.java index 284f6f4d..e975edee 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGrunt.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGrunt.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; +import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; @@ -20,7 +21,7 @@ public class RenderMinorDemonGrunt extends RenderLiving public RenderMinorDemonGrunt(ModelBase par1ModelBase, float par2) { - super(par1ModelBase, par2); + super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); } public ResourceLocation func_110832_a(EntityMinorDemonGrunt entity) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGruntGuardian.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGruntGuardian.java index a2a70bb3..ba52f114 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGruntGuardian.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGruntGuardian.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; +import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; @@ -20,7 +21,7 @@ public class RenderMinorDemonGruntGuardian extends RenderLiving public RenderMinorDemonGruntGuardian(ModelBase par1ModelBase, float par2) { - super(par1ModelBase, par2); + super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); } public ResourceLocation func_110832_a(EntityMinorDemonGruntGuardian entity) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderShade.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderShade.java index afd4f230..b3d4a844 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderShade.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderShade.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; import WayofTime.alchemicalWizardry.common.entity.mob.EntityShade; +import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; @@ -12,7 +13,7 @@ public class RenderShade extends RenderLiving public RenderShade(ModelBase par1ModelBase, float par2) { - super(par1ModelBase, par2); + super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); } public ResourceLocation func_110832_a(EntityShade par1EntityShade) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderSmallEarthGolem.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderSmallEarthGolem.java index 3e87ac76..42b70f01 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderSmallEarthGolem.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderSmallEarthGolem.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem; +import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; @@ -12,7 +13,7 @@ public class RenderSmallEarthGolem extends RenderLiving public RenderSmallEarthGolem(ModelBase par1ModelBase, float par2) { - super(par1ModelBase, par2); + super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); } public ResourceLocation func_110832_a(EntitySmallEarthGolem par1EntitySmallEarthGolem) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderWingedFireDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderWingedFireDemon.java index 8a385f76..af809551 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderWingedFireDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderWingedFireDemon.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon; +import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; @@ -12,7 +13,7 @@ public class RenderWingedFireDemon extends RenderLiving public RenderWingedFireDemon(ModelBase par1ModelBase, float par2) { - super(par1ModelBase, par2); + super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); } public ResourceLocation func_110832_a(EntityWingedFireDemon par1EntityWingedFireDemon) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java index fce17323..3ea79b1e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java @@ -1,16 +1,24 @@ package WayofTime.alchemicalWizardry.common.renderer.projectile; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelEnergyBazookaMainProjectile; +import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; + import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelEnergyBazookaMainProjectile; + public class RenderEnergyBazookaMainProjectile extends Render { - public ModelBase model = new ModelEnergyBazookaMainProjectile(); + public RenderEnergyBazookaMainProjectile() + { + super(Minecraft.getMinecraft().getRenderManager()); + } + + public ModelBase model = new ModelEnergyBazookaMainProjectile(); private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/EnergyBazookaMainProjectile.png"); private float scale = 1.0f; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBlastProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBlastProjectile.java index d0e067e1..53228e59 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBlastProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBlastProjectile.java @@ -1,35 +1,52 @@ package WayofTime.alchemicalWizardry.common.renderer.projectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.*; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.entity.IProjectile; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; +import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile; +import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; +import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; +import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; +import WayofTime.alchemicalWizardry.common.entity.projectile.LightningBoltProjectile; +import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; +import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile; +import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile; + @SideOnly(Side.CLIENT) public class RenderEnergyBlastProjectile extends Render { - public void doRenderEnergyBlastProjectile(Entity entityShot, double par2, double par4, double par6, float par8, float par9) + public RenderEnergyBlastProjectile() + { + super(Minecraft.getMinecraft().getRenderManager()); + } + + public void doRenderEnergyBlastProjectile(Entity entityShot, double par2, double par4, double par6, float par8, float par9) { GL11.glPushMatrix(); GL11.glTranslatef((float) par2, (float) par4, (float) par6); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glScalef(0.1F, 0.1F, 0.1F); this.bindTexture(this.getEntityTexture(entityShot)); - Tessellator var12 = Tessellator.instance; + Tessellator var12 = Tessellator.getInstance(); GL11.glRotatef(180.0F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F); GL11.glRotatef(-renderManager.playerViewX, 1.0F, 0.0F, 0.0F); - var12.startDrawingQuads(); - var12.setNormal(0.0F, 1.0F, 0.0F); - var12.addVertexWithUV(-0.5F, -0.25F, 0.0D, 0, 1); - var12.addVertexWithUV(0.5F, -0.25F, 0.0D, 1, 1); - var12.addVertexWithUV(0.5F, 0.75F, 0.0D, 1, 0); - var12.addVertexWithUV(-0.5F, 0.75F, 0.0D, 0, 0); + WorldRenderer wr = var12.getWorldRenderer(); + wr.startDrawingQuads(); + wr.func_178980_d(0.0F, 1.0F, 0.0F); //SetNormal + wr.addVertexWithUV(-0.5F, -0.25F, 0.0D, 0, 1); + wr.addVertexWithUV(0.5F, -0.25F, 0.0D, 1, 1); + wr.addVertexWithUV(0.5F, 0.75F, 0.0D, 1, 0); + wr.addVertexWithUV(-0.5F, 0.75F, 0.0D, 0, 0); var12.draw(); GL11.glDisable(GL12.GL_RESCALE_NORMAL); GL11.glPopMatrix(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderFireProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderFireProjectile.java deleted file mode 100644 index cda739fe..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderFireProjectile.java +++ /dev/null @@ -1,41 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.projectile; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class RenderFireProjectile -{ -// public void doRenderProjectile(FireProjectile entityShot, double par2, double par4, double par6, float par8, float par9) -// { -// GL11.glPushMatrix(); -// GL11.glTranslatef((float)par2, (float)par4, (float)par6); -// GL11.glEnable(GL12.GL_RESCALE_NORMAL); -// GL11.glScalef(0.1F, 0.1F, 0.1F); -// this.func_110776_a(this.func_110775_a(entityShot)); -// Tessellator var12 = Tessellator.instance; -// GL11.glRotatef(180.0F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F); -// GL11.glRotatef(-renderManager.playerViewX, 1.0F, 0.0F, 0.0F); -// var12.startDrawingQuads(); -// var12.setNormal(0.0F, 1.0F, 0.0F); -// var12.addVertexWithUV(-0.5F, -0.25F, 0.0D, 0, 1); -// var12.addVertexWithUV(0.5F, -0.25F, 0.0D, 1, 1); -// var12.addVertexWithUV(0.5F, 0.75F, 0.0D, 1, 0); -// var12.addVertexWithUV(-0.5F, 0.75F, 0.0D, 0, 0); -// var12.draw(); -// GL11.glDisable(GL12.GL_RESCALE_NORMAL); -// GL11.glPopMatrix(); -// } -// -// @Override -// public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) -// { -// this.doRenderProjectile((FireProjectile)par1Entity, par2, par4, par6, par8, par9); -// } -// -// @Override -// protected ResourceLocation func_110775_a(Entity entity) -// { -// return new ResourceLocation("alchemicalwizardry:/textures/entities/fireProjectile.png"); -// } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java index 95c6bd49..cbbd4374 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java @@ -1,16 +1,25 @@ package WayofTime.alchemicalWizardry.common.renderer.projectile; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelMeteor; +import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; + import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelMeteor; + public class RenderMeteor extends Render { - public ModelBase model = new ModelMeteor(); + public RenderMeteor() + { + super(Minecraft.getMinecraft().getRenderManager()); + // TODO Auto-generated constructor stub + } + + public ModelBase model = new ModelMeteor(); private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/Meteor.png"); private float scale = 1.0f; From 977b6ce29d4e21020ce94ef131dc694b4a896049 Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Wed, 29 Jul 2015 15:04:00 -0400 Subject: [PATCH 14/33] Finished fixing the raw Tile altar, and finished the Omega structure. --- .../common/omega/IEnchantmentGlyph.java | 5 +- .../common/omega/IStabilityGlyph.java | 3 +- .../common/omega/OmegaParadigmEarth.java | 7 -- .../common/omega/OmegaParadigmFire.java | 7 -- .../common/omega/OmegaParadigmWater.java | 2 +- .../common/omega/OmegaParadigmWind.java | 7 -- .../common/omega/OmegaStructureHandler.java | 19 ++--- .../common/renderer/block/RenderConduit.java | 10 +-- .../renderer/block/RenderCrystalBelljar.java | 72 ++++++++++--------- .../renderer/block/RenderMasterStone.java | 6 +- .../common/renderer/block/RenderPedestal.java | 9 +-- .../renderer/block/RenderReagentConduit.java | 33 +++++---- .../block/RenderSpellEffectBlock.java | 12 ++-- .../block/RenderSpellEnhancementBlock.java | 12 ++-- .../block/RenderSpellModifierBlock.java | 12 ++-- .../block/RenderSpellParadigmBlock.java | 12 ++-- .../itemRender/TEConduitItemRenderer.java | 5 +- .../common/tileEntity/TEAltar.java | 6 +- 18 files changed, 121 insertions(+), 118 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/IEnchantmentGlyph.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/IEnchantmentGlyph.java index 5c189f92..d4716f18 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/IEnchantmentGlyph.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/IEnchantmentGlyph.java @@ -1,9 +1,10 @@ package WayofTime.alchemicalWizardry.common.omega; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; public interface IEnchantmentGlyph extends IStabilityGlyph { - public int getEnchantability(World world, int x, int y, int z, int meta); - public int getEnchantmentLevel(World world, int x, int y, int z, int meta); + public int getEnchantability(World world, BlockPos pos, int meta); + public int getEnchantmentLevel(World world, BlockPos pos, int meta); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/IStabilityGlyph.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/IStabilityGlyph.java index 50252a94..97bf5814 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/IStabilityGlyph.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/IStabilityGlyph.java @@ -1,8 +1,9 @@ package WayofTime.alchemicalWizardry.common.omega; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; public interface IStabilityGlyph { - public int getAdditionalStabilityForFaceCount(World world, int x, int y, int z, int meta, int faceCount); + public int getAdditionalStabilityForFaceCount(World world, BlockPos pos, int meta, int faceCount); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmEarth.java index d601147d..bb021201 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmEarth.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.omega; -import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; @@ -44,12 +43,6 @@ public class OmegaParadigmEarth extends OmegaParadigm } } - @Override - public boolean getBlockEffectWhileInside(Entity entity, int x, int y, int z) - { - return true; - } - @Override public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmFire.java index 8cf69f17..d4fd272a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmFire.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.common.omega; import net.minecraft.block.material.Material; -import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; @@ -57,12 +56,6 @@ public class OmegaParadigmFire extends OmegaParadigm } } - @Override - public boolean getBlockEffectWhileInside(Entity entity, int x, int y, int z) - { - return true; - } - @Override public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWater.java index 1780c25a..80fda3d3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWater.java @@ -49,7 +49,7 @@ public class OmegaParadigmWater extends OmegaParadigm } @Override - public boolean getBlockEffectWhileInside(Entity entity, int x, int y, int z) + public boolean getBlockEffectWhileInside(Entity entity, BlockPos pos) { if(entity instanceof EntityLivingBase) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWind.java index e02b4c2c..67ad78c8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWind.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.omega; -import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; @@ -39,12 +38,6 @@ public class OmegaParadigmWind extends OmegaParadigm player.fallDistance = 0; } - @Override - public boolean getBlockEffectWhileInside(Entity entity, int x, int y, int z) - { - return true; - } - @Override public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureHandler.java index 2d96a753..45561cf9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureHandler.java @@ -129,17 +129,20 @@ public class OmegaStructureHandler indTally++; } - Block block = world.getBlock(x - range + i, y - range + j, z - range + k); - int meta = world.getBlockMetadata(x - range + i, y - range + j, z - range + k); + BlockPos newPos = pos.add(i - range, j - range, k - range); + + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); + int meta = block.getMetaFromState(state); if(block instanceof IEnchantmentGlyph) { - tally += ((IEnchantmentGlyph)block).getAdditionalStabilityForFaceCount(world, x-range+i, y-range+j, z-range+k, meta, indTally); - enchantability += ((IEnchantmentGlyph)block).getEnchantability(world, x-range+i, y-range+j, z-range+k, meta); - enchantmentLevel += ((IEnchantmentGlyph)block).getEnchantmentLevel(world, x-range+i, y-range+j, z-range+k, meta); + tally += ((IEnchantmentGlyph)block).getAdditionalStabilityForFaceCount(world, newPos, meta, indTally); + enchantability += ((IEnchantmentGlyph)block).getEnchantability(world, newPos, meta); + enchantmentLevel += ((IEnchantmentGlyph)block).getEnchantmentLevel(world, newPos, meta); }else if(block instanceof IStabilityGlyph) { - tally += ((IStabilityGlyph)block).getAdditionalStabilityForFaceCount(world, x-range+i, y-range+j, z-range+k, meta, indTally); + tally += ((IStabilityGlyph)block).getAdditionalStabilityForFaceCount(world, newPos, meta, indTally); }else { tally += indTally; @@ -151,8 +154,8 @@ public class OmegaStructureHandler return new OmegaStructureParameters(tally, enchantability, enchantmentLevel); } - public static OmegaStructureParameters getStructureStabilityFactor(World world, int x, int y, int z, int expLim) + public static OmegaStructureParameters getStructureStabilityFactor(World world, BlockPos pos, int expLim) { - return getStructureStabilityFactor(world, x, y, z, expLim, new Int3(0, 0, 0)); + return getStructureStabilityFactor(world, pos, expLim, new Int3(0, 0, 0)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java index 07a1ffd8..dcbacfcf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java @@ -1,20 +1,22 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelConduit; -import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.client.FMLClientHandler; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelConduit; +import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; + public class RenderConduit extends TileEntitySpecialRenderer { private ModelConduit modelConduit = new ModelConduit(); @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) { if (tileEntity instanceof TEConduit) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java index b37b9391..5ee91be0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java @@ -1,18 +1,21 @@ package WayofTime.alchemicalWizardry.common.renderer.block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.WorldRenderer; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.client.FMLClientHandler; + +import org.lwjgl.opengl.GL11; + import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import WayofTime.alchemicalWizardry.common.renderer.model.ModelCrystalBelljar; import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; -import cpw.mods.fml.client.FMLClientHandler; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.MathHelper; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.util.ForgeDirection; -import org.lwjgl.opengl.GL11; public class RenderCrystalBelljar extends TileEntitySpecialRenderer { @@ -22,7 +25,7 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) { if (tileEntity instanceof TEBellJar) { @@ -37,7 +40,7 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer GL11.glPopMatrix(); GL11.glPopMatrix(); - ReagentContainerInfo[] info = tileAltar.getContainerInfo(ForgeDirection.UNKNOWN); + ReagentContainerInfo[] info = tileAltar.getContainerInfo(EnumFacing.UP); if (info.length >= 1 && info[0] != null) { ReagentStack reagentStack = info[0].reagent; @@ -55,7 +58,7 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer { GL11.glPushMatrix(); float f1 = 1.0f; - Tessellator tessellator = Tessellator.instance; + Tessellator tessellator = Tessellator.getInstance(); this.bindTexture(resourceLocation); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); @@ -66,10 +69,11 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glDepthMask(false); - tessellator.startDrawingQuads(); - tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity); + WorldRenderer wr = tessellator.getWorldRenderer(); + wr.startDrawingQuads(); + wr.func_178961_b(colourRed, colourGreen, colourBlue, colourIntensity); //setColourRGBA GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5); - tessellator.setBrightness(240); + wr.func_178963_b(240); //setBrightness double x1 = -4d / 16d; double x2 = 4d / 16d; @@ -83,26 +87,26 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer double resy1 = 1.0d; double resy2 = 1.0d; - tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1); - tessellator.addVertexWithUV(x2, y1, z1, resx2, resy1); - tessellator.addVertexWithUV(x2, y2, z1, resx2, resy2); - tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2); - tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1); - tessellator.addVertexWithUV(x1, y1, z2, resx2, resy1); - tessellator.addVertexWithUV(x1, y2, z2, resx2, resy2); - tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2); - tessellator.addVertexWithUV(x1, y1, z2, resx1, resy1); - tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1); - tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2); - tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2); - tessellator.addVertexWithUV(x2, y1, z1, resx1, resy1); - tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1); - tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2); - tessellator.addVertexWithUV(x2, y2, z1, resx1, resy2); - tessellator.addVertexWithUV(x1, y2, z1, resx1, resy1); - tessellator.addVertexWithUV(x2, y2, z1, resx2, resy1); - tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2); - tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2); + wr.addVertexWithUV(x1, y1, z1, resx1, resy1); + wr.addVertexWithUV(x2, y1, z1, resx2, resy1); + wr.addVertexWithUV(x2, y2, z1, resx2, resy2); + wr.addVertexWithUV(x1, y2, z1, resx1, resy2); + wr.addVertexWithUV(x1, y1, z1, resx1, resy1); + wr.addVertexWithUV(x1, y1, z2, resx2, resy1); + wr.addVertexWithUV(x1, y2, z2, resx2, resy2); + wr.addVertexWithUV(x1, y2, z1, resx1, resy2); + wr.addVertexWithUV(x1, y1, z2, resx1, resy1); + wr.addVertexWithUV(x2, y1, z2, resx2, resy1); + wr.addVertexWithUV(x2, y2, z2, resx2, resy2); + wr.addVertexWithUV(x1, y2, z2, resx1, resy2); + wr.addVertexWithUV(x2, y1, z1, resx1, resy1); + wr.addVertexWithUV(x2, y1, z2, resx2, resy1); + wr.addVertexWithUV(x2, y2, z2, resx2, resy2); + wr.addVertexWithUV(x2, y2, z1, resx1, resy2); + wr.addVertexWithUV(x1, y2, z1, resx1, resy1); + wr.addVertexWithUV(x2, y2, z1, resx2, resy1); + wr.addVertexWithUV(x2, y2, z2, resx2, resy2); + wr.addVertexWithUV(x1, y2, z2, resx1, resy2); tessellator.draw(); GL11.glDepthMask(true); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderMasterStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderMasterStone.java index 968ddf3e..8ef4f8ff 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderMasterStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderMasterStone.java @@ -1,15 +1,15 @@ package WayofTime.alchemicalWizardry.common.renderer.block; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; import WayofTime.alchemicalWizardry.api.renderer.MRSRenderer; import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; public class RenderMasterStone extends TileEntitySpecialRenderer { @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) { if (tileEntity instanceof TEMasterStone) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java index b5319f98..7970b76e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelPedestal; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; @@ -11,9 +8,13 @@ import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.client.FMLClientHandler; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelPedestal; +import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; + public class RenderPedestal extends TileEntitySpecialRenderer { private ModelPedestal modelPedestal = new ModelPedestal(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderReagentConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderReagentConduit.java index 3ab80b7e..6fbd6266 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderReagentConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderReagentConduit.java @@ -1,29 +1,34 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; + public class RenderReagentConduit extends TileEntitySpecialRenderer { private static final ResourceLocation field_110629_a = new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"); @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) { if (tileEntity instanceof TEReagentConduit) { int renderCount = ((TEReagentConduit) tileEntity).renderCount; - float key1 = (tileEntity.xCoord * 54f - tileEntity.yCoord * 38.72f + tileEntity.zCoord * 10.432f); - float key2 = (tileEntity.xCoord * 21.43f - tileEntity.yCoord * 9.96f + tileEntity.zCoord * 12.8f); + BlockPos pos = tileEntity.getPos(); + float key1 = (pos.getX() * 54f - pos.getY() * 38.72f + pos.getZ() * 10.432f); + float key2 = (pos.getX() * 21.43f - pos.getY() * 9.96f + pos.getZ() * 12.8f); Int3 colourMap = ((TEReagentConduit) tileEntity).getColour(); GL11.glPushMatrix(); - Tessellator tessellator = Tessellator.instance; + Tessellator tessellator = Tessellator.getInstance(); + WorldRenderer wr = tessellator.getWorldRenderer(); this.bindTexture(field_110629_a); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); @@ -32,17 +37,17 @@ public class RenderReagentConduit extends TileEntitySpecialRenderer GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glDepthMask(false); - tessellator.startDrawingQuads(); - tessellator.setColorRGBA(colourMap.xCoord, colourMap.yCoord, colourMap.zCoord, 200); + wr.startDrawingQuads(); + wr.func_178961_b(colourMap.xCoord, colourMap.yCoord, colourMap.zCoord, 200); GL11.glTranslated(d0 + 0.5, d1 + 0.5, d2 + 0.5); - GL11.glRotatef(tileEntity.getWorldObj().getWorldTime() / 3.0f, 0F, 1F, 0F); //Rotate on planar axis + GL11.glRotatef(tileEntity.getWorld().getWorldTime() / 3.0f, 0F, 1F, 0F); //Rotate on planar axis GL11.glRotatef(renderCount + key1, 0F, 0F, 1F); //Rotate vertical axis GL11.glRotatef(renderCount * 2f + key2, 1F, 0F, 0F); //Rotate cylindrically - tessellator.setBrightness(240); - tessellator.addVertexWithUV(-0.5d, 0, -0.5d, 0.0d, 0.0d); - tessellator.addVertexWithUV(0.5d, 0, -0.5d, 1.0d, 0.0d); - tessellator.addVertexWithUV(0.5d, 0, 0.5d, 1.0d, 1.0d); - tessellator.addVertexWithUV(-0.5d, 0, 0.5d, 0.0d, 1.0d); + wr.func_178963_b(240); + wr.addVertexWithUV(-0.5d, 0, -0.5d, 0.0d, 0.0d); + wr.addVertexWithUV(0.5d, 0, -0.5d, 1.0d, 0.0d); + wr.addVertexWithUV(0.5d, 0, 0.5d, 1.0d, 1.0d); + wr.addVertexWithUV(-0.5d, 0, 0.5d, 0.0d, 1.0d); tessellator.draw(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEffectBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEffectBlock.java index 555fb5f7..e1209166 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEffectBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEffectBlock.java @@ -1,19 +1,21 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEffectBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.client.FMLClientHandler; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEffectBlock; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock; + public class RenderSpellEffectBlock extends TileEntitySpecialRenderer { private ModelSpellEffectBlock modelSpellEffectBlock = new ModelSpellEffectBlock(); @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) { if (tileEntity instanceof TESpellEffectBlock) { @@ -21,7 +23,7 @@ public class RenderSpellEffectBlock extends TileEntitySpecialRenderer GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); ResourceLocation test; - int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); + int meta = tileEntity.getBlockMetadata(); String resource = tileSpellBlock.getResourceLocationForMeta(meta); test = new ResourceLocation(resource); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEnhancementBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEnhancementBlock.java index 2f2d0ff3..d07bf185 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEnhancementBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEnhancementBlock.java @@ -1,19 +1,21 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEnhancementBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.client.FMLClientHandler; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEnhancementBlock; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; + public class RenderSpellEnhancementBlock extends TileEntitySpecialRenderer { private ModelSpellEnhancementBlock modelSpellEnhancementBlock = new ModelSpellEnhancementBlock(); @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) { if (tileEntity instanceof TESpellEnhancementBlock) { @@ -21,7 +23,7 @@ public class RenderSpellEnhancementBlock extends TileEntitySpecialRenderer GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); ResourceLocation test; - int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); + int meta = tileEntity.getBlockMetadata(); String resource = tileSpellBlock.getResourceLocationForMeta(meta); test = new ResourceLocation(resource); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellModifierBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellModifierBlock.java index 0a972266..84264019 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellModifierBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellModifierBlock.java @@ -1,19 +1,21 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellModifierBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.client.FMLClientHandler; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellModifierBlock; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; + public class RenderSpellModifierBlock extends TileEntitySpecialRenderer { private ModelSpellModifierBlock modelSpellModifierBlock = new ModelSpellModifierBlock(); @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) { if (tileEntity instanceof TESpellModifierBlock) { @@ -21,7 +23,7 @@ public class RenderSpellModifierBlock extends TileEntitySpecialRenderer GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); ResourceLocation test; - int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); + int meta = tileEntity.getBlockMetadata(); String resource = tileSpellBlock.getResourceLocationForMeta(meta); test = new ResourceLocation(resource); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellParadigmBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellParadigmBlock.java index ca0f9336..df39cd1e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellParadigmBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellParadigmBlock.java @@ -1,19 +1,21 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellParadigmBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.client.FMLClientHandler; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellParadigmBlock; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; + public class RenderSpellParadigmBlock extends TileEntitySpecialRenderer { private ModelSpellParadigmBlock modelSpellParadigmBlock = new ModelSpellParadigmBlock(); @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) { if (tileEntity instanceof TESpellParadigmBlock) { @@ -21,7 +23,7 @@ public class RenderSpellParadigmBlock extends TileEntitySpecialRenderer GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); ResourceLocation test; - int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); + int meta = tileEntity.getBlockMetadata(); String resource = tileSpellBlock.getResourceLocationForMeta(meta); test = new ResourceLocation(resource); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEConduitItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEConduitItemRenderer.java index e0e4a79d..d22f9dbe 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEConduitItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEConduitItemRenderer.java @@ -1,17 +1,16 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; -import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.client.FMLClientHandler; import org.lwjgl.opengl.GL11; import WayofTime.alchemicalWizardry.common.renderer.model.ModelConduit; -import cpw.mods.fml.client.FMLClientHandler; +@SuppressWarnings("deprecation") public class TEConduitItemRenderer implements IItemRenderer { private ModelConduit modelConduit = new ModelConduit(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java index bd663b57..75a21e69 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java @@ -901,7 +901,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I sortList[1] = 0; } else { - sortList[0] = this.fluid.fluidID; + sortList[0] = this.fluid.getFluidID(); sortList[1] = this.fluid.amount; } @@ -911,7 +911,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I sortList[3] = 0; } else { - sortList[2] = this.fluidInput.fluidID; + sortList[2] = this.fluidInput.getFluidID(); sortList[3] = this.fluidInput.amount; } @@ -921,7 +921,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I sortList[5] = 0; } else { - sortList[4] = this.fluidOutput.fluidID; + sortList[4] = this.fluidOutput.getFluidID(); sortList[5] = this.fluidOutput.amount; } From 800bf06872a6831eb3472641cde3585d56124858 Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Wed, 29 Jul 2015 17:37:08 -0400 Subject: [PATCH 15/33] Finished the old TESR's of the custom rendered blocks, will transition to .jsons when convenient. --- .../block/RenderAlchemicCalcinator.java | 307 +++--------------- .../common/renderer/block/RenderPedestal.java | 70 +--- .../common/renderer/block/RenderPlinth.java | 79 +---- .../renderer/block/RenderWritingTable.java | 77 +---- .../renderer/block/TEAltarRenderer.java | 56 +--- 5 files changed, 85 insertions(+), 504 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java index 8ae26a81..8ab63111 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java @@ -1,22 +1,25 @@ package WayofTime.alchemicalWizardry.common.renderer.block; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.WorldRenderer; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.client.FMLClientHandler; + +import org.lwjgl.opengl.GL11; + import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import WayofTime.alchemicalWizardry.common.renderer.model.ModelAlchemicalCalcinator; import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; -import cpw.mods.fml.client.FMLClientHandler; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.util.ForgeDirection; -import org.lwjgl.opengl.GL11; public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer { @@ -27,15 +30,7 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer public RenderAlchemicCalcinator() { - customRenderItem = new RenderItem() - { - @Override - public boolean shouldBob() - { - return false; - } - }; - customRenderItem.setRenderManager(RenderManager.instance); + customRenderItem = Minecraft.getMinecraft().getRenderItem(); } @Override @@ -60,7 +55,7 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer if (tileAltar.getStackInSlot(1) != null) { float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(1)); - EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj()); + EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld()); ghostEntityItem.hoverStart = 0.0F; ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(1)); float displacement = 0.2F; @@ -79,7 +74,7 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer GL11.glRotatef(90f, 1.0f, 0.0f, 0.0F); } - customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0); + customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel } @@ -89,7 +84,7 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer if (tileAltar.getStackInSlot(0) != null) { float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0)); - EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj()); + EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld()); ghostEntityItem.hoverStart = 0.0F; ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0)); float displacement = -0.5F; @@ -108,13 +103,13 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer GL11.glRotatef(90f, 1.0f, 0.0f, 0.0F); } - customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0); + customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel } GL11.glPopMatrix(); - ReagentContainerInfo[] info = tileAltar.getContainerInfo(ForgeDirection.UNKNOWN); + ReagentContainerInfo[] info = tileAltar.getContainerInfo(EnumFacing.UP); if (info.length >= 1 && info[0] != null) { ReagentStack reagentStack = info[0].reagent; @@ -131,7 +126,7 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer private void renderTankContents(double x, double y, double z, int colourRed, int colourGreen, int colourBlue, int colourIntensity) { GL11.glPushMatrix(); - Tessellator tessellator = Tessellator.instance; + Tessellator tessellator = Tessellator.getInstance(); this.bindTexture(resourceLocation); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); @@ -142,10 +137,11 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer GL11.glDepthMask(false); - tessellator.startDrawingQuads(); - tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity); + WorldRenderer wr = tessellator.getWorldRenderer(); + wr.startDrawingQuads(); + wr.func_178961_b(colourRed, colourGreen, colourBlue, colourIntensity); //setCoulourRGBA GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5); - tessellator.setBrightness(240); + wr.func_178963_b(240); //setBrightness double x1 = -7d / 16d; double x2 = 7d / 16d; @@ -159,22 +155,22 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer double resy1 = 1.0d; double resy2 = 1.0d; - tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1); - tessellator.addVertexWithUV(x2, y1, z1, resx2, resy1); - tessellator.addVertexWithUV(x2, y2, z1, resx2, resy2); - tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2); - tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1); - tessellator.addVertexWithUV(x1, y1, z2, resx2, resy1); - tessellator.addVertexWithUV(x1, y2, z2, resx2, resy2); - tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2); - tessellator.addVertexWithUV(x1, y1, z2, resx1, resy1); - tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1); - tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2); - tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2); - tessellator.addVertexWithUV(x2, y1, z1, resx1, resy1); - tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1); - tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2); - tessellator.addVertexWithUV(x2, y2, z1, resx1, resy2); + wr.addVertexWithUV(x1, y1, z1, resx1, resy1); + wr.addVertexWithUV(x2, y1, z1, resx2, resy1); + wr.addVertexWithUV(x2, y2, z1, resx2, resy2); + wr.addVertexWithUV(x1, y2, z1, resx1, resy2); + wr.addVertexWithUV(x1, y1, z1, resx1, resy1); + wr.addVertexWithUV(x1, y1, z2, resx2, resy1); + wr.addVertexWithUV(x1, y2, z2, resx2, resy2); + wr.addVertexWithUV(x1, y2, z1, resx1, resy2); + wr.addVertexWithUV(x1, y1, z2, resx1, resy1); + wr.addVertexWithUV(x2, y1, z2, resx2, resy1); + wr.addVertexWithUV(x2, y2, z2, resx2, resy2); + wr.addVertexWithUV(x1, y2, z2, resx1, resy2); + wr.addVertexWithUV(x2, y1, z1, resx1, resy1); + wr.addVertexWithUV(x2, y1, z2, resx2, resy1); + wr.addVertexWithUV(x2, y2, z2, resx2, resy2); + wr.addVertexWithUV(x2, y2, z1, resx1, resy2); tessellator.draw(); GL11.glDepthMask(true); @@ -193,228 +189,13 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer { if (itemStack.getItem() instanceof ItemBlock) { - switch (customRenderItem.getMiniBlockCount(itemStack, (byte) 1)) - { - case 1: - return 0.90F * scaleFactor; - - case 2: - return 0.90F * scaleFactor; - - case 3: - return 0.90F * scaleFactor; - - case 4: - return 0.90F * scaleFactor; - - case 5: - return 0.80F * scaleFactor; - - default: - return 0.90F * scaleFactor; - } + return 0.90F * scaleFactor; } else { - switch (customRenderItem.getMiniItemCount(itemStack, (byte) 1)) - { - case 1: - return 0.65F * scaleFactor; - - case 2: - return 0.65F * scaleFactor; - - case 3: - return 0.65F * scaleFactor; - - case 4: - return 0.65F * scaleFactor; - - default: - return 0.65F * scaleFactor; - } + return 0.65F * scaleFactor; } } return scaleFactor; } - - private float getXDisplacementForSlot(int slot) - { - switch (slot) - { - case 0: - return 0.0f; - - case 1: - return -0.375f; - - case 2: - return -0.125f; - - case 3: - return 0.3125f; - - case 4: - return 0.3125f; - - case 5: - return -0.125f; - - default: - return 0.0f; - } - } - - private float getYDisplacementForSlot(int slot) - { - switch (slot) - { - case 0: - return 0.4f; - - case 1: - return -0.35f; - - case 6: - return 0.4f; - - default: - return -0.35f; - } - } - - private float getZDisplacementForSlot(int slot) - { - switch (slot) - { - case 0: - return 0.0f; - - case 1: - return 0.0f; - - case 2: - return 0.375f; - - case 3: - return 0.25f; - - case 4: - return -0.25f; - - case 5: - return -0.375f; - - default: - return 0.0f; - } - } - - private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection) - { - if (ghostItemStack != null) - { - if (ghostItemStack.getItem() instanceof ItemBlock) - { - switch (forgeDirection) - { - case DOWN: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 2.7F, (float) z + 0.5F); - return; - } - - case UP: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.25F, (float) z + 0.5F); - return; - } - - case NORTH: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.7F); - return; - } - - case SOUTH: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.3F); - return; - } - - case EAST: - { - GL11.glTranslatef((float) x + 0.3F, (float) y + 0.5F, (float) z + 0.5F); - return; - } - - case WEST: - { - GL11.glTranslatef((float) x + 0.70F, (float) y + 0.5F, (float) z + 0.5F); - return; - } - - case UNKNOWN: - { - return; - } - - default: - { - - } - } - } else - { - switch (forgeDirection) - { - case DOWN: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.6F, (float) z + 0.5F); - return; - } - - case UP: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.20F, (float) z + 0.5F); - return; - } - - case NORTH: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.7F); - return; - } - - case SOUTH: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.3F); - return; - } - - case EAST: - { - GL11.glTranslatef((float) x + 0.3F, (float) y + 0.4F, (float) z + 0.5F); - return; - } - - case WEST: - { - GL11.glTranslatef((float) x + 0.70F, (float) y + 0.4F, (float) z + 0.5F); - return; - } - - case UNKNOWN: - { - return; - } - - default: - { - - } - } - } - } - } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java index 7970b76e..452c5a44 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.renderer.block; +import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.client.FMLClientHandler; @@ -22,19 +23,11 @@ public class RenderPedestal extends TileEntitySpecialRenderer public RenderPedestal() { - customRenderItem = new RenderItem() - { - @Override - public boolean shouldBob() - { - return false; - } - }; - customRenderItem.setRenderManager(RenderManager.instance); + customRenderItem = Minecraft.getMinecraft().getRenderItem(); } @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) { if (tileEntity instanceof TEPedestal) { @@ -54,7 +47,7 @@ public class RenderPedestal extends TileEntitySpecialRenderer { float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0)); float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL); - EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj()); + EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld()); ghostEntityItem.hoverStart = 0.0F; ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0)); float displacement = 0.2F; @@ -68,7 +61,7 @@ public class RenderPedestal extends TileEntitySpecialRenderer } GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F); - customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0); + customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel } GL11.glPopMatrix(); @@ -93,52 +86,17 @@ public class RenderPedestal extends TileEntitySpecialRenderer { if (itemStack.getItem() instanceof ItemBlock) { - switch (customRenderItem.getMiniBlockCount(itemStack, (byte) 1)) - { - case 1: - return 0.90F; - - case 2: - return 0.90F; - - case 3: - return 0.90F; - - case 4: - return 0.90F; - - case 5: - return 0.80F; - - default: - return 0.90F; - } + return 0.9f; } else { - switch (customRenderItem.getMiniItemCount(itemStack, (byte) 1)) - { - case 1: - return 0.65F; - - case 2: - return 0.65F; - - case 3: - return 0.65F; - - case 4: - return 0.65F; - - default: - return 0.65F; - } + return 0.65f; } } return scaleFactor; } - private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection) + private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, EnumFacing forgeDirection) { if (ghostItemStack != null) { @@ -182,11 +140,6 @@ public class RenderPedestal extends TileEntitySpecialRenderer return; } - case UNKNOWN: - { - return; - } - default: { @@ -232,11 +185,6 @@ public class RenderPedestal extends TileEntitySpecialRenderer return; } - case UNKNOWN: - { - return; - } - default: { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java index a8a867e4..af26a435 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java @@ -1,19 +1,21 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelPlinth; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; -import cpw.mods.fml.client.FMLClientHandler; +import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.client.FMLClientHandler; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelPlinth; +import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; + public class RenderPlinth extends TileEntitySpecialRenderer { private ModelPlinth modelPlinth = new ModelPlinth(); @@ -21,19 +23,11 @@ public class RenderPlinth extends TileEntitySpecialRenderer public RenderPlinth() { - customRenderItem = new RenderItem() - { - @Override - public boolean shouldBob() - { - return false; - } - }; - customRenderItem.setRenderManager(RenderManager.instance); + customRenderItem = Minecraft.getMinecraft().getRenderItem(); } @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) { if (tileEntity instanceof TEPlinth) { @@ -52,7 +46,7 @@ public class RenderPlinth extends TileEntitySpecialRenderer if (tileAltar.getStackInSlot(0) != null) { float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0)); - EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj()); + EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld()); ghostEntityItem.hoverStart = 0.0F; ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0)); float displacement = 0.2F; @@ -71,7 +65,7 @@ public class RenderPlinth extends TileEntitySpecialRenderer GL11.glRotatef(90f, 1.0f, 0.0f, 0.0F); } - customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0); + customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel } GL11.glPopMatrix(); @@ -86,52 +80,17 @@ public class RenderPlinth extends TileEntitySpecialRenderer { if (itemStack.getItem() instanceof ItemBlock) { - switch (customRenderItem.getMiniBlockCount(itemStack, (byte) 1)) - { - case 1: - return 0.90F * scaleFactor / 2; - - case 2: - return 0.90F * scaleFactor / 2; - - case 3: - return 0.90F * scaleFactor / 2; - - case 4: - return 0.90F * scaleFactor / 2; - - case 5: - return 0.80F * scaleFactor / 2; - - default: - return 0.90F * scaleFactor / 2; - } + return 0.9f * scaleFactor; } else { - switch (customRenderItem.getMiniItemCount(itemStack, (byte) 1)) - { - case 1: - return 0.65F * scaleFactor; - - case 2: - return 0.65F * scaleFactor; - - case 3: - return 0.65F * scaleFactor; - - case 4: - return 0.65F * scaleFactor; - - default: - return 0.65F * scaleFactor; - } + return 0.65f * scaleFactor; } } return scaleFactor; } - private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection) + private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, EnumFacing forgeDirection) { if (ghostItemStack != null) { @@ -175,11 +134,6 @@ public class RenderPlinth extends TileEntitySpecialRenderer return; } - case UNKNOWN: - { - return; - } - default: { @@ -225,11 +179,6 @@ public class RenderPlinth extends TileEntitySpecialRenderer return; } - case UNKNOWN: - { - return; - } - default: { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java index c9f36674..32177778 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java @@ -1,21 +1,21 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.client.FMLClientHandler; import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; + public class RenderWritingTable extends TileEntitySpecialRenderer { private ModelWritingTable modelWritingTable = new ModelWritingTable(); @@ -23,19 +23,11 @@ public class RenderWritingTable extends TileEntitySpecialRenderer public RenderWritingTable() { - customRenderItem = new RenderItem() - { - @Override - public boolean shouldBob() - { - return false; - } - }; - customRenderItem.setRenderManager(RenderManager.instance); + customRenderItem = Minecraft.getMinecraft().getRenderItem(); } @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int a) { if (tileEntity instanceof TEWritingTable) { @@ -59,7 +51,7 @@ public class RenderWritingTable extends TileEntitySpecialRenderer { float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(i)); float rotationAngle = Minecraft.getMinecraft().gameSettings.fancyGraphics ? (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL) : 0; - EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj()); + EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld()); ghostEntityItem.hoverStart = 0.0F; ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(i)); float displacementX = getXDisplacementForSlot(i); @@ -75,7 +67,7 @@ public class RenderWritingTable extends TileEntitySpecialRenderer } GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F); - customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0); + customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel } GL11.glPopMatrix(); @@ -91,45 +83,10 @@ public class RenderWritingTable extends TileEntitySpecialRenderer { if (itemStack.getItem() instanceof ItemBlock) { - switch (customRenderItem.getMiniBlockCount(itemStack, (byte) 1)) - { - case 1: - return 0.90F * scaleFactor; - - case 2: - return 0.90F * scaleFactor; - - case 3: - return 0.90F * scaleFactor; - - case 4: - return 0.90F * scaleFactor; - - case 5: - return 0.80F * scaleFactor; - - default: - return 0.90F * scaleFactor; - } + return 0.9f * scaleFactor; } else { - switch (customRenderItem.getMiniItemCount(itemStack, (byte) 1)) - { - case 1: - return 0.65F * scaleFactor; - - case 2: - return 0.65F * scaleFactor; - - case 3: - return 0.65F * scaleFactor; - - case 4: - return 0.65F * scaleFactor; - - default: - return 0.65F * scaleFactor; - } + return 0.65F * scaleFactor; } } @@ -208,7 +165,7 @@ public class RenderWritingTable extends TileEntitySpecialRenderer } } - private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection) + private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, EnumFacing forgeDirection) { if (ghostItemStack != null) { @@ -252,11 +209,6 @@ public class RenderWritingTable extends TileEntitySpecialRenderer return; } - case UNKNOWN: - { - return; - } - default: { @@ -302,11 +254,6 @@ public class RenderWritingTable extends TileEntitySpecialRenderer return; } - case UNKNOWN: - { - return; - } - default: { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java index 2b836d86..cecd038d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java @@ -2,7 +2,6 @@ package WayofTime.alchemicalWizardry.common.renderer.block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemBlock; @@ -22,19 +21,11 @@ public class TEAltarRenderer extends TileEntitySpecialRenderer public TEAltarRenderer() { - customRenderItem = new RenderItem() - { - @Override - public boolean shouldBob() - { - return false; - } - }; - customRenderItem.setRenderManager(RenderManager.instance); + customRenderItem = Minecraft.getMinecraft().getRenderItem(); } @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) { modelBloodAltar.renderBloodAltar((TEAltar) tileEntity, d0, d1, d2); modelBloodAltar.renderBloodLevel((TEAltar) tileEntity, d0, d1, d2); @@ -48,7 +39,7 @@ public class TEAltarRenderer extends TileEntitySpecialRenderer { float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0)); float rotationAngle = Minecraft.getMinecraft().gameSettings.fancyGraphics ? (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL) : 0; - EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj()); + EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld()); ghostEntityItem.hoverStart = 0.0F; ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0)); float displacement = 0.2F; @@ -62,7 +53,7 @@ public class TEAltarRenderer extends TileEntitySpecialRenderer } GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F); - customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0); + customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel } GL11.glPopMatrix(); @@ -77,45 +68,10 @@ public class TEAltarRenderer extends TileEntitySpecialRenderer { if (itemStack.getItem() instanceof ItemBlock) { - switch (customRenderItem.getMiniBlockCount(itemStack, (byte) 1)) - { - case 1: - return 0.90F; - - case 2: - return 0.90F; - - case 3: - return 0.90F; - - case 4: - return 0.90F; - - case 5: - return 0.80F; - - default: - return 0.90F; - } + return 0.9f; } else { - switch (customRenderItem.getMiniItemCount(itemStack, (byte) 1)) - { - case 1: - return 0.65F; - - case 2: - return 0.65F; - - case 3: - return 0.65F; - - case 4: - return 0.65F; - - default: - return 0.65F; - } + return 0.65f; } } From 94b74fe309369bc95c98a5db42517fac1772fb63 Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Wed, 29 Jul 2015 18:15:25 -0400 Subject: [PATCH 16/33] Randoms. --- .../common/block/BlockEnchantmentGlyph.java | 9 +- .../common/block/BlockStabilityGlyph.java | 5 +- .../items/thaumcraft/ItemSanguineArmour.java | 384 +++++++++--------- 3 files changed, 200 insertions(+), 198 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEnchantmentGlyph.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEnchantmentGlyph.java index bc61a6a8..2eee791d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEnchantmentGlyph.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEnchantmentGlyph.java @@ -8,10 +8,11 @@ import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.omega.IEnchantmentGlyph; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import WayofTime.alchemicalWizardry.common.omega.IEnchantmentGlyph; public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph { @@ -23,7 +24,7 @@ public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph } @Override - public int getAdditionalStabilityForFaceCount(World world, int x, int y, int z, int meta, int faceCount) + public int getAdditionalStabilityForFaceCount(World world, BlockPos pos, int meta, int faceCount) { switch(meta) { @@ -37,7 +38,7 @@ public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph } @Override - public int getEnchantability(World world, int x, int y, int z, int meta) + public int getEnchantability(World world, BlockPos pos, int meta) { switch(meta) { @@ -49,7 +50,7 @@ public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph } @Override - public int getEnchantmentLevel(World world, int x, int y, int z, int meta) + public int getEnchantmentLevel(World world, BlockPos pos, int meta) { switch(meta) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockStabilityGlyph.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockStabilityGlyph.java index 5884f4a8..55be5fde 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockStabilityGlyph.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockStabilityGlyph.java @@ -7,10 +7,11 @@ import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.omega.IStabilityGlyph; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import WayofTime.alchemicalWizardry.common.omega.IStabilityGlyph; public class BlockStabilityGlyph extends Block implements IStabilityGlyph { @@ -22,7 +23,7 @@ public class BlockStabilityGlyph extends Block implements IStabilityGlyph } @Override - public int getAdditionalStabilityForFaceCount(World world, int x, int y, int z, int meta, int faceCount) + public int getAdditionalStabilityForFaceCount(World world, BlockPos pos, int meta, int faceCount) { switch(meta) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/thaumcraft/ItemSanguineArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/thaumcraft/ItemSanguineArmour.java index 997740d9..f044912d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/thaumcraft/ItemSanguineArmour.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/thaumcraft/ItemSanguineArmour.java @@ -1,192 +1,192 @@ -package WayofTime.alchemicalWizardry.common.items.thaumcraft; - -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import thaumcraft.api.IGoggles; -import thaumcraft.api.IRepairable; -import thaumcraft.api.IRunicArmor; -import thaumcraft.api.IVisDiscountGear; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.nodes.IRevealer; - -import java.util.List; - -public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGoggles, IVisDiscountGear, IRevealer, IRunicArmor, IRepairable -{ - @SideOnly(Side.CLIENT) - private IIcon helmetIcon; - @SideOnly(Side.CLIENT) - private IIcon plateIcon; - @SideOnly(Side.CLIENT) - private IIcon leggingsIcon; - @SideOnly(Side.CLIENT) - private IIcon bootsIcon; - - public ItemSanguineArmour(int armorType) - { - super(AlchemicalWizardry.sanguineArmourArmourMaterial, 0, armorType); - setMaxDamage(1000); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); - this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineHelmet"); - this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguinePlate"); - this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineLeggings"); - this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineBoots"); - } - - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) - { - if (this.equals(ModItems.sanguineHelmet)) - { - return this.helmetIcon; - } - - if (this.equals(ModItems.sanguineRobe)) - { - return this.plateIcon; - } - - if (this.equals(ModItems.sanguinePants)) - { - return this.leggingsIcon; - } - - if (this.equals(ModItems.sanguineBoots)) - { - return this.bootsIcon; - } - - return this.itemIcon; - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) - { - if (this == ModItems.sanguineHelmet) - { - return "alchemicalwizardry:models/armor/sanguineArmour_layer_1.png"; - } - - if (this == ModItems.sanguineRobe || this == ModItems.sanguineBoots) - { - return "alchemicalwizardry:models/armor/sanguineArmour_layer_1.png"; - } - - if (this == ModItems.sanguinePants) - { - return "alchemicalwizardry:models/armor/sanguineArmour_layer_2.png"; - } else - { - return null; - } - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - int discount = 0; - - switch (this.armorType) - { - case 0: - discount = 6; - break; - case 1: - discount = 3; - break; - case 2: - discount = 3; - break; - case 3: - discount = 2; - break; - } - - switch (this.armorType) - { - case 0: - par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc1")); - break; - case 1: - - case 2: - - case 3: - par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc2")); - } - - par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.visdisc") + " " + discount + "%"); - } - - @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) - { - return; - } - - @Override - public boolean isUpgrade() - { - return true; - } - - @Override - public int getEnergyForTenSeconds() - { - return 0; - } - - @Override - public boolean showNodes(ItemStack itemstack, EntityLivingBase player) - { - return true; - } - - @Override - public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) - { - switch (this.armorType) - { - case 0: - return 7; - case 1: - return 3; - case 2: - return 2; - case 3: - return 2; - } - return 0; - } - - @Override - public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) - { - return true; - } - - @Override - public int getRunicCharge(ItemStack itemstack) - { - return 0; - } -} \ No newline at end of file +//package WayofTime.alchemicalWizardry.common.items.thaumcraft; +// +//import WayofTime.alchemicalWizardry.AlchemicalWizardry; +//import WayofTime.alchemicalWizardry.ModItems; +//import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +//import cpw.mods.fml.relauncher.Side; +//import cpw.mods.fml.relauncher.SideOnly; +//import net.minecraft.client.renderer.texture.IIconRegister; +//import net.minecraft.entity.Entity; +//import net.minecraft.entity.EntityLivingBase; +//import net.minecraft.entity.player.EntityPlayer; +//import net.minecraft.item.ItemArmor; +//import net.minecraft.item.ItemStack; +//import net.minecraft.util.IIcon; +//import net.minecraft.util.StatCollector; +//import net.minecraft.world.World; +//import thaumcraft.api.IGoggles; +//import thaumcraft.api.IRepairable; +//import thaumcraft.api.IRunicArmor; +//import thaumcraft.api.IVisDiscountGear; +//import thaumcraft.api.aspects.Aspect; +//import thaumcraft.api.nodes.IRevealer; +// +//import java.util.List; +// +//public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGoggles, IVisDiscountGear, IRevealer, IRunicArmor, IRepairable +//{ +// @SideOnly(Side.CLIENT) +// private IIcon helmetIcon; +// @SideOnly(Side.CLIENT) +// private IIcon plateIcon; +// @SideOnly(Side.CLIENT) +// private IIcon leggingsIcon; +// @SideOnly(Side.CLIENT) +// private IIcon bootsIcon; +// +// public ItemSanguineArmour(int armorType) +// { +// super(AlchemicalWizardry.sanguineArmourArmourMaterial, 0, armorType); +// setMaxDamage(1000); +// setCreativeTab(AlchemicalWizardry.tabBloodMagic); +// } +// +// @Override +// @SideOnly(Side.CLIENT) +// public void registerIcons(IIconRegister iconRegister) +// { +// this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); +// this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineHelmet"); +// this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguinePlate"); +// this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineLeggings"); +// this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineBoots"); +// } +// +// @SideOnly(Side.CLIENT) +// public IIcon getIconFromDamage(int par1) +// { +// if (this.equals(ModItems.sanguineHelmet)) +// { +// return this.helmetIcon; +// } +// +// if (this.equals(ModItems.sanguineRobe)) +// { +// return this.plateIcon; +// } +// +// if (this.equals(ModItems.sanguinePants)) +// { +// return this.leggingsIcon; +// } +// +// if (this.equals(ModItems.sanguineBoots)) +// { +// return this.bootsIcon; +// } +// +// return this.itemIcon; +// } +// +// @Override +// public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) +// { +// if (this == ModItems.sanguineHelmet) +// { +// return "alchemicalwizardry:models/armor/sanguineArmour_layer_1.png"; +// } +// +// if (this == ModItems.sanguineRobe || this == ModItems.sanguineBoots) +// { +// return "alchemicalwizardry:models/armor/sanguineArmour_layer_1.png"; +// } +// +// if (this == ModItems.sanguinePants) +// { +// return "alchemicalwizardry:models/armor/sanguineArmour_layer_2.png"; +// } else +// { +// return null; +// } +// } +// +// @Override +// public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) +// { +// int discount = 0; +// +// switch (this.armorType) +// { +// case 0: +// discount = 6; +// break; +// case 1: +// discount = 3; +// break; +// case 2: +// discount = 3; +// break; +// case 3: +// discount = 2; +// break; +// } +// +// switch (this.armorType) +// { +// case 0: +// par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc1")); +// break; +// case 1: +// +// case 2: +// +// case 3: +// par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc2")); +// } +// +// par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.visdisc") + " " + discount + "%"); +// } +// +// @Override +// public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) +// { +// return; +// } +// +// @Override +// public boolean isUpgrade() +// { +// return true; +// } +// +// @Override +// public int getEnergyForTenSeconds() +// { +// return 0; +// } +// +// @Override +// public boolean showNodes(ItemStack itemstack, EntityLivingBase player) +// { +// return true; +// } +// +// @Override +// public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) +// { +// switch (this.armorType) +// { +// case 0: +// return 7; +// case 1: +// return 3; +// case 2: +// return 2; +// case 3: +// return 2; +// } +// return 0; +// } +// +// @Override +// public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) +// { +// return true; +// } +// +// @Override +// public int getRunicCharge(ItemStack itemstack) +// { +// return 0; +// } +//} \ No newline at end of file From b406b581a0966fb0f24b19eca872311563200dc0 Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Wed, 29 Jul 2015 18:17:50 -0400 Subject: [PATCH 17/33] Temporarily removed Pam harvest handlers. --- .../common/guide/RecipeHolder.java | 4 +- ...GenericPamSeedlessFruitHarvestHandler.java | 138 ++++----- .../harvest/GenericSeededHarvestHandler.java | 276 +++++++++--------- .../harvest/PamHarvestCompatRegistry.java | 250 ++++++++-------- 4 files changed, 334 insertions(+), 334 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/guide/RecipeHolder.java b/src/main/java/WayofTime/alchemicalWizardry/common/guide/RecipeHolder.java index 8bbbaba9..10003173 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/guide/RecipeHolder.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/guide/RecipeHolder.java @@ -155,7 +155,7 @@ public class RecipeHolder arcanePlinthRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockPlinth)); arcanePedestalRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockPedestal)); - spellTableRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockHomHeart)); + spellTableRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockSpellTable)); alchemySetRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockWritingTable)); crucibleRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockCrucible)); @@ -168,7 +168,7 @@ public class RecipeHolder routerRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemAttunedCrystal)); segmenterRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemTankSegmenter)); cleanserRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemDestinationClearer)); - calcinatorRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockAlchemicCalcinator)); + calcinatorRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockAlchemicalCalcinator)); belljarRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockCrystalBelljar)); relayRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockReagentConduit)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericPamSeedlessFruitHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericPamSeedlessFruitHarvestHandler.java index ee11737b..581c6ada 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericPamSeedlessFruitHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericPamSeedlessFruitHarvestHandler.java @@ -1,69 +1,69 @@ -package WayofTime.alchemicalWizardry.common.harvest; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.item.Item; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; -import cpw.mods.fml.common.registry.GameRegistry; - -public class GenericPamSeedlessFruitHarvestHandler implements IHarvestHandler -{ - public Block harvestBlock; - public int harvestMeta; - public int resetMeta; - - public GenericPamSeedlessFruitHarvestHandler(String block, int harvestMeta, int resetMeta) - { - this.harvestBlock = getBlockForString(block); - this.harvestMeta = harvestMeta; - this.resetMeta = resetMeta; - } - - public boolean isHarvesterValid() - { - return harvestBlock != null; - } - - public static Block getBlockForString(String str) - { - String[] parts = str.split(":"); - String modId = parts[0]; - String name = parts[1]; - return GameRegistry.findBlock(modId, name); - } - - public static Item getItemForString(String str) - { - String[] parts = str.split(":"); - String modId = parts[0]; - String name = parts[1]; - return GameRegistry.findItem(modId, name); - } - - public boolean canHandleBlock(Block block) - { - return block == harvestBlock; - } - - public int getHarvestMeta() - { - return harvestMeta; - } - - @Override - public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) - { - if (!this.canHandleBlock(block) || block.getMetaFromState(state) != this.getHarvestMeta()) - { - return false; - } - - world.destroyBlock(pos, true); - - world.setBlockState(pos, harvestBlock.getStateFromMeta(resetMeta), 3); - - return true; - } -} +//package WayofTime.alchemicalWizardry.common.harvest; +// +//import net.minecraft.block.Block; +//import net.minecraft.block.state.IBlockState; +//import net.minecraft.item.Item; +//import net.minecraft.util.BlockPos; +//import net.minecraft.world.World; +//import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; +//import cpw.mods.fml.common.registry.GameRegistry; +// +//public class GenericPamSeedlessFruitHarvestHandler implements IHarvestHandler +//{ +// public Block harvestBlock; +// public int harvestMeta; +// public int resetMeta; +// +// public GenericPamSeedlessFruitHarvestHandler(String block, int harvestMeta, int resetMeta) +// { +// this.harvestBlock = getBlockForString(block); +// this.harvestMeta = harvestMeta; +// this.resetMeta = resetMeta; +// } +// +// public boolean isHarvesterValid() +// { +// return harvestBlock != null; +// } +// +// public static Block getBlockForString(String str) +// { +// String[] parts = str.split(":"); +// String modId = parts[0]; +// String name = parts[1]; +// return GameRegistry.findBlock(modId, name); +// } +// +// public static Item getItemForString(String str) +// { +// String[] parts = str.split(":"); +// String modId = parts[0]; +// String name = parts[1]; +// return GameRegistry.findItem(modId, name); +// } +// +// public boolean canHandleBlock(Block block) +// { +// return block == harvestBlock; +// } +// +// public int getHarvestMeta() +// { +// return harvestMeta; +// } +// +// @Override +// public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) +// { +// if (!this.canHandleBlock(block) || block.getMetaFromState(state) != this.getHarvestMeta()) +// { +// return false; +// } +// +// world.destroyBlock(pos, true); +// +// world.setBlockState(pos, harvestBlock.getStateFromMeta(resetMeta), 3); +// +// return true; +// } +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericSeededHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericSeededHarvestHandler.java index ae8d7d8e..ff07bdf0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericSeededHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericSeededHarvestHandler.java @@ -1,138 +1,138 @@ -package WayofTime.alchemicalWizardry.common.harvest; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.IPlantable; -import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; -import cpw.mods.fml.common.registry.GameRegistry; - -public class GenericSeededHarvestHandler implements IHarvestHandler -{ - public Block harvestBlock; - public int harvestMeta; - public IPlantable harvestSeed; - - public GenericSeededHarvestHandler(String block, int meta, String seed) - { - harvestBlock = getBlockForString(block); - harvestMeta = meta; - Item testSeed = getItemForString(seed); - if (testSeed instanceof IPlantable) - { - harvestSeed = (IPlantable) testSeed; - } else - { - harvestSeed = null; - } - } - - public boolean isHarvesterValid() - { - return harvestBlock != null && harvestSeed != null; - } - - public static Block getBlockForString(String str) - { - String[] parts = str.split(":"); - String modId = parts[0]; - String name = parts[1]; - return GameRegistry.findBlock(modId, name); - } - - public static Item getItemForString(String str) - { - String[] parts = str.split(":"); - String modId = parts[0]; - String name = parts[1]; - return GameRegistry.findItem(modId, name); - } - - public boolean canHandleBlock(Block block) - { - return block == harvestBlock; - } - - public int getHarvestMeta() - { - return harvestMeta; - } - - @Override - public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) - { - if (!this.canHandleBlock(block) || block.getMetaFromState(state) != this.getHarvestMeta()) - { - return false; - } - - IPlantable seed = this.getSeedItem(block); - - if (seed == null) - { - world.destroyBlock(pos, true); - - return true; - } else - { - int fortune = 0; - - List<ItemStack> list = block.getDrops(world, pos, state, fortune); - boolean foundAndRemovedSeed = false; - - for (ItemStack stack : list) - { - if (stack == null) - { - continue; - } - - Item item = stack.getItem(); - if (item == seed) - { - int itemSize = stack.stackSize; - if (itemSize > 1) - { - stack.stackSize--; - foundAndRemovedSeed = true; - break; - } else if (itemSize == 1) - { - list.remove(stack); - foundAndRemovedSeed = true; - break; - } - } - } - - if (foundAndRemovedSeed) - { - IBlockState plantState = seed.getPlant(world, pos); - - world.destroyBlock(pos, false); - - world.setBlockState(pos, plantState, 3); - - for (ItemStack stack : list) - { - EntityItem itemEnt = new EntityItem(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, stack); - - world.spawnEntityInWorld(itemEnt); - } - } - - return false; - } - } - - public IPlantable getSeedItem(Block block) - { - return harvestSeed; - } -} +//package WayofTime.alchemicalWizardry.common.harvest; +// +//import java.util.List; +// +//import net.minecraft.block.Block; +//import net.minecraft.block.state.IBlockState; +//import net.minecraft.entity.item.EntityItem; +//import net.minecraft.item.Item; +//import net.minecraft.item.ItemStack; +//import net.minecraft.util.BlockPos; +//import net.minecraft.world.World; +//import net.minecraftforge.common.IPlantable; +//import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; +//import cpw.mods.fml.common.registry.GameRegistry; +// +//public class GenericSeededHarvestHandler implements IHarvestHandler +//{ +// public Block harvestBlock; +// public int harvestMeta; +// public IPlantable harvestSeed; +// +// public GenericSeededHarvestHandler(String block, int meta, String seed) +// { +// harvestBlock = getBlockForString(block); +// harvestMeta = meta; +// Item testSeed = getItemForString(seed); +// if (testSeed instanceof IPlantable) +// { +// harvestSeed = (IPlantable) testSeed; +// } else +// { +// harvestSeed = null; +// } +// } +// +// public boolean isHarvesterValid() +// { +// return harvestBlock != null && harvestSeed != null; +// } +// +// public static Block getBlockForString(String str) +// { +// String[] parts = str.split(":"); +// String modId = parts[0]; +// String name = parts[1]; +// return GameRegistry.findBlock(modId, name); +// } +// +// public static Item getItemForString(String str) +// { +// String[] parts = str.split(":"); +// String modId = parts[0]; +// String name = parts[1]; +// return GameRegistry.findItem(modId, name); +// } +// +// public boolean canHandleBlock(Block block) +// { +// return block == harvestBlock; +// } +// +// public int getHarvestMeta() +// { +// return harvestMeta; +// } +// +// @Override +// public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) +// { +// if (!this.canHandleBlock(block) || block.getMetaFromState(state) != this.getHarvestMeta()) +// { +// return false; +// } +// +// IPlantable seed = this.getSeedItem(block); +// +// if (seed == null) +// { +// world.destroyBlock(pos, true); +// +// return true; +// } else +// { +// int fortune = 0; +// +// List<ItemStack> list = block.getDrops(world, pos, state, fortune); +// boolean foundAndRemovedSeed = false; +// +// for (ItemStack stack : list) +// { +// if (stack == null) +// { +// continue; +// } +// +// Item item = stack.getItem(); +// if (item == seed) +// { +// int itemSize = stack.stackSize; +// if (itemSize > 1) +// { +// stack.stackSize--; +// foundAndRemovedSeed = true; +// break; +// } else if (itemSize == 1) +// { +// list.remove(stack); +// foundAndRemovedSeed = true; +// break; +// } +// } +// } +// +// if (foundAndRemovedSeed) +// { +// IBlockState plantState = seed.getPlant(world, pos); +// +// world.destroyBlock(pos, false); +// +// world.setBlockState(pos, plantState, 3); +// +// for (ItemStack stack : list) +// { +// EntityItem itemEnt = new EntityItem(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, stack); +// +// world.spawnEntityInWorld(itemEnt); +// } +// } +// +// return false; +// } +// } +// +// public IPlantable getSeedItem(Block block) +// { +// return harvestSeed; +// } +//} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/PamHarvestCompatRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/PamHarvestCompatRegistry.java index 30b4df24..d9b9244f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/PamHarvestCompatRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/PamHarvestCompatRegistry.java @@ -1,125 +1,125 @@ -package WayofTime.alchemicalWizardry.common.harvest; - -import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; - -public class PamHarvestCompatRegistry -{ - public static void registerPamHandlers() - { - registerSeededHandler("blackberry", 7); - registerSeededHandler("blueberry", 7); - registerSeededHandler("candleberry", 7); - registerSeededHandler("raspberry", 7); - registerSeededHandler("strawberry", 7); - registerSeededHandler("cactusfruit", 7); - registerSeededHandler("asparagus", 7); - registerSeededHandler("barley", 7); - registerSeededHandler("oats", 7); - registerSeededHandler("rye", 7); - registerSeededHandler("corn", 7); - registerSeededHandler("bambooshoot", 7); - registerSeededHandler("cantaloupe", 7); - registerSeededHandler("cucumber", 7); - registerSeededHandler("windersquash", 7); - registerSeededHandler("zucchini", 7); - registerSeededHandler("beat", 7); - registerSeededHandler("onion", 7); - registerSeededHandler("parsnip", 7); - registerSeededHandler("peanut", 7); - registerSeededHandler("radish", 7); - registerSeededHandler("rutabaga", 7); - registerSeededHandler("sweetpotato", 7); - registerSeededHandler("turnip", 7); - registerSeededHandler("rhubarb", 7); - registerSeededHandler("celery", 7); - registerSeededHandler("garlic", 7); - registerSeededHandler("ginger", 7); - registerSeededHandler("spiceleaf", 7); - registerSeededHandler("tealeaf", 7); - registerSeededHandler("coffeebean", 7); - registerSeededHandler("mustardseeds", 7); - registerSeededHandler("brocolli", 7); - registerSeededHandler("cauliflower", 7); - registerSeededHandler("leek", 7); - registerSeededHandler("lettuce", 7); - registerSeededHandler("scallion", 7); - registerSeededHandler("artichoke", 7); - registerSeededHandler("brusselsprout", 7); - registerSeededHandler("cabbage", 7); - registerSeededHandler("whitemushroom", 7); - registerSeededHandler("bean", 7); - registerSeededHandler("soybean", 7); - registerSeededHandler("bellpepper", 7); - registerSeededHandler("chili", 7); - registerSeededHandler("eggplant", 7); - registerSeededHandler("pamokra", 7); - registerSeededHandler("peas", 7); - registerSeededHandler("tomato", 7); - registerSeededHandler("cotton", 7); - registerSeededHandler("pineapple", 7); - registerSeededHandler("grape", 7); - registerSeededHandler("kiwi", 7); - registerSeededHandler("cranberry", 7); - registerSeededHandler("rice", 7); - registerSeededHandler("seaweed", 7); - - registerFruitHandler("apple", 7, 0); - registerFruitHandler("Almond", 7, 0); - registerFruitHandler("Apricot", 7, 0); - registerFruitHandler("Avocado", 7, 0); - registerFruitHandler("Banana", 7, 0); - registerFruitHandler("Cashew", 7, 0); - registerFruitHandler("Cherry", 7, 0); - registerFruitHandler("Chestnut", 7, 0); - registerFruitHandler("Cinnamon", 7, 0); - registerFruitHandler("Coconut", 7, 0); - registerFruitHandler("Date", 7, 0); - registerFruitHandler("Dragonfruit", 7, 0); - registerFruitHandler("Durian", 7, 0); - registerFruitHandler("Fig", 7, 0); - registerFruitHandler("Grapefruit", 7, 0); - registerFruitHandler("Lemon", 7, 0); - registerFruitHandler("Lime", 7, 0); - registerFruitHandler("Maple", 7, 0); - registerFruitHandler("Mango", 7, 0); - registerFruitHandler("Nutmeg", 7, 0); - registerFruitHandler("Olive", 7, 0); - registerFruitHandler("Orange", 7, 0); - registerFruitHandler("Papaya", 7, 0); - registerFruitHandler("Paperbark", 7, 0); - registerFruitHandler("Peach", 7, 0); - registerFruitHandler("Pear", 7, 0); - registerFruitHandler("Pecan", 7, 0); - registerFruitHandler("Peppercorn", 7, 0); - registerFruitHandler("Persimmon", 7, 0); - registerFruitHandler("Pistachio", 7, 0); - registerFruitHandler("Plum", 7, 0); - registerFruitHandler("Pomegranate", 7, 0); - registerFruitHandler("Starfruit", 7, 0); - registerFruitHandler("Vanillabean", 7, 0); - registerFruitHandler("Walnut", 7, 0); - } - - public static void registerSeededHandler(String name, int meta) - { - String block = "harvestcraft:pam" + name + "Crop"; - String seed = "harvestcraft:" + name + "Item"; - - GenericSeededHarvestHandler handler = new GenericSeededHarvestHandler(block, meta, seed); - if (handler.isHarvesterValid()) - { - HarvestRegistry.registerHarvestHandler(handler); - } - } - - public static void registerFruitHandler(String name, int harvestMeta, int resetMeta) - { - String block = "harvestcraft:pam" + name; - - GenericPamSeedlessFruitHarvestHandler handler = new GenericPamSeedlessFruitHarvestHandler(block, harvestMeta, resetMeta); - if (handler.isHarvesterValid()) - { - HarvestRegistry.registerHarvestHandler(handler); - } - } -} +//package WayofTime.alchemicalWizardry.common.harvest; +// +//import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; +// +//public class PamHarvestCompatRegistry +//{ +// public static void registerPamHandlers() +// { +// registerSeededHandler("blackberry", 7); +// registerSeededHandler("blueberry", 7); +// registerSeededHandler("candleberry", 7); +// registerSeededHandler("raspberry", 7); +// registerSeededHandler("strawberry", 7); +// registerSeededHandler("cactusfruit", 7); +// registerSeededHandler("asparagus", 7); +// registerSeededHandler("barley", 7); +// registerSeededHandler("oats", 7); +// registerSeededHandler("rye", 7); +// registerSeededHandler("corn", 7); +// registerSeededHandler("bambooshoot", 7); +// registerSeededHandler("cantaloupe", 7); +// registerSeededHandler("cucumber", 7); +// registerSeededHandler("windersquash", 7); +// registerSeededHandler("zucchini", 7); +// registerSeededHandler("beat", 7); +// registerSeededHandler("onion", 7); +// registerSeededHandler("parsnip", 7); +// registerSeededHandler("peanut", 7); +// registerSeededHandler("radish", 7); +// registerSeededHandler("rutabaga", 7); +// registerSeededHandler("sweetpotato", 7); +// registerSeededHandler("turnip", 7); +// registerSeededHandler("rhubarb", 7); +// registerSeededHandler("celery", 7); +// registerSeededHandler("garlic", 7); +// registerSeededHandler("ginger", 7); +// registerSeededHandler("spiceleaf", 7); +// registerSeededHandler("tealeaf", 7); +// registerSeededHandler("coffeebean", 7); +// registerSeededHandler("mustardseeds", 7); +// registerSeededHandler("brocolli", 7); +// registerSeededHandler("cauliflower", 7); +// registerSeededHandler("leek", 7); +// registerSeededHandler("lettuce", 7); +// registerSeededHandler("scallion", 7); +// registerSeededHandler("artichoke", 7); +// registerSeededHandler("brusselsprout", 7); +// registerSeededHandler("cabbage", 7); +// registerSeededHandler("whitemushroom", 7); +// registerSeededHandler("bean", 7); +// registerSeededHandler("soybean", 7); +// registerSeededHandler("bellpepper", 7); +// registerSeededHandler("chili", 7); +// registerSeededHandler("eggplant", 7); +// registerSeededHandler("pamokra", 7); +// registerSeededHandler("peas", 7); +// registerSeededHandler("tomato", 7); +// registerSeededHandler("cotton", 7); +// registerSeededHandler("pineapple", 7); +// registerSeededHandler("grape", 7); +// registerSeededHandler("kiwi", 7); +// registerSeededHandler("cranberry", 7); +// registerSeededHandler("rice", 7); +// registerSeededHandler("seaweed", 7); +// +// registerFruitHandler("apple", 7, 0); +// registerFruitHandler("Almond", 7, 0); +// registerFruitHandler("Apricot", 7, 0); +// registerFruitHandler("Avocado", 7, 0); +// registerFruitHandler("Banana", 7, 0); +// registerFruitHandler("Cashew", 7, 0); +// registerFruitHandler("Cherry", 7, 0); +// registerFruitHandler("Chestnut", 7, 0); +// registerFruitHandler("Cinnamon", 7, 0); +// registerFruitHandler("Coconut", 7, 0); +// registerFruitHandler("Date", 7, 0); +// registerFruitHandler("Dragonfruit", 7, 0); +// registerFruitHandler("Durian", 7, 0); +// registerFruitHandler("Fig", 7, 0); +// registerFruitHandler("Grapefruit", 7, 0); +// registerFruitHandler("Lemon", 7, 0); +// registerFruitHandler("Lime", 7, 0); +// registerFruitHandler("Maple", 7, 0); +// registerFruitHandler("Mango", 7, 0); +// registerFruitHandler("Nutmeg", 7, 0); +// registerFruitHandler("Olive", 7, 0); +// registerFruitHandler("Orange", 7, 0); +// registerFruitHandler("Papaya", 7, 0); +// registerFruitHandler("Paperbark", 7, 0); +// registerFruitHandler("Peach", 7, 0); +// registerFruitHandler("Pear", 7, 0); +// registerFruitHandler("Pecan", 7, 0); +// registerFruitHandler("Peppercorn", 7, 0); +// registerFruitHandler("Persimmon", 7, 0); +// registerFruitHandler("Pistachio", 7, 0); +// registerFruitHandler("Plum", 7, 0); +// registerFruitHandler("Pomegranate", 7, 0); +// registerFruitHandler("Starfruit", 7, 0); +// registerFruitHandler("Vanillabean", 7, 0); +// registerFruitHandler("Walnut", 7, 0); +// } +// +// public static void registerSeededHandler(String name, int meta) +// { +// String block = "harvestcraft:pam" + name + "Crop"; +// String seed = "harvestcraft:" + name + "Item"; +// +// GenericSeededHarvestHandler handler = new GenericSeededHarvestHandler(block, meta, seed); +// if (handler.isHarvesterValid()) +// { +// HarvestRegistry.registerHarvestHandler(handler); +// } +// } +// +// public static void registerFruitHandler(String name, int harvestMeta, int resetMeta) +// { +// String block = "harvestcraft:pam" + name; +// +// GenericPamSeedlessFruitHarvestHandler handler = new GenericPamSeedlessFruitHarvestHandler(block, harvestMeta, resetMeta); +// if (handler.isHarvesterValid()) +// { +// HarvestRegistry.registerHarvestHandler(handler); +// } +// } +//} From b14f2898e81a5108244ddeb43446bce961aac9d9 Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Wed, 29 Jul 2015 18:34:15 -0400 Subject: [PATCH 18/33] Fixed Block item renderers --- .../TEAlchemicalCalcinatorItemRenderer.java | 15 ++--- .../block/itemRender/TEAltarItemRenderer.java | 17 ++--- .../itemRender/TEBellJarItemRenderer.java | 63 ++++++++++--------- .../itemRender/TEConduitItemRenderer.java | 13 ++-- .../TESpellEffectBlockItemRenderer.java | 17 +++-- .../TESpellEnhancementBlockItemRenderer.java | 17 +++-- .../TESpellModifierBlockItemRenderer.java | 17 +++-- .../TESpellParadigmBlockItemRenderer.java | 17 +++-- .../TEWritingTableItemRenderer.java | 6 +- 9 files changed, 90 insertions(+), 92 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAlchemicalCalcinatorItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAlchemicalCalcinatorItemRenderer.java index 22c6c645..48ec3a48 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAlchemicalCalcinatorItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAlchemicalCalcinatorItemRenderer.java @@ -1,21 +1,19 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.fml.client.FMLClientHandler; import org.lwjgl.opengl.GL11; import WayofTime.alchemicalWizardry.common.renderer.model.ModelAlchemicalCalcinator; -import cpw.mods.fml.client.FMLClientHandler; public class TEAlchemicalCalcinatorItemRenderer implements IItemRenderer { private ModelAlchemicalCalcinator modelConduit = new ModelAlchemicalCalcinator(); - private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) + private void renderConduitItem(ItemStack item, float translateX, float translateY, float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef(translateX + 0.5F, translateY + 1.5F, translateZ + 0.5F); @@ -28,7 +26,6 @@ public class TEAlchemicalCalcinatorItemRenderer implements IItemRenderer GL11.glPopMatrix(); } - /** * IItemRenderer implementation * */ @@ -64,16 +61,16 @@ public class TEAlchemicalCalcinatorItemRenderer implements IItemRenderer switch (type) { case ENTITY: - renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); + renderConduitItem(item, -0.5f, -0.5f, -0.5f); break; case EQUIPPED: - renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); + renderConduitItem(item, -0.4f, 0.50f, 0.35f); break; case EQUIPPED_FIRST_PERSON: - renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); + renderConduitItem(item, -0.4f, 0.50f, 0.35f); break; case INVENTORY: - renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); + renderConduitItem(item, -0.5f, -0.5f, -0.5f); break; default: } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAltarItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAltarItemRenderer.java index df81d2d7..dd3385fe 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAltarItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAltarItemRenderer.java @@ -1,13 +1,14 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar; -import cpw.mods.fml.client.FMLClientHandler; -import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.fml.client.FMLClientHandler; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar; + public class TEAltarItemRenderer implements IItemRenderer { private ModelBloodAltar modelBloodAltar; @@ -36,16 +37,16 @@ public class TEAltarItemRenderer implements IItemRenderer switch (type) { case ENTITY: - renderBloodAltar((RenderBlocks) data[0], item, 0, 0, 0, scale); + renderBloodAltar(item, 0, 0, 0, scale); break; case EQUIPPED: - renderBloodAltar((RenderBlocks) data[0], item, 0, 0, 0.5f, scale); + renderBloodAltar(item, 0, 0, 0.5f, scale); break; case EQUIPPED_FIRST_PERSON: - renderBloodAltar((RenderBlocks) data[0], item, +0.5f, 0.5f, +0.5f, scale); + renderBloodAltar(item, +0.5f, 0.5f, +0.5f, scale); break; case INVENTORY: - renderBloodAltar((RenderBlocks) data[0], item, -0.5f, -0.75f, -0.5f, scale); + renderBloodAltar(item, -0.5f, -0.75f, -0.5f, scale); break; default: @@ -53,7 +54,7 @@ public class TEAltarItemRenderer implements IItemRenderer } } - private void renderBloodAltar(RenderBlocks render, ItemStack item, float x, float y, float z, float scale) + private void renderBloodAltar(ItemStack item, float x, float y, float z, float scale) { GL11.glPushMatrix(); GL11.glTranslatef(x, y, z); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java index b9826145..8954aebd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; import net.minecraft.client.renderer.ItemRenderer; -import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.fml.client.FMLClientHandler; import org.lwjgl.opengl.GL11; @@ -15,7 +16,6 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import WayofTime.alchemicalWizardry.common.renderer.model.ModelCrystalBelljar; import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; -import cpw.mods.fml.client.FMLClientHandler; public class TEBellJarItemRenderer implements IItemRenderer { @@ -24,7 +24,7 @@ public class TEBellJarItemRenderer implements IItemRenderer private ResourceLocation mainResource = new ResourceLocation("alchemicalwizardry:textures/models/CrystalBelljar.png"); private ResourceLocation resourceLocation = new ResourceLocation("alchemicalwizardry:textures/models/Reagent.png"); - private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) + private void renderConduitItem(ItemStack item, float translateX, float translateY, float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F); @@ -67,7 +67,7 @@ public class TEBellJarItemRenderer implements IItemRenderer private void renderTankContents(double x, double y, double z, int colourRed, int colourGreen, int colourBlue, int colourIntensity) { GL11.glPushMatrix(); - Tessellator tessellator = Tessellator.instance; + Tessellator tessellator = Tessellator.getInstance(); FMLClientHandler.instance().getClient().renderEngine.bindTexture(resourceLocation); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); @@ -79,12 +79,13 @@ public class TEBellJarItemRenderer implements IItemRenderer GL11.glDepthMask(false); - tessellator.startDrawingQuads(); - tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity); + WorldRenderer wr = tessellator.getWorldRenderer(); + wr.startDrawingQuads(); + wr.func_178961_b(colourRed, colourGreen, colourBlue, colourIntensity); GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5); - tessellator.setBrightness(240); + wr.func_178963_b(240); double x1 = -4d / 16d; double x2 = 4d / 16d; @@ -98,26 +99,26 @@ public class TEBellJarItemRenderer implements IItemRenderer double resy1 = 1.0d; double resy2 = 1.0d; - tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1); - tessellator.addVertexWithUV(x2, y1, z1, resx2, resy1); - tessellator.addVertexWithUV(x2, y2, z1, resx2, resy2); - tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2); - tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1); - tessellator.addVertexWithUV(x1, y1, z2, resx2, resy1); - tessellator.addVertexWithUV(x1, y2, z2, resx2, resy2); - tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2); - tessellator.addVertexWithUV(x1, y1, z2, resx1, resy1); - tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1); - tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2); - tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2); - tessellator.addVertexWithUV(x2, y1, z1, resx1, resy1); - tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1); - tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2); - tessellator.addVertexWithUV(x2, y2, z1, resx1, resy2); - tessellator.addVertexWithUV(x1, y2, z1, resx1, resy1); - tessellator.addVertexWithUV(x2, y2, z1, resx2, resy1); - tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2); - tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2); + wr.addVertexWithUV(x1, y1, z1, resx1, resy1); + wr.addVertexWithUV(x2, y1, z1, resx2, resy1); + wr.addVertexWithUV(x2, y2, z1, resx2, resy2); + wr.addVertexWithUV(x1, y2, z1, resx1, resy2); + wr.addVertexWithUV(x1, y1, z1, resx1, resy1); + wr.addVertexWithUV(x1, y1, z2, resx2, resy1); + wr.addVertexWithUV(x1, y2, z2, resx2, resy2); + wr.addVertexWithUV(x1, y2, z1, resx1, resy2); + wr.addVertexWithUV(x1, y1, z2, resx1, resy1); + wr.addVertexWithUV(x2, y1, z2, resx2, resy1); + wr.addVertexWithUV(x2, y2, z2, resx2, resy2); + wr.addVertexWithUV(x1, y2, z2, resx1, resy2); + wr.addVertexWithUV(x2, y1, z1, resx1, resy1); + wr.addVertexWithUV(x2, y1, z2, resx2, resy1); + wr.addVertexWithUV(x2, y2, z2, resx2, resy2); + wr.addVertexWithUV(x2, y2, z1, resx1, resy2); + wr.addVertexWithUV(x1, y2, z1, resx1, resy1); + wr.addVertexWithUV(x2, y2, z1, resx2, resy1); + wr.addVertexWithUV(x2, y2, z2, resx2, resy2); + wr.addVertexWithUV(x1, y2, z2, resx1, resy2); tessellator.draw(); GL11.glDepthMask(true); @@ -164,16 +165,16 @@ public class TEBellJarItemRenderer implements IItemRenderer switch (type) { case ENTITY: - renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); + renderConduitItem(item, -0.5f, -0.5f, -0.5f); break; case EQUIPPED: - renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); + renderConduitItem(item, -0.4f, 0.50f, 0.35f); break; case EQUIPPED_FIRST_PERSON: - renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); + renderConduitItem(item, -0.4f, 0.50f, 0.35f); break; case INVENTORY: - renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); + renderConduitItem(item, -0.5f, -0.5f, -0.5f); break; default: } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEConduitItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEConduitItemRenderer.java index d22f9dbe..6044f3dd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEConduitItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEConduitItemRenderer.java @@ -2,6 +2,7 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.fml.client.FMLClientHandler; @@ -15,7 +16,7 @@ public class TEConduitItemRenderer implements IItemRenderer { private ModelConduit modelConduit = new ModelConduit(); - private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) + private void renderConduitItem(ItemStack item, float translateX, float translateY, float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F); @@ -23,7 +24,7 @@ public class TEConduitItemRenderer implements IItemRenderer FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelConduit.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP); + this.modelConduit.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, EnumFacing.DOWN, EnumFacing.UP); GL11.glPopMatrix(); GL11.glPopMatrix(); } @@ -64,16 +65,16 @@ public class TEConduitItemRenderer implements IItemRenderer switch (type) { case ENTITY: - renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); + renderConduitItem(item, -0.5f, -0.5f, -0.5f); break; case EQUIPPED: - renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); + renderConduitItem(item, -0.4f, 0.50f, 0.35f); break; case EQUIPPED_FIRST_PERSON: - renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); + renderConduitItem(item, -0.4f, 0.50f, 0.35f); break; case INVENTORY: - renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); + renderConduitItem(item, -0.5f, -0.5f, -0.5f); break; default: } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEffectBlockItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEffectBlockItemRenderer.java index 9f481de1..a6d25c4a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEffectBlockItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEffectBlockItemRenderer.java @@ -1,22 +1,21 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; -import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.client.FMLClientHandler; import org.lwjgl.opengl.GL11; import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEffectBlock; -import cpw.mods.fml.client.FMLClientHandler; public class TESpellEffectBlockItemRenderer implements IItemRenderer { private ModelSpellEffectBlock modelSpellBlock = new ModelSpellEffectBlock(); - private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) + private void renderConduitItem(ItemStack item, float translateX, float translateY, float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F); @@ -25,7 +24,7 @@ public class TESpellEffectBlockItemRenderer implements IItemRenderer FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP); + this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, EnumFacing.DOWN, EnumFacing.UP); GL11.glPopMatrix(); GL11.glPopMatrix(); } @@ -66,16 +65,16 @@ public class TESpellEffectBlockItemRenderer implements IItemRenderer switch (type) { case ENTITY: - renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); + renderConduitItem(item, -0.5f, -0.5f, -0.5f); break; case EQUIPPED: - renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); + renderConduitItem(item, -0.4f, 0.50f, 0.35f); break; case EQUIPPED_FIRST_PERSON: - renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); + renderConduitItem(item, -0.4f, 0.50f, 0.35f); break; case INVENTORY: - renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); + renderConduitItem(item, -0.5f, -0.5f, -0.5f); break; default: } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEnhancementBlockItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEnhancementBlockItemRenderer.java index 0fbd6e01..c0c48ed0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEnhancementBlockItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEnhancementBlockItemRenderer.java @@ -1,22 +1,21 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; -import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.client.FMLClientHandler; import org.lwjgl.opengl.GL11; import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEnhancementBlock; -import cpw.mods.fml.client.FMLClientHandler; public class TESpellEnhancementBlockItemRenderer implements IItemRenderer { private ModelSpellEnhancementBlock modelSpellBlock = new ModelSpellEnhancementBlock(); - private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) + private void renderConduitItem(ItemStack item, float translateX, float translateY, float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F); @@ -25,7 +24,7 @@ public class TESpellEnhancementBlockItemRenderer implements IItemRenderer FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP); + this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, EnumFacing.DOWN, EnumFacing.UP); GL11.glPopMatrix(); GL11.glPopMatrix(); } @@ -66,16 +65,16 @@ public class TESpellEnhancementBlockItemRenderer implements IItemRenderer switch (type) { case ENTITY: - renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); + renderConduitItem(item, -0.5f, -0.5f, -0.5f); break; case EQUIPPED: - renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); + renderConduitItem(item, -0.4f, 0.50f, 0.35f); break; case EQUIPPED_FIRST_PERSON: - renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); + renderConduitItem(item, -0.4f, 0.50f, 0.35f); break; case INVENTORY: - renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); + renderConduitItem(item, -0.5f, -0.5f, -0.5f); break; default: } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellModifierBlockItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellModifierBlockItemRenderer.java index 7fc7dc63..3ea9c791 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellModifierBlockItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellModifierBlockItemRenderer.java @@ -1,22 +1,21 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; -import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.client.FMLClientHandler; import org.lwjgl.opengl.GL11; import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellModifierBlock; -import cpw.mods.fml.client.FMLClientHandler; public class TESpellModifierBlockItemRenderer implements IItemRenderer { private ModelSpellModifierBlock modelSpellBlock = new ModelSpellModifierBlock(); - private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) + private void renderConduitItem(ItemStack item, float translateX, float translateY, float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F); @@ -25,7 +24,7 @@ public class TESpellModifierBlockItemRenderer implements IItemRenderer FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP); + this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, EnumFacing.DOWN, EnumFacing.UP); GL11.glPopMatrix(); GL11.glPopMatrix(); } @@ -66,16 +65,16 @@ public class TESpellModifierBlockItemRenderer implements IItemRenderer switch (type) { case ENTITY: - renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); + renderConduitItem(item, -0.5f, -0.5f, -0.5f); break; case EQUIPPED: - renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); + renderConduitItem(item, -0.4f, 0.50f, 0.35f); break; case EQUIPPED_FIRST_PERSON: - renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); + renderConduitItem(item, -0.4f, 0.50f, 0.35f); break; case INVENTORY: - renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); + renderConduitItem(item, -0.5f, -0.5f, -0.5f); break; default: } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellParadigmBlockItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellParadigmBlockItemRenderer.java index 8bf4da84..2dc201ba 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellParadigmBlockItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellParadigmBlockItemRenderer.java @@ -1,22 +1,21 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; -import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fml.client.FMLClientHandler; import org.lwjgl.opengl.GL11; import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellParadigmBlock; -import cpw.mods.fml.client.FMLClientHandler; public class TESpellParadigmBlockItemRenderer implements IItemRenderer { private ModelSpellParadigmBlock modelSpellBlock = new ModelSpellParadigmBlock(); - private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) + private void renderConduitItem(ItemStack item, float translateX, float translateY, float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F); @@ -24,7 +23,7 @@ public class TESpellParadigmBlockItemRenderer implements IItemRenderer FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP); + this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, EnumFacing.DOWN, EnumFacing.UP); GL11.glPopMatrix(); GL11.glPopMatrix(); } @@ -65,16 +64,16 @@ public class TESpellParadigmBlockItemRenderer implements IItemRenderer switch (type) { case ENTITY: - renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); + renderConduitItem(item, -0.5f, -0.5f, -0.5f); break; case EQUIPPED: - renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); + renderConduitItem(item, -0.4f, 0.50f, 0.35f); break; case EQUIPPED_FIRST_PERSON: - renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); + renderConduitItem(item, -0.4f, 0.50f, 0.35f); break; case INVENTORY: - renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); + renderConduitItem(item, -0.5f, -0.5f, -0.5f); break; default: } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEWritingTableItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEWritingTableItemRenderer.java index b618b248..43bf7569 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEWritingTableItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEWritingTableItemRenderer.java @@ -1,13 +1,15 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable; -import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.fml.client.FMLClientHandler; + import org.lwjgl.opengl.GL11; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable; + public class TEWritingTableItemRenderer implements IItemRenderer { private ModelWritingTable model; From aed84362047ebb4855fbe13970db1d78918a9eb0 Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Wed, 29 Jul 2015 21:45:19 -0400 Subject: [PATCH 19/33] Deleted unused resources, added a test .json for the armour forge. --- .../client/BlockRenderer.java | 5 + .../itemRender/TEBellJarItemRenderer.java | 2 - .../models/block/soul_armour_forge.json | 6 + .../models/item/soul_armour_forge.json | 10 + .../assets/alchemicalwizardryBooks/books.txt | 259 ----------- .../alchemicalwizardryBooks/books/book.txt | 370 ---------------- .../alchemicalwizardryBooks/lang/en_US.lang | 414 ------------------ .../bloodutils/textures/blocks/area_air.png | Bin 1405 -> 0 bytes .../textures/blocks/area_air.png.mcmeta | 16 - .../textures/blocks/area_darkness.png | Bin 1581 -> 0 bytes .../textures/blocks/area_darkness.png.mcmeta | 16 - .../bloodutils/textures/blocks/area_earth.png | Bin 1492 -> 0 bytes .../textures/blocks/area_earth.png.mcmeta | 16 - .../bloodutils/textures/blocks/area_fire.png | Bin 1274 -> 0 bytes .../textures/blocks/area_fire.png.mcmeta | 16 - .../bloodutils/textures/blocks/area_light.png | Bin 1495 -> 0 bytes .../textures/blocks/area_light.png.mcmeta | 16 - .../textures/blocks/area_rainbow.png | Bin 1608 -> 0 bytes .../textures/blocks/area_rainbow.png.mcmeta | 16 - .../bloodutils/textures/blocks/area_water.png | Bin 1295 -> 0 bytes .../textures/blocks/area_water.png.mcmeta | 16 - .../textures/blocks/block_bloodDiamond.png | Bin 281 -> 0 bytes .../textures/blocks/block_bloodIron.png | Bin 194 -> 0 bytes .../bloodutils/textures/blocks/builder.png | Bin 821 -> 0 bytes .../bloodutils/textures/blocks/discoball.png | Bin 244 -> 0 bytes .../textures/blocks/discoball.png.mcmeta | 22 - .../textures/blocks/essence_darkness.png | Bin 167 -> 0 bytes .../textures/blocks/essence_light.png | Bin 168 -> 0 bytes .../textures/blocks/essence_rainbow.png | Bin 188 -> 0 bytes .../blocks/essence_rainbow.png.mcmeta | 16 - .../bloodutils/textures/blocks/progress.png | Bin 799 -> 0 bytes .../assets/bloodutils/textures/gui/altar.png | Bin 3371 -> 0 bytes .../bloodutils/textures/gui/crafting.png | Bin 551 -> 0 bytes .../assets/bloodutils/textures/gui/front.png | Bin 2881 -> 0 bytes .../assets/bloodutils/textures/gui/guide.png | Bin 8642 -> 0 bytes .../textures/items/bloodShard_royal.png | Bin 400 -> 0 bytes .../textures/items/diamond_blood.png | Bin 316 -> 0 bytes .../bloodutils/textures/items/gem_air.png | Bin 525 -> 0 bytes .../textures/items/gem_air.png.mcmeta | 16 - .../textures/items/gem_darkness.png | Bin 499 -> 0 bytes .../textures/items/gem_darkness.png.mcmeta | 16 - .../bloodutils/textures/items/gem_earth.png | Bin 508 -> 0 bytes .../textures/items/gem_earth.png.mcmeta | 16 - .../bloodutils/textures/items/gem_empty.png | Bin 315 -> 0 bytes .../bloodutils/textures/items/gem_fire.png | Bin 464 -> 0 bytes .../textures/items/gem_fire.png.mcmeta | 16 - .../bloodutils/textures/items/gem_light.png | Bin 502 -> 0 bytes .../textures/items/gem_light.png.mcmeta | 16 - .../bloodutils/textures/items/gem_rainbow.png | Bin 422 -> 0 bytes .../textures/items/gem_rainbow.png.mcmeta | 16 - .../bloodutils/textures/items/gem_water.png | Bin 484 -> 0 bytes .../textures/items/gem_water.png.mcmeta | 16 - .../bloodutils/textures/items/guide.png | Bin 421 -> 0 bytes .../bloodutils/textures/items/iron_blood.png | Bin 286 -> 0 bytes .../items/sigil_advancedDivination.png | Bin 616 -> 0 bytes .../textures/items/sigil_ritual.png | Bin 587 -> 0 bytes .../textures/items/tool_creative.png | Bin 214 -> 0 bytes .../textures/misc/screenshots/t1.png | Bin 53606 -> 0 bytes .../assets/bloodutils/textures/misc/tab.png | Bin 277 -> 0 bytes .../textures/models/model_guide.png | Bin 322 -> 0 bytes .../textures/models/model_reviver.png | Bin 1058 -> 0 bytes .../resources/assets/forge/lang/en_US.lang | 5 - .../resources/assets/forge/lang/es_ES.lang | 212 --------- .../resources/assets/forge/lang/fr_FR.lang | 5 - .../creative_inventory/tab_blood.png | Bin 1023 -> 0 bytes 65 files changed, 21 insertions(+), 1529 deletions(-) create mode 100644 src/main/resources/assets/alchemicalwizardry/models/block/soul_armour_forge.json create mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/soul_armour_forge.json delete mode 100644 src/main/resources/assets/alchemicalwizardryBooks/books.txt delete mode 100644 src/main/resources/assets/alchemicalwizardryBooks/books/book.txt delete mode 100644 src/main/resources/assets/alchemicalwizardryBooks/lang/en_US.lang delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_air.png delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_air.png.mcmeta delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_darkness.png delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_darkness.png.mcmeta delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_earth.png delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_earth.png.mcmeta delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_fire.png delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_fire.png.mcmeta delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_light.png delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_light.png.mcmeta delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_rainbow.png delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_rainbow.png.mcmeta delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_water.png delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/area_water.png.mcmeta delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/block_bloodDiamond.png delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/block_bloodIron.png delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/builder.png delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/discoball.png delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/discoball.png.mcmeta delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/essence_darkness.png delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/essence_light.png delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/essence_rainbow.png delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/essence_rainbow.png.mcmeta delete mode 100644 src/main/resources/assets/bloodutils/textures/blocks/progress.png delete mode 100644 src/main/resources/assets/bloodutils/textures/gui/altar.png delete mode 100644 src/main/resources/assets/bloodutils/textures/gui/crafting.png delete mode 100644 src/main/resources/assets/bloodutils/textures/gui/front.png delete mode 100644 src/main/resources/assets/bloodutils/textures/gui/guide.png delete mode 100644 src/main/resources/assets/bloodutils/textures/items/bloodShard_royal.png delete mode 100644 src/main/resources/assets/bloodutils/textures/items/diamond_blood.png delete mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_air.png delete mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_air.png.mcmeta delete mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_darkness.png delete mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_darkness.png.mcmeta delete mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_earth.png delete mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_earth.png.mcmeta delete mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_empty.png delete mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_fire.png delete mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_fire.png.mcmeta delete mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_light.png delete mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_light.png.mcmeta delete mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_rainbow.png delete mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_rainbow.png.mcmeta delete mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_water.png delete mode 100644 src/main/resources/assets/bloodutils/textures/items/gem_water.png.mcmeta delete mode 100644 src/main/resources/assets/bloodutils/textures/items/guide.png delete mode 100644 src/main/resources/assets/bloodutils/textures/items/iron_blood.png delete mode 100644 src/main/resources/assets/bloodutils/textures/items/sigil_advancedDivination.png delete mode 100644 src/main/resources/assets/bloodutils/textures/items/sigil_ritual.png delete mode 100644 src/main/resources/assets/bloodutils/textures/items/tool_creative.png delete mode 100644 src/main/resources/assets/bloodutils/textures/misc/screenshots/t1.png delete mode 100644 src/main/resources/assets/bloodutils/textures/misc/tab.png delete mode 100644 src/main/resources/assets/bloodutils/textures/models/model_guide.png delete mode 100644 src/main/resources/assets/bloodutils/textures/models/model_reviver.png delete mode 100644 src/main/resources/assets/forge/lang/en_US.lang delete mode 100644 src/main/resources/assets/forge/lang/es_ES.lang delete mode 100644 src/main/resources/assets/forge/lang/fr_FR.lang delete mode 100644 src/main/resources/assets/minecraft/textures/gui/container/creative_inventory/tab_blood.png diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/BlockRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/client/BlockRenderer.java index 8ade0296..5c0d5ef2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/BlockRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/BlockRenderer.java @@ -11,4 +11,9 @@ public class BlockRenderer { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation("alchemicalwizardry:" + block.getUnlocalizedName().substring(5), "inventory")); } + + public static void registerBlocks() + { + + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java index 8954aebd..5459eb87 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; -import net.minecraft.client.renderer.ItemRenderer; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.entity.Entity; @@ -19,7 +18,6 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; public class TEBellJarItemRenderer implements IItemRenderer { - ItemRenderer d; private ModelCrystalBelljar modelConduit = new ModelCrystalBelljar(); private ResourceLocation mainResource = new ResourceLocation("alchemicalwizardry:textures/models/CrystalBelljar.png"); private ResourceLocation resourceLocation = new ResourceLocation("alchemicalwizardry:textures/models/Reagent.png"); diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/soul_armour_forge.json b/src/main/resources/assets/alchemicalwizardry/models/block/soul_armour_forge.json new file mode 100644 index 00000000..b455a113 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/block/soul_armour_forge.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "alchemicalwizardry:blocks/SoulForge" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/soul_armour_forge.json b/src/main/resources/assets/alchemicalwizardry/models/item/soul_armour_forge.json new file mode 100644 index 00000000..ca3e1dff --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/models/item/soul_armour_forge.json @@ -0,0 +1,10 @@ +{ + "parent":"hemomancy:block/soul_armour_forge", + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/alchemicalwizardryBooks/books.txt b/src/main/resources/assets/alchemicalwizardryBooks/books.txt deleted file mode 100644 index 2fcd1b60..00000000 --- a/src/main/resources/assets/alchemicalwizardryBooks/books.txt +++ /dev/null @@ -1,259 +0,0 @@ -aw.entry.Magnus.1= -A classic tragic backstory.1= My name is Tiberius. I was a kid when the demons came for my village during The Wars. They ransacked the houses and turned the shacks into splinters, wielding fire and water to blast the land asunder. I woke up to some travelling merchants that were passing by, equipping the warriors who were futily trying to drive off the demons that still clawed the village. I was brought to a village nearby, where a magician -A classic tragic backstory.2=named Magus helped tend to my wounds. The magic that he used was something that I had never seen before - it wasn't Thaumaturgy, nor Alchemy, and it was definitely not Botany. He winked at me once he saw that my eyes were open, holding his finger to his lips. Fast-forward several years, and I have learned almost everything from Master Magus, being his third student ever to master his arts. Against his wishes, I have recorded -A classic tragic backstory.3=my research and put several wards and spells on this book. So welcome, apprentice. I am known as The Architect, and I am a Blood Mage. It took several years of pestering before I managed to convince Magus to teach me. He kept on telling me that, "Magic that uses the life essence of living beings requires patience and preparation in order to master it. One false move, go a little past your natural endurance, and you may find -A classic tragic backstory.4=yourself taking a nice vacation in Tartarus." The thing was, I wanted to go there - I had some unfinished business with the demons. The process that Magus originally constructed required powerful artifacts that he constructed himself, but were rather lacking where teaching was concerned. After studying a bit of alchemy and the process of "Equivalent Exchange," I managed to -A classic tragic backstory.5=construct myself an altar that would transmute items inside of its basin into new powerful forms. The only issue was that it needed a worthy catalyst, and so with a prick of the finger I set the Blood Altar alight! -The Blood Altar.1= -The Blood Altar.1= To start any form of transmutation involving blood, you would need to construct a blood altar and a sacrificial knife, as well as have a solitary diamond in your possession. After placing the blood altar down, Magus advised me to be -The Blood Altar.2=careful as I filled it slowly with my blood, and said that I would need to be really close to the altar (about a metre) for the knife to work. With about 2 buckets of blood in the altar, which Master Magus reminds me is about 10 hearts worth, I placed the diamond inside of the altar by activating it with the diamond in hand. -The Blood Altar.2= The blood dissipated in a cloud of red swirls as I waited for the atoms of the diamond to shift and reform. There were a few moments where the particles turned gray, which meant that the altar was empty and I had to hurry to fill it. After the -The Blood Altar.3=diamond burst in a shower of red particles, what finally sat in the altar was a Weak Blood Orb. -The Soul Network.1= One thing that I initially didn't understand was the overarching connection between the blood orb and myself. When I initially met Magus, I could see many sparkling strands branching off of him, flowing throughout his house and linking with intricate stones and runic drawings. I asked Magus about the strands, but he had no clue what I was talking about. It took three years of thorough research to finally find the answer, and when I -The Soul Network.2=brought my notes to him he was really impressed with what I have found. When you send power into the orb, the energy is transmitted from the strand connecting the orb and into the very soul of the person the orb is bound to. Similarly, and Magus managed to show this effect with several of his rituals, when you use something that drains energy it will drain the energy directly from the soul. The thing is that if you -The Soul Network.3=use an item whose owner has no energy left, the item will instead grab the requisite energy from the user of the item. Directly. From his or her life force. As such, the unit of measurement is called "Life Points," or LP. I experimented with this, and one heart equals 200 LP. I have christened this system to be the "Soul Network," and is used in all branches of Blood Magic indirectly. -Basics of sigils.1= Magus is a master at rituals. His power in the intricate layering of stones and inks is unmatched. The problem is that these rituals are rather... static in nature. Sure, being able to call the bounty of the earth to the surface is all fine and -Basics of sigils.2=dandy, but won't exactly protect you when you are on fire. To this end, I decided to link my soul network to powerful items that I have created. To start, I decided to transmute a piece of smooth stone in the Blood Altar with just 1kLP to create a blank slate. The first thing I did was to arrange the blank slate with some reflective glass and my weak blood orb. Pouring my power into the configuration created a Divination Sigil, -Basics of sigils.3=which I could link to my network and see how much power that my soul network holds. What is more, holding the sigil to the Blood Altar flooded my mind with information, giving me the knowledge about its current tier, capacity, and even how much it was holding. Happy with the sigil, I brought a fresh unbound one to Master Magus for him to use. When I took the divination sigil back in my hands and tried to use it to -Basics of sigils.4=view his network, for some reason I could not gleam any information from him. I don't really see why this is, considering that I used this same method for other people and I saw that they had no power at all, but to gleam actually ... nothing from Magus is strange. -Training, and water sigil.1= I've been training my body, lately. Master Magus told me that in order to extract most of my power, I have to get my mind, soul, and body into as perfect shape as possible. Even though my mind takes time to hone, and my soul requires methods I have yet -Training, and water sigil.2=mastered to strengthen, my body is something I can actively manage. No more cookies for me, apparently, since they have horrible saturation for the work I do. And it's hard to grow cocoa right now, anyways. The temperature is ridiculously high, and with it the humidity is pretty freaking low. Some bright spark of a thaumaturge got it into their head that it would be good to open up the Obelisk to the far north of -Training, and water sigil.3=the village, and because of it a large influx of taint spewed forth from the eldritch tomb. It looks like someone wasn't focusing enough on their sanity training! Thankfully Master Magus decided to head out to the site up north with a few stones and a new vat of ink, saying over his shoulder that he had a new ritual that he'd like to test to fix the problem. In the meantime, I was tasked to create something to -Training, and water sigil.4=fix our water problem. I thought about perhaps cooling the environment around the village in order to condense the water in the air, or perhaps find a way to create rain - neither of which I would be able to accomplish, because I'm sure that either task would take more than the 5 kLP capacity I currently have with my blood orb. So, I had to think small. At my desk, I mixed some dirt into the spare water I -Training, and water sigil.5=had for experimentation and started to paint on one of the blank slates I recently created to layer a bit of a base. Once I was satisfied, I took a bunch of buckets (to be safe in case that what I did would fail) and arranged them around the damp slate and then took my orb from the chest nearby. I then tapped the orb onto the slate, and the water started to boil and swirl out of the surrounding buckets, rushing into the slate! After a quick, -Training, and water sigil.6=bright flash, the new sigil lay steaming on the table in a puddle of water. Thankfully the sigil was what I needed. I could link it to my network and place water wherever I wanted by simply tapping it on the ground. The water was pricy, requiring a full 100 LP for each bucket's worth that I created in the world, but for an infinite supply of water, creeping upwards to 50 full buckets for my puny network was something that I -Training, and water sigil.7=desperately needed. It's just a shame that it started to rain an hour after I created the sigil. -The Lava crystal.1= There was an explosion in the lab today as I was trying to work out a few more artifacts. When I tried to infuse a few buckets of lava with my power, and used some glass to contain the effect, the assembly simply burst into flames and flew me -The Lava crystal.2=across the workshop. I wasn't really hurt, and thankfully my water sigil was used promptly to put out the fires, however it seemed that my experiment failed rather heartily. Apparently I needed just a little bit more time, however, since I got it to work a week after. By combining some glass and obsidian together with a few buckets of lava, and throwing in my blood orb and a diamond to hold it all together, the diamond was -The Lava crystal.3=transmuted into a fiery crystal that seemed to... do nothing at all. I peeked out from behind the blast shield, since by then I learned that playing with lava was not the safest of hobbies, and gingerly linked the crystal to my network. As soon as the pact was completed, I felt a wave of heat emanate from the crystal, and promptly tossed it into a furnace before it could burn my fingers. I was unsuccessful on that front. -The Lava crystal.4=The furnace immediately kindled, and the pork that was sitting in the top slot began to cook quickly. Quickly feeling a wave of nausea, I checked my network out and found that I had nothing left to offer. Once I pulled the blasted thing out of the furnace and stuffed it into a chest, the nausea subsided. So this Lava Crystal could work in any sort of furnace and feed off of the owner's network, but if the network was dry it would -The Lava crystal.5=instead cause the owner to feel a hearty blast of nausea unless removed from the solid fuel-burning machine. Good to know, since now I know of a way to trade my services with the blacksmiths in the village. -Sigil of lava.1= Finally, the day that I have been waiting for the past 7 months has come. The "Hell's Harvest Festival" is a day that the village celebrates the creation of the first portal to the Nether a century ago. It's funny that when I ask the villagers why -Sigil of lava.2=it is that we celebrate the formation of a portal to Hell, they simply laugh and say that I'll see when I finally go in. The portal was located in a vast stone cathedral, a three day's walk from the village on foot. Magus said that he'd meet us there, because he had a few things that he needed to prepare before actually going over to the Nether, but I was curious as to how he'd make it there in time - knowing Master Magus, -Sigil of lava.3=he'd spend a day or two reading up on a new theory for a ritual and forget himself in his works. When we entered the hall, however, Master Magus was there already talking to one of the guards of the unlit portal, stowing away a gem into his pocket. I knew something was up, because I could see a strand connecting the gem in his pocket to both himself and one that trailed off back to the village. Not wanting to be -Sigil of lava.4=distracted, I pulled out my wand (Master Magus insists on all of his apprentices learning of another field of magic, and Thaumaturgy has proved itself useful) and set alight the portal as was the custom of the newest member to the harvest. It seems that the harvest, however, was not exactly a trade. I saw giant stone walls and vast pumps throughout the land, grabbing all of the lava from the great pool below. A large -Sigil of lava.5=collection of bound pigmen walked by, led away by someone in a full set of shining steel armour. Huge machines that processed the lava were emblazoned by the brands of industrialization: Thermal Expansion, BuildCraft, Greg Tech, and many other labels dotted throughout the base of operations. So much for a festival - it seemed that the Conglomeration, the governing body that oversaw all of the villages in the land, saw it fit to turn a -Sigil of lava.6=civilization into a circus. After accepting a few supplies from the farce, I walked back home by myself two days early. There were some things that I wanted to create, but wasting my time there would have been fruitless. Clearing my desk of debris charts of alchemical constructs, I set to work with a vat of magma cream that I brought with me, attempting to combine it with another slate. Casting my orb aside, I fished the lava -Sigil of lava.7=crystal from my chest and combined it with the cream and some fresh buckets of lava - thankfully not from the Nether. Once the light faded, I picked up the new Lava Sigil that lay in front of me. What this sigil does is it siphons energy and uses the properties of the lava crystal to super heat rock, creating a source of lava wherever the wielder touches the ground. So, infinite lava, and infinite fire hazards. -Sigil of lava.8=Unfortunately, it takes about 1 kLP per single use, which is a lot for my network as it stands currently. It looks like I need more power, but seeing that Master Magus is currently enjoying himself at the festival, I'm going to have to find a way to boost the blood altar myself. -Blank runes.1= Of course! Runes! Why didn't I think of this earlier? The power of the altar itself comes from the structure of the components used to create it. The force of the diamond alone is not enough to create stronger materials through transmutation. What I -Blank runes.2=need to do is construct several runes to extend the altar, and thus the altar's power. The only thing that I could do on such short notice is to take several blank slates (I have about 16 left) and quite a bit more stone and combine them with my Weak Blood orb. -Blank runes.2= What came next was the hard part. After I made 8 runes for myself, I sat puzzling over the altar. "How could I extend this thing?" I asked myself. It took a few hours, but when I placed the 8 runes in the ground around -Blank runes.3=the altar in a ring, I felt a strange reverberation in the air. Something felt like it awoke, as if the power in the surrounding environment doubled. Quickly, I grabbed my Divination Sigil and slapped it onto the altar, and focused into it to view the power of the altar. I was pleased to find out that the altar was finally at its second tier, which should open up many more transmutation recipes. The problem now, as I sank slowly -Blank runes.4=into my bed to sleep after the long day, was to find out what I could now do. Although Magus was pleased with the upgraded altar, I was caught in a bind. I couldn't seem to do anything with it that the previous altar could not do. The first thing I did was I placed one of my leftover blank slates into the basin, and it promptly consumed 2 kLP worth of essence as it reinforced the structure. Although this Reinforced -Blank runes.5=Slate was much more durable, this process appeared to make the slate no longer work with creating both the lava and water sigils, as well as making it a waste to use in additional rune creation. -Speed runes.1= I can note, however, that when I combined one of the runes with a few more blank slates and some leftover sugar from the harvest it seemed to augment the altar even further. The sugar had to be laid in a configuration that mimicked a bow and -Speed runes.2=arrow on top of the rune, and by doing so it created what I can dub a Speed Rune. What this rune appeared to do was increase the speed of the altar's processes, both the transmutation rate as well as the speed that a bound orb will consume the essence from the altar, by an additive 20% per rune. This tier doesn't seem perfect, however, since it seems that for the second tier only the four edge runes (not the corners) could be used as -Speed runes.3=upgrade "slots" for the purpose of augmentation of the altar. -A shining green orb.1= The "eureka" moment came when I accidentally dropped a few things on the floor of the lab. When I bent down to phish the items from the floor I noticed that one of the emeralds rolled right up to the altar, almost as if it longed to be inside of its -A shining green orb.2=basin. It occurred to me that if a simple diamond inside the altar created a weak blood orb, perhaps a much rarer gem would make a stronger version! Quickly fetching my knife from the table, I filled up the altar over the course of the day so that I could make sure I didn't mess anything up, and then dropped the emerald into the altar. The speed runes made sure that the transmutation took no time at all! Wow, those -A shining green orb.3=things work fast - I better make a note of removing the runes when I try to create more difficult items inside of the altar, because if I was not prepared it would have chewed through my supply in no time! After a few tantalizing moments waiting, the altar burst in a shower of particles and the new orb sat there, revolving on top of the altar. Master Magus must have heard my shout of exclamation, because he -A shining green orb.4=hurried over from his side of the house and helped me to my feet. Not noticing the pain in my palm from earlier, I reached for the orb and sealed it to my network. Master Magus then helped me to fill up the orb inside of the altar, and when we were done that day I had a total of 25 kLP inside of my network. -The void sigil.1= After resting the rest of the day at the insistence of Magus, I returned to work this morning full of inspiration. While I laid in bed half awake, the thought struck me that so far I had managed to use sigils to create fluid. So why not make -The void sigil.2=one that can remove it? My first attempts with things like glass bottles and bowls failed with all of them working for a brief moment, then returning to their old forms. It was almost lunch time when the thought crossed me that I used buckets for the first two, so why not here? Half an hour, six buckets, a bit of twine and a reinforced slate later I had my first void sigil. -Air sigil.1= While tending to our small farm a few days later, I noticed a bird land on our fence. I turned to face it as it flied off, and had a revelation as I watched how it flew. If I could use magic to create the gust of wind like that made by bird wings, -Air sigil.2=I could fly through the air! After hastily finishing the days' chores, working out details in my head all the while, I rushed to my workstation to start work on what I have now dubbed the "Air Sigil". Using feathers and a Ghast tear as ink on a reinforced slate, I formed a sigil that on use creates a rush of air behind where you face to propel you forward. Flight using this sigil is fast, if a little pricey and hard to control, not like the -Air sigil.3=flight provided by Magus's thaumostatic harness. Also, landing is a bit of a problem as I learned the hard way... -Sigil of Sight.1= I've grown a little annoyed at my divination sigil. While it is able to read the current tier and essence of a blood altar, that is ALL it can read. As a result, my current goal is to improve its design using my new blood orb. So far it is going -Sigil of Sight.2=well. The "Sigil of Sight" is able to read the buffers of the altar to give how much they store, as well as how far along a craft in the altar is and how fast it is using LP. The downside of this upgrade is that it loses the power to read the altar's tier or the users soul network, but so far this is an unavoidable loss. For now I'll settle with what it does now, and might try to improve it further later. -Advanced altar mechanics.1= Even after all this time, I still don't fully understand the blood altar. Sure, I built the thing, but... It is almost like working directly with raw life essence has given it a bit of life of its own. After running a few experiments to try and make my life easier, I've noticed some odd behavior coming from it. First, I tried using some basic piping to extract life essence to store later to use for more pricey -Advanced altar mechanics.2=infusions. As it turns out, the altar doesn't like giving up its essence. I managed to get a bucket of LE out before it seemed to slow to a trickle feed, nothing more the 20LP a second. Further tests show that it has a "Buffer" tank that siphons off LP from the main tank, holding roughly 10% of the main tanks capacity. As I mentioned, it does this very slowly so piping is out of the question for now... A later test shows that it -Advanced altar mechanics.3=also doesn't like essence being piped in, as a similar restriction apples to imputing essence. I will defiantly need to find a way to improve this transfer rate... Another strange phenomenon about the altar is its "Hunger" for life. After the failure of the piping, I tried using a few regeneration potions from the local village to speed up the rate at which I recovered health. A normal or extended potion -Advanced altar mechanics.4=seemed fine, and were very effective for speeding up slate production. But a strengthened regeneration potion caused the altar to have a slight "Hum" about it, and I felt my energy being sapped by something. After talking with Magus about this, we have determined the altar senses the life flowing through us, and the potion makes the altars "Hunger" for this life create a sort of aura that causes you to lose energy akin to hunger. As a -Advanced altar mechanics.5=result of this, regeneration is still effective, but a sizable supply of food is needed for extended use to recover energy. -Sigil of the fast miner.1= I've decided to experiment with passive effects for sigils, since everything so far has been an active effect. While wondering through town looking for supplies, I noticed people cutting wood for a fire and some smashing stones to -Sigil of the fast miner.2=build a small fire pit. I keep coming back to how slow both of them were in my train of thought, then started going over ways to improve the tools. Then it hit me: Why improve the tools when you can improve the person? A few anatomy books and failed tests later, I hand the sigil of the Fast miner(Name pending) and two very tired arms. After activating the sigil, it speeds up muscle movements in the arms allowing you to break blocks -Sigil of the fast miner.3=far faster at a small LP cost every few seconds. I do need to keep reminding myself to turn it off when not in use, but the stinging pain of life essence being taken is always a quick reminder... -Soul Fray.1= Today I pushed myself too far. I've gotten close a few times, but today was the first time I have passed out due to draining too much life essence. Magus was thankfully with me at the time, and moved me to a bed to recover. As I regained my senses, I noticed something odd about my soul network thread: They were thin and looked damaged. As I kept watching my threads, it seemed like they were slowly reforming and repairing -Soul Fray.2=themselves. I mentioned this to Magus, and we theorized that after coming so close to death my soul was still recovering from the shock. I made a sacrifice at the altar to test this, and it seems that this state effects how much life essence a heart is worth quite negatively with it only giving a tenth the normal amount. -Green grove.1= Today Magus showed me his green grove ritual, a way to speed up crops. Unfortunately, it is very static and has a small range, limiting its uses. To amend this, I've been toying with the concepts behind the ritual in an attempt to make -Green grove.2=it more portable. By creating an ink from oak saplings and sugarcane, then inscribing a rune on a reinforced slate I have created the sigil of the green grove. It seems a little slower and more expensive then the ritual form, but it can be carried on your person and acts like bonemeal when used on plants. While I had it active I could barely keep up with our farm, and by the end we needed to give a few of our neighbors some of the excess -Green grove.3=we didn't need. They all accepted it, but with varied degrees of reluctance. -Dagger of sacrifice.1= My work on sigils has slowed for now as I'm reaching the limits of what my little green orb can do after only two weeks. As a result, I have turned my attentions to other aspects such as runes to pass the time. Magus is currently out -Dagger of sacrifice.2=dealing with a large forest fire to the east of us, and the village is in a bit of a lull with nothing planed for several weeks. Right now my task is to slaughter a few chickens Magus brought home from the market to prepare on his return home, and it seems the perfect time to test an idea I've been thinking about for a while... I will not mark it here, just in case it is another false hope. Success! I've managed to -Dagger of sacrifice.3=perfect my idea for a new source of life essence. Before the only option was to cut ourselves to give our own life essence to the altar, but now we have a way to use other living things as a source. Unfortunately, it is a little gruesome and a bit "All or nothing" from them... Regardless, it works! ...I have realized that, in my excitement, I may have forgotten to write down what it is. I call it "The Dagger of Sacrifice", formed in a -Dagger of sacrifice.4=blood altar out of an iron sword and 3K LP. The dagger doesn't deal much in the way of damage. It doesn't need to, as its main purpose is to "Mark" a living thing for the altar which takes care of the rest by forcibly extracting their life essence all at once. Through my tests it seems that your common farm animal's life isn't worth nearly as much as a person, only giving 250LP regardless of where it comes from. While I set about cleaning the -Dagger of sacrifice.5=animals after the tests were done, a common zombie managed to sneak in the door I left open when bringing the chickens down here. As soon as I noticed it, reflexes that were being drilled in by Magus every morning kicked in and I managed to poke it with my dagger before it had a chance to hurt me. At first I thought nothing happened, then it fell to the floor as lifeless as it should have already been. I glanced at the altar, quickly noting that -Dagger of sacrifice.6=a zombie was worth 500LP. Looking over the fallen creature as it started crumbling, I noticed that some of the defenses Magus had set up took there toll on the zombie as it was burned and freshly cut in several areas... Seems that the amount of HP they have is irreverent to the altar, giving the same amount of LP regardless. As I finished preparing the meat to cook after disposing of the zombies ash(Which -Dagger of sacrifice.7=reminds me, I wanted to look up why this happens...), a very dark thought crossed my mind. The knife works by giving life to the altar. The dagger works by taking life forcibly from a target. What would happen if a human was marked by the dagger? I asked this to Magus, after showing him the dagger and telling him everything that happened. "In all honestly, I'm not sure. I have a theory, but I don't really feel like testing it..." I asked him to -Dagger of sacrifice.8=elaborate, so he told me the basics of it. It seemed that source of the life essence mattered with the dagger, since the chicken and zombie gave two different amounts, so depending on the person in question they would be split into one of three groups: Passive, Hostile, and Innocent. The passive would be like the chicken, only giving a little. The hostile would be the bandits, the thieves, the murderers. The ones who gave into evil, and -Dagger of sacrifice.9=now seek to hurt or steal from anyone. The unredeemed, and would probably be like the zombie. The final group were the innocents, anyone who doesn't fall into the first two groups. It was nothing but a guess, but we agreed that using the dagger on an Innocent villager would extract all of their life essence like ours. 2K LP, all at once... We also couldn't work out what would divide the passive from the rest, but it was only a theory so -Dagger of sacrifice.10=we put it to rest. -Runes of Sacrifice.1= Looking at these little speed runes, I have decided to see what else can I make. My goal isn't anything in particular, just improving it in some way. The speed rune was made with powdered sugar, so another type of powder should work... -Runes of Sacrifice.2=Redstone failed, gunpowder failed, glowstone... Glowstone worked. I currently have no idea what it does, all I know is it didn't fall to bits seconds after creating it so that is progress. The altar seems to accept it as a proper rune, so all that is left is to run a few tests in the morning. For now, I am tired and feel a bed calling me... I've run dozens of tests trying to find out what this new rune does, after two -Runes of Sacrifice.3=days of obsessing over this I finally noticed it. It slightly increases the amount of LP self sacrifice gives. When I said slight, I mean one rune increases LP gained by ten percent on an additive rate. For those who don't understand that, it basically adds an additional twenty LP per self sacrifice. If my theory is right, I should be able to make a similar rune for normal sacrifice... What else would the altar respond to? -Runes of Sacrifice.3= Well, if there is anything thaumaturgy and magic in general has taught me, it is that gold is a very good metal for magic. By simply replacing the glowstone in the recipe with gold ingots, a sacrifice rune is formed. It has the same additional -Runes of Sacrifice.4=ten percent addition per rune per sacrifice, meaning the more LP of the mob sacrificed the more LP the runes adds. This has got me thinking... The altar was constructed with both diamond and gold. It seems to resonate with the diamond enough to make the first blood orb, and even a second, so why not try making one out of gold? I'll need to revisit this idea later as a test run showed some reaction to a block of -Runes of Sacrifice.5=solid gold(I didn't ask Magus where he got it, and he doesn't seem forthcoming about these matters), but the altar couldn't cope with the strain needed to shape the block. Before catastrophic failure happened, a few safety precautions Magus and I had built into the altar triggered, stopping the transmutation before... Well, neither of us are really sure what would happen. But Magus said he has dealt with matters of unstable and -Runes of Sacrifice.6=untested magic, and knew most of them end with a crater in the floor(Hence the safety precautions). It has been a few days since the experiment with the gold block. Magus and I have been discussing what to do now, as the altar is getting bigger then the basement. Magus has suggested moving it to some of the lower basement floors, but considering just how large it might be in the future... I finally got him to agree to -Runes of Sacrifice.7=building it behind his home, as long as I helped put up a few wards and spells to keep people away. Currently we're planning out the structure and needed runes for upgrading. The current altar only has eight runes, but what I have planned will more then triple that number to twenty eight. The current limitation we suffer is the strength of the altar itself, as it can only take power from runes adjacent to it. My plan is to use something the -Runes of Sacrifice.8=altar is naturally attuned to as a way to not only increase the range of this effect, but act as a counter balance and stabilizing it to prevent it from becoming uncontrollable. For this to work, the blocks in question must be above the altar and an equal distance apart. We've run several tests and calculations, and have a layout in mind for this upgrade. Four pillars topped with glowstone blocks, twenty runes in sections of five, -Runes of Sacrifice.9=built one block down and two out from the last set of runes. In theory this should provide a huge boost in power to the altar without risking our safety(Well, more then we normally risk it), but until we test full scale I can't be sure. For now, we have a lot of runes to make. After much debate we've decided to invest in the "Self sacrifice" runes, as having a steady supply of mobs will be tricky. But now I face the issue of making -Runes of Sacrifice.10=dozens of reinforced slates... I need to think on this. -The blood letters pack.1= It's so simple! I've discovered a way of obtaining LP for making slates that means I don't wait at the altar all day: The Blood letter's Backpack. Made with a modified leather chest-piece with a blank slate reinforced glass tank, it allows the wearer to gather LP by feeding it into the pack over time. Whenever the wearer has more then five hearts, the pack will drain their life and store it inside up to 10K LP to be -The blood letters pack.2=dumped into an altar later. This pack does have two shortcomings, however. When the life essence is deposited into the altar, runes will have no bonus to the amount added. The second problem is that the altar will only accept LP from the pack when not performing a transmutation. Despite these limitations, it will prove quite valuable for simply allowing me to step away from the altar to do other tasks. This is a simple progress -The blood letters pack.3=update, as it's been a few weeks since I last wrote in this journal. I've been making slow, but steady progress with assembling the slates needed for the runes and we're now halfway through. This isn't the only reason for the lack of entries, as I've been preoccupied with my research thorough thaumaturgy. An old friend of Magus has been visiting and happens to be a well versed thaumaturge, and he has been giving me pointers on how I -The blood letters pack.4=could be doing better while Magus has been preoccupied in his library dealing with a mountain of paperwork. Now that Master Ridden has returned home, I hope to progress farther in making runes in the next few days. -And then there was five.1= Or not, as it seems Fate has other far more interesting plans for us. Today we had a knock on our door while I was making the last of the runes, and after opening it was greeted by three apparent orphans. The two boys in the front looked like they were brothers, or at least close relatives. The girl hiding behind them on the other hand had a very different hair and eye color, so relation was unlikely at best. All of them were -And then there was five.2=covered in dirt, clothing ripped, torn, and patched with various levels of skill. The one on the left had an old sword with a chipped blade on his side, was slightly thinner and taller then the his brother, had a few deep scars that looked recent, long and messy dark brown hair, and was looking at me with a kind poker face. The brother looked more muscled, and was staring at me with a very analytical eyes and a similar poker -And then there was five.3=face, his hair was slightly shorter and lighter then his brother. From what I could see of the girl, she had a simple dress on that was almost caked in dirt and dried mud. The fabric near her elbows was becoming thread bare, and a large rip near the bottom of the dress exposed some of her right leg. Her hair was a light blond, almost pale white color, but the most shocking feature was her eyes... I haven't seen haunted eyes -And then there was five.4=like that in years, and last time it was in a mirror. From the looks of them, all of them hadn't ate anything in days and seemed to have everything they own on their bodies or in the simple packs on their backs. I asked them if there was anything they needed, to which the elder brother said they were looking for master Magus. I called Magus to the door, visitors being a rare thing as it stands with ones who ask for him by name and -And then there was five.5=not clearly mages being rarer still. Five minutes later we all sat in the main room, eating simple sandwiches I had prepared for us all at the request of Magus. Needless to say, this day was not going as expected. Magus spent the next few minutes practically interrogating the elder brother , asking questions on both of our minds. As it turns out the two brothers, Vlad and Demier, use to be caravan traders, eldest a -And then there was five.6=alchemist with basic knowledge of potion brewing, younger with enough mana and training already to cast basic spells. The girl on the other hand had a story all her own. From what the brothers had managed to gather, her village was raided like my own was and she was evidently the sole survivor. What shocked me was when they said she was found wandering the ashs, demons having left hours before without so much as a -And then there was five.7=scratch on her body. Vlad was with the traders when they found her, and he was forced to leave them if he wanted to help the girl named Bella. Their story seemed to win Magus over, as he told them he would try to do what he can for them.. Not long after that, Magus asked me to help him do some shopping for our new guests. On the way to the village, Magus asked me what I thought of the three. "I can't say I believe all their -And then there was five.8=story, but I also don't think their lying. Did you notice the girls eyes? Haven't see a look like that since...". Magus finished for me with "Your own?". I nodded at the dark memories of that time. We continued going over the details of their story, but we agreed that just leaving them in the cold wasn't an option worth considering. We decided to at least try to keep our recent endeavors into blood magic a secret from them, but when push comes to shove I -And then there was five.9=think we might have to let them in on the secret. Magus let out a long sigh. "It's been years since I had to juggle this many apprentices at once. I'm going to need your help training them. But something tell me that we're going to be learning as much from them as they will from us..." I asked him why he felt that way, and he said it was just a gut feeling. I must say I had a similar feeling. Things like this don't happen without reason, and of all -And then there was five.10=mages to come to they stopped at our door, something far easier said then done. An hour later we returned home, both our arms heavy with fabrics, food, and other necessities that we will need to take care of the new apprentices. I watched in amazement as the three ate, trying to make up for days with little food all at once. After that, Magus and I laid the three on various chairs and couches to rest, the -And then there was five.11=strain of travel catching up with them. While Magus dug around looking for a few of his old things that we'd soon need, I started creating some new clothing from enchanted fabric for the three to replace their current worn and ratty clothing. Now that that is done, I should try to get some sleep. Something is telling me tomorrow is going to be quite busy. The Early this morning Magus and I started carving out the earth for the three -And then there was five.12=new bedrooms, since the old ones Magus use to have had since been converted into a storage closet, a alchemy lab, and small study. It didn't take nearly as long as I expected with Magus using a few spells to clear away earth while I went behind using an equal trade foci to transmute it into stone brick before gravity caught on. Once that was done, Magus raised a few walls to separate the space into three rooms and a hallway. -And then there was five.13=Only after that was done did I notice the three children had awoken, and were watching us as we worked. Magus told them that he had some spare furniture in some storerooms they could use, but sadly only knew of one bed. It didn't take long for them to decide Bella got the bed, the brothers would make do with a pillow and a blanket on the floor. After that we spent the rest of the day hunting for then moving furniture to their -And then there was five.14=rooms, building little work areas and libraries for each of them. The following day was more of the same, with the evening filled with helping them find books to read from the grand library. Vlad grabbed as many alchemy books as possible, Demir took a few books on spell casting, and Bella took a Lexica botanica to read through. Later this evening, after the three had retired to their rooms, I sat in the main room with Magus, arms and legs -And then there was five.15=aching from the heavy lifting of the last two days. I told Magus how I thought their rooms should be almost finished, and how I spent the last hour before they retired just answering seemingly endless questions. "I'm sure. I've gone through the same more then once, when I have apprentices new to magic. You were the same, I recall." I opened my mouth to protest, but closed it as I thought back to those days. I decided I probably was as bad as -And then there was five.16=them, and left it at that. It's been just over a week, and the three have settled in nicely. They join Magus and I in morning exorcising, have started studying like true scholars, and have calmed the hungry nodes in their stomachs(Well, Vlad and Bella have. Demir on the other hand is another matter, but I feel he will always be like that.) Unfortunately, like true scholars and mages they've stumbled into places we didn't want them to go. Vlad has -And then there was five.17=created a chemistry set that uses life essence from a blood orb as a fuel source, Demir has turned an old table into a way to use life essence to cast powerful spells, and Bella... She's left me questioning what I know about demons, after taming one and using a blood orb to bind it to her. All three of them have stumbled blindly into blood magic, and now I don't think we'll be able to stop them. Magus and I have agreed to give them a choice -And then there was five.18=in whether they are blood mages or not, but I've seen the light in their eyes... I can't imagine any of them saying no. To seal their dedication to the art, we will have them make blood orbs of their own to use. -The next step: Tier three.1= Even with all the chaos of the last week I've managed to finish the altar construction, and it has been more successful then I predicted. With full access to twenty eight runes, each heart is now worth over seven -The next step: Tier three.2=hundred LP. I've already started prepping to try again with the gold block, having a few instant healing potions at hand. I got a brief glimpse with my sigil of sight, and this transmutation will take twenty five thousand LP to finish, over double what the altar can hold! Writing this down does give me an idea, however.... I'll need to look into it further once I have finished making this. -The next step: Tier three.2= It was close, but I finished the orb today. I was down to the last of my three potions and barely had the strength left to hold the knife, but I pulled through and finished my shiny new blood orb! I've already used it to craft a few things I had made before, -The next step: Tier three.3=and extra lava and air sigil, and it handles it all with such ease! Now that this is finished, I have a small list of ideas to go through... To start off the process, I want a stronger slate. As it stands the reinforced type is cracking under the strain I'm starting to place on it. Well, I got a new slate type when I last upgraded the altar... Let's see if it works again. It does! A reinforced slate in a tier three altar with around five thousand LP -The next step: Tier three.4=makes a new slate... I'll call it an imbued slate for now, and come up with a better name later. -New runes.1= First up to the drawing board: Rune of Capacity. The basic idea is simply to add more room to the altar, so a greater amount of LP can be stored at once to make bulk crafting or difficult crafts easier. Each rune adds 1K to the altar's main tank -New runes.2=capacity, but what is interesting is that the "Buffer" tanks expend as well to a lesser degree. From a few trial tests(My back is starting to hurt from moving runes all day), the buffer tanks are always ten percent of the main tanks size. This will be something to keep in mind later. After helping patch a hole in the wall caused by Demir accidentally unleashing a spell, then helping Vlad dispose of a few failed -New runes.3=alchemical "Experiments", I finally have an hour to myself to work on my ideas for runes. After the success of the last documented attempt, I've been on a bit of a failure streak. I've have runes fail to do anything, crumble to dust, blow up, and one attempt turned into cheese(I asked Magus about this, and said this isn't the first time he's seen that happen to a magical experiment. However he is just as stumped as I am over -New runes.4=why it is always cheese, of all things). Thankfully, I finally found something that doesn't need a blast shield to use or starts growing mold after a while. -New runes.4= Named the dislocation rune, it's only function is to increase the rate the life essence flows into and out of the buffers. Each rune increased the transfer rate by twenty percent per rune, and this effect stack manipulatively. That sounds -New runes.5=great, until you realize the first rune only raises the transfer rate by four LP a second. Needless to say, your going to need around a dozen of these runes before you have any noticeable impact on the transfer rate. While these runes make it possible to automate the creation of slates by storing the life essence outside the altar, you're going to be sacrificing speed, capacity, and generation efficiency for this. -Sigil of Magnetism.1= It's been a few weeks since I last made any headway with my blood magic research, needing to help with the tutoring of the Vlad, Demir and Bella along with my normal duties as a mage. I've had to leave twice this month in order to sort out some -Sigil of Magnetism.2=mess or another, whether is be a helping with a pack of wild wolves or a bad harvest. Today, however, I managed to get some inspiration for a new sigil. When I was in the market buy more food, I noticed two children playing with a rock that was slightly magnetic. They were just running around, seeing what it would stick too and cheering when it did, or seeing how close they could push it to something before it pulled itself closer... That -Sigil of Magnetism.3=is what sparked my idea: A sigil that acts as a magnet, pulling items off the ground closer to you. In theory I could rig the magic on it to apply a similar effect to all items and not just metallic ones... Three hours later, and my sigil is finished. It needs a great deal of mass in the form of four iron blocks, along with the classic gold plating infused into an imbued slate(Drat, I never did work on a better name). This -Sigil of Magnetism.4=sigil needs to be toggled to activate, and while active will draw all nearby items to the user if they have room for it. Simple, but very effective.... -The Phantom Bridge.1= I've been asked to visit a small town to settle a few complaints that have been voiced lately by them, and am currently surprised that a closer bridge isn't one of them. I've had to walk three miles to cross this river, and now must walk another -The Phantom Bridge.2=two tomorrow to reach them. If only I didn't need a bridge, or had thought to grab my air sigil(I still have a bruise from the last landing I had with it, so I wasn't keen on using it again so soon.) Wait... If if I had a bridge that went with me? Better yet, what if I had a bridge that formed under my feet as I walked? Yes, that would be amazing... I'm back home after dealing with a feud over who really owned a cow(Answer: Neither -The Phantom Bridge.3=of them, it wondered into town and they both thought it was one of their own), and have set out my work station to try and capitalize on my idea. I'd want the sigil to place blocks that are phantasmal, only there temporarily before fading into nothing after I leave. For that I'd need a special material... Soul sand might work... Add in a little stone for structuring around an imbued state, then use the orb... Done! Now then, for a -The Phantom Bridge.4=test run... Drat, I left the auto-writing quill running again. It works better then I hoped! The sigil creates a small five by five platform under me, staying at the same elevation as I walk through the air. Not only that, but I've tweaked it so that holding shift lowers the platform by one under you, and the blocks it makes can be easily broken for a quick decent. Not only that, but it will only spawn the blocks if -The Phantom Bridge.5=you are on the ground, jumping or flying will not cause the bridge to reform until you touch solid ground, unless you hold shift forcing it to form under you. And for one final convenience touch, right clicking a phantom block with a block replaces it with that block, making roofs and platforms far easier to build. That should be enough for one night, I'll dub this sigil "The Phantom Bridge" and call it a night. -Sigil of holding.1= Vlad asked me to help him today, requesting my assistance learning the sigils. Part way through he asked if it was ever burdensome having so many on me at once... And I told him it was. Now with a little of his help I've created the -Sigil of holding.2=sigil of holding, and it... Well, it holds other sigils. Shift right clicking with it while another sigil is in your inventory will cause it to absorb that sigil, taking all of it's powers and allowing you to swap between them with a shift right click. Unfortunately, it can't hold that many sigils(Only four) and not every sigil wants be become a part of it. Also, I had to ask Master Magus for help removing sigils from it as it refused to let them go. -Sigil of holding.3=For this task he created the ritual of unbinding, a rather grand looking ritual for such a simple task I must say. -Elemental affinity.1= Demir hurt himself again today with a fire spell that backfired(Well, it worked perfectly if setting the ground around him on fire was the intention). In hopes of stopping further injuries, I have infused the powers of the water, lava, and air sigil -Elemental affinity.2=into an imbued slate. This seems let the sigil act as protective aura around the user, shielding them from drowning, burning, or falling damage at a high over time LP cost. Since I asked Demir to use it he hasn't burned or bruised himself, but did pass out once from a lack of LP to fuel it. Sometimes solving one problem only makes more... But he has been learning, and I've been amazed at what his spells could do. Recently he made a -Elemental affinity.3=long range teleportation spell and a flight spell not unlike the air sigil, but far faster. -Recreating ritual stones.1= -Recreating ritual stones.1= -Recreating ritual stones.2=After a few days of nothing, I turned my attention to the construction of Master Magus's ritual stones. Looking them over, I might be able to replicate their usage and features using reinforced slates and obsidian... Master stone, more complicated then the average ritual stone might be possible if I use my magician's blood orb and four ritual stones to handle the complex nature of it, along with a little more obsidian... -Recreating ritual stones.3=Yes, yes it should be possible to recreate them without sacrificing any usage of them. After asking him how he originally made the elemental scribing tools, I believe I can also replicate the manufacturing of them in the blood altar... But it looks like the dusk inks are too complex for this altar to handle, creating an ink closer to dark gray then midnight black... Perhaps I'll have the power to form them later, for now these four will -Recreating ritual stones.4=work. -Shining a Blood Lamp.1= I had a flash of inspiration today (Quite literally, as watching a few town guards light a replacement torch nearly blinded me from the sudden light). They spend so much on coal and charcoal to fuel those things... What if I had a simple replacement? A -Shining a Blood Lamp.2=near invisible light source that never goes out, can be made almost endlessly, and can easily be carried on your person? Never again would you need to place a torch to light a room, and they can ruin a rooms look(Not to mention the fire hazard they pose, ruining the look even more. "Charred mess" is never in style.). Harnessing the power of glowstone by running a "Current" of LP through it, I can create a sigil that fires -Shining a Blood Lamp.3=a projectile that upon landing forms a stable light source par with that of torch. The only sign of its existence is the light it gives off and faint red particles. While it uses a small amount of LP, the advantage over carrying stacks of torches is enough to justify it. -Bound armor.1= Today Magus gave us a lecture on armors, going over the practical applications(Protection from large pointy sticks shoved in your direction and holding magic to improve the abilities of the wearer), typical construction of armor, and notable armors through the ages (And the very fatal flaws that their owners eventually discovered, much to their short lived dismay). Seeing and reading all this, I feel it is time I -Bound armor.2=take my own try at this art using blood magic. Testing a wide array of materials and structures, I discovered a process to make an almost indestructible metal using a casing filled with life essence with glass hardened with diamonds and reinforced with bright red blood shards(More on their properties later) Magus showed me a while back (Making the prototypes of this armor took longer then you would believe). The -Bound armor.3=process needs the soul of a demon bound to it, but this seems to be a small price to pay. -Bound armor.3= -Bound armor.3= -Bound armor.4=To start, you need to make a "Soul armor forge". This block summons the demon soul and controls the transformation of the "Socket" blocks into proper armor. By placing the filled socket blocks around the soul armor forge in roughly the shape of the armor piece you want with the forge in a gap, you set what it makes. Right clicking the forge will then finish the process, creating the armor piece and binding the demon to the -Bound armor.5=shards inside the armor. You will need to bind the armor to yourself, allowing the armor to drain your network to repair any damage it takes(Another benefit of using blood shards in the creation). After donning the armor(Making a few adjustments, still refining the creation process), I asked Magus to help test just how resistant this armor really is. Several nasty bruises later, we have decided this armor shields -Bound armor.6=the wearer from ninety percent of damage from mundane damage sources. What is interesting is that it also blocks roughly eighty percent of magical damage, meaning many armor piercing methods are far weaker. The metal also doesn't seem to hold enchantments, and the demons inside reacts quite negatively to our attempts to do so. Using the ritual of unbinding, we are able to deconstruct the armor back -Bound armor.7=into the component sockets and anything that was inside them. I mention this because we seem to be able to "Augment" the armor before creation by adding a combination of sigils, blood shard, and an orb. The sigil added to the armor piece(You can add anything to the socket by right clicking with the item in hand) determines the effect, and adds a passive cost to wearing the armor piece. The blood shard lets you add an upgrade, the -Bound armor.8=weak shards we have at our disposal only allow one upgrade but in theory a stronger shard should allow more to be added. Finally, the orb seems to lower the cost of the upgrade. Every sigil seems to have something to do with the normal effect of the sigil, either giving you a passive bonus or having the effect of the sigil happen automatically around you. A few examples are a water sigil making you immune to drowning, the fast miner -Bound armor.9=always active, and a green grove sigil acts around you. -Sanguine armor.1= I've managed to use my new found knowledge of armors and experience making bound armor to try and improve thaumium armor using blood magic. By throwing goggles of reviling or thumium chestplate, leggings, or boots the ritual transform the -Sanguine armor.2=armor into a "Sanguine" version, with a small vis discount and protection par that of pure diamond. What is really interesting is that this armor can be augmented with runic shielding, and then socketed into bound armor in the same fashion as a sigil to pass on the runic shielding, with the bonus that adding the sanguine helm to the bound helm well allow the wearer to see things like aura nodes as if you had goggles on. I should note -Sanguine armor.3=that you can only socket a sanguine armor piece into a same armor type(Helm in the helm, boots in the boots...), and that any vis discount is lost when you do this. -Suppressing the soul.1= Having the armors special effects all the time has become a little bothersome. To deal with this I have managed to create an "Armor Inhibitor" to repress the special effects it offers in the cases they are more bothersome then helpful. -Suppressing the soul.2=Unfortunately, it is a bit all or nothing in this regard. -The ritual diviner.1= It's coming up to the three year anniversary of Magus taking my on as an apprentice. Time seems to have flown by while I've been engrossed in research on applications of blood magic and working with Magus... I should make a gift for Magus -The ritual diviner.2=to as a thank you for these last few years. Considering the complex nature of his rituals, an aid to building them might just be the perfect gift... Ugh... Making a way to build rituals easier proved to be quite the task(And it reminds me of the rule of conservation of effort...), but I finally have it ready in time for the anniversary. While it isn't cheap to craft(Costing the four elemental inks, four diamonds -The ritual diviner.3=and an emerald), I've gone to pains to make it easy to use. Shift right clicking will cycle through a preset list of rituals, and shift right clicking on a block with also rotate the direction the ritual will face(For anything like the ritual of speed, where that matters). Shift left clicking will go through this list in reverse, for those times you accidentally go past the one you want. By normal right clicking on a master ritual stone the -The ritual diviner.4=diviner will take stones out of your inventory, place then in the world and ink them to build the set ritual. To make it clear it is working, it emits green particle effects whenever it places a block successfully. However, it can only place a block in an empty space. Anything at all in the way will stop the process until the obstruction has been removed. It is a small annoyance, but nothing major enough to risk breaking the diviner(Again). -The ritual diviner.5=Magus adores his gift, having rituals faster and easier to build is the one thing he could actually use(That he doesn't already have). The fact it makes anyone who uses rituals lives easier is a just a bonus at this point. As it turns out, he got me a gift as well: A pair of ichorium wand caps, the one thing I had been dreaming about for a long time... -Blood shards.1= Reading through my older entries for inspiration on things to do with our current power(I believe we have started reaching the limit, struggling to stretch what we have as far as it will go) I noticed that I "Might" have forgotten about covering the -Blood shards.2=blood shards like I said I would a few months ago... I'd best start from the top. Blood shards, as Magus has likely stated already, are fragments left behind after vanquishing a hostile mob with a demonic weapon(The Bound sword or Energy Blaster). Upon close inspection, I see small strands that looks shockingly like that of our soul networks... Well, in theory anything with a "Soul" could have a network, but this is a -Blood shards.3=surprise nonetheless. Because of this, the small shards contain a vast pool of energy that our magics should be able to tap into. A rather unfortunate first experiment involving stone showed that this energy can be wielded to create or transform matter(I believe several others have come across similar principles to convert energy into matter using science). I say unfortunate because I was stuck inside the lab's supply -Blood shards.4=closet for a few hours to hide from the rapidly expanding stone as the released energy of the shard grew the stone to thirty two times it's former size, filling the rooms and pushing out the open door and into the hallway. (Further crafting of blood stone was done outside after that...) But regardless, the blood shards potential energy and connection to the soul network is how we manged to form bound armor so easily. -Blood shards.5=Thinking about it... Blood shards might be the answer to our power problems. The last time we needed an upgrade, we used something related to the altar... Perhaps using something related to the soul network is the next step? -The life of a Mage.1= Once more I must make a progress update, as daily life as taken up most of my time these last few weeks. Magus has started offloading some of his work onto us, dealing with small problems and formal matters, bandits and demons, and general mage work. I have been able to do a little work on the altar or blood magic in general over the last few months because of this. Thankfully, we've burned though most of the grunt work that has piled up -The life of a Mage.2=and I now have some time to conduct our research. Magus and I have spent the last week doing the calculations for upgrading the altar, determining that bloodstone should work for the capstone, and now it is just a matter of seeing how many runes we can get away with adding without nasty side effects or it all just blowing up(The other three have placed bets on this, I believe). -The life of a Mage.2= After another few weeks of testing, balancing, and error we have finished the altar upgrade. This new tier adds twenty eight more runes to the altar's structure(Seven on each side, for a grand total of fifty six), and four pillars -The life of a Mage.3=capped with large bloodstone brick(This was the best material we could find that doesn't expire or fall apart. Or, in one memorable case, actively try to kill us). With these additional runes we are projected to be making roughly one thousand three hundred LP for every heart sacrificed, a hefty improvement from our seven hundred from before. Unfortunately more work has come in for us, so once we have the altar built it will -The life of a Mage.4=be some time before we can focus on the hunt for the material for the orb. Current plan is to start with precious materials like before, and work from there. Ah, innovation... Ten percent work, fifteen percent knowledge, five percent patience, seventy percent trying random things to see what happens. More work then expected flooded in at once, and we have been struggling to keep up with it all. Vlad has been -The life of a Mage.5=acting as a healer and doctor trying to deal with a plague that has going around (Caused by a witch-in-training using the wrong vial in a love potion), and has managed to keep it from running wild. Demir has been clearing out known bandit camps, and has enjoyed a chance to test out the spells we've helped him build(Only in the mage guild are bandits considered an endangered species. This is in part due to the average -The life of a Mage.6=intelligence level of said bandits, and thinking that an area where there are people who, sometimes quite literally, shoot fire out of their hands, mouths, and other places(Mostly the apprentice mages, as a joke or party trick that has often gone very wrong) is a great place to set up shop.). Bella meanwhile has been dealing with the demons that have been wondering in, the mage guild acting as a sort of beacon to them due to the -The life of a Mage.7=thinness of the fabric of space here caused by countless magical experiments, both successful and not. Magus and I have been going through a huge pile of letters(Seriously, where are they all coming from, and how do I not notice the pile building up until it flows off the table?) from local villages and mages, ranging from simple questions about an issue or problem to requests for assistance in matters ranging from theft to -The life of a Mage.8=flooding. We've been coordinating these issues, mapping out journeys to deal with as many as possible on one trip. As a reference point for how long it has taken us to deal with it all, dust has gathered on this book since the last time I wrote. Thankfully we've sorted out the letters and referenced the villagers to mages who are closer to them(Much to said mages chagrin), so it should be a while until this -The life of a Mage.9=is an issue again... Thankfully all this time has left me with a few ideas for future projects. -The masters of T4 altars.1= The others have tried countless gems and metals trying to create a new blood orb, all of them either did nothing or created a flawed orb(Cracked or chipped, extremely fragile or incomplete). But last night I had an idea from a dream... -The masters of T4 altars.2=The weak blood shards were once part of a soul network, so what would happen if we tried to reforge it into a whole orb? It is better then any other idea we've had, so I might as well try... Success! While we did burn through several instant health flasks, we now have half a dozen new blood orbs. While we haven't named them yet, they are a true master piece... A Master blood orb, that name has a nice ring to it... I'm getting side tracked -The masters of T4 altars.3=again, but I must remember to suggest this name to the others(It at least is better then the temporary name of "Shiny yellow blood orb"). With this new found power, I might be able to bring to life some of the ideas that have been just out of reach up to this point. The first interesting property of these new orbs has been shown in our bound armor. While lesser orbs simply lower the cost, this orb is able to negate it -The masters of T4 altars.4=entirely! A simple upgrade, but a very useful one... Another altar tier, another slate tier. Dubbed "Demonic" after the insignia that has formed on it's surface, we should be able to put this to some good use... I've also noticed that a demonic slate can be used with a weak blood shard and master orb to "Grow" the shard making four more. Going over my earlier successful experiments, I might be able to tweak a few -The masters of T4 altars.5=concepts used to achieve a new result. I'm starting with the fast miner, and if boosting my arms was this useful then what would happen if I augment my legs? Using cookies, sugar, and some of the normal materials I have created a new sigil. Time for a test run... Two hours(And two very sore legs) later, I've concluded the tests. The "Sigil of Haste" boosts the users leg muscles, allowing you to both run faster and jump higher then -The masters of T4 altars.6=normal. The best part? It seems to stack with the effect of jump boost and speed(Which Vlad was kind enough to brew a potion for testing). Now then, I need a rest after all this... -The sigil of whirlwinds.1= Continuing with my thought process of "Reworking the old", I have used a master orb, demonic slate, two ghast tears, and feathers to reform an air sigil. The "Whirlwind sigil" changes the core property of the air sigil to have the winds not effect the -The sigil of whirlwinds.2=user by propelling them, but instead creates a bubble of wind around them pushing away many forms of projectiles. I should note that not all forms of projectiles can be pushed back by the winds, and it has a tendency to effect your own shots. It isn't perfect, but it is useful enough to have around in a pinch. -The sigil of compression.1= After hearing the local miners complain about always having to stop work because they've run out of space in their packs, I've built "The Sigil of "Compression". While active, the sigil will check your inventory for anything that can be compressed into -The sigil of compression.2=a "Storage" block(A two by two or three by three recipe of that item that can then be crafted back into the item. An example is redstone into redstone block.) and squeezes it together for you. Simple, but extremely effective... I should note I added a few special cases to the sigil, such as glowstone dust to glowstone and a restriction to only compress cobblestone if you have more then a stack. -The Ender severance.1= Bloody endermen... Magus sent me out to try and stock up on ender pearls, but the pests keep warping away from me only to pop up later(And almost always when I don't want them too). It is just after dawn, and I've only managed to bring back six pearls... But maybe that is enough. I recall seeing some research notes on endermen and how they are able to teleport somewhere in the library. It is only an idea, but it might be perfect for -The Ender severance.2=this task... Eureka! After reading through the notes, I worked out how endermen connect to The End as a power source for their teleportation. Using a few ender pearls and eyes of ender, I've completed a sigil that acts as a sort of "Signal blocker". In layman's terms, it disrupts the connection to The End and renders them incapable of any teleportation. Not only that, but it also prevents many forms of magic that -The Ender severance.3=relay in similar methods, such as Demir's spells and the barbaric(But nevertheless effective) act of throwing an ender pearl. From the light, I'd say it is almost sunset. Time for some well deserved payback... -The Teleposer.1= After my research into the basics of teleportation, a thought struck me: As it stands we don't have an established transportation network for mages to use, instead using the long and winding roads or other means of land travel. Sure, a witch might have a few way stones or a broom and a spell caster has a convenient recall spell, but we don't have a dedicated transportation system. Considering how much Magus -The Teleposer.2=and I travel to deal with small matters, and how often mages visit each other it is a surprise no-one has built something like this sooner! After talking with Magus about this, it turns out something like this has been tried before. The main failing point each time was the limited number of people able to use the method established. (A thaumaturge rarely knows how a waystone works and so on.) This has prompted me to create a -The Teleposer.3=means of teleportation that, once properly set up, almost anyone can use if they know how to push a button. Further research into ender pearls is required... After close analysis, I've decided that my first priority should be the improvement of the base ender pearl. As it stands, they are a little too fragile and random for reliable long term transportation. By placing a pearl inside a T4 altar I have been able to -The Teleposer.4=refine it into a focus, stronger and more predictable then the base pearl. I am currently in the middle of creating a mechanism to hold and operate the more complicated bits of the process. My materials for this is mainly gold(A metal that hasn't shown any side effects to the ender energies used), two ender pearls(One input, one output), and the focus itself to handle the conversion. I've managed to finish -The Teleposer.5=building two of the "Transportation of matter across two relative positions devices", or teleposers for short. How they work is simple(-ish): To perform a teleport you need two teleporsers. Next, bind a teleposistion focus to one of them by right clicking on the teleposer, bind it to yourself by right clicking on anything else, then slot it into the second teleposer and apply a redstone signal. If the focus is bound to teleposer A and -The Teleposer.6=placed in B, then teleposer B is triggered with redstone, everything above A will move to B, and everything above B will move to A(I hope this is clear enough description, it is hard to put into word the process. If you try it yourself, it should be clearer.). This means that if you want a two way transport, you can have two foci(One in each teleposer) and trigger the one you stand on, one have one focus and always trigger the same teleposer. -The Teleposer.7=In theory, we could build a "Transport Nexus" by having an array of teleposers bound to the same one(One A, multiple B's, triggering the B's to do the transport). What is great about these teleposers is that they don't just transport people, but any mobs or blocks in range as well. It even functions on complex blocks like furnaces and chests! With a little redstone logic, amazing things should be possible with this simple(-ish) system! -The Teleposer.8=With the completion of the final prototype, I should get some sleep... A new day, a new idea! The basic teleposition focus only transports a one meter cubed area above it, but if I improve the focus a bit in the altar it will be able to handle a three meter area! Not only that, but it can be further boosted by adding a weak blood shard so it works in a five meter area, then these new demonic shards that Bella has been gathering -The Teleposer.9=for a final upgrade to seven by seven by seven area. I should mention that the cost of each transport is based on how much is moved, and how far it is moved. It also has the quirk of being unable to transport people or mobs across dimentions. -Sigil of suppression.1= After a recent flood where Magus built a ritual right in the middle of the village to save a huge chunk of it, I've decided to try and replicate the effect on a smaller, and much more portable, scale. Thus, I've made the first version of the "Sigil of Suppression". What it does, in layman terms(You don't wont me to get into the back end details involving temporary storage in a pocket dimension) is create a bubble around you that removes any -Sigil of suppression.2=liquids, replacing it all as you leave. Using this sigil, I was able to take a leisurely stroll under the nearby lake. I am glad I remembered to bring my elemental affinity sigil however, as the early prototype fail on the way back, so I had a very soggy trip home... I "Think" I found the cause of the issue, and have patched it. -Superior capacity rune.1= Taking a break from the sigils I've been making over the last few months(How time flies...), I have shifted my attention to improving the runes we have available for our altar. After going over the design of the capacity rune, I have found room for "improvement". I have that in quotation marks because it only becomes greater then normal capacity runes if you have more then fourteen of them. You see, the "Rune of superior capacity" adds ten -Superior capacity rune.2=percent to the altars capacity, and this effect stacks multiplicatively(Layman terms: The more of the rune you have, the stronger the next rune will be) instead of the normal capacity runes static rate. Powerful, if a niche rune. -The rune of the orb.1= Considering the amount of LP we burn through on a daily basis running our sigils, powering our spells, fueling the rituals, and feeding our tools and armor, it is a miracle we don't run out of LP more often then we do. Even with our soul network topped off with a master orb, we're tapped dry within a week. Just upgrading our orbs has served us so far, but that has shown to be too unreliable and a huge investment with the altar... -The rune of the orb.2=Wait, we're always using our orbs to make runes to improve the altar, so why can't we make runes that let the altar improve the orb? It can't be a one way road, can it? Yes, if we tweak this here and shift pressure here... I'm rambling again, I must talk with the others about this! Yes, it works! By focusing the power of three blood orbs and using two demonic slates, we've created "The Rune of the Orb". This boost -The rune of the orb.3=the altars ability to feed an orb(Think of it like pressurizing air, more of it in the same amount of space), letting it add an additional two percent per rune(Additive rate, so more runes won't change how much it adds). With our master orbs, one rune is an additional twenty thousand LP. While that doesn't sound like much(To think, I use to be limited to only five thousand...), consider the number of orb runes one altar can have... -A field trip.1= After hearing the demands of the younger apprentices, we are leaving tomorrow for a quick tour of the magelands, and expect to be back by the end of this month. Talking with Magus, I agree that we've been pushing ourselves hard lately with work and research. A little rest during a vacation might be just the thing I need to gather ideas for future projects... It will also give me a chance to talk with other mages about setting up -A field trip.2=a teleposer network. It is a vacation, so a little work on side projects you normally don't have time for is normal right? Talking with Magus during the long hours on the road, a few details about the mage guild were covered on this horseback lecture. Largest of the "Nations", most of the tech focused nations won't touch this area due to the high levels of magic in the land, air, and water causing technology to become a bit -A field trip.3=more unpredictable(Read: Unstable and often highly explosive), and have instead left it in control of the mages. As a result of this, thousands of kilometers of land filled with river valleys, harsh deserts, frost and snow covered forests, fertile plains and countless other biomes have been untouched for us to expand into. To this day there are people who venture out into these untamed lands hunting fame and fortune clawing -A field trip.4=over mountains and through the ancient ruins that litter the area. However, the vast majority of settlements are close to the borders with the other nations, thriving off trade(Their gadgets might not function here, but the results are another mater. Most of the mining towns send out the harvested ores across the borders for processing). The last tally was done roughly five years ago, with the number of total -A field trip.5=settlements at around three hundred scattered thin across the mage guild. Of this, we have roughly seventy active mages and thirty classified as "Apprentices" to manage village needs and deal with problems as they arise. Generally one mage would managed half a dozen of the closest villages and any apprentices they take on comes from this area however, it was not uncommon for mages to offload work onto other local mages if -A field trip.6=they have not the time or expertise in the field and for them to take on students who seek them out as tutor. That's enough for tonight, my watch is almost over and I feel sleep calling me. I'll write down any more interesting details I learn tomorrow. Magus said we should reach another village tomorrow, and he knows an inn there that should take us in for the night(Just in time as well, I don't trust those clouds on -A field trip.7=the horizon). Today's trip was more of the same, ridding through a dense oak forest while Magus went over anything and everything about the area around us and the Mage guild in general. Mages seems to have a list of unwritten rules governing how to act, what to do, what to say... For example, it is recommend to live at least a mile and a half from the closest village. Far enough away that people won't bother you with trivial things and -A field trip.8=you keep a mysterious reputation with the people, but close enough to be convenient for buying what you need. Another example pertains to marriage: A mage is free to wed whoever they like(Even other mages), but the spouse is entitled to most decisions and any compromises favor the spouse. Being wed to a mage often causes problems for the spouse, often with relatives and friends, and is typically a huge adjustment. -A field trip.9=Doing anything to try and make it up to them is common, as the mage feels themselves a burden and cause for their loved one's strife. From what I've gathered and how Magus speaks about the topic, these are more general outcomes and human reaction to the same events that Magus has seen happen time and again instead of rules or traditions passed down from master to student. One final interesting fact is that most mages send their children to -A field trip.10=learn the art(If the child so chooses to take on magic, and the have the talent for it) with another mage, preferably one they have rarely or never met as to prevent any bias and favor. I was right about those clouds, and we have reached the small town of Salis soaked to the bone. We're all currently sitting by a fire in the Mundes inn letting our robes dry and bodies warm from the chilling rain(From the clinking outside, now -A field trip.11=hail). I plan on acquiring another books tomorrow, and writing any more facts I learn from this trip with Magus in it instead of spending the pages of this book(Already longer then I ever dreamed it would be). According to Magus, we should be able to meet another mage in two days time, a woman by the name of Athis who is skilled in botany and herbs(Any medicine made by her always trades for a fair few coins). -A field trip.12=On another note, what Magus said about about people being wary of mages is holding true. The common room has been divided into two parts since we got here: The side where we are, and everyone else who have gone a table or two away from us and keep glancing at us as if to make sure we don't do anything without giving them a chance to run. The owners of the inn, a small family known as the Eldritches, seem to be the only ones who don't -A field trip.13=seem to mind us. Their daughter, or at least someone the right age and look to be their daughter, happily walks up to us asking if we needed anything other then rooms while we rested. Vlad and Demir order food for us all, Magus inquired to the drinks available, while I have asked if she knew if the general store had any writing journals for sale. And now I'm at the point of writing things as they happen... I needs some sleep in a nice bed -A field trip.14=after all this riding(But it looks like Demir is more saddle sore then I am), and the inn keepers have giving us cheap logging in the attic with a few decent, if old mattresses in a warm room with a roof over our heads. We left the next morning after a short trip to the market(Where I managed to get a good deal on a fairly nice journal, and have already filled out a few pages on my watch last night), and now are almost at Athis's -A field trip.15=residence. We currently are taking a short rest to eat and have the horses cool off after a long trip before riding the last leg of the journey after dusk has set. I'll detail anything interesting that happens. Talking with Athis, who I have already detailed in the other book along with most of our conversation, I managed to steer the conversation to how often she needs to travel for herbs, and if she has ever been in a situation -A field trip.16=where she can't get access to anything she needs but another mage might have an abundance of. As a response, she handed me a list of everything she buys when ever possible because of how rare it is here and the versatility or uses of it. The list was ten centimeters thick. Seeing a chance to get another mage's opinion, I mentioned a recent discovery in the field of magical transportation see might be interested in seeing. At this -A field trip.17=point, she gave me a wary eye and said she still has a bag of purple chalk and a stack of waystones from the last person who said that. Inviting her outside for a demonstration using a few of the teleposers I had packed, I showed step by step the process and how simple it was to use.(It took her a moment to recover from the initial shock of teleporting, but now she takes it in her stride.) Going over a few more details inside with hot -A field trip.18=tea, I asked if she would be interested in us setting up a link in the area nearby for her to use as a means of transport. Frankly, I was nerves enough at this point that I thought see would just laugh at my new goal. Instead, she was almost begging me to set a few up around a few locations several hundred kilometers apart. At this point I felt comfortable to tell her about my grand plan for setting up one of these near every mage -A field trip.19=in the guild and at some important points, so the days of needing to travel day and night to reach another mage would be over. Not only was she on board with the idea, she even offered to help us set them up if it meant that it would be ready faster! We spent the next few hours talking about this late into the night, covering little details and about enlisting the help of other mages to set it up. -The key of binding.1= Well, this has been an interesting trip... We've been visiting every mage we pass, talking and showing off the boons of our blood magic. Most of them have been extremely accepting of our arts, and the ones that haven't been at least aren't opposed enough to get violent about the subject(However, all of them are still welcome to the idea of a transport network). We have noticed one problem on our trip, however: We can't -The key of binding.2=easily give people the things we've been working on, as they need LP to run it and it takes time to reach a point of being able to support the usage of them. We've gotten around this somewhat by binding the items we gave them to ourselves, but anything they make once we've left will be near worthless to them... THAT'S IT! I could make a device that mimics the binding of an item, copying a thread of our soul network to another device, so anyone -The key of binding.3=can craft something new and have us power it. I can use a weak blood shard to hold the soul network thread that it uses to pass on the link... Yes, I should be able to make this easily. I really should have slept after getting home, instead of going straight to building something... It took me three hours to think of using gold for the "Key of Binding". Regardless, it has been finished. All you need to do is right click with it to set -The key of binding.4=the original owner, then hand it off to the person you wish to use it. Then they right click with it, and it will bind the first thing it finds in their inventory without an owner to the person the key belongs to. While it's uses are limited, it is something you want to have around in case you ever need it. -The trials of a T5 altar.1= In other news, we've started talking about what we do now that we've started reaching the limit of our power once again. I've calculated the number of runes we would need, and have in fact already crafted all fifty two of them. We even have a few guesses on what to use for a blood orb, starting with these demonic blood shards... The problem now is the stabilizers we need. There is only one thing I've found that can handle the strain of the -The trials of a T5 altar.2=altar: The raw power of beacons. We need four bloody beacons. One is near impossible, four is... We need a miracle to get any farther. Magus says he has some plan, but I think even he is going to struggle with this. Talking with the others, I believe I should focus on setting up "The Nexus" instead of struggling with the limits of our master orbs. This is going to be a project that will take months... I've decided to limit the usage of -The trials of a T5 altar.3=the Nexus to mages, as public usage would tax my network night and day. I start tomorrow on this task, and plan on cleaning out some ruins about a kilometer to the east of us to set up the Nexus base. I already have a few dozen teleposition foci crafted, and enough teleposers to set up over a dozen locations. First on my list, Athis... I'll leave this book here, and will document anything that happens in my other book. Once I start -The trials of a T5 altar.4=research in blood magic, I will write in here again. -The price of power.1= Magus... Magus has gotten us a reservation to kill Withers. Not only that, but we each must kill one on our own. I said I wouldn't write in here again until research started again, but I felt this is significant enough to mention... We are so close to being able to upgrade the altar. If we live through this trial, that is. I have written the details of the last few days in my other book(It has gotten far more use then I ever -The price of power.2=expected), but we have them. Enough nether stars to finish our altar, enough to experiment with, enough to make being stuck in bed with this broken leg worth it all. I have been hard at work since my leg healed, ideas gushing out of me to the point I have almost stopped eating and sleeping(Thankfully, one of the others tend to drag me out occasionally). Time to document the fruits of my labor. -Demonic orb.1= Our assumption about demon blood shards was right, and after a long crafting process we have the Archmage orb. We had to spend several hours trying to fill this orb, and finally hit the cap at ten million LP, ten times the size of the master orb... We also have graduated up to the slate dubbed "Ethereal". I know this isn't much fan fair, but this has become a bit of an expected event. -The unspeakable power of the energy bazooka.1= First thing I created with this new orb was an improvement to the energy blaster, as I felt it just wasn't strong enough during the fight with the wither. Harnessing the power of a few reagents and a demonic blood shard, I have created the "Energy Bazooka"(Not a clue what a bazooka is, but Demir tells me they shoot big explosions). Costing twenty thousand LP a shot, it launches one main projectile that upon hitting something -The unspeakable power of the energy bazooka.2=explodes into twenty more smaller explosive projectiles to devastate other living things around it. I have tried tweaking it so that terrain isn't harmed, but there may be minor damage depending on what is hit. There is a "Slight" problem of recoil, but nothing we can't live with. -Acceleration runes.1= Moving my attention on to runes for our wonderful new altar, I had revelation as I noticed a speed rune next to a dislocation rune: Increasing how much LP is moved from the buffer is fine, but how about increasing how often it transfers LP? Using a few materials like buckets and an ethereal slate, I have transformed a normal speed rune into something far greater. Instead of effecting crafting speed, one rune will -Acceleration runes.2=lower the delay the altar has on moving the contents of the buffer by a twentieth of a second per rune. I have noticed a strange limitation, however: Any runes beyond nineteen seem to have so little effect it isn't noticeable anymore, so you can only have the altar transfer nineteen times a second. I will need to run some experimentation on the best ratios of acceleration to dislocation runes... -The Harvest goddess.1= Bella has dragged me with her to town so she can be sure I'm out of the lab for a while(I have noticed I'm a little pale, but I just assumed that was from all the sacrifices I've been making lately). As we ate two sandwiches at a bench on the edge of the village, I watched the farmers in the field slaving over the harvest while trying to outrun the storm just visible in the distance. Talking with Bella about ways to help -The Harvest goddess.2=them, I created the basic idea for the sigil now known as the "Harvest Goddess". It is to the "Reap of the Harvest Moon" what the "Sigil of the Green grove" is to the ritual of the green grove, performing a similar effect to the harvest moon around the user by summoning a little demonic imp(You can thank Bella for this part). As soon as we had a version ready, Bella ran out into the field with a green grove, haste, and magnetism sigil to -The Harvest goddess.3=quickly run through the field collecting the harvest behind her. Needless to say, the few farmers in the field were awe struck by this sight and a few of the newer ones thought she was a goddess sent to answer their prayers(And I liked the sound of it, so we now have a name for the sigil). -Solving a demon problem.1= A mage can never get a good rest without something happening... Magus has finally launched an operation to deal with the demon portal, and has asked Vlad, Demir, and myself to lead the siege team. He has cooked up some complicated plan that only he knows all the details, and in fact might be the only one who even has any idea if it might work(Quite a few of us felt lost when he gave the basic overview of the plan). One question asked at the -Solving a demon problem.2=meeting that felt quite memorable was "Wait, how are you able to replicate this portal?" Magus only smiled and asked him "At what point does science stop being science and starts being magic? It is the same principles and theories at work, just a different means of execution." For Magus, that seemed to answer everything. Gah, I need to focus on packing for the trip as we won't be back for a few weeks. I feel like I heading -Solving a demon problem.3=out for war, and I guess in a way we are... Alright, I did not expect to find a camp of demons when we warped to Venric's folly. I expected a hole in the fabric of space, I expected a few demons, but a little village... Not to mention the fact that I had to save a fairly inexperienced thaumaturge who hasn't dealt with demons before. He rushed in, thinking he would show off a bit. To his credit, he did manage to kill a few demons -Solving a demon problem.4=before the hoard took him down. I had to run in with a teleposer to save him, but we did discover something important: From the vanishing remains of the demons, I retreated two crystals. One was a shiny red we have named a "Life shard". The other a brilliant blue we have dubbed a "Soul shard". What is odd is that my bound armor seemed to react when I touched them, and I saw a few stray strands of soul strands between the demons -Solving a demon problem.5=and these shards. But that isn't what was really odd. I was spotted by one of the demons when I went to save the fool, and noticed two things very quickly: The demon had a connection to the portal with a few soul stands. The second thing was that it seemed to be... Vibrating? Closest word that comes to mind when I think of it. Shortly after that, two things happened: The demons started running towards us from every part of the -Solving a demon problem.6=village, and for a few hours after we left the camp seemed to be under a lockdown. The demons had doned armor, and were patrolling the area instead of building. These guards seemed a little stronger then the others, but tomarrow I plan on mounting an operation to collect more of these shards for research... -The T6 altar already.1= From what we have learned so far, these crystals seem to be ordinary crystals(Well, ordinary as anything from Tartarious can be here) filled with demonic aura and... changed by the travel through the portal. These demons have been using them as a sort of personal anchor, an extension of the main portal's influence. I have discovered that mixing these crystals together in a five to four ratio of life to soul shards forms a purple -The T6 altar already.2=block that is practically pulsating with demonic power. Since we may be here a while, I have started construction of a prototype blood altar that utilizes these new blocks for enough stability for a T6 to be possible. I have yet to try this, but if it works... Once again, a theory proved to work out. With the addition of four pillars capped in these crystal clusters, we are able to support another seventy six runes, nineteen -on each side of the altar. I have also tried the clusters out for making a blood orb, and the "Transcendent orb" was the result with a cap of thirty million LP. Sadly, I haven't had a chance to experament with this new altar or orb, so I haven't anything else to share yet. diff --git a/src/main/resources/assets/alchemicalwizardryBooks/books/book.txt b/src/main/resources/assets/alchemicalwizardryBooks/books/book.txt deleted file mode 100644 index caeadc87..00000000 --- a/src/main/resources/assets/alchemicalwizardryBooks/books/book.txt +++ /dev/null @@ -1,370 +0,0 @@ -//TITLE A classic tragic backstory -My name is Tiberius. I was a kid when the demons came for my village during The Wars. They ransacked the houses and turned the shacks into splinters, wielding fire and water to blast the land asunder. I woke up to some travelling merchants that were passing by, equipping the warriors who were futily trying to drive off the demons that still clawed the village. -I was brought to a village nearby, where a magician named Magus helped tend to my wounds. The magic that he used was something that I had never seen before � it wasn�t Thaumaturgy, nor Alchemy, and it was definitely not Botany. He winked at me once he saw that my eyes were open, holding his finger to his lips. - -Fast-forward several years, and I have learned almost everything from Master Magus, being his third student ever to master his arts. Against his wishes, I have recorded my research and put several wards and spells on this book. So welcome, apprentice. I am known as The Architect, and I am a Blood Mage. - -It took several years of pestering before I managed to convince Magus to teach me. He kept on telling me that, �Magic that uses the life essence of living beings requires patience and preparation in order to master it. One false move, go a little past your natural endurance, and you may find yourself taking a nice vacation in Tartarus.� The thing was, I wanted to go there � I had some unfinished business with the demons. - -The process that Magus originally constructed required powerful artifacts that he constructed himself, but were rather lacking where teaching was concerned. After studying a bit of alchemy and the process of �Equivalent Exchange,� I managed to construct myself an altar that would transmute items inside of its basin into new powerful forms. The only issue was that it needed a worthy catalyst, and so with a prick of the finger I set the Blood Altar alight! - -//TITLE The Blood Altar -//ITEM AWWayofTime:Altar -//ITEM AWWayofTime:sacrificialKnife -To start any form of transmutation involving blood, you would need to construct a blood altar and a sacrificial knife, as well as have a solitary diamond in your possession. After placing the blood altar down, Magus advised me to be careful as I filled it slowly with my blood, and said that I would need to be really close to the altar (about a metre) for the knife to work. With about 2 buckets of blood in the altar, which Master Magus reminds me is about 10 hearts worth, I placed the diamond inside of the altar by activating it with the diamond in hand. - -//ITEM AWWayofTime:weakBloodOrb -The blood dissipated in a cloud of red swirls as I waited for the atoms of the diamond to shift and reform. There were a few moments where the particles turned gray, which meant that the altar was empty and I had to hurry to fill it. After the diamond burst in a shower of red particles, what finally sat in the altar was a Weak Blood Orb. - -//TITLE The Soul Network - -One thing that I initially didn�t understand was the overarching connection between the blood orb and myself. When I initially met Magus, I could see many sparkling strands branching off of him, flowing throughout his house and linking with intricate stones and runic drawings. I asked Magus about the strands, but he had no clue what I was talking about. It took three years of thorough research to finally find the answer, and when I brought my notes to him he was really impressed with what I have found. - -When you send power into the orb, the energy is transmitted from the strand connecting the orb and into the very soul of the person the orb is bound to. Similarly, and Magus managed to show this effect with several of his rituals, when you use something that drains energy it will drain the energy directly from the soul. The thing is that if you use an item whose owner has no energy left, the item will instead grab the requisite energy from the user of the item. Directly. From his or her life force. As such, the unit of measurement is called �Life Points,� or LP. I experimented with this, and one heart equals 200 LP. - -I have christened this system to be the �Soul Network,� and is used in all branches of Blood Magic indirectly. - -//TITLE Basics of sigils -//ITEM AWWayofTime:blankSlate -Magus is a master at rituals. His power in the intricate layering of stones and inks is unmatched. The problem is that these rituals are rather� static in nature. Sure, being able to call the bounty of the earth to the surface is all fine and dandy, but won�t exactly protect you when you are on fire. To this end, I decided to link my soul network to powerful items that I have created. To start, I decided to transmute a piece of smooth stone in the Blood Altar with just 1kLP to create a blank slate. -The first thing I did was to arrange the blank slate with some reflective glass and my weak blood orb. Pouring my power into the configuration created a Divination Sigil, which I could link to my network and see how much power that my soul network holds. What is more, holding the sigil to the Blood Altar flooded my mind with information, giving me the knowledge about its current tier, capacity, and even how much it was holding. -Happy with the sigil, I brought a fresh unbound one to Master Magus for him to use. When I took the divination sigil back in my hands and tried to use it to view his network, for some reason I could not gleam any information from him. I don�t really see why this is, considering that I used this same method for other people and I saw that they had no power at all, but to gleam actually � nothing from Magus is strange. - -//TITLE Training, and water sigil -//ITEM AWWayofTime:waterSigil -I�ve been training my body, lately. Master Magus told me that in order to extract most of my power, I have to get my mind, soul, and body into as perfect shape as possible. Even though my mind takes time to hone, and my soul requires methods I have yet mastered to strengthen, my body is something I can actively manage. No more cookies for me, apparently, since they have horrible saturation for the work I do. And it�s hard to grow cocoa right now, anyways. -The temperature is ridiculously high, and with it the humidity is pretty freaking low. Some bright spark of a thaumaturge got it into their head that it would be good to open up the Obelisk to the far north of the village, and because of it a large influx of taint spewed forth from the eldritch tomb. It looks like someone wasn�t focusing enough on their sanity training! Thankfully Master Magus decided to head out to the site up north with a few stones and a new vat of ink, saying over his shoulder that he had a new ritual that he�d like to test to fix the problem. - -In the meantime, I was tasked to create something to fix our water problem. I thought about perhaps cooling the environment around the village in order to condense the water in the air, or perhaps find a way to create rain � neither of which I would be able to accomplish, because I�m sure that either task would take more than the 5 kLP capacity I currently have with my blood orb. So, I had to think small. - -At my desk, I mixed some dirt into the spare water I had for experimentation and started to paint on one of the blank slates I recently created to layer a bit of a base. Once I was satisfied, I took a bunch of buckets (to be safe in case that what I did would fail) and arranged them around the damp slate and then took my orb from the chest nearby. I then tapped the orb onto the slate, and the water started to boil and swirl out of the surrounding buckets, rushing into the slate! After a quick, bright flash, the new sigil lay steaming on the table in a puddle of water. - -Thankfully the sigil was what I needed. I could link it to my network and place water wherever I wanted by simply tapping it on the ground. The water was pricy, requiring a full 100 LP for each bucket�s worth that I created in the world, but for an infinite supply of water, creeping upwards to 50 full buckets for my puny network was something that I desperately needed. It�s just a shame that it started to rain an hour after I created the sigil. - -//TITLE The Lava crystal -//ITEM AWWayofTime:lavaCrystal -There was an explosion in the lab today as I was trying to work out a few more artifacts. When I tried to infuse a few buckets of lava with my power, and used some glass to contain the effect, the assembly simply burst into flames and flew me across the workshop. I wasn�t really hurt, and thankfully my water sigil was used promptly to put out the fires, however it seemed that my experiment failed rather heartily. - -Apparently I needed just a little bit more time, however, since I got it to work a week after. By combining some glass and obsidian together with a few buckets of lava, and throwing in my blood orb and a diamond to hold it all together, the diamond was transmuted into a fiery crystal that seemed to� do nothing at all. - -I peeked out from behind the blast shield, since by then I learned that playing with lava was not the safest of hobbies, and gingerly linked the crystal to my network. As soon as the pact was completed, I felt a wave of heat emanate from the crystal, and promptly tossed it into a furnace before it could burn my fingers. I was unsuccessful on that front. The furnace immediately kindled, and the pork that was sitting in the top slot began to cook quickly. -Quickly feeling a wave of nausea, I checked my network out and found that I had nothing left to offer. Once I pulled the blasted thing out of the furnace and stuffed it into a chest, the nausea subsided. So this Lava Crystal could work in any sort of furnace and feed off of the owner�s network, but if the network was dry it would instead cause the owner to feel a hearty blast of nausea unless removed from the solid fuel-burning machine. Good to know, since now I know of a way to trade my services with the blacksmiths in the village. - -//TITLE Sigil of lava -//ITEM AWWayofTime:lavaSigil -Finally, the day that I have been waiting for the past 7 months has come. The �Hell�s Harvest Festival� is a day that the village celebrates the creation of the first portal to the Nether a century ago. It�s funny that when I ask the villagers why it is that we celebrate the formation of a portal to Hell, they simply laugh and say that I�ll see when I finally go in. -The portal was located in a vast stone cathedral, a three day�s walk from the village on foot. Magus said that he�d meet us there, because he had a few things that he needed to prepare before actually going over to the Nether, but I was curious as to how he�d make it there in time � knowing Master Magus, he�d spend a day or two reading up on a new theory for a ritual and forget himself in his works. - -When we entered the hall, however, Master Magus was there already talking to one of the guards of the unlit portal, stowing away a gem into his pocket. I knew something was up, because I could see a strand connecting the gem in his pocket to both himself and one that trailed off back to the village. Not wanting to be distracted, I pulled out my wand (Master Magus insists on all of his apprentices learning of another field of magic, and Thaumaturgy has proved itself useful) and set alight the portal as was the custom of the newest member to the harvest. - -It seems that the harvest, however, was not exactly a trade. I saw giant stone walls and vast pumps throughout the land, grabbing all of the lava from the great pool below. A large collection of bound pigmen walked by, led away by someone in a full set of shining steel armour. Huge machines that processed the lava were emblazoned by the brands of industrialization: Thermal Expansion, BuildCraft, Greg Tech, and many other labels dotted throughout the base of operations. So much for a festival � it seemed that the Conglomeration, the governing body that oversaw all of the villages in the land, saw it fit to turn a civilization into a circus. - -After accepting a few supplies from the farce, I walked back home by myself two days early. There were some things that I wanted to create, but wasting my time there would have been fruitless. Clearing my desk of debris charts of alchemical constructs, I set to work with a vat of magma cream that I brought with me, attempting to combine it with another slate. Casting my orb aside, I fished the lava crystal from my chest and combined it with the cream and some fresh buckets of lava � thankfully not from the Nether. Once the light faded, I picked up the new Lava Sigil that lay in front of me. -What this sigil does is it siphons energy and uses the properties of the lava crystal to super heat rock, creating a source of lava wherever the wielder touches the ground. So, infinite lava, and infinite fire hazards. Unfortunately, it takes about 1 kLP per single use, which is a lot for my network as it stands currently. It looks like I need more power, but seeing that Master Magus is currently enjoying himself at the festival, I�m going to have to find a way to boost the blood altar myself. - -//TITLE Blank runes -//ITEM AWWayofTime:AlchemicalWizardrybloodRune -Of course! Runes! Why didn�t I think of this earlier? The power of the altar itself comes from the structure of the components used to create it. The force of the diamond alone is not enough to create stronger materials through transmutation. What I need to do is construct several runes to extend the altar, and thus the altar�s power. The only thing that I could do on such short notice is to take several blank slates (I have about 16 left) and quite a bit more stone and combine them with my Weak Blood orb. - -//IMAGE 8 854 480 alchemicalwizardry:textures/misc/screenshots/altars/T2.png - -What came next was the hard part. After I made 8 runes for myself, I sat puzzling over the altar. �How could I extend this thing?� I asked myself. It took a few hours, but when I placed the 8 runes in the ground around the altar in a ring, I felt a strange reverberation in the air. Something felt like it awoke, as if the power in the surrounding environment doubled. Quickly, I grabbed my Divination Sigil and slapped it onto the altar, and focused into it to view the power of the altar. - -I was pleased to find out that the altar was finally at its second tier, which should open up many more transmutation recipes. The problem now, as I sank slowly into my bed to sleep after the long day, was to find out what I could now do. - -Although Magus was pleased with the upgraded altar, I was caught in a bind. I couldn�t seem to do anything with it that the previous altar could not do. The first thing I did was I placed one of my leftover blank slates into the basin, and it promptly consumed 2 kLP worth of essence as it reinforced the structure. Although this Reinforced Slate was much more durable, this process appeared to make the slate no longer work with creating both the lava and water sigils, as well as making it a waste to use in additional rune creation. - -//TITLE Speed runes -//ITEM AWWayofTime:speedRune -I can note, however, that when I combined one of the runes with a few more blank slates and some leftover sugar from the harvest it seemed to augment the altar even further. The sugar had to be laid in a configuration that mimicked a bow and arrow on top of the rune, and by doing so it created what I can dub a Speed Rune. What this rune appeared to do was increase the speed of the altar�s processes, both the transmutation rate as well as the speed that a bound orb will consume the essence from the altar, by an additive 20% per rune. This tier doesn�t seem perfect, however, since it seems that for the second tier only the four edge runes (not the corners) could be used as upgrade �slots� for the purpose of augmentation of the altar. - -//TITLE A shining green orb -//ITEM AWWayofTime:apprenticeBloodOrb -The �eureka� moment came when I accidentally dropped a few things on the floor of the lab. When I bent down to phish the items from the floor I noticed that one of the emeralds rolled right up to the altar, almost as if it longed to be inside of its basin. It occurred to me that if a simple diamond inside the altar created a weak blood orb, perhaps a much rarer gem would make a stronger version! Quickly fetching my knife from the table, I filled up the altar over the course of the day so that I could make sure I didn�t mess anything up, and then dropped the emerald into the altar. -The speed runes made sure that the transmutation took no time at all! Wow, those things work fast � I better make a note of removing the runes when I try to create more difficult items inside of the altar, because if I was not prepared it would have chewed through my supply in no time! After a few tantalizing moments waiting, the altar burst in a shower of particles and the new orb sat there, revolving on top of the altar. -Master Magus must have heard my shout of exclamation, because he hurried over from his side of the house and helped me to my feet. Not noticing the pain in my palm from earlier, I reached for the orb and sealed it to my network. Master Magus then helped me to fill up the orb inside of the altar, and when we were done that day I had a total of 25 kLP inside of my network. - -//TITLE The void sigil -//ITEM AWWayofTime:voidSigil -After resting the rest of the day at the insistence of Magus, I returned to work this morning full of inspiration. While I laid in bed half awake, the thought struck me that so far I had managed to use sigils to create fluid. So why not make one that can remove it? My first attempts with things like glass bottles and bowls failed with all of them working for a brief moment, then returning to their old forms. It was almost lunch time when the thought crossed me that I used buckets for the first two, so why not here? Half an hour, six buckets, a bit of twine and a reinforced slate later I had my first void sigil. - - -//TITLE Air sigil -//ITEM AWWayofTime:airSigil -While tending to our small farm a few days later, I noticed a bird land on our fence. I turned to face it as it flied off, and had a revelation as I watched how it flew. If I could use magic to create the gust of wind like that made by bird wings, I could fly through the air! After hastily finishing the days� chores, working out details in my head all the while, I rushed to my workstation to start work on what I have now dubbed the �Air Sigil�. Using feathers and a Ghast tear as ink on a reinforced slate, I formed a sigil that on use creates a rush of air behind where you face to propel you forward. Flight using this sigil is fast, if a little pricey and hard to control, not like the flight provided by Magus's thaumostatic harness. Also, landing is a bit of a problem as I learned the hard way... - -//TITLE Sigil of Sight -//ITEM AWWayofTime:seerSigil -I've grown a little annoyed at my divination sigil. While it is able to read the current tier and essence of a blood altar, that is ALL it can read. As a result, my current goal is to improve its design using my new blood orb. So far it is going well. The �Sigil of Sight� is able to read the buffers of the altar to give how much they store, as well as how far along a craft in the altar is and how fast it is using LP. The downside of this upgrade is that it loses the power to read the altar's tier or the users soul network, but so far this is an unavoidable loss. For now I'll settle with what it does now, and might try to improve it further later. - -//TITLE Advanced altar mechanics - -Even after all this time, I still don't fully understand the blood altar. Sure, I built the thing, but... It is almost like working directly with raw life essence has given it a bit of life of its own. After running a few experiments to try and make my life easier, I've noticed some odd behavior coming from it. - -First, I tried using some basic piping to extract life essence to store later to use for more pricey infusions. As it turns out, the altar doesn't like giving up its essence. I managed to get a bucket of LE out before it seemed to slow to a trickle feed, nothing more the 20LP a second. Further tests show that it has a �Buffer� tank that siphons off LP from the main tank, holding roughly 10% of the main tanks capacity. As I mentioned, it does this very slowly so piping is out of the question for now... - -A later test shows that it also doesn't like essence being piped in, as a similar restriction apples to imputing essence. I will defiantly need to find a way to improve this transfer rate... - -Another strange phenomenon about the altar is its �Hunger� for life. After the failure of the piping, I tried using a few regeneration potions from the local village to speed up the rate at which I recovered health. A normal or extended potion seemed fine, and were very effective for speeding up slate production. But a strengthened regeneration potion caused the altar to have a slight �Hum� about it, and I felt my energy being sapped by something. After talking with Magus about this, we have determined the altar senses the life flowing through us, and the potion makes the altars �Hunger� for this life create a sort of aura that causes you to lose energy akin to hunger. As a result of this, regeneration is still effective, but a sizable supply of food is needed for extended use to recover energy. - -//TITLE Sigil of the fast miner -//ITEM AWWayofTime:sigilOfTheFastMiner -I've decided to experiment with passive effects for sigils, since everything so far has been an active effect. While wondering through town looking for supplies, I noticed people cutting wood for a fire and some smashing stones to build a small fire pit. I keep coming back to how slow both of them were in my train of thought, then started going over ways to improve the tools. Then it hit me: Why improve the tools when you can improve the person? A few anatomy books and failed tests later, I hand the sigil of the Fast miner(Name pending) and two very tired arms. After activating the sigil, it speeds up muscle movements in the arms allowing you to break blocks far faster at a small LP cost every few seconds. I do need to keep reminding myself to turn it off when not in use, but the stinging pain of life essence being taken is always a quick reminder... - -//TITLE Soul Fray - -Today I pushed myself too far. I've gotten close a few times, but today was the first time I have passed out due to draining too much life essence. Magus was thankfully with me at the time, and moved me to a bed to recover. As I regained my senses, I noticed something odd about my soul network thread: They were thin and looked damaged. As I kept watching my threads, it seemed like they were slowly reforming and repairing themselves. I mentioned this to Magus, and we theorized that after coming so close to death my soul was still recovering from the shock. I made a sacrifice at the altar to test this, and it seems that this state effects how much life essence a heart is worth quite negatively with it only giving a tenth the normal amount. - -//TITLE Green grove -//ITEM AWWayofTime:growthSigil -Today Magus showed me his green grove ritual, a way to speed up crops. Unfortunately, it is very static and has a small range, limiting its uses. To amend this, I've been toying with the concepts behind the -ritual in an attempt to make it more portable. By creating an ink from oak saplings and sugarcane, then inscribing a rune on a reinforced slate I have created the sigil of the green grove. It seems a little slower and more expensive then the ritual form, but it can be carried on your person and acts like bonemeal when used on plants. While I had it active I could barely keep up with our farm, and by the end we needed to give a few of our neighbors some of the excess we didn't need. They all accepted it, but with varied degrees of reluctance. - -//TITLE Dagger of sacrifice -//ITEM AWWayofTime:daggerOfSacrifice -My work on sigils has slowed for now as I'm reaching the limits of what my little green orb can do after only two weeks. As a result, I have turned my attentions to other aspects such as runes to pass the time. Magus is currently out dealing with a large forest fire to the east of us, and the village is in a bit of a lull with nothing planed for several weeks. Right now my task is to slaughter a few chickens Magus brought home from the market to prepare on his return home, and it seems the perfect time to test an idea I've been thinking about for a while... I will not mark it here, just in case it is another false hope. - -Success! I've managed to perfect my idea for a new source of life essence. Before the only option was to cut ourselves to give our own life essence to the altar, but now we have a way to use other living things as a source. Unfortunately, it is a little gruesome and a bit �All or nothing� from them... Regardless, it works! - -...I have realized that, in my excitement, I may have forgotten to write down what it is. I call it �The Dagger of Sacrifice�, formed in a blood altar out of an iron sword and 3K LP. The dagger doesn't deal much in the way of damage. It doesn't need to, as its main purpose is to �Mark� a living thing for the altar which takes care of the rest by forcibly extracting their life essence all at once. Through my tests it seems that your common farm animal's life isn't worth nearly as much as a person, only giving 250LP regardless of where it comes from. While I set about cleaning the animals after the tests were done, a common zombie managed to sneak in the door I left open when bringing the chickens down here. As soon as I noticed it, reflexes that were being drilled in by Magus every morning kicked in and I managed to poke it with my dagger before it had a chance to hurt me. At first I thought nothing happened, then it fell to the floor as lifeless as it should have already been. I glanced at the altar, quickly noting that a zombie was worth 500LP. Looking over the fallen creature as it started crumbling, I noticed that some of the defenses Magus had set up took there toll on the zombie as it was burned and freshly cut in several areas... Seems that the amount of HP they have is irreverent to the altar, giving the same amount of LP regardless. - -As I finished preparing the meat to cook after disposing of the zombies ash(Which reminds me, I wanted to look up why this happens...), a very dark thought crossed my mind. The knife works by giving life to the altar. The dagger works by taking life forcibly from a target. What would happen if a human was marked by the dagger? I asked this to Magus, after showing him the dagger and telling him everything that happened. �In all honestly, I'm not sure. I have a theory, but I don't really feel like testing it...� I asked him to elaborate, so he told me the basics of it. It seemed that source of the life essence mattered with the dagger, since the chicken and zombie gave two different amounts, so depending on the person in question they would be split into one of three groups: Passive, Hostile, and Innocent. The passive would be like the chicken, only giving a little. The hostile would be the bandits, the thieves, the murderers. The ones who gave into evil, and now seek to hurt or steal from anyone. The unredeemed, and would probably be like the zombie. The final group were the innocents, anyone who doesn't fall into the first two groups. It was nothing but a guess, but we agreed that using the dagger on an Innocent villager would extract all of their life essence like ours. 2K LP, all at once... We also couldn't work out what would divide the passive from the rest, but it was only a theory so we put it to rest. - -//TITLE Runes of Sacrifice -//ITEM AWWayofTime:runeOfSelfSacrifice -Looking at these little speed runes, I have decided to see what else can I make. My goal isn't anything in particular, just improving it in some way. The speed rune was made with powdered sugar, so another type of powder should work... - -Redstone failed, gunpowder failed, glowstone... Glowstone worked. I currently have no idea what it does, all I know is it didn't fall to bits seconds after creating it so that is progress. The altar seems to accept it as a proper rune, so all that is left is to run a few tests in the morning. For now, I am tired and feel a bed calling me... - -I've run dozens of tests trying to find out what this new rune does, after two days of obsessing over this I finally noticed it. It slightly increases the amount of LP self sacrifice gives. When I said slight, I mean one rune increases LP gained by ten percent on an additive rate. For those who don't understand that, it basically adds an additional twenty LP per self sacrifice. If my theory is right, I should be able to make a similar rune for normal sacrifice... What else would the altar respond to? - -//ITEM AWWayofTime:runeOfSacrifice -Well, if there is anything thaumaturgy and magic in general has taught me, it is that gold is a very good metal for magic. By simply replacing the glowstone in the recipe with gold ingots, a sacrifice rune is formed. It has the same additional ten percent addition per rune per sacrifice, meaning the more LP of the mob sacrificed the more LP the runes adds. This has got me thinking... The altar was constructed with both diamond and gold. It seems to resonate with the diamond enough to make the first blood orb, and even a second, so why not try making one out of gold? I'll need to revisit this idea later as a test run showed some reaction to a block of solid gold(I didn't ask Magus where he got it, and he doesn't seem forthcoming about these matters), but the altar couldn't cope with the strain needed to shape the block. Before catastrophic failure happened, a few safety precautions Magus and I had built into the altar triggered, stopping the transmutation before... Well, neither of us are really sure what would happen. But Magus said he has dealt with matters of unstable and untested magic, and knew most of them end with a crater in the floor(Hence the safety precautions). - -It has been a few days since the experiment with the gold block. Magus and I have been discussing what to do now, as the altar is getting bigger then the basement. Magus has suggested moving it to some of the lower basement floors, but considering just how large it might be in the future... I finally got him to agree to building it behind his home, as long as I helped put up a few wards and spells to keep people away. Currently we're planning out the structure and needed runes for upgrading. The current altar only has eight runes, but what I have planned will more then triple that number to twenty eight. The current limitation we suffer is the strength of the altar itself, as it can only take power from runes adjacent to it. My plan is to use something the altar is naturally attuned to as a way to not only increase the range of this effect, but act as a counter balance and stabilizing it to prevent it from becoming uncontrollable. For this to work, the blocks in question must be above the altar and an equal distance apart. - -We've run several tests and calculations, and have a layout in mind for this upgrade. Four pillars topped with glowstone blocks, twenty runes in sections of five, built one block down and two out from the last set of runes. In theory this should provide a huge boost in power to the altar without risking our safety(Well, more then we normally risk it), but until we test full scale I can't be sure. For now, we have a lot of runes to make. After much debate we've decided to invest in the �Self sacrifice� runes, as having a steady supply of mobs will be tricky. But now I face the issue of making dozens of reinforced slates... I need to think on this. - -//TITLE The blood letters pack -It's so simple! I've discovered a way of obtaining LP for making slates that means I don't wait at the altar all day: The Blood letter's Backpack. Made with a modified leather chest-piece with a blank slate reinforced glass tank, it allows the wearer to gather LP by feeding it into the pack over time. Whenever the wearer has more then five hearts, the pack will drain their life and store it inside up to 10K LP to be dumped into an altar later. This pack does have two shortcomings, however. When the life essence is deposited into the altar, runes will have no bonus to the amount added. The second problem is that the altar will only accept LP from the pack when not performing a transmutation. Despite these limitations, it will prove quite valuable for simply allowing me to step away from the altar to do other tasks. - -This is a simple progress update, as it's been a few weeks since I last wrote in this journal. I've been making slow, but steady progress with assembling the slates needed for the runes and we're now halfway through. This isn't the only reason for the lack of entries, as I've been preoccupied with my research thorough thaumaturgy. An old friend of Magus has been visiting and happens to be a well versed thaumaturge, and he has been giving me pointers on how I could be doing better while Magus has been preoccupied in his library dealing with a mountain of paperwork. Now that Master Ridden has returned home, I hope to progress farther in making runes in the next few days. - -//TITLE And then there was five -Or not, as it seems Fate has other far more interesting plans for us. Today we had a knock on our door while I was making the last of the runes, and after opening it was greeted by three apparent orphans. The two boys in the front looked like they were brothers, or at least close relatives. The girl hiding behind them on the other hand had a very different hair and eye color, so relation was unlikely at best. All of them were covered in dirt, clothing ripped, torn, and patched with various levels of skill. The one on the left had an old sword with a chipped blade on his side, was slightly thinner and taller then the his brother, had a few deep scars that looked recent, long and messy dark brown hair, and was looking at me with a kind poker face. The brother looked more muscled, and was staring at me with a very analytical eyes and a similar poker face, his hair was slightly shorter and lighter then his brother. From what I could see of the girl, she had a simple dress on that was almost caked in dirt and dried mud. The fabric near her elbows was becoming thread bare, and a large rip near the bottom of the dress exposed some of her right leg. Her hair was a light blond, almost pale white color, but the most shocking feature was her eyes... I haven't seen haunted eyes like that in years, and last time it was in a mirror. From the looks of them, all of them hadn't ate anything in days and seemed to have everything they own on their bodies or in the simple packs on their backs. - -I asked them if there was anything they needed, to which the elder brother said they were looking for master Magus. I called Magus to the door, visitors being a rare thing as it stands with ones who ask for him by name and not clearly mages being rarer still. Five minutes later we all sat in the main room, eating simple sandwiches I had prepared for us all at the request of Magus. Needless to say, this day was not going as expected. Magus spent the next few minutes practically interrogating the elder brother , asking questions on both of our minds. As it turns out the two brothers, Vlad and Demier, use to be caravan traders, eldest a alchemist with basic knowledge of potion brewing, younger with enough mana and training already to cast basic spells. The girl on the other hand had a story all her own. From what the brothers had managed to gather, her village was raided like my own was and she was evidently the sole survivor. What shocked me was when they said she was found wandering the ashs, demons having left hours before without so much as a scratch on her body. Vlad was with the traders when they found her, and he was forced to leave them if he wanted to help the girl named Bella. - -Their story seemed to win Magus over, as he told them he would try to do what he can for them.. Not long after that, Magus asked me to help him do some shopping for our new guests. On the way to the village, Magus asked me what I thought of the three. �I can't say I believe all their story, but I also don't think their lying. Did you notice the girls eyes? Haven�t see a look like that since...�. Magus finished for me with �Your own?�. I nodded at the dark memories of that time. We continued going over the details of their story, but we agreed that just leaving them in the cold wasn't an option worth considering. We decided to at least try to keep our recent endeavors into blood magic a secret from them, but when push comes to shove I think we might have to let them in on the secret. Magus let out a long sigh. �It's been years since I had to juggle this many apprentices at once. I'm going to need your help training them. But something tell me that we're going to be learning as much from them as they will from us...� I asked him why he felt that way, and he said it was just a gut feeling. I must say I had a similar feeling. Things like this don't happen without reason, and of all mages to come to they stopped at our door, something far easier said then done. - -An hour later we returned home, both our arms heavy with fabrics, food, and other necessities that we will need to take care of the new apprentices. I watched in amazement as the three ate, trying to make up for days with little food all at once. After that, Magus and I laid the three on various chairs and couches to rest, the strain of travel catching up with them. While Magus dug around looking for a few of his old things that we'd soon need, I started creating some new clothing from enchanted fabric for the three to replace their current worn and ratty clothing. Now that that is done, I should try to get some sleep. Something is telling me tomorrow is going to be quite busy. - -The Early this morning Magus and I started carving out the earth for the three new bedrooms, since the old ones Magus use to have had since been converted into a storage closet, a alchemy lab, and small study. It didn't take nearly as long as I expected with Magus using a few spells to clear away earth while I went behind using an equal trade foci to transmute it into stone brick before gravity caught on. Once that was done, Magus raised a few walls to separate the space into three rooms and a hallway. Only after that was done did I notice the three children had awoken, and were watching us as we worked. Magus told them that he had some spare furniture in some storerooms they could use, but sadly only knew of one bed. It didn't take long for them to decide Bella got the bed, the brothers would make do with a pillow and a blanket on the floor. - -After that we spent the rest of the day hunting for then moving furniture to their rooms, building little work areas and libraries for each of them. The following day was more of the same, with the evening filled with helping them find books to read from the grand library. Vlad grabbed as many alchemy books as possible, Demir took a few books on spell casting, and Bella took a Lexica botanica to read through. Later this evening, after the three had retired to their rooms, I sat in the main room with Magus, arms and legs aching from the heavy lifting of the last two days. I told Magus how I thought their rooms should be almost finished, and how I spent the last hour before they retired just answering seemingly endless questions. �I'm sure. I've gone through the same more then once, when I have apprentices new to magic. You were the same, I recall.� I opened my mouth to protest, but closed it as I thought back to those days. I decided I probably was as bad as them, and left it at that. - -It's been just over a week, and the three have settled in nicely. They join Magus and I in morning exorcising, have started studying like true scholars, and have calmed the hungry nodes in their stomachs(Well, Vlad and Bella have. Demir on the other hand is another matter, but I feel he will always be like that.) Unfortunately, like true scholars and mages they've stumbled into places we didn't want them to go. Vlad has created a chemistry set that uses life essence from a blood orb as a fuel source, Demir has turned an old table into a way to use life essence to cast powerful spells, and Bella... She's left me questioning what I know about demons, after taming one and using a blood orb to bind it to her. All three of them have stumbled blindly into blood magic, and now I don't think we'll be able to stop them. Magus and I have agreed to give them a choice in whether they are blood mages or not, but I've seen the light in their eyes... I can't imagine any of them saying no. To seal their dedication to the art, we will have them make blood orbs of their own to use. - -//TITLE The next step: Tier three -//IMAGE 8 854 480 alchemicalwizardry:textures/misc/screenshots/altars/T3.png -Even with all the chaos of the last week I've managed to finish the altar construction, and it has been more successful then I predicted. With full access to twenty eight runes, each heart is now worth over seven hundred LP. I've already started prepping to try again with the gold block, having a few instant healing potions at hand. I got a brief glimpse with my sigil of sight, and this transmutation will take twenty five thousand LP to finish, over double what the altar can hold! Writing this down does give me an idea, however.... I'll need to look into it further once I have finished making this. - -//ITEM AWWayofTime:magicianBloodOrb - -It was close, but I finished the orb today. I was down to the last of my three potions and barely had the strength left to hold the knife, but I pulled through and finished my shiny new blood orb! I've already used it to craft a few things I had made before, and extra lava and air sigil, and it handles it all with such ease! Now that this is finished, I have a small list of ideas to go through... - -To start off the process, I want a stronger slate. As it stands the reinforced type is cracking under the strain I'm starting to place on it. Well, I got a new slate type when I last upgraded the altar... Let's see if it works again. It does! A reinforced slate in a tier three altar with around five thousand LP makes a new slate... I'll call it an imbued slate for now, and come up with a better name later. - -//TITLE New runes -//ITEM AWWayofTime:AlchemicalWizardrybloodRune:1 -First up to the drawing board: Rune of Capacity. The basic idea is simply to add more room to the altar, so a greater amount of LP can be stored at once to make bulk crafting or difficult crafts easier. Each rune adds 1K to the altar's main tank capacity, but what is interesting is that the �Buffer� tanks expend as well to a lesser degree. From a few trial tests(My back is starting to hurt from moving runes all day), the buffer tanks are always ten percent of the main tanks size. This will be something to keep in mind later. - -After helping patch a hole in the wall caused by Demir accidentally unleashing a spell, then helping Vlad dispose of a few failed alchemical �Experiments�, I finally have an hour to myself to work on my ideas for runes. After the success of the last documented attempt, I've been on a bit of a failure streak. I've have runes fail to do anything, crumble to dust, blow up, and one attempt turned into cheese(I asked Magus about this, and said this isn't the first time he's seen that happen to a magical experiment. However he is just as stumped as I am over why it is always cheese, of all things). Thankfully, I finally found something that doesn't need a blast shield to use or starts growing mold after a while. - -//ITEM AWWayofTime:AlchemicalWizardrybloodRune:2 - -Named the dislocation rune, it's only function is to increase the rate the life essence flows into and out of the buffers. Each rune increased the transfer rate by twenty percent per rune, and this effect stack manipulatively. That sounds great, until you realize the first rune only raises the transfer rate by four LP a second. Needless to say, your going to need around a dozen of these runes before you have any noticeable impact on the transfer rate. While these runes make it possible to automate the creation of slates by storing the life essence outside the altar, you're going to be sacrificing speed, capacity, and generation efficiency for this. - -//TITLE Sigil of Magnetism -//ITEM AWWayofTime:sigilOfMagnetism -It's been a few weeks since I last made any headway with my blood magic research, needing to help with the tutoring of the Vlad, Demir and Bella along with my normal duties as a mage. I've had to leave twice this month in order to sort out some mess or another, whether is be a helping with a pack of wild wolves or a bad harvest. Today, however, I managed to get some inspiration for a new sigil. When I was in the market buy more food, I noticed two children playing with a rock that was slightly magnetic. They were just running around, seeing what it would stick too and cheering when it did, or seeing how close they could push it to something before it pulled itself closer... That is what sparked my idea: A sigil that acts as a magnet, pulling items off the ground closer to you. In theory I could rig the magic on it to apply a similar effect to all items and not just metallic ones... - -Three hours later, and my sigil is finished. It needs a great deal of mass in the form of four iron blocks, along with the classic gold plating infused into an imbued slate(Drat, I never did work on a better name). This sigil needs to be toggled to activate, and while active will draw all nearby items to the user if they have room for it. Simple, but very effective.... - -//TITLE The Phantom Bridge -//ITEM AWWayofTime:sigilOfTheBridge -I've been asked to visit a small town to settle a few complaints that have been voiced lately by them, and am currently surprised that a closer bridge isn't one of them. I've had to walk three miles to cross this river, and now must walk another two tomorrow to reach them. If only I didn't need a bridge, or had thought to grab my air sigil(I still have a bruise from the last landing I had with it, so I wasn't keen on using it again so soon.) Wait... If if I had a bridge that went with me? Better yet, what if I had a bridge that formed under my feet as I walked? Yes, that would be amazing... - -I'm back home after dealing with a feud over who really owned a cow(Answer: Neither of them, it wondered into town and they both thought it was one of their own), and have set out my work station to try and capitalize on my idea. I'd want the sigil to place blocks that are phantasmal, only there temporarily before fading into nothing after I leave. For that I'd need a special material... Soul sand might work... Add in a little stone for structuring around an imbued state, then use the orb... Done! Now then, for a test run... Drat, I left the auto-writing quill running again. - -It works better then I hoped! The sigil creates a small five by five platform under me, staying at the same elevation as I walk through the air. Not only that, but I've tweaked it so that holding shift lowers the platform by one under you, and the blocks it makes can be easily broken for a quick decent. Not only that, but it will only spawn the blocks if you are on the ground, jumping or flying will not cause the bridge to reform until you touch solid ground, unless you hold shift forcing it to form under you. And for one final convenience touch, right clicking a phantom block with a block replaces it with that block, making roofs and platforms far easier to build. That should be enough for one night, I'll dub this sigil �The Phantom Bridge� and call it a night. - -//TITLE Sigil of holding -//ITEM AWWayofTime:sigilOfHolding -Vlad asked me to help him today, requesting my assistance learning the sigils. Part way through he asked if it was ever burdensome having so many on me at once... And I told him it was. Now with a little of his help I've created the sigil of holding, and it... Well, it holds other sigils. Shift right clicking with it while another sigil is in your inventory will cause it to absorb that sigil, taking all of it's powers and allowing you to swap between them with a shift right click. Unfortunately, it can't hold that many sigils(Only four) and not every sigil wants be become a part of it. Also, I had to ask Master Magus for help removing sigils from it as it refused to let them go. For this task he created the ritual of unbinding, a rather grand looking ritual for such a simple task I must say. - -//TITLE Elemental affinity -//ITEM AWWayofTime:sigilOfElementalAffinity -Demir hurt himself again today with a fire spell that backfired(Well, it worked perfectly if setting the ground around him on fire was the intention). In hopes of stopping further injuries, I have infused the powers of the water, lava, and air sigil into an imbued slate. This seems let the sigil act as protective aura around the user, shielding them from drowning, burning, or falling damage at a high over time LP cost. Since I asked Demir to use it he hasn't burned or bruised himself, but did pass out once from a lack of LP to fuel it. Sometimes solving one problem only makes more... But he has been learning, and I've been amazed at what his spells could do. Recently he made a long range teleportation spell and a flight spell not unlike the air sigil, but far faster. - -//TITLE Recreating ritual stones -//CRAFTING AWWayofTime:ritualStone -//CRAFTING AWWayofTime:masterStone -After a few days of nothing, I turned my attention to the construction of Master Magus's ritual stones. Looking them over, I might be able to replicate their usage and features using reinforced slates and obsidian... - -Master stone, more complicated then the average ritual stone might be possible if I use my magician�s blood orb and four ritual stones to handle the complex nature of it, along with a little more obsidian... Yes, yes it should be possible to recreate them without sacrificing any usage of them. After asking him how he originally made the elemental scribing tools, I believe I can also replicate the manufacturing of them in the blood altar... But it looks like the dusk inks are too complex for this altar to handle, creating an ink closer to dark gray then midnight black... Perhaps I'll have the power to form them later, for now these four will work. - -//TITLE Shining a Blood Lamp -//ITEM AWWayofTime:itemBloodLightSigil -I had a flash of inspiration today (Quite literally, as watching a few town guards light a replacement torch nearly blinded me from the sudden light). They spend so much on coal and charcoal to fuel those things... What if I had a simple replacement? A near invisible light source that never goes out, can be made almost endlessly, and can easily be carried on your person? Never again would you need to place a torch to light a room, and they can ruin a rooms look(Not to mention the fire hazard they pose, ruining the look even more. �Charred mess� is never in style.). - -Harnessing the power of glowstone by running a �Current� of LP through it, I can create a sigil that fires a projectile that upon landing forms a stable light source par with that of torch. The only sign of its existence is the light it gives off and faint red particles. While it uses a small amount of LP, the advantage over carrying stacks of torches is enough to justify it. - -//TITLE Bound armor -Today Magus gave us a lecture on armors, going over the practical applications(Protection from large pointy sticks shoved in your direction and holding magic to improve the abilities of the wearer), typical construction of armor, and notable armors through the ages (And the very fatal flaws that their owners eventually discovered, much to their short lived dismay). Seeing and reading all this, I feel it is time I take my own try at this art using blood magic. Testing a wide array of materials and structures, I discovered a process to make an almost indestructible metal using a casing filled with life essence with glass hardened with diamonds and reinforced with bright red blood shards(More on their properties later) Magus showed me a while back (Making the prototypes of this armor took longer then you would believe). The process needs the soul of a demon bound to it, but this seems to be a small price to pay. - -//CRAFTING AWWayofTime:emptySocket -//CRAFTING AWWayofTime:armourForge - -To start, you need to make a �Soul armor forge�. This block summons the demon soul and controls the transformation of the �Socket� blocks into proper armor. By placing the filled socket blocks around the soul armor forge in roughly the shape of the armor piece you want with the forge in a gap, you set what it makes. Right clicking the forge will then finish the process, creating the armor piece and binding the demon to the shards inside the armor. You will need to bind the armor to yourself, allowing the armor to drain your network to repair any damage it takes(Another benefit of using blood shards in the creation). After donning the armor(Making a few adjustments, still refining the creation process), I asked Magus to help test just how resistant this armor really is. Several nasty bruises later, we have decided this armor shields the wearer from ninety percent of damage from mundane damage sources. What is interesting is that it also blocks roughly eighty percent of magical damage, meaning many armor piercing methods are far weaker. The metal also doesn't seem to hold enchantments, and the demons inside reacts quite negatively to our attempts to do so. - -Using the ritual of unbinding, we are able to deconstruct the armor back into the component sockets and anything that was inside them. I mention this because we seem to be able to �Augment� the armor before creation by adding a combination of sigils, blood shard, and an orb. The sigil added to the armor piece(You can add anything to the socket by right clicking with the item in hand) determines the effect, and adds a passive cost to wearing the armor piece. The blood shard lets you add an upgrade, the weak shards we have at our disposal only allow one upgrade but in theory a stronger shard should allow more to be added. Finally, the orb seems to lower the cost of the upgrade. Every sigil seems to have something to do with the normal effect of the sigil, either giving you a passive bonus or having the effect of the sigil happen automatically around you. A few examples are a water sigil making you immune to drowning, the fast miner always active, and a green grove sigil acts around you. - -//TITLE Sanguine armor -//ITEM AWWayofTime:sanguineRobe -I've managed to use my new found knowledge of armors and experience making bound armor to try and improve thaumium armor using blood magic. By throwing goggles of reviling or thumium chestplate, leggings, or boots the ritual transform the armor into a �Sanguine� version, with a small vis discount and protection par that of pure diamond. What is really interesting is that this armor can be augmented with runic shielding, and then socketed into bound armor in the same fashion as a sigil to pass on the runic shielding, with the bonus that adding the sanguine helm to the bound helm well allow the wearer to see things like aura nodes as if you had goggles on. I should note that you can only socket a sanguine armor piece into a same armor type(Helm in the helm, boots in the boots...), and that any vis discount is lost when you do this. - -//TITLE Suppressing the soul -//ITEM AWWayofTime:armourInhibitor -Having the armors special effects all the time has become a little bothersome. To deal with this I have managed to create an �Armor Inhibitor� to repress the special effects it offers in the cases they are more bothersome then helpful. Unfortunately, it is a bit all or nothing in this regard. - -//TITLE The ritual diviner -//ITEM AWWayofTime:itemRitualDiviner -It's coming up to the three year anniversary of Magus taking my on as an apprentice. Time seems to have flown by while I've been engrossed in research on applications of blood magic and working with Magus... I should make a gift for Magus to as a thank you for these last few years. Considering the complex nature of his rituals, an aid to building them might just be the perfect gift... - -Ugh... Making a way to build rituals easier proved to be quite the task(And it reminds me of the rule of conservation of effort...), but I finally have it ready in time for the anniversary. While it isn't cheap to craft(Costing the four elemental inks, four diamonds and an emerald), I've gone to pains to make it easy to use. Shift right clicking will cycle through a preset list of rituals, and shift right clicking on a block with also rotate the direction the ritual will face(For anything like the ritual of speed, where that matters). Shift left clicking will go through this list in reverse, for those times you accidentally go past the one you want. By normal right clicking on a master ritual stone the diviner will take stones out of your inventory, place then in the world and ink them to build the set ritual. To make it clear it is working, it emits green particle effects whenever it places a block successfully. However, it can only place a block in an empty space. Anything at all in the way will stop the process until the obstruction has been removed. It is a small annoyance, but nothing major enough to risk breaking the diviner(Again). - -Magus adores his gift, having rituals faster and easier to build is the one thing he could actually use(That he doesn't already have). The fact it makes anyone who uses rituals lives easier is a just a bonus at this point. As it turns out, he got me a gift as well: A pair of ichorium wand caps, the one thing I had been dreaming about for a long time... - -//TITLE Blood shards -//ITEM AWWayofTime:weakBloodShard -Reading through my older entries for inspiration on things to do with our current power(I believe we have started reaching the limit, struggling to stretch what we have as far as it will go) I noticed that I �Might� have forgotten about covering the blood shards like I said I would a few months ago... I'd best start from the top. - -Blood shards, as Magus has likely stated already, are fragments left behind after vanquishing a hostile mob with a demonic weapon(The Bound sword or Energy Blaster). Upon close inspection, I see small strands that looks shockingly like that of our soul networks... Well, in theory anything with a �Soul� could have a network, but this is a surprise nonetheless. Because of this, the small shards contain a vast pool of energy that our magics should be able to tap into. A rather unfortunate first experiment involving stone showed that this energy can be wielded to create or transform matter(I believe several others have come across similar principles to convert energy into matter using science). I say unfortunate because I was stuck inside the lab's supply closet for a few hours to hide from the rapidly expanding stone as the released energy of the shard grew the stone to thirty two times it's former size, filling the rooms and pushing out the open door and into the hallway. (Further crafting of blood stone was done outside after that...) But regardless, the blood shards potential energy and connection to the soul network is how we manged to form bound armor so easily. - -Thinking about it... Blood shards might be the answer to our power problems. The last time we needed an upgrade, we used something related to the altar... Perhaps using something related to the soul network is the next step? - -//TITLE The life of a Mage -Once more I must make a progress update, as daily life as taken up most of my time these last few weeks. Magus has started offloading some of his work onto us, dealing with small problems and formal matters, bandits and demons, and general mage work. I have been able to do a little work on the altar or blood magic in general over the last few months because of this. Thankfully, we've burned though most of the grunt work that has piled up and I now have some time to conduct our research. Magus and I have spent the last week doing the calculations for upgrading the altar, determining that bloodstone should work for the capstone, and now it is just a matter of seeing how many runes we can get away with adding without nasty side effects or it all just blowing up(The other three have placed bets on this, I believe). - -//IMAGE 8 854 480 alchemicalwizardry:textures/misc/screenshots/altars/T4.png - -After another few weeks of testing, balancing, and error we have finished the altar upgrade. This new tier adds twenty eight more runes to the altar's structure(Seven on each side, for a grand total of fifty six), and four pillars capped with large bloodstone brick(This was the best material we could find that doesn't expire or fall apart. Or, in one memorable case, actively try to kill us). With these additional runes we are projected to be making roughly one thousand three hundred LP for every heart sacrificed, a hefty improvement from our seven hundred from before. Unfortunately more work has come in for us, so once we have the altar built it will be some time before we can focus on the hunt for the material for the orb. Current plan is to start with precious materials like before, and work from there. Ah, innovation... Ten percent work, fifteen percent knowledge, five percent patience, seventy percent trying random things to see what happens. - -More work then expected flooded in at once, and we have been struggling to keep up with it all. Vlad has been acting as a healer and doctor trying to deal with a plague that has going around (Caused by a witch-in-training using the wrong vial in a love potion), and has managed to keep it from running wild. Demir has been clearing out known bandit camps, and has enjoyed a chance to test out the spells we've helped him build(Only in the mage guild are bandits considered an endangered species. This is in part due to the average intelligence level of said bandits, and thinking that an area where there are people who, sometimes quite literally, shoot fire out of their hands, mouths, and other places(Mostly the apprentice mages, as a joke or party trick that has often gone very wrong) is a great place to set up shop.). Bella meanwhile has been dealing with the demons that have been wondering in, the mage guild acting as a sort of beacon to them due to the thinness of the fabric of space here caused by countless magical experiments, both successful and not. Magus and I have been going through a huge pile of letters(Seriously, where are they all coming from, and how do I not notice the pile building up until it flows off the table?) from local villages and mages, ranging from simple questions about an issue or problem to requests for assistance in matters ranging from theft to flooding. We've been coordinating these issues, mapping out journeys to deal with as many as possible on one trip. - -As a reference point for how long it has taken us to deal with it all, dust has gathered on this book since the last time I wrote. Thankfully we've sorted out the letters and referenced the villagers to mages who are closer to them(Much to said mages chagrin), so it should be a while until this is an issue again... Thankfully all this time has left me with a few ideas for future projects. - -//TITLE The masters of T4 altars -//ITEM AWWayofTime:masterBloodOrb -The others have tried countless gems and metals trying to create a new blood orb, all of them either did nothing or created a flawed orb(Cracked or chipped, extremely fragile or incomplete). But last night I had an idea from a dream... The weak blood shards were once part of a soul network, so what would happen if we tried to reforge it into a whole orb? It is better then any other idea we've had, so I might as well try... - -Success! While we did burn through several instant health flasks, we now have half a dozen new blood orbs. While we haven't named them yet, they are a true master piece... A Master blood orb, that name has a nice ring to it... I'm getting side tracked again, but I must remember to suggest this name to the others(It at least is better then the temporary name of �Shiny yellow blood orb�). With this new found power, I might be able to bring to life some of the ideas that have been just out of reach up to this point. - -The first interesting property of these new orbs has been shown in our bound armor. While lesser orbs simply lower the cost, this orb is able to negate it entirely! A simple upgrade, but a very useful one... - -Another altar tier, another slate tier. Dubbed �Demonic� after the insignia that has formed on it's surface, we should be able to put this to some good use... I've also noticed that a demonic slate can be used with a weak blood shard and master orb to �Grow� the shard making four more. - -Going over my earlier successful experiments, I might be able to tweak a few concepts used to achieve a new result. I'm starting with the fast miner, and if boosting my arms was this useful then what would happen if I augment my legs? Using cookies, sugar, and some of the normal materials I have created a new sigil. Time for a test run... Two hours(And two very sore legs) later, I've concluded the tests. The �Sigil of Haste� boosts the users leg muscles, allowing you to both run faster and jump higher then normal. The best part? It seems to stack with the effect of jump boost and speed(Which Vlad was kind enough to brew a potion for testing). Now then, I need a rest after all this... - -//TITLE The sigil of whirlwinds -//ITEM AWWayofTime:sigilOfWind -Continuing with my thought process of �Reworking the old�, I have used a master orb, demonic slate, two ghast tears, and feathers to reform an air sigil. The �Whirlwind sigil� changes the core property of the air sigil to have the winds not effect the user by propelling them, but instead creates a bubble of wind around them pushing away many forms of projectiles. I should note that not all forms of projectiles can be pushed back by the winds, and it has a tendency to effect your own shots. It isn't perfect, but it is useful enough to have around in a pinch. - -//TITLE The sigil of compression -//ITEM AWWayofTime:itemCompressionSigil -After hearing the local miners complain about always having to stop work because they've run out of space in their packs, I've built �The Sigil of �Compression�. While active, the sigil will check your inventory for anything that can be compressed into a �Storage� block(A two by two or three by three recipe of that item that can then be crafted back into the item. An example is redstone into redstone block.) and squeezes it together for you. Simple, but extremely effective... I should note I added a few special cases to the sigil, such as glowstone dust to glowstone and a restriction to only compress cobblestone if you have more then a stack. - -//TITLE The Ender severance -Bloody endermen... Magus sent me out to try and stock up on ender pearls, but the pests keep warping away from me only to pop up later(And almost always when I don't want them too). It is just after dawn, and I've only managed to bring back six pearls... But maybe that is enough. I recall seeing some research notes on endermen and how they are able to teleport somewhere in the library. It is only an idea, but it might be perfect for this task... - -Eureka! After reading through the notes, I worked out how endermen connect to The End as a power source for their teleportation. Using a few ender pearls and eyes of ender, I've completed a sigil that acts as a sort of �Signal blocker�. In layman's terms, it disrupts the connection to The End and renders them incapable of any teleportation. Not only that, but it also prevents many forms of magic that relay in similar methods, such as Demir's spells and the barbaric(But nevertheless effective) act of throwing an ender pearl. From the light, I'd say it is almost sunset. Time for some well deserved payback... - -//TITLE The Teleposer -After my research into the basics of teleportation, a thought struck me: As it stands we don't have an established transportation network for mages to use, instead using the long and winding roads or other means of land travel. Sure, a witch might have a few way stones or a broom and a spell caster has a convenient recall spell, but we don't have a dedicated transportation system. Considering how much Magus and I travel to deal with small matters, and how often mages visit each other it is a surprise no-one has built something like this sooner! - -After talking with Magus about this, it turns out something like this has been tried before. The main failing point each time was the limited number of people able to use the method established. (A thaumaturge rarely knows how a waystone works and so on.) This has prompted me to create a means of teleportation that, once properly set up, almost anyone can use if they know how to push a button. Further research into ender pearls is required... - -After close analysis, I've decided that my first priority should be the improvement of the base ender pearl. As it stands, they are a little too fragile and random for reliable long term transportation. By placing a pearl inside a T4 altar I have been able to refine it into a focus, stronger and more predictable then the base pearl. I am currently in the middle of creating a mechanism to hold and operate the more complicated bits of the process. My materials for this is mainly gold(A metal that hasn't shown any side effects to the ender energies used), two ender pearls(One input, one output), and the focus itself to handle the conversion. - -I've managed to finish building two of the �Transportation of matter across two relative positions devices�, or teleposers for short. How they work is simple(-ish): To perform a teleport you need two teleporsers. Next, bind a teleposistion focus to one of them by right clicking on the teleposer, bind it to yourself by right clicking on anything else, then slot it into the second teleposer and apply a redstone signal. If the focus is bound to teleposer A and placed in B, then teleposer B is triggered with redstone, everything above A will move to B, and everything above B will move to A(I hope this is clear enough description, it is hard to put into word the process. If you try it yourself, it should be clearer.). This means that if you want a two way transport, you can have two foci(One in each teleposer) and trigger the one you stand on, one have one focus and always trigger the same teleposer. In theory, we could build a �Transport Nexus� by having an array of teleposers bound to the same one(One A, multiple B's, triggering the B's to do the transport). - -What is great about these teleposers is that they don't just transport people, but any mobs or blocks in range as well. It even functions on complex blocks like furnaces and chests! With a little redstone logic, amazing things should be possible with this simple(-ish) system! With the completion of the final prototype, I should get some sleep... - -A new day, a new idea! The basic teleposition focus only transports a one meter cubed area above it, but if I improve the focus a bit in the altar it will be able to handle a three meter area! Not only that, but it can be further boosted by adding a weak blood shard so it works in a five meter area, then these new demonic shards that Bella has been gathering for a final upgrade to seven by seven by seven area. I should mention that the cost of each transport is based on how much is moved, and how far it is moved. It also has the quirk of being unable to transport people or mobs across dimentions. - -//TITLE Sigil of suppression -After a recent flood where Magus built a ritual right in the middle of the village to save a huge chunk of it, I've decided to try and replicate the effect on a smaller, and much more portable, scale. Thus, I've made the first version of the �Sigil of Suppression�. What it does, in layman terms(You don't wont me to get into the back end details involving temporary storage in a pocket dimension) is create a bubble around you that removes any liquids, replacing it all as you leave. Using this sigil, I was able to take a leisurely stroll under the nearby lake. I am glad I remembered to bring my elemental affinity sigil however, as the early prototype fail on the way back, so I had a very soggy trip home... I �Think� I found the cause of the issue, and have patched it. - -//TITLE Superior capacity rune -Taking a break from the sigils I've been making over the last few months(How time flies...), I have shifted my attention to improving the runes we have available for our altar. After going over the design of the capacity rune, I have found room for �improvement�. I have that in quotation marks because it only becomes greater then normal capacity runes if you have more then fourteen of them. You see, the �Rune of superior capacity� adds ten percent to the altars capacity, and this effect stacks multiplicatively(Layman terms: The more of the rune you have, the stronger the next rune will be) instead of the normal capacity runes static rate. Powerful, if a niche rune. - -//TITLE The rune of the orb -Considering the amount of LP we burn through on a daily basis running our sigils, powering our spells, fueling the rituals, and feeding our tools and armor, it is a miracle we don't run out of LP more often then we do. Even with our soul network topped off with a master orb, we're tapped dry within a week. Just upgrading our orbs has served us so far, but that has shown to be too unreliable and a huge investment with the altar... Wait, we're always using our orbs to make runes to improve the altar, so why can't we make runes that let the altar improve the orb? It can't be a one way road, can it? Yes, if we tweak this here and shift pressure here... I'm rambling again, I must talk with the others about this! - -Yes, it works! By focusing the power of three blood orbs and using two demonic slates, we've created �The Rune of the Orb�. This boost the altars ability to feed an orb(Think of it like pressurizing air, more of it in the same amount of space), letting it add an additional two percent per rune(Additive rate, so more runes won't change how much it adds). With our master orbs, one rune is an additional twenty thousand LP. While that doesn't sound like much(To think, I use to be limited to only five thousand...), consider the number of orb runes one altar can have... - -//TITLE A field trip -After hearing the demands of the younger apprentices, we are leaving tomorrow for a quick tour of the magelands, and expect to be back by the end of this month. Talking with Magus, I agree that we've been pushing ourselves hard lately with work and research. A little rest during a vacation might be just the thing I need to gather ideas for future projects... It will also give me a chance to talk with other mages about setting up a teleposer network. It is a vacation, so a little work on side projects you normally don't have time for is normal right? - -Talking with Magus during the long hours on the road, a few details about the mage guild were covered on this horseback lecture. Largest of the �Nations�, most of the tech focused nations won't touch this area due to the high levels of magic in the land, air, and water causing technology to become a bit more unpredictable(Read: Unstable and often highly explosive), and have instead left it in control of the mages. As a result of this, thousands of kilometers of land filled with river valleys, harsh deserts, frost and snow covered forests, fertile plains and countless other biomes have been untouched for us to expand into. To this day there are people who venture out into these untamed lands hunting fame and fortune clawing over mountains and through the ancient ruins that litter the area. However, the vast majority of settlements are close to the borders with the other nations, thriving off trade(Their gadgets might not function here, but the results are another mater. Most of the mining towns send out the harvested ores across the borders for processing). - -The last tally was done roughly five years ago, with the number of total settlements at around three hundred scattered thin across the mage guild. Of this, we have roughly seventy active mages and thirty classified as �Apprentices� to manage village needs and deal with problems as they arise. Generally one mage would managed half a dozen of the closest villages and any apprentices they take on comes from this area however, it was not uncommon for mages to offload work onto other local mages if they have not the time or expertise in the field and for them to take on students who seek them out as tutor. - -That's enough for tonight, my watch is almost over and I feel sleep calling me. I'll write down any more interesting details I learn tomorrow. - -Magus said we should reach another village tomorrow, and he knows an inn there that should take us in for the night(Just in time as well, I don't trust those clouds on the horizon). Today�s trip was more of the same, ridding through a dense oak forest while Magus went over anything and everything about the area around us and the Mage guild in general. Mages seems to have a list of unwritten rules governing how to act, what to do, what to say... For example, it is recommend to live at least a mile and a half from the closest village. Far enough away that people won't bother you with trivial things and you keep a mysterious reputation with the people, but close enough to be convenient for buying what you need. Another example pertains to marriage: A mage is free to wed whoever they like(Even other mages), but the spouse is entitled to most decisions and any compromises favor the spouse. Being wed to a mage often causes problems for the spouse, often with relatives and friends, and is typically a huge adjustment. Doing anything to try and make it up to them is common, as the mage feels themselves a burden and cause for their loved one's strife. From what I've gathered and how Magus speaks about the topic, these are more general outcomes and human reaction to the same events that Magus has seen happen time and again instead of rules or traditions passed down from master to student. One final interesting fact is that most mages send their children to learn the art(If the child so chooses to take on magic, and the have the talent for it) with another mage, preferably one they have rarely or never met as to prevent any bias and favor. - -I was right about those clouds, and we have reached the small town of Salis soaked to the bone. We're all currently sitting by a fire in the Mundes inn letting our robes dry and bodies warm from the chilling rain(From the clinking outside, now hail). I plan on acquiring another books tomorrow, and writing any more facts I learn from this trip with Magus in it instead of spending the pages of this book(Already longer then I ever dreamed it would be). According to Magus, we should be able to meet another mage in two days time, a woman by the name of Athis who is skilled in botany and herbs(Any medicine made by her always trades for a fair few coins). On another note, what Magus said about about people being wary of mages is holding true. The common room has been divided into two parts since we got here: The side where we are, and everyone else who have gone a table or two away from us and keep glancing at us as if to make sure we don't do anything without giving them a chance to run. The owners of the inn, a small family known as the Eldritches, seem to be the only ones who don't seem to mind us. Their daughter, or at least someone the right age and look to be their daughter, happily walks up to us asking if we needed anything other then rooms while we rested. Vlad and Demir order food for us all, Magus inquired to the drinks available, while I have asked if she knew if the general store had any writing journals for sale. And now I'm at the point of writing things as they happen... I needs some sleep in a nice bed after all this riding(But it looks like Demir is more saddle sore then I am), and the inn keepers have giving us cheap logging in the attic with a few decent, if old mattresses in a warm room with a roof over our heads. - -We left the next morning after a short trip to the market(Where I managed to get a good deal on a fairly nice journal, and have already filled out a few pages on my watch last night), and now are almost at Athis's residence. We currently are taking a short rest to eat and have the horses cool off after a long trip before riding the last leg of the journey after dusk has set. I'll detail anything interesting that happens. - -Talking with Athis, who I have already detailed in the other book along with most of our conversation, I managed to steer the conversation to how often she needs to travel for herbs, and if she has ever been in a situation where she can't get access to anything she needs but another mage might have an abundance of. As a response, she handed me a list of everything she buys when ever possible because of how rare it is here and the versatility or uses of it. The list was ten centimeters thick. Seeing a chance to get another mage's opinion, I mentioned a recent discovery in the field of magical transportation see might be interested in seeing. At this point, she gave me a wary eye and said she still has a bag of purple chalk and a stack of waystones from the last person who said that. Inviting her outside for a demonstration using a few of the teleposers I had packed, I showed step by step the process and how simple it was to use.(It took her a moment to recover from the initial shock of teleporting, but now she takes it in her stride.) Going over a few more details inside with hot tea, I asked if she would be interested in us setting up a link in the area nearby for her to use as a means of transport. Frankly, I was nerves enough at this point that I thought see would just laugh at my new goal. Instead, she was almost begging me to set a few up around a few locations several hundred kilometers apart. At this point I felt comfortable to tell her about my grand plan for setting up one of these near every mage in the guild and at some important points, so the days of needing to travel day and night to reach another mage would be over. Not only was she on board with the idea, she even offered to help us set them up if it meant that it would be ready faster! We spent the next few hours talking about this late into the night, covering little details and about enlisting the help of other mages to set it up. - -//TITLE The key of binding -Well, this has been an interesting trip... We've been visiting every mage we pass, talking and showing off the boons of our blood magic. Most of them have been extremely accepting of our arts, and the ones that haven't been at least aren't opposed enough to get violent about the subject(However, all of them are still welcome to the idea of a transport network). We have noticed one problem on our trip, however: We can't easily give people the things we've been working on, as they need LP to run it and it takes time to reach a point of being able to support the usage of them. We've gotten around this somewhat by binding the items we gave them to ourselves, but anything they make once we've left will be near worthless to them� THAT'S IT! I could make a device that mimics the binding of an item, copying a thread of our soul network to another device, so anyone can craft something new and have us power it. I can use a weak blood shard to hold the soul network thread that it uses to pass on the link... Yes, I should be able to make this easily. - -I really should have slept after getting home, instead of going straight to building something... It took me three hours to think of using gold for the �Key of Binding�. Regardless, it has been finished. All you need to do is right click with it to set the original owner, then hand it off to the person you wish to use it. Then they right click with it, and it will bind the first thing it finds in their inventory without an owner to the person the key belongs to. While it's uses are limited, it is something you want to have around in case you ever need it. - -//TITLE The trials of a T5 altar -In other news, we've started talking about what we do now that we've started reaching the limit of our power once again. I've calculated the number of runes we would need, and have in fact already crafted all fifty two of them. We even have a few guesses on what to use for a blood orb, starting with these demonic blood shards... The problem now is the stabilizers we need. There is only one thing I've found that can handle the strain of the altar: The raw power of beacons. We need four bloody beacons. One is near impossible, four is... We need a miracle to get any farther. Magus says he has some plan, but I think even he is going to struggle with this. Talking with the others, I believe I should focus on setting up �The Nexus� instead of struggling with the limits of our master orbs. This is going to be a project that will take months... I've decided to limit the usage of the Nexus to mages, as public usage would tax my network night and day. I start tomorrow on this task, and plan on cleaning out some ruins about a kilometer to the east of us to set up the Nexus base. I already have a few dozen teleposition foci crafted, and enough teleposers to set up over a dozen locations. First on my list, Athis... I'll leave this book here, and will document anything that happens in my other book. Once I start research in blood magic, I will write in here again. - -//TITLE The price of power -Magus... Magus has gotten us a reservation to kill Withers. Not only that, but we each must kill one on our own. I said I wouldn't write in here again until research started again, but I felt this is significant enough to mention... We are so close to being able to upgrade the altar. If we live through this trial, that is. - -I have written the details of the last few days in my other book(It has gotten far more use then I ever expected), but we have them. Enough nether stars to finish our altar, enough to experiment with, enough to make being stuck in bed with this broken leg worth it all. - -I have been hard at work since my leg healed, ideas gushing out of me to the point I have almost stopped eating and sleeping(Thankfully, one of the others tend to drag me out occasionally). Time to document the fruits of my labor. - -//TITLE Demonic orb -Our assumption about demon blood shards was right, and after a long crafting process we have the Archmage orb. We had to spend several hours trying to fill this orb, and finally hit the cap at ten million LP, ten times the size of the master orb... We also have graduated up to the slate dubbed �Ethereal�. I know this isn't much fan fair, but this has become a bit of an expected event. - -//TITLE The unspeakable power of the energy bazooka -First thing I created with this new orb was an improvement to the energy blaster, as I felt it just wasn't strong enough during the fight with the wither. Harnessing the power of a few reagents and a demonic blood shard, I have created the �Energy Bazooka�(Not a clue what a bazooka is, but Demir tells me they shoot big explosions). Costing twenty thousand LP a shot, it launches one main projectile that upon hitting something explodes into twenty more smaller explosive projectiles to devastate other living things around it. I have tried tweaking it so that terrain isn't harmed, but there may be minor damage depending on what is hit. There is a �Slight� problem of recoil, but nothing we can't live with. - -//TITLE Acceleration runes -Moving my attention on to runes for our wonderful new altar, I had revelation as I noticed a speed rune next to a dislocation rune: Increasing how much LP is moved from the buffer is fine, but how about increasing how often it transfers LP? Using a few materials like buckets and an ethereal slate, I have transformed a normal speed rune into something far greater. Instead of effecting crafting speed, one rune will lower the delay the altar has on moving the contents of the buffer by a twentieth of a second per rune. I have noticed a strange limitation, however: Any runes beyond nineteen seem to have so little effect it isn't noticeable anymore, so you can only have the altar transfer nineteen times a second. I will need to run some experimentation on the best ratios of acceleration to dislocation runes... -//TITLE The Harvest goddess -Bella has dragged me with her to town so she can be sure I'm out of the lab for a while(I have noticed I'm a little pale, but I just assumed that was from all the sacrifices I've been making lately). As we ate two sandwiches at a bench on the edge of the village, I watched the farmers in the field slaving over the harvest while trying to outrun the storm just visible in the distance. Talking with Bella about ways to help them, I created the basic idea for the sigil now known as the �Harvest Goddess�. It is to the �Reap of the Harvest Moon� what the �Sigil of the Green grove� is to the ritual of the green grove, performing a similar effect to the harvest moon around the user by summoning a little demonic imp(You can thank Bella for this part). As soon as we had a version ready, Bella ran out into the field with a green grove, haste, and magnetism sigil to quickly run through the field collecting the harvest behind her. Needless to say, the few farmers in the field were awe struck by this sight and a few of the newer ones thought she was a goddess sent to answer their prayers(And I liked the sound of it, so we now have a name for the sigil). - -//TITLE Solving a demon problem -A mage can never get a good rest without something happening... Magus has finally launched an operation to deal with the demon portal, and has asked Vlad, Demir, and myself to lead the siege team. He has cooked up some complicated plan that only he knows all the details, and in fact might be the only one who even has any idea if it might work(Quite a few of us felt lost when he gave the basic overview of the plan). One question asked at the meeting that felt quite memorable was �Wait, how are you able to replicate this portal?� Magus only smiled and asked him �At what point does science stop being science and starts being magic? It is the same principles and theories at work, just a different means of execution.� For Magus, that seemed to answer everything. Gah, I need to focus on packing for the trip as we won't be back for a few weeks. I feel like I heading out for war, and I guess in a way we are... - -Alright, I did not expect to find a camp of demons when we warped to Venric's folly. I expected a hole in the fabric of space, I expected a few demons, but a little village... Not to mention the fact that I had to save a fairly inexperienced thaumaturge who hasn't dealt with demons before. He rushed in, thinking he would show off a bit. To his credit, he did manage to kill a few demons before the hoard took him down. I had to run in with a teleposer to save him, but we did discover something important: From the vanishing remains of the demons, I retreated two crystals. One was a shiny red we have named a �Life shard�. The other a brilliant blue we have dubbed a �Soul shard�. What is odd is that my bound armor seemed to react when I touched them, and I saw a few stray strands of soul strands between the demons and these shards. But that isn't what was really odd. - -I was spotted by one of the demons when I went to save the fool, and noticed two things very quickly: The demon had a connection to the portal with a few soul stands. The second thing was that it seemed to be... Vibrating? Closest word that comes to mind when I think of it. Shortly after that, two things happened: The demons started running towards us from every part of the village, and for a few hours after we left the camp seemed to be under a lockdown. The demons had doned armor, and were patrolling the area instead of building. These guards seemed a little stronger then the others, but tomarrow I plan on mounting an operation to collect more of these shards for research... - -//TITLE The T6 altar already -From what we have learned so far, these crystals seem to be ordinary crystals(Well, ordinary as anything from Tartarious can be here) filled with demonic aura and... changed by the travel through the portal. These demons have been using them as a sort of personal anchor, an extension of the main portal's influence. I have discovered that mixing these crystals together in a five to four ratio of life to soul shards forms a purple block that is practically pulsating with demonic power. Since we may be here a while, I have started construction of a prototype blood altar that utilizes these new blocks for enough stability for a T6 to be possible. I have yet to try this, but if it works... - -Once again, a theory proved to work out. With the addition of four pillars capped in these crystal clusters, we are able to support another seventy six runes, nineteen on each side of the altar. I have also tried the clusters out for making a blood orb, and the �Transcendent orb� was the result with a cap of thirty million LP. Sadly, I haven't had a chance to experament with this new altar or orb, so I haven't anything else to share yet. diff --git a/src/main/resources/assets/alchemicalwizardryBooks/lang/en_US.lang b/src/main/resources/assets/alchemicalwizardryBooks/lang/en_US.lang deleted file mode 100644 index 73b24898..00000000 --- a/src/main/resources/assets/alchemicalwizardryBooks/lang/en_US.lang +++ /dev/null @@ -1,414 +0,0 @@ ---Entries-- -aw.entries.architect.intro=My name is Tiberius. I was a kid when the demons came for my village during The Wars. They ransacked the houses and turned the shacks into splinters, wielding fire and water to blast the land asunder. I woke up to some travelling merchants that were passing by, equipping the warriors who were futily trying to drive off the demons that still clawed the village. I was brought to a village nearby, where a magician named Magus helped tend to my wounds. The magic that he used was something that I had never seen before - it wasn't Thaumaturgy, nor Alchemy, and it was definitely not Botany. He winked at me once he saw that my eyes were open, holding his finger to his lips. Fast-forward several years, and I have learned almost everything from Master Magus, being his third student ever to master his arts. Against his wishes, I have recorded my research and put several wards and spells on this book. So welcome, apprentice. I am known as The Architect, and I am a Blood Mage. It took several years of pestering before I managed to convince Magus to teach me. He kept on telling me that, "Magic that uses the life essence of living beings requires patience and preparation in order to master it. One false move, go a little past your natural endurance, and you may find yourself taking a nice vacation in Tartarus." The thing was, I wanted to go there - I had some unfinished business with the demons. The process that Magus originally constructed required powerful artifacts that he constructed himself, but were rather lacking where teaching was concerned. After studying a bit of alchemy and the process of "Equivalent Exchange," I managed to construct myself an altar that would transmute items inside of its basin into new powerful forms. The only issue was that it needed a worthy catalyst, and so with a prick of the finger I set the Blood Altar alight! -aw.entries.architect.bloodAltar.1=To start any form of transmutation involving blood, you would need to construct a blood altar and a sacrificial knife, as well as have a solitary diamond in your possession. After placing the blood altar down, Magus advised me to be careful as I filled it slowly with my blood, and said that I would need to be really close to the altar (about a metre) for the knife to work. With about 2 buckets of blood in the altar, which Master Magus reminds me is about 10 hearts worth, I placed the diamond inside of the altar by activating it with the diamond in hand. -aw.entries.architect.bloodAltar.2=The blood dissipated in a cloud of red swirls as I waited for the atoms of the diamond to shift and reform. There were a few moments where the particles turned gray, which meant that the altar was empty and I had to hurry to fill it. After the diamond burst in a shower of red particles, what finally sat in the altar was a Weak Blood Orb. -aw.entries.architect.soulNetwork=One thing that I initially didn't understand was the overarching connection between the blood orb and myself. When I initially met Magus, I could see many sparkling strands branching off of him, flowing throughout his house and linking with intricate stones and runic drawings. I asked Magus about the strands, but he had no clue what I was talking about. It took three years of thorough research to finally find the answer, and when I brought my notes to him he was really impressed with what I have found. When you send power into the orb, the energy is transmitted from the strand connecting the orb and into the very soul of the person the orb is bound to. Similarly, and Magus managed to show this effect with several of his rituals, when you use something that drains energy it will drain the energy directly from the soul. The thing is that if you use an item whose owner has no energy left, the item will instead grab the requisite energy from the user of the item. Directly. From his or her life force. As such, the unit of measurement is called "Life Points," or LP. I experimented with this, and one heart equals 200 LP. I have christened this system to be the "Soul Network," and is used in all branches of Blood Magic indirectly. -aw.entries.architect.blankSlate=Magus is a master at rituals. His power in the intricate layering of stones and inks is unmatched. The problem is that these rituals are rather... static in nature. Sure, being able to call the bounty of the earth to the surface is all fine and dandy, but won't exactly protect you when you are on fire. To this end, I decided to link my soul network to powerful items that I have created. To start, I decided to transmute a piece of smooth stone in the Blood Altar with just 1kLP to create a blank slate. -aw.entries.architect.divination=The first thing I did was to arrange the blank slate with some reflective glass and my weak blood orb. Pouring my power into the configuration created a Divination Sigil, which I could link to my network and see how much power that my soul network holds. What is more, holding the sigil to the Blood Altar flooded my mind with information, giving me the knowledge about its current tier, capacity, and even how much it was holding. Happy with the sigil, I brought a fresh unbound one to Master Magus for him to use. When I took the divination sigil back in my hands and tried to use it to view his network, for some reason I could not gleam any information from him. I don't really see why this is, considering that I used this same method for other people and I saw that they had no power at all, but to gleam actually... nothing from Magus is strange. -aw.entries.architect.waterSigil.1=I've been training my body, lately. Master Magus told me that in order to extract most of my power, I have to get my mind, soul, and body into as perfect shape as possible. Even though my mind takes time to hone, and my soul requires methods I have yet mastered to strengthen, my body is something I can actively manage. No more cookies for me, apparently, since they have horrible saturation for the work I do. And it's hard to grow cocoa right now, anyways. The temperature is ridiculously high, and with it the humidity is pretty freaking low. Some bright spark of a thaumaturge got it into their head that it would be good to open up the Obelisk to the far north of the village, and because of it a large influx of taint spewed forth from the eldritch tomb. It looks like someone wasn't focusing enough on their sanity training! Thankfully Master Magus decided to head out to the site up north with a few stones and a new vat of ink, saying over his shoulder that he had a new ritual that he'd like to test to fix the problem. -aw.entries.architect.waterSigil.2=In the meantime, I was tasked to create something to fix our water problem. I thought about perhaps cooling the environment around the village in order to condense the water in the air, or perhaps find a way to create rain - neither of which I would be able to accomplish, because I'm sure that either task would take more than the 5 kLP capacity I currently have with my blood orb. So, I had to think small. At my desk, I mixed some dirt into the spare water I had for experimentation and started to paint on one of the blank slates I recently created to layer a bit of a base. Once I was satisfied, I took a bunch of buckets (to be safe in case that what I did would fail) and arranged them around the damp slate and then took my orb from the chest nearby. I then tapped the orb onto the slate, and the water started to boil and swirl out of the surrounding buckets, rushing into the slate! After a quick, bright flash, the new sigil lay steaming on the table in a puddle of water. Thankfully the sigil was what I needed. I could link it to my network and place water wherever I wanted by simply tapping it on the ground. The water was pricy, requiring a full 100 LP for each bucket's worth that I created in the world, but for an infinite supply of water, creeping upwards to 50 full buckets for my puny network was something that I desperately needed. It's just a shame that it started to rain an hour after I created the sigil. -aw.entries.architect.lavaCrystal=There was an explosion in the lab today as I was trying to work out a few more artifacts. When I tried to infuse a few buckets of lava with my power, and used some glass to contain the effect, the assembly simply burst into flames and flew me across the workshop. I wasn't really hurt, and thankfully my water sigil was used promptly to put out the fires, however it seemed that my experiment failed rather heartily. Apparently I needed just a little bit more time, however, since I got it to work a week after. By combining some glass and obsidian together with a few buckets of lava, and throwing in my blood orb and a diamond to hold it all together, the diamond was transmuted into a fiery crystal that seemed to... do nothing at all. I peeked out from behind the blast shield, since by then I learned that playing with lava was not the safest of hobbies, and gingerly linked the crystal to my network. As soon as the pact was completed, I felt a wave of heat emanate from the crystal, and promptly tossed it into a furnace before it could burn my fingers. I was unsuccessful on that front. The furnace immediately kindled, and the pork that was sitting in the top slot began to cook quickly. Quickly feeling a wave of nausea, I checked my network out and found that I had nothing left to offer. Once I pulled the blasted thing out of the furnace and stuffed it into a chest, the nausea subsided. So this Lava Crystal could work in any sort of furnace and feed off of the owner's network, but if the network was dry it would instead cause the owner to feel a hearty blast of nausea unless removed from the solid fuel-burning machine. Good to know, since now I know of a way to trade my services with the blacksmiths in the village. -aw.entries.architect.hellHarvest=Finally, the day that I have been waiting for the past 7 months has come. The "Hell's Harvest Festival" is a day that the village celebrates the creation of the first portal to the Nether a century ago. It's funny that when I ask the villagers why it is that we celebrate the formation of a portal to Hell, they simply laugh and say that I'll see when I finally go in. The portal was located in a vast stone cathedral, a three day's walk from the village on foot. Magus said that he'd meet us there, because he had a few things that he needed to prepare before actually going over to the Nether, but I was curious as to how he'd make it there in time - knowing Master Magus, he'd spend a day or two reading up on a new theory for a ritual and forget himself in his works. When we entered the hall, however, Master Magus was there already talking to one of the guards of the unlit portal, stowing away a gem into his pocket. I knew something was up, because I could see a strand connecting the gem in his pocket to both himself and one that trailed off back to the village. Not wanting to be distracted, I pulled out my wand (Master Magus insists on all of his apprentices learning of another field of magic, and Thaumaturgy has proved itself useful) and set alight the portal as was the custom of the newest member to the harvest. It seems that the harvest, however, was not exactly a trade. I saw giant stone walls and vast pumps throughout the land, grabbing all of the lava from the great pool below. A large collection of bound pigmen walked by, led away by someone in a full set of shining steel armour. Huge machines that processed the lava were emblazoned by the brands of industrialization: Thermal Expansion, BuildCraft, Greg Tech, and many other labels dotted throughout the base of operations. So much for a festival - it seemed that the Conglomeration, the governing body that oversaw all of the villages in the land, saw it fit to turn a civilization into a circus. -aw.entries.architect.lavaSigil=After accepting a few supplies from the farce, I walked back home by myself two days early. There were some things that I wanted to create, but wasting my time there would have been fruitless. Clearing my desk of debris charts of alchemical constructs, I set to work with a vat of magma cream that I brought with me, attempting to combine it with another slate. Casting my orb aside, I fished the lava crystal from my chest and combined it with the cream and some fresh buckets of lava - thankfully not from the Nether. Once the light faded, I picked up the new Lava Sigil that lay in front of me. What this sigil does is it siphons energy and uses the properties of the lava crystal to super heat rock, creating a source of lava wherever the wielder touches the ground. So, infinite lava, and infinite fire hazards. Unfortunately, it takes about 1 kLP per single use, which is a lot for my network as it stands currently. It looks like I need more power, but seeing that Master Magus is currently enjoying himself at the festival, I'm going to have to find a way to boost the blood altar myself. -aw.entries.architect.blankRunes.1=Of course! Runes! Why didn't I think of this earlier? The power of the altar itself comes from the structure of the components used to create it. The force of the diamond alone is not enough to create stronger materials through transmutation. What I need to do is construct several runes to extend the altar, and thus the altar's power. The only thing that I could do on such short notice is to take several blank slates (I have about 16 left) and quite a bit more stone and combine them with my Weak Blood orb. -aw.entries.architect.blankRunes.2=What came next was the hard part. After I made 8 runes for myself, I sat puzzling over the altar. "How could I extend this thing?" I asked myself. It took a few hours, but when I placed the 8 runes in the ground around the altar in a ring, I felt a strange reverberation in the air. Something felt like it awoke, as if the power in the surrounding environment doubled. Quickly, I grabbed my Divination Sigil and slapped it onto the altar, and focused into it to view the power of the altar. I was pleased to find out that the altar was finally at its second tier, which should open up many more transmutation recipes. The problem now, as I sank slowly into my bed to sleep after the long day, was to find out what I could now do. Although Magus was pleased with the upgraded altar, I was caught in a bind. I couldn't seem to do anything with it that the previous altar could not do. The first thing I did was I placed one of my leftover blank slates into the basin, and it promptly consumed 2 kLP worth of essence as it reinforced the structure. Although this Reinforced Slate was much more durable, this process appeared to make the slate no longer work with creating both the lava and water sigils, as well as making it a waste to use in additional rune creation. -aw.entries.architect.speedRunes=I can note, however, that when I combined one of the runes with a few more blank slates and some leftover sugar from the harvest it seemed to augment the altar even further. The sugar had to be laid in a configuration that mimicked a bow and arrow on top of the rune, and by doing so it created what I can dub a Speed Rune. What this rune appeared to do was increase the speed of the altar's processes, both the transmutation rate as well as the speed that a bound orb will consume the essence from the altar, by an additive 20% per rune. This tier doesn't seem perfect, however, since it seems that for the second tier only the four edge runes (not the corners) could be used as upgrade "slots" for the purpose of augmentation of the altar. -aw.entries.architect.apprenticeOrb=The "eureka" moment came when I accidentally dropped a few things on the floor of the lab. When I bent down to phish the items from the floor I noticed that one of the emeralds rolled right up to the altar, almost as if it longed to be inside of its basin. It occurred to me that if a simple diamond inside the altar created a weak blood orb, perhaps a much rarer gem would make a stronger version! Quickly fetching my knife from the table, I filled up the altar over the course of the day so that I could make sure I didn't mess anything up, and then dropped the emerald into the altar. The speed runes made sure that the transmutation took no time at all! Wow, those things work fast - I better make a note of removing the runes when I try to create more difficult items inside of the altar, because if I was not prepared it would have chewed through my supply in no time! After a few tantalizing moments waiting, the altar burst in a shower of particles and the new orb sat there, revolving on top of the altar. Master Magus must have heard my shout of exclamation, because he hurried over from his side of the house and helped me to my feet. Not noticing the pain in my palm from earlier, I reached for the orb and sealed it to my network. Master Magus then helped me to fill up the orb inside of the altar, and when we were done that day I had a total of 25 kLP inside of my network. -aw.entries.architect.voidSigil=After resting the rest of the day at the insistence of Magus, I returned to work this morning full of inspiration. While I laid in bed half awake, the thought struck me that so far I had managed to use sigils to create fluid. So why not make one that can remove it? My first attempts with things like glass bottles and bowls failed with all of them working for a brief moment, then returning to their old forms. It was almost lunch time when the thought crossed me that I used buckets for the first two, so why not here? Half an hour, six buckets, a bit of twine and a reinforced slate later I had my first void sigil. -aw.entries.architect.airSigil=While tending to our small farm a few days later, I noticed a bird land on our fence. I turned to face it as it flied off, and had a revelation as I watched how it flew. If I could use magic to create the gust of wind like that made by bird wings, I could fly through the air! After hastily finishing the days' chores, working out details in my head all the while, I rushed to my workstation to start work on what I have now dubbed the "Air Sigil". Using feathers and a Ghast tear as ink on a reinforced slate, I formed a sigil that on use creates a rush of air behind where you face to propel you forward. Flight using this sigil is fast, if a little pricey and hard to control, not like the flight provided by Magus's thaumostatic harness. Also, landing is a bit of a problem as I learned the hard way... -aw.entries.architect.sightSigil=I've grown a little annoyed at my divination sigil. While it is able to read the current tier and essence of a blood altar, that is ALL it can read. As a result, my current goal is to improve its design using my new blood orb. So far it is going well. The "Sigil of Sight" is able to read the buffers of the altar to give how much they store, as well as how far along a craft in the altar is and how fast it is using LP. The downside of this upgrade is that it loses the power to read the altar's tier or the users soul network, but so far this is an unavoidable loss. For now I'll settle with what it does now, and might try to improve it further later. -aw.entries.architect.advancedAltar=Even after all this time, I still don't fully understand the blood altar. Sure, I built the thing, but... It is almost like working directly with raw life essence has given it a bit of life of its own. After running a few experiments to try and make my life easier, I've noticed some odd behavior coming from it. First, I tried using some basic piping to extract life essence to store later to use for more pricey infusions. As it turns out, the altar doesn't like giving up its essence. I managed to get a bucket of LE out before it seemed to slow to a trickle feed, nothing more the 20LP a second. Further tests show that it has a "Buffer" tank that siphons off LP from the main tank, holding roughly 10% of the main tanks capacity. As I mentioned, it does this very slowly so piping is out of the question for now... A later test shows that it also doesn't like essence being piped in, as a similar restriction apples to imputing essence. I will defiantly need to find a way to improve this transfer rate... Another strange phenomenon about the altar is its "Hunger" for life. After the failure of the piping, I tried using a few regeneration potions from the local village to speed up the rate at which I recovered health. A normal or extended potion seemed fine, and were very effective for speeding up slate production. But a strengthened regeneration potion caused the altar to have a slight "Hum" about it, and I felt my energy being sapped by something. After talking with Magus about this, we have determined the altar senses the life flowing through us, and the potion makes the altars "Hunger" for this life create a sort of aura that causes you to lose energy akin to hunger. As a result of this, regeneration is still effective, but a sizable supply of food is needed for extended use to recover energy. -aw.entries.architect.fastMiner=I've decided to experiment with passive effects for sigils, since everything so far has been an active effect. While wondering through town looking for supplies, I noticed people cutting wood for a fire and some smashing stones to build a small fire pit. I keep coming back to how slow both of them were in my train of thought, then started going over ways to improve the tools. Then it hit me: Why improve the tools when you can improve the person? A few anatomy books and failed tests later, I hand the sigil of the Fast miner(Name pending) and two very tired arms. After activating the sigil, it speeds up muscle movements in the arms allowing you to break blocks far faster at a small LP cost every few seconds. I do need to keep reminding myself to turn it off when not in use, but the stinging pain of life essence being taken is always a quick reminder... -aw.entries.architect.soulFray=Today I pushed myself too far. I've gotten close a few times, but today was the first time I have passed out due to draining too much life essence. Magus was thankfully with me at the time, and moved me to a bed to recover. As I regained my senses, I noticed something odd about my soul network thread: They were thin and looked damaged. As I kept watching my threads, it seemed like they were slowly reforming and repairing themselves. I mentioned this to Magus, and we theorized that after coming so close to death my soul was still recovering from the shock. I made a sacrifice at the altar to test this, and it seems that this state effects how much life essence a heart is worth quite negatively with it only giving a tenth the normal amount. -aw.entries.architect.greenGrove=Today Magus showed me his green grove ritual, a way to speed up crops. Unfortunately, it is very static and has a small range, limiting its uses. To amend this, I've been toying with the concepts behind the ritual in an attempt to make it more portable. By creating an ink from oak saplings and sugarcane, then inscribing a rune on a reinforced slate I have created the sigil of the green grove. It seems a little slower and more expensive then the ritual form, but it can be carried on your person and acts like bonemeal when used on plants. While I had it active I could barely keep up with our farm, and by the end we needed to give a few of our neighbors some of the excess we didn't need. They all accepted it, but with varied degrees of reluctance. -aw.entries.architect.dagger=My work on sigils has slowed for now as I'm reaching the limits of what my little green orb can do after only two weeks. As a result, I have turned my attentions to other aspects such as runes to pass the time. Magus is currently out dealing with a large forest fire to the east of us, and the village is in a bit of a lull with nothing planed for several weeks. Right now my task is to slaughter a few chickens Magus brought home from the market to prepare on his return home, and it seems the perfect time to test an idea I've been thinking about for a while... I will not mark it here, just in case it is another false hope. Success! I've managed to perfect my idea for a new source of life essence. Before the only option was to cut ourselves to give our own life essence to the altar, but now we have a way to use other living things as a source. Unfortunately, it is a little gruesome and a bit "All or nothing" from them... Regardless, it works! ...I have realized that, in my excitement, I may have forgotten to write down what it is. I call it "The Dagger of Sacrifice", formed in a blood altar out of an iron sword and 3K LP. The dagger doesn't deal much in the way of damage. It doesn't need to, as its main purpose is to "Mark" a living thing for the altar which takes care of the rest by forcibly extracting their life essence all at once. Through my tests it seems that your common farm animal's life isn't worth nearly as much as a person, only giving 250LP regardless of where it comes from. While I set about cleaning the animals after the tests were done, a common zombie managed to sneak in the door I left open when bringing the chickens down here. As soon as I noticed it, reflexes that were being drilled in by Magus every morning kicked in and I managed to poke it with my dagger before it had a chance to hurt me. At first I thought nothing happened, then it fell to the floor as lifeless as it should have already been. I glanced at the altar, quickly noting that a zombie was worth 500LP. Looking over the fallen creature as it started crumbling, I noticed that some of the defenses Magus had set up took there toll on the zombie as it was burned and freshly cut in several areas... Seems that the amount of HP they have is irreverent to the altar, giving the same amount of LP regardless. As I finished preparing the meat to cook after disposing of the zombies ash(Which reminds me, I wanted to look up why this happens...), a very dark thought crossed my mind. The knife works by giving life to the altar. The dagger works by taking life forcibly from a target. What would happen if a human was marked by the dagger? I asked this to Magus, after showing him the dagger and telling him everything that happened. "In all honestly, I'm not sure. I have a theory, but I don't really feel like testing it..." I asked him to elaborate, so he told me the basics of it. It seemed that source of the life essence mattered with the dagger, since the chicken and zombie gave two different amounts, so depending on the person in question they would be split into one of three groups: Passive, Hostile, and Innocent. The passive would be like the chicken, only giving a little. The hostile would be the bandits, the thieves, the murderers. The ones who gave into evil, and now seek to hurt or steal from anyone. The unredeemed, and would probably be like the zombie. The final group were the innocents, anyone who doesn't fall into the first two groups. It was nothing but a guess, but we agreed that using the dagger on an Innocent villager would extract all of their life essence like ours. 2K LP, all at once... We also couldn't work out what would divide the passive from the rest, but it was only a theory so we put it to rest. -aw.entries.architect.sacrifice.1=Looking at these little speed runes, I have decided to see what else can I make. My goal isn't anything in particular, just improving it in some way. The speed rune was made with powdered sugar, so another type of powder should work... Redstone failed, gunpowder failed, glowstone... Glowstone worked. I currently have no idea what it does, all I know is it didn't fall to bits seconds after creating it so that is progress. The altar seems to accept it as a proper rune, so all that is left is to run a few tests in the morning. For now, I am tired and feel a bed calling me... I've run dozens of tests trying to find out what this new rune does, after two days of obsessing over this I finally noticed it. It slightly increases the amount of LP self sacrifice gives. When I said slight, I mean one rune increases LP gained by ten percent on an additive rate. For those who don't understand that, it basically adds an additional twenty LP per self sacrifice. If my theory is right, I should be able to make a similar rune for normal sacrifice... What else would the altar respond to? -aw.entries.architect.sacrifice.2=Well, if there is anything thaumaturgy and magic in general has taught me, it is that gold is a very good metal for magic. By simply replacing the glowstone in the recipe with gold ingots, a sacrifice rune is formed. It has the same additional ten percent addition per rune per sacrifice, meaning the more LP of the mob sacrificed the more LP the runes adds. This has got me thinking... The altar was constructed with both diamond and gold. It seems to resonate with the diamond enough to make the first blood orb, and even a second, so why not try making one out of gold? I'll need to revisit this idea later as a test run showed some reaction to a block of solid gold(I didn't ask Magus where he got it, and he doesn't seem forthcoming about these matters), but the altar couldn't cope with the strain needed to shape the block. Before catastrophic failure happened, a few safety precautions Magus and I had built into the altar triggered, stopping the transmutation before... Well, neither of us are really sure what would happen. But Magus said he has dealt with matters of unstable and untested magic, and knew most of them end with a crater in the floor(Hence the safety precautions). It has been a few days since the experiment with the gold block. Magus and I have been discussing what to do now, as the altar is getting bigger then the basement. Magus has suggested moving it to some of the lower basement floors, but considering just how large it might be in the future... I finally got him to agree to building it behind his home, as long as I helped put up a few wards and spells to keep people away. Currently we're planning out the structure and needed runes for upgrading. The current altar only has eight runes, but what I have planned will more then triple that number to twenty eight. The current limitation we suffer is the strength of the altar itself, as it can only take power from runes adjacent to it. My plan is to use something the altar is naturally attuned to as a way to not only increase the range of this effect, but act as a counter balance and stabilizing it to prevent it from becoming uncontrollable. For this to work, the blocks in question must be above the altar and an equal distance apart. We've run several tests and calculations, and have a layout in mind for this upgrade. Four pillars topped with glowstone blocks, twenty runes in sections of five, built one block down and two out from the last set of runes. In theory this should provide a huge boost in power to the altar without risking our safety(Well, more then we normally risk it), but until we test full scale I can't be sure. For now, we have a lot of runes to make. After much debate we've decided to invest in the "Self sacrifice" runes, as having a steady supply of mobs will be tricky. But now I face the issue of making dozens of reinforced slates... I need to think on this. -aw.entries.architect.bloodPack=It's so simple! I've discovered a way of obtaining LP for making slates that means I don't wait at the altar all day: The Blood letter's Backpack. Made with a modified leather chest-piece with a blank slate reinforced glass tank, it allows the wearer to gather LP by feeding it into the pack over time. Whenever the wearer has more than five hearts, the pack will drain their life and store it inside up to 10K LP to be dumped into an altar later. This pack does have two shortcomings, however. When the life essence is deposited into the altar, runes will have no bonus to the amount added. The second problem is that the altar will only accept LP from the pack when not performing a transmutation. Despite these limitations, it will prove quite valuable for simply allowing me to step away from the altar to do other tasks. This is a simple progress update, as it's been a few weeks since I last wrote in this journal. I've been making slow, but steady progress with assembling the slates needed for the runes and we're now halfway through. This isn't the only reason for the lack of entries, as I've been preoccupied with my research thorough thaumaturgy. An old friend of Magus has been visiting and happens to be a well versed thaumaturge, and he has been giving me pointers on how I could be doing better while Magus has been preoccupied in his library dealing with a mountain of paperwork. Now that Master Ridden has returned home, I hope to progress farther in making runes in the next few days. -aw.entries.architect.fivePeople=Or not, as it seems Fate has other far more interesting plans for us. Today we had a knock on our door while I was making the last of the runes, and after opening it was greeted by three apparent orphans. The two boys in the front looked like they were brothers, or at least close relatives. The girl hiding behind them on the other hand had a very different hair and eye color, so relation was unlikely at best. All of them were covered in dirt, clothing ripped, torn, and patched with various levels of skill. The one on the left had an old sword with a chipped blade on his side, was slightly thinner and taller then the his brother, had a few deep scars that looked recent, long and messy dark brown hair, and was looking at me with a kind poker face. The brother looked more muscled, and was staring at me with a very analytical eyes and a similar poker face, his hair was slightly shorter and lighter then his brother. From what I could see of the girl, she had a simple dress on that was almost caked in dirt and dried mud. The fabric near her elbows was becoming thread bare, and a large rip near the bottom of the dress exposed some of her right leg. Her hair was a light blond, almost pale white color, but the most shocking feature was her eyes... I haven't seen haunted eyes like that in years, and last time it was in a mirror. From the looks of them, all of them hadn't ate anything in days and seemed to have everything they own on their bodies or in the simple packs on their backs. I asked them if there was anything they needed, to which the elder brother said they were looking for master Magus. I called Magus to the door, visitors being a rare thing as it stands with ones who ask for him by name and not clearly mages being rarer still. Five minutes later we all sat in the main room, eating simple sandwiches I had prepared for us all at the request of Magus. Needless to say, this day was not going as expected. Magus spent the next few minutes practically interrogating the elder brother , asking questions on both of our minds. As it turns out the two brothers, Vlad and Demier, use to be caravan traders, eldest a alchemist with basic knowledge of potion brewing, younger with enough mana and training already to cast basic spells. The girl on the other hand had a story all her own. From what the brothers had managed to gather, her village was raided like my own was and she was evidently the sole survivor. What shocked me was when they said she was found wandering the ashs, demons having left hours before without so much as a scratch on her body. Vlad was with the traders when they found her, and he was forced to leave them if he wanted to help the girl named Bella. Their story seemed to win Magus over, as he told them he would try to do what he can for them.. Not long after that, Magus asked me to help him do some shopping for our new guests. On the way to the village, Magus asked me what I thought of the three. "I can't say I believe all their story, but I also don't think their lying. Did you notice the girls eyes? Haven't see a look like that since...". Magus finished for me with "Your own?". I nodded at the dark memories of that time. We continued going over the details of their story, but we agreed that just leaving them in the cold wasn't an option worth considering. We decided to at least try to keep our recent endeavors into blood magic a secret from them, but when push comes to shove I think we might have to let them in on the secret. Magus let out a long sigh. "It's been years since I had to juggle this many apprentices at once. I'm going to need your help training them. But something tell me that we're going to be learning as much from them as they will from us..." I asked him why he felt that way, and he said it was just a gut feeling. I must say I had a similar feeling. Things like this don't happen without reason, and of all mages to come to they stopped at our door, something far easier said then done. An hour later we returned home, both our arms heavy with fabrics, food, and other necessities that we will need to take care of the new apprentices. I watched in amazement as the three ate, trying to make up for days with little food all at once. After that, Magus and I laid the three on various chairs and couches to rest, the strain of travel catching up with them. While Magus dug around looking for a few of his old things that we'd soon need, I started creating some new clothing from enchanted fabric for the three to replace their current worn and ratty clothing. Now that that is done, I should try to get some sleep. Something is telling me tomorrow is going to be quite busy. The Early this morning Magus and I started carving out the earth for the three new bedrooms, since the old ones Magus use to have had since been converted into a storage closet, a alchemy lab, and small study. It didn't take nearly as long as I expected with Magus using a few spells to clear away earth while I went behind using an equal trade foci to transmute it into stone brick before gravity caught on. Once that was done, Magus raised a few walls to separate the space into three rooms and a hallway. Only after that was done did I notice the three children had awoken, and were watching us as we worked. Magus told them that he had some spare furniture in some storerooms they could use, but sadly only knew of one bed. It didn't take long for them to decide Bella got the bed, the brothers would make do with a pillow and a blanket on the floor. After that we spent the rest of the day hunting for then moving furniture to their rooms, building little work areas and libraries for each of them. The following day was more of the same, with the evening filled with helping them find books to read from the grand library. Vlad grabbed as many alchemy books as possible, Demir took a few books on spell casting, and Bella took a Lexica botanica to read through. Later this evening, after the three had retired to their rooms, I sat in the main room with Magus, arms and legs aching from the heavy lifting of the last two days. I told Magus how I thought their rooms should be almost finished, and how I spent the last hour before they retired just answering seemingly endless questions. "I'm sure. I've gone through the same more then once, when I have apprentices new to magic. You were the same, I recall." I opened my mouth to protest, but closed it as I thought back to those days. I decided I probably was as bad as them, and left it at that. It's been just over a week, and the three have settled in nicely. They join Magus and I in morning exorcising, have started studying like true scholars, and have calmed the hungry nodes in their stomachs(Well, Vlad and Bella have. Demir on the other hand is another matter, but I feel he will always be like that.) Unfortunately, like true scholars and mages they've stumbled into places we didn't want them to go. Vlad has created a chemistry set that uses life essence from a blood orb as a fuel source, Demir has turned an old table into a way to use life essence to cast powerful spells, and Bella... She's left me questioning what I know about demons, after taming one and using a blood orb to bind it to her. All three of them have stumbled blindly into blood magic, and now I don't think we'll be able to stop them. Magus and I have agreed to give them a choice in whether they are blood mages or not, but I've seen the light in their eyes... I can't imagine any of them saying no. To seal their dedication to the art, we will have them make blood orbs of their own to use. -aw.entries.architect.tier3=Even with all the chaos of the last week I've managed to finish the altar construction, and it has been more successful then I predicted. With full access to twenty eight runes, each heart is now worth over seven hundred LP. I've already started prepping to try again with the gold block, having a few instant healing potions at hand. I got a brief glimpse with my sigil of sight, and this transmutation will take twenty five thousand LP to finish, over double what the altar can hold! Writing this down does give me an idea, however.... I'll need to look into it further once I have finished making this. -aw.entries.architect.magicianOrb=It was close, but I finished the orb today. I was down to the last of my three potions and barely had the strength left to hold the knife, but I pulled through and finished my shiny new blood orb! I've already used it to craft a few things I had made before, and extra lava and air sigil, and it handles it all with such ease! Now that this is finished, I have a small list of ideas to go through... To start off the process, I want a stronger slate. As it stands the reinforced type is cracking under the strain I'm starting to place on it. Well, I got a new slate type when I last upgraded the altar... Let's see if it works again. It does! A reinforced slate in a tier three altar with around five thousand LP makes a new slate... I'll call it an imbued slate for now, and come up with a better name later. -aw.entries.architect.newRune.1=First up to the drawing board: Rune of Capacity. The basic idea is simply to add more room to the altar, so a greater amount of LP can be stored at once to make bulk crafting or difficult crafts easier. Each rune adds 1.5K to the altar's main tank capacity, but what is interesting is that the "Buffer" tanks expend as well to a lesser degree. From a few trial tests(My back is starting to hurt from moving runes all day), the buffer tanks are always ten percent of the main tanks size. This will be something to keep in mind later. After helping patch a hole in the wall caused by Demir accidentally unleashing a spell, then helping Vlad dispose of a few failed alchemical "Experiments", I finally have an hour to myself to work on my ideas for runes. After the success of the last documented attempt, I've been on a bit of a failure streak. I've have runes fail to do anything, crumble to dust, blow up, and one attempt turned into cheese(I asked Magus about this, and said this isn't the first time he's seen that happen to a magical experiment. However he is just as stumped as I am over why it is always cheese, of all things). Thankfully, I finally found something that doesn't need a blast shield to use or starts growing mold after a while. -aw.entries.architect.newRune.2=Named the dislocation rune, it's only function is to increase the rate the life essence flows into and out of the buffers. Each rune increased the transfer rate by twenty percent per rune, and this effect stack manipulatively. That sounds great, until you realize the first rune only raises the transfer rate by four LP a second. Needless to say, your going to need around a dozen of these runes before you have any noticeable impact on the transfer rate. While these runes make it possible to automate the creation of slates by storing the life essence outside the altar, you're going to be sacrificing speed, capacity, and generation efficiency for this. -aw.entries.architect.magnetism=It's been a few weeks since I last made any headway with my blood magic research, needing to help with the tutoring of Vlad, Demir and Bella along with my normal duties as a mage. I've had to leave twice this month in order to sort out some mess or another, whether is be a helping with a pack of wild wolves or a bad harvest. Today, however, I managed to get some inspiration for a new sigil. When I was in the market buy more food, I noticed two children playing with a rock that was slightly magnetic. They were just running around, seeing what it would stick to and cheering when it did, or seeing how close they could push it to something before it pulled itself closer... That is what sparked my idea: A sigil that acts as a magnet, pulling items off the ground closer to you. In theory I could rig the magic on it to apply a similar effect to all items and not just metallic ones... Three hours later, and my sigil is finished. It needs a great deal of mass in the form of four iron blocks, along with the classic gold plating infused into an imbued slate(Drat, I never did work on a better name). This sigil needs to be toggled to activate, and while active will draw all nearby items to the user if they have room for it. Simple, but very effective.... -aw.entries.architect.phantomBridge=I've been asked to visit a small town to settle a few complaints that have been voiced lately by them, and am currently surprised that a closer bridge isn't one of them. I've had to walk three miles to cross this river, and now must walk another two tomorrow to reach them. If only I didn't need a bridge, or had thought to grab my air sigil(I still have a bruise from the last landing I had with it, so I wasn't keen on using it again so soon.) Wait... If if I had a bridge that went with me? Better yet, what if I had a bridge that formed under my feet as I walked? Yes, that would be amazing... I'm back home after dealing with a feud over who really owned a cow(Answer: Neither of them, it wondered into town and they both thought it was one of their own), and have set out my work station to try and capitalize on my idea. I'd want the sigil to place blocks that are phantasmal, only there temporarily before fading into nothing after I leave. For that I'd need a special material... Soul sand might work... Add in a little stone for structuring around an imbued state, then use the orb... Done! Now then, for a test run... Drat, I left the auto-writing quill running again. It works better then I hoped! The sigil creates a small five by five platform under me, staying at the same elevation as I walk through the air. Not only that, but I've tweaked it so that holding shift lowers the platform by one under you, and the blocks it makes can be easily broken for a quick decent. Not only that, but it will only spawn the blocks if you are on the ground, jumping or flying will not cause the bridge to reform until you touch solid ground, unless you hold shift forcing it to form under you. And for one final convenience touch, right clicking a phantom block with a block replaces it with that block, making roofs and platforms far easier to build. That should be enough for one night, I'll dub this sigil "The Phantom Bridge" and call it a night. -aw.entries.architect.holding=Vlad asked me to help him today, requesting my assistance learning the sigils. Part way through he asked if it was ever burdensome having so many on me at once... And I told him it was. Now with a little of his help I've created the sigil of holding, and it... Well, it holds other sigils. Shift right clicking with it while another sigil is in your inventory will cause it to absorb that sigil, taking all of it's powers and allowing you to swap between them with a shift right click. Unfortunately, it can't hold that many sigils(Only four) and not every sigil wants be become a part of it. Also, I had to ask Master Magus for help removing sigils from it as it refused to let them go. For this task he created the ritual of unbinding, a rather grand looking ritual for such a simple task I must say. -aw.entries.architect.elementalAffinity=Demir hurt himself again today with a fire spell that backfired(Well, it worked perfectly if setting the ground around him on fire was the intention). In hopes of stopping further injuries, I have infused the powers of the water, lava, and air sigil into an imbued slate. This seems let the sigil act as protective aura around the user, shielding them from drowning, burning, or falling damage at a high over time LP cost. Since I asked Demir to use it he hasn't burned or bruised himself, but did pass out once from a lack of LP to fuel it. Sometimes solving one problem only makes more... But he has been learning, and I've been amazed at what his spells could do. Recently he made a long range teleportation spell and a flight spell not unlike the air sigil, but far faster. -aw.entries.architect.ritualStones=After a few days of nothing, I turned my attention to the construction of Master Magus's ritual stones. Looking them over, I might be able to replicate their usage and features using reinforced slates and obsidian... Master stone, more complicated then the average ritual stone might be possible if I use my magician's blood orb and four ritual stones to handle the complex nature of it, along with a little more obsidian... Yes, yes it should be possible to recreate them without sacrificing any usage of them. After asking him how he originally made the elemental scribing tools, I believe I can also replicate the manufacturing of them in the blood altar... But it looks like the dusk inks are too complex for this altar to handle, creating an ink closer to dark gray then midnight black... Perhaps I'll have the power to form them later, for now these four will work. -aw.entries.architect.bloodLamp=I had a flash of inspiration today (Quite literally, as watching a few town guards light a replacement torch nearly blinded me from the sudden light). They spend so much on coal and charcoal to fuel those things... What if I had a simple replacement? A near invisible light source that never goes out, can be made almost endlessly, and can easily be carried on your person? Never again would you need to place a torch to light a room, and they can ruin a rooms look(Not to mention the fire hazard they pose, ruining the look even more. "Charred mess" is never in style.). Harnessing the power of glowstone by running a "Current" of LP through it, I can create a sigil that fires a projectile that upon landing forms a stable light source par with that of torch. The only sign of its existence is the light it gives off and faint red particles. While it uses a small amount of LP, the advantage over carrying stacks of torches is enough to justify it. -aw.entries.architect.boundArmour.1=Today Magus gave us a lecture on armors, going over the practical applications(Protection from large pointy sticks shoved in your direction and holding magic to improve the abilities of the wearer), typical construction of armor, and notable armors through the ages (And the very fatal flaws that their owners eventually discovered, much to their short lived dismay). Seeing and reading all this, I feel it is time I take my own try at this art using blood magic. Testing a wide array of materials and structures, I discovered a process to make an almost indestructible metal using a casing filled with life essence with glass hardened with diamonds and reinforced with bright red blood shards(More on their properties later) Magus showed me a while back (Making the prototypes of this armor took longer then you would believe). The process needs the soul of a demon bound to it, but this seems to be a small price to pay. -aw.entries.architect.boundArmour.2=To start, you need to make a "Soul armor forge". This block summons the demon soul and controls the transformation of the "Socket" blocks into proper armor. By placing the filled socket blocks around the soul armor forge in roughly the shape of the armor piece you want with the forge in a gap, you set what it makes. Right clicking the forge will then finish the process, creating the armor piece and binding the demon to the shards inside the armor. You will need to bind the armor to yourself, allowing the armor to drain your network to repair any damage it takes(Another benefit of using blood shards in the creation). After donning the armor(Making a few adjustments, still refining the creation process), I asked Magus to help test just how resistant this armor really is. Several nasty bruises later, we have decided this armor shields the wearer from ninety percent of damage from mundane damage sources. What is interesting is that it also blocks roughly eighty percent of magical damage, meaning many armor piercing methods are far weaker. The metal also doesn't seem to hold enchantments, and the demons inside reacts quite negatively to our attempts to do so. Using the ritual of unbinding, we are able to deconstruct the armor back into the component sockets and anything that was inside them. I mention this because we seem to be able to "Augment" the armor before creation by adding a combination of sigils, blood shard, and an orb. The sigil added to the armor piece(You can add anything to the socket by right clicking with the item in hand) determines the effect, and adds a passive cost to wearing the armor piece. The blood shard lets you add an upgrade, the weak shards we have at our disposal only allow one upgrade but in theory a stronger shard should allow more to be added. Finally, the orb seems to lower the cost of the upgrade. Every sigil seems to have something to do with the normal effect of the sigil, either giving you a passive bonus or having the effect of the sigil happen automatically around you. A few examples are a water sigil making you immune to drowning, the fast miner always active, and a green grove sigil acts around you. -aw.entries.architect.sanguineArmour=I've managed to use my new found knowledge of armors and experience making bound armor to try and improve thaumium armor using blood magic. By throwing goggles of reviling or thumium chestplate, leggings, or boots the ritual transform the armor into a "Sanguine" version, with a small vis discount and protection par that of pure diamond. What is really interesting is that this armor can be augmented with runic shielding, and then socketed into bound armor in the same fashion as a sigil to pass on the runic shielding, with the bonus that adding the sanguine helm to the bound helm well allow the wearer to see things like aura nodes as if you had goggles on. I should note that you can only socket a sanguine armor piece into a same armor type(Helm in the helm, boots in the boots...), and that any vis discount is lost when you do this. -aw.entries.architect.soulSuppress=Having the armors special effects all the time has become a little bothersome. To deal with this I have managed to create an "Armor Inhibitor" to repress the special effects it offers in the cases they are more bothersome then helpful. Unfortunately, it is a bit all or nothing in this regard. -aw.entries.architect.ritualDiviner=It's coming up to the three year anniversary of Magus taking my on as an apprentice. Time seems to have flown by while I've been engrossed in research on applications of blood magic and working with Magus... I should make a gift for Magus to as a thank you for these last few years. Considering the complex nature of his rituals, an aid to building them might just be the perfect gift... Ugh... Making a way to build rituals easier proved to be quite the task(And it reminds me of the rule of conservation of effort...), but I finally have it ready in time for the anniversary. While it isn't cheap to craft(Costing the four elemental inks, four diamonds and an emerald), I've gone to pains to make it easy to use. Shift right clicking will cycle through a preset list of rituals, and shift right clicking on a block with also rotate the direction the ritual will face(For anything like the ritual of speed, where that matters). Shift left clicking will go through this list in reverse, for those times you accidentally go past the one you want. By normal right clicking on a master ritual stone the diviner will take stones out of your inventory, place then in the world and ink them to build the set ritual. To make it clear it is working, it emits green particle effects whenever it places a block successfully. However, it can only place a block in an empty space. Anything at all in the way will stop the process until the obstruction has been removed. It is a small annoyance, but nothing major enough to risk breaking the diviner(Again). Magus adores his gift, having rituals faster and easier to build is the one thing he could actually use(That he doesn't already have). The fact it makes anyone who uses rituals lives easier is a just a bonus at this point. As it turns out, he got me a gift as well: A pair of ichorium wand caps, the one thing I had been dreaming about for a long time... -aw.entries.architect.bloodShard=Reading through my older entries for inspiration on things to do with our current power(I believe we have started reaching the limit, struggling to stretch what we have as far as it will go) I noticed that I "Might" have forgotten about covering the blood shards like I said I would a few months ago... I'd best start from the top. Blood shards, as Magus has likely stated already, are fragments left behind after vanquishing a hostile mob with a demonic weapon(The Bound sword or Energy Blaster). Upon close inspection, I see small strands that looks shockingly like that of our soul networks... Well, in theory anything with a "Soul" could have a network, but this is a surprise nonetheless. Because of this, the small shards contain a vast pool of energy that our magics should be able to tap into. A rather unfortunate first experiment involving stone showed that this energy can be wielded to create or transform matter(I believe several others have come across similar principles to convert energy into matter using science). I say unfortunate because I was stuck inside the lab's supply closet for a few hours to hide from the rapidly expanding stone as the released energy of the shard grew the stone to thirty two times it's former size, filling the rooms and pushing out the open door and into the hallway. (Further crafting of blood stone was done outside after that...) But regardless, the blood shards potential energy and connection to the soul network is how we manged to form bound armor so easily. Thinking about it... Blood shards might be the answer to our power problems. The last time we needed an upgrade, we used something related to the altar... Perhaps using something related to the soul network is the next step? -aw.entries.architect.tier4Altar.1=Once more I must make a progress update, as daily life as taken up most of my time these last few weeks. Magus has started offloading some of his work onto us, dealing with small problems and formal matters, bandits and demons, and general mage work. I have been able to do a little work on the altar or blood magic in general over the last few months because of this. Thankfully, we've burned though most of the grunt work that has piled up and I now have some time to conduct our research. Magus and I have spent the last week doing the calculations for upgrading the altar, determining that bloodstone should work for the capstone, and now it is just a matter of seeing how many runes we can get away with adding without nasty side effects or it all just blowing up(The other three have placed bets on this, I believe). -aw.entries.architect.tier4Altar.2=After another few weeks of testing, balancing, and error we have finished the altar upgrade. This new tier adds twenty eight more runes to the altar's structure(Seven on each side, for a grand total of fifty six), and four pillars capped with large bloodstone brick(This was the best material we could find that doesn't expire or fall apart. Or, in one memorable case, actively try to kill us). With these additional runes we are projected to be making roughly one thousand three hundred LP for every heart sacrificed, a hefty improvement from our seven hundred from before. Unfortunately more work has come in for us, so once we have the altar built it will be some time before we can focus on the hunt for the material for the orb. Current plan is to start with precious materials like before, and work from there. Ah, innovation... Ten percent work, fifteen percent knowledge, five percent patience, seventy percent trying random things to see what happens. More work then expected flooded in at once, and we have been struggling to keep up with it all. Vlad has been acting as a healer and doctor trying to deal with a plague that has going around (Caused by a witch-in-training using the wrong vial in a love potion), and has managed to keep it from running wild. Demir has been clearing out known bandit camps, and has enjoyed a chance to test out the spells we've helped him build(Only in the mage guild are bandits considered an endangered species. This is in part due to the average intelligence level of said bandits, and thinking that an area where there are people who, sometimes quite literally, shoot fire out of their hands, mouths, and other places(Mostly the apprentice mages, as a joke or party trick that has often gone very wrong) is a great place to set up shop.). Bella meanwhile has been dealing with the demons that have been wondering in, the mage guild acting as a sort of beacon to them due to the thinness of the fabric of space here caused by countless magical experiments, both successful and not. Magus and I have been going through a huge pile of letters(Seriously, where are they all coming from, and how do I not notice the pile building up until it flows off the table?) from local villages and mages, ranging from simple questions about an issue or problem to requests for assistance in matters ranging from theft to flooding. We've been coordinating these issues, mapping out journeys to deal with as many as possible on one trip. As a reference point for how long it has taken us to deal with it all, dust has gathered on this book since the last time I wrote. Thankfully we've sorted out the letters and referenced the villagers to mages who are closer to them(Much to said mages chagrin), so it should be a while until this is an issue again... Thankfully all this time has left me with a few ideas for future projects. -aw.entries.architect.masterOrb=The others have tried countless gems and metals trying to create a new blood orb, all of them either did nothing or created a flawed orb(Cracked or chipped, extremely fragile or incomplete). But last night I had an idea from a dream... The weak blood shards were once part of a soul network, so what would happen if we tried to reforge it into a whole orb? It is better then any other idea we've had, so I might as well try... Success! While we did burn through several instant health flasks, we now have half a dozen new blood orbs. While we haven't named them yet, they are a true master piece... A Master blood orb, that name has a nice ring to it... I'm getting side tracked again, but I must remember to suggest this name to the others(It at least is better then the temporary name of "Shiny yellow blood orb"). With this new found power, I might be able to bring to life some of the ideas that have been just out of reach up to this point. The first interesting property of these new orbs has been shown in our bound armor. While lesser orbs simply lower the cost, this orb is able to negate it entirely! A simple upgrade, but a very useful one... Another altar tier, another slate tier. Dubbed "Demonic" after the insignia that has formed on it's surface, we should be able to put this to some good use... I've also noticed that a demonic slate can be used with a weak blood shard and master orb to "Grow" the shard making four more. Going over my earlier successful experiments, I might be able to tweak a few concepts used to achieve a new result. I'm starting with the fast miner, and if boosting my arms was this useful then what would happen if I augment my legs? Using cookies, sugar, and some of the normal materials I have created a new sigil. Time for a test run... Two hours(And two very sore legs) later, I've concluded the tests. The "Sigil of Haste" boosts the users leg muscles, allowing you to both run faster and jump higher then normal. The best part? It seems to stack with the effect of jump boost and speed(Which Vlad was kind enough to brew a potion for testing). Now then, I need a rest after all this... -aw.entries.architect.whirlwind=Continuing with my thought process of "Reworking the old", I have used a master orb, demonic slate, two ghast tears, and feathers to reform an air sigil. The "Whirlwind sigil" changes the core property of the air sigil to have the winds not effect the user by propelling them, but instead creates a bubble of wind around them pushing away many forms of projectiles. I should note that not all forms of projectiles can be pushed back by the winds, and it has a tendency to effect your own shots. It isn't perfect, but it is useful enough to have around in a pinch. -aw.entries.architect.compression=After hearing the local miners complain about always having to stop work because they've run out of space in their packs, I've built "The Sigil of "Compression". While active, the sigil will check your inventory for anything that can be compressed into a "Storage" block(A two by two or three by three recipe of that item that can then be crafted back into the item. An example is redstone into redstone block.) and squeezes it together for you. Simple, but extremely effective... I should note I added a few special cases to the sigil, such as glowstone dust to glowstone and a restriction to only compress cobblestone if you have more then a stack. -aw.entries.architect.severance=Bloody endermen... Magus sent me out to try and stock up on ender pearls, but the pests keep warping away from me only to pop up later(And almost always when I don't want them too). It is just after dawn, and I've only managed to bring back six pearls... But maybe that is enough. I recall seeing some research notes on endermen and how they are able to teleport somewhere in the library. It is only an idea, but it might be perfect for this task... Eureka! After reading through the notes, I worked out how endermen connect to The End as a power source for their teleportation. Using a few ender pearls and eyes of ender, I've completed a sigil that acts as a sort of "Signal blocker". In layman's terms, it disrupts the connection to The End and renders them incapable of any teleportation. Not only that, but it also prevents many forms of magic that relay in similar methods, such as Demir's spells and the barbaric(But nevertheless effective) act of throwing an ender pearl. From the light, I'd say it is almost sunset. Time for some well deserved payback... -aw.entries.architect.teleposer=After my research into the basics of teleportation, a thought struck me: As it stands we don't have an established transportation network for mages to use, instead using the long and winding roads or other means of land travel. Sure, a witch might have a few way stones or a broom and a spell caster has a convenient recall spell, but we don't have a dedicated transportation system. Considering how much Magus and I travel to deal with small matters, and how often mages visit each other it is a surprise no-one has built something like this sooner! After talking with Magus about this, it turns out something like this has been tried before. The main failing point each time was the limited number of people able to use the method established. (A thaumaturge rarely knows how a waystone works and so on.) This has prompted me to create a means of teleportation that, once properly set up, almost anyone can use if they know how to push a button. Further research into ender pearls is required... After close analysis, I've decided that my first priority should be the improvement of the base ender pearl. As it stands, they are a little too fragile and random for reliable long term transportation. By placing a pearl inside a T4 altar I have been able to refine it into a focus, stronger and more predictable then the base pearl. I am currently in the middle of creating a mechanism to hold and operate the more complicated bits of the process. My materials for this is mainly gold(A metal that hasn't shown any side effects to the ender energies used), two ender pearls(One input, one output), and the focus itself to handle the conversion. I've managed to finish building two of the "Transportation of matter across two relative positions devices", or teleposers for short. How they work is simple(-ish): To perform a teleport you need two teleporsers. Next, bind a teleposistion focus to one of them by right clicking on the teleposer, bind it to yourself by right clicking on anything else, then slot it into the second teleposer and apply a redstone signal. If the focus is bound to teleposer A and placed in B, then teleposer B is triggered with redstone, everything above A will move to B, and everything above B will move to A(I hope this is clear enough description, it is hard to put into word the process. If you try it yourself, it should be clearer.). This means that if you want a two way transport, you can have two foci(One in each teleposer) and trigger the one you stand on, one have one focus and always trigger the same teleposer. In theory, we could build a "Transport Nexus" by having an array of teleposers bound to the same one(One A, multiple B's, triggering the B's to do the transport). What is great about these teleposers is that they don't just transport people, but any mobs or blocks in range as well. It even functions on complex blocks like furnaces and chests! With a little redstone logic, amazing things should be possible with this simple(-ish) system! With the completion of the final prototype, I should get some sleep... A new day, a new idea! The basic teleposition focus only transports a one meter cubed area above it, but if I improve the focus a bit in the altar it will be able to handle a three meter area! Not only that, but it can be further boosted by adding a weak blood shard so it works in a five meter area, then these new demonic shards that Bella has been gathering for a final upgrade to seven by seven by seven area. I should mention that the cost of each transport is based on how much is moved, and how far it is moved. It also has the quirk of being unable to transport people or mobs across dimentions. -aw.entries.architect.suppression=After a recent flood where Magus built a ritual right in the middle of the village to save a huge chunk of it, I've decided to try and replicate the effect on a smaller, and much more portable, scale. Thus, I've made the first version of the "Sigil of Suppression". What it does, in layman terms(You don't wont me to get into the back end details involving temporary storage in a pocket dimension) is create a bubble around you that removes any liquids, replacing it all as you leave. Using this sigil, I was able to take a leisurely stroll under the nearby lake. I am glad I remembered to bring my elemental affinity sigil however, as the early prototype fail on the way back, so I had a very soggy trip home... I "Think" I found the cause of the issue, and have patched it. -aw.entries.architect.superiorCapacity=Taking a break from the sigils I've been making over the last few months(How time flies...), I have shifted my attention to improving the runes we have available for our altar. After going over the design of the capacity rune, I have found room for "improvement". I have that in quotation marks because it only becomes greater then normal capacity runes if you have more then fourteen of them. You see, the "Rune of superior capacity" adds ten percent to the altars capacity, and this effect stacks multiplicatively(Layman terms: The more of the rune you have, the stronger the next rune will be) instead of the normal capacity runes static rate. Powerful, if a niche rune. -aw.entries.architect.orbRune=Considering the amount of LP we burn through on a daily basis running our sigils, powering our spells, fueling the rituals, and feeding our tools and armor, it is a miracle we don't run out of LP more often then we do. Even with our soul network topped off with a master orb, we're tapped dry within a week. Just upgrading our orbs has served us so far, but that has shown to be too unreliable and a huge investment with the altar... Wait, we're always using our orbs to make runes to improve the altar, so why can't we make runes that let the altar improve the orb? It can't be a one way road, can it? Yes, if we tweak this here and shift pressure here... I'm rambling again, I must talk with the others about this! Yes, it works! By focusing the power of three blood orbs and using two demonic slates, we've created "The Rune of the Orb". This boost the altars ability to feed an orb(Think of it like pressurizing air, more of it in the same amount of space), letting it add an additional two percent per rune(Additive rate, so more runes won't change how much it adds). With our master orbs, one rune is an additional twenty thousand LP. While that doesn't sound like much(To think, I use to be limited to only five thousand...), consider the number of orb runes one altar can have... -aw.entries.architect.fieldTrip=After hearing the demands of the younger apprentices, we are leaving tomorrow for a quick tour of the magelands, and expect to be back by the end of this month. Talking with Magus, I agree that we've been pushing ourselves hard lately with work and research. A little rest during a vacation might be just the thing I need to gather ideas for future projects... It will also give me a chance to talk with other mages about setting up a teleposer network. It is a vacation, so a little work on side projects you normally don't have time for is normal right? Talking with Magus during the long hours on the road, a few details about the mage guild were covered on this horseback lecture. Largest of the "Nations", most of the tech focused nations won't touch this area due to the high levels of magic in the land, air, and water causing technology to become a bit more unpredictable(Read: Unstable and often highly explosive), and have instead left it in control of the mages. As a result of this, thousands of kilometers of land filled with river valleys, harsh deserts, frost and snow covered forests, fertile plains and countless other biomes have been untouched for us to expand into. To this day there are people who venture out into these untamed lands hunting fame and fortune clawing over mountains and through the ancient ruins that litter the area. However, the vast majority of settlements are close to the borders with the other nations, thriving off trade(Their gadgets might not function here, but the results are another mater. Most of the mining towns send out the harvested ores across the borders for processing). The last tally was done roughly five years ago, with the number of total settlements at around three hundred scattered thin across the mage guild. Of this, we have roughly seventy active mages and thirty classified as "Apprentices" to manage village needs and deal with problems as they arise. Generally one mage would managed half a dozen of the closest villages and any apprentices they take on comes from this area however, it was not uncommon for mages to offload work onto other local mages if they have not the time or expertise in the field and for them to take on students who seek them out as tutor. That's enough for tonight, my watch is almost over and I feel sleep calling me. I'll write down any more interesting details I learn tomorrow. Magus said we should reach another village tomorrow, and he knows an inn there that should take us in for the night(Just in time as well, I don't trust those clouds on the horizon). Today's trip was more of the same, ridding through a dense oak forest while Magus went over anything and everything about the area around us and the Mage guild in general. Mages seems to have a list of unwritten rules governing how to act, what to do, what to say... For example, it is recommend to live at least a mile and a half from the closest village. Far enough away that people won't bother you with trivial things and you keep a mysterious reputation with the people, but close enough to be convenient for buying what you need. Another example pertains to marriage: A mage is free to wed whoever they like(Even other mages), but the spouse is entitled to most decisions and any compromises favor the spouse. Being wed to a mage often causes problems for the spouse, often with relatives and friends, and is typically a huge adjustment. Doing anything to try and make it up to them is common, as the mage feels themselves a burden and cause for their loved one's strife. From what I've gathered and how Magus speaks about the topic, these are more general outcomes and human reaction to the same events that Magus has seen happen time and again instead of rules or traditions passed down from master to student. One final interesting fact is that most mages send their children to learn the art(If the child so chooses to take on magic, and the have the talent for it) with another mage, preferably one they have rarely or never met as to prevent any bias and favor. I was right about those clouds, and we have reached the small town of Salis soaked to the bone. We're all currently sitting by a fire in the Mundes inn letting our robes dry and bodies warm from the chilling rain(From the clinking outside, now hail). I plan on acquiring another books tomorrow, and writing any more facts I learn from this trip with Magus in it instead of spending the pages of this book(Already longer then I ever dreamed it would be). According to Magus, we should be able to meet another mage in two days time, a woman by the name of Athis who is skilled in botany and herbs(Any medicine made by her always trades for a fair few coins). On another note, what Magus said about about people being wary of mages is holding true. The common room has been divided into two parts since we got here: The side where we are, and everyone else who have gone a table or two away from us and keep glancing at us as if to make sure we don't do anything without giving them a chance to run. The owners of the inn, a small family known as the Eldritches, seem to be the only ones who don't seem to mind us. Their daughter, or at least someone the right age and look to be their daughter, happily walks up to us asking if we needed anything other then rooms while we rested. Vlad and Demir order food for us all, Magus inquired to the drinks available, while I have asked if she knew if the general store had any writing journals for sale. And now I'm at the point of writing things as they happen... I needs some sleep in a nice bed after all this riding(But it looks like Demir is more saddle sore then I am), and the inn keepers have giving us cheap logging in the attic with a few decent, if old mattresses in a warm room with a roof over our heads. We left the next morning after a short trip to the market(Where I managed to get a good deal on a fairly nice journal, and have already filled out a few pages on my watch last night), and now are almost at Athis's residence. We currently are taking a short rest to eat and have the horses cool off after a long trip before riding the last leg of the journey after dusk has set. I'll detail anything interesting that happens. Talking with Athis, who I have already detailed in the other book along with most of our conversation, I managed to steer the conversation to how often she needs to travel for herbs, and if she has ever been in a situation where she can't get access to anything she needs but another mage might have an abundance of. As a response, she handed me a list of everything she buys when ever possible because of how rare it is here and the versatility or uses of it. The list was ten centimeters thick. Seeing a chance to get another mage's opinion, I mentioned a recent discovery in the field of magical transportation see might be interested in seeing. At this point, she gave me a wary eye and said she still has a bag of purple chalk and a stack of waystones from the last person who said that. Inviting her outside for a demonstration using a few of the teleposers I had packed, I showed step by step the process and how simple it was to use.(It took her a moment to recover from the initial shock of teleporting, but now she takes it in her stride.) Going over a few more details inside with hot tea, I asked if she would be interested in us setting up a link in the area nearby for her to use as a means of transport. Frankly, I was nerves enough at this point that I thought see would just laugh at my new goal. Instead, she was almost begging me to set a few up around a few locations several hundred kilometers apart. At this point I felt comfortable to tell her about my grand plan for setting up one of these near every mage in the guild and at some important points, so the days of needing to travel day and night to reach another mage would be over. Not only was she on board with the idea, she even offered to help us set them up if it meant that it would be ready faster! We spent the next few hours talking about this late into the night, covering little details and about enlisting the help of other mages to set it up. -aw.entries.architect.bindingKey=Well, this has been an interesting trip... We've been visiting every mage we pass, talking and showing off the boons of our blood magic. Most of them have been extremely accepting of our arts, and the ones that haven't been at least aren't opposed enough to get violent about the subject(However, all of them are still welcome to the idea of a transport network). We have noticed one problem on our trip, however: We can't easily give people the things we've been working on, as they need LP to run it and it takes time to reach a point of being able to support the usage of them. We've gotten around this somewhat by binding the items we gave them to ourselves, but anything they make once we've left will be near worthless to them... THAT'S IT! I could make a device that mimics the binding of an item, copying a thread of our soul network to another device, so anyone can craft something new and have us power it. I can use a weak blood shard to hold the soul network thread that it uses to pass on the link... Yes, I should be able to make this easily. I really should have slept after getting home, instead of going straight to building something... It took me three hours to think of using gold for the "Key of Binding". Regardless, it has been finished. All you need to do is right click with it to set the original owner, then hand it off to the person you wish to use it. Then they right click with it, and it will bind the first thing it finds in their inventory without an owner to the person the key belongs to. While it's uses are limited, it is something you want to have around in case you ever need it. -aw.entries.architect.tier5Altar=In other news, we've started talking about what we do now that we've started reaching the limit of our power once again. I've calculated the number of runes we would need, and have in fact already crafted all fifty two of them. We even have a few guesses on what to use for a blood orb, starting with these demonic blood shards... The problem now is the stabilizers we need. There is only one thing I've found that can handle the strain of the altar: The raw power of beacons. We need four bloody beacons. One is near impossible, four is... We need a miracle to get any farther. Magus says he has some plan, but I think even he is going to struggle with this. Talking with the others, I believe I should focus on setting up "The Nexus" instead of struggling with the limits of our master orbs. This is going to be a project that will take months... I've decided to limit the usage of the Nexus to mages, as public usage would tax my network night and day. I start tomorrow on this task, and plan on cleaning out some ruins about a kilometer to the east of us to set up the Nexus base. I already have a few dozen teleposition foci crafted, and enough teleposers to set up over a dozen locations. First on my list, Athis... I'll leave this book here, and will document anything that happens in my other book. Once I start research in blood magic, I will write in here again. -aw.entries.architect.priceOfPower=Magus... Magus has gotten us a reservation to kill Withers. Not only that, but we each must kill one on our own. I said I wouldn't write in here again until research started again, but I felt this is significant enough to mention... We are so close to being able to upgrade the altar. If we live through this trial, that is. I have written the details of the last few days in my other book(It has gotten far more use then I ever expected), but we have them. Enough nether stars to finish our altar, enough to experiment with, enough to make being stuck in bed with this broken leg worth it all. I have been hard at work since my leg healed, ideas gushing out of me to the point I have almost stopped eating and sleeping(Thankfully, one of the others tend to drag me out occasionally). Time to document the fruits of my labor. -aw.entries.architect.demonicOrb=Our assumption about demon blood shards was right, and after a long crafting process we have the Archmage orb. We had to spend several hours trying to fill this orb, and finally hit the cap at ten million LP, ten times the size of the master orb... We also have graduated up to the slate dubbed "Ethereal". I know this isn't much fan fare, but this has become a bit of an expected event. -aw.entries.architect.energyBazooka=First thing I created with this new orb was an improvement to the energy blaster, as I felt it just wasn't strong enough during the fight with the wither. Harnessing the power of a few reagents and a demonic blood shard, I have created the "Energy Bazooka"(Not a clue what a bazooka is, but Demir tells me they shoot big explosions). Costing twenty thousand LP a shot, it launches one main projectile that upon hitting something explodes into twenty more smaller explosive projectiles to devastate other living things around it. I have tried tweaking it so that terrain isn't harmed, but there may be minor damage depending on what is hit. There is a "Slight" problem of recoil, but nothing we can't live with. -aw.entries.architect.accelerationRune=Moving my attention on to runes for our wonderful new altar, I had a revelation as I noticed a speed rune next to a dislocation rune: Increasing how much LP is moved from the buffer is fine, but how about increasing how often it transfers LP? Using a few materials like buckets and an ethereal slate, I have transformed a normal speed rune into something far greater. Instead of affecting crafting speed, one rune will lower the delay the altar has on moving the contents of the buffer by a twentieth of a second per rune. I have noticed a strange limitation, however: Any runes beyond nineteen seem to have so little effect it isn't noticeable anymore, so you can only have the altar transfer twenty times a second. I will need to run some experimentation on the best ratios of acceleration to dislocation runes, but I suspect that the capacity will also be a factor. -aw.entries.architect.harvest=Bella has dragged me with her to town so she can be sure I'm out of the lab for a while(I have noticed I'm a little pale, but I just assumed that was from all the sacrifices I've been making lately). As we ate two sandwiches at a bench on the edge of the village, I watched the farmers in the field slaving over the harvest while trying to outrun the storm just visible in the distance. Talking with Bella about ways to help them, I created the basic idea for the sigil now known as the "Harvest Goddess". It is to the "Reap of the Harvest Moon" what the "Sigil of the Green grove" is to the ritual of the green grove, performing a similar effect to the harvest moon around the user by summoning a little demonic imp(You can thank Bella for this part). As soon as we had a version ready, Bella ran out into the field with a green grove, haste, and magnetism sigil to quickly run through the field collecting the harvest behind her. Needless to say, the few farmers in the field were awe struck by this sight and a few of the newer ones thought she was a goddess sent to answer their prayers(And I liked the sound of it, so we now have a name for the sigil). -aw.entries.architect.demonProblem=A mage can never get a good rest without something happening... Magus has finally launched an operation to deal with the demon portal, and has asked Vlad, Demir, and myself to lead the siege team. He has cooked up some complicated plan that only he knows all the details, and in fact might be the only one who even has any idea if it might work (Quite a few of us felt lost when he gave the basic overview of the plan). One question asked at the meeting that felt quite memorable was "Wait, how are you able to replicate this portal?" Magus only smiled and asked him "At what point does science stop being science and starts being magic? It is the same principles and theories at work, just a different means of execution." For Magus, that seemed to answer everything. Gah, I need to focus on packing for the trip as we won't be back for a few weeks. I feel like I'm heading out for war, and I guess in a way we are... Alright, I did not expect to find a camp of demons when we warped to Venric's folly. I expected a hole in the fabric of space, I expected a few demons, but a little village... Not to mention the fact that I had to save a fairly inexperienced thaumaturge who hasn't dealt with demons before. He rushed in, thinking he would show off a bit. To his credit, he did manage to kill a few demons before the hoard took him down. I had to run in with a teleposer to save him, but we did discover something important: From the vanishing remains of the demons, I retreaved two crystals. One was a shiny red we have named a "Life shard". The other a brilliant blue we have dubbed a "Soul shard". What is odd is that my bound armor seemed to react when I touched them, and I saw a few stray strands of soul threads between the demons and these shards. But that isn't what was really odd. I was spotted by one of the demons when I went to save the fool, and noticed two things very quickly: The demon had a connection to the portal with a few soul stands. The second thing was that it seemed to be... Vibrating? Closest word that comes to mind when I think of it. Shortly after that, two things happened: The demons started running towards us from every part of the village, and for a few hours after we left the camp seemed to be under a lockdown. The demons had donned armor, and were patrolling the area instead of building. These guards seemed a little stronger then the others, but tomorrow I plan on mounting an operation to collect more of these shards for research... -aw.entries.architect.tier6Altar=From what we have learned so far, these crystals seem to be ordinary crystals (Well, ordinary as anything from Tartarous can be here) filled with demonic aura and... changed by the travel through the portal. These demons have been using them as a sort of personal anchor, an extension of the main portal's influence. I have discovered that mixing these crystals together in a five to four ratio of life to soul shards forms a purple block that is practically pulsating with demonic power. Since we may be here a while, I have started construction of a prototype blood altar that utilizes these new blocks for enough stability for a T6 to be possible. I have yet to try this, but if it works... Once again, a theory proved to work out. With the addition of four pillars capped in these crystal clusters, we are able to support another seventy six runes, nineteen on each side of the altar. I have also tried the clusters out for making a blood orb, and the "Transcendent orb" was the result with a cap of thirty million LP. Sadly, I haven't had a chance to experiment with this new altar or orb, so I haven't anything else to share yet. -aw.entries.architect.moreThanHuman=Magus and I have been looking into the oddity I noticed with the demon crystal and bound armour, and what we have reaped from it was far beyond what I had expected. I has assumed at first this would simply allow more sigils or other things slotted into our armour, but that was far from the truth. As it turns out, the demon soul in the armour was reacting to the crystals and was becoming more... Active? Present? Detached? All of these are accurate, but none of them are quite right. Regardless, strands of the demon's soul become... Loose? In my head this is makes sense, but on paper it just sounds odd. Let's start that again, no matter how odd it sounds. The strands of the demon soul became loose from the armour in some places, and I noticed them interacting with my own soul strands leading to the armour, twisting and tangling the strands. And as they touched my soul strands, I felt... Something. I can't put it into words, but I knew it is something to look into. Mentioning it to Magus, he made reference to tales of old arch mages making pacts with demons for a bit of the demon's power. With this train of thought in mind, we started the road that lead to what has recently born fruit: Project Omega. The concept was simple: Fuse the soul of the user and the demon in the armour, then see what results from it. The stories of what demonic power can do vary widely, so we honestly had no idea what to expect. What we got was the Omega state. Long story of testing short, we found that reagents made the perfect medium to hold our souls and that of a demon together, with as few repercussions as possible. What was interesting is that the reagent used seemed to... Colour(?) the demon soul, attuning it like those of the Demon invasion. Depending on the reagent used, the powers and abilities offered changed drastically. We gained power beyond anything expected, with the armour reshaping itself to suit it's new abilities. While there are too many to list by name, I'll cover a few general features. First, we haven't reached a point where the Omega state lasts forever. We use reagent to power the fusion, and to maintain this fusion it slowly burns through the reagent. While Magus has made a ritual to offset this, the range and the cost mean it is far from an ideal option. In order to ensure we aren't caught of guard by reagent running out mid battle without warning, I've managed to create a visual display in the helm(Located on the left side of the screen, next to the LP bar, or at least would be if you have a divination sigil slotted into your bound armour). We also found that the demonic power gave our armour it's own buffer of extra health, taking damage that normally would have pierced through armour and hurt us. I added another bar to represent this, underneath the other two bars. I should note that this "Reagent health" needs reagent to form, so the more damage it takes in for you the less Omega time you have. Depending on the reagent used for the process, we discovered that the area around us had an impact on us. We gained boons from each armour, with extra health and stronger strikes being common place among all of them. However, this weapon can cut both ways: While we gain boons in favourable areas, in hostile areas we would suffer debuffs and weaknesses. Water armour is great in an Ocean biome, not so hot in the Nether however. This is something to keep in mind before starting Omega: Don't pick one based on effects alone, but where you expect to be fighting. I should end this entry here for now, as we are still working on Project Omega. As of this time of writing, we have only managed to enter Omega using Terrea, Aquasallus, Incendium, and Aether. Any other reagent we've tried will need some fine tuning to have working, as we needed to customise the ritual for each of the four we have. We have also noted some odd behaviour from the armour when in use, trying to expend energy in odd ways. I plan on looking into this at a later date. - -aw.entries.rituals.intro=At the constant demands of my apprentices, I've started writing down my knowledge of blood magic. I've told them time and again that what we do is far too dangerous to write about, and in the wrong hands... I don't want to think of the consequences. But they have made one good point: if more people are going to learn blood magic, word of mouth is far too limited. But I'm getting sidetracked, back to what this is all about. Following their example, I will introduce myself. My name is Magus Arcana, and I am the founder of blood magic. I have lived a long life, studying more fields of magic then one could count. When I was younger I moved to the outskirts of a village to start my journeys into the arcane. After several decades of study, I realized there was one source of power few had ever touched: Blood. Many mages claimed that the use of blood in magic was taboo, yet gave no reason as to why. Eventually, my curiosity grew beyond my reluctance and I started experimenting with the art of blood magic. -aw.entries.rituals.weakRitual=My first breakthrough was with a simple device that used the power of whatever was above it as a template, along with a great deal of blood(25 hearts, or 5k LP if you go by the system one of my apprentices made years later) to perform small miracles. I must also note that at the start of each of the rituals lightning strikes the ritual stone setting it alight, as if the cost of activation wasn't deadly enough. After two weeks of meditation to strengthen my soul to the point where I could handle the strain of these rituals, I started experimenting with different templates to discover their effects. At that point, I only had the strength to test one template per day before I felt weak. I decided to start training my body and mind again like I did when I was younger, while using a few tricks I had learned over the years to help speed up the process.With some work I found that water creates a rainstorm with so much lightning that I couldn't sleep that night. A somewhat rare mineral block by the name of Lapis had the very interesting effect of turning day into night. Needless to say, everyone in the village was very confused when the sun suddenly vanished and they couldn't see anything. I was shocked when I found that a coal block summoned a zombie stronger than any other I've ever fought in the night. I also lost the coal block to fire from the lightning strike when I was dealing with said zombie. The final effect I found was with bedrock I found at the bottom of a local mine, hardening my skin temporarily. While I looked no different, I could shrug off a blow from an iron sword without a scratch. A bruise perhaps, but not a scratch. -aw.entries.rituals.rituals=I soon decided that those rituals were far too weak and costly, so I started working on a much larger version. By mixing my blood and a little bit of Mana with an item that was naturally attuned to an element(I found that magma cream worked for fire, a Lapis block for water, obsidian for earth, and a ghast tear for air) I created powerful scribing tools that used blood (100 LP's worth per use) as ink. I used stone fused with blood and obsidian to create stones strong enough to withstand more powerful rituals. It took me over two years to perfect the ritual stone. Trust me, you don't want to see what happened with some of the earlier tests. Let us just say they made the holes creepers leave look like potholes, and leave it at that. I also designed a "Master" stone to be what really controls the rituals, with the powerful dust called "Redstone" able to deactivate rituals and putting in a few safeguards so that if some fool tries to activate a ritual they don't have the strength or the blood to handle, it doesn't kill them outright. While I was able to weaken the pull that rituals carried on the user's life force to not cause any lasting harm, I could not quite get rid of the feeling of nausea and unease an unattended Ritual would cause. I eventually got tired of trying to stop it and marked it down as an occupational hazard. Once I had the stones, I realized that there needed to be a bridge between myself and the "Master" stone of the rituals. I found an old, red crystal in my attic that I bought months ago on the villages market. The trader claimed to have gotten it off the corpse of a demon after a brother of his killed it when it attacked their caravan. I don't know if his story was true, but I could tell it was magic. After shaping it a little, I found it made the perfect catalyst for linking my soul into the ritual stones. -aw.entries.rituals.waterRitual=Among the first rituals I made with these stones was the one I dubbed "The Ritual of Full Spring". I'll be the first to admit that, in terms of magic, it was nothing special. All it did was create an endless spring of water by using a few tricks from other magics and my soul as a fuel source. But when you are pioneering a new form of magic, you take what you can get. And it was cheap, 500 LP to start it and 25 LP for every bucket of water I got out of it. Luckily I made this ritual before the well outside my home dried up. -aw.entries.rituals.lavaRitual=The next ritual I created was "The Serenade of the Nether", where I tried to make something a bit more useful. I found that the ritual used a large activation cost of 20K LP, to link itself to the nether, then used a much smaller fee of 500 LP to pull a bucket worth of lava to the ritual. I am not sure what part of the nether it is getting the lava from, so it is probably best if we don't think about it too much. -aw.entries.rituals.groveRitual=The next ritual I made was the first I dared to show the villagers. After a horrible harvest due to bugs the villagers didn't have enough food to outlast the winter, and the last of the leaves were falling from the trees. We might have had a rocky relationship, but I wasn't just going to sit back and watch them die. Without enough herba essentia stockpiled to use lamps of growth, I quickly created what I now call the "Ritual of the Green Grove" to mimic its effects. After persuading two of the farmers to at least hear me out, I showed them the ritual and told them what it does. At first they thought I was trying to trick them, but instead of continuing my attempts at convincing them I planted a handful of seeds on the tilled soil I put atop the ritual. Within a minute the wheat was grown to maturity and both of the farmers were awestruck and speechless at what they had just seen. They ran back to the village, fistful of wheat in tow, returning within the hour with a dozen men, bringing their last batch of seeds and half a dozen carts. That evening pushed me to my limits, but we managed to get more than enough food to last the winter and live till the next harvest. And while only the two I first talked to thanked me in person, I knew that all of them were grateful for my help. -aw.entries.rituals.interdictionRitual=In my studies I heard of an item created by alchemists of yore called the "Interdiction torch". While replicating its effect was tricky, I eventually created the "Interdiction ritual" as a tribute to them. What it does is "Repel" any living thing that gets within its range. After realizing a small error, I changed it to where humans are the sole exception to its effect. I found being flung back by your own ritual has a tendency to make you want to tweak it. While I couldn't make it "free" like the alchemist's of yore, it only costs 1k LP to start and 10 LP per second while it is active. Rather cheap, all things considered. -aw.entries.rituals.containmentRitual=After experimenting with the effects of the interdiction ritual, I decided to try and reverse the polarity. It created a sort of "vacuum ritual", that I call "Ritual of containment". The cost is the same as the interdiction ritual, due to it using such a similar process. I found this ritual very useful for catching the odd wild rabbit when I wanted a nice dinner. Unfortunately, I caught as many creepers as I have rabbits with it. But a man can try, can't he? -aw.entries.rituals.bindingRitual=Over the years I've heard legends of a place called "Tartarus". Most other mages claim that the nether is what they are referring to, but I'm afraid the nether might just be the front yard while the real Tartarus is something we have never seen. To test my theory, I created a ritual to drag the soul of one of Tartarus's inhabitants to our world, then seal it inside an item. My research showed that few materials had the strength to withstand having a soul bound to them, much less a demon's soul, but I eventually found that diamond was the perfect material for the task. I activated the ritual (needing 5k LP), then dropped the diamond sword I had made years ago on the master ritual stone. Lightning flashed and struck each of the rituals pillars in turn as I quickly jumped to a better observing spot behind a large boulder. When I returned, the sword gleamed red like blood. Once I picked it up it turned into a shapeless goo, but by running a bit of my power through it the goo returned to its normal form. It was far sharper than any blade I had seen before, seemed nigh unbreakable, and as I was testing it on the common monsters that stalk the night I noticed something strange: As I killed them, I would find little red shards dropping form their bodies from time to time. It was rare, but a noticeable change. I made a note to investigate them later as I gathered them. Because of the ritual's function to bring a demon's soul for the sake of tying it to an item, I dubbed this the "Ritual of Binding." Shortly after this, I got my first apprentices in blood magic. Little farmer boys named Fenn and, his older brother, Way Chronos. I showed them whatever I could over five years, then they left to spread the word of blood magic to other mages. They still stop by from time to time, and I am always glad to show them what we have discovered while they were on their travels. -aw.entries.rituals.beastMode=When I was teaching Way and Fenn we experimented with binding the souls to various items. We found that along with the sword, diamond pickaxes, shovels, and axes could have souls bound to them. All of them needed LP to be used, and they had an interesting distinction to the sword. The seal on the tools could be opened temporarily, for less than the blink of an eye, to unleash a powerful effect. The terrain around the wielder will be destroyed, if the right tool is used (pick for stone, shovel for dirt, axe for wood. Do I really need to spell it out?). This uses a massive 10k LP per use, but the power seems worth the cost. Much later, when I had Tiberius as an apprentice, I did discover that an apprentice blood orb can be turned into the "Energy Blaster", a ranged weapon with the same ability to create blood shards as the bound sword. -aw.entries.rituals.unbindingRitual=The next ritual I created was an idea I had during the few years I taught Way and Fenn. The concept was a ritual that would remove souls from items, namely from the bound tools. Strangely, the souls seemed to become fond of their new homes and really don't want to leave those tools. While lesser souls bound to items as curses by necromancers and the like wither at this ritual's power, the souls of those who dwell in Tartarus seem far sturdier. It was over a decade later when Tiberius discovered that it was great at un-binding items from one and other. His first used it to recover a sigil from his sigil of holding (I still tell him to give it a better name, but I'm hardly one to talk about lazy naming), and again when he wanted to experiment with his sigils in bound armor. It seems it uses 30k LP, regardless of the number of items unbound from the original item dropped in. -aw.entries.rituals.jumpRitual=The next ritual I recall making is the "Ritual of the High Jump". It... well... it does exactly what is says on the tin. When activated, any entity on top of the master ritual stone will be flung strait up. After watching a cow use the ritual before me (I had to deal with a mess Fenn made, involving a bottle of ink, Way's hair, some dropped parchment, and a wobbly table. I returned to the ritual just in time to see the poor cow get airborne.), I added a secondary effect where anything that gets flung up can safely land back on the master ritual stone. On the bright side of that incident, we had fresh beef to cook for the next few days and a new batch of ink from some passing traders a week later. I almost forgot to add the cost, 1k LP for activation and around 15 lp per use. -aw.entries.rituals.duskInk=It was at this point that I realized that I was reaching the limits of what I could do with the four inks I had, and spent the remainder of my time teaching Way and Fenn to find a new type of ink. It took four years, but I found it. And it was worth every second. By mixing my blood and Mana with a coal block I created a scribing tool that turn blood into an ink so dark it seems to absorb light. I went on to call this new scribing tool "Dusk" as a result, and rituals far more powerful became possible. -aw.entries.rituals.magnetismRitual=The first ritual I made after creating that ink, strangely enough, didn't even need it. I had such a rush of new ideas that I didn't care if it used the dusk ink or not. Anyway, I based this ritual off of a small stone I saw the children of the village play with that had magnetic properties. By creating a ritual that mimics this attraction, I made the "Ritual of Magnetism" to pull ores out of the ground and place them in a three by three by three meter cube at the heart of the ritual. It seemed to pull from a seven by seven meter area centered on the master ritual stone, and I managed to tweak it to pull up almost any ore, metallic or not. I offered to help the miners in town with this, but they didn't want anything to do with my work. After realizing I forgot the cost again, I started leaving spaces at the end of these entries for them. This ritual has an activation cost of 5K, with 50 LP for every ore pulled up. -aw.entries.rituals.crusherRitual=To pair with the ritual of magnetism, I created the "Ritual of the Crusher." It will break any block in a three by three by three meter cube below the master ritual stone. Instead of having the crushed blocks fly off, I made the ritual push them up into an inventory above the master ritual stone. It doesn't really care where you want it, whether it be a simple chest or a barrel or something else. 2.5K activation cost, 7 LP per block broken. -aw.entries.rituals.speedRitual=As a variation of the "Ritual of the high Jump", I created the "Ritual of Speed". It was a simple task to modify an effect I already knew well to fling things at an angle instead of just up. What must be stated is that the direction, where the dusk ritual stone is, is the direction the ritual will send you, at a very rapid rate. You may want to have a way to slow down, as I discovered the hard way. 2k activation, 15LP per use. -aw.entries.rituals.shepherdRitual=Remembering the success of the ritual of the green grove, I wanted to test myself by creating a ritual that could transfer the effect from plants to animals. The "Ritual of the Shepherd" was just that. Any animal in the ritual's area of effect will grow at an alarming rate, what would take weeks just took an hour. After several tests, I concluded that if an animal took twenty minutes to grow from an infant to an adult, this ritual would cut that time down to three minutes flat. So far, I have found no side effects of using this process on animals, and I hope this remains the case as time goes on. 10K activation, 2LP every time it speeds up growth (about once every second). -aw.entries.rituals.darkMagic=The next ritual I created was one I'm not proud of. But after over three months of constant bandit attacks on the trade routes around the village I decided to take action, and anything I had at hand was far too merciful. They had earned a slow, painful end for all their crimes and I intended to deliver it. I created a ritual to use as a trap, laying it just off one of the largest trading routes, behind a thick group of trees. I then dressed as a merchant and bought a horse and cart to lure the bandits out. Like moths to a flame they came for me, riding on horses of their own. They expected me to either surrender or stop and put up a fight, so they only sent out two from their group behind the tree line. Once they saw I had no intention of stopping, they all gave chase, thinking I had something of great value, worth running from bandits for. I turned a tight corner into the tree line, the cart beginning to tip as I did, and went off the road to where I had set up the ritual overnight. By the time they saw it, it was too late for them. I stopped at the base of the ritual, knowing they couldn't get away in time. "What is this, where is your treasurer?" one of the first bandits there said. "I thought you had something, but now you stopped." I gave him a bitter laugh, he's more concerned about looting me than the reason why I brought them here. "I don't have any treasurer on me or in here, I came out here for you." By then all twenty of the bandits had arrived, some filled with blood lust, others full of greed. "Then why did you run? What is that thing anyway?" By now the head bandit was straining to keep ahold on his sword, so I kept him taking. "Oh, nothing much. Just a ritual built by a blood mage. I wanted to make sure and bring you here, just to test it out." Now all of them were pale, and their leader was having a hard time staying on his horse. "Blood magic? Are you the mage who built this? What are you trying to do to us?" He bellowed as he was trying to turn fear into anger. He was getting nervous now. Good to see the title "Mage" still sends a little fear into scum like him. "Nothing much. Well, to me anyway. To someone like you, who has cast aside his humanity for a quick bit of coin? A slow and painful death." At that point, most of the bandits were already lying on the ground while their horses started backing out of the clearing due to the panic and confusion. "Why... Why are you doing this?" The leader managed to spit out with his face in the dirt and far too weak to stand. "Because I have heard what you have done. How many you have killed for the few coins in their sacks. I know that you are slowly killing the village I call home, and while I am not someone who they like having around just outside their homes, I still feel obliged to help save them from any mortal danger they might face." At that point, none of them could move. After about five minutes, the last of their life essence had drained away. I tore the ritual apart, then went back to the village with all of the bandits' horses. I gave them and the cart to the "Mayor" of the village, if you'd call him that. He pulled me back into his office and asked where I got them from. I told him the truth, part of it anyways: "It seems like those bandits we've had for the last few months earned the ire of the wrong mage." He didn't ask any further questions, nor did he ever bring up the topic again. All I know is that I found a large pile of gifts from the village on my doorstep the next day, from fresh bread and milk to fine fabric. After a few rumors spread about what happened, we never has bandit troubles again. -aw.entries.rituals.knifeAndSufferingRitual.1=Years later when Tiberius created his blood altar I split that ritual into two versions, the "Well of Suffering" and the "Ritual of the Feathered Knife". Each needs a large activation cost of 50K LP, and I tweaked them so that they can fill a nearby blood altar with the essence they drain. Each has safeguards so that what happened with the bandits won't happen again. The well of suffering cannot affect humans, and will slowly kill everything inside its range. It will drain life one half a heart at a time at the cost of 2LP every time it steals essence, filling the linked altar with 10LP. I have tuned it to work with the altars sacrifice runes, so it is highly recommended to use them to boost the LP output of this ritual. -aw.entries.rituals.knifeAndSufferingRitual.2=The feathered knife on the other hand uses the life force of humans to fill the altar, but I have it set to stop when they start feeling weak, at about three hearts. Like the well, runes can boost its output of 100LP per half heart, but it needs self-sacrifice runes instead to boost its power. 20LP for every half heart drained. -aw.entries.rituals.regenerationRitual=Sometimes you find the idea for a ritual, and other times the ritual ideas find you. The ritual of regeneration was of the latter group. I was going about my daily business when I heard frantic knocking on my door, it is a rare thing for someone to come to my house willingly, let alone in such a panic. So I rushed to the door and found a few of the villagers standing there, one of them holding a boy of about ten in his arms. The boy was wounded badly, several deep cuts and dark bruises covered his body. There was enough blood on his clothes that I first thought them originally red. They told me that traders rushed him here from a nearby village that was under attack by demons, and that their healers couldn't do anything for him. After a quick glance, I told them to bring him inside, then sent them home. I did what I could to hold off infection and slow the bleeding, but nothing I had on such short notice could help more than just delaying the inevitable. But I couldn't let it rest at that; not having anything on hand was never an excuse for giving up. I hastily threw together a ritual, mixing concepts and taking risks to build it. Still untested, I brought the boy to the ritual. At first I thought nothing was happening, then after a minute I noticed his wounds starting to close and the bruises beginning to fade you can't imagine how glad I was that it worked. As I started gathering and preparing more medical supplies, I noticed the boy had opened his eyes. He was still quite dazed from the blood loss, and he was looking at the ritual with nothing less than awe. I caught his attention and gave him a light smile, holding a finger up to my lips as the universal sign for a secret. This was the first time someone, who wasn't one of my apprentices, got to see my lab, and there were quite a few thing here that I'd rather have the villagers not know about. At that point they had seen a few of my rituals, but they didn't know what fueled them. I then used a simple spell to send him back to sleep. I later found that my hastily assembled ritual had an unintended side effect: it didn't just work on humans: anything, from sheep to creepers, inside its area of effect will slowly be healed. I also discovered that it slots in easily with the well of suffering and the feathered knife. It needs 5K to activate, with 200LP every time it heals a human (It seems our lives are worth more than cows or creepers.), and 20LP when it heals anything else. I later learned that boy's name was Tiberius, and he grew curious about my work. For six years I held off his demands to train him. It was only after he mention seeing red threads coming from me and being attached to every ritual and item I had used blood magic to create, that I considered training him. It was only after he wrote down a theory and showed it to me that I finally said yes. I had him learn thaumaturgy as a cover up story for the villagers, and as a way to show him the difference between blood magic and other magics. First thing he started working on was an improved way to use blood alchemy, rather than learning the way I had been doing it for decades. I had to laugh to myself when he first told me that I had been so busy creating rituals that I never stopped long enough to think about ways to improve the other aspects of blood magic. So taking him under my wing was a good decision, even if he left me little choice. The blood altar we finally created was a much more efficient way to use blood alchemy, needing little in the way of magical prowess, unlike the way I had been doing it, while also being slightly cheaper in terms of blood use. We also created what he dubbed the "Blood orb", a vessel meant to mimic the soul while acting as an extension to it. After finishing the altar design it took him one week to build the altar and create the orb, granting him the same soul network capacity as two weeks of meditation. I might need to rethink the way I use blood magic, considering the leaps and bounds he is making with it. I might also be better off sticking with rituals and let him re-invent the wheel, since it seems like he is adding a few wheels of his own after I found him sleeping at his work desk drawing up a plan for a portable ritual. He soon created items he calls "Sigils" as a way to use similar power to rituals, but more portable and most are intended to be used on or around the caster. He quickly created a sigil meant to read the capacity of the bound user's soul, but when he tried to read mine I repelled his efforts. My way might have been harder, but it has given me a few tricks he might never learn. -aw.entries.rituals.harvestFestival=With Tiberius busy with his own work, I decided to challenge myself. I wanted to start creating rituals that pushed myself to the limits of what is possible with blood magic. Unfortunately, there was something baring my attempts to create these rituals: My activation crystal. It was barely able to conduct the Life essence required to activate rituals like regeneration, adding any more than that and I might lose more than just the crystal. I wanted to start researching a way to improve my crystal, but my duties to the village came first. We had a small drought to deal with, a small taint problem to the north, and the Hell's harvest festival was coming up, and so I had to meet with the other Conglomeration members to give updates on my work. I had grown to detest some of the work they do, but I still remain with them as their oldest member and as the last conglomeration founder still alive. Not that I had much choice when I joined, it was ether sit through a somewhat dull meeting every year and earn some gold for not causing trouble over the last year or let them destroy each other in an all-out war for the nether and its resources. There are still days when I wish that I went for the latter option. I asked Tiberius to help the villagers while I deal with the taint. On my way to the taint site it started to rain, so that might have made Tiberius's life a little easier. The festival came quickly, and I did my part in the opening ceremony and watched as Tiberius lit the portal. Never understood why we go through all the hassle of lighting the portal every year to then close it three days later. Regardless, we all entered the nether to see the others, already at work. I wandered off to greet people and answer a few questions, leaving Tiberius to fend for himself. I glanced back at one point to see him with a face that could only be described as pure disgust. Apparently he feels the same way I do about what the nether has become. I still remember the early days when I first opened the nether portals, back when the pigmen roamed wild and free, and death was around every corner. Those days seem like a dream now, after everything the Conglomeration has done to industrialize the nether to maximize their profit margins. Later that day I decided to visit the small building I own here and sleep at during these festivals. I found a note on my bed from Tiberius saying that he had some work he wanted to do, so he went home early. Can't blame him, I would have left myself if I had the choice. I went to this year's meeting spot late in the evening, when fewer people walked the paths cut into the netherrack. I attended the festival every year, so most people were used to seeing me here and I even got a few greetings from passersby. I walked towards the huge building carved into the netherrack with "Thermal expansion: Powering the world!" inscribed on the front of an otherwise purely white tower. I walked through the clear glass doors, then started my way towards the elevator. A tall skinny man stood inside the metallic box, and said "Greetings sir, where would you like to go?" as I walked inside the elevator. I had never seen him before, so I already knew what would happen next. "I need to go the thirty fifth floor. I have a meeting to attend to." I recall saying to him. "I'm sorry sir, but I can't do that. Only V.I.P's are allowed on that floor." I sighed as he was beginning to try my patience. "I know that, look up the name "Magus Arcana" in your little terminal over there." At first he seemed reluctant to even check, but once he saw I wasn't leaving till he at least looked at the terminal he turned and quickly hit a few keys. After about five seconds of reading the data that came up he quickly spun back to face me, his face a few shades paler. "I'm so sorry sir, I didn't know that..." I quickly cut off his stutter at that point. "No need to worry, I'm used to this by now. If we can start heading up now I might even give you a tip." After that he closed the doors to the elevator, pulled a key out of his pocket and stuck it into a small hole in the wall. A piece of the wall slid open and I saw the scanner that was hidden behind it, then he brought his eye up to it and asked me to do the same. Once it had scanned both our eyes it gave a small chime to let us know we did everything correctly, like it had the last time I had been there. I gave the man three gold coins, a generous tip to a king, let alone him. He could feed himself for a few months off that alone, and he might need to after today. They rarely keep their jobs if any of the board members didn't like them. I still heard him thanking me until after I entered the meeting hall, everyone else was already there. I knew almost everyone present, with only one new face at the seat of GregTech Intergalactical. They almost always had a new guy attend each year, so I assumed the Gregtech company was as cutthroat and brutal as rumors said. "Now that everyone is here, shall we get started?" Iza Lemming, daughter of thermal expansions founder asked once I took my seat. The new guy jumped up and started yelling once she said that "Wait, who's he? I don't recall ever seeing him before!" "Calm down, Frank. He is the guy we've been telling you about for the last half hour." Iza said. I couldn't help but crack a smile as she held up her reputation for not having any time for idiots. "Wait... He is the guy who lit the first nether portals? He is one of the founders?" I could tell he was confused, and I couldn't blame him. The fact that it was me who lit the portals a century ago is one of my best keep secrets, and the fact that I'm on this conglomeration's board is something only a handful of people outside this room know. While in truth I didn't discover the nether, I was the one who popularized it by creating portals in many major cities. "Yes, that is him," Iza said as I sat next to her "Now that you're up to speed will you take your seat so we can get started?" He took his seat again, but his gaze never left me. I looked around the table at everyone, noticing once again that for another year none of the other Conglomeration members bothered to show up in person, aside from Iza who owned the building we all sat in, opting instead to send representatives on their behalf. This year's meeting went on like every other years'. Trade requests and action requests were announced and Iza requested permission for two wither summons to start up a nether star generator. Frank demanded trade from me for iron and iridium, claiming that I owned a huge mine full of both. After ten minutes of trying to calmly tell him I owned no such mine, Iza told him to sit back down and drop the request or leave the room. He returned to his seat quickly, but I still saw the steam coming from his hairpiece that had come lose in his fury. No one bothered to tell him about it. On a quick note: I was telling him the truth, I own no such mine. I sold it a few years back, and only get a small cut of anything mined. But he didn't need to know that. The other requests went much faster, with Industrial Craft asking for some of Minefactory's rubber supply after a bad harvest, Mechanism requesting use of an ender quarry, and forestry asking for permission to search my lands for their precious bees. I gave them permission, as long as they sent a few traders through with a few of their products like honey and waxes. Then we moved on to general business of who earned how much, how far in the black they are, who now runs what. I sat quietly through all of it, making mental notes of all this information. As we were about to move on to the final topic, Frank decided to interrupt. "Wait, we haven't heard from Magus yet. Please, tell us what it is that you do? I honestly never heard a thing about you until today, and I see no reason why you own such a large area of land. I am even more curious about why you're the only magic user here. Please, enlighten me." He had a cocky grin on his face, like he had just asked questions I had never heard before. I gave him a very unamused response. "I'm sure you have heard of me, just not by name. My name is more in rumors and legends than in newspapers, and I honestly prefer it that way. As for what I do with my time, I spend it looking into legends and myths, old tomes and texts for information about new or lost forms of magic. You have huge R & D departments, I have a few friends who share their research and knowledge with me, and apprentices that always find new ways to use old things. As for why I'm the only magic user here and why I govern such a large area of land, the answer is simple: The mages never split up. While you technology users divided your land among over a dozen companies, the mages never did. We're happy governing ourselves, and we have never needed corporations or rulers to tell us what to do and what not to do. If you put the land together that all of you own, then compare it to what I have, you'll see that I have less than a third of that. Not my fault you split, and because I don't really "rule" my area they have no one to divide from. Does that answer all your questions?" He looked like I just popped his favorite balloon, so I guess he assumed to have me pinned. "But....but... That still doesn't answer why you haven't been at war with each other! I know there are many kinds of mages, so there is bound to be some in-fighting." I smiled, he used a question everyone like him has. "You're right. There are many kinds of magic, and there are small battles from time to time. But all the mages know that this is the only place where they can practice magic freely, in broad daylight. When the world is against us, we can set aside our differences to work together. Is that enough of an answer for you?" He apparently ran out of questions, as he grumbled to himself then waved to have the meeting move on. An hour later most of the representatives had left, first and foremost Frank. Only Iza, John.W. Tema from Extra Utilities, Prince Muse from the power suit empire, and myself remained to chat informally. Iza had decided to talk to me for a bit, as it was customary for the host to be the last to leave. "So, what did you think of Frank?" She asked, a light grin on her face. Nice to see running a company like this hasn't gotten rid of her humor. "Well, I don't think he likes me. I have no idea why." She gave a quick snort, trying hard to hide it. "It's how men like him are. He knew all kinds of information about all of us when he got here. That fact that he knew absolutely nothing about you was driving him nuts. He first thought it was a mistake when he noticed the number of chairs, and asked to have one taken outside. Let's just say I'll be happy when he is replaced, and I won't miss him at all." "Let's see...is he the fourth or the fifth to try and ask me questions they think I won't answer..." I said almost to myself, trying to remember. "Neither. He was the sixth, if my memory severs me," John said, Muse having left the room while we were talking. "I think you're right, the last one was about five years ago. Rodger, wasn't it?" I chuckled as I remembered him. "He demanded to see my papers, and thought we were trying to trick him. He never did believe that I own the largest chunk of the world. " "Well, you less "Own" it and more guard it. You tend to let the people own themselves, for better or worse." John said, taking a seat closer to Iza and me. "True. And it works for the better more often than not. Besides, I never could see myself in one of those big buildings you are both so fond of. Too flashy for my taste, I prefer to blend in, not stand out." I told them. "That's why you live like a hermit." Iza said, before leaning back in her chair. "I admit, I envy you at times, Magus. You can walk amongst your people and they will give you little more than a wave. If I try to do that, an army of news reporters track my every move in the hopes I slip up. It's exhausting at times." John gave a small sigh "I can agree with you there. Everyone I work with wants my job. I keep telling them that they really don't." We chatted like this for another hour, both of them letting their hair down as they talked about what's been going on with their lives. We left, Iza to the pent house on the top floor and John joined me on a short walk as I returned to my home in the nether. "I must say Magus, I always enjoy the end of these meetings when we can put business aside and actually talk for a change. Paper work is all well and good, but it is nothing compared to having a nice chat with you. I grow sick of all these "Yes Men" who only want to tell us what I want to hear till the ship starts sinking." "Having a real conversation with you and a few of the others is why I stay on the board. Everything else grows worse every year, but the afterward is still worth it all. How's your wife doing anyway?" He gave a quick chuckle before saying, "You know, I've been on that board for the last ten years. You're the only one who ever bothered to ask about my family. She's doing just fine, caring for our daughter while I'm out this weekend." "Well, we only have to work today. Since we already wrapped up business you might want to spend the next few days with them. If anyone asks I'll tell them you had something more important to do." He placed a hand on my shoulder. "Thanks, I might hold you to that. It has been a while since I gave her a nice surprise. I'll see you next year." He said as he started walking to a hotel. "Feel free to visit my home any time, I'm sure your daughter will enjoy a nice vacation." I told him as he left. He gave me a nod and a grin, before turning back to the path, almost running into a lamp post. The next two days went by much faster. I greeted people, helped a few fellow mages with questions. Apparently Way and Fenn had already started spreading the word, a few asked how my new research project was going. A few other Conglomeration members stopped by my small home, wanting to chat. I didn't see Frank again after he left the meeting, so I assumed he went back home. After the festival was over, I did my normal part in the ceremony by watching them close the portal again and not demanding that they leave it open. I returned to my home to find that Tiberius had been busy while I was out. He had created runes to augment his altar. When I asked him what purpose they had, he said the altar could make a few things that were not possible before, but that was about it. The "Blood Runes" he created looked a little plain, but I didn't voice my concern. As I fell asleep that night I realized how much they look like my ritual stones. Perhaps painting them might give them more power, like they do in my rituals? I was right, as Tiberius soon discovered accidentally. He managed to create runes on the stone using sugar, which made his altar work a little faster. We also noticed that the altar only had enough power to draw effects from the four runes closest to it. Perhaps we need to create something to "Boost" the altar's range... Three days later I heard a weak shout and raced to find Tiberius. He had collapsed at his altar, young fool, after getting far too close to his limit. I helped him stand, then looked to see what it was that pushed him so far: an emerald green blood orb. I gave Tiberius a hand in filling it, and his soul network to 25K LP. He was making quick progress, but I hoped he would be a bit more careful in the future. Life went on like this for the next year and a half. Tiberius had made several new sigils that gave him a simple form of flight, boosted the speed he worked, helped plants grow, and could remove liquids. We had started work on building a new blood altar behind my home, finding that glowstone worked well enough to boost the altar past the four upgrade slot limit we had reached and that the basement wasn't going to hold a bigger altar. We had gone the extra mile to create runes that boosted how much LP we received from our sacrifices, using the same effect glowstone dust has on the altar. Then one day when I was helping Tiberius create the last few runes, there was a knock on the door. -aw.entries.rituals.thenThereWereFive=Tiberius went to get the door, and I thought it was just one of the blacksmiths asking to use one of the lava crystals he had started renting out. About thirty seconds after he left, he called back. "Master, there are some people here to see you. They're asking for you by name." It was rare enough that we got visitors, let alone ones that want to speak with me and knew my name. I walked to greet whoever was at the door and found three children. One had dark brown hair, a ragged shirt and patchwork pants, an old and somewhat rusted short sword, and looked to be the eldest of the group at fifteen. The second looked enough like the first to be his brother, but not twins as his hair was lighter and he was a little taller. The third was a pale haired girl, so blood relation was probably ruled out. Her hair was long and a little matted, she looked to be the youngest at about thirteen, the dress she had on looked a little too small for her, was falling apart at the seams and it looked like she was trying to hide behind the other two. All three of them were painfully thin, dirty, and the eldest looked like he had a few fresh scars from at least three days ago. "You must be Magus." The dark haired boy said as I walked up. "We've come a long way to meet you. May we come in?" I couldn't turn down anyone who needs help like these three did, so I told them to leave their boots at the door and have a seat. Long tale short: I now had three more apprentices. Within a week all of them became blood mages after unintentionally finding three new branches of blood magic. Vlad started working with alchemy, both making potions and mixing items to create new items. Demir started working with spells, and has already created a powerful framework for conducting his power. Bella on the other hand has shown us that demons are much more than mindless creatures, and is working out how to form pacts with demons and bring them to our world, body and soul. -aw.entries.rituals.alchemyRitual=I created two more rituals since they have gotten here, one was "The Ballad of Alchemy". It was a way to help Vlad with the creation of large amounts alchemy products, as he mentioned how time consuming creating everything he needed was. After a little work, I had this ritual ready for use. After activation, it needs a little extra set up to work: On one side of the master ritual stone you need to place the alchemical chemistry set, and on the opposite side you need to place an inventory (a chest, or anything else really. Could be a furnace for all the ritual knows or cares.) Then the remaining two sides are "Input" sides, where the ritual will search any inventory for items. On top of the master stone you must place a blood altar with an item inside to act as a "Focus". The ritual will then pull items out of the input sides and place them inside the chemistry set, then any item it finds in the output slot, or any item not needed in the crafting (such as empty buckets) and places them inside the output inventory. Once I showed this to Vlad he nearly passed out, then hugged me. To say he was happy is an understatement. 20K activation, and 10 LP every time it moves an item. -aw.entries.rituals.domeRitual=The second ritual I created was the ritual of the dome. What it does is simple, it removes any fluid block in its radius of ten blocks. But it doesn't just remove the fluid, it stores it in a small pocket of space so that when it is deactivated any blocks it removed will return. Maintaining this effect does have a small LP cost every tick. While the range seems small at first, I am sure that I will be able to find a way to extend it. Placing stuff underneath the ritual appears to have no effect, so I should ask Vlad or Tiberius to look into it. Activation cost of 10K, with a small passive drain. Hmm, to think this ritual came about when I had to deal with a small flood... That brings us up to present day. I am still trying to strengthen the activation crystal, while all my students are busy with their own tasks. I will write again once I have something worth writing about happens. -aw.entries.rituals.awakenedCrystal=After a little over three years with having Vlad, Demir, and Bella as apprentices, they have helped me awaken the true potential of my activation crystal. After helping Bella create a way to summon demons, she showed me an item a special demon called an "Elemental" drops: The demon blood shard. I already knew that the activation crystal seemed to be attracted to blood shards, but what we have been harvesting off common monsters of the night turn to dust when I try using them on the crystal. But this... this blood shard has a slight demonic aura to it, and it seems like it wants to merge with my activation crystal. After some work with Vlad, we used a few of his more potent alchemical reagents to bind the demon blood shard to my activation crystal, "awakening" the true potential of it. I have yet to try and build any new rituals, but that will soon change. -aw.entries.rituals.featheredEarthRitual=The first ritual I created is "Ritual of the feathered earth". It has a huge LP cost of 100K, but any fall damage within a 30 block horizontal range or a 20 block vertical range is negated because the ritual turns the ground soft. The ritual needs no further cost after activation due to the semi-permanent nature of softening the ground. I was trying to make a ritual to let me fly, but this seems useful as well. -aw.entries.rituals.gaiaRitual=The next ritual was based off an old magic ritual that required three royal goat sacrifices. I have managed to replicate the effect using blood magic, and have named it the "Ritual of Gaia's Transformation." The basics are this: By sacrificing items and 1M LP to Gaia, you can change the climate (or biome, as some call it) of the area around the ritual. Unfortunately, Gaia will only take items off arcane plinths around the master ritual stone, but nothing else about this ritual is cheap so why should this be? The rituals area of effect must be defined by using blood stone bricks (either the larger or normal, and has a range of 21 blocks) and it only effects places with a definable path to the master ritual stone. Simply put: If you placed a water block on top of the master ritual stone, then placed more water blocks where the water flowed until the water stopped flowing, where there is water is where the ritual will effect. The ritual assumes first of all that you have a humidity of 0.5 and a temperature of 0.5. It will then consume the items that you have placed and modify the humidity and temperature accordingly. It also starts with assuming that a range of 0.1 is acceptable in both directions. If the ritual cannot find a biome that is registered in the list, it will simply set the biome to a "plains" biome, with a biome ID of 1. The items that can modify these parameters are as follows: Sand: humidity - 0.1 Sandstone: humidity - 0.2 Netherrack: humidity - 0.4 Lapis: humidity + 0.1 Water bucket: humidity + 0.2 Lapis block: humidity + 0.4 Coal: temperature + 0.1 Coal block: temperature + 0.2 Lava bucket: temperature + 0.4 Snow ball: temperature - 0.1 Snow block: temperature - 0.2 Ice block: temperature - 0.4. It is a tricky ritual to use, but the local bee keepers are thrilled by the possibilities. A tundra at the heart of a dessert, mushroom biomes anywhere, or even tweaking the Nets biomes so living there is possible. -aw.entries.rituals.condorRitual=After three month worth of work (Tiberius says I'm obsessive about rituals, and I have little ground to say otherwise. I worked on building this ritual for three days strait, without eating or sleeping.), The Reverence of the Condor (named after a legendary Thaumaturge's sword) allows anyone in a ten block horizontal range (from bedrock to skies limit, only horizontal distance matters.) will be able to fly freely. This ritual needs 1M LP to activate, but has no passive cost at all. Since adding this ritual to a new basement layer, I have found it to be useful. Caution mast be taken however, as this ritual does little for fall damage. It is recommended to use this with the ritual of feathered earth for best effect if you are planning to stray from its area of influence. -aw.entries.rituals.meteorRitual=After reading an interesting book on where ores come from, I built "The Mark of the Falling Tower." It uses a process similar to the ritual of magnetism, but instead of pulling them out of the earth in drags a meteor out of space and pulls it toward the master ritual stone. (Note: The meteors summoned by the ritual often come in with a powerful blast. This is unavoidable, as we are dragging in huge chunks of rock at very high speeds.) This process is not cheap, needing 1M LP to activate, then a "Template" item sacrificed by dropping it on the master ritual stone to help the ritual find a meteor. The item dropped will influence the meteor it finds, but there will always be some randomness to the process. Here is what I have discovered with some experimentation (Note, this might differ from person to person. I can only give you a reference point for what you might get and tell you what they need.): A stone block summons a huge meteor filled with lots of stone, while also having ores often found close to the surface of the world scattered about. Common things to find are: Coal, apatite, and iron. An iron block summons a meteor filled with metals like iron, gold, copper, tin, lead and silver. It also has very little stone, and some lapis and redstone mixed in with the metals. A diamond calls down a meteor that is often filled with gems (diamond, emeralds, amber) and other rare items like cinnabar. Finally a nether star calls down a meteor filled with very rare or tricky to get ores like nether quarts, diamonds and emeralds (more than what the diamond summons), sunstone, moonstone, certus quartz, and the always rare iridium. (Gregtech has become a lot friendlier since I discovered this ritual, for some reason). I should repeat that your location in the universe influences what the meteors come with. The ore amounts, meteor size, and even what ores do spawn have been known to change, from some having metals I've never heard of to other iron block summons having only iron, gold, lapis and redstone. It is almost as if someone can tweak these factors to their heart's content... No, nothing more than my paranoia. -aw.entries.rituals.expulsionRitual=The next ritual I have created with my wonderful new activation crystal was one I'm rather proud of. Every few years someone gets it in their head I'm the incarnation of evil and then raise up a mob to try and kill me. Since I knew it was time for it to happen again (always just after the first harvest, when the farmers are planting more seeds. This is around the time it happens, like clockwork.), I created the aura of expulsion. What it does is simple: It creates a field in a square 25 block radius that will check for anyone who isn't the activator. If it finds someone who isn't the activator, it will "Expel" them by randomly teleporting them away. This ritual has an activation cost of 1M LP, with a 1K fee every time it expels someone. I should note that if someone lands inside the field of another aura of expulsion they will be teleported again and again until they land outside the field or the ritual owner's network becomes dry. You have no idea how entertaining it was to sit on my porch and watch as the mob suddenly realized that they were heading in the wrong direction when they started marching toward my home. It took them an hour, but they finally figured out that they couldn't get close to my home. Afterward I got to hear all the silly reasons why they wanted to kill me this time. Also, I have added a check to the ritual for an inventory above the master ritual stone. If it finds a blood orb bound to someone inside, then they become "Whitelisted" from the effect of the ritual. -aw.entries.rituals.costOfProgress.1=Well, I write this with both good news and bad news: The good news is that we now have a lead on what my students need for their next tier of blood altar. The bad news is that what they need is very hard to get: Beacons. Four, to be exact. Nether stars are an extremely rare resource that very few have access to, so building this seemed impossible to them. I told them that I might be able to pull a few strings, but it will take time. For now they are working on building the upgrade runes they will need, then I will tell them to try and perfect what they can do with their master blood orbs. Thankfully, the next Hell harvest is in less than a month so I can start the plan I have been thinking up soon. But it will take at least a year to accomplish, so we have time to kill... I have just returned from the Conglomeration meeting, and my plan is now in action. You see, the host for the next meeting is the Mage guild, and as the host I have the authority to make a request: That all the Conglomeration members show up, in person. It has been what, thirty years since I have met most of them? Regardless, I gave each of the representatives a letter to deliver to the Conglomeration board members that said "As the host of next year's meeting, I have two requests. The first is that we hold the meeting near my home instead of in the nether, as I really don't have anywhere large enough to host there. The second is that all Conglomeration members show up in person. Don't bother bringing servants, but you may bring friends (give those poor souls you send in your place all the time a thank you. They deserve one.), and family members. Room and board should not be a problem, as I will gladly provide both. Don't send people in your place like most of you do, as I will not allow any substitutions. "If you attend this meeting, guests or no guests, I have prepared little gifts for each of you as a thank you. Inside this envelope you will find a card with what I am offering. You may find my offer beyond believe, but I can assure you that I have everything offered and more. Consider this a little incentive to come, as I know most of you spend the Hell's harvest working instead of enjoying a small vacation. If you wish to attend, simply send a reply letter to me in whatever manner you see fit. I look forward to seeing you all again." The gift I offered depended on who got the letter. To Gregorius Tech IV (he doesn't trust anyone else to run his company, so every time he feels like he can't run the business anymore he makes a clone of himself, then moves all his memories to the clone.), I offered a stack of raw iridium ore. To Iza Lemming I offered a few resonant ender cells (fully charged, of course. I have more than magic tools in my basements.). I could list them all, but then this book will drag on longer than it already has. I told my apprentices that I should be getting a few letters soon, and a week later I started getting the letters in a wide variety of ways. Gregorius opened a hole in space to have an intern hand deliver it, Queen Muse sent a power armored messenger with her letter soaring over the tree tops. Lucas Jaguar sent one of his personal trains in, one that built a track as it went and removed it automatically. I could go on, but I think you get the idea. When Tiberius asked what was going on, I told him I would be having a few guest over in a few months and these were their answers to my invitation. All of the letters said yes, so I must have gotten their attention. For the nine months after the Hell's harvest festival, I learned all I could from my apprentices. I wanted to use Tiberius's artifacts, so he showed me every sigil he has made and helped me upgrade the bound armor he gave me. Vlad showed me the secrets (in exchange for a few secrets of my own) of his potions, and the power he could bring out of what used to be so simple. Demir gave me spell components, and showed me how to build a spell structures. Bella helped me summon and tame a demon similar to Sinferrius (the "Fallen Angel" breed), who was named Thanatos. We found that the two of us shared a thirst for knowledge, and he started helping me with research in my library. When there was only three months until the next Hell's harvest festival, I opened the "Conglomeration Hall." -aw.entries.rituals.costOfProgress.2=The Hall is where I have stored most of the Technology I acquired over the years, from trades with the other board members or deals with more shady groups. Every innovation and project that any of the world's companies have ever made can be found here, from redstone furnaces to industrial grinders, power armor upgrades to quantum armor, and coal coke ovens to mass fabricators. Most of the time I never use this place, but it works as a fine testing ground for applications of my magic. After doing the ritualistic "Dance of the Mage" to call up from the ground then open the gates to The Hall, I noticed that all of my apprentices were standing behind me slack jawed. "What... What did you just do?" Demir finally asked. "I opened the door to this old place. We need to do some cleaning if we're going to have guests here. Dust gets everywhere and... Well, what are you waiting for, come in and help me!" It took all of us the first two months to clean the place (all ninety-five floors), and we spent the final month taking care of all the last minute touches such as making a large order for food from the great meat and produce alliance (Queen Pam, Harvey Growth, and Larry Iguana are the main representative for the Conglomeration, but there are many smaller colonies that make up their territories). Shortly after making sure everything was in working order, all the dust was cleaned out of the place, all the beds had clean sheets, and many other tasks were done was it time for the Hell's harvest festival, I asked my apprentice's to watch the place while I lead the other members here, and to greet them when they arrive. I think at that point Demir still thought this was some sort of prank, as there isn't any mention of the mage guild having a representative in any history books (and I've made sure it stayed that way. Any who have tried find their books missing, pages torn out, and critique for believing some legend is fact.). We went through the normal procedure, a merchant that had just moved in to town lighting the portal. After milling about the place for an hour, I met all my guests at Fire Grove Park (tourist spot, if you can believe it) and set about escorting them to my home as orderly as possible (which wasn't very). Thankfully, almost everyone was in commoner clothing as I had requested so no one realized all of the leaders of the world were walking past them. After just half an hour, we were all in the carriages I rented (I told the merchant it was a family reunion. He never asked if it was my family.), and on our way to my home. In total there was a little over a hundred and fifty people here, so I'm glad they took up my offer for guests. Once all of the carriages arrived, and I had asked the drivers to return a few days later, I set about greeting everyone and showing them around. It took most of the day, but everyone started relaxing and enjoying a nice vacation. We all came together again for dinner, and as we enjoyed meals cooked by a local family run restaurant that I always hired for large meeting like this I moved from table to table, greeting guests personally and answering questions. As the hour grew late all the Conglomeration members joined me in a small room for the meeting. "Well Magus, I had no idea you owned a place like this!" Raylind Diyo said as he came in. "I might have paid you a visit sooner if I did." Raylind said as he took his seat, smile on his face. I saw he brought both his wife and daughter here, so that might be why he is in such a good mood. "This place is better than any hotel or amusement park I've even been in!" Carrin Calclavia, the fifteen year old owner, head of research for Modular Force Fields, and daughter of the former owner Count Calclavia said while spinning in her chair. "Seems like a waste of my time," Gregorius said. "Oh, don't be such a spoil sport Greg. Most of us have forgotten what not working every minute of our lives is like, and I for one remember why I liked not working when I was younger!" Jason Algorithm of Applied Energetics said as he took his seat next to Greg. Greg gave him a cold glare for a few seconds, then his expression broke as he said, "Alright, I'll admit I have enjoyed not worrying about paper work for the last few hours." "Now that Greg has almost smiled, let's go to Magus for more miracles," Carrin said, mischievous grin on her face. "Well, everyone is here, so we may start. Any news to share?" The news this year was a little more lively than normal, a few had started "Re-inventing the wheel" to use their technologies in new ways, while a few others had started work on new projects. Then we moved on to the normal trade requests and protocol stage, where it was business as usual. Until it was my turn. "Before we move on, I have to request a few wither summons and kills." I told them. "Ah, you need nether stars? I still have a few spare, so you can use them." Jason said. "No, I only need a few stars. It is the killing of the Wither I'm more interested in. Call it a test for my students, who I'm sure most of you have met earlier today." Raylind started brushing his chin with one finger, before saying "Really, you want to have those kids kill a Wither? Seems like a bad idea to me..." I smiled at this "Don't worry about them, they can handle themselves. It's the withers you should be worried about." "Besides..." Carrin said "All of them are older than me. So I would not call them kids. And they're more mature than a few of you in here..." I had seen Carrin and Bella talking earlier, so it isn't a surprise she is defending them. And Carrin loves getting gabs in when she can, so this was the best of both for her. "We're getting off topic. How many wither summons are you requesting, and how many do you plan to have done by hand?" Iza Lemming said, trying to help poor Raylind. "Thirty summons, and thirty manual kills." This drew a gasp from everyone, including Greg. "Thirty... All at once?" Doland Tema, son of the founder R.W. Tema asked. "No. one for each my students, six for myself, and twenty as a finally. As I said, thirty," I told him. "Might I ask what you need that many nether stars for?" Greg asked, eyebrow raised slightly. "As I told you, this is a test for my students and myself. We really need only four stars, but I'd like to test the limits of the new form of magic we've been working on. And if you don't mind, Doland, I'd like to use Hell's Fridge for all of the Withers." He looked at me for a few seconds before saying "Well, it would be a shame to kill all these withers without making a show of it. Alright, you helped build the place anyway so I have no reason to deny you. Hell's Fridge is yours to use. And I approve the Wither summon request." One by one everyone approved the request, some more warily then others. Everyone here knew what nether stars can do, so someone with thirty of them� Even in my KAMI days I didn't ask for that many at once. The meeting ended shortly after that, but I asked Greg to stay as I had to talk with him privately. After everyone else had left, I created a few protective wards to keep what was said secret to any eavesdroppers. "What do you need to talk about?" Greg asked, more curious than anything else. "I know we're both tired, so I'll get right to the point: I know all about your little "Project New Gate."" This seemed to shock him briefly, so I said "Oh, you and I both know your company can't keep secrets. It would have gotten out sooner if I didn't pull a few strings to keep it under wraps." Greg gave me a hard look for a few seconds, then sighed. "Alright, how much do you know?" "Everything." I told him. "I know you opened up a gateway to Tartarus, and then you started using robots to mine the place for new materials. But that didn't quite go to plan and demons overran the facility, then started getting out and roaming the land. That was about twenty years ago." Greg slumped his shoulders, knowing I had every detail about one of his darker secrets. "So what now? You're going to tell the others? Try to bankrupt me or black mail me?" He said, voice filled with regret. "No, as this wasn't your fault. You couldn't have ever known something like this would happen, from what I've heard and seen. It was an accident that has gotten way out of hand, to the point where you can't clean it up, and your pride has stopped you from asking for help. I know your company caused this problem, and for the last twenty years you've been trying to fix it. So now here is what's going to happen: You are going to talk to all of my students and tell them everything you know. Tomorrow we tell the other board members. Then, once my students tests are over with, you'll send me all the data from your research notes on New Gate. Tartarus is a place filled with both demons and magic, so I should have a better chance of opening a stable portal that I can enter Tartarus and close your portal from that side while you close your own portal in this dimension." He gave a cynical chuckle. "You make it sound so simple. What do you stand to gain from helping me? I take it there is something you want me to do for your help." I interlocked my fingers, then smiled. "I'll stop the demons coming into the mage guild, so that is enough. But you're right, there is one thing I need you to do. But I'll only tell you in front of the other board members tomorrow. It won't cost you a penny, but the price I will ask my be more then your willing to pay. Now then, I need you to go through my first request: Talking to my students about this mess you've made." I called in Tiberius and the others, each of them surprised that I wanted them to speak with Greg. Greg did what I asked and told them everything he knew, then I did the same. Both Tiberius and Bella took the news hard, discovering that I had known for the last few years where the demons had come from and who was responsible. "Why didn't you tell us sooner?" Tiberius yelled at one point. "I had cursed his name for the past few years, now you're telling me it isn't his fault?" I had enough of being the kind father at that point, so as the strict teacher I said, "Remember when you made your first dangerous level infusion?" That fazed him for a moment as he remembered the disaster that was. "You tried to make it without having enough essentia, then ran around the altar trying to fix it while losing items left and right. Remember how I simply sat in the next room and let it happen, then gave you a hand cleaning up?" Tiberius nodded without saying a word. "That is what has happened with Greg. The infusion has gotten out of control, so now it is time to help him clean it up. I gave you enough time to realize the infusion was out of your control, and you realized it in time and stopped the infusion. I gave Greg time to realize he needs a mage's help to fix this mess, and now he is willing to at lease consider my help. That is why I never told you, to give him a chance to fix it on his own." After I told Greg to leave and get some sleep, I told my students the truth: I had only discovered most of the details in the last few years, and had started looking deeper into it after Bella had met Sinferrius. The next morning the board members came together after breakfast. Greg fulfilled the request I had yesterday of telling the other members, then came the hard request. "I need you to ask me for help." I said to Greg. He looked puzzled, saying "But I thought you were going to help me already." "No, I can help you, but I will only do it if you swallow your pride and admit you need my help. As I told you, this request might be a price you aren't willing to pay while not costing you a penny." Greg stood up, and with the look of a man who has been utterly defeated said "Magus, will you help me close the portal to Tartarus?" I stood as well, placing a hand on his shoulder and told him "All you had to do was ask." After that we moved onto the topic of the withers I needed to kill. It would be hosted in the nether in one month's time, and all the other members had already decided to cancel whatever they had planned for that day. It is a rare occasion that Hell's Freezer is used, let alone by a few "Representatives of the Mage Guild". They would make the announcements to their lands, and it was to be considered a "Holiday" for everyone so they may watch. Hell's Freezer has a set of stands for an audience to watch it like some sport (which, in all honesty, that is what it has become), with a set reserved for each of the countries that make up the Conglomeration. Most of them have the seats sold to the highest bidders, but a few offer seats to anyone who comes for no charge (like the Mage Guild) or to close friends and family (Raylind Diyo does this, yet he still fills every seat with only friends and family). After the meeting was over, I went to the village and bought a few things from some traders (Tiberius needed more mana beans and wispy essence, while Bella wanted me to look for flowers to add to her garden), and while I was there I traded rumors with the group. I told them that all the Conglomeration members are supposed to be in the Mage Guild's land (They laughed at this, thinking it a joke.) and told them that I heard someone from the Mage Guild was going to use Hell's Freeze in a month's time. In exchange they told me of the local conspiracies on where the demons are coming from (Current believe is that a few miners unleashed them by digging too deep into the earth. I'll let them keep guessing, for Greg's sake.), and word of a war outside the Conglomeration's land (They mentioned a women with black hair and mismatched eyes was leading the conglomeration's defense. Good to hear she's having fun, but I hope she comes home soon.) As quickly as they came, the board members left. I thought my hand was going to fall off after all the handshakes, and I nearly fell over from some pats on the back. It has been a few hours since the portal was closed, and on the trip back I told the others about the deal I had made for the nether stars we needed. Each of them would fight one on one with a Wither to claim its star. Then, after my own brawl with six so I can clear away the rust of time, we would join to fight twenty together. When they asked if it was possible to kill twenty withers at once, I assured them we could do it. I didn't say that the most ever fought in Hell's Freezer was ten withers against three people and two of them died in the fight, as that would worry them a bit too much. That brings us up to now: I'm preparing myself and my students for the fight, teaching them what I know about killing withers (I have claimed my fair share of nether stars back in my KAMI days) and helping them craft all the items needed for their fights. Tiberius plans to use a combination of his sigils and thaumaturgy to kill them. Vlad is brewing a few potions to give him an edge (I've seen what his best potions do. He can handle it without any problems.), while he is using a few of the sigils he made with Tiberius and some spells from Demir. Demir is going all out with spells, from both blood magic and Ars Magica (I have helped him make a few of my favorites, and Vlad has made him mana potions to keep him going in the fight.) Bella is going to use her demon friends to help while she uses some of the witchcraft I've taught her (she has enough infusion of light power to protect her, and I know Sinferrius would never let Bella take so much as a scratch from some Wither). As for myself, I have been brushing the dust off my old bag of tricks. We will see if they are enough to get me through. If there is another page to this book, you'll know I lived through it. We killed all thirty withers. Vlad, Tiberius, and Demir are injured, but will make a full recovery in a few weeks' time (My regeneration ritual has helped them while their bodies do most of the work.). Bella and I came out with only cuts and bruises, so we have been helping the boys until they have healed. I've had to lock Vlad out of his lab so he will rest, and Tiberius is reading every book I can find for him. Demir meanwhile has ate enough to feed a cow, and yet the boy hasn't gained a pound. Aside from our light wounds, we managed to get all thirty nether stars (the old record was put to shame) and I am waiting for everyone to be fully healed before we put together the altar. The battle to gain said nether stars was hard, but amazingly brief. Each of my students used their respective field of blood magic to kill the withers, and my own Withers took less a minute to kill. Then we faced the twenty together. We used every branch of blood magic to take them down, with Vlad healing and buffing us, Tiberius defending us, Bella using her demons as support, and Demir and I dealing damage. It was a hard battle that lasted less than five minutes, but all of our soul networks were strained by the end of it. Currently, I have just begun researching and experimenting with ways to open a gate to Tartarus using the data Greg has sent me. From simply skimming these notes, I can tell that I will need the help of all my apprentices to build this. I will create rituals as I find time and inspiration, but this gate will most likely fill my days. Until then, I will start scattering copies of this book and the ones my apprentices have made. While I have seen that I have gone off on tangents about things other than rituals, I feel like I should keep it. Reading the books of my other apprentice's, I can see I'm not alone. -aw.entries.rituals.zephyrRitual=I must admit I have become lax in my updating of this book. Since the last time I have managed to sit down and start documenting, I have been experimenting with the "Reagent system" my colleagues have created as well as forming new rituals. I have not yet finished the portal, but I believe I have come up with a plan on how to build it.... But that is something for later. Starting with the rituals, I have had a few interesting ideas... There was the Call of the Zephyr, a ritual with the purpose of retrieving items off the ground and depositing them into any inventory above the master ritual stone. It does not just call the items through three dimensional space, but use a few new tricks to transport the items quickly and even through solid matter. -aw.entries.rituals.harvestRitual=Next up was the reap of the harvest moon. What it does it quite simple: It can harvest plants within a 9x9 area centered on the master ritual stone. However, I have needed to configure the ritual for any plants I need it to harvest. A few plants, such as wheat and carrots, I have already adapted the ritual to but I know of several crops that it can't function with this ritual. Later on they might work, but for now if it doesn't work then it might never work. -aw.entries.rituals.eternalSoulRitual=I have tried to improve the feathered knife ritual, but managed to achieve a strange but useful result christened Cry of the Eternal Soul : A way to convert LP from the soul network into liquid LP. It was designed to be constructed underneath a blood altar, and will link to the first one it finds. Afterword, it will drain the soul network of the activator and only if he is in range to fill the altar. This does have a few nuances, however: While inside it's range, the activator is extremely weak to the point of being near death. The conversion rate is rather poor at a two LP spent for each point of liquid added(One is added to the altar, and one used to create it). The altar also seems to consider this the same as a pipe adding LP, so any input is throttled by the buffer. As a result, any altar used will need to be built with usage of the ritual in mind. -aw.entries.rituals.ellipsoidRitual=As a means to aid in construction, I created the ritual "Focus of the ellipsoid". This ritual checks an inventory above the master ritual stone, and after my recent redesign the ritual will check an inventory directly below the master ritual stone to find blocks to construct the sphere(I couldn't get the ritual to function with the inventory any lower. This could be worked around with hoppers, teleposing the inventory, or just having something that doesn't care. I personally went with a simple setup of teleposers, redstone, a few rituals as a cobble stone production, and a hand full of demons. The demons wondered in over night, and I couldn't get them to leave.). It checks the first three slots of the inventory above it, the forms a dome with the dimensions based on the values. First slot is the X-radius, second is y, third is z. This ritual does have a cost per block, so large spheroids will cost far more then small ones. From initial tests, this seems to work well in conjunction with a ritual of the dome for underwater construction. -aw.entries.rituals.evaporationRitual=Speaking of the dome, another ritual was constructed to work with it: Song of evaporation. Basically, this one time use ritual will remove the remnants the dome ritual creates from fluid blocks that allow then to reform. In other words, when the dome ritual is removed the fluids will not return if you use this. Simple, but extremely effective. -aw.entries.rituals.sacrosanctityRitual=As a form of protection, we have created the Ward of Sacrosanctity as a way to deal with the hourds of monsters that form in our world. While I don't feel like going into Dust theory, this ritual blocks mobs from forming inside it's range(Thirty two blocks from the master ritual stone) regardless of light levels. Keep in mind it has a passive cost to run, so make sure you have a soul network strong enough to handle this. -aw.entries.rituals.evilRitual=And on the flip side of this coin, I created the Veil of Evil. It is effectively a way to increase mob spawning(Again, using the principles of Dust theory), and allows them to form regardless of light levels. Once again, it has a passive running cost to a shut off switch is in order. -aw.entries.rituals.stomachRitual=I have had many nights spent researching interrupted by the annoyance known as "Hunger". As ad hawk solution, I have built "Requiem of the satiated stomach". Much extracting food from an inventory above it, anyone inside it's range will fill satisfied. However, it does not actually fill your stomach with food(This turns out to be quite painful), but instead lowers the rate at which you consume food. Effectively, it adds the saturation of the food to anyone in range(So beef would be far more effective then bread). -aw.entries.rituals.reagentEffects.1=I mentioned a reagent system earlier, so I might as well give a brief explanation of it. Using the raw alchemical energy contained inside one of the reagents, they have discovered a way to augment my rituals. The results of this have been interesting, from improving old effects to adding completely new ones. However, these improvements are not free: The costs and if it is active or passive drains depends on the ritual and effect in question. I will try to document the effects, but the costs will be left for the readers to discover(I can't very well tell you everything, now can I? An old man needs to get his entertainment where he can.) -aw.entries.rituals.reagentEffects.2=The full spring has more effects then the average ritual, with Aquasalus letting it hydrate farmland in a four block radius from the master ritual stone. Offensa allows it to function as a weapon, thickening water vapor in the air to the point it is like drowning(By default it leaves the activator immune to this effect), but if it is paired with reductus it will ignore any humans. Crystallos allows it to freeze water, functioning as an ice generator. Finally, sactus allows it to have more control over where it places the water to the point of filling a tank placed over the master ritual stone. -aw.entries.rituals.reagentEffects.3=The serenade has only three effects, with offencia, reductus, and sanctus functioning in the same way as full spring. Main difference is that instead of causing them to drown, it gives them a more... Explosive result. -aw.entries.rituals.reagentEffects.4=The green grove is simpler in it's effects: Terrae and orbis terrae cause crops to grow even faster then normal(Orbis is slightly faster, but the effects do stack). Aquasalus allows it to till and hydrate any farmland above it, but only the three by three so it isn't as effective as a full spring. Virtus extends the range it speeds up growth to a nine by nine above the ritual, but this doesn't allow it to hydrate that far. -aw.entries.rituals.reagentEffects.5=Interdiction has two strange effects. With aether, items become influenced by the ritual as well. Magicalus removes the safety I put on the ritual so that humans are effected. -aw.entries.rituals.reagentEffects.6=Containment becomes more effective at keeping things in with reagent. Crepitous allows it to supress the natural destructive nature of the creeper, while magicales prevents teleportation for mobs inside. Aether has been just a simple extension on range. -aw.entries.rituals.reagentEffects.7=A ritual of unbinding powered with sanctus allows the breaking of a blood pact, so it can be reforged with another person. -aw.entries.rituals.reagentEffects.8=High jump has general effect improvement, with aether allowing it to fling you higher and terrae increasing the range of fall damage protection. -aw.entries.rituals.reagentEffects.9=Speed ritual has some interesting possibilities when upgraded with reagent, with sanctus and tenebrae allowing it to act as a form of animal sorting. Sanctus limits the effect to baby animals, tenebrae limits it to adults. Aether sends you farther, terrae limits the vertical distance it will launch you. Finally, reductus shields you against any fall damage temporarily for a safe landing. -aw.entries.rituals.reagentEffects.10=Magnetism has purely utilitarian upgrades, with terrae and orbis terrae increasing it's range while potentia improves running speed. -aw.entries.rituals.reagentEffects.11=Crusher has a few more interesting effects, with orbis terrae, potentia, and virtus adding fortune effect. Crystalus adds a silk tough effect(This can be mixed with a full spring for an ice farm), and incendium turns cobblestone into netherrack(Vlad mentioned an idea on autonomous incendium creation with this). -aw.entries.rituals.reagentEffects.12=Shepherd's effects seem to make it better for animal breeding, virtus allowing for animals to... How to put this tactfully... It triggers the urge to reproduce. Reductus on the other hand lowers the natural time between breeding cycles. -aw.entries.rituals.reagentEffects.13=Feathered knife has a few interesting effects to improve utility. Sanctus increases the amount of life force it leaves you with, so you aren't as weak inside it's range. Reductus lowers the range, to allow you to allow you to only be inside the range when only a few blocks from the master ritual stone(Testing shows that it is around the edges of a T5 altar). Magicales limits the draining only to the activator, so your guests don't make an unwilling donation. Potentia has the simple effect of increasing running speed. -aw.entries.rituals.reagentEffects.14=Reductus limits the regeneration ritual to humans, virtus allows it to heal even faster, with praesidum increasing the range. -aw.entries.rituals.reagentEffects.15=The effects on the feathered earth ritual are standard: Aether is vertical range, terrae and orbis terrae is horizontal range. -aw.entries.rituals.reagentEffects.16=Reverance of the condor has only two effects, with aether allowing it's effect to persist a bit longer after leaving it's area of influence and reductus limiting the flight only to the activator. -aw.entries.rituals.reagentEffects.17=Mark of the falling tower has quite a few unique effects, with terrae and orbis terrae buffing the average radius of the meteors(But these effects doing seems to stack with each other), crystalos summons a meteor with ice instead of stone, tennebrea has obsidian instead of stone, and incendium has a variety of nether materials. -aw.entries.rituals.reagentEffects.18=Ballad of alchemy only has a speed buff from potentia, no matter what I try recursive crafting seems impossible... -aw.entries.rituals.reagentEffects.19=Aura of expulsion seems to have two normal buffs, as virtus increases the distance something can be teleported and potentia the range of influence. Tennebrae has the interesting effect of allowing the ritual to teleport entities other then humans. -aw.entries.rituals.reagentEffects.20=Dome of suppression only has two range increases from aether and aquasalus. -aw.entries.rituals.reagentEffects.21=Call of the Zephyr with reductus adds a delay to when it picks up an item/ This has shown some interesting uses in automation... -aw.entries.rituals.reagentEffects.22=Cry of the eternal soul with sanctus leaves you with a bit more life, so you aren't knocking on deaths door. -aw.entries.rituals.reagentEffects.23=Well of Suffering, after a few tweaks on my end, is now able to accept three reagents. Potentia extends the range it has vertically, simple enough to understand. Tennebrea improves the efficiency of the process, allowing you to gain double the normal amount of LP from health then normal. Finnally, Offencia has the ritual damage mobs twice in quick succession, harvesting life essence faster and killing mobs faster. -aw.entries.rituals.reagentEffects.24=Rhythm of the Beating Anvil only has two reagent effect available as it stands. Potentia raises the rate of crafting from five times a second to twenty times a second. Virtus allows it to use the output chest as a fourth input. -aw.entries.rituals.reagentEffects.25=Blood of the New Moon only has one effect, we terra replacing moved blocks with dirt instead of leaving a hole. -aw.entries.rituals.conclaveOfMages=With my experimentation into reagents, I think I have the final piece of the puzzle I have needed to build the portal. I may need to call the conclave of the Mage guild for help executing my plan... The conclave has agreed to my plan, and we have set out on the road to Venric's folly, a somewhat natural prison to contain any demons that our portal spawns so they aren't as dangerous to people. Once we fortify the area, create a base of operations on the walls to view the demons progress from a safe distance, then set up a Nexus link here we will be ready to open the portal. Despite all the hardship it may cause, we will-No, we must open it. To many innocent lives have been lost to stop now. -aw.entries.rituals.forbiddenParadise=It is the eve of Forbidden Paradise, as the other mages have started calling it. The ritual is built and ready, I simply await the final hour before beginning. To pass the time, I will document the theories in place behind... the ritual I have yet to name. We've been so busy the last few weeks I haven't had a chance to give it a proper name! Well then, that will need to be addressed... I feel Bella should christen it. The work is done here, so I shale hold a small ceremony for the naming before sending off the others to a safe distance away. -aw.entries.rituals.convocationRitual=Convocation of the Damned... As fitting a name as any. Well I promised theories, so I'd best get started. The basic construction of the ritual is an improvement on the ritual of binding utilizing dusk runes and requires a far larger footprint to build(Around a hundred and twenty eight ritual stones are needed, I recall). The ritual then needs three investments; Fifteen million LP to start the process, eight full belljars of assorted reagents must be routed into the master ritual stone in any order(The ritual is designed to have them on the pillars, and in fact does not like working without them. The reagents needed are Incendium(Fire), Aquasalus(Water), Terrae(Earth), Aether(Wind), Sanctus(Holy), Tennebrae(Shadow), Magicales(Arcane), and Potentia(Energy)). Since Vlad's reagents have proven successful in summoning demons with Bella's little setup, this applies more power from the raw reagent on a much larger scale from the ritual in addition to the jumpstart LP offers. The final part requires the portal to be "Set" from a sacrifice. Using a blood altar placed above the master ritual stone and a demon, you set the portal by sacrificing said demon with a dagger of sacrifice after all the reagent has been consumed. If all the steps have been completed correctly, then the portal should complete and a link to Tartarius forged. After that... Well, I have theories but only time will tell if they are more then that. It is time to get some sleep, we have a long day head of us tomorrow... It has been a long day, but all of space hasn't collapsed in on itself after our efforts today. Always a good start, at least. The siege team has returned from a successful mission. An interesting side effect of how the portals work cause all demons who have entered via that portal to vanish, returning to their home since the portal acted as their "Anchor" here. But that isn't the big news. What happened after we opened the portal was something none of us expected: The demons started colonizing. They have been building homes, gathering resources, laying down roads... They have been building a proper encampment. The others have a few tales of their own about the demons, as I was out of commission for most of the day(Activating the ritual took far more out of me then I thought. I will need to start organizing our future plans now that this... Invasion has begun. -aw.entries.rituals.longHaul=It has been a little over a week, we've managed to make several improvements to our equipment using some of the shards retreated from the demons, and said demons have shown no sign of leaving any time soon. Since it was my plan to open the portal, I have volunteered to stay here and watch over the invasion and make sure the demons don't get out of check. Already a teleposer link to my homestead has been created for myself and my apprentices to use, and we have started work an a new home here and Venric's folly. But if I must build a new home here, even a temporary one, I should work on getting a few basic amenities to help ease our lives here while we see how this invasion pans out. -aw.entries.rituals.phantomHandsRitual=My first task was to create a ritual to help deal with all these chests we have laying around, as it is getting to be a nightmare finding things after the fledgling thaumaturge Soaryn paid a visit. Having a ritual take instruction, however, was a little harder then expected. After several experiments, I have discovered a relatively simple method to achieve this using chests(Same rules as most inventories with rituals. Doesn't care what it is, from a chest to a furnace. I will be using chests as an example, as that is easiest.) To begin, I need to cover the logistic foci that allow you to give instruction to the demonic force behind the ritual(Only thing smart enough to handle this task). Adjacent to the master ritual stone can be up to four chests, and these hold the "Input focuses" the ritual checks to know what to pull from and how to pull from it. In laymen terms, you right click on the side of whatever you want the ritual to pull out of and it will follow all the normal rules for extraction for whatever side you clicked on. The output foci need to be placed in chests located at the four nooks in the V's of ritual stones and roughly two blocks away from the master ritual stone. They follow the same rules for marking, right clicking on the side you want the ritual to send items to and following item input rules for the block. However, there is one addition: If you shift click on an inventory, it will not only mark it as a destination but save the item total of the inventory. If the focus has a saved total, it will keep the bound location stacked with that amount for each of it's set items. Note: You don't need the final destination to hold all the items for total binding, you can use a second inventory as a middle man to set the total and then bind the focus to the new inventory without changing the total(Make sure you don't shift right click on the new inventory with the focus as that would reset the amount). Should you wish to remove the item limit, shift right click on an inventory without anything inside. There are a few variations of the output focus, each with subtle differences that impact operation. The red "Default" focus is the standard focus, has no special properties to it. It will ignore the NBT of items, and will check the "Metadata". The blue "ModID" focus instead of checking exact items will instead check the origin and classification of the item and will send anything that matches this. For "Origins and Classifications", I mean anything made my the Industrial craft corporation will be sent to the same location but anything made by their splinter corporations like nuclear control or advanced solar panels will be sent to different locations. The rules behind what belongs to what are archaic at best, but the scribes and scholars at NEI and WAILA keep exact records of these things so seeking their help may be needed if you don't want to rely on trial and error. The dark green "Metadata" focus isn't as exact with metadata, allowing items such as dye and colored glass to have all the subtypes and variations sent to the same location without needed to specify every single one. This also applies to damaged armour, weapons, and tools. The Yellow "NBT" focus is very exact with what it sends, keeping track of the tiny hidden differences such as how much Vis a wand has, what setting a ritual diviner is on, where a spell crystal is bound, ext... It also checks meta data, so keep that in mind. Finally, the purple "Global" focus needs you to set any item to send(What it is doesn't matter), and afterword when the ritual reaches this task it will send anything it possibly can. This is useful as a last resort location for anything you don't want to have sit in a source location but you have not set anything for the ritual to do with it and don't want it to clog up the system. Now then, the ritual itself. As I stated, it will check the adjacent for where to pull items out, what are the source locations. The output foci set where to send any items from the sources, what is the limit on what to send, and all the rules on what it should be sending. To specify this, you need to place one or more output foci in one of the chests to tell it where to send it and how to look at the items, then one or more items after it to specify what it is to be looking for. If the ritual finds another routing focus after the last item in a "Command chain", it will create a now chain following all the same creation rules as the first and acting independently of it. I should note that the ritual will work sequentially, sending all possible items to the first focus location it can while still following all the set rules, then move on to the next focus and doing the same. Additional quirks of using more then one output foci in the same chain: If more then one of the foci have a item limit set, the limits will add together so having four foci with sixteen set as the limit as sixty four. Also, the ritual has some logic for sending items in a chain: For all foci types bar one it will act as "OR", meaning it can send items if any of them match and will go to the first match. The NBT focus, however, acts as an "AND" and the ritual will only send items if they match both the current focus and the NBT focus rules. -aw.entries.rituals.anvilRitual=With a way to move items around at hand, it is the next logical step to have a way to refine items automatically without needing to spend hours at a workbench crafting. Cue the creation of "Rhythm of the Beating Anvil", and I must say I'm rather proud of how it turned out. The ritual will look two blocks above the master ritual stone for up to nine inventories, and will use the items it finds in each inventory to try and form a recipe, then pull out of the three input inventories one block down and two out from the master ritual stone and next to the earth ritual stone to form the item and finally push the crafted item into the output chest(It's side is marked by a water ritual stone next to where the inventory goes). For shaped recipes, it will use the output location to determine where is the "Bottom" of the crafting grid is located, and will form recipes using that as a reference point. Now then, how you set a recipe is simple: In the first slot of each used inventory, place any item the recipe needs or leave it empty if the recipe doesn't need anything there(Like the middle for a furnace or chest). Place the used items in the inputs locations, and the ritual will craft up to a stack of the output before stopping. The ritual will then check the second inventory slot of each inventory for a recipe, try to craft it, then repeat for the third, then fourth, then fifth... You get the idea. The more inventory slots you have, the more recipes one ritual can handle. A tip for use: Normally chests don't like having more then one side by side, due to the parts used to merge to chests getting in the way. However, this does not apply if you alternate normal chests and trapped chests. While it will be added post script to the reagent effects, I should mention the effect of Virtus to this ritual as it is rather useful: It will allow the ritual to use the output chest as another input chest. While that doesn't sound useful, it actually allows for reciprocating crafting(An example of this is imputing logs, the ritual turning the logs into planks, planks into sticks, planks and sticks into signs, planks into chests, ect...). -aw.entries.rituals.dawnInk=This "Demon invasion" as we've come to call it has born some interesting fruit, one of which was a gift from Tiberius in the form of a new ink for my rituals. He has requested that I aid him in construction of a sort of "Chamber" and a ritual to power it, but is keeping some of the important details from me for what he says will be a "Big reveal" and would "Spoil the fun". -aw.entries.rituals.symmetryRitual=After a few weeks of design and testing, we have finished the ritual Tiberius wanted in order to achieve what he and the others have dubbed "The Omega state". I'll cover the ritual side of the process, and allow the others to go over the details of it's functions. For this ritual to function, it needs a sealed space in order to fill with reagent like a gas cloud. This reagent is then absorbed by the armour as the ritual merges the souls of the activator and the demon inside the activators bound armour. The problem is containing and controlling this gaseous reagent, as it likes to leak out of the chamber and the ritual can have difficulty "Pushing" the reagent into the armour. To address this, we created Glyphs. But I'm getting ahead of myself. First, I should cover how the ritual determines what is a "Sealed" chamber as it has safe guards to prevent reagent loss. The reagent gas is let lose above the master ritual stone, so the ritual starts checking there. It then starts expanding from there, searching for ways out in every direction, and if it can't get five blocks away from the master ritual stone(This isn't random, beyond five blocks away in any direction and the ritual has difficulty moving all the reagent. Think of it like compressing a gas, it always tries to move down the path of least resistance. To compress it, you need prevent it from being able to escape.) I have also noticed that the reagent, after being released into the chamber, collects on the walls of the chamber instead of staying in the air like tiny low hanging fog. The more surface area, the thinner the fog becomes and the more stable it is, and more stable fog means better value the ritual gets on the conversion process between reagent in the jars and the reagent in the armour, so the more time you have in the Omega state. No matter how you cut it, this chamber is meant to contain reagent for long stretches of time. The more stable the reagent fog is, the more time the ritual has to work and the less reagent wasted. Now then, I mentioned Glyphs earlier. After seeing the chamber in action, Tiberius created a few blocks called "Glyphs" to optimise and add to the champers use. First, the Glyph of Rigid stability was created to further stabilise the reagent fog, being worth roughly double the amount per square meter of space then a normal block. But that's not all he made with the Glyphs, as he discovered an interesting way to bolster the power of the demon using two new Glyphs for a system that resulted in something like enchanting. He mentioned two values, and had created Glyphs for each of them. First was "Enchantability", and it's is buffed by Glyph of the Adept Enchanter. The second value was "Arcane power" with Glyph of Arcane Potential, and functioned like the levels used in normal enchanting. To put how the two values work in layman's terms, Arcane power effects what enchantments are possible to receive, while Enchantability effects the odds of getting a good result. Since this process doesn't use normal enchanting(As the demons in our bound armour react negatively to such methods normally. This process circumvents this limitation by being more demonic in nature and this more... Tolerable to the demons.), it doesn't follow all the normal enchanting rules. For example, after much testing we were able to achieve the equivalent of protection six, fire protection four, and blast protection seven on a single piece of armour so some independent enchants can coexist. And normal power restriction also don't hold ground here, as seen by getting blast protection seven... More testing must be done, but you can see how this has potential. However, I should mention that a chamber can't be entirely enchantment blocks, as the Reagent reacts negatively to the magic used in them. While the reagent must touch the blocks to activate them, any fog that forms on them will destabilise severely causing less time in Omega. I have put in a safety to make sure it can not trigger the process if the stability is below zero, as that would be closer to a bomb then a fog at that point. I believe all the information you need to know before starting has been covered, so we will cover the actual ritual activation. The ritual is a flat platform with four holes, and in these holes you place the belljars of reagent to be used. This ritual doesn't use reagent in the normal fashion, so you don't need to route them into the master ritual stone like normal. With your awakened crystal, activate the ritual with your awakened crystal like normal. After the fifteen million LP fee is paid, it will look for belljars in the four holes for the thirty two thousand reagent cost. Once both are ready, it will check for the activator wearing bound armour and if present it will kick start the process. Within seconds, the transformation happens and you will enter the Omega state. -aw.entries.rituals.stallingRitual=After watching the others toy around with Omega, I realised how limiting the fact that Omega burns reagent to maintain the form can be. With this in mind, I have created a ritual to strengthen the bond between the two souls and remove the passive reagent cost of maintaining Omega. Named "Duet of the Fused Souls", it is able to replace the reagent cost with a high LP cost(Tiberius says it needs five thousand a second to run, far more then most setups can handle. At best, this ritual holds off the inevitable unless you have an extreme generation rate, and even then you will will have a crippled net gain.). You will still lose reagent to replenished your demonic resistance, so long term combat even in range of the ritual will eventually burn through your reagent supply. I should mention that this ritual doesn't have enough power on it's own it work, you need to build it around a tier four beacon. Once it is in place, the ritual can use it as a power source and will allow it to have an active range of roughly double that of the beacon. -aw.entries.rituals.newMoonRitual=Feeling unsatisfied with Focus of the Ellipsoid, I recently restructured the ritual to slightly change it's effect. In doing so, I found inspiration and created my new work "Blood of the new moon". In essence, it moves a small planetoid of blocks from an assigned distance below it to a mirrored distance above it. Magic behind it is slightly more complicated then that, but you aren't here for spell theory 101. To operate the ritual it is fairly simple: Above the master ritual stone needs to be an inventory to give the ritual instructions. The first slot sets the radius of the sphere, but is limited to a maximum thirty two. The second slot defines how far below it looks for blocks and above the sphere is created, with the distance defined being where the centre of the sphere is. As a bit of a safely precaution, the distance must be at least three blocks greater then the radius to prevent harm to the ritual. I should note that if there is an obstruction in the destination, instead of the two blocks being swapped the ritual will "Skip" that area. A final foot note: If this ritual is fed terra reagent, instead of leaving a hole where it pulls blocks it will instead create a block of dirt. A nice option to prevent clean up of a huge hole under a new sky base. - -aw.entries.demons.ashes=My name is Bella Highborn, and I am a blood mage. One month ago, the village I called home was attacked by demons in the night. I can't remember much of the attack, but I recall so many screams of pain echoing inside my head. It took me a few minutes after covering my ears to realize that the screams I kept hearing were not coming from the people. Shortly after the attack started, I ran from my burning home to try and hide in a small alley, behind a large waste basket the butcher dumped his scraps in. At one point I thought I was dead as a demon with long limbs, a gaping maw, and huge teeth lumbered into the ally. It looked strait at me, it's nose flaring as it did so, its blurry eyes looking down at me. It then piked up the basket I was hiding behind, ate everything inside, threw it over his shoulder onto a burning building, and then, left me without a scratch. Several other demons found me that night, and all of them had the same blurry eyes and all of them left me alone. At some point I managed to cry myself to sleep. The next day I awoke in the same little corner, the smell of death strong in the air. I wandered among the remains of the village, finding the burnt and frost covered bodies of my former friends everywhere, all while asking myself why I was spared when they weren't. After several hours, I finally heard a sound other than the crackling of embers from all the old buildings: Voices. Human voices. I looked around to see a small group of men wandering through the ashes. A few of them were bickering about something, occasionally pointing in my direction. At the distance I was at, I could barely make out the words "Girl", "Demons", and "Caravan". I had started to wander closer to them, a little afraid to get too close. Suddenly, one of them broke off from the group and took a few steps in my direction. After a few more quick words to the others, he turned to start walking towards me.As he got closer he started asking me simple questions. like if I was injured and if I could walk. I was still to upset to give him more of an answer than nodding or shaking my head. And then he said full of regret : "I can't do anything for the dead and I can't give you back your old home, but I can try to give you a new one. Care to take a risk and come with me?"his voice softened and he looked at me with his light green eyes. I thought of everything that had happened in the last few hours. Everything I ever knew was ripped away from me. I had no home. No family. No distant relatives. No chance to keep living here. I gave him a timid nod, then took the hand he offered me. I soon found myself walking down the only road that lead away from my village with the green eyed man, who told me his name was Vlad, and his brother Demir. We walked till my feet started hurting and then some, till dusk, when they set up camp. They asked for my name, and what happened the night before. I shook my head as memories of all the screaming came back. They then asked if I knew any magic, to which I shook my head again. I knew very little of magic, despite living so close to the mage guild's boarders. I then turned to look at my former home, now a few miles behind us. I silently said my last goodbye to the life I once knew, then fell asleep thinking of what may lie ahead of me. My dreams were filled with nightmares with scenes from the last night, and a hundred voices crying out for help. But all that still walked through the village were the demons. We walked for the next three weeks, with Vlad and Demir selling what little they had on them to fund our trip. Several times they mentioned a man I had never heard of : "Magus Arcana". Vlad spoke highly of him, while Demir didn't seem as impressed. We traveled almost all the time we where awake, and when my feet hurt so bad that I couldn't walk anymore either Vlad or Demir would take me piggyback. One evening I asked them why they are doing so much for me, both put on a weak smile and said "We know what it's like to lose both your home and your family. We lived in the streets for a few months before the Merry Lamb took us in. We didn't want you to go through what we did." For the first week I had that same nightmare every night. The second week it was every other night. By the time we reach a village named Lurric, they had almost stopped. I went with Demir to buy some supplies, and when we regrouped with Vlad he had a grin on his face. "We're almost there. You were right Demir, this is the town where he lives." After a few minutes of walking, we stood at a stone brick home. We had only one of those in my old home, and that belonged to barracks of the guardsmen. As we walked up to the door, I found myself hiding behind the brothers. I had heard some of the legends about the man who lived here on our trip, and anyone in there right mind would be nervous knocking on his door. After a brief chat Vlad had with two men, we were let inside. I thought I should be scared, but both of them seemed so nice that it was hard not to feel at home here. But as I stepped inside, I started hearing whispers. At first they were only a few, but as I sat down the whispers grew a little louder and more frequent. Soon after that I was distracted by my belly reminding me I haven't eaten since yesterday morning, and the fact that there were sandwiches on the table for us. As I ate, I tried to listen for the whispers, but they were still so faint that I couldn't make out what was said. Giving that up, I started paying attention to what the others where talking about . Unfortunately, I was a little late. Magus had already started getting up, while Tiberius was taking away the trays that once held sandwiches. After a few minutes, both Magus and Tiberius left to take care of something in the village leaving us to settle down a bit. "They're an odd bunch." Demir said soon after they left, starting to look around the room we were in. "They can say the same about us." Vlad said, and I couldn't help but smile at his deadpan humor. After an hour of milling about the place, gawking at all there was to see, Magus and Tiberius returned. We ate a large dinner Magus brought, then they showed us where we would spend the night. Magus lead me to his room, telling me that I could sleep here for the night while he would take the couch we had sat on earlier. Once we got inside, he closed the door as I took a seat on the surprisingly hard bed. "Now then, I have heard a few rumors about you Bella." He sat down next to me on the bed before continuing: "Mind if I ask what happened to you?" I hadn't told Vlad and Demir yet, but I finally had the strength to speak about what happened. After I finished the story of the attack, I told him of my nightmares and hearing countless voices crying out for help but there only being demons around me. Magus simply nodded, then said "I believe you. Your tale seems a little far fetched, but I can tell you speak the truth. I advise you to keep this story to yourself, but telling Tiberius or the other two should be fine. I'll need to think about this..." He said as he moved to get up. "Wait," I called out before he left. "Don't I get to ask you a question now?" He seemed a little puzzled, but said "Go ahead, ask away." "Do you know what is causing these whispers I'm hearing? I started hearing them as I came inside your home, and they seem to be coming from below us." He told me he heard no such whispers, but offered to help me find the source. After showing me the door that lead to a staircase, we went down two floors till I could more clearly hear the voices. It seemed like idle chatter, and the voices lead me to a box inside a store room that held several bright red blobs. As I opened the box Magus asked "Are these the source of the voices your hearing?" I nodded before asking "Should I try talking to them?" Magus pondered this for a moment, before saying "No, not yet. You still need to get settled in, and there are countless other preparations to be done. We can return to this later, when we have more time. For now, let's see what Tiberius is doing with the others." He lead me back out to the stairway, and I noticed him locking the door to that floor before he joined me up stairs. -aw.entries.demons.tamedDemon=A few days later, I was learning Botania magic from Magus. He showed me the garden he kept near his home, then we went through the names of all the flowers there. Just as we were getting to the more magical flowers and their uses, I started hearing a voice from my nightmares. There was only one voice saying the same two words, and it was slowly growing louder. "Bella, what's wrong? You're turning pale!" Magus said when he noticed me freezing. I stood up, and looked towards the origin of the voice. Then I saw it in the distance. A demon. Just one, wondering seemingly aimlessly. Magus saw it as well, he told me to stay still while he dealt with it. But I couldn't do that, I couldn't let him hurt something so lost and confused. Like it was. Like I was a few short weeks ago. I started running towards the demon, and saw it was one of the more human looking ones, with small wings on its back. It turned to me as I drew closer, and I saw it had the same blurry eyes all the other demons had. It didn't try to attack me, or really even move when it saw me. All I could hear was "Help me", over and over again. "Bella, back away from that!" Magus yelled as he followed, but I could barely hear him over the voice ringing inside my head. Then something compelled me to reach out and touch the demon, some inner instinct that had been dormant for all my life. Magus was close to us as I touched its hand, and I felt this surge of power race from me into the demon. Suddenly, it's eyes lost the blurriness and he seemed to be "Awake" now. And very confused. Suddenly, Magus was at my side and was trying to pull me away from the demon. Meanwhile, the demon was trying to work out what was going on. "Calm down, both of you!" I yelled, and Magus and the demon did just that as they started staring at me. "Magus, notice how the demon isn't trying to kill us right now. I don't think he was in control of his own body til just a few seconds ago." The demon nodded, before attempting to talk in a way Magus could under stand. "I... was trapped inside my head. I could see everything that happened, yet I had no power over my actions." Magus was still very wary of the demon, but asked how he got here. "I am not here by choice. I remember finding a strange metal thing in my home, being pulled violently towards the metal thing, then waking up in this strange place. I soon realized that I had no control of my actions, and have been wandering ever since. That is, until my brethren here freed me." "Brethren? I am afraid I am human, not demon." I said, confused by this claim. "Really? Your aura looks demon to me. I could tell that even before you freed me. As for him..." The demon turned to Magus. "Yours is like nothing I have ever seen before. It is a strange color, and is far larger than that of any humans I have seen." "Really, you can tell all of that just by our auras? Fascinating..." Magus said, the last of his wariness was trumped by his scholarly nature. "Well, I have always been better at reading them then many of my kin. But that can be saved for another time. Humans, I must ask you for your help. I can not stay here, your kind will hunt me every day I live for the crimes my kin and I had no say in. I must ask you to kill me." "Why? ", I asked:"Can't you try to hide or.." Magus put one hand on my shoulder. "No, he may be killed, but won't die. Supposedly, if a demon is killed in our world they return to their home in Tartarus. I assume that is why you wish us to kill you?" "Yes, that is true. But I can't ask you to do this for nothing... I sense something nearby that may be of assistance. Will you take me to your home?" He asked. Magus was more curious than cautious at that point, and lead the demon(Who we learned went by the name of Sinferrous) and me back. As we all walked inside Magus said "Vlad, Demir, Tiberius! We have a guest here." All three came out of the work room, and all three paled as they saw Sinferrous. "Greetings." he said as the others arrived. "Magus.... why is there a demon in our home?" Tiberius said, growing pale. Magus quickly told them what had happened and what we learned. "Now then Sinferrous, can you lead us to the thing you sensed?" After leading us down stairs, Sinferrous went strait for a strange red orb that was near my brothers work station. "This will do. Using this, I can make a pact between us. For your help freeing me, I will make the pact now. But my kin may not always be as willing, and you may need to defeat them before they will form a pact. Now then Bella, give me this orb." He handed me the orb, then I handed it back to him. As soon as it touched him, the orb vanished into a red mist. "The pact is done, and I am now at your command Mistress. Now, I request that you send me home." "Wait." I asked him. "If we send you to Tartarus how will we ever see you again?" "Simple. When my kind are killed in this world, we can leave behind a "Summoning Crystal". If you use this crystal, we will return to aid you. Because we made this pact, anytime I die in this world I will leave behind a crystal so you may summon me again." We all went outside to send Sinferrous home. Magus had volunteered to do the dirty work, and our new demon friend stood ready. "Before I do this, I have one final question." Magus asked. "You said there was some sort of metal contraption that forced you here. Did you see any symbols anywhere on it that might help us work out who created it?" Sinferrous nodded. "There was one symbol that seemed dominant... Here, let me see if I can copy it..." He began to draw in the dirt, and we saw something, that we never expected: The letters "GT" inside the picture of a gear. "Greg tech..." Magus mumbled, narrowing his eyes. Magus sent Sinferrous home, and it seems Tiberius needed some time to think. "His goal in life, getting revenge against the demons who destroyed his home, was just torn apart." Magus told me that evening. "Give him time to piece together a new goal. He'll recover, I can guaranty you that." The next day Magus and Tiberius told us about blood magic, where the orb I used just yesterday came from, how it was made, and all the risks of trying to make something like it required. They then asked us all a simple question: Would we like to be blood mages? If I said yes, Magus and Tiberius would help me with taming demons. If I said no, they would still teach me other forms of magic. There was no choice, I needed to discover more about this strange power I had. If that meant I had to become a blood mage, then I would become a blood mage. After Vlad, Demir, and myself passed a "First Test" of creating a weak blood orb, the same type of orb used to form a pack with Sinferrous, the three of us were blood mages. Tiberius gave all of us books like his own, and asked us to document our finding in it. So that brings us up to today, I will try to write down anything that happens with either my work as a blood mage or my life with the others. For now, I must get some sleep... -aw.entries.demons.future=My last entry was a week ago, and since then I have learned a much from Sinferrous. Apparently they have three main groupings of inhabitants inside Tartarius: Lesser demons that act as workers, guards, and servants for the second group called the greater demons. This was similar to peasants and nobles here, but the third group was something all together new: Elementals. Having so much demonic energy in one area causes strange things to pop up, entities of pure demonic power mixed with one of six elements. To the demons who live there they are little more then wildlife, but to us they are extremely hostile and dangerous beings. From what I could gather, each Elemental had several abilities that were common among them while also having a power unique to their element. All of them could fly, cast buffs on themselves to reflect damage, and they cast a strange effect that nullifies some powers of souls. He couldn't tell me much about the unique effects, but warned me getting in a fight with one unprepared would mean death. I noticed Tiberius growing less and less wary of Sinferrous as time went on, but I feel like he wont ever forget what happened to his home regardless of if they had a choice or not. My last entry was a month ago, and this is more of a progress update then an entry. Magus, Tiberius, Sinferrous, and myself have started building a way to form a temporary "Gate" to Tartarios to challenge demons, but we've ran into a few complications. Magus and Tiberius have already started work on upgrading the altar again, so we might be able to start summoning demons soon. In other news, the training Magus has everyone go through keeps getting harder and harder every week. But considering I would have ruled off what we do daily now as to much for me a month ago, we've made progress. It's been a little over two years since I last wrote in this. Finding what material the altar needs as an amplifier takes much longer then I had anticipated. Thankfully, we discovered a recently that the weak blood shards Magus had collected years ago mixed with stone to create a large amount of blood red blocks we have dubbed "Blood stone". The altar has responded well to the stone, so we have created pillars around the altar and are now searching for the item needed to create a blood orb of a higher quality. I've been binding my time helping the local area with demon problems, and Magus even lets me go out on my own to track them. I've formed pacts with almost a dozen now, and my brothers have always been glad to see what new friends I make on my trips... It seems so natural to call Vlad and Demir my brothers now, but I can't recall when I started referring to them as that. After everything we have been through, it feels like not calling them that is a little insulting. We have become so close in our time with Magus and Tiberius that "Family" is the only word I know for it. A little over two years ago they were nothing but strangers who saved a little girl from a village already burnt to the ground, and now look at where we are. Life is strange, that's for sure.... In other news, Magus has started teaching me witchery, as the botanie had grown to limited. -aw.entries.demons.knight=It has been another year and a few months, but we finally found the item needed for the blood orb: The very weak blood shards we had been using for everything else these days. At no point had it crossed our minds that it might be used for this as well, but we found a few new items in the search so not all is lost. One we made the first "Master" blood orb, Magus invited all of us to the finest meal house in Lurric as a treat. We all dressed in the common cloths we keep for when we wanted to blend in, and we went done to a small family ran business that had some of the best food for miles. We all ate our fill, which for Demir is easier said then done, and as we walked home we passed a man in unadorned armor who was sitting in the street like he had been thrown out of somewhere. He looked at us when we walked by, but he quickly tried to stand up when he saw me. "YOU!!.." he bellowed in a slightly slurred voice that made we think my guess about him being thrown out wasn't far off the mark. "You're that girl I've heard so much about... That one from the demon thing... ATTACK, you're from that attack! I've come here to claim the life of the demon girl as retribution for what happened to that poor village!" He started preaching, before realizing we had already started walking away. "Don't you run from me... You can never outrun the justice that will deliver my blade!" He cried as he charged at us, drawing his sword as he did so. Unfortunately for him, his assault was easily dodged by the simple act of stepping to the left. He ran past us, then tripped on a rock and fell to the ground. As he struggled to stand, he said to the others "Don't you dare try to help her! I will slay you as well if you attempt to do that!" Magus smiled and said to him "We wouldn't dream of it, sir. After all, she doesn't need our help to deal with a senseless fool like you." Magus dropped the smile and turned to me. "Alright, now is as good a time as any to put your training to work. I give you permission to deal with him as you see fit." By now the man had stood, and was starting another charge at me. Instead of stepping to the side like last time, I ducked under his sword, then grabbed him by one of the exposed straps on his armor. Once I had a good grip, I turned to the small crowd of people watching. "Any one here mind if I toss him in the slosh pit?" The slosh pit was the name of the depression behind a few of the building where water gathers when it rains, and for a few days after word it is nothing but a muddy pit. Nobody objected, and a few even offered to give me a hand chucking him. I told them I could handle it myself, then proceeded to drag the fool around a few of the buildings, all while he demanded to know what was going on. The crowd cheered when I finally got him to the edge of the pit, grabbed one of his arms, then flung him face first into the slosh pit. We all returned to our home without any mud on our clothing, but the same can't be said for his armor. I'll note if I ever see that man again. It's been two weeks, so I'd say he left town after waking up in a mud pit. -aw.entries.demons.demonShard=With the help of Sinferrous and my other demon friends I have finished building the summoning area. The smaller pillars need to be in just the right points for complete balance, so it is tricky to build the ritual area. But after a few failed attempts and some help from Vlad, we have the ritual area we needed. Today, by accident, we discovered how to summon elementals. I'll write more about them once I know more, but they are as hard to kill as Sinferrous warned. We also found after killing it they can drop a strange blue blood shard we have dubbed a "Demon" blood shard. It's been a week, and each of us has earned a demon blood shard. Magus has used his to empower his activation crystal, and the rest of us are saving them to create blood orbs(I still wonder how Magus gets by without any blood orb). -aw.entries.demons.demonSummoning=Something odd happened today: Magus asked me to show him how to tame a demon using my summoning area. He asked me to go over everything, from the basics of how it works to the taming itself. I write here what I can remember telling him. Alright, in the center we have a arcane plinth to help form then anchor a "Gateway" to Tartarius. The plinth needs a blood orb on it to act as a "Beacon" for the demons, but only a master blood orb has the strength to pierce the barriers between worlds. But the plinth alone isn't strong enough to keep the gateway stable, and we can't make a "Universal" portal. We have pedestals around the plinth to help keep the portal stable by sacrificing items, but this has the side effect of "Locking" the portal to one type of demon. So if you use the same "Recipe" five times, you get the same type of demon five times. Some of the demons need more then the six at the bottom to keep it stable long enough to bring one in, so there can be a second or third ring if need be. Once the portal has formed after the last item is placed on the pillars, items will be consumed one by one to keep the portal stable while the demon is pulled in. Once the last item has been consumed, the demon will be summoned on top of the plinth. The demon will be confused, and will see you bringing it to the overworld as some form of a challenge. Then it will try and kill you. If you beat the demon, it will drop a crystal to summon it back to the overworld(And it won't try to kill you this time). By giving it a weak blood orb you form a "Pack", to make the demon follow any commands you give it. Unfortunately the most powerful things we can summon, the elementals, aren't willing to serve anything due to their inherent chaotic nature of how they are formed. -aw.entries.demons.keysGate.1=Here I will add any recipes we discover that can summon a demon, but at the request of Sinferrous, I will not describe the demons in any way. It will be a mystery till it is too late to go back. Note: Some of these recipes might need more then the first ring of pedestals, so if that is the case the first set of items will go in the first ring, the second in the second.... You get the idea. Remember that the arcane plinth needs at least a master blood orb to work as a beacon. -aw.entries.demons.keysGate.2=Fallen Angel: Santus | Sanctus | Sanctus | Aether | Terrae | Tennebrae -aw.entries.demons.keysGate.3=Lower Guardian: Cobblestone | Cobblestone | Terrae | Tennebrae | Iron ingot | Gold nugget -aw.entries.demons.keysGate.4=Small earth golem: Clay | Terrae | Terrae -aw.entries.demons.keysGate.5=Ice demon: Crystallos | Crystallos | Crystallos | Aquasalus | Sanctus | Terrae -aw.entries.demons.keysGate.6=Boulder fist: Terrae | Sanctus | Tennebrae | Bone | Steak | Steak -aw.entries.demons.keysGate.7=Shade: Tennebrae | Tennebrae | Tennebrae | Aether | Glass bottle | Glass block -aw.entries.demons.keysGate.8=Bile demon: (Poisonous Potato | Tennebrae | Terrae | Raw porkchop | Raw beef | Egg) - (Crepitous | Crepitous | Terrae | Iron block | Iron block | diamond) -aw.entries.demons.keysGate.9=Winged fire demon: (Aether | Incendium | Incendium | Incendium | Tennebrae | Netherrack) - (Diamond | Gold block | Magicales | Magicales | Firecharge | Coal block) -aw.entries.demons.keysGate.10=We later found that placing a full ring(6) of certain alchemical elements(Earth, Air, Fire, Water, Light, Shadow) will summon an elemental of the respective type. And they are the only way to get demon blood shards. -aw.entries.demons.futurePlans=That is what we have so far. We are working on trying out a stronger blood orb, but Magus keeps telling us that what we need to upgrade the altar is extremely hard to get. To bind my time I have started talking with Sinferrous about "Greater Demons". We have decided that our next goal is to start summoning them, but there auras are so strong that the gate way our master blood orb can form is far to weak. We will need something better, and so we have reach square one again of needed the stronger orb. Well, the Hell's harvest festival is soon so I will write if anything comes up. Strangely, Magus mentioned having replies from people he is inviting coming soon. Well I had no idea what was coming with the Hell's harvest. Magus calls up the doorway from the ground to a giant building full of technology, something extremely rare in the mage guild. Most people come here to get away from all the technology of the other lands, to get back to basics and make there own way in life. Yet what I saw down there was beyond even my wildest dreams. Tech that was only spoken of in hush tones, machines that aren't even available to privet businesses, let alone the public! Magus had mentioned once before that he worked on the conglomeration's members board, but this... I thought he meant that he was a grunt worker, or some administer or mangers. But he is on THE board, where all the worlds leaders meet... And Magus told us they will be meeting here this year since he is the host. I always thought Magus had secrets, but reality seems to go beyond my wildest dreams. Magus asked us to help prepare "The Hall" as he referred to it as. After a few months of hard work, the Hell's harvest is only a few days away. Magus started calling in favors for help, and the boys started talking about just who would be coming. Only now have I realized that I'm going to meet with some of the most powerful people in the world! Magus gave us a few books on every member, so we would know something about each of them. Sadly, the books he gave us didn't include pictures so we had no idea what they would look like. I'll write again after the festival is over.I have meet so many people the last few days, from so many places and from countless walks of life. I became friends with a woman by the name of Iza Lemming, and another girl about my age by the name of Carrin Calclavia. For such amazing people, they seem so... normal. Another man I met Magus keep referring to as "Greg". As it turns out, Greg owns Gregtech, and he is the reason the demons are running ramped like they are. Strangely, I don't hate him. By all rights I should hate him for everything he has done, all the people who have died to the demons... But I don't. From what both Magus and Greg have told me, he did the same thing I did: Opened up a portal to Tartarius without knowing what would come out. The real difference was that I had a demon to help me build the portal, and he had to do it from scratch. Without the help of a demon, the portal he opened was unstable and drove any demon to walk through it mad, and they lost control of themselves. He had no idea that would happen, that that could happen. I can't bring myself to blame him for something he could have never predicted. In other news, Magus has gotten us the nether stars we need for our next altar upgrade. The bad news is we must kill the withers to claim them. Thirty withers, to be exact. I have mastered witchcraft, botanie, and have learned what I can of blood magic from my brothers and Magus. But will it be enough to kill one of those... things? I asked Sinferrous this one night, and he told me that he no idea what a "Wither" was, but if I needed to fight one that he was willing to stand by my side, as would any of the other demons I had a pact with. With all of them by my side, I might stand a chance. We beat the withers. All of them. I... was terrified of it from the moment I saw it. I had three skulls for heads, and it made unnatural sounds as it started warming up. Then the attacks it used, launching flying blue and black skulls, were devastating in the blast and the "Withering" effect they leave behind if you get hit. Thankfully, the "Freezer" we fought them in was completely blast proof(Warded octuple compressed cobblestone) so falling into holes was not a problem. After an eternity compressed into an hour, we had beat all thirty withers. My brothers are all injured, so I need to go change a few bandages. I'll write again when I get a chance. Now that my brothers have fully healed, life almost seems to have gone back to normal. Well, as normal as it will ever be in a house full of mages. I've started experimenting with nether stars in my efforts to summon greater demons, but I still haven't managed one. In other news, the number of demon attacks has been getting smaller as of late. Magus said this might be the calm before the storm, and asked me to start leaving the mage guild to help with demon attacks in the other lands. Most people are happy to have my help, but others... Lets say I rarely sleep in the inns and leave it at that. -aw.entries.demons.demonInvasion=Magus has sent out a call for all free mages, with little in the way of context for why. Even I don't know what this is about... He did say there would be a in a little over a week a picnic, however. But knowing him, he has something up his sleeve. The conclave of mages was held today, with some... Interesting results. Fifty people in total showed up, from all ways of magic and life. We met on a hill under the shade of a grove of trees about a mile from here, many of the mages brought there own meals for the picnic. After ten minutes faffing about with people getting settled, Magus called the conclave to order. "I'm sure you all have ideas on why I called you here, and I know Jarico was running lots... So I might as well sate your curiosity. I finally have a plan on how we can deal with the incursion of demons. For the last few years they have been a hazard, an endless army we have fought off. The two things that have complicated our efforts: The fact we didn't know where they have been coming from, and the side effects of closing the portal. Thankfully, I have managed to address both issues." At this point Magus unrolled a map with a few hand drawn markings, which everyone crowded around. "This circled area here is the location of the portal they are getting in, A secret gregtech research lab in the middle of a forest. I have gained permission to mount an excursion to close this portal, but it sadly isn't that simple. The portal is unstable, and has been slowly damaging the fabric of space here."At this point one of the others interrupted with "But if it is slow, how bad could it be?" Magus responded with "Very. This portal has been left open for the better part of the last three decades, and the damage keeps getting worse and worse. As it stands, closing the portal might cause more harm then good as strange as that may seem." A different mage, one a bit older , a little wiser, and a lot more cranky then the first interrupted this time. "If that is the case, why have you called us here? I assume you intend to do more then waste our time." Magus smiled at this, replying "Yes, I think you will be interested in my discovery. To prevent a spacial fracture from occurring, we will need to jump through a few hoops, as it were. You see, closing the portal won't cause any issues. It is the removal of the connection between our and their world that ends with all the nasty side effects. Now, I few of you might think the portal and the connection are one in the same. That isn't the case, instead the portal is the entrance and exit while the actual connection is the road they lead too. So we should be able to close the portal here, then open a new portal here..." Magus pointed to a second circled location on the map, far into the mage guild in mostly unpopulated land. "...before the connection collapses in on itself. If we can pull that off, then the new stable portal will not only allow the connection to remain but will ease the burden that the old one is causing. Over time, the strain on space should dissipate and we can close the portal for good. Any questions?" A female mage was the quickest, asking "Wait, if we are opening another of those portals then wont demons be able to come out of it as well?" "Yes, but they won't be in pain as they are now. While they can flow in, we will be able to choose where we open the portal." An older mage, who looked to be going for the classic white beard but could only manage a gray patchy fuzz said "So that is why you circled Venric's folly. Place is a canyon with steep walls a hundred and fifty meters high. There are less then half a dozen valleys in or out of there." Magus smiled, saying "Right, the area should function as a prison. We send one group to terraform and secure the area, while a second siege the research lab to close the old portal. The tricky part comes in the fact that we have roughly a five minute time limit between closing the portal and opening the new one. We must open the new one after the old has closed so a new connection isn't formed, but wait too long and the connection collapses in itself." Magus started assigning people to each group, with a fairly even split by then end. Magus and I would be with the terraforming group(Magus to open the portal, and myself because of my strange affinity with demons.) while the other three aid is the siege. Apparently closing that portal should be as simple as shutting off the generators for the lab and thus cutting all power to the portal. Because it sounds simple, it will be nothing of the sort. The demonic aura of the area seems to mess with some forms of magic, as an experiment we ran a few weeks ago showed. We shired this discovery when someone asked why Magus didn't just drop a meteor on it. "We tried that. Three times, in fact. All of them ended in different, strange ways." Answered Magus. Tiberius tacked on "First one was pushed away, and landed a mile from the target.", followed by Demir with "Second turned into blue cheese."(This got a few worried looks from some of the more experienced mages. Things turning into cheese was bad, but normally it was cheddar or jack. Blue was almost unheard of.) I added that the third was teleported away, and we still haven't found it. Vlad couldn't help but add "On an unrelated note, we haven't heard from the Redpower institute in a while." The general plan was for the group to brute force their way into the lab, locate the generators, then set up a foothold inside at the generators to rest at while waiting for the predetermined time. The terraforming group was to travel to Venric's folly and close off any entrances and exits, level some ground and change the biomes inside the depression in preparation for the ritual to open the portal. Most forms of communication would either not work, be too slow, or be unavailable to one or both parties so Magus opted for a simple time based system. This entire operation would take around two weeks; group one would need three days to prepair for the siege, a little over a week to get to the lab, then the remainder would be to entering to building, finding the generators, then holding off the demons by building a foothold to wait in. Group two on the other hand would have only a day to gather everything they could carry on their backs then regroup at Ank to ride the wagons for a ten day trip to the canyon to start working. After that, we need to build the ritual and hope to time it right... Then move on from there. Once the new stable portal is open, all bets are off as to what might happen next. The other mages have left to ready their things, and we leave for Ank in the morning. It has been a rough and bumpy week and a bit, but we have arrived at Venric's folly(I asked about the name on the way here. Apparently there is a legend about how the area was formed involving a mage named Venric and a large magical explosion. No one knows if it is true, but knowing mages I'd say it was possible.) The next few days are going to be filled with us working our magic on this area, smoothing out the walls to a near vertical surface and sealing off any and all possible exits to keep them in and fool-hearty travelers out. After that, we clear out an area near the heart of the canyon to build the ritual. Magus has requested I find a feral demon, something not to difficult all things considered, then bring it back to the ritual location. I'll try to write again when the ritual has been finished. It is the day before we open the portal, and Magus has brought us all together around the wicked looking structure he has built. "Tomorrow the peace ends and begins!" He cried when the mages had started gathering. "For the common man outside these walls, we will have brought peace and security to their lives, with the threat of demons ransacking their homes gone. For us however, we will have created a lot of bloody work. We will need people to keep an eye on these demons, examine the walls, and make sure nothing gets in or out. We will create a schedule, but that will come later as I know we are all weary. But this is not why I have called you here, as it is far more dire that a heinous error is corrected! I forgot to name this ritual behind me, with everything that has happened lately. Bella, can you come up here?" I walked up quickly, eyes of the fellow mages following me. "Bella, I give the honor of naming this ritual to you." In the space of seconds, it felt like I ran through thousands of possibilities. I finally settled on a name that seemed most appropriate. "Let us call it the Convocation of the Damned." -aw.entries.demons.observations=It has been a few days since we opened the portal, and I have noticed a few interesting things about the demons that have come out. First, they are already bound in service of other demons so they won't be willing to serve us. Second, these demons are just the grunts, the weaklings, the dime a dozen henchmen. Considering that they have proved to be strong enough to dispatch a skilled mage with ease... I worry about facing the higher ranking demons. And According to Sinferious, these grunts can come in one of five types: Fire(The ones we got, a portal seems to lock on to a set type), ice, earth, wind, and normal/untyped. Each one has some advantages and disadvantages over the others, so we will need to prepare based on what comes out of the portal. - -aw.entries.spells.demonGirl=My life use to be simple. Get up at dawn, move with the caravan, keep an eye out for bandits, fight any that show up, do any odd jobs that needed doing, go to bed. For about ten years my daily routine was just this, with a few days a year where this cycle was broken. Living with traders was a hard life, but it wasn't bad. I gave up this life when my brother, Vlad, decided to take care of Bella, and I was given the choice of staying with the Merry Lamp or leaving with my brother. Wasn't much of a choice, really. He knows more details than I do, but soon after he found her the three of us were walking to the home of someone called "Magus Arcana". After we set up camp I asked my brother if he knew where we're going. I quickly learned that we didn't have much to go on. My brother had heard a few rumors, but nothing really concrete. With only the general direction of "To the lands of the mage guild!" we set off. So our adventure began, if a little out of the blue. My name is Demir Highborn, and I am a blood mage. I have since earned the title of "The Battle Mage" to go with my brots "The Alchemist", my teacs "The Ritual Master", my friend Tiberius' "The Architect" and my adoptive sister Bellas "The Demon Kin". But I am getting ahead of myself, back to the beginning of our little "Journey". About two days after leaving the caravan, we stopped at a small town to get my brother a sword (We only had enough spare money for one) while I went to sell a few gems. While at the market I noticed two men in mage's robes, so if anyone was going to know where to find Magus here it would be them. I walked up to a vendor near them, neither of the two noticing me walk past them while they chatted. I traded the gems for a fair bit of coin, then asked the merchant in a voice a little louder then normal, "While I'm here, have you heard any rumors of a man called "Magus Arcana"? I have some business with him." The merchant chuckled and told me that he was nothing but legends told to kids to calm them down. Thankfully, he wasn't the one I was asking. Out of the corner of my eye I saw both of the robed men glance at me, then quickly turn back. They never would have made it as traders. I thanked him for his time, then started walking out of the market, down a narrow path under a few oak trees that had very few people. As I walked away, I noticed both of the robed men following me, just as I planed. I slowly walked down the narrow path, giving the pair more than enough time to catch up with me. "Hey," one of them said as they drew close to me. I turned around, acting surprised that they had stopped me. "Why hello there. ' Didn't see you walk up." I told them, a simple trick to fool even mages that could tell when you're lying. While it was true that I didn't "see" them, I still knew fully well that they were coming. The one on the right nodded, reading that I told them the truth. "We heard you asking about Magus, what business do you have with him?" The one one the left asked me. "Well, that is a little complicated. I need to find him so that he might teach my brother and I. I already know a little about magic, but people willing to teach for little to no coin are few and far between these days." The one on the right nodded again, then said "That is far too true. My brother Way and I were once apprentices to Magus, and he refused every coin we tried to give him. If you want to find Magus, head north east to a village called Lurric at the heart of these lands. We can't give exact directions, but I'm sure this is better then what you had. But fair warning, he tends to be reluctant to teach just anyone who comes knocking." I thanked them both, and they told me to say hello to their old teacher. Returning to the well, where my brother said to meet up, I found both Bella and Vlad waiting for me. "What took so long? You normally don't take this long to make a sell.", my brother asked. I told him what I found out. "I got more then coin this time. I got a name: Lurric. That is where Magus is suppose to be living, and we should find it if we head north east." About three weeks of walking later, we arrived at Lurric. It was as lackluster as the rumors said, with very few signs that a mage lived around here. Vlad found one such sign while Bella and I went to find some antiseptic for the wounds he had gotten when a skeleton caught us off guard. He meet us with a grin on his face, then pointed us to a cobble stone path out of the village. After walking for about a quarter of a mile, we finally saw the fabled stone house of the great mage Magus Arcana. To say it didn't look like the house a mage would live in was an understatement. The outside was simple, with nothing really standing out that screamed "Magic!", so I became very skeptical of just how great he is if he lives in a place like this. It was smaller than the homes of some of the local lords, let alone most of the nobles. We walked up to the simple wooden door, the only possessions we had left were the clothes on our backs, Vlad's brewing stand, a few odd items that Vlad had collected over the years that we couldn't sell, and the sword we had bought a few weeks ago that had saved our lives more than once. I wouldn't have let us in, let alone take us under his wing and teach magic. We looked more like street urchins then potential mages, in all honesty. When we walked up to the door, Vlad asked us both if we were ready. I told him I was, and Bella (Who had hidden behind me and Vlad) gave him a quick nod. With our blessing, Vlad knocked on the door sharply. After almost a minute the door opened, and a tall man answered us. Vlad talked to him, asking if Magus was here. Another minute later and a slightly taller man greeted us. I let Vlad do all the talking, watching as the man first seemed puzzled, then curious, and as he let us in he had a face of amusement. I forget most of what happened after that, mostly due to the fact that Magus had the other man make sandwiches. By the time I had finished my second sandwich, they were done talking. Magus and the other man left us, and I began talking with my brother. An hour later, Magus and his apprentice Tiberius (Vlad had filled me in on what happened while I was eating. I was almost hurt when he said that he wasn't surprised that I was more interested in the food than the man who gave us said food.) returned, gifts in hand. While Tiberius barely managed to bring in a large roll of fabric, Magus came in arms loaded with more food. Once again, what happened next is a blur. The next thing I remember clearly was Magus and Tiberius creating new rooms for the house using their magic. No wonder it looked so normal from the outside, most of the building was under ground. With three new rooms and a hallway built, each of us had a room to call our own. This was odd for Vlad and I, as we had always shared one room (Normally with other people as well). Once we bathed and changed into the clothing Magus had made out of "Enchanted fabric", each robe dyed to a different color. Vlads green, mine red, and Bella asked for purple. Once we were all changed, we met for breakfast. It was a simple meal of waffles, syrup, milk, and eggs. While we ate, Magus asked a question: "Out of curiosity, do any of you have last names?" Vlad and I told him no. "We didn't need them as traders. The leaders always told us names got in the way of a sell." I said, before finishing the last of the eggs. He then turned to Bella, "What about you?" She also said no. "We... We got last names when we turned eighteen or took up a profession. Even so, everyone went by first names." Magus began to scratch his chin before saying "Well, most people around here have last names. Would you mind if I gave you one? You can't take Arcana, that name only brings trouble. So how about "Highborn"?" All three of us thought it over, then one by one we nodded with approval. Magus began to grin, saying "Very well, henceforth you shall be know as Vlad, Demir, and Bella Highborn." We spent the rest of the day and the next filling out our rooms. Magus provided furniture, supplies, and countless other thing to help us feel at home. Unfortunately, I had no idea what a home was suppose to look like, so my room ended up looking a little barren. I asked Magus if I could move a strange table I found in one of the storage rooms into mine. He told me I could, and offered me a hand moving it. It was a plain wooden table with a red cloth on top, a few strange symbols were faded in the cloth and in the wood. As I touched the table I felt something strange in the heart of the table: a strange power that wanted to escape the table. I told Magus about it, and he was curious as well. "That is... Odd. I bought this a few years ago, intending to work out what it does. Feel free to take a crack at it yourself. Let's move it to the main workroom instead of your room then, alright?" We soon had it at one of the half dozen work spaces that doted the large room. This particular space was close to a white structure with an empty basin on top of it. -aw.entries.spells.spellTable.1=It took me three days, but after looking into a few books I discovered gaining access to the power inside the table was going to be both easy and tricky. to get it out of the table I needed some sort of "Bridge", but I discovered there were two problems: Finding something that works as a bridge, and what happens next. I had no idea what would happen when the power was released. As far as I knew, it might be nothing or it might unleash hell on earth. I hoped it was somewhere in between. I quite literally stumbled over the answer to the first problem. At one point when I was walking out the back door to the strange structure so I could get a little air I tripped over the leg of a table, knocking off a small box that popped open to reveal a small red crystal sphere. The box had the label "Failed attempt" written on the lid, and it also had a very sharp edge that I quickly cut my thumb on. As I picked up the sphere with my cut hand, I felt a strange sensation as I touched the crystal with my bloody thumb. Then the crystal started vibrating. It was soft at first, and as I carried it down to the work room it grew stronger and stronger. It suddenly stopped when the crystal touched the table, and it seemed to flash briefly when this happened. So one half of the task was done, finding the bridge between the world and the table. My next goal was to see what happens when that power is released. With the permission and assistance of Magus, I went out a few hundred meters to conduct the test. With a simple nod from Magus, I began trying to tap into the crystals power. At first, nothing happened. Then I felt a burst of arcane energy, that then did nothing. "How odd..." Magus said as we walked home, defeated. "I felt the magic of the crystal as well, but it was almost without any form. There might be a way to shape it, so don't give up." While Magus left to help the others, I returned to the work room. Then I noticed something odd: The table was a few inches closer to the white structure(Which I later learned was a blood altar). On nothing but a hunch I used the crystal again. Once more the arcane energy went out, doing nothing. But I watched the table while this happened, and as I thought it seemed to move a little closer to the altar. With a quick push from me the table sat next to the altar, and the runes seemed to brighten a bit. I rested my hand on the table, and felt the power moving from the table into the altar as if it was seeking something. Going with my gut once more, I started searching for an item to use as a "Focus". After a few minutes I dropped a set of flint and steel in the altar, then went back outside to try again with Magus watching from just outside the door. After taping into the crystals, I felt a wave of warm air around me. It seems a focus is not enough, so I returned to search for something to refine the tables power even more. After an hour I found a few old skulls and heads of several monsters. After placing a skeleton skull on the table, I felt the table hum with power briefly. It was nearing dark, so with the last few lights of the day I tried the crystals power one last time. Magus watched near me as I tapped into the crystals power, and felt myself get a little weaker as a ball of fire shot out of the crystal. -aw.entries.spells.spellTable.2=After showing Magus and the others my setup, both Magus and Tiberius seemed surprised to see that it needed the altar. After I showed them the crystal I had found, Magus and Tiberius asked me to hold off on experimenting with this further for a few days. Two days later I found out why. I don't feel like putting down all the details, so a quick summary: Each of us had unknowingly discovered new branches of "Blood Magic". Blood magic was a new form of magic that he and Tiberius had been trying to create and prefect for quite some time. Everything we had done so far had connected into blood magic in ways both of them had never expected. If we wanted to continue with the work we had been doing, my spells, my brots alchemy, and Bella's demon taming we would need to become blood mages like them. They went over the risks involved, told us that death was a real possibility, and that if we didn't want to go into blood magic we didn't have to. We quickly gave them our answer: We've already started on the path, so we can't really turn back now. We then went through the first test of any blood mage: The creation of a weak blood orb. All of our palms were tender at the end of the day, but we were now blood mages. -aw.entries.spells.simpleEffects.1=I discovered that the spells the table created used LP, and for the next month I searched for items to act as foci. Here is the list that I have discovered so far, but I don't want to write all the details, so anyone reading this will need to experiment on their own. As Magus says "Life is nothing without a few mysteries." -aw.entries.spells.simpleEffects.2=Flint and Steel acts as, surprise surprise, foci for fire . As a result, most of the spells it creates will leave you or something else with a few nasty burns. -aw.entries.spells.simpleEffects.3=Ice blocks seem to make the effects far chillier, slowing what the projectiles hit and forming ice. -aw.entries.spells.simpleEffects.4=TNT as a foci is quite... Explosive. All of the effects, in one way or another, end with a bang. -aw.entries.spells.simpleEffects.5=Ghast Tears let it control wind, pushing entities around. -aw.entries.spells.simpleEffects.6=Glowstone Dust governs the weather, allowing lightning and such to happen. -aw.entries.spells.simpleEffects.7=Bucket of Water has to do with the control of water, strangely. Expect drowning and water, not necessarily in that order. -aw.entries.spells.simpleEffects.8=Obsidian has the energy attune to stone, for some... Interesting effects. -aw.entries.spells.simpleEffects.9=Ender Pearls allow teleportation, for both you and others. -aw.entries.spells.simpleEffects.10=Apprentice Blood Orb create some strange combat effects that have little rhyme or reason from my experience. -aw.entries.spells.simpleEffects.11=Something else that is interesting about the table is that it does not need to be re-bound to the crystal. If you change the foci or the paradigm the spell will change as well the next time you use the crystal. I also found four "Paradigms" to use with the spells. Skeleton heads imprinted a ranged attack to the energy of the spell, the wither skeleton skull made the spell more suited for close combat, the zombie turned the spell defensive, and the creeper head gave the spell more environmental impact. I should also note that Magus shared with me crafting recipes for turning wither skeleton skulls into heads of the other mobs. Seems a bit pricy, but when you have no other choice... -aw.entries.spells.tableAndSkulls.1=I asked Tiberius how he made the spell crystal, and he told me that while trying to create a new blood orb he stumbled across it. All it needed was a piece of glass in a blood altar, using 1k LP to transform the glass into the crystal. -aw.entries.spells.tableAndSkulls.2=We managed to recreate the powers and effects of the "Spell Table" using blood magic. Amazing what you can do with items laying around Magus's home... -aw.entries.spells.timePasses=This brings us up to today, when Tiberius brought us books so we could write all our work down, if we wished. It has taken a few hours, but here we are. Currently I am working with my brother to create a much more advanced form of the spell system, and will add any information I learn to this book when I have time. Has it really been three years since we came to this place? My life before coming to Magus seems like a distant memory now, and my days have become filled with training and work that I have fallen in love with. Since I last wrote here so much has happened... My sister Bella has come out of her shell, freely walking amongst the villagers in the market without cowering behind us. She has become more outgoing, helping Magus deal with demon attacks and cutting the number of deaths every year substantially. She has formed pacts with over a dozen demons, while working with Magus and my brother to create a way to "Pull" demons into our world, body and soul. My brother Vlad has been busy with his alchemy, creating new potions that have powerful effects but more often then not taste like tree bark mixed with dirt. Alongside that he has been helping me create the components I need for my spell constructs. I needed materials that conduct large amounts of magical and elemental energy, and he has been the only reason I've gotten so far. And no, I'm not writing that just because he is sitting next to me, though it would be a lie to say that hasn't been a factor. -aw.entries.spells.complexSpellBasics.1=Anyway, back to what we're here to write about. We have discovered a way to use the items known as "Blood Shards" and my brots alchemical reagents to create a new way to form spells using blood magic. It uses four components: Paradigms, Effects, Modifiers, and Enhancements. The main improvement of this system over the old one is the ability to "Chain" spell effects together. Before I cover how to create the spells, I should go over the parts. -aw.entries.spells.complexSpellBasics.2=The paradigms act as the starting point for the spells, and define what the spell will target. There is only one "Output" side to these blocks, and it is on the side with five points(It will be hard to miss it), and the output side can be rotated with a simple right click. We have currently created four different paradigm versions: Projectile, melee, self, and tool. While the names feel self explanatory, I'd best talk about them anyway. -aw.entries.spells.complexSpellBasics.3=Projectile: Makes the spell ranged, and will trigger on impact with anything. -aw.entries.spells.complexSpellBasics.4=Melee: Short range spell, normally the target must be within one to two blocks for the effect to work. -aw.entries.spells.complexSpellBasics.5=Self: Targets the caster, or the area immediately surrounding the caster. -aw.entries.spells.complexSpellBasics.6=Tool: Creates an alchemical manifestation of the spell from the crystal in the shape of a mace. Depending on what is in the spell, it can change what this mace does, from being a weapon or a digging tool or "Crushing" any block it breaks. -aw.entries.spells.complexSpellBasics.7=Next we have the effect blocks, and these are what give the paradigms some kick. Unlike the paradigms, theses have both an input and an output. An effect blocks input is always the five pointed non-colored side, while the output is the side with the colored ends(The color depends on the effect block). We currently have the effect blocks for fire, earth, wind, and ice. The effects of these blocks are heavily influenced by the modifiers that come after it, but spells can function with only a paradigm and one effect. -aw.entries.spells.complexSpellBasics.8=Modifiers change what the last effect in the chain before them does. So, if you had a fire, ice, wind chain then placed an offensive modifier, the wind would take an offensive effect while the others remain default. The current modifiers are: Default, Offensive, Defensive, and Environmental. -aw.entries.spells.complexSpellBasics.9=Default makes the effect act as if you left it without a modifier. Useful for spells where you want to guaranty its effect. -aw.entries.spells.complexSpellBasics.10=Offensive makes the spell more combat oriented. Doesn't mean the spell will deal damage, but it might help in combat. -aw.entries.spells.complexSpellBasics.11=Defensive has shown to change effect to protect the user. This comes in several forms, from creating shields and cloaking the user to slowing an opponent. -aw.entries.spells.complexSpellBasics.12=Environmental does what the name says: It makes spell effects have bigger impact on the world, from setting fires at the targets feet to carving out large chunks of land. -aw.entries.spells.complexSpellBasics.13=Finally we have enhancements. Enhancements improve the spell without major changes to the effect. The enhancements are: Power, Cost, and Potency. Like most other spell blocks, plain is in and colored is out. What should also be covered are the frames that hold enhancements. There are three types of frames, each stronger then the last. Your cheap and basic unstable frame can only withstand one per type(You may have one power, one cost, and one potency. If you try to add two unstable power enhancements one will not be able to improve the spell, and actually might blow up damaging the blocks around it). While you may only have one unstable per type, you may have two standard and three reinforced for a grand total of three enhancements of any type(If you want to save on the resources needed for these enhancements, try having one of each in the chain, placed in the order of weakest to strongest. While an unstable can only handle its own power, a standard can handle its own and that of a unstable, with a reinforced able to channel all three without failing). As I write this down I realize it is a little confusing, but with a little practice it becomes simple. -aw.entries.spells.complexSpellBasics.14=Power boosts the, well, power of the spell. If you had a spell that did damage and gave the target a potion effect, the spell would do more damage or make the potion effect stronger. -aw.entries.spells.complexSpellBasics.15=Cost lowers the cost of the spell effect. Doesn't get much simpler then this, yet will always be useful as the cost of these spells can get quite hefty after you chain a few effects. -aw.entries.spells.complexSpellBasics.16=Potency increases the potency of the spell. What this means differs from spell to spell, but with our damage/potion effect example it might make the effect last longer or be stronger. -aw.entries.spells.complexSpellBasics.17=This covers all the parts of a spell, but there is still one block remaining: The conduit. It doesn't add anything to the spell, but it allows you to have the parts of the spell farther apart. The input and output is dictated by the dots on the respective side. Four small dots is the input, one large dot is the output. Now then, how do you create a spell? First, pick your paradigm. Then, create a complex spell crystal to bind to the paradigm(Crafting recipes will be on the following pages for convenience) and make sure the crystal is also bound to an owner. Then, place and connect an effect block to the paradigm(Change outputs with right click, inputs with sneak right click. Do note that one side can't be both the input and the output.) Now the spell will work, but it might not do what you want. You can alter the spells effect by placing down and connecting a modifier. Still doesn't mean the spell will work as expected, but you can at least nudge it in the right direction. Finally you can add enhancements to boost the spell, but they might make the effect cost more(Unless you add cost enhancements), There are three tiers of enhancements, and a spell effect can one tier one... You know what, I went over this in the modifiers section. Look there for more information. But you don't need to stop on one effect, you can chain to another effect and another effect and another.... The possibilities are as endless as your soul network will allow. A few final notes: Every spell will do something. Some need other effects to really flourish while others work best on there own. The cost of the spell will always be the sum of all the effects and their enhancements multiplied by the complexity factor. So you can create massive spells with several effects at once, but watch your soul network as you use it. Just a warning. -aw.entries.spells.crafting= -aw.entries.spells.complexSpellEffects.1=And now Vlad is requesting I mention the effects of the spell... This might take a few pages, but I guess it is worth doing. -aw.entries.spells.complexSpellEffects.2=Self paradigm effects are always interesting... A default fire effect causes the user to burst into flames, while an offensive effect cloaks you in fire to ignite attackers and nearby entities. Defensive forms a puddle of magma at your feet(Useful if you can't be hurt by fire, but the thing trying to kill you can). Finally for fire, environmental causes you to superheat an area causing fires and things to change(Sand to glass, cobble to stone). -aw.entries.spells.complexSpellEffects.3=Earth is a bit less...Wild in it's effects for self. Default raises the ground bellow you up to your feet, forming a platform to stand on and I have found it helpful for when you suddenly don't know where the ground has gone(Happened once when testing a wind spell). Offensive creates an impact at your feet that crushes blocks, cobblestone to gravel, gravel to sand... Defensive effect is a powerful combat option with a catch: You become much heartier, able to take far more damage then normal at the cost of movement. Environmental creates a quick shock wave that weakens near by entities. -aw.entries.spells.complexSpellEffects.4=Ice has been a fun one to use. Default creates a small pillar under you that pushes you up, allowing for quick vertical movement. Offensive causes entities around you to become lethargic, moving slower. Defensive is a bit more interesting, allowing you to slow entities and freeze water using a cloak of ice(You can easily use this to walk on water). When water isn't available, you can create a bridge of ice using environmental ice. -aw.entries.spells.complexSpellEffects.5=Wind has turned out to be quite practical in it's uses, from my tests. Default hs the useful effect of creating a brief burst of wind that puts out fires on the user and protects the user from sudden downward momentum that can cause quick yet extreamly messy death. Offensive mimics the effects of an air sigil, launching you forward. Defensive causes near by entities to have a strong downward wind limit movement. Finally, environmental causes a large high pressure area to form around the user, that then moves to the low pressure area(Everywhere else). This has the side effect of taking entities with it in the sudden gust of air that is formed. -aw.entries.spells.complexSpellEffects.6=On to melee effects, for those who like close range combat. Starting off with fire again, this effect as default causes spontaneous combustion for near by entities. The always entertaining offensive effect causes the target to gain an effect called "Fire fuse". This effect does nothing until it expires, at which point the entity explodes. The explosion not only damages the entity, but causes it to to launch in the air while the explosion damages near by entities. Defensive allows you to wall off areas with fire, stopping things from passing unless the brave the flames. Environmental causes it to form a short range projectile that evaporates any water nearby. -aw.entries.spells.complexSpellEffects.7=Earth melee has a few of the old effects in a new form. Default destabilizes blocks, causing them to fall akin to sand. Offensive has the same smashing effect from earlier in projectile form. Defensive forms a wall by raising a chunk of the ground up. Environmental on the other hand is able to remove the stone from an ore, leaving a fair amount of dust to process into ingots. -aw.entries.spells.complexSpellEffects.8=Ice allows some useful combat options, starting with a default effect that allows the target to lose the tolerance to pain that happens after a blow effectively allowing you to apply more damage in less time. Offensive rockets the target into the air akin the the self ice effect from earlier. Defensive forms a wall of ice to protect you from damage. While Environmental... Well, it is odd. It unleashes an omnidirectional volley of snow balls at the target. -aw.entries.spells.complexSpellEffects.9=Wind is very combat flow oriented, with default pulling entities towards the user, offensive away from the user, and defensive in the air. Environmental is more utility, as it pulls items on the ground toward the users. -aw.entries.spells.complexSpellEffects.10=Projectile spells share many of the effects of other types with a few all their own. A default fire allows the attack to unleash a torrent of fire when it hits something. Offensive creates flowing lava in the air under the target, but is tricky to use without the aid of other spell effects. Defensive smelts blocks, while environmental evaporates water. -aw.entries.spells.complexSpellEffects.11=Earth projectiles are mainly focused on mining, with default disintegrating all matter it comes in contact with. Offensive forms a hole under an entity it hits(It will normally only dig the hole in mundane blocks like dirt and cobblestone). Defensive smashes blocks in the same manor stated before, while environmental mines blocks in an area around the projectile. -aw.entries.spells.complexSpellEffects.12=Ice has a lot of classic effects, with default being an ice plume on impact, Offensive slowing targets, defensive freezing water and making snow, and environmental just freezing water in an area around the projectile. -aw.entries.spells.complexSpellEffects.13=Wind has a few interesting effects, with default sending mobs flying, offencive giving "Heavy heart" to ground entities, defensive letting blocks mined by the spell drop as if mined by a silk touch pickaxe, and environmental pulling items to the user. -aw.entries.spells.complexSpellEffects.14=Tool spells seem to be a mix of utility and combat, with many of the effects allowing it to function as a set tool type. Starting with earth, default acts as a pickaxe, offensive as a way to remove mundane blocks, defensive a shovel, and environmental gives it the power to mine multiple blocks. I know I sound like I'm rushing through these, but they sort of say what they do on the tin. -aw.entries.spells.complexSpellEffects.15=Fire has a few powerful effects, with default smelting anything mined(Cobble to smooth stone, sand to glass...), offensive acting like the enchantment fire aspect, defensive increases the time the spell stays in tool form, and environmental lets it turn stone into lava. -aw.entries.spells.complexSpellEffects.16=Ice is more combat centered, with default letting blows it deals slow entities, offensive giving it a few sharp points for more damage, defensive unleashes a torrent of cold air when the tool is summoned that creates snow and slows mobs. The environmental effect is a black sheep, allowing the tool to function as if it has silk touch. -aw.entries.spells.complexSpellEffects.17=Wind has effects that are just... Useful. Default allows it to function as an axe, offensive gives it some extra punch to throw mobs back after being hit, defensive weighed them down, and finally environmental pulls items closer to the user. -aw.entries.spells.offTopic=Tiberius has informed me that this book will update as I add to it, so if we ever create more blocks for the advanced spells, you'll know when I do. For now, this is the end. And yet it might be your beginning. I'll go off topic for a bit, because today something happened that I never thought possible: I killed a wither(You know, big black flying skeletal death monster that wants to kill everything? One of those.) Not only did I kill one, but I also helped kill twenty more. Magus said that the most killed at once before this was ten by three people, so we crushed the record. We needed a few nether stars to upgrade our altar, but nether stars are near impossible to get. Unless you work on the conglomeration board like Magus that is.(He runs the largest country in the world, apparently. I know, I can hardly believe it either.) After inviting every single world leader for a holiday weekend(Of which they actually treated like a holiday trip), Magus managed to get us a reservation in a battle arena to kill thirty withers. To say I was shocked is an understatement. But, by some miracle, we managed to not only kill all of the withers(And all of us lived to tell about it). Sadly, I'm stuck in bed with a busted leg(Wither skull nailed me when I was casting a spell.), so I've taken this as an opportunity to try new kinds of food(Magus knows how to cook like any five star chief). I'd keep writing, but I smell the roasted chicken coming down the stairs now... Vlad has finally found a more stable recipe for the more advanced spell parts for the augments. While he has been able to create them before, the new orbs we have allow them not to fall apart four out of five times. A slight improvement, I'm sure you may agree. With this, the reinforced spell augments are much more reliable. Well, the last few days have been interesting. We have managed to open a hole in the fabric of space to let in an invading army of demons, but it was to stop another portal letting in other demons so it is all fine. Sorry, but I had to comment on how ridicules that sounded when I first heard Magus's plan. But it isn't as bad as it sounds, since we opened the second portal we had control over where the demons come out and can prevent them from running wild. Absurd sounding, I know, but when you deal with holes in space leading to demonic realms things are rarely ever simple. Or when a mage has any involvement, for that matter. -aw.entries.spells.demonicPower=Gah, look at me! I opened this musty old book to mention the new augments Vlad and Tiberius had created using the spoils of this "War", and ended up ranting about how strange and wonderful life as a mage can be. Right, Vlad managed to make a few parts better using these life and soul shards we've been collecting. Not much else to it, really. Sure, Vlad might say how he had to create new laws of alchemy to explain this process, but he does that on a daily basis anyway. - -aw.entries.alchemy.fatedMeeting=My name is Vlad Highborn, and I am a Blood Mage. I have studied the intricate workings of alchemy and the process of "Equivalent Exchange," which governs all aspects of magic. Basically, you cannot create something from nothing, although many have tried when searching for a particular stone. That obviously didn't end well, because people are clamoring for a fake variant even today. Of course simply saying that I am an alchemist isn't enough, because one of the main things I do is study Blood Magic with The Ritual Master and The Architect, both of whom have achieved those titles by their own merits. Magus and Tiberius have been busy recording their own works over the years, although I don't think Magus has everything written down in a book - I have yet to find any actual proof. Demir and myself were working with a trading company named the "Merry Lamb," which operated throughout the entire lands travelling from place to place, selling our wares from horseback and buying whatever was of value. We didn't have last names, we didn't need them - the only thing that was of worth to the caravan company was how much of a profit you were able to obtain, and last names only got in the way of a sell. When we weren't busy with the various villages, trying to part with our gleaming swords and precious gems, all that was left for us was to read the many books that we obtained in the light through the canvas of the caravan. That was how I fell in love with Alchemy in the early days. One of the members of the trading caravan I worked with was an alchemist, who created simple potions and poisons for both medical use and profit. He taught me many things while he worked with us, but I quickly learned that he only knew the basics of what could be done. This void of knowledge led me to collect several alchemical tomes from the merchants of the passing villages, where I heard of a powerful mage that lived on the outskirts of a small village. At times I fantasized of meeting him, perhaps even learning from him alchemy like nothing I could ever dream of. But every rumor made me think he was more myth then man, filled with outrageous stories of his skill and power that no one else has ever came close too. Paired with the fact that no one had ever seen him almost killed the last of my dreams. I was reading the latest book in my collection, one that I bought from a hermit alchemist in the last village who kept muttering about turnips, when I noticed a flickering that didn't match the light of the candle that I had in the caravan. I looked out of the back of the caravan as it slowed to a crawl, all of the traders were looking at the same thing: a trail of dark smoke rising from behind the trees and blowing in the harsh wind. The head of the caravan quickly dispatched a group containing one person of each profession, which included myself as the now only alchemist, and we headed towards where the village used to stand. A massacre. I saw the smoke and ashes of the buildings, charred and even frozen flesh littering the ground. I swallowed heavily, looking around me for hope that I wouldn't lose my supper, and overheard someone speaking the obvious, "It must have been demons! No mage would use both ice and fire to attack a village." "Hell, no self-respecting mage would attack a village in the dead of night. They still honour that code from the medieval era." We readied our weapons, myself relegated to medic duty, but there was hardly any use because demons rarely stayed for more than an hour after they're done. "Hey," Nick shouted, a new member to our group, "there's someone here!" We all looked around and saw a little girl, possibly about age twelve, wondering through the ashes and looking both lost and dazed. "The demons leave no survivors, boy," the leader of our group said. "It is a bad omen to find her here, alive and alone. Hell," he laughed bitterly, starting to walk away, "that may not even be a ' - could be another demon for all we know." The thought stirred me, not of what she could be but that someone could leave a lost child by herself. "Fine," I said, after arguing the point for several minutes, "if you won't take her, I will leave the Merry Lamb." I can't fully remember the argument because of how much time passed before I could finally write it down. What I do remember is that the head of the caravan was quite startled at my proclamation, but finally agreed to send a carrier to fetch both my brother as well as my belongings, and to give me a good deal on some supplies. "I won't try to talk you out of it, since I know how you get when your mind is set. But if I may ask, why are you so intent on trying to help her?" I turned around to start walking towards the girl, who was watching us blankly. Not surprising, considering we are probably the first people she had seen today. Living, at least. After walking the few paces that put me between the girl and the caravan, I turned to the leader and said what I was holding onto for the past few years. "I know what it is like, to not have any home to call my own. I'm hoping that this is not a bad omen, but is rather a sign of fate." Unfortunately it might have been a little preemptive of me to throw away my whole livelihood and wayward home to help a single lost girl. Demir wasn't exactly happy having to pick up everything that he had to head out on an adventure and neither of us were expecting, but I couldn't really blame him. Demir was attuned to several forms of magic, being the resident wizard-in-training of our group. Thankful for the little spark of mana that he managed to cultivate over the years, he kindled a fire for the three of us once we managed to walk off the rest of the night. Her name was Bella, with light blonde hair and blue eyes. When we asked her what happened that night, she simply shook her head and tucked her knees under her chin. Demir and I looked at each other, and we knew that no form of magic that we knew would heal her of the wounds that she had in her mind. When we tried to ask her if she knew of any magic herself, considering that we neared the boarder to the Mage's Guild's land, she shook her head again and looked sullenly back towards the village that she came from, now miles behind us. Demir finally asked the question that I was thinking myself - it seemed that he always had the uncanny ability to read my thoughts, or at least my mood at any given moment. "So, which way is it to this 'Magus Arcana?'" It was a long and difficult trek towards the village that the Mage was rumoured to live in. Three long, blistering weeks. It is actually quite amazing how a distance can be so hard to traverse on foot without a caravan, pulling our dwindling belongings with us as we continued onwards towards our goal. When we reached a village we would do the same thing: we would go to the local market at daybreak and sell whatever books and gems that we could, grab our allotment of food for the next leg of the journey, and ask in the tavern if anyone has heard of rumours of the great mage Magus. It seemed that with each village our supplies were getting less prosperous, dwindling until all that was left was a few worthless rocks that no one was keen on buying. Thankfully it seemed that we were getting close, since the rumours were becoming more and more substantial, until it became a reality. Passing by a blacksmith's shop, I noticed that the furnace was burning a lot more brightly than if it was filled with lava, and I peered into the slot for the fuel. What appeared to be there was a crystal made of lava, pulsating slowly as if it received a beat from a heart nearby. I asked the blacksmith about it, and he told me about an apprentice who made it, who didn't appear to have a name in the blacksmith's memory - if I were to hazard a guess, I'd say that he was more afraid of the apprentice than he let on. Grabbing Demir, who bought some antiseptic for a few wounds we received from a stray skeleton the previous night, and Bella, we finally headed towards the outskirts of the village we were looking for. The home wasn't hard to find, there was a simple cobble stone path leading away from the village to a lone stone house. Considering the fact that there can't be that many homes out here like this, this was the place or whoever does live here can give us directions to the right one. We walked up to the surprisingly simple wooden door, and I turned to the other two. "Are you ready?" I asked them, more for my sake then theirs. Bella simply nodded, barely speaking more then a few sentences a day since we left three weeks ago. Demir put his hand on my shoulder saying "This is the place, right? Let's not just stand here like a bunch of geese." Gathering myself, I knocked three times on the door. At first, I feared we had the wrong house. Then I feared we had the right house, but no one was home.... Before my mind could think of another scenario, I heard the sounds of a door being opened and someone walking on stone. The door swung inwards with a light squeak from the hinges, reveling someone of about eighteen wearing long robes. "Hello, how may I help you?" He asked after quickly looking us over, and I assumed this is the apprentice the blacksmith mentioned. "We're looking for the great mage Magus Arcana, is he here?" The man looked at all of us, then turned his head yelling "Master, there is someone here to see you. They're asking for you by name." We soon heard a door open again, and a man who looked to be in his late thirty's appeared behind the apprentice. I saw him briefly look the three of us over, raising his eyebrow as he did so. "You must be Magus. We've come a long way to meet you. May we come in?" He seemed to think this over for a few seconds, then sighed saying "Alright, you may come in. Leave your boots at the door, then follow me to the main room. Tiberius, can you make a quick lunch for the five of us?" The apprentice nodded, then left around a corner to the right while Magus lead us left to a large room with a few chairs, a simple couch, a plain wooden table, and an unlit fireplace with a strange red rock on the bottom. He gestured for the three of us to take a seat on the couch, which we gladly accepted. We had been on our feet for the last three weeks, so a chance to sit in a cool room was a nice change of pace. As Tiberius brought out a tray with several sandwiches on it to set on the table, I looked around the room to see what was on the walls. Stone tablets with strange symbols, brightly colored wands and stave's adorned the walls like kings use old swords, and a small book shelf was set above the fire place holding a variety of books in a few languages. I recognized "The theory of equivalent exchange" by Pahimar, the book that sparked the search for that certain stone. I noticed that while I had been gawking at the walls, everyone else had started eating. I grabbed the remaining sandwich, a simple pork and cheese with a strange sauce that I didn't recognized but immediately loved. "So..." Magus said as we finished the last few crumbs of the meal. "..what brings you to me?" Demir gave me a sideways glance, my que to start talking. "Well, I heard stories of what how much you know. I wanted to learn alchemy, so I came here. I know of only one other alchemist, the one who taught me the basics." He frowned, pinning his glare on me. "I looks like you three traveled a long way to get here, and you were unprepared for a long journey. So I'll ask again, what made you come to me?" He knew we didn't have as much of a choice as I was trying to let on, so there was no point in lying. "My brother and I lived with traders. About three weeks ago we came across a village that was attacked by demons, with there being only one survivor." Magus glanced over at Bella, who was eating a second sandwich Tiberius had brought for us. "Yes, Bella was that survivor. That other traders wanted to leave her for dead, but I couldn't bring myself to do that. So I was forced to go threw with a plan I had been preparing for the last few years, trying to find you, early. I had originally planned to come here alone, and had just enough money to get one person here. We barely scraped by with three, getting here with the last few gems I had to trade." Magus nodded, a intense look on his face. "And what were you planing to do if I was not here, or you never found me, or if I was a myth like many people think I am? Or did you even have a plan?" I sighed at his questions, he really pinned me down and read me like a book. "I had a back up plan, if a bad one. If worse came to worse I planed on trying to find a village that needs an alchemist to brew potions. I still have all the equipment in my bag, one of the few thing I couldn't bring myself to sell. I know how much the traders made off my work, I could feed the three of us with it, if only just barely." Magus nodded as if I gave the right answer. "Now then, what of your brother and your friend Bella? What had you planned to do with them if you found me?" "Well, my brother has a little mana, enough to create sparks strong enough to light fires. As for Bella, she doesn't know if she as any talent for magic." Magus's gaze shifted over to Demir, then Bella, then returned to me. "And if your brother or Bella didn't have enough talent for me to teach them?" I sighed once again. He was asking all the right questions. "I would shift to plan B. I'm not leaving my brother or Bella, not after all we have been threw, and not for the teachings of a heartless mage." He gave me a hard stair for a few seconds, then a wide grin grew on his face as he said "Right answer. Alright, I'll see what I can do. I should be able to teach something to you three, and I doubt anyone else around here is going to take her in. Rumors of the blond haired demon girl have beat you here." Magus made a few arrangements for us, having Demir and I stay in Tiberius's room while Bella took Magus's. When I asked where he would be sleeping, Magus said he kept the old couch around for more then one reason. When I started to protest he said that this was only temporary and that the three of us would have our own rooms tomorrow. When I asked how, all he did was smile and say "You'll see." While the three of us got accustomed to our new home, Magus and Tiberius went out for a few things. "Well, there an odd bunch." Demir said shortly after they left. "Don't laugh, they can say the same about us." I told him. This comment earned a rare smile from Bella, who had slowly started coming out of her shell. Magus and Teberius returned a little over an hour later, Magus caring a huge amount of food while Tiberius had a large roll of uncut fabric. Magus brought the food to the main room we sat at before, its intoxicating smell had caused both my brother and Bella to start drooling. I would criticize them if I wasn't doing the same thing. "Even after lunch you three looked half starved." Magus said as he set down loafs of fresh bread, cheese, and dried meat slices. "So we got you something, though we didn't have many options on short notice. Consider it a welcoming gift, along with some new clothes we'll make. But those can come later, for now you can dig in!" We ate like wilder beasts, tearing apart the bread, clawing for the meat, and making sure to get every last crumb of the cheese. I had no idea just how hungry I was till I saw all that food, and by the end of it I was amazed at how long it had been since I ate like this. Three weeks ago? No, a few month ago. When the traders were celebrating a huge trade with a large and wealthy village. The leader has so happy that he almost spent half the money he earn off the deal on the party. Almost. After a nice long night of sleep, we all awoke to the sounds of Magus and Tiberius carving out a large chunk of the dirt on the other side of a wall. I was fascinated by how they were doing it: Magus cast a spell to remove the dirt, then Tiberius replaced the dirt with stone bricks using a strange looking wand. At first I wondered where all the dirt was going and stone was coming from, then I noticed a few strange bags at the side of Magus and Tiberius. Once the main size was laid out, Magus asked Tiberius for the bag he had. With it in hand, Magus raised one arm to have walls raise out of the ground with it. Then Tiberius grabbed a few strange flying flames to light up the hallways, and candles for the rooms. "Alright, we're done. You three now have rooms to call your own. I'll have to do some work, but we might be able to get a few beds here as well. I only have one spare, so you three can decide who get's it for now. "Bella." my brother and I said in unison. "Alright. Tiberius, can you give me a hand moving it to her room? Also, your rooms have a small work area. If you need more space, you can use the main basement area or let us know. We'll see what we can do. For now, you three can pick which room you want, then move unpack your things there." The next two days went by fast, Magus helped make our rooms homes and assisted us in finding fields of magic to study(He had over a dozen tomes on alchemy inside is huge library, so I quickly felt at home with my nose in a book). While he attended to Demir and Bella, I started diging into the tomes. After cross referencing several of the books, I noticed that very few ever tried to improve upon the first brewing stand. Of the few who did, none succeeded in making potions larger then one dose. After briefly talking with Magus and Tiberius, they encouraged me to try and improve the design and gave me a space in the main workroom to do my testing. -aw.entries.alchemy.firstSteps=I knew I needed to try and reinforce the stand, as it was far to fragile to mix more then one item at a time. I tried iron, gold, stone, and several other material. They ether were far to weak, incompatible with the stand, or unruly with my attempts to shape them. It was when I tried to use obsidian, something that was compatible with the stand, strong enough to withstand the strain of the alchemy process. My only problem was fusing the obsidian with the stand. While I pondered my options, I felt my hand brush against a strange red orb that had been sitting next to my work space. Once I did so, the obsidian seemed to spring to life, wrapping around and shaping the stand into something far greater. I called down Magus and Tiberius to see what just happened. When Magus asked how I did what many others failed at, I told him the truth. "I'm not sure. I was thinking of how to do just this, when I accidentally touched something on that table and then the obsidian sprang to life." "You touched something and the obsidian seemed to come to life? What did you..." Magus said, then stopped dead as he looked at the other table. "Was it that orb?" He asked hastily. "I think so. After I touched it, this happened. It looks like what I created had a slot shaped like that orb."I told him, and Magus looked shaken. "Tiberius, we're going to need to talk about this. For now Vlad, can you hold off on testing what that device does?" "Alright." I told him, a little confused. "But I think I should name it. How does "The Alchemical chemistry set" sound?" Magus put on a weak smile "That seems fitting. It seems to be much more then a simple brewing stand. I recall Demir saying you had a few alchemical items that an adventure sold to the traders in your possession. Perhaps you can try to work out what they do, or what they're made of." Trying what Magus suggested, I started experimenting with the strange alchemy items I collected in my time with the traders. In total, I had two small red orbs, one larger red item that seems like a better version of the red orb, three small blue orbs, and two blue items that seem like they're between the small orbs and the large ones. Using a small alchemy lab Magus brought me to, I started breaking down anything I had spares of. Taking one of the blue orbs and grinding it in a mortar and pedestal, I found it was made of three redstone, and two items I had never seen before. One was acting as a "Binding" agent, while the other was some sort of liquid catalyst. After a few hours of work, I had a few formulas for the items, but I still needed to recreate them. Normal mixing wasn't working, as it seems like there was some other factor that merged them in the first place that I am missing. I'll write the formulas here when I find out what I'm missing, so until then I start grinding up the other items. Alright, after about three days worth of work I now have discovered that my original assumption that the larger red and blue reagents were stronger, more "Condensed" versions of the small orbs was correct. After a bit of work I am starting to think there is some sort of link between the alchemical chemistry set and these reagents. The chemistry set has five "Input" slots and one "Output" slot, and many of the items here need just five items... I will need to ask Magus about trying this with the orb that formed the set inside. Well, I am apparently now a blood mage. Magus and Tiberius told us details about some of the items we had been finding around our new home, from the weak blood orb that help create the alchemical chemistry set(Which Bella later used to tame her new demon friend. After everything I have heard about them, he is remarkably civil.) to the altar behind the house and in the basement. I was given the choice of continuing to study blood magic and use my new chemistry set(And taking all the risks that come with it), or studying other forms of alchemy. I went with the risky option, simply because I would be blazing a new form of magic. I now have a weak blood orb to call my own, and I will start trying to experiment with creating some of the reagents I have discovered in the last few days. -aw.entries.alchemy.chemistrySet.1=Hmm. It seems that the "Simple Catalyst" is the only alchemy reagent I could make with a weak blood orb. Once I had the recipe(Two parts redstone, one part glowstone, one part sugar, and one part gunpowder. Mixing these together should make one simple catalyst), I place one of each item in the outer five slots of the chemistry set. This alone is not enough to create a simple catalyst, you need to have a blood orb bound to you in the "Orb" slot to supply LP for the process(The simple catalyst only needs 200LP, so it is fairly cheap). Tiberius mentioned he had already made a stronger blood orb, so I might ask him for help making my own. I'll log any recipes I find. With a bit of work, I have managed to create the other component of the tiny dark blue orb(The small light blue orb still eludes me. I might need to look into a stronger blood orb, but that will need to come later.) The "Binding Agent" seems to have a few uses in both crafting and the other experiment I have been running with potions(More on that later). The weak binding agent needs only two simple catalysts and a piece of clay to form(Along with 1K LP). I say weak because I feel I can improve it with some of the reagents I have been creating. For now, I should go over what I've made in the past month. With the help of Magus, I have managed to make "Alchemical elemental reagents". These reagents represent various elements found in the world that always play a major role in both magic and alchemy. I will make a quick list of each element and its recipes, and will try to create these entry's as close to what I find in all the alchemy books I have read. Also I should note that they all need 500LP as a catalyst to make. -aw.entries.alchemy.chemistrySet.2=Incendium: Holding the power of fire and the nether, incendium need items often attributed to fire and are a part of the nether. Due to this, it is very hot and it has left me with a few small burns from my time handling it. -aw.entries.alchemy.chemistrySet.3=Aether: A reagent holding the power of wind, I have had to make sure it doesn't float away with every breeze. Made with items that seem to always be used as in reference with the wind(Ghast tears and feathers) that I bound to glowstone dust and a simple catalyst to give it some physical form. -aw.entries.alchemy.chemistrySet.4=Sanctus: Closest thing to powered light I could make, it seems to hold strange properties that I still can't understand. It needed a little gold, glowstone dust, and glass I had ground up in the chemistry set to make, but it seems worth the cost. -aw.entries.alchemy.chemistrySet.5=Crepitous: Chaos and destruction in physical form, I named it after the creepers that gave me the idea(And the gunpowder) for it. Made with one simple catalyst, two cobble stone, and two gunpowder. -aw.entries.alchemy.chemistrySet.6=Crystallos: A fine, cold powder that sends chills down my spine every time I touch it. Made with two parts ice(I need to find a better way to get this, The village doesn't have much in stock, and I burn through most of it trying to get the formula right), two parts snow(Full blocks, not balls or sheets), and the standard simple catalyst. -aw.entries.alchemy.chemistrySet.7=Terrae: A hard, grainy powder that has the power of the earth. Composed of two parts obsidian, one part dirt, one part sand, and mixed together in a simple catalyst. -aw.entries.alchemy.chemistrySet.8=Aquasalus: A reagent that seems to shift between powder and liquid on a whim, it represents the force of water in alchemy. Made by mixing three parts water(the amount in water bottles seems perfect), a ink sack(I didn't ask Magus why he has a huge stock pile of these in his storeroom, and he doesn't seem the type to mention it on a whim), and a simple catalyst. -aw.entries.alchemy.chemistrySet.9=Tennebrae: If sanctus is solid light, tennebrae is hardened shadow. Black as night and seems to dim everything around it, this reagent has potential to be powerful is used correctly. Made with obsidian, two pieces of coal, a ball of clay, and a simple catalyst. -aw.entries.alchemy.chemistrySet.10=Magicales: Raw alchemical power seems to pulse in this dust, and I feel like I have only glimpsed the true potential of this reagent, and I both fear and adore it. Made by mixing one part redstone, one part gunpowder, and two parts glowstone in a simple catalyst. -aw.entries.alchemy.incense.1=>A note, this is an entry written several years after the others before and after this. After talking to the others, I am adding this here as a post script to aid others who read this for the simple reason of "We would have loved to have this when we were starting out". This will, however, mention people and items that might be foreign to you for now. Roll with it, it will all make sense later.< -aw.entries.alchemy.incense.2=I have found something... Well, unexpected to say the least. The self proclaimed hedge mage Athis stopped by our still in construction homestead in Venric's folly to visit Tiberious. Apparently in one of the letters he wrote her he mentioned being unable to relax after working on watching the demons running around and building various things he and Magus decide we need here(Isn't this meant to be a temporary base of operations?). Well, she came by with a small pouch of wood ash incense and a little brazier to help him with this, but what this provided was far more valuable than simple scented air. I joined Tiberious and Athis for the first use of the incense, and to her credit I started feeling relaxed breathing in the sweet scents it let off. Part way through I got up to visit the blood altar, being my turn in the roster to top out out communal soul network. After performing a sacrifice like normal, something odd happened: There was more LP in the altar then there should be, by a fair margin. Several sacrifices later, I couldn't get it to happen again, so I went in to mention it to Tiberious(While it might have been a simple miscalculation, we must always look deeper into it. This philosophy was passed down to us by Magus, and has saved us time, lead us to great discoveries like this, and at times has resulted in a lot of cheese.). He performed his own sacrifice in the altar, and again there was more LP then there should be. Long story, involving investigations into the local flora, positions of stars, and phase of the moon, short we discovered it was the incense of all things causing the discrepancy. As it turns out, being under the effects of this simple wood ash was resulting in a greater exchange of raw life essence for a given amount of blood, akin to how self sacrifice runes work. After some experimentation, we have a basic calculation for the process and method for the most profit. You must sit in range of the improved brazier I have designed after giving it wood ash until white particles are emitted(You can do the sacrifice before this, but you won't get the full effect). You then must sacrifice almost all of your blood in one quick burst(This is achieved by holding right click for several seconds, then releasing), after this Lp will be added to the altar based on the number of hearts sacrificed, plus the bonus of the self sacrifice runes in the altar, then this total is multiplied by the effect of highest quality incense you are under. An example: If you sacrifice nine hearts into an altar without any self sacrifice runes while under the full effect of wood ash, you would add 2160 LP to the altar instead of the normal 1800. This process isn't without issues, however, as this rapid expenditure of blood weakens you for a time, with an effect not unlike soul fray. -aw.entries.alchemy.incense.3=Now then, I mentioned "Highest quality incense" before. Well, after the revelation that mundane wood ash would offer a sizeable boon to LP creation, I descended into my lab to perfect the process by creating better incense. After three days, ten pots of coffee, and one nap I emerged with four new incenses: Byrrus, Livens, Viridis, and Purpura for bonuses to LP creation of 60%, 120%, 200%, 300% respectively, compared to the 20% of wood ash. There is a minor issue, however: You can't just make and use the strongest one and be done with it. You see, these are designed to be used with each other and wood ash in a sort of chain. Once you reach the peak of wood ash, Byrrus can start taking effect, once you are at it's peak Livens can start, and so on. I should also note that while the LP gains they offer are improved, the relative scents they can let off vary from par with the wood ash to as foul as a compost pile. Sacrifices must be made, and a few foul fumes is worth the gains. I should note that you can speed up the process by which you are effected by increasing the volume of vapours inhaled. In laymans terms, the more braziers active with the same incense around you the faster the effect can take hold. -aw.entries.alchemy.potions=That is it for the reagents, for now. The other use for the alchemical chemistry set I have found is the creation of potions unlike anything anything I have ever seen. While not big on taste(But really, has there ever been a potion that isn't hard to swallow?), the potions it makes are more... refined. Using a single flask(Made in a T2 blood altar with2K and a glass bottle, the first being made by accident when I dropped the bottle in the lab after tripping on a table leg that had been moved), a potion ingredient, and a binding agent I can turn the solution in the flask(A mixture of nether wart, redstone, and glowstone dust) into a potion that has eight uses or "Swigs" instead of the normal one per bottle. Another interesting power of these new potions is that the red and blue alchemy items I had acquired from the adventures(Who in turn got from some chest in a dungeon) can be used to "Augment" the potions by mixing them in with more of potions ingredient. The red ones I have dubbed "Power catalysts", making the potions effect much more potent at the cost of shortening the effect. The blue ones I have started calling "Lengthening catalysts", as they make the potions last much longer then normal. On another note, I have started trying to make a better binding catalyst after an idea came to me from a mishap in the lab. I had tried to make a slowness potion(We had a few villagers that had been pestering us, so I wanted to get rid of them without hurting them), but after adding in the sugar powered I tried mixing in a fermented spider eye. Trying to add it in with a weak binding catalyst, I noticed that instead of mixing with the speed potion it was forming it's own section the same color of a weakness potion. Then the flask exploded. If my theory holds true, these potions can hold more then one effect, but the solution destabilizes when an effect is added. Should the potion fully destabilize, it will cause a small explosion that shatters the flask and damages anyone close to it with the glass shards. If I can help keep the potion stable, I might have found a secret of alchemy countless mages have sought but never found.... -aw.entries.alchemy.reagentRevolution.1=I have been experimenting with what I can make with this new blood orb, a gift from Tiberius for my help with his sigils. Using this orb I have finally been able to recreate the power and lengthening catalyst. Sadly, I can only make the mundane versions of each, but one step at a time. I haven't actually made many new items for my potions and alchemy(Well, compared to the shift from weak to apprentice orbs) but everything I have found is extremely useful with my potions. Then there is what I've been making for my brother, but I wrote most of the uses of them in his book. I'll add the recipes here anyway, for completeness sake. -aw.entries.alchemy.reagentRevolution.2=The first step towards these new reagents was to make a better form of catalyst. Surprisingly, this was the easy part. By mixing in a netherwart and bonemeal into two simple catalysts, I could create two "Strengthened catalyst" with which to create new reagents and enhance old ones. -aw.entries.alchemy.reagentRevolution.3=Shortly after this discovery, I managed to make a reagent I have dubbed "Offensa" by mixing in two arrows, a flint, and a strengthened catalyst into an incendium. While the original reagents represented elements, these new reagents seem to represent ideas and concepts(With "War and battle" being given to offensa). -aw.entries.alchemy.reagentRevolution.4=More tinkering gave birth to Praesidium, which seems to represent "Defense and protection" and is created by mixing tennibrae into strengthened catalyst, iron ingot(Ground into a powder at the set), redstone dust, and a cobweb(This may or may not have fallen into the set when Bella was doing some cleaning, ending with this happy accident). -aw.entries.alchemy.reagentRevolution.5=By strengthening terrae with the better catalyst, sand, gun powder, and a netherrack chunks(Luckily, we still have some from the last hell harvest festival but I must remember to buy more in a few months), I have created orbis terrae. Where terrae seems to be the element of earth, orbis terrae is the environment itself, encompassing above and below ground from the dessert to the nether. -aw.entries.alchemy.reagentRevolution.6=After a few days of nothing, I managed to form a powder now called "Virtus" from two parts redstone, one part coal, and one part gun powder mixed into a strengthened catalyst. From what I can tell, this is the raw manifestation of power(Fitting, this reagent is hard to control and a few of our uses of it have backfired horribly). It holds in it a great deal of potential energy, but releasing it(And then controlling it) has proven to be very difficult. -aw.entries.alchemy.reagentRevolution.7=This next one is a little odd. Late one night in the lab I had been mixing things together to see the results, and something caused me to mix a gold ingot powdered in the stand, soul sand from our nether wart farm, redstone dust, and a carrot of all things in the strengthened catalyst. When I awoke the next day, I found three things: A reagent called reductus(The aspect of reduce and diminish), a large mess in the lab, and that this wasn't the strangest things I had mixed together. Since then I have started brewing pots of coffee before I begin working late in an attempt to stay lucid. -aw.entries.alchemy.reagentRevolution.8=The final reagent that I have created is called "Potentia", due to the energy that causes it to crackle and pop on its own(Note: As my brother accidentally discovered, this powder does have some electrical properties to it that caused his hair to stand on end when he was working with it). Created with two chunks of lapis lazuli, glowstone dust, a piece of nether quartz, and a strengthened catalyst, this powder is similar to virtus. The difference is that while virtus is raw power, potentia is energy. Ironically, virtus is the more stable of the two, only giving off energy in large bursts while potentia seems to give off a little at all times. -aw.entries.alchemy.newPotions=After a few weeks worth of work, I finally managed to upgrade the binding agent and have made one that lets me make more advanced potions with more then one effect. Unfortunately, it doesn't work every time. For the first effect it works every time, like the weak binding agent. For the second effect, it only works four times out of ten(On average). Then the third effects works only sixteen times out a hundred(Again, on average.) It also needs 1.5K LP to make the binding agent when mixing a weak binding agent, a sanctus and a crystallos. With how rare some of the ingredients of my potions are, I decided to create a "Filling agent" that replaces the solution in the potion flask so that I can get more uses out of them. I have noticed that potions with more then one effect require stronger filling agents, as every effect in the potion cuts down how effective the agent is. The weak filling agent is made with a simple catalyst, a pile of redstone and glowstone dust, and a piece of nether wart. The weak filling agent can then be upgraded with a terrae and 1K LP into a "Standard" filling agent. -aw.entries.alchemy.soulSand=I managed to find a new use for the weak blood shards that the others have been gathering. Since the shards are technically part of a "Soul", I tried mixing it in with a bucket of water and sand using my chemistry set to get a fairly close replication of an uncommon nether resource, soul sand. While not identical, it can serve the same purpose as the normal one found in the nether. -aw.entries.alchemy.timeGoesBy=It just occurred to me, it has been over three years since I came to Magus's doorstep with my brother and sister. I've gotten so use to living here, and the daily routine seems like something I've done all my life. Strange, I never thought I'd settle down. Five years ago, I'd have never considered leaving the caravan. I have barely left my lab in the last month, aside from when Magus, my brother or sister drag me out by the back of my robe. Normally I would go out willingly, but we recently finished our altar upgrade and have created the "Master Blood orbs". As is customary, this new orb has given me the boost in power needed to create more alchemy items for both general use and my potions. As a result, progress has been coming in leaps and bounds with something new almost every other day. After many late nights and early mornings, theses are the fruits of my labor. -aw.entries.alchemy.catalysts=I managed to improve the catalyst even further by mixing in a gold nugget and the fragments of a bone into the strengthened catalyst, making it into a much more concentrated form, hence the name "Concentrated catalyst". With it, I have been able to infuse the imbued slates created in the blood altar with alchemical power, making it stronger then normal and able to construct devices to hold alchemical and magical energy. On the potion items, I can finally make all the forms of the power and lengthening catalysts, filling agents. By merging two of a catalyst with a standard binding agent you can make the standard form of said catalyst, and then you can create the greater form of the catalyst by fusing two of the standard with a reagent(Incendium for power and Aquasalus for lengthening). Adding these to a potion is the same process as the mundane, place the potion and the ingredient in the stand with the catalyst of choice. Note: You don't need to teir up from normal to the greatest, you can jump strait to the greatest effect by mixing in a greater catalyst. Adding a better catalyst to an old potion does nothing for the effect, and is the same as if you added it to a potion that never had a catalyst added. The greater filling agent is able to resort six charges to a one effect potion, and is made by adding aquasalus and magicalus to a standard filling agent. The remainder of my time has been spent brewing potions. Bella has almost finished the demon summoning area, and I have been creating a few reagents for that and brewing potions to buff myself during the fights. Bella has mentioned a beast called an "Elemental", and it has me slightly worried. A few new bruises later, and I now have a demon blood shard to call my own. I also have one procured by Magus to improve his ritual activation crystal with, and I will need to use a few reagents to merge the blood shard with the crystal, and some experimentation will be needed to find out what... -aw.entries.alchemy.activationCrystal=A few tries later, and the binding of the demonic power to the crystal works with Aquasalus, Incendium, and Aether. In theory a nether star can be used in place of a demon blood shard, but considering how hard those are to get a hold of... Magus has been thrilled with his new crystal, and I have started work on a new project with Tiberius as a surprise for Magus. His rituals as they stand are good, but I have had an idea to make them even better... I'm having a hard time sleeping tonight, so I might as well go over our idea and hope Magus doesn't read this. As it stands, the rituals only use life essence to run and are often "One trick ponies". What I proposed to Tiberius is this: What would happen if one of the rituals was charged with alchemical power, costing reagent to give it new or stronger effects? We might get nothing, or something amazing. Time will tell which it is. -aw.entries.alchemy.reagentSystem.1=It has taken the last two months, but we have the ground work for testing our idea done. The results so far have been even better then expected. We only have tested the full spring ritual and have discovered quite a few effects, but I'll let Magus cover those. -aw.entries.alchemy.reagentSystem.2=Instead, I'll write how the reagent system works. You first need an alchamic calcinator, then place a blood orb into it to act as a power source. After that, reagents can be placed by hand or fed into the calcinator to turn into pure alchemical energy, the type based on the reagent fed in. Once it has a solid reagent, it will use LP to turn one reagent into 1000AR(Alchemy Reagent) which is then moved into the 2000AR "Buffer" of the calcinator. Once in the buffer, the reagent slowly starts being moved into the main tank which can then be siphoned out. -aw.entries.alchemy.reagentSystem.3=Now then, to move it out of the main tank you need to have somewhere for it to go. To this extent, you have three options: A crystal belljar, a alchemic relay, or a master ritual stone. How you need to link it is simple: Create a alchemic router, then Shift right click with it on the calcinator to select the reagent type for it to transport(A note for blocks with more then one tank and more then one reagent type: Shift right clicking again on the block will swap between the available reagents inside the block.), then normal right click on the block with the router to bind it to the block. After that, right click on the destination(Needs to be within a few blocks, the range isn't that large). If it has worked, you should see reagent "Flowing" to the destination from the source(In this case the calcinator). We have tweaked it to where you can't see reagent moving with the naked eye, you need to have a tool(Like the Alchemic router) in hand to see this effect. You can also use a divination sigil on the belljars, relays, calcinator, and master ritual stone to read how much reagent the device holds. This process of binding can be applied to all the other blocks so I shouldn't need to cover it further, but I should note that these blocks can only accept and send reagent to so many locations at once. For example, the belljar can only accept reagent from one location, and send it to one location. I must also reiterate that if you have a relay set to send aether to destination A and Tennibrae to destination B, aether can never traval to B and vicversa for Tennibrea. New connections must be made for each reagent type, and we could not get a "Colorless" version of a connection to function. -aw.entries.alchemy.reagentSystem.4=Getting more into detail about the blocks and items of our new system, I'll cover the bell jar first. Created out of mundane glass and wood slaps, then filled with a concentrated catalyst solution to contain the alchemical energy in a stable enough environment to allow you to move the jar without losing any energy inside. While it can hold only one type of reagent and is restricted to one source and one destination, it functions as a portable form of "Bulk storage"(Able to hold 16000AR). An option for more storage is to link a few belljars together, but I feel this is a far from perfect answer to the problem of mass storage of reagent.... I will need to talk with Tiberius and Magus about this later. Regardless, Tiberius managed to incorporate a bit of redstone interaction into the design of the jar. Based on the amount of reagent inside the jar, it outputs a redstone signal(15 when full, 0 when empty, and so on). With a bit of work, you can use this for automated systems. -aw.entries.alchemy.reagentSystem.5=The "Alchemy Relay" acts as a small buffer(Two tanks that can hold two reagent each), and can be used to merge and divide a transport line of reagent energy. Each relay can have limitless sources, and four destinations. With the creative use of relays, you can create a large power network for transporting reagent. Tiberius has worked his magic on this device as well, and tweaked it to not send reagent when a redstone signal is applied(It also spins slightly slower to represent this). -aw.entries.alchemy.reagentSystem.6=To assist with the use of this system, we have three items to manage these devices. The Alchemic Router is used to bind the destinations of set reagents for all devices. The Alchemic Segmenter is used to partition tanks to a set reagent. All you need to do is set the reagent type the same way you would the router, then right click the device you want to partition a tank for that reagent type. One tank will be set for that type per right click, and if you exceed the maximum number of available tanks it will reset all tanks partitioned tanks to the default "First come first served". I should also note that if you set a relay to accept sanctus, offensa and vistus, the two available tanks will distributed to whichever reagents that get there first. The final item is the alchemic cleanser, and its use is simple but very useful: It resets all destinations. All locations the device is set to send reagent are cleared, so you can easily bind the device to new locations. -aw.entries.alchemy.reagentSystem.7=Now, we have made a few minor alterations to the "Master ritual stone" to enable our system to function. Its recipe and normal uses have remained the same, but it now has three internal tanks that each hold 1000AR. If the ritual has any reagent, it will display an "Alchemy Ring" above the master ritual stone as a sign that it has been augmented. Then depending on the ritual and the effect in question, it will use an amount of reagent to perform a new effect or augment an old one. An example of this is the full spring fulled with aquasalus will convert earth into farmland then hydrate it in a nine by nine around the master ritual stone, but if the full spring is given crystallus it will freeze all water source blocks around it. This all is paired with the base effect of the rituals, so the full spring can still function as an endless water source. This is all I can think of to write down about our new system. Tiberius and I plan to show it to the others tomorrow, so I need to get some rest. We showed our new system to Magus and my siblings today, and to say they loved it was an understatement. We had decided to be a little flashy with the show, building a full spring next to a small pond that had formed from the recent rainfall. After a bit of work hiding the relays and the belljar, Tiberius hid out of sight while I showed the others to the demonstration. I asked Magus to activate the ritual, keeping a close eye to see if he focused on anything in particular, but he quickly and effortlessly activated the ritual without pausing for a moment. After he returned to my side, I yelled for Tiberius to throw the switch. In an instant the reagent flowed to the ritual, and as the alchemy circle formed in the air the water created by the ritual and that of the pond quickly froze over. I heard gasps from both of my siblings, and I noticed Magus's eyes widen for just a moment(His equivalent of a jaw hanging slack) before he composed himself. Afterword we went over the details for them of how it works for the other, explaining the minor modifications we had made to the basic master ritual stone design and such. -aw.entries.alchemy.magusSecret=It has been a week since we ironed out most of the kinks with the reagent system, and Magus brought all of us together around the dinner table to go over the next few months. He said that he could get us something he felt would be needed to upgrade the altar to teir five, but it would take a little over a year to get them. He also mentioned that we should be getting a few messages after this years Hell harvest festival, which I thought was a little odd. "A little odd" doesn't begin to describe what has been happening the last few days. It seems most of us have put research on the side while we watch some of the "Replies" come in. They have come in via air drop, mechanized mail carriers, train and countless other ways that always seem stranger then the last. Tiberius managed to ask Magus what this was all about and he simply replied that he invited a few guests over, and these were the replies they had sent. When pressed for more details, he just said they wouldn't be coming for a few months, so we should start mastering what we can do with our blood orbs. We then started showing each other the little details of the branches of blood magic we had created and had been perfecting. In the last few months I have befriended a few demons with the help of my sister, created a few spell crystals and help construct a large complex spell with my brother, and then forged armor and sigils with Tiberius. Then it came time to teach the other alchemy and potion brewing.... I was reluctant to give out my secrets to brewing potions, even to them. I had told no one of the recipes for these brews, brewing potions for the others myself when they needed them. I almost wanted to tell the others no, but then Magus made me an offer. "I understand how you want to keep the secrets of your brews hidden, so how about we make a trade of knowledge instead?" he asked me when I was contemplating this matter. He offered me details about himself, somethings that wasn't common knowledge and even gave me permission to write everything down. Considering how little I knew of him, even after all these years, I quickly took him up on this offer. The very next day I had everyone in my personal lab, showing then the details and reciting the recipes for some of the most potent effect I had found then demonstrating there uses. I was done showing them everything shortly before dinner, so while we ate in the common room Magus told us his story. I'll jot as much of it as I can recall here, for you to enjoy as well. "So it is time to tell my story... I always hate doing this. So many questions that I really don't have answers for, and frankly it is a long bloody story. But a deal is a deal, and you all deserve to hear it. I have only told a handful of people this, all of them were either mages or Conglomeration members. You will so count among this number... I was born in the middle of the Talus kingdom, before all these corporations were founded and started forming their own governments. Back then gods and kings dictated law, and wars were fought on the battle field and not in markets shares and advertisement campaigns. My family was small, all I had was a mother who did all she could at home and a father who worked at the royal library. I ended up spending many hours in that library, both helping my father with his work and studying the countless tomes that adorned those shelves. At an early age I discovered a hidden treasure trove in those shelves: Books on magic. At the time magic wasn't well known, and most regarded it as nothing but myths created by fools. Because of this, theses books stayed lost and forgotten on these shelves until I came along. While other boys were learning the right way to hold a sword or a pickaxe, I spent my time studying the arcane. At the end of my first year there, I had already created a basic fireball spell and a thaumanonicon. I managed to keep my activates in magic hidden from everyone, my parents include, until I had come of age and needed to find a profession. It was then that I told them of what I had been working on all those years, showing them some of the smaller tricks I had perfected. To say they were shocked is an understatement, so I felt it best to leave their little world in the kingdom and set out to find a new home to practice magic without needing to be as secretive. That is how I came to Lurric, and it has been my home ever since then. The early days were hard, as I really didn't have the funds to live off of let alone support my research. I managed to get by helping the locals, merchants with book keeping and identifying some of the more obscure relics and "Treasures" they had for sale, farmers with stock and management, and even as a cook when times were really dark for me. But this only lasted a year or two, then I had the infrastructure in place to support myself with a little extra to live on. Amazing how much traders are willing to spend floating balls of flame and purple metal.... Skipping ahead a few years through the dull portion, I had begun to master a few forms of magic like thaumurgy and botany. My name had started to spread to the other nearby villages, and people asking for favors and knowledge started popping up at my door like they do now. At the time I never asked for gifts or compensation, but I didn't turn down food or books if they were offered. Traders started traveling to Lurric more and more, hoping to acquire a few goods that only I could provide at the time in exchange for gold, jewels, and rare books. Those who brought the third I gave the best deals. Still, life went on like this for a few more years with books starting to pile up in my library, more then enough gold to pay for my more "Exotic" materials, and never having a day of rest for the full decade I had first lived here. That peace was shattered the day a man by the name of Gareth broke down my door. He came in, adorned in full iron armor and long sword in hand, to challenge me to a dual to the death. It took more then a few sleep spells to knock him out of his rage, at which point I restrained him to a reclined chair I had in the back that I used when treating wounded. When he finally awoke, I started interrogating him. Well, interrogate isn't quite the right word for it.... Honestly, I just asked him a few questions. Once I saw that he had calmed down, I untied him and offered food. Did I mention the sounds his stomach made while he was unconscious? They were strong enough to rattled the chair. After eating a whole bread loaf and a large part of the stew I had been preparing before he arrived, we sat in this very room to talk like civil beings over why he decided to break down my door. His story is about as ludicrous as mine is. He was one of fifty seven immortal beings who walked the earth. He told me what details about he could, but he seemed unsure about it as well. What he did tell me was that the gift of immortality comes with a few boons aside from the obvious, and what they are differ from person to person. He said his gift was that of prophecy, and he recently had a vision of the future where I and people I influence would play a major role. As a result, he came here to challenge me to a dual to the death. I then asked him if that wasn't a bit unfair, him being immortal and all. He, in the most serious tone possible, said that it was completely fair: While an immortal can not be killed normally, there are set way that it can happen. One way is by a one on one dual to the death, with immortality wagered as the prize. They really don't have much choice in this, as it is like natural magic: The mere act of it the dual happening is enough for the "Wager" to take place. If both parties exert their full strength, then the killing blow is enough to complete the wager and transfer the gift. We talked for the next few hours, and I learned quite a few interesting facts. He had no idea who the other fifty six immortals were, and he frankly had no way to tell them apart from normal humans. He also mentioned that he could still be injured outside of the dual, but he would not fall to mortal wounds and heal at an accelerated rate. Not much of one however, as he mentioned breaking a leg once and it taking over a month to fully heal. Another note was how short a time he had been immortal, he had gained it about two decades ago. While to you that seems like a long time, he said the one he killed was alive for over a century. We finally ended that night with an agreement: In one weeks time he would return to my home, where we would share a fine meal, then have our dual the next morning. He wanted to get strait to the dual, but I had the meal as a non-negotiable point that he finally caved on. I spent the next week preparing for the battle, arming myself with the most potent spells and artifacts at my disposal from several schools of magic. In a flash that week went by, then Gareth once again sat with me to eat at my table. I gave him a bed to sleep in that night, then at dawn we both walked to the hill just behind this house where Bella's garden currently lays. Of all things about Gareth, our battle was one things I barely remember. Once we reached the top of the hill, we both brew our blades and turned to each other. After that, I only remember flashes and out of order scenes. It felt like it was over in only a few minutes, but it might have been hours and was one of the most brutal fights I have ever been a part of . His agility was far greater then I expected, dodging my swings and spells with ease. Unfortunately for him I was still a force to be reckoned with back then. I never let up on my spells, casting fire, ice and lightning one after another using my foci then teleporting around with a few spells. In the end, he died when he dropped his sword in reflex to the heat my flame spell had left on it and I capitalized on this. By this point we both felt taxed by the fight, and he could barely avoid my slowest attacks. The final blow I dealt was out of mercy, a quick end for his suffering that I had caused. I watched as Gareth grinned at me like he knew this would be how he died, then he closed his eyes as his body turned into sand carried away in the wind. I feel to my side after that, strength sapped and mana depleted, to awake a few hours later. I felt a new strength in my body when I got up, slight but still there. All in all, suddenly having immortality was rather lack-luster, but that was how it happened." At this point I was shocked into silence at his words. Not what he said, but how he said them: Little feeling or emphasis. It was like he just said that he gained a new scar or it started to rain. He has been more emotional over the acquisition of a rare book then immortality. Glancing at the others, I could tell they were mulling over this information as well. After a few minutes, my brother spoke up to start the questions. "So... Did your life change much after that?" Demir asked Magus, before taking a bite out of a sandwich he seem to have created from thin air. "Not really. Life as an immortal was just the same as life as a mortal. More researching, more learning, more magic.". "Have you met any more immortals since then?" Bella asked. "Two, and I happen to be related to both of them." "Related?" asked Tiberius with curiosity, "I never knew you had any relatives." "Well, they never came up. One of them is my brother, who started studying the Myst a few decades ago and hasn't been heard from since. I expect he will pop by any time he feels homesick for a few days, then drop out of touch again." "And the other immortal?" Bella asked with interest. "The other is my wife." Once again we all went into stunned silence, Tiberius and Demir slack-jawed. "You're married! Since when?" Bella asked after a moment. "Few centuries ago. We met when a small war was being fought with a necromancer, and she was the one leading the forces. Of course, most people at the time didn't know her real gender. She tried hard to keep it hidden, so the troops wouldn't think of her any differently. I was brought in to help deal with the "Undead army" details of the whole thing, and that had me working with her. One thing lead to another, and we were married a few months after the war was over. Currently she works as a commander of the Conglomeration's defense force, so she is rarely has time to come home." The questions continued for the next half hour, ranging from "Did you really open the first nether portals" to "Why are you on the Conglomeration board?". Magus took all are questions with the air of a man who has done this all before. When the questions were over, all the others started retiring to their rooms while I stopped by the library to look up something. The Talus kingdom fell almost a millennium ago. Wow... It has been a few months since I last wrote in this book. I've met more people in the last few weeks then I have in the last few years, many of them from lands I have never set foot in! Kings and queens, rulers and underlords, CEO's and owners from every nation. Then there was the fight with the withers... I'm not sure what to say about all that. I sort of walked in there, chugged a few potions then let the years of training with Magus take over. By the time the adrenalin rush was over for me, we had killed all of the withers and I was barely aware of a dull pain in my leg. Magus has used a spell to restrict my movement so I won't leave this bed while my broken leg heals since I "May" have tried to sneak into my lab once or twice to get to work. For now I must be content with my notebook and what Magus brings me from his library to past the days... -aw.entries.alchemy.simpleCreations=I've only had a little time at my chemistry set, so I haven't had much time to experiment with my new orb. All my tests trying to make new reagents failed, and I so far have only managed to make two new runic slates for my brother(But we have been trying to find new uses for them). The normal runic slate is a simple upgrade to the old cracked slates by infusing terrae into them. The final slate, dubbed imbued, is two runic slates bound together with magicales, incendium, and aquasalus. These days I've been working with the other on a few secret projects, so I have needed to keep up with and research all kinds of strange subjects. I also always seem to need to make more reagents, as our experiments burn through them rather quickly... I will write more when I have the time. - -guide.BloodMagic.entryName.architect.intro=A Classic Tragic Back-story -guide.BloodMagic.entryName.architect.bloodAltar=The Blood Altar -guide.BloodMagic.entryName.architect.soulNetwork=The Soul Network -guide.BloodMagic.entryName.architect.blankSlate=Basics of Sigils -guide.BloodMagic.entryName.architect.divination=The Divination Sigil -guide.BloodMagic.entryName.architect.waterSigil=Training, and a Water Sigil -guide.BloodMagic.entryName.architect.lavaCrystal=The Lava Crystal -guide.BloodMagic.entryName.architect.hellHarvest=Hell's Harvest Festival -guide.BloodMagic.entryName.architect.lavaSigil=The Lava Sigil -guide.BloodMagic.entryName.architect.blankRunes=Blank Runes - the Step to Tier 2 -guide.BloodMagic.entryName.architect.speedRunes=Speed Runes -guide.BloodMagic.entryName.architect.apprenticeOrb=The Apprentice Blood Orb -guide.BloodMagic.entryName.architect.voidSigil=The Void Sigil -guide.BloodMagic.entryName.architect.airSigil=Air Sigil -guide.BloodMagic.entryName.architect.sightSigil=Sigil of Sight -guide.BloodMagic.entryName.architect.advancedAltar=Advanced Altar Mechanics -guide.BloodMagic.entryName.architect.fastMiner=Sigil of the Fast Miner -guide.BloodMagic.entryName.architect.soulFray=Soul Fray -guide.BloodMagic.entryName.architect.greenGrove=Sigil of the Green Grove -guide.BloodMagic.entryName.architect.dagger=Dagger of Sacrifice -guide.BloodMagic.entryName.architect.sacrifice=Runes of Sacrifice -guide.BloodMagic.entryName.architect.bloodPack=The Blood Letter's Pack -guide.BloodMagic.entryName.architect.fivePeople=And Then there was Five -guide.BloodMagic.entryName.architect.tier3=The Next Step: Tier 3 -guide.BloodMagic.entryName.architect.magicianOrb=The Magician's Blood Orb -guide.BloodMagic.entryName.architect.newRune=New Runes -guide.BloodMagic.entryName.architect.magnetism=Sigil of Magnetism -guide.BloodMagic.entryName.architect.phantomBridge=The Phantom Bridge -guide.BloodMagic.entryName.architect.holding=Sigil of Holding -guide.BloodMagic.entryName.architect.elementalAffinity=Sigil of Elemental Affinity -guide.BloodMagic.entryName.architect.ritualStones=Recreating Ritual Stones -guide.BloodMagic.entryName.architect.bloodLamp=Shining a Blood Lamp -guide.BloodMagic.entryName.architect.boundArmour=Bound Armour -guide.BloodMagic.entryName.architect.sanguineArmour=Sanguine Robes -guide.BloodMagic.entryName.architect.soulSuppress=Suppressing the Soul -guide.BloodMagic.entryName.architect.ritualDiviner=The Ritual Diviner -guide.BloodMagic.entryName.architect.bloodShard=Blood Shards -guide.BloodMagic.entryName.architect.tier4Altar=The Life of a Mage - Tier 4 -guide.BloodMagic.entryName.architect.masterOrb=The Masters of the Tier 4 Altar -guide.BloodMagic.entryName.architect.whirlwind=Sigil of the Whirlwind -guide.BloodMagic.entryName.architect.compression=Sigil of Compression -guide.BloodMagic.entryName.architect.severance=Sigil of Ender Severance -guide.BloodMagic.entryName.architect.teleposer=The Teleposer -guide.BloodMagic.entryName.architect.suppression=Sigil of Suppression -guide.BloodMagic.entryName.architect.superiorCapacity=Rune of Superior Capacity -guide.BloodMagic.entryName.architect.orbRune=Rune of the Orb -guide.BloodMagic.entryName.architect.fieldTrip=A Field Trip -guide.BloodMagic.entryName.architect.bindingKey=The Key of Binding -guide.BloodMagic.entryName.architect.tier5Altar=The Trials of a Tier 5 Altar -guide.BloodMagic.entryName.architect.priceOfPower=The Price of Power -guide.BloodMagic.entryName.architect.demonicOrb=The Archmage's Orb -guide.BloodMagic.entryName.architect.energyBazooka=Power of the Energy Bazooka -guide.BloodMagic.entryName.architect.accelerationRune=Acceleration Runes -guide.BloodMagic.entryName.architect.harvest=The Harvest Godess -guide.BloodMagic.entryName.architect.demonProblem=Solving a Demon Problem -guide.BloodMagic.entryName.architect.tier6Altar=Tier 6 Already -guide.BloodMagic.entryName.architect.moreThanHuman=More Than Human: Project Omega - -guide.BloodMagic.entryName.rituals.intro=Introduction -guide.BloodMagic.entryName.rituals.weakRitual=Weak Rituals -guide.BloodMagic.entryName.rituals.rituals=Rituals -guide.BloodMagic.entryName.rituals.waterRitual=Ritual of the Full Spring -guide.BloodMagic.entryName.rituals.lavaRitual=Serenade of the Nether -guide.BloodMagic.entryName.rituals.groveRitual=Ritual of the Green Grove -guide.BloodMagic.entryName.rituals.interdictionRitual=Ritual of Interdiction -guide.BloodMagic.entryName.rituals.containmentRitual=Ritual of Containment -guide.BloodMagic.entryName.rituals.bindingRitual=Ritual of Binding -guide.BloodMagic.entryName.rituals.beastMode=Beast Mode -guide.BloodMagic.entryName.rituals.unbindingRitual=Ritual of Unbinding -guide.BloodMagic.entryName.rituals.jumpRitual=Ritual of the High Jump -guide.BloodMagic.entryName.rituals.duskInk=Dusk Ink -guide.BloodMagic.entryName.rituals.magnetismRitual=Ritual of Magnetism -guide.BloodMagic.entryName.rituals.crusherRitual=Ritual of the Crusher -guide.BloodMagic.entryName.rituals.speedRitual=Ritual of Speed -guide.BloodMagic.entryName.rituals.shepherdRitual=Ritual of the Shepherd -guide.BloodMagic.entryName.rituals.darkMagic=Dark Side of Magic -guide.BloodMagic.entryName.rituals.knifeAndSufferingRitual=Feathered Knife and Well of Suffering -guide.BloodMagic.entryName.rituals.regenerationRitual=Ritual of Regeneration -guide.BloodMagic.entryName.rituals.harvestFestival=The Hell's Harvest Festival -guide.BloodMagic.entryName.rituals.thenThereWereFive=And Then there were Five -guide.BloodMagic.entryName.rituals.alchemyRitual=The Ballad of Alchemy -guide.BloodMagic.entryName.rituals.domeRitual=Dome of Suppression -guide.BloodMagic.entryName.rituals.awakenedCrystal=Awakened Activation Crystal -guide.BloodMagic.entryName.rituals.featheredEarthRitual=Ritual of the Feathered Earth -guide.BloodMagic.entryName.rituals.gaiaRitual=Gaia's Transformation -guide.BloodMagic.entryName.rituals.condorRitual=Reverence of the Condor -guide.BloodMagic.entryName.rituals.meteorRitual=Mark of the Fallen Tower -guide.BloodMagic.entryName.rituals.expulsionRitual=Aura of Expulsion -guide.BloodMagic.entryName.rituals.costOfProgress=The Cost of Progress -guide.BloodMagic.entryName.rituals.zephyrRitual=Call of the Zephyr -guide.BloodMagic.entryName.rituals.harvestRitual=Reap of the Harvest Moon -guide.BloodMagic.entryName.rituals.eternalSoulRitual=Cry of the Eternal Soul -guide.BloodMagic.entryName.rituals.ellipsoidRitual=Focus of the Ellipsoid -guide.BloodMagic.entryName.rituals.evaporationRitual=Song of Evaporation -guide.BloodMagic.entryName.rituals.sacrosanctityRitual=Ward of Sacrosanctity -guide.BloodMagic.entryName.rituals.evilRitual=Veil of Evil -guide.BloodMagic.entryName.rituals.stomachRitual=Requiem of the Satiated Stomach -guide.BloodMagic.entryName.rituals.reagentEffects=The Effects of Reagents -guide.BloodMagic.entryName.rituals.conclaveOfMages=The Conclave of Mages -guide.BloodMagic.entryName.rituals.forbiddenParadise=Forbidden Paradise -guide.BloodMagic.entryName.rituals.convocationRitual=Convocation of the Damned -guide.BloodMagic.entryName.rituals.longHaul=The Long Haul -guide.BloodMagic.entryName.rituals.phantomHandsRitual=Orchestra of the Phantom Hands -guide.BloodMagic.entryName.rituals.anvilRitual=Rhythm of the Beating Anvil -guide.BloodMagic.entryName.rituals.dawnInk=Dawn Ink -guide.BloodMagic.entryName.rituals.symmetryRitual=Symmetry of the Omega -guide.BloodMagic.entryName.rituals.stallingRitual=Duet of the Fused Souls -guide.BloodMagic.entryName.rituals.newMoonRitual=Blood of the New Moon - -guide.BloodMagic.entryName.demons.ashes=The Girl From the Ashes -guide.BloodMagic.entryName.demons.tamedDemon=The First Tamed Demon -guide.BloodMagic.entryName.demons.future=A Glimps into the Future -guide.BloodMagic.entryName.demons.knight=A Wandering Knight -guide.BloodMagic.entryName.demons.demonShard=Pale Blue Demonic Shard -guide.BloodMagic.entryName.demons.demonSummoning=Demon Summoning and Taming -guide.BloodMagic.entryName.demons.keysGate=The Keys to the Gate -guide.BloodMagic.entryName.demons.futurePlans=Future Plans -guide.BloodMagic.entryName.demons.demonInvasion=The Demon Invasion -guide.BloodMagic.entryName.demons.observations=Observations of the Demons - -guide.BloodMagic.entryName.spells.demonGirl=Wandering and Demon Girls -guide.BloodMagic.entryName.spells.spellTable=Spell Table Top Games -guide.BloodMagic.entryName.spells.simpleEffects=Spell Effects for Beginners -guide.BloodMagic.entryName.spells.tableAndSkulls=To Make a Table and Skulls -guide.BloodMagic.entryName.spells.timePasses=And so Time Passes -guide.BloodMagic.entryName.spells.complexSpellBasics=Complex Spells, the Basics -guide.BloodMagic.entryName.spells.crafting=Vlad's Guide to Crafting -guide.BloodMagic.entryName.spells.complexSpellEffects=Effects of Complex Spells -guide.BloodMagic.entryName.spells.offTopic=Off topic, This is my Life -guide.BloodMagic.entryName.spells.demonicPower=Demonic Power Unleashed - -guide.BloodMagic.entryName.alchemy.fatedMeeting=A Fated Meeting -guide.BloodMagic.entryName.alchemy.firstSteps=First Steps of Alchemy -guide.BloodMagic.entryName.alchemy.chemistrySet=Uses of the Chemistry Set -guide.BloodMagic.entryName.alchemy.incense=Incense Inside -guide.BloodMagic.entryName.alchemy.potions=The Power of Potions -guide.BloodMagic.entryName.alchemy.reagentRevolution=Reagent Revolution -guide.BloodMagic.entryName.alchemy.newPotions=New Potion Improvements -guide.BloodMagic.entryName.alchemy.soulSand=Soul Sand -guide.BloodMagic.entryName.alchemy.timeGoesBy=As Time goes By -guide.BloodMagic.entryName.alchemy.catalysts=Upgrading the Catalysts -guide.BloodMagic.entryName.alchemy.activationCrystal=Activation Crystal Upgrade -guide.BloodMagic.entryName.alchemy.reagentSystem=The Reagent System -guide.BloodMagic.entryName.alchemy.magusSecret=Magus's Secret -guide.BloodMagic.entryName.alchemy.simpleCreations=Simple-ish Creations - -guide.BloodMagic.category.architect=The Architect -guide.BloodMagic.category.rituals=The Ritual Master -guide.BloodMagic.category.demons=The Demon Kin -guide.BloodMagic.category.spells=The Battle Mage -guide.BloodMagic.category.alchemy=The Alchemist - -guide.BloodMagic.welcomeMessage= -guide.BloodMagic.book.title=Sanguine Scientiem -guide.BloodMagic.book.name=Sanguine Scientiem -guide.BloodMagic.authorName= - diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_air.png b/src/main/resources/assets/bloodutils/textures/blocks/area_air.png deleted file mode 100644 index 4fe5519d445e2322df8ea541190a75c5d074fe16..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1405 zcmV-@1%mpCP)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00009a7bBm000W> z000W>0fLJSS^xk52XskIMF-vq8wfWf%>Qsr000FXNkl<ZSi|kqTWl0{6vy%J-1ag% zEoHkU5`6c;7>$sScnPQxk=7a_lv0Es7u$-0Kx;`56^c-*Aqc%-VpK|7jj<^UBud0s z6N%9TBhhCXo0!y6F5TVP*`3*)@nOqOO=h=!un7<SKmT*i`Tui%A7RbvY9|(pv0%Xh z#>U0~2!%rU{eCi;46-b9_XGj~Y}+Of2w<8fmSrLP{eD(#8p>a~GEhk{7{szHB9RET zZ8I`50zfz%=FwGO=kNahZ4L6>4u4**L)Uf6$}|!Qor;PICMG7xX0wFDVPsimbaa$I zzN^EuOcqZT5^dWCK-YDaz8K}fXZmme)3gYO!;FspgD6S>tk^WfL(lf3g+c&Gl7yH_ zrMNOsiJ~X~{C#x?k|>hRW-yEtnx>)a34A^um(DB)z_x9E9;`-HRYX-)NvG2Yg1}$D z)RRaguq=z)x9^a(?ffSyib5b5<jO!5ARq`r?g{C1ns7MGjT<*er%hy8CY4H&N~OtI zCI|wNNQ7iENqIO-Jdq%oOd^V6u7IK_l$Mq<Z{9p4St6UYS-9{%N=r+S6$LdI1R$MG z1CY&TN$5Hb4whvhT9(DcL<~*S0I)I^s;c7m`v|Ej4i1jvAW0G>B^r_>k<Df?k|`uf zLJoyOB$Ed5cml_9h{fWRXc~eb;P?AUCJiJ}B$-TN+YTjK2oO+Jl}sjsIDYdcq9~&H zd?<=Sd8C~2@o{8X#<p!jY7oOPC@U*Nk|fgUG@2H|G;>c9B~ipkrLePE9$0pUcq~pJ z5FnW}ux%U5val=*$AL(soTuw9BZwk~k;)bD`~5t&`aG6p0kEWM0K-V(^C?)CmCr;l z7~uXTUHLU$UV8~m(~yHfHMdo=%*d||T)#ey&z~j`@B<Kw#V9Q;MUo`0U0O#Z5<wL1 z<QGcTbsd1E)q?=sx>bX1+hj5s9LGUba}7+>L{StLE$(E|<P?cS0%2p_Iwz6P(X<e% zsuGXK^JAK(nV(?({Q2m*j$s)2$d8SUAsdE)t|thERECF#|Kq{k2m{39xzCklIqyM5 zMMchox+d3yXm@cBR%~`XxZE?vgQ5PJdGJGD&V%PRdw5W}J<786g*~Wi8se!99v(!y zT@S8(Q`m#P4_pr}eC*-D)eF;m5bd7xV0JxteC_le)V%58L3O?B!OAU#J$Pi5>%p3x z9v=L5vA74{pDp4+<+e!=dWw7S@bjJdDefT;>RVk8dfSS7@X{{VgTYf%Jh;$3GY`&p z<vduk%fo}(rYKbng*~Wm9isX*4-b0VTn~QwvakoI-*!FdZ};$EsCRk~dfVnam|YK6 zZkyhNt?znxu;DG&gSER0d+_9X*MnCMczEz*UvUr4brkWScJHJIr;2;<MD0E4K}(nG zK}U0O54Ik1J^1XsDIT0XJTnh^T5}$3JLKU(!_g=&?=S2@OV<#a4tRLb(d>F~v9quT zZH=x6T`e9Socm~c4?3FXJeXY%YFnoFVDCu}4|W`LJ=lJ@um>-^?s~BMgog*wlf^yw z{9q9e8jcL+15(U`svY;F2M2px584}xd+^3_*MrWcDIR>hZ)P5xZpnGD^SFlxdrn1p z^=M%a4)zSuaLmJl_D0u(uZ|V=;GK=G2OsY6@Sy+w={;y~obzCIJ=oGZy$1(A_3)s% z)AeB2iNYSN+vj?){}T@nzBp3cgRbTx9_%?em=8!X4{BQeXAk}b5^GtFN8rU900000 LNkvXXu0mjflplah diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_air.png.mcmeta b/src/main/resources/assets/bloodutils/textures/blocks/area_air.png.mcmeta deleted file mode 100644 index 3ca39cc0..00000000 --- a/src/main/resources/assets/bloodutils/textures/blocks/area_air.png.mcmeta +++ /dev/null @@ -1,16 +0,0 @@ -{ - "animation": { - "frametime": 2, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 3, - 2, - 1, - 0 - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_darkness.png b/src/main/resources/assets/bloodutils/textures/blocks/area_darkness.png deleted file mode 100644 index 831839fdff29a6a0a7b3eb99a6119ac03f6f6688..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1581 zcmV+|2GaS7P)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00009a7bBm000W> z000W>0fLJSS^xk52XskIMF-vq8wm>rYpx<;000HdNkl<ZSi|ku+ix6q6~OWD+;(?n zXV>e!L~$D>qE#ZNA*!oHsR)V)5rIUG3{g>|TCwOGh>A-5B_I&IAOV4rg3=p-CQWeK z6sS@qO{hsqOKD=uu3cZ_cz5o<of#h1o?s2T_5+r9$UGmN-}(K{IiH7-zIl8guGi~q z+O&z;*;xSc`8?TdmS(ews;aDfxm=DYipb@11VMlh0yUe>a`DpTB<T1+Kf10XgrHij z5=9Z?<KqC7%Vkdg?xiI5<TFpBuAK1f&>*&LW11$GWmBuwSXx>l3`5H0GODUFJw460 zP7V@?fESk&$x##mVB0olUim%0_|<QSfgli+%VnmgXOLwDfQy$dbLxfDnE5;ailQKU zp2zWlel$%3;QP-%ha$^_VH4N&FijKNw#Z~M96odqfGCQ1>Kg+XhJkDt2EOkjNfO`t z?zgcl3n2uHi}whlD0xIp)5z&M#|Mr95|SjfuHgGV<#L(1xjB44Kvh*d&%^V4nj!#6 zqFSxuI1ZI^nTBQII1aKbw-RWYMzL6=tE&q|RS3g~o}SGViv?6o!_ajAeBTEk3_~p2 zCMHG*fh>ezX{nBBngEEVz%UH5*$jEZASNb`V-!W9P%u#xg)j_p9S=oOQ1kgbj^om3 zSj2Hmz22Z;nn;pFHk-w9TohTxaU7y3reNj)3BxdGHk-)v3k%4yjF!ouX&RMkh57k; zR8=L4BJzfg>$;RmB@{)$_kBz=PY|@OBrCFv>v=?B$j^R$iblObE|<e`T%ssK2!RlS zIEHGq!nq5>NV1IUdaVT6Y?fDEJBttkfZv{Z8Q1m5WHf{j$xi5cjvxN`r^y)q@%#l$ z(?r#Eqcv5k%Ja{ChdXyh@dKY+E(<`tUZ+?rq9_VOgD0p~t1K?wO9o1{Z5x0yFTa{B zNEAghn@!?4#xPn31VMnNY5d?vKS`>vEDLF9@I-7`Hl~@!Fbo=vMiLMNK~h0?cQ>|e z<GOCL^0TwEsIKc`+ZOq}!RYAdDi2mx7@*N;J+7*%i3hb>t>wYB8zaf72M_G;=)w7m zmy+22BZu#M@bzOy*X6-L|4{-F@WyhYRUQn#^=DrD!@0H|T)Q#C+1JmfJvew^f8xQj zLxXKS*!#reN&60c=|I|plg~W8rUwTPeDQ$?8|uMJuby4ggDY3Br#*P<?Y|@*To`_{ ztp}%Gcrh8{ciz34_F!o6L`M&f9sO#14~E~ooGeHu4}SUU)Bleij7>~2HZcXjuHNk( zJ$UbLe@`mhx2NyE2m7DgyDksDux~Gc2)MqSXq5*ew?5>ZcdxbeU~FQFD_7r3d$6l_ zd*VU=k;830*tX@Nq<y;|>rH#`wXb}6O%HbU?s(wAhI;V!U$3m`!6&2RX%BAw<D<lb z8zVQ{dT{Q-a5Bap-yThSaOCizjvhR@_lfo%jNJTyk((c|Z%<!G4_<%cPpdpoGZ~Ft zy*pAKgki|s++0#Y9LKDT{mRNuPEP)hJn%%s_~bMIl~SRj2cLd6n_OY*!<+AW@W{3; z>+;}pTelF1fXU@Vt2~&QU*z`KL|YF$5ivUcY1)HIsgQWEr*C5J9w69h!r9F83 z^E=n{pi(M6@L)qd_~$31YkFY0LE3})yY~_gre@~adT?XpRx-wQ+r>0Z<p1=bZ}(#q z^E!UuqbN$sgKb-S*weQgS(4Kp%*-t?Gq=Fjhc|ch;QISF(;iex#dUj7DHS%r16j*4 zzgS1sa_AYQqX&1FtmF#S?&5t9HrLAQ@}Q^ZAp#MwxSVK}2Mx#Pv)P5V9>`jbnfbeE z5A=+Zc(8NFqisD1121V`K9@;*u>Fy3YkHt()CV4Hs0R~MGi!PfNov{y$7}r;t5ho7 zYuIf)_~>7Ek}+<^Qrd$`semfQZ9S-!yV$wo(f{s2!**%h9;4db)zO0wKfayzK+mY_ f_CU`lt33EO3Yu{&gU?Qx00000NkvXXu0mjf@uvKl diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_darkness.png.mcmeta b/src/main/resources/assets/bloodutils/textures/blocks/area_darkness.png.mcmeta deleted file mode 100644 index 3ca39cc0..00000000 --- a/src/main/resources/assets/bloodutils/textures/blocks/area_darkness.png.mcmeta +++ /dev/null @@ -1,16 +0,0 @@ -{ - "animation": { - "frametime": 2, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 3, - 2, - 1, - 0 - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_earth.png b/src/main/resources/assets/bloodutils/textures/blocks/area_earth.png deleted file mode 100644 index 137ad65d3c88d4e77ba64d9e13773af3fad2bdbd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1492 zcmV;_1uOcAP)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00009a7bBm000W> z000W>0fLJSS^xk52XskIMF-vq8weu+-cm!!000GZNkl<ZSi|kqX>1gA7{~GNTzkw; zmv*}?VvO;K#CSyUPUKp_iyl;?0;NTi7b+ex#5cxBcxNyY6R#H%4&@40DGHXJKqQDo z!YdU+l!O;j3y9s_+1Z)@?u;+C%-Srw<%J}?U|#?8d!GONpXVbz_e`^wOeU$XuV;98 z7=TD5LNFL4m&>85Di^;{D1_^}ghC-4$3X~z8Vm;MzxPPt#P!g8au(rm7$F4lcpTSt zIeq#x0I^t%tvBrP0~h?+jC!#``|z`vrioE)kWQP_)zvXFGD1F|Cl-sLswzW6L$qnn z;s}Rrqd~Ikx&WA_Nyp9Id|kH_4{#hoEEZ#E=r3eh0igfhBW#@5ff0!SpePD*Hk+mS z<SaBz1K=&O1Vxs~=W|$A7Q-+w%`|~PfX9wM0)XqfwEX@Ax~?PZx{htzNRq@->qXM( zG(re2T=<8)>-s-Y(=<ZiFwG}t0}_%X6|P|0HnCWYvuDp@+YYL#lFeqxW^Ho90ZAer zkCVw{sEx%)rPE|G8Dv>51ZbK@G#X{Xgb66BLO$;@Y0`B>qgAMyh8_+BVB0nT`Fx(V zY2x7_gg_QTFfx+FFbn`hPN3^L!C-)huH)h1c^-<QP*r81C<^&}9xIbYQ54ijBtj-* zkxHfUJdb2DMU`P7NfN<ekW9uxk!3QO46f@@Wkdi8UDwIwa>(b-pGTHuv_Jq&)2NNt za_-zYR8_@wT_SoI%d)7hu0~N5Y}>{#A~;UrO0pu$SlKLYKF`{kt)!AELZJ|ujD_pE z2q6$c;CT>_*V290AtYJGva*GMU@*w;TYC^f0I>bWy;xS3KtMwX;qOE^9OBc!T7QhY z?l_2H7^vZ}UYIIX<@M}h{`lh*cF-mi3IdQ!CW%I)D2hVsnYqN{aV|*z_yeVyrU`NA zxT&kKAl1#du1hYL!}C0Jy->h$95hYi6KxID7rIEN(@5>D^SpH0#4sZ0x=t#U^4oMA z$M2w~rUuhAu`J79`QhPVRLin3%`}mS&Z$$U#&~dXg#l8j!p~Jz)%T#TuCCz0Kw_{^ z@=j<POjPt>+uh&!9nSx`vFJhDZ!MSQ!NL<QIKpB3XwVoBcHP&@hRM6idN7a}WYg`P zr5-d5CVUUx9Db>+2Z@1){O6nd)9g|YUi-6sTo0NCAG_wk74=}<E!)TSpl90QQV+g) zpwIVU$30zTJ@{<mdVh@fJ^FpA2TRW^s_4OjUz*Bz0PLF5U09I68!LM7Y5lsZ(u0<x ze$}SlnUy`5+Ew)6aKnE*7@T`~9{f1B;K69nSPv3?Y<RG<yaz2u+4S)4OL)*bv*^Le z#pONN^<dG1{#lps;McbCJ?Kqb^We&QFlER19yI=N2@huV7d@E1ue=A7zbbk#=g=iQ zIMH6&gC80zcrdeP)Psh~9^6(`=_>MI|J%p>s*S6sSM*?eTep99-sY!^9xU9}bXgv> zZf(L54m(DJ#(2>A(f}Ku|E8=5``<ps=6T<ideFFfy6?doy^G3vF!SU4{pV|5lPLAz z)vnfYJ!o7#<C+Io)PwcUbd2jk?;AgsdhqR%{k{h~7xk3&;PWRo_+#9?^l+&MukBk{ z(S!M0=9KrKb8(-)AeB7$?D4O!Mh_0GI__6(SU$C)2Rq*F_0PVr^2wqHt*aU?%Yy|U zHQ)$`ouffxJlMVb0GpQWDeJ+3Rma)#&fZcF8kSG>J$QX>TUifgESus#U(<>ir5?QU z<@|9yXjne&ng>_ZgRkD|9M^-sl}AfG*t6oG??K0VePuoPV#y|djC(#fQtH90s~1%C uVBUvMmG@xx`vd-hRPx~SmpA^u9{dX>GGj|&9&c*^0000<MNUMnLSTa9ndQ|0 diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_earth.png.mcmeta b/src/main/resources/assets/bloodutils/textures/blocks/area_earth.png.mcmeta deleted file mode 100644 index 3ca39cc0..00000000 --- a/src/main/resources/assets/bloodutils/textures/blocks/area_earth.png.mcmeta +++ /dev/null @@ -1,16 +0,0 @@ -{ - "animation": { - "frametime": 2, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 3, - 2, - 1, - 0 - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_fire.png b/src/main/resources/assets/bloodutils/textures/blocks/area_fire.png deleted file mode 100644 index 230033d44e300de17c7c7bb2e20c846379a43c44..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1274 zcmV<W1O@wvP)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00009a7bBm000W> z000W>0fLJSS^xk52XskIMF-vq8we~eg&b1J000D;Nkl<ZSi|kq&ubiY7{~GV{My-_ znQYU|Zm_6O5fOiuf_f0aD2RvFXrQz<ZKVg%+KML+p%;}FdlI2F;z^0WK+>d*2TR4( zcv1+0Cq*d@^wKp+ZL>SSzdJJ?cDsx)&hEiL5BdH9&-e2@JkLwoGcletn@vVXM_E}} z0l+j(bX}+2ZlkIyH(#+>B#vW>#Uf!CB7{KIb)6mcMF6$|m&SKdDwPmIP_0&p<CrT~ zt^iP}RJi@Cv%P{>_wPl$`NQg=NgT&v*s`!~hgz-1`uaLi6j7;EP*s&iqk(pCl2C-) z(Jds$aSVXtIBcI^p!(?-BtRGnDwPV2#$U*?0>F;?BBP&wiDjAqD2jsY`#zV(ccEz- z0PQ!9p~x~()W-9CEX%@iYzl<}zdk(%Kpe+heqkKLFpv$yAP52^Ny0z+Dz<GSgy8!1 z8$@y38=|IZ6iX#8jqe5|BuVPD5Cj30N`=+cRe~TyRaJc7$M*x;A_PgITCL)`E+dr+ zE!)O*U1VAA6wow{a=FZwEn84jg(!;Iw(T~`<sno}!zh&i2!a5BD2lKhhlB(n1hNo< z_4Ou}WdR`C0>d!S^#Z10kdTlh35udHG-RPD3Q-i{xju@bpqi$M>w2_WHc67uY_=G( zEF?)n*L7UiLy=`%*Cmb<hAb11FbsosyN$ed?HaNyqZJBhn#M?VgtfIbR8=L8V@#uj z=Xned52GjwK@ebBCSllVNmgVT&-aO=h~bZCXf<0Di$z@5BaUN)5C|bi5~x;3c;Mo9 zNV1IQ`JDo~u5<VKuMt83aOdnCp6632Xb2&CH&H4T(awC>TjTpKT*R_0)KbalY?Z1K z96Q40%gYqPfMQVxpxJCvE|*ahg~sGQs?{p;^&7o~QXR)(1lT@z4uIkPdx_(icDqfI zBp62LgD?!yG!6CiG_`ID+qRJoP3}u<+rhF-48x$+YV~4<Vc1Ksb?a6f$HDWw-pQ}5 zte|?HhvV3oror;^^1nQ|dBOm#R%f`Xs`fmn)oL9N#=0Kd4=nZZ;K7s!zok9+b3hON z=z8!_mIpiM7q}<KgR%M|_hxypl=5IT$AceI9{iH!!PNmgSlaYpgFU!w01uwX^5Bt_ z2M_0XFq-n<@hlG-eLVR6zdQig+4bP>J|5I=O%D!tJph>P<H7Ef2j8SU_;x@KE_OY5 zF3W?7`30WI@!)WMk!Q0!m`!=Gl;goCDG%ndJosq<4`w$#*kBKy8o+~tSsv_3c`%;i z!DA^8CbK;FxsL}I@;sOr(1S-$Pxn&XLLMAVc`(z*gS{ya&Za#$KcENax*qJy^5DSy z0?+4oaJ0V2M3x6LDGz?k@nAaT!Dm?>)CcfjX48WW_F&fl9=wv}!AmI*Ud-`eEakz= zSsr}f$Ah^%4-O3I!IQV92WL_qO!e{Lt&|5R(jJ@|(1Ulo9=x69!O8grrgA(uQ(xqG zmIqTQ4?fEA;PsRT$Fn^6U;q!MHa*y258fQWgZHyMIF<6?og5EdOL_2KmIu>)JUE%> k!O5-%C;E7B<p1{IA5TJKHqY%!761SM07*qoM6N<$g30hv2mk;8 diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_fire.png.mcmeta b/src/main/resources/assets/bloodutils/textures/blocks/area_fire.png.mcmeta deleted file mode 100644 index 3ca39cc0..00000000 --- a/src/main/resources/assets/bloodutils/textures/blocks/area_fire.png.mcmeta +++ /dev/null @@ -1,16 +0,0 @@ -{ - "animation": { - "frametime": 2, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 3, - 2, - 1, - 0 - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_light.png b/src/main/resources/assets/bloodutils/textures/blocks/area_light.png deleted file mode 100644 index d8650ad5341df7e37b2647e5d98f31654783fbbf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1495 zcmV;|1t|K7P)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00009a7bBm000W> z000W>0fLJSS^xk52XskIMF-vq8wfi!3i=<j000GcNkl<ZSi|kqTW?fV6u|NSxy|Lw zX(`hw(Ql#A=!=O4!p&fzPz4Gt6y(-YE^?_<5JD|tluMxjv{F!zOR-Rt`^`6vL=ry% zBs|qpz|PE>GjsOLIX<*((oAN`gCsn#pI6q}d#|;AN_ADGACJcwH*OsL{rvz$A`ybY zAlYmdUDtVXLZJ|z=Mf5pa9tN61bQ$S<npzfGN`($l5jYT5Q11NhUa<QzkeTqXf(>P z6Q^bDg86gNpHx`9uom04DJv@@nY5{>s9<n#kX$ZDG#W+Mb^7}HShS!PSGXJ>PNaIC z2Y_wcoH}!s?~nY554f%%8jaG|_YbP70dV=+O}c(Kh82kbplKRvI-RDvsuII609e0v z6`HD&%Vlw#G?ryy+erd}08=JT0KoG+KAKg9X_}~}X_CogP!xqVO${WINrVtQe*7;v z&y$~M7zUwmnChzOfP$hZLr=(LGDM?M9z1wJCgY;(I_Y$pbUH&;xS%M+Vlh&w6y?z< ziDZ&gDut@5LkSGSptQ7<F=NJ{=^DA5$E&ZtLTPCUx?y03!vJJ5831y*97)^8$43Z( zDuiHgFpgze0En!>G);oR01?x~$H(`5G)<$V#6r_Fa=9E%DvhRT=#fZ-RLUWdNaFiG z@pys~%R*5Ug25oEl!K<Kq*5t7&!@zS01BpQlFepO2Od5|RaJ~Y0K+gSkCihpFo3S> zc%DbZ4C6QsWo2b(nnos*!LlN_?$DD|O;vHyX}nyHL!DhD;t4{b5UG@d=XnSr5JKSl z5Q~-b>!qtGs*2;JhY|#XLC*A?LkI!DPp7(ZoHT)efe=FOL^vE`*WUedjL%=Vgk@Ri z;jlS0Rl3gFRgK)edyhacKqwRhARdoXT3U*xX)LU*Ar_0FDykeP-L`E2PIdn*7sT^C zve_)Y?_-)n1zgv~Fbuxgvrpb4nM|V8*39;kNgK<GV45b0L_!9*t}AaacI;Se+s1Jm zx$^z}{pgP4VB1L|5tDoO?v3!^$qEA`5<{P>>$>!yqM~BRgZ7StvT957`l23e+14s! z+qQ3g>cLk#TA#^-oo%hS!sYYfL?b-d-nNsCn>H8ppuOWDpMJI_--DLs_0ogy4t5mu zU{&J^*}l!2n)5w4uz&BU9<(%Xc<I4&_282YpN{ImuD$#7J!t##E9t@3?Ozo1U|B<x z9OJKd@6Gq%U`KmV4|cR}E9}AcFLuZUDdxe_6)Rsv51L!H$f_OfyNi0Tc<Blmd*u6X zpL%fY=;3Gb;Kw6}afQpr!-+<Cu)J{<^A{{C=s|PK7V7F3=X=o6zFT^5;r!Wx9_(yu zmF+vQzdhfB-k$DJJ?LoP^U{Oo>cO0Ob)$N)ZsVqW4;q_ROAnSTZz$-&2Qy~LF<!fV zW4;IH&z>pj!O_Ft74~3x!%Ddz#XOiceddek!MwV9S+%#PyQl|~-~T|yUcYkjsRzH^ zxcW>U+`4`hSGY_WPBg-UY13!&-h@d7J(yQl&-jUx^F8S8>6RY+edl&T503wEM7Hmj zb3OSU{PpMWqk7QWbLOQ7&((u>-W@-x2eWHx^F5eeHA{Lhby{UX4_<%sZ8^pt&Z)`w z;Lhzoih6M4>ZQUSOskv$z@tZxihA(c8*jac9yG04C#!aK9xCd=-1!S+?CBH7o_f&J zee#(+`1$lnT;WnPoM?mxb@d-J^TRm>J!o39j_TQS^F8S5JS081b^S^~5BBZZCEIuO zaA&>;*DhZe)q}3iZ(n-wTs^3)svgyY6)RWgdr-f4iS%Gz-NJ$%OqeuPj`6aFmH8fA xzjCpt2i+%+7xtiT;Uc*p#XJ~4amxSe!G8<APU@lV%`X4|002ovPDHLkV1oZY;rsvq diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_light.png.mcmeta b/src/main/resources/assets/bloodutils/textures/blocks/area_light.png.mcmeta deleted file mode 100644 index 3ca39cc0..00000000 --- a/src/main/resources/assets/bloodutils/textures/blocks/area_light.png.mcmeta +++ /dev/null @@ -1,16 +0,0 @@ -{ - "animation": { - "frametime": 2, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 3, - 2, - 1, - 0 - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_rainbow.png b/src/main/resources/assets/bloodutils/textures/blocks/area_rainbow.png deleted file mode 100644 index bc3382dd1f306e4ec7cbc29f657d411957d538b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1608 zcmV-O2DkZ%P)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00009a7bBm000W> z000W>0fLJSS^xk52XskIMF-vq8wmsyACFJw000H&Nkl<ZSi|kuTZ|R;9l-JL+|FfY z_Hg#>SrA@GW7CH=r3vku!mc$bE39lpDi&O&(MB4L#NHDU5^U2%Vr$!If+iZMU=^W& zpj?-w)z-EuNz*n~6WErN=5%+-a?Y7KbNQc{>BAi6K+o+3l0Goc|NQ>9-|v&(f26hd ztd1&`3iIdBXL@=X0K+gyr_<EybyQX5%9qJx2*Z#}CWG($2q93@=`_brm4FfeYsPLR zo6RDGpja#th9MU&TmYa@D6r?Xza|04*Dpc6GQ-y&T#9Ym<ntz$WivQ9NV!}l2m%U) z0;;M~DwWtcz7${hyxIsPhhYeSZQJbK|1mG``j80leL<m6pj7$~vaA4b{8WjZubjm+ z3;+~GL3Ul2HDkA;X&M0E+I%O9EE5EE9LL2pO>EmDl}hoIJ8uCX3`5r5^BHtqN7i*6 z&-0KZi6<T#!m=!c5X{Y8CJ4ji5H(FBlg+Yb?9+gRBuViWJkO(0C@?cKgXj6Es*3Bn zxUNTC_#jCXi$!X+8Uuv_Rm-AQt0BvB96-}Fa=9Gy=FLM<6@nmS;lf+U<@!)H4LzF$ z!1Fu+f*`=MZ6YFs5XeFZ%H;~CX#ybX0$tZhr&AcZPDDf$MJS3wU!RGhC<H-(Q*%)i z1=TPNYBh&y)gp=_DwQgIrimm;q|<3?H3vnOsnu$PVML#401~>cQ?J*NXD?ksmSwb5 z3Qf}(C=M_?JBzBSgkgxGXK@^dd_Iq&D0rTSX&U%`yd_zYWgOQf3<6$!>5o(^RWg|j zwVFd1h6o`LLJ&nzEDrG2v40`SGLGZM0n+I-`wx7A5CVW-?fn~$<C02g2qBW1$YwJ< z`-{^_8Xtc9pO~hJn$7BQR;enRA0OuY`6*Iqk4z>FK&4V4m&>6j3J-4h0>xqxS-PAg zlxo{H0DJd+1boE!`Xz*6NWESsiXwD9p1}8gG)?2DKc7feVObW^`1*B`W!adffv)RR ztJP$H@B7IL`uqE_Z5zjNl9HdEo<?;X2ivwV44tW|scSsAQo;b$YJ9k=swN%`4i3g1 ze6Z+jJmn%7DlhBm!Lif{@Z;etrIDrws~N?%ZOk4X+`VuVU-%qPooMx7!kFYxbhx7j zA1pe{Vd+S#2Sep$i3bn$k9YLoix-zB*LO#CxYdIVeP8S8!BBbmO%HCU2m8f=o*w*R z{-0VsIMa6~@!&+}WJeEvd3kqIXumJMca;ZW?7;)M^_)LHh1bD@Rl!{pi$&(<{?~&n zOz0C(ftC4@t{&`~d*vDr)Kp4isJy)CfnQDTduC=PSwR#<xUS2Pvn(n3i_;gclLrgl zk3CobSi{{tP>!C!X>37S)$kw$l(E=@yxHA@g{xx^)T3=Y$efy_ez3C#3*J9V_+}dq ztl_2y#f_akD1E8vLG8<JJjg%L+XHL(rUy6H19x9<4+h?A<AHIy>4A2<vj>-UH9hG6 z-BlilMt{&h9($1T+k3!h(}Un@4^lwp<OFj-epPo5W_Pynz#3lO(jRp4z!|>EgNxV8 zgV}c{nQbg<@ru!|9{l~_8_5<vyJlUpKUi|#hPXd4^Ibjo{8u;N3!jf0fv)l3+*=3v z^Xt1idNBL$B!78hPpb!uSBxee3_bdIM-K*WyCd=7Q+JKEdT`srn|gY%c*Wf}J-DGB ze7I+4PY+6GPPTgRkE4eY4?cNwUq=sq`{MIS8vpzBvDWv(?T>sj?hpJ_TMs^W@BIxA z<kt7Xxg)>kT%$m`dGMPTp8J1%FKmD3sbtn|BTskr;Clz2NX9;M?{iHLeztB$qd(~G z!L#@6z!yH>Zv?u=gDpqC&F0r0?dZYwcb?+Oy_;G+*f#QX;=!&>uXps|ySHymuJ4B{ zpK0~rrAPMk^kCb__M0BuP!As4{cukYemuFg)q|~Xe<$(a2ZuIy^kCx)_a|xmqlqo8 z9=!aGR~!97dk=oH_WAh#K|2q&9DXt>kZvA4v}4`%_29n@GivAddZk_f0000<MNUMn GLSTZd_X5-a diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_rainbow.png.mcmeta b/src/main/resources/assets/bloodutils/textures/blocks/area_rainbow.png.mcmeta deleted file mode 100644 index 3ca39cc0..00000000 --- a/src/main/resources/assets/bloodutils/textures/blocks/area_rainbow.png.mcmeta +++ /dev/null @@ -1,16 +0,0 @@ -{ - "animation": { - "frametime": 2, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 3, - 2, - 1, - 0 - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_water.png b/src/main/resources/assets/bloodutils/textures/blocks/area_water.png deleted file mode 100644 index 1b60e8c9a29b9862820acf60f9cdb6249c14f6b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1295 zcmV+q1@QWbP)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00009a7bBm000W> z000W>0fLJSS^xk52XskIMF-vq8wfT9nT=6W000E8Nkl<ZSi|kuO=uit7{KxWeC_Of zWSeYun?^*iMSJt01u3G4AmX9HpdgkMy$OmDD_#UEJyb#jD-{omV2Fqx1dE6$7FxWv z=uuD$Ne!vSZQ3Ne^RYAU&WwkhE~89m_h6uhyyu7ai|6_Aysz}k^i<Mnwb;9NFU@8X z0L!w_b)9avi>j*J9OZJEIF2co%Y<Qw5CT=#b<Uk{^n<3Sj$;@GLI`TL8gU%6y1EKL zwOZw~FHiMjXP$ct_2vpM96O2Yy4dz8j^k3V*V*3QCW<1e)hep0vcA5~^D`$2Mabvr zL~<O*0JyHp(%E?yJ~=@GgrT5Xt+KxUH?ph%aPEAA#ZTYHwk!Y?MM3U#I!sR;N7FO_ zUYk9GBFjWk7vJw-+cvK2P%4#p{IM4Sh~t>2pLzq+G?7iyBnSc|N#d24-otSmgb-|Q zZV|<C{}MG#qih&VPrVLENRre$LJ$O0t5vRDyG9U%sH#e*)1lJ|=!y^|iCV3O=Xs1* ztF#>l&-0LFxi^8PX;dl|_Uze%qAEmD%;e-gDwPpbO~W({0D>R@Ac`U!*CioA2!Skw zV0*iTZQB5duD~=+biIUSnj|D7NrIv%jEvYQib51c_+AG^QBW<*!t;FEZHFXDXtmmm z*fx?Rq3b%H=cC9np63zA2_v=zNSLNcx7$VDxPBd3meEQjG)-f?HqOSz2CAwO$1#>^ z;QKzKqoXK_LJ$PlwnZ5BjwCCxjNj=HM-d-={3h*In{v5~=lR5Oj1U4L1W5w5+Bo0+ z@F9{c<NKZ71iG$s_Um^MLICi^(mVKmhf+yH2+^+z!zlCq2e0<i_}lN#VB0pTVVJ$F zQdMSOKF#v-3PD(+T-E_-wOUjv6%<9`*wGWzYBe@D<$gk`uImD@^wnIyK;k&2+wGDh z38vXwAPhq^P2=>L+5RpZ$3Z%F^x4F5Tx{FIG)>y=c0V8t!~PD&#>Q}67vJ~$CEsi| zQGMUXbsa3rWMyULUmn~nVSskKce$#n_C2WA>!}A$1Dw=@i2)v5$#}3o>%qN4dT>wb z!IeA@uFkXYTY(2ogT>2v9!z9Bc(A|&E91dro(B&M;laeN2RrP+FGF~+mFK}<84p$q zJh+tc;6|PYhX#0XpvZ%@IauozNTCN8Z%+@52DAYKrsV-1xTjz{^<X6H!Pt-<Or{>V zc^-uGEZivYz-X|zmFIz+@nC;}2VTYlHP3^)hVVe%^<alRXb$0lmghk?<AGn`!Aiyh zCF_BgdT{3e4=P0-1at5Q%#053VEOj+;9&Y*7=!7x0UnH}{eccMn^_OqsRyG2JkU}P z#`8SbH_w7y;K9KLi<LYN)-oQb1s?pG@!-!q4;aFOwOtQ(*n{#A9vsN?;Es$3^#Tu~ zj0bn;^#@Ywfqn}Qwo(tI|9W7-(!?AjLwL}gg^}COgCm*$g9`&ZIGlMeT+Dj#^N=3= zlzMPD&x1$iS-8KzgCh+V59N7qA>+Yvfd}7YJoqusgWren;KHs4JM6)ILwN9Ho(GR+ zJb0+Ug98~4p2+jy@&FGm-O2-C>EZPM;Kl$C_W#fQ!9Q#&Vs01fSc(7u002ovPDHLk FV1l}jWA6X} diff --git a/src/main/resources/assets/bloodutils/textures/blocks/area_water.png.mcmeta b/src/main/resources/assets/bloodutils/textures/blocks/area_water.png.mcmeta deleted file mode 100644 index 3ca39cc0..00000000 --- a/src/main/resources/assets/bloodutils/textures/blocks/area_water.png.mcmeta +++ /dev/null @@ -1,16 +0,0 @@ -{ - "animation": { - "frametime": 2, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 3, - 2, - 1, - 0 - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/blocks/block_bloodDiamond.png b/src/main/resources/assets/bloodutils/textures/blocks/block_bloodDiamond.png deleted file mode 100644 index 0ad1e5313baeb92dceb50abf9c2c768136bc31f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 281 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#9;Y;yrApwB&b2_H9iA?ZAr_~XPIlxwq#)pGpBgkt?bwEwZsKtVv@7Gk%N=ly zm3H3MaN$Dhr9};zZ`V}T|NA3(V`;9enF!+nM~*iZ$LD=k`myRt^n*Jlt`9Cp?P+6V z2w1yOx3fSfNp7LBT2;xK*D23a*ccM-&QUdNJ2%6_Md&H3&5kX5UV9jo6kWI4yK8~q z(+BmbbDMwVBno|4skc?X^TUN*HNACZ@3-Az66gGLXw?&;;t$~+E3<uaHCoggqwlZ( bcTV}qq;OmF%S(!Yeqiu)^>bP0l+XkKPF8RY diff --git a/src/main/resources/assets/bloodutils/textures/blocks/block_bloodIron.png b/src/main/resources/assets/bloodutils/textures/blocks/block_bloodIron.png deleted file mode 100644 index 1ad95d99f1521990d382fb59da087ed5b4e440ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 194 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4q_)-xzH&6Cpyif|Tq zL>4nJa0`PlBg3pY5<o%r5>H=O_IsRCe7aUvZ`LRQh5S8T978NlCx1yy`0>Ayk%>j( z19Q%+2nir~BYA>ZJdy2Bf`a^pnuLUe3a4ey_<4AEbeMpIR*KYz(ktAH;~c&<@hpw2 haOxCKP@BljV4orR@9+AMy+ETGJYD@<);T3K0RSU%HCF%t diff --git a/src/main/resources/assets/bloodutils/textures/blocks/builder.png b/src/main/resources/assets/bloodutils/textures/blocks/builder.png deleted file mode 100644 index 4c5c6192f3b7c43e31478369d95764a0b01bc70f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 821 zcmV-51Iqk~P)<h;3K|Lk000e1NJLTq000mG000mO0ssI2kdbIM00009a7bBm000XU z000XU0RWnu7ytkO2XskIMF-vq4GJVRu~y9h0000TX;fHrLvL+uWo~o;00000Lvm$d zbY)~9cWHEJAV*0}P-HG;2LJ#9t4TybR4C6qP~U45X8@e<*WR~#W#KOC#l4)>n#Kl` zORuIzV;d9FV8v9$DnedF{Ih%z@xhiB3vJU<;%TTMZ6eg5Nl;oefgWDai)=1<x4Yl> z?fJ0aJPpGz%nZ47;as!XEEEdo?l0dMI$+x$WHK48HRl`v04ZgXBvQ&aj+Ih0lgXqi zfNM`SZQC}+c%J9FZV&`P5X5mD$MNe%Lu*Y4p=pxVI?Yo`_Y`xJzub$$H~wC?P$=}y zE%a3vXO>ozqyvB_Ns`TG&&(~Z#vy<Xpkf7Jy80Nv?9}M`_=qJ0s*AQQwbnEY!<pr^ zy3u7zmMzIBZH0J`{lCxeHg|;(0D@r0aUAYA&do|+E|)t$|FCA%#f5)rMuCajBZGus zW_itf@}IxHQD>YG0)R$Ql+Wi!s()3#nJh7p7W?(9;~>QIJOB-&uMd2*G&xEs1;9S5 z47sk0wP&Nx|F0XJp=4?Nn6xD&#InR=zpHillYs{h$7`?FKin&X;7X~To#uok>qh&G zFI+tR#SgOv9R>oxptEuLY}t|k+O063%h7B$dwza7b$@?+Xzb1(KI0`Oe8yAKXl#FX zY_Mk3l}Ast*1WO3ox1N%PjnHIo|7)|7ze-@i=t@d)Y#u)=mL~c`sbI!cgBW0z;1IF zz;9EP@aoyJCFe&6ea1bn%XM8sX}cW)V3kkHTInQ7iba2F_I}N%&o^K9tiGrleWLyb zK(Ml^D}&k?N=ZJSr?%}Vr5We`tsm<~mzYQ^`HcT`a`?fwUzaV}|MMIrln|OE2|LvH zvE$gKQct75_jz&8)BVN%&6f#qcj71j&iTIw_Z@jr+w4Cm1dpPK9jOexecMthrj$le z1mM|$o{ds>5ClR9DP_CeUg^%aS}jWH*4EZLZ}2f?&3EFd00000NkvXXu0mjf??!w} diff --git a/src/main/resources/assets/bloodutils/textures/blocks/discoball.png b/src/main/resources/assets/bloodutils/textures/blocks/discoball.png deleted file mode 100644 index 576c0289a37ceef075de8cd8dbf6dd583904bdb9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 244 zcmeAS@N?(olHy`uVBq!ia0vp^0zllr!2~3Gzt@!lDb50q$YKTtZeb8+WSBKa0w~B{ z;_2(kevea{M}zBD)$Id7A=%83h!W@g+}zZ>5+Ij>!MP|ku_QG`p**uBL&4qCHy}kX zl^rOa<>}%W5^?zLwS~M51|qH(oj8OVRSqiNXqDV>=Ae?!VU~!ngCdRx!zayo-oNvt zfAkTHwmDN3iy1!12W%-`EX1&+I^tKHDnmtB?BSI_-uH(q%BM0Y+&#RlOpDRsm%gtS h<ALvXE>jsE+~qC!#1-@@jnx<A98Xt2mvv4FO#t*nPi+7I diff --git a/src/main/resources/assets/bloodutils/textures/blocks/discoball.png.mcmeta b/src/main/resources/assets/bloodutils/textures/blocks/discoball.png.mcmeta deleted file mode 100644 index df255549..00000000 --- a/src/main/resources/assets/bloodutils/textures/blocks/discoball.png.mcmeta +++ /dev/null @@ -1,22 +0,0 @@ -{ - "animation": { - "frametime": 4, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 6, - 5, - 4, - 3, - 2, - 1, - 0 - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/blocks/essence_darkness.png b/src/main/resources/assets/bloodutils/textures/blocks/essence_darkness.png deleted file mode 100644 index 8af84933c61b14fa1987c482f404622ce3e187cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#9;Y-9i`EU*3Cn;&vY8<fCC>S|xv6<2KrRD=b5UwyNotBhd1gt5g1e`0K#E=} zJ4m6Yi(`nz>0}X6(b}U9j0s5#1bU<lvJR|ZY(C1s@O>MjXZV>KN014gu6{1-oD!M< Dai%Fu diff --git a/src/main/resources/assets/bloodutils/textures/blocks/essence_light.png b/src/main/resources/assets/bloodutils/textures/blocks/essence_light.png deleted file mode 100644 index df123cf2e502ff87f8f9f8b88e179f5d326af838..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 168 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#9;Y-9s|4rE59vT5+02lL66gHf+|;}hAeVu`xhOTUBsE2$JhLQ2!QIn0AVn{g z9Vjm6>Eak-aXNWV{r`X3Y+MY&%&iGm8UmT!cqMdz_D(EdUcP7krQ0AQJYD@<);T3K F0RXDZDZKyy diff --git a/src/main/resources/assets/bloodutils/textures/blocks/essence_rainbow.png b/src/main/resources/assets/bloodutils/textures/blocks/essence_rainbow.png deleted file mode 100644 index 07f0ee69be9f3c22ea51376150455f3030bcf715..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 188 zcmeAS@N?(olHy`uVBq!ia0vp^0ze$V!3JWj{>lraI14-?iy0WWUV|`WQ#WrEP>{XE z)7O>#9;Y;q5Nm#pga%M3+SA1`B;xSf8w&*+3`AHi{`Fz&b~x@DAUa7%vw>?vCW9lV z;ld7yBXNxWYxcaTwU)eb<N*r{%Ri<irS&};3JMGY?&sDEva+x=T=9wp3mmbH|Hsb6 c#Ka)~>>t<WLuDuGfYva0y85}Sb4q9e05jt@6aWAK diff --git a/src/main/resources/assets/bloodutils/textures/blocks/essence_rainbow.png.mcmeta b/src/main/resources/assets/bloodutils/textures/blocks/essence_rainbow.png.mcmeta deleted file mode 100644 index 4275d180..00000000 --- a/src/main/resources/assets/bloodutils/textures/blocks/essence_rainbow.png.mcmeta +++ /dev/null @@ -1,16 +0,0 @@ -{ - "animation": { - "frametime": 8, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 3, - 2, - 1, - 0 - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/blocks/progress.png b/src/main/resources/assets/bloodutils/textures/blocks/progress.png deleted file mode 100644 index ccf8b1f49a4ced8108e5cbd02bfd7e996641526b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 799 zcmV+)1K|9LP)<h;3K|Lk000e1NJLTq000mG000mO0ssI2kdbIM00009a7bBm000XU z000XU0RWnu7ytkO2XskIMF-vq4GJ0rp-t9D0000TX;fHrLvL+uWo~o;00000Lvm$d zbY)~9cWHEJAV*0}P-HG;2LJ#9l}SWFR4C6SlHE^KM;M2HGw+-^AG=E`3xbPiSlM8L zsVHR?77;&Us5kzpO?uNb7;Iq$Rslg%Z5m?I3oQyqBkUe`&&)g1i@kiVp5)0RR+18c zfuA3RTC;P`xh%^D*S7$Cxw{aBp)p2CDTL_!{uF>%NlK<ZtCgZ4uzxlIxcR!ZmWY&6 zzPSY;et0hkf-s7XfB9A1UtBB}3boc=%KZM?R1`&(odW=6qLlfhQ4hngw6;+u`ugOt z6oRfyOgQK0!+#&=W^@z<L0~5*aJBZiGLjCRBPoTHG<~)A&*ABX5mHK$l%los@62>u zC}^#xws#?fb&iOLXn1SKT5F7HKUnIluCcYU*Xsc&4GajN_WVW4oMoB!-g_U0A%Lmv z-8|2&wE()^E?ucs-Pnccm-|N}Lm!6+vr8AT*@|nE?RJ|tHnYa9Z<oidG390}z4;>% z$??5608(a?=hoUzrxV^=I=A}AXlqY4ZU;*Bx?SgenTV||H(L^bV=fa(B4!3)jVVZZ z#3swK+!zP}0D$uzfIME9>$3ooLP06T&8@%dH|*Ta=+*1f)6+c9i6~_bl=`|fPh*uz zw0H2WaVyXBv7Lh-j*iXpB7}hVxODOI{$JJOFP+J%uT{;)W-?WizOQqRnLp3}R3-|; zkccFaQmRaJ*r>-zVx0qEnCblRu&<0>KX`jIdR}Y&VQ5fm9Rz{%UTd9>SBk}=Bnp3f z`f28x)>=V`+?bU4#_M;7jk@=~KSIh3;M2mK{QiC5S+gHQ5s8(g)SI0VLL^CI*PjEh z_1QQ{NJ>eRt*!xxA1t4>+udHTxc^4<_twjI;y6A#J7Z=k<;eCf0RQB%A`(J4?@vxn d@@MM+{s(mmIgJIGLze&m002ovPDHLkV1g5{YS91y diff --git a/src/main/resources/assets/bloodutils/textures/gui/altar.png b/src/main/resources/assets/bloodutils/textures/gui/altar.png deleted file mode 100644 index d287d05d6f6b1609d2c0fca7fc5c9e1465485b22..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3371 zcmd^>c{E$w8o)!*Hj4I^_7*oa6*ZJ+t|FA0V<?Im(g{Ulo`)O5LY2_QR8)+OCM2O| zHP$lbs(Gp*G*k&SRD=q7$N%q-_x^tS?6dY+d+q%V`}=+0*~wNGMm%6aFbD+VF)=o{ z4+60PpKPFWT)^NQ@WCAzxSp698Gu-)Pf=@m1~7Bp&)6{#1mf*Hec2k{cy9ueXM;>& z_s%Yy7vR=VsWquf1%WO!ni%NWhJD?fpY_cQhV<?X1-`wRz1C@glg{FB8pZx=;kAS4 zxUO6Ltl!HdgKzR9++8qOYUC1U{zd}qX(}?N->2ol*mH^3MLQQKz3@1<*=w5MguC@u z*7uf!+%a9Q|0s9;qbScg@ObIi^xWD~?rM1A>d|pDGU-tC)Q$hpVj@vHA`5$My^v1| zTeM$hIbkLK`Wt8IJwkZA&!MXO=vw6WVE0i^jQgBoMgvHM?Z54f_A@P<74~b&4E0~P znRV0pz{W~{MN(Y5;i}r?kBG@}K&Mm2(Ghd>M*OfC+uWEBR=~BQAaVdsb^UtjWkK?v zXF$5_|3mi+trj2tOY>(0$)EJ1tTPe9mwn_z!`hTv5Y`zHk&&dC6EEsw(SlC!I<ZYE z`cB9JYjdOJ`_WcA>jY2q?oInkYodtV0oB<#f+q2Cv4xRb>^(frTFQI?P2$;qY;Mw1 z;y32oLM2RCe;*-&Uo6N?`Den)SKMoMwG|kKGxg?Vv}c}@xeaEEysg#GaC6B1$I2MJ zteG}vZkQ-RVXQP0fh7Xq{*Q9~!Kd4z+P8aEV2<_jT`Kh1z1n&P-2{EIzYjG<cX;7J zG9W9qxtP*Cg~6AY9PVknOn9QGLVng(vr?SygNw`=b4f<@SZ40vfaUw;NK6zZhgtMe z@j|~Mxc{?yzz*%GZBC^6E%xSYy&Zj6|D(RBXGHVz*ED=$Ie)|887OxZkz~1vK%mPC zj*ov2Etg&Bdc76C>uldf8(>6VOB4;qENdt^+h;%St4GY#%ggfLmln=;n?-vL*i|7L zx6Ck7rP4RUFj5L|JBRG3u}rD{U>DRo?Fv8~x@^B*jleC#7Q<0x2%P+JJ1;Ns;0|WB zf6(2{7;I<P&zrO&l=yL`QfaOBW14uEN?@{BepXGbgj7K`Rb$t=VHltE`EhQ&JVkN2 znfT7!kVx(0mf@rXuiQ@im{uAjS@TWxIM}c1TgMIEtBZ-`lPvQ33pH8j^X}H7Lf<_1 z;&+TFIELzsn1?B=^NRF`3Lg^lE7+spuG^Ye1o@onP^e2T8t~XH5Aa7NmF5~KH6#nf z`OBy1E&c(dNr1NHoueZ<Z9H?Xh<nkkW>?tARW0AU)kS@3N`ZBUB}HNJnMRYsv~=x_ zT%svM!I$Iox@&S2ygiV}$1g-EJbipt>=H4m1a>0t3D1QK(vXxa<{UU7K>R2>%X=pt zq#mzMxY&n|>U!;ww;S)H=kMf`$?{n`Yk!ubwWKJgEKCj?8yov-3j7-6Q_LzXJduSk zWqDho1pIz7C~l6~l_fZ+xb&2pqmrB~Lz_In2}GnbrWh_d4eRP_wXj}Xm3_&LWct_9 z8D^gjyW?Zy<4aS|0P)D?;^N9QmH;}@gxv$la<PyUr~CrThnwJh|7;TB!yY|zOvrZ8 zyACbXh?<g5<>SwHc97;kYF)9>f+#p!`U`*nlWI&&9tAwsd!Xpxk>^fyV;tYL?~s$F z1G?=v>*dAYUXde$P2*TYP_wx913}Oq9SCVwx>wt?ZIafa%#GOO1kNUmRBv#g9)zP& zfR{|f18{w*+fOXEl9rhLSXNZmfN-*-O_7Pj>}$NMJy*<aa_-}3T*wm|^U<R9;200+ z{Ne+COSUUH)ARH5uMA7clCj*}+)XPjc6Lnyu^1`!j5qm%1O4uS%3ONr?f8|>L<wkq z)>S#4`n#fz^@RTJZnyaMx;i_fG+|sAsuIj`eo?K-Zz)btP;l>izVEGkjxSOfd5r<@ zhld(oI2GgZb58)<>`#OYANO=Hw3;wEP8`b`zY$)h9wcW+wSxwqdHk8Pyu+u4g*f7v zIc4UOrLB<+Kv2j&!~5HS08Ao7^NzB3!d<1iqBDAb^zoegQ%PSm0TN-H!Og8%XuckG z@j#XndBXgA#9TLA9pqrfH*VUo+r(-C#K;s_(7tu22tpta5C}r^r%&{i9JtII;}3uf zI}YZE%}une14+Sz(n_CvwJLWq&lD@%U4*YO552X+wjV7)(st(JII1EJ**f$le$0cR z>D^DfJU!n?3=R&uAcALS1yZ_A(J^Ir#iaSRO<&pX3n-`!6jGC=Fb?}na@u2#GqDx( z5*$EzEN1$8dX8*wS3#optb;>BWQ2KX2Rl?RAD_u=d8eR_>1woI^EcgF7F=1GBt<!$ zEgGra^`Lq5Fo(v)zjgT(9xMMt)>m)RO~Cx>YHJ%C8_kf7w<RMV_BUoq*VnyxczAFG z0&FLYnFqRM$wkJEm-x=s!<PIU<mKhb7*<E@nTV}c262rGBoX8E{5WM|auQD@TF~iq z&FJ5?7rKVWETJyv4vZzlhJFPt_g!+#e$S_K@Tj|^4THfz3hsnj%r^K=k=jr2X=!N! zL-1R0&Zyu0Qd+Hz0LXH>hx_ou_wC_O7PIF2_wSje?`x~7M7k9BChXy!)E?AFgwsx# z^N`L_Wnxm2s*+O4&!0Ys>8hnfQfWnn89?L1hYv@Cs%VxHe>D9(Ov!-xuY8UZv0|$n z4JgFU)_A0Qd3$G>OR8#V$&IPhMKXK}w8HO0PYz1mJv{8}?aO`J4h>K3JN&g;2PmGc zpO~MQA5-D(O-G^nRbZQxcDR%!CbR7G4!YKjoQ<X$85z0dVb^Iido9)^!AVs|$8`tu z769>)fK2qR<pAQ#4t)wP%MV@yn3>$zsQmKoc4_Z*r1RBV&Q^heHJX~5ws1Hp9eUEZ zJdMNM)ZXnA4_!Xk<rrR=#5%wW4b(wFY(8zw>q0_fJt!gIYT*0a-{1PGf~#$GbZgn% z=XXJx1T0n(m74mYsmU>k_pi~m=%c*>S(0={|6Db7jSDC{Jt12Q1Y?O3AS=>!ej8uD zd>Kz5*l89#(ASUe>FH5XS1$+t!>+U`($oq$M^#z5G;sBc=kw>r0HC282SD5~w!@r_ z*T|@o-Y5S;06gTY`%dO6djN%upEv3B;F6Qi149KCYl!uf$u-C0a3)d~@2q69&|60U zA8n<*IZxF<-kr@9pC8*xT{l)(n0BoSK)Lq-t1F3*>@Q4!x4WWHC}8IZli7la+BE?J zt5;J~6CiAql9IB%zCMbD<&Tey6#HpZ+RD7oagA6@gRr{zpvGu-cXt(SZNmP3h)Y|* zJ=X8lUI51O(jfpN%8fN($uf>hAf}f21F0f7k$hQ-KiR-khg}$DNT2a2#8p>UZ^sr< zd(*vxf^2D%gt5_4G{A`}6pHLk-&$K6xeAZ6-ht%ufS!T`<kWvthKEIZ{Q)*r6cvj` zMy&6ZTJ!Mn$qJ&b#3?}1WpmAe+OS;DnX|XqKv|fel0UIAS4E518`E}okyAvMR|aCI zse-SlppzBae=H?kKaIow7KL;wOYBlpXPOR>Z~FTB0PR3NhHf6TFkgVo;`KPK^n86u ztj{S54_+MS=jQ{o5xcwZO^lEK$o0UC6zeB}p+iUr^6$T0sZ=VU=k(A5hqTLy#9Qz0 z<35EjD@bh*tHEJQ-B)vYIRrWa2*~Q@W=)udh1auZ1~3>bp@{*@SIdfmK(kEy{e?Hb z)|u5KPCY8HpwOx0EtCw%7Bpq;d}1Va39-=PXsJ!lypPMomX`xH3>>}D)O7oJZ_H9q zNXW*;rJ(KT=N*^kAQK?0KwdV}dhMH~7TxDVg-nA&Lb5YiE61!O6K`+tV)mEa)Zcp< zmMR(=eUhSKRhM-S8K0N7qYu+_aNAJu=`H{Nw4Eq0`M8i1Pp2hHl24Do<er5A@$RFz Fe*?a06FmR` diff --git a/src/main/resources/assets/bloodutils/textures/gui/crafting.png b/src/main/resources/assets/bloodutils/textures/gui/crafting.png deleted file mode 100644 index eee97376163f2218d042defe741523311397b5d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 551 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G$6&6<n8Xl@E-&h>|H(?D8gCb z5n0T@z;_UY8Fx&~ehU<2FY)wsWxvNM%E>49G|SQvXv`K*7srr_TW{}d<ZLhyaSaqz z+`H7+a-DJHGXJH_5gjfMC(ki<Fi;ZDxn}@000ms^v5l*WzP|Zr_1oiyzm`-czx(>g z+v{rjlb}O$CVPK0{e0_*XafTS69Wf>0s~HlfZz6Jg?Qc!7whH6!o5AGb+RbfbUXat zBYxVYjuGfh76t(Z2atcUGZyr@E;x2B^QomkLwqF5F5{<9#qn!!U}!MlX)-C}L-ET{ a;`r-ve0SX$7rS;g$km>%elF{r5}E*AYG1kl diff --git a/src/main/resources/assets/bloodutils/textures/gui/front.png b/src/main/resources/assets/bloodutils/textures/gui/front.png deleted file mode 100644 index 67c7bf1be79f18b14c9896fb40d61645dca8d6d7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2881 zcmcgu2Uk<s7Cs5ZP(o1#LJO!F1*A$>7(fxoAWe}bB@QAjgeD-;F5u|cU?>Tl0aQXj z1B!HsJbfkz2nqs9P*4m(0U4wX31u$K%v<mMfp^!s>+E&T-QW54-skS`Ty=J|MT;tk z0szo>JL?kwAYc;#P{Q!w9aVJ>9)y3gx3vZiKozKZ30T#_Ga?aop3wkEJl%Q`tnjL{ z@Z^s3c!y&<#t>LpjF4Ri1BMdq#ammsUKp8u7wXQoK{DrUA82>VDHUJ7L_Gb7T2!2q z+?ZIL*tj?o+$Q$!Y|cK#UH(LzXaCIgPI`o{k)UqS#$#iGHpO7btWf?YP6TQwW_xsY zCyzP5HtDNL7r1hwDiZW)Z0-)Y89lQLxrB!D))_RnHAkr`xy!jcv?A{L8s8UF8t=2d zTD|GRP0{A@pKYFAW4jdYM8=?@5DxX@L`9wa9rfMLR8aOU+;=iQ8>iDv*&w~0GnN*- z)N!uac#uo|7EZ|vus^Ue6Bk$h&F|snxa@LH(S?Dh->vr)<bP`#apUkErKakLLXT!v z&|0YpN}yiy{HbRtQ}KyN3NJU{TDMd_+STnSSTO_I)oZSa#euPIVC8~%S;+iDNwSK2 znBhmPFd(Z;|5VpJi2xn_V0<dGJ66t049IqV9rqSQZj}TA%?E8_BjtMp%7lRZ(vx4~ zfgk|eOZ=B;RY1rho=L+9qzVGfk9yL-0O0%-5R#28#kQO~3PJwO$$m8WN>^-GpPKOk zUpKDbIXwO(xWiG(u2}T87>o}rK^c7tyA#yKi$etv3?u<avi1Pzdy89xjy<E_<pbyi z!cq?Yv|2(v?V@0ZDn4KIhFI7s#vFM)1uL1HK)SnrO1UREDj`Bs+WiQ$H{~X>Okx;` zi>IfcuZ)NsH4knGX~RB7U&+?vvC?-ah9S<ULG>U;1ggPQ(tao{4e^o@^>I(QN2x$d z?3DM%v9jL&9_!1!xE6IDXPV*bs?nxrlQBVjBm}MtsP-Ogm(TpJm5#N|$~GHT#V<CY zg*zzR&(C^$nN16ahMy+V<^z+Li2}A8s}lJECj!_l3NQPC$%|;y?8YR&_ItINA}oA` zWaQn4YBJ6AQiGxpKBK?lW%zFv(=IZ>1|=HLqYcfS#+uk6xwZ`}R4Px2rJ*sma<t}7 z*{hdxPs<tXk$zG=?FnXmVao2E?&|?J`+;xmaTRv$y523t1DXSE^B#DY&N!c0o2*7T zQgnOB;r*VKD--v#&D@Q}8-|G*`sWx}r;4D@QEudCI_asd^y%qaw^k1-2V-^fw77E> zb}5u;Hk`LGBMzy`Ftxi)pNeQwK;!#aCPVz^*1_}cF(tA;zh~X|Dy5d_zJ92-IF^&6 z|6(FD@@^%UHo;d2ED)a0%es<dFsPc*FdXvPv+2MvW;Qpo{9yJclLdk<v(wdAjuYzN z)5ZD3oXUJ<haMiRC%J3&4HV_<`aV9HHfv_~!_aHYtWnXA3*Ju+%<HjoT7iRy7*k7= z-MsifTZ=sMd++k%)1}l%%I64!6WuF=i%H5<+GVA7xT?RHIVHTPRG`;bWlyd2{TAa| zdSubZy|2w@w!v%UK&D;6?MEl#8`CYF3LVTzMqGiw!4kICV`Gl=Ts1{25UxPpqN+Hj zh2DBb%{0TYa-gAU;p`!Dq!OG^EGg_W%hC45GyY`l{o;V>=B|LQRTmk2b}OTnMIN5k z4!z7pz7)!b(-*cQRXFl)CY5^87#qr7;WX2KIKJ;tsUw-&(qrn-<Efvx+@Qv9$>QRf zQ?nN|_tH50i_I}hXQ%<)1r+k9*$a1@Cguw!ms;5c<hc(meo=2@l!R_F3w~_qjiTI} z(D?abtZAD)L&3l5lpw^QrI}yb<M814gyu;%nZnyNVSL5A2Ra)hv!RF&ovl5Qg<U2Y z$zNhQZGnnrj(2D}_<`^@@$C<giDMy2gL8gyhXd#IYCbXZ^?fd#>h|PLCAf$MVOZ|k z+-cpEVzYaIj~st`wgT5T_$`UU3_4h%5o91^pm0cC2NP_P0UzH_J74rX!I)+zD@%Nj zPo1c8|2oc??$Wbi4bYyL47nsO$%}>c<?Ic1Ud}QfZeNUTr5|wE#~VAl$Nz?7zbpI9 zg-XS`uTk2f)uWg@@$@pK%&JB}_v$5xj~AJtj>_Xx9QW~ZaUnvf$;2j(Ne1>(xfi2$ zCFkmfiK)x$AUjS=C@T`@-%I?(zvmHtWI0J5ZxI$g9p7|dY+;eElo+jSn=sor8s$tn zjCwd2)H7DYdtXDDFjnA|zjGtqfLSl`rtE4nGjcV(XJcQ*^5`{l?64MkjU<&Ss(>~} zrRjGwf=p|MT(V<t+0pfQD?tXE?I%5(V!Gp(N7My6SNqQvJZ7#(%yL70m-&;<etm+8 z&E*TL;Y@$HD)8BZ|DNa8Dmm8cv8Nrz0wv%4>O>~o&FEChuo=l){4x$jUp2}=csJcu z%jL8<)*mmO{$kSoI-+>>vk3&M?z3EOuP~>^|L}-XI#x=h2IwoQf)MR*X6s1_MNT~I zc>g?`bw)}RKxjj&`Wt*?zYxerS&M-ii0vK=3#oJ5AS*r6R2KoR|4xwlyS+n6@4!B! zG^iUUO4YG;-9`bp!4pk+18e&MxJv8zr`toovP5sI6>~1Ep<sj<#)qrNRY63b@&GIY zKnehobeIk?dH<rBGDY&htRNyzXdfUH!Hu35WnYJVW(7L5>+Mq$&Zv>^A#{a7cZ8J` z0u&XNc}pAzKxthBKwP90s1uPBkOp9z#<tEth5lGrOYA;AxBMS2yM6`GGZQgO0J57E zU^__*w8GS3AK5O90IW=r;H3~e%wvGoHW28J)Pr|~0A%P7#F4Pz$Waj@TjBn-Y|jK3 zK^!3HoP*c?i@=r#x>;Rq%M}(YIFW=MUs2Xu1{`*s<9?LdwpKzT6UqMptI>Qf9h6%s zBl@>j8Donoqz8!AYwE~Rp;7TmvOtqbhPHP%IwQ3e&DQqYnQRxbksjAJQM!pE8w-B8 z2*H{+GfK)iY39)=KuL%ACB1$YIPf(Exb{smbM+~m4~SS~I_{O4Lxa=((M>&YF80Gg zE$~`%8x92stC+t6BG#LrI@7ICz~h>Inh5Y98c6~}5y&cAR|Vu9ksGJ95sa6ZgSbEq zU4kb#pGJ63_1Dntz<>xEW$$)PzFgbZXy)Kw%;C!Xla(#zC@`8LX}akIKphTj=wnZg z<n#Y6L*RRXOQ5<@);HR|jvW`OeE+S3RrPZx3#qDLaHHS#mVx;SQ#A+YqAwmS{85~w z;+_NE<ehK6{oEamcoTZRr4MZtx)an&NEB~fwi*RxEq?dKWG~AuCCFJ!UvDhfFEFOf zt$hDSz~k`hdr*iw@Q7U;(~;bh+hr~Z1?(oUU(L~%ZuNy;tmU;WWQ@B9|4Zw%5&3Z? zqRtWJ9eDC$Nl8@Wt|6LOlwT8V1ipI>8-R1WRZA>%QEe}HYpxp#J1h+ap<}Me;Q#xK a53Q^0mFi+i*r{yYi2?qYqc!~qA?;7ghqkT& diff --git a/src/main/resources/assets/bloodutils/textures/gui/guide.png b/src/main/resources/assets/bloodutils/textures/gui/guide.png deleted file mode 100644 index f99e309d59f5524c2640e73c90e98948acf775af..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8642 zcmb7qc{r3`*#9$QF!mYA9%C%YP9zkA8OD~Ske!I^N+`=1l6~Kjva2XdktN%V5Q<Q; zubC`a#;&ox^L_vM{rmo|=bY<2*SXHQ&N<J0KlkTz-}i|#xuMI#$jb--0E-?LZ3X}! z>MIC<(oq}R2W76*hVG7mE*d!d?<s73lR@oa@WWd90|0Bse-+g2TjoOTq<^SqgrT2d zU}b}-jdGM10ssQgLu=l8G_h`H;Kx52aJ@Q29f0CF+Ea)r*tDT)FRe^z(~m1=oY|ER zL~G2mk+Kz-8o#b`@qMvBPiuR==$U6*xX-VpXWIT@v&-%Xm9k0x_P{i|;x>D^nc-I? z28$3fMKFL7_~$Dd&$<kio7@gHPF}3|-?qc_85$ovJWwIe9Bs6+A)v({VOIR4-jgFy zS*7{tH?p>{7DjC;K#bz{xRQZutpv(k4P5&aPWX5(yx5{+BskCV`dwRZ#fmfE%Fzqq zlMZYX%6;m%0`g4tQSG;WF^uDFTH*~Hd%@<p7k^wckaC7#)b<ivr5OmgrP#l7z4~AW z298ImoBY_O=$(d|4k;QxctJiNaf};aOKbN}|MKiR-M{BzBacrElHikP7d@2v0xR$r z56I6xLg;P-eSCj)k2}~dfPv6IFJ|ZL#9=d!{)o2h?r;G>_(_U!$){}}68WnCUk<== zXBhJOfS-6g_1MtxM%~HDD@g$F8%802n1O>Xo49j<?x5`Oh#b<{S7n0cHWw^rLoL3f z;4$Kq#(XmJxicFL9&@^KoqqHC_$&?Zx}Ll}HTv>AA{q@ey$M?*DGR-Q@tBKI0(@U5 z92m?s$Whss`~Fh(ZXB`bDA^hb>-G?#>!aP|qdff)$5JL-9*-|hZfyCxVXa?s{$H3` z6McWwJqMkltFmv3Z<S=cspJ10WbSOo78WLy4&9}>3As^lEkcdl#<%0Y6sAGWszx!# z0Xe5_nA81p?s2F!L6f}AN8OUqB)E%(L~1I`?uaMQN$v`oDAGD9|4V;2&5&0oWcIJv zawT6}+6-%e3twqH=RXzg=Ai)hE05boYkmEP9?(vqUyVC1H#`KtXPxuSKeV|>xhxt6 zP%2wP4lFYzO1&~}mPz27_8O)i!0LzWM|0CKC~?M8ClqSyI4nAi<#Fa$G5Vn=STZO5 zW(}D7i9Ub*?NQi_WiFykm8G1Egu%3)D((vW4oX?pGQAUrzxW|DZ7dRznT#<1oR?92 zt8(a?#Bl{)z*6(4N%^gw&X<L$$C^08JmQS5Xn4>y>=qmvwv!3>WWt=5vBe}2Jp#bg zqE-HMqRAPwIE*k21TFtNP7$Dh1+H&D4df@zuZ~=6Xwf~jzf-=#uOElAS-UgX8kgE& zC4PR=BF5yeiEf})9Yb~Th&Il$zXoCmznw!c{F2p6yZIGjYm>WP{2s*66+?R6JBj}t zD@@YGHA8bYP-ayq_RmA!VYiWmx3qB2JQ7|ef)3wmLzt&$-MF&kp@}L|pmPg0Uu+MY z1W*i8fOi<k_}V`ufOvU8;}17QoAOLY*k+rHTg#N+Mx#o%kh{#;E<2YXil{TkdY{jl zC>53gh`-p!tgA1xIgUvI${$CncGVr>Z@`n;L~KOtvM()ZUBD}mq!UgU>SBMt5toAT z3!4Yav~^_5eFT78x^K2iJzRAan5DPiDze)#agW74rYF{X@FTXLhpTuLlE89hfr0i_ z(aZ9CJ0fRadLb7@p0aQ>Mfd=;g(epG<>Q3Qs{78gSnl<{PIa2txO9zTD0Jmv0_$`T zhoyQ;l$tB6O|`q73cw6u{R9kOS+9u<ca@V<9fqJ07li!Ifo?)SC*Z*t)1qCKesLjh zg3_Vyjgi#!Dhd?irEez2jAhKu9dULy6^(~^rAkWhbeOykH`>=|SSCC#1Uf(e(&<p* za`gJ9+0Eg|ziq%>bk6oOkCqO41(t>>^oB313pe+q<{-J?jtVeo03a@t+Qvx61AJd~ zAnCD2uujw$AYI`o<3$ixm>p{x^ggCI5~d!A8Y%)xA(wL}?H1jajj-C2WwgtlBx8@= zEW2lDy{xOz+AU~_Zc~mr6SmyU_1PNl;22*UxjR@}AjDvEqu9K%F1>JE_6QN*Ah@P< zBE~XaTaEWKq=<SdbsqdWk6CBuYuMRbPR*R#Eox;201IEQ<7qp_Yo_l&FB$pmxg6Ig ztU_1Do`Dcr2sw8H)Wj9#?V~|cxJu68R<iR&f*)lm94(rLc=w!1&VS8GO4{BPmMV`Q zPV7_HxJc7mAfl2XGj?A%{B{jJgC@DRp@*LlHPV@+S`*^Ukk}m$T~{DE(SEc^c;%8O zVu%Zb^8et*b0N>u@YuB#n!UVszbLlq5z3+p-#1kQGnpvwjTWeidso?;z;P;{7ylaM z#b6--+PoObgcpe4j5pJJIjEP~`64ISxE0lG6`R`#Exj1*aW%qJH(2%hV|Bbp_$OQZ z#Bw0n8hAA!*81s_dX&CX&unW!kJn#sV3FJ`_4MaOW5);Il8Mu|nHASK@n-8!%Jd^w z2q!6rtsgmxzPL8*(bIJ?#!7+f1J0KYbsA`dw_At694+U}ngC~;Q|PP)#cp&1rRf^@ zfMneLZ_9IieS>aUUMeQEN6>XoWHhGYCnqzY(=GPCzUjkZnngK&S2m3a0E!jjCweRr zZ_NDOuF8KqFzf4|gi?0I+DLVZhAVHV2eMJ8^t32IiNAD&7vp7{Fv0$k+hrPSsS4w` zm;&6I(CXPfw%y|JtYZN@_C&?mLhpUl@Tkz9n85X86@Zvxe<o`TmrHcfIrWP5HDF=A zJ>NZD$`x0jYeqV-=1^k1V*DxPaP<n@adJ?I9Uxc(M@_(wdxzHGlXw&-DQFP_F=hxX zeJ=^iDTQ+QlY%<1qnA6Z@J`7fY~0A9`L!*gB?uU3*~~N9KxJyZD9$-H1&8pBL>kUD z_ST>3-`PE&xeWRy0@%H;0n=pY6epl&PTNKm9TdWtU7&DrbxOocK7Nhy+Aw%-XD+&j zpGgvoVc4g&0x5K@w6rucg!J=zy_nG)$ub8-O3$XkvG98heSx!dN<Rc=SW?Rq@L31G zVaDXQ1Sd?P*^ADVjEg;rj3`;#E|f#itc#~}EzbnTJ>)_Xcd(28mrB<}39zf=);?qV zjUPw!UMKRcOTdgu2p!YTGkMi3KCRyaK>CYduZh4O#?$BR#H#{<Lp>XRf^>suqL{Xh zg6Kc{ECxfSZ8S(1#etKKP@rp5ELqi`K0a;LSH=r@XV`D-CcXnN32{sD8W)*l+Z)S% z^6ykqgTE<ZJP&ZGXBl{~H&@zAJ`VeJ`%=3r`(S0zRGhN?<G2dRI@-c&Z7A(q>!)vZ z_{~*I2#ShW=bUGm=_={=4OfEF5-j^wG=lQIN`PI8W6*$s!IL04dM*(Y$nL+D>&#%* zPqdDxh$7{!v7zq&s_;wq{?&5nmwa>on$HcNqh0+;);UeWmojguy=yI1R*sYhG{!tZ z?7_hcA9tiv+hu=x{^og1VrxzjNLVw3NYnw?d#g+qlJ9S?g0cN!Vuixs(*$2vSNf|u zrVUDv1tqXv%CS=o`w@eSjGZ0WPvGWc(EQh!XSN#Wsvo}OzRE;Im$J4`bNKUZG2Lb0 zAb3AJ>XAJsbgi8mFIij<+Nlv~aldHh@X(oiP8a9CT%J1XZC)7vTJxvkOll1jbw=Yk z>9tXA&K2*xD;o`s<?bBz=Zt=sJnL0)#0Vmy3x6=+-C33^|KMvYRC;E=T^9W;uG{D! zDQ&(r9^Rc7QQ*W}2m!x$pDfA`01bP@ilxbro|&=jQs|8#H3cl#2cnK@O_sD`@iFb# ziUV#6rpLl*{rsa$eg<jnYM#`XL8v$?Rt(vZ7p4d5SuDD2J<<fsdu3WXkjSI#vBLb* z*TGM!zkX44;-mo6OPuxcaV8Rc$iiwJ)x}N{=Kw!&^cg`Vl=bP)wE1aLRij{A9w6IZ zhp8&np;FV*8#s5YrBnO^+oD@qX%1tNA4jXNI$sME8f=s>>4g;fnpr5QCZ~(HmV~-- ztO{+E%}N(KVNksNev*)L9Ds6X744=dK}wEtJz1!RX`ePtqe67<9wWQ<f0S{v4=keZ z0ur%jl0%WWwEm?!xL|R<mLjRgaE#+Y<&odw@FieF1)$0}4cN6~f-THTOCI+YoW6|W zq0gC6S~ya<3~l^ntr^d44Z@0@Z~R9x4qn;P6efuNllcVfzb-^mw^#s1_-?alN!{F~ zoX!c!b)0KudIA%T1)&AM?}9E8grO$6LmCn}jE10P)#lu4D3tm1!R&aGjKacX!>gq_ z@1JUe9_h=k&Qp!@e!evom`r2vYx?ee;dkUx!+0(Fs%kbCp3m!--hn{Ecq5@sby&fu zA&nJ`=36D5qi>SHas`v$c5|8=q_pViS4dxT_l%s-`uT{D`m~00GB=q~4l#<>Cch+f zzW63@p`sIbyQS|NHHTg;XnblIb1ak_Y2lG^ud<B|xNUFUIlOQ8i2Tw&3AiF4nE{9> zNU+pHZ~G8aGiEz~+)+Csp9C%0&KBHulid0N#ajilzu`pOhLBKkDAVaokseuZ&B+Av zzc)D956JhnoT!mHpbG|CxkQ8EJz){<<j7O~J*72Q6|zx#I#37FmjWvH-d(Q)oD{zN zxboPpoTph%d^W8$FZv}rMHm`s^}lF(d|GGuzO7#COO`$0l@@+k`syuXVt!1^Z%J_1 zUs`d07)X?FJA@&U<&AMZ(e7YsX%c=f@G%cn;hMp2iS75>N(EGSdOqB0FnhV&jQ?@p z0R0yU6Ny?ECH{=-c(?Z=*uHstUbI4LKafKqZXnxH+Xpn35P`I$3pD&%(FA6pIgXMw z+HQ7oI#r<Z;s;^Ao~_B1d#d|JhMTWhYJtq{OeQgKbWuQ0L6Njb2LlUJWb{j;51ycF zhDQ;icW-Ddir}u4oNd?~%=fKUgMsh)xapNAHT;b(9q!;dfU@^b&=A{!M~8e{m<U(` zwHzN;s~mDcKK%lVOtX3oemSdfr8C?PV!AgOZ+1BeL^b~r4*cQY4=z*9Tr=>{1Elo} z#BJne44ASgMFuoO_4S@a`;Z2{3@o3|I_wb#=C%ljOaRdrcZ>u$X|e`rd&YLjF~=+2 zye@A^16@hmR*nyY$=+T}_JJU|T`Ev+$Cj`XH`Q1!%U*Y3#h<hr-ys>>L(p$al^bjw z-&du`pnyBSKv)JW%cju7T-WfXgoLkXw9vuxv{aHq4k5AYsi%v*6)n-*2w&&v_F?7q z<TbiJ4^m9%W+;wlQWffN)bg5tve@Fj9lxTPa4L)>IF2?h06S_=?aw{AFnCVrDdHvf z$6i_6g9a&1;XbQ40XR%w`Xw|9akf~_kZ9}^;Js!&q=^4R{1XS-^>)t=O**vKAlN9P zTSWWqAiCnc9E%UDS=VT*m~WYZVm(+m93UbtYxtaHo|FE&ts(s<Ndt_S+cw2l3=H8g z6aIJLN-4X#Q;o21_6pT&;6XCGQ-?bP^cmbC_>k;`EkJK7Btswl5q!^s?WHAFvKC%x z%0tf0@A$%O1F_X;u>gCdWA|=8O-_NQGR=iaMZHBTI;Y$7y_b@Y!0GY3o|Oi3@a6_B z6>P;xCr2WZKt$U#%CG7X-_HlexKUp7(jhM{=t{5y(&Ts?G{0r-D}c(EWNPk*iePY~ z^r^MLpBf+vR(4BS)BGLZPeUgg!y`k3S9ckpMcT3RJ$_7{n9e%L8tK`D2kFF$<u(`; z%RJ5~4R%kR-MJ<XX8nDXbo}CtnA91e8$7q{Aj3thpat*?vL}W8(&)a3)hc$wgxxT9 zZ|8{{{~96VFV38TX`=(_InL|fZIM;Ri>J}1j^zRj*5KFAHKbnS7PIlcrH0KU7GPN) zOlGS;2%CI@5Gy$g>u^fSaBRkIyT~`?f6ua^+<BP}C7)s!zcx4G?(+N$VQpjr?0_%8 zVLe3E=C(q&z?O3-s4wb5itNYO0!xyHJ6z6-a$4NPQ@3SPLEu`HJvc1<2z)(HgFT73 zF`4*GTKDOlN5!Ige)F)@Hr$OK#&7#l2KCaNP-~zI?c@pxUZwjXOo*%cA{D(c)kn@| zNB(B)k)o3*2X<|^Onl%d7kKOsrLv0zt$M(H7nWZLL`B+26JLAB9G=?O<(@338S~aG z8$c$yFrP<*<r1Uo>KJ?{BL&K0zct9S;pOoWB7_&vF*P!&HZUT*`F?H9`;aVw6^z&O z&=()F{$RRib6=Z6zKQ^8qYx;x@sHlAK--wUV@KujxqvVLex%mg!v<*G3c;XWk2-HI zwl?>+)G*?UrkCx`5#MnZ5=qLX$~-0K#h$`J@U0`rS}XCmhb#eBn5HZF#rq`eRT7B# z$v8PgQ`k~eUywb4o5ZHE-5iHvCn+xgX8Wi0RONEH;0z2Io+<WJDP=p}QwD%Kqo1_M zaK@^*VeJCrW!FOZf6mEE^~d1J*FlaOc|k7^A|z?D41g%rXkGHrO`@FNaYOgyq9TX* zKBw8G3_(C*Pp>fF)-9KG2#-Y{FzKG|MwR_)O!f$?JqUBuz&~KXkF=<7y5dwx1Me8H zO%}1R&qMr~;*Xi<47%Hxx#{vL1#gtmPGLoEyMnmw?!BE1j+7kIv-CcyH@9@a#z;w! zpKvog71zDDXB`snxUWKs0D|Amk1;-;kCFl?rnk4X9iEu^>m0wKMt?}dt~FJC^8f2o z7hb9PWeJPtmh2(G%f&fY)Rs4(x5_`TT%|>nQUpiu^w>g>1-{wB1ZjpIshJN2dYyqD z(XH)o5-osR<wjbbGAf7Q;7aDs*M*{fp!~<Dmr$ncvUFdE&0`Hu6=iCnB7^|1`Ki+3 zVC52b@96r!V~1U5t=p0V$tZ|35ch>OUJv*D97T9)@rIua!{-pE(3<tdx?KJhgH<qE zhE5_~O)izxP>^uu2EGj3J=;5@GU^Wph{}i`)_|*gYAXUOcI_{R+ae--`(0LW*`%}@ zt<`7A_dIFGK0L8W0cS^j$*6~*SPqy7xaJ*ituEwFszdpW&CfT1DcgQk0ky-c0!L%Q zd~Au_Uu^wM%g8(IpcT`2?>Lm8FhS)cX!N?S-~R4uSxREY{kth3k$O37d1_)#S(a+z zcVvZGy&4ZgK<7_hm==qjUfHcLPRpJ!xJ_h$bFl?YuF=f4(|P<wfn(l5uiwwP+MHWo zSISaNUPh2GQ--m*8gfoR8TJ=z1F_vcX?_MUJ)yda0Pwej|6~RH2$51nG<%!YfJ`}! zuId;Jz-k}*cyAj(O#{4c?1YyJ)0LP=ER1lj9R6KLt@V9~0RfXfGxLWkRm^A*D&V1n z|27*_>5y0}j1i40O3I{baTSw-r@rr*m7V&EZ!jVwR>c7yW48oS%GJYf&@jqL&#W*Q zLhG1H<%2Bul0@$%y+Zd22FfRCikwAL3X-7}Qqqoh-9c13u3}HN=kt3GBF=N--SWd3 z%YJQk(m2%Fzf1Bl?qV++v&P-k*iIPUSK76R8SYKj2!P+V?aE@4O$(sak{6bf=bD4` z{g?~(a3v@vW^$cC#RwTwm-3#PJylGHFZACuWGn_A&RH`R-U8VL1<@m+niit%^JpS! z*Bb9w>i`u+Zuxu6in6@pcoh0TQs(9LCzI;I+@n=jrGY?NndbnsD9V9bq*y8St^@ua z5{5>@DZJ6=BGh|lb+=N=y!w!~S3|zQPtH=pkJ2vF5zA3cfZiua*LhI;8<uqslrj~Z z)O*@^O?>M;LCNYqC9&)`AX><89z?&(G`&ZEkqL{r_kRYfjl_-EGETE5X5mHQ_%;s^ z<3;d#_RPLvvlIrwS74Nc!QoqhOMr}=O~g1&gy-mY)>tUyVEce8GCdXrkvre$0;am9 z<;0pSt3}5L2|>)rEpH9AL}+JD_Sy{yQePbC3jJ%KA6#v~e(pay)^`%_b<%GQFrxMc zst5J{#imYka>}yMIzB=>$}z}tC<$)++IIRaS*=uxOa*+iyRL@{?30mo{xt5T3=xXf z2CA;`Uf*eU-5h9>!Iy9%vgjx52Q<dCpW8tq-+(a>NGalAvB23TwxxlVl?yb>5YT~< zq2p{P<PA*>2B;rd9pMb+WZ)_gSMpq~r0Ee;8VT2bpMykn&{=55<68ysioDdg;nYo* zvhhf~B_9iQ?TjoQWSvURyQFAI%1s+C#E%D-3IPTvah!BZ78*^IVqm?&!Wr@T;?I}n zY2UGDZv;c21j<$dD-)hu0kkQ=W5b=-@@nVo#(IN;G@h%%HT(X_Z=CM(v0WSvgV6i2 z+W)RzIO+2}nf(e@Lla=C8{G=RRK|#e4wNii0#mAI5^h!E1%e7!RmTisCZi5~=y*?v zU>(o#KmjF#L8I-<=TgCQs_fT;Nld8PxP@x<Nuh(XqbDnRhmLS@8A=8hXjHPe@-aof zenI!zLgD$BeJ({%^Qhd{LoDJMz`qf2lvpV0DvBqQUg83LQ;eXob(i0=&lswD+sgXk z@kzqMK-yzkP4zm!ZWX+o)YVBvt!R1d$}63!?)1Z^I*N|r9ow6gpQ6g`E|-l=JO)vr zWcMRvRp8_~y~$^8y!AAMyAu6|hDBSlRdn$5?_Tnmpu;^Eoyev-dp8HXQv=W<SVMYK zL^r^`IawTPUSf32-|Nc;o7mbAoY|UM@+fJqB6f%XKF{$hngb>fI-wUP%zZt^T#is$ z$4}!QuMFtkayLGywA0W4kg!S|qTi4>SmG!6CKW>IcPCo-CmBk<01SscEN~4MrdPqx zSII_`tmlW>m#goUL6HdIsXOlXMn(>vm`^v7lavnk5<xEUjYyN3A9FpW2QO9|_8^L@ zpv9%{&cOqq#3WzFkNk0KsnjTtna8Dg{9g(1MlB8IVyNn6+7CKMFp}~Izb)zRSud#B z1CSim2<2jMJef|}v7&{+u|!1D?mQY*=^Zg++n0B&v!l8=`vT+Lsn-AEIbPHs#2j`Z zx-Gfxl~skTLsYsW*yKI;$A&-#Z+6$VK0OFbA5tSiSPLGwXW#vz`jj(9V-EwMTGf*& zpLTL4+L%1w@!gCP31^VT@BK+g-XJ>Lu)fCik+R#e;TTk@2)KR1uG}Yjq$yv5vfk;? z`r*#W*>uC~mwDqbxM1HYtE7SCSW_7N;*!PtU}tK;r52#>f*(j<y8iW|Bsh50`r0-< z#~!wPf$Fm~wFNDo3;(e*@%i{JH9xc9VmB@ggs8ozf`m2F0u?MAI^+z-5zw_&Nk!Fr zMvr9u&yrKZdE@WZb?NwOnNOztqOT=%9EW`WU9EBSw_qV=mcpe_T_KOZlYIQ6o@J=t zTw*<1sOFbg&>-iN<C|(hzt_mP2>k$d7}(<#EA)JgzjU=j>y2zvAXxWoqu%j;hH+$% z?5mBjiRwB9;jqR!nx9YJiUlRSO2B#*%p{fPscrqO#x*)&ur$xy9H<M|KH6!hzOysZ zpB$EqTLdXo_sIZ2qT$+x(!D(~j=B*p%Cvx4$-7~tukz{a5p(8IKd<^V6ZI>TI+ic< z8ApGBss6+V{yY=bRd=-l^??cj$l;4<0hx1#rn;em`W<iDrUze`WV%cmd*=OZ&<`l~ zg%8&0pd(gJTHr`FqWLYm+;?B07jWu1VZV@P2^uG&>JLcHz{GRBn?v}yApTRRm1Q94 z--yOp-Z$;npu9_xrqj&hO{}KVYkH^RQ3t|aKcI&*iaP?o(`PP;4Vm4y^qs=<Bz{ae z7PJqZMV?(042A9Ze~+vVDed%({Kk?s0;Z<TGQTa~j8WuGy&#k-eE_7-@J<nbAPSlV zZ{&rt#J{yBopr3t+JI3ez@~9Hh3y|{iQJ`KK;R;r8oL=cGA*eS^MYpidxu4~yZ<Kf zHGT-aFc3z**tirCa)CtfUZkcuyaii-1~??2cA;LUm2;h)gbQ0i&>yxoCVdw^kxx32 zr___aQraHX(UJEjwdIF#a#dNi6MfubzeV0n>Ad@onyCCEHF5G^BJfY1AZ{6!zZ(0Q zx`k&!&OP!waVgHT>-6`3JA~s$3qojohEm7>++CyD+<nTV2&c0G3>z8RJxU_v--fLW zNdvCNC`KZ_8`uZs>^05@!VzB+eEbVoG-J>}ew&}>e_78gd$*ZeM=WkfOAjcm(+3k| zW%7cs{Fn@i+Y*mx(FxBz(?$aJNR#>@S@O`8#FY!XDh=>!$+SxWUg_ajT0|mL#9cq; zv3P%sUyg06=7~{YK><n7jQZOHer(L_f1+1*GLEU~R_fxhKB>nLP1ygXfMV^QDjj_Z z53x8{SKIy6_O@AIznuSC`&ao$Ec1t8aDM3i<b#8Dp3wuDe6=K8Z}{2wyee|*aXWpB zGb9a>c~$uMgKnFQ{ptADu+Ag)Jj4SIz(0zO9pwK}*;-Q0T5`UJ;Q6d2eChija&vxy zSKZcTArBcV1(_q&&SoEk@5^)d-~AUyT;n^F4ibDBF=R_u>gDUyLkN<k4t-Jp&G7-^ zjA1-qfGa(-_U$A0><>61u24FvA9`LSsMG|7p5&9oC=5t?(AE8((XL)Mp#%Pw3(Dki z8eovma-MVZCm%H;P9ErY+L*E#^WO}7L`w&n>wIMZ#<#fN0V@YIjZL75pp4^DUKU#$ zdpZv#FTo3crjfB9?eNYip>}<FAxzZSDm^o;<GsEc{##S-)UI!qkSb}}h1|-px|M}V zWi^ViZIj5LSG^n1_>e<WgmFM+FJk~_v!U{+nfzUhvVJsnw(n2xlbf@7l8C`gs_zpR zBC)1`q1I8WVDuUeId`Dmd*lDfYo!agJ*N%(qh&0gI%<m>gAxQ=;zI|$6h0fnR8R~% zMbE+mr<8w_-BcjBgAg)B=U8x2GPvA}dZj@7zq<g%#gMd0U@ReoDzgjN(`kA)@Ec~M zv5YYL)43<8?OB4q+gzrQCQQ#7$oriyPOC|k!-qknBctY6WZ}`l#w#cc%_)yhW_iCw zNTt=(*$LK#z*H?@^@tu05RiBthMoY+oy}C3&-w4<Uyq>G#MjCY$#~aff)xkHEtt!O zKh7y)JOYyT8pwHiO)SkQV}=7H8-)z7jcefKs^ky<S*nadVCAs5NUXs1(!co|2{$=N zPd6g-uVOSInx#~d?Pv=7zbWwlMalm^#>k8O3s?Va5<j%k1*hJ&0Q4|7&{bNFk^cie C{L3Q% diff --git a/src/main/resources/assets/bloodutils/textures/items/bloodShard_royal.png b/src/main/resources/assets/bloodutils/textures/items/bloodShard_royal.png deleted file mode 100644 index 30f584f92befaad8d4951dc10b7eb65a2101cf0a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 400 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqrwl&>!;fUCDL^6F%#er@=ltB<)VvZPmw~~#C^fMp zHASI3vm`^o-P1Q9MK6^dDE`IM#WBR<^wLQi`I-y_+Wuc|kr3}-X4YG_?gQH%;q^)4 z@jXXf&15<C+HM?p-@uk_dZohia?Ja8+3(+Tdj3f^{*%d<u>0z@$u1_<$$uDLZ%w;> z>u4q4nP%I)468*8tVBP3naVUP?Z#e)R7){thuciowKv>s5xDpz>!EGpPL{mw+>=sl zPH!?i&!i((_VFjrk;0B;lF7CA7q4r-%P7;|y64hKC%$&>MI0+uwQpEbI?;!BQb*b> zrqW#QH?|(0OfC~|&l7iW30~>goz88~IEAT6!6lTps>VktbFInUixSL}_?MQ~^zZ-0 mx8Svv`pam;lP}|EY_h(-V6EB3W5Ttdfbn$ob6Mw<&;$U)W|o5h diff --git a/src/main/resources/assets/bloodutils/textures/items/diamond_blood.png b/src/main/resources/assets/bloodutils/textures/items/diamond_blood.png deleted file mode 100644 index 1d5cf9c6d945457ee9523870b48e0d03aa137cf6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4q_)-xzH&6Cpyif|Tq zL>4nJa0`PlBg3pY5<o%r5>H=O_IsRCe7xeXwqN-Q6guhY;uvCa`sn11Tug>MZTn9Z z%Di~?PN$=wTc(z2{(<d<Uvg`h*wY24GYhha7uw!&$y@E+I;%Uq)NsPW`q_W#XR-Xt zeRj8%Reaue*Sx&jMtZARw~OT+{Mz+rGZS|nV+i9lR=)#5fs-;0mOqes@LX)GEbkr$ z=Y$8fPd-W-+?%GqR7J{q5lh1_Y1Uk|P?cMYxn5}h@H;5Q$>+c(!#a;qSmEp4j42x! zjrnI7J@hZTdFq(_65X%Y4HxGe^tD~h6Q|jnlJxDt^4gBA?33CZ(<*hs%YmL^@O1Ta JS?83{1ON^uaz6k7 diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_air.png b/src/main/resources/assets/bloodutils/textures/items/gem_air.png deleted file mode 100644 index 1c16c230011af9d78171833e016ba82304d18c5a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 525 zcmV+o0`mQdP)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00006VoOIv0KWjQ z03d>%9xng@010qNS#tmY3hMv>3hM!aiw#-;000McNliru-U%8FIthaL_xk_<0h&of zK~z}7?Uu1_!axj$|BIpu5!9(->VPr=8$wJ--TEM%yY~^gGxtH*keE=#MlwbnIz>!X zg1WUsF}hrAk|@`q<vd#cefFLG=@gC@EwU>BozY|O0{~v0MqkkE;W<)ZtmGu&ZNF3S zzo(yUB4vt6NCGn5uP0Han1tahNB^b=07&;4l1*?*q$g3PIGp7Ga1xWH`wRe(Y=S}( zkGmLCEcpOHnWs}=emE2YgKoFb4r#n|r%dMwrt{=%C2R{#%r`GeKjC#9mIObS85HM0 zx(7~N>lNt9s(kha$;v2OStc$~)jE4R528hO-E<Bd4}Oye!^y4?7;neTc~Gai);#d) zY}~mR#{<WMf5HP_+BkEau^qG1$nu~h)|hZfJm8qf@xT{PIYQL&!116p4`>==ZIx^P z5A;zUPIk@y2d#J@iKR;H^B^|1kZZvz55)h0UP&wv+40~qcyM?B1^`$s2hDjvVzSk8 zP@e~;Sn{zvkOK8eL>^R$xfr`Vpo^+%p^^tuD`x-VD{z%a)!7-Ozs-YhvvtTtzQc1a P00000NkvXXu0mjf%$42B diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_air.png.mcmeta b/src/main/resources/assets/bloodutils/textures/items/gem_air.png.mcmeta deleted file mode 100644 index 3ca39cc0..00000000 --- a/src/main/resources/assets/bloodutils/textures/items/gem_air.png.mcmeta +++ /dev/null @@ -1,16 +0,0 @@ -{ - "animation": { - "frametime": 2, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 3, - 2, - 1, - 0 - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_darkness.png b/src/main/resources/assets/bloodutils/textures/items/gem_darkness.png deleted file mode 100644 index 04d44fc16e8df7486653ea1d26e077929499d050..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 499 zcmV<P0Sx|$P)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3hMv>3hM!aiw#-;000McNliru-U%BACJE7{NEHA80f0$F zK~z}7?Upfa!!Qg*zl@{^gu323dDfEK<O-cTr$=b!%)LTx<HfV4ZjJ(@K!$cH4M`DW z8CHkF;z;OIBt<?*;Mbbt<pIEE`}%kWfRDHBH!OR3Zv+B%<0N7Iym9>c^D7ug_+k>0 zfXw#WL4+?R;o)>e-}e9jDJAy1^$^GoB7E`TbOnGxOeUoS0PJ^bCrA-$j4$SV03iI^ z>0sA&&cUjxoN`E0+`GjX17pnHOoAm$v6bH_`-ZYCZv@m#=NY*^gv3#=;NQae(hX9Q zQBJZ<p+IBnT-ZElj+dvYbC7xPmpsr~yFIAu={$(ZZZ;2!n2pOk$UIm84_4g9h1NMV zjX@sxVn4`Ic)&F=>J_Av14J_qG7o0+fTq!2<>>!`J<3|^Y5#*+JmAD!Ch2+LZ{Zjh zXY-(l;Q>eF%!6g{plw?KfKqBY4@gX=l#1tpFXntf9&iWkOjsU_i9=`7@_-sOR>CL` pxKjN3*;fc<!ey6ckp4FhegMfU$4GMJ+HU{=002ovPDHLkV1k+Z+VcPa diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_darkness.png.mcmeta b/src/main/resources/assets/bloodutils/textures/items/gem_darkness.png.mcmeta deleted file mode 100644 index 3ca39cc0..00000000 --- a/src/main/resources/assets/bloodutils/textures/items/gem_darkness.png.mcmeta +++ /dev/null @@ -1,16 +0,0 @@ -{ - "animation": { - "frametime": 2, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 3, - 2, - 1, - 0 - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_earth.png b/src/main/resources/assets/bloodutils/textures/items/gem_earth.png deleted file mode 100644 index a8108ae97d54ff3de5ceb2c07e07931e093dcdff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 508 zcmV<Y0R#StP)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3hMv>3hM!aiw#-;000McNliru-U%8FBqsf7^?d*U0f|XO zK~z}7?Uuhz!!QuWKSycQ0aao_{exgeeJo~%Zae~8ht51!)VURqhy^L?fa*#xz(uxu z7duKAN`2$$zVrEf_mdTVEnn?20K@siMFjxQkMl1WcK?(sFm~i5;q}$f^1r-)vWb){ zCLsyPOuv~#xndG7all|S008JpV}Z0zWF}Frc!>i5)M7GSX#l_isg)$*8smy39{?!# zbPC*m?5)7;GPABjnxyHJqAXFAWn(4m71~(pHp)C<G9DiZewvxub0GDB69>HlJ(<tf z-yroe%DpTTm&muyiOGX}wHvjagUExw<iTdWwE}PNZrbx8q`J;LNJ2KQDJJqD^5CEF zAeA<bTW4+>Ssu7zH_5s1Kx$&pE9gqs5RE*DJm|~=nnrV#gZ~HSC~wx=cK?G;Jdngv zCH?cj-9jH1JM$n3;ekZt$b<9X!P{#A0GQ4u?Rh|AvgvFR&I4C0`B)xEfo3Hl4}4-S yre7XVqkLEJ@<6(Zdw=m2xJsnz`Wd9t=D|14o3REj%|V#}0000<MNUMnLSTZ`DBTkP diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_earth.png.mcmeta b/src/main/resources/assets/bloodutils/textures/items/gem_earth.png.mcmeta deleted file mode 100644 index 3ca39cc0..00000000 --- a/src/main/resources/assets/bloodutils/textures/items/gem_earth.png.mcmeta +++ /dev/null @@ -1,16 +0,0 @@ -{ - "animation": { - "frametime": 2, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 3, - 2, - 1, - 0 - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_empty.png b/src/main/resources/assets/bloodutils/textures/items/gem_empty.png deleted file mode 100644 index fab0d2a77f79411ae57f5b9a2a55dbed22cb79de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 315 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4q_)-xzH&6Cpyif|Tq zL>4nJ@ErzW#^d=bQh<W&C7!;n?DsgOcuftWQj%?eLMJ?3978NlubphjcgTRpb-$p} zR3`1D2W)$}xYJii+_ZEmcRRANh?(sON60Gmh=M09?xI@tTfW4}99OIn>N_vlu<G9V z_Y4JgSM*ny<SIz~)Z*F^7v}l5=(Vrl(+v$w9wo8f8ttq#Ysxwk3T<5{P7C1Uelf?J z<&2DLl+i{u<qhBE?o|g%te-G{UE<tzuanewac^#x(YwlUqbWX#YsuY(Q6EJ=Sx$L( ze@o-CX;WuDoa5~`HC<=jrxmVD4Z00yXN3McoxaJ%`TkGdAp7oKRo#D+fqr7}boFyt I=akR{04u|DfdBvi diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_fire.png b/src/main/resources/assets/bloodutils/textures/items/gem_fire.png deleted file mode 100644 index 66b0cf837586ad021c7f24a593d64b55ee449452..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 464 zcmV;>0WbcEP)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00006VoOIv0KWjQ z03d>%9xng@010qNS#tmY3hMv>3hM!aiw#-;000McNliru-U%8FI6HV4#Q6XK0bNN% zK~z}7?Uuhz!!QuWKU-B*ONfyP9sp(V>i1!0?;~XI%=>utVDSKDVnmf%vA|+i#+=<t zlOUn^q%4>F&hh>EDFVU#?yv^1>7H*s0N`cYeIc=@-U|@+%Nd3DcbgynxAzm7NaW%u zjDl#XKTRTXaTM-*k7IbJ06c8FbD}hf$i@5K1Hf5~Bnd*IG>N1Nb7cAeK;);#z|Smj zon0qtWbKsK@YG@?M%pSbRC>ZAAyCvHmFhr=SzS;}-*kgC$tX{<OjM#v>nu|q_}$@l z=o~a2%*g|n1?p>f!1=n-Jdm7?YdmN?SO5=JrH!N3S#f#b3KiE2<AGz`zt{zpK(z6o z@nAF$9I?vm|ATat-O&GoQ9N*!mbpLSfvyDWId~vBJkX5?i{^n1@60tku-Vnj5FS{j zkK}>9P<2z|fn~JK&dLMB5Eu>*Ec5=wE*Pe7x<UHiJopB*hEWW=&py}y0000<MNUMn GLSTY!L(DJ$ diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_fire.png.mcmeta b/src/main/resources/assets/bloodutils/textures/items/gem_fire.png.mcmeta deleted file mode 100644 index 3ca39cc0..00000000 --- a/src/main/resources/assets/bloodutils/textures/items/gem_fire.png.mcmeta +++ /dev/null @@ -1,16 +0,0 @@ -{ - "animation": { - "frametime": 2, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 3, - 2, - 1, - 0 - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_light.png b/src/main/resources/assets/bloodutils/textures/items/gem_light.png deleted file mode 100644 index 3cad4c546c44331af456a29cc8552b3ff34c03a2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 502 zcmV<S0SW$zP)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3hMv>3hM!aiw#-;000McNliru-U%BADIsHs{2%}T0fR|I zK~z}7?Uu1>!!Qtrf0<AMF14mkCEA_G$fI;FWb7k!3}o)3<T0#0AyX&2M9{5WdPY)o zv5eKBST`Q}Pj{!g4+;EQv%lN{Sgv30KLOzVb^Q&?p5GdQfL%FB`1H7R{O6CaU?Aa( zNk{@R+iwREzL<oo%?@Q*0sxFLI32cqAUlZg#jDK@0D3W*F$Mr|I&7UFMW`{pnDYUE z@NcJsRaH3$yRLJ}Ax&}X7AYm9ls7X8mN3Q^exvLg+P1wCP&1up<oXa2N4<i73+GEW zNJ&OH$uflk4Xtxw^Pt&Z9>&f==D}a`Kq=)MJRXnZc@UG`WF8bT8<%;Ic`ySWEVzve zt#fD^gFNuXevrBFfNNsZD;Q&Xh-MyS9!%x|O{2Za(f<Q`l$BEB{s)tIz=^p`((}OI z!XYkB=0Op|1CGd<2lL=TUDp5rt@U^wkeEzs9nS+_%=v;m;11fEusj$Nht8zs0X1r< sgh3u~rTF!;uMo<F%P!3z{cj%p01;xzuVK5Sd;kCd07*qoM6N<$f=6}IQUCw| diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_light.png.mcmeta b/src/main/resources/assets/bloodutils/textures/items/gem_light.png.mcmeta deleted file mode 100644 index 3ca39cc0..00000000 --- a/src/main/resources/assets/bloodutils/textures/items/gem_light.png.mcmeta +++ /dev/null @@ -1,16 +0,0 @@ -{ - "animation": { - "frametime": 2, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 3, - 2, - 1, - 0 - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_rainbow.png b/src/main/resources/assets/bloodutils/textures/items/gem_rainbow.png deleted file mode 100644 index 2ee41e32718303d4084e3e736345bdf934ec7f55..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 422 zcmeAS@N?(olHy`uVBq!ia0vp^0ze$V!3JWj{>lra*pj^6T^Rm@;DWu&Cj&(|3p^r= z85p=;gD_)LH*XYBkiEpy*OmPqr!>2fJokMqK?Vj!V^0^ykch*{DGg1lC-2{2Xkbu~ z@%&RwQbIz)jOc}b=QDDul*go|9AGkFNt8-GVi9m;{+?frR~6h!&KmR@@ESDe^yP3U z?@F6-Y{|F%8f<4)r?g48fJI7rUnIn-8h0uB@Q5(E1?3!n#?=*T@PUn|DPn<_(;}~+ zWnO8A(gYU1Inxp&7c=)yYyTSunVP4LFE1b0U@P%HEfg-dAlrrg?xjs8I{X|r`_76U z-e|L+UME0Rv3DAK^Hv)R171@p*-aff{1;3YF}LePO=E8X+S2tfLhgdS*osLL+)g(i zjFR(tyT2*Pp==>v;Zw$4ZY2|9S2!R3)G*=gjTl3j)6Bn)GldFW%BVDmIL-Wc-%Aa) zIl8A**4a2*@8CNpmU?M}jY5jGSvb$}PYwSzI!tXb*>akhfj?aI`#tk5{lE}q@O1Ta JS?83{1OOEqqBj5l diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_rainbow.png.mcmeta b/src/main/resources/assets/bloodutils/textures/items/gem_rainbow.png.mcmeta deleted file mode 100644 index 3ca39cc0..00000000 --- a/src/main/resources/assets/bloodutils/textures/items/gem_rainbow.png.mcmeta +++ /dev/null @@ -1,16 +0,0 @@ -{ - "animation": { - "frametime": 2, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 3, - 2, - 1, - 0 - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_water.png b/src/main/resources/assets/bloodutils/textures/items/gem_water.png deleted file mode 100644 index f042df5e6705f5140430c800691b38ab940e38c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 484 zcmV<A0UQ2_P)<h;3K|Lk000e1NJLTq000mG002-31^@s65UceK00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3hMv>3hM!aiw#-;000McNliru-U%8FDIQ?OGp+yt0dYx0 zK~z}7?Up@m0x=MUpDhFwRvM&KxdGS74I;|4h$BR_lo2=JI(vguk+z9kKt+n(Vf{0+ z>jkHX)*~UI*?Hp`d;G}?tyKp*2e4efn;!r;?$%d0_V!UJFcvvU`0~8;{9oT^HjxU& zBqRZu>vxl=P)x$@=PLl)el^%{PPasE5*3OYAsjJoNdREKIeAGmShI;fK*g&!fi{RY z23|X)(S562F3qnmMra}3X7NUKD=ZeA#KeOn?E@!HJOz{J%QZ+@Mmfu6;t~yAXYKN! zI@qVNb5MBjmprIzKXA3Wg9j<qJ<J20a^ngQ3J)g0gPC;W;_GbLX=Hg2ihU+bhX*_p zP3kF_cGn9J3J)^yfToeAaMb(29p&c#i1)!mJdngvCHZ;KJ!Rw;vhqO7Jm_D!@L)PT zsB7EK!5usxaW_mOco2#uAIk$N(5*z|!H}4X$;$)UsG$}Hc_6hC_Aj0SSBX?zo<aKG aJop7I9CHaWkJ%*v0000<MNUMnLSTaA^u#~_ diff --git a/src/main/resources/assets/bloodutils/textures/items/gem_water.png.mcmeta b/src/main/resources/assets/bloodutils/textures/items/gem_water.png.mcmeta deleted file mode 100644 index 3ca39cc0..00000000 --- a/src/main/resources/assets/bloodutils/textures/items/gem_water.png.mcmeta +++ /dev/null @@ -1,16 +0,0 @@ -{ - "animation": { - "frametime": 2, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 3, - 2, - 1, - 0 - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bloodutils/textures/items/guide.png b/src/main/resources/assets/bloodutils/textures/items/guide.png deleted file mode 100644 index b7cb1d9995aeb71ec713bc64f4f5dfed3acd7686..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 421 zcmV;W0b2fvP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_000McNliru-U$v4Bsr~Ih8X|=0WwKM zK~y-)m6Wk=!Y~kqzoQJ-1>PVMZ_uglfW(-+j8)XNdmjR!j$voC)R~o?87XhzEOijl zbqG!k3Y6Y-lKuU6=ijzWR|{f%y}a??7~TO|l1s0^EpR>>p&|q`%DT2o5xEAwj>iB5 z@6njIB4?aj1?|*%3&5!pfKTr`R#GsSp&~qr@NL$Ks0g8jx^AM#0AQZ95zJcHdsL*G zKZS!?Wb6U>cmj@1gQ_w-RnzngR2ixg%sAFHG!40P91aHtv2yMl!TSyl-nSzqLew?S z%O$yUR8@6u<76@+caHUJc6MlS_6TKJMpad8i-L9Hg3W>V-H!c!|0|M!09lrGYh|B} zsYr}i^%6{Nq)%kC*#NLDieB*MO-yYqZ|t3}7QJsl%0C_u_by(G^b7a_U;d{#y6!2J P00000NkvXXu0mjf2H32= diff --git a/src/main/resources/assets/bloodutils/textures/items/iron_blood.png b/src/main/resources/assets/bloodutils/textures/items/iron_blood.png deleted file mode 100644 index 5e7ed49b9678cb427256a69f4dd615876a69c2c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 286 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#9;Y-nr&Ve33y=YOJzX3_EKXmYWXRWSz~effQLwa8QQQ5Y(3~mWUle3#Xr($% zUFFhLqItr>^ZGacvPIvYTFC!%o4a-6X0vzapGt4Jk~)o1;MvT3mX@YBoO449KiBP* z-*bP)2}zb52i;tyxmyFBH9yE5T2}8P%<2#w8gqQ&u^B2QmG2)WFkFy0{J^%?(39hV z<@xN`7ZYFGq<@%ab$;@Mu#GyYh8~TIZcVSMpQrq74eE{RlDW5PVZY-gwWS_HR=$hQ eIdlEe-OG>~mbt+FX_!0EBMhFdelF{r5}E)IL2LQ| diff --git a/src/main/resources/assets/bloodutils/textures/items/sigil_advancedDivination.png b/src/main/resources/assets/bloodutils/textures/items/sigil_advancedDivination.png deleted file mode 100644 index 0afc91cb7af6e399bb3792db4949d31259022557..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 616 zcmV-u0+;=XP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_000McNliru-U$^60WIAkM3?{o03B&m zSad^gZEa<4bN~PV002XBWnpw>WFU8GbZ8()Nlj2>E@cM*00GQNL_t(I%bk<4YE(fK zhQBj&XYP7;V<kkvynqBDVf7_!QduaNN>CJ2h^;RW(gaN{C|0SIU?Dz%nhhy@0L5Ts zvDtg??%g|cEH*c~>?*{+oCDwd|9@sgRRQ?&EcZa`%ENY_Ge{ahcV$JbwK(S(mL;l+ zh=2$HpL#v{C*bPxvRV<+R*O0WG)8uAU*f^*9{|6BCu)GEIq=S5tz|SE((<02waMuD zt&7+s!CH%m5JH%8kWBj#Y?4ro$879b%JLh|dphkld7e|0CDs_CDxECzgQBQTBQ!lU zw}iR|5w_NsSf~pa9YcGOdoRBO&^tVoSqDH>Rcx&<&6KtARv6bu_%xls=SDcu)7_sW z$z(L>_es+f=RJw{7-J~@2591xWr<Hywr>Q$0g)%~C#B|j&gX-J({-5X4h82NF-Ep; zUVwA~+KZ4bu(@`gLBG$rESqv`=0#{ac>JaU;L+{?fXzFX;g8bi0-6|iUwp-ga14~g zA@^S$0T5%H{}NS|>)ozaqY)y45y7P?s!FJ9R2A<%Ap}0|@6UE{ZFN;+j3m|~fEYul zYhnl_&Jk4^kH_r2`yg{20Ccj<0t|{GocTBYuYLg?aLrPb^x;MT0000<MNUMnLSTZK CwE?jJ diff --git a/src/main/resources/assets/bloodutils/textures/items/sigil_ritual.png b/src/main/resources/assets/bloodutils/textures/items/sigil_ritual.png deleted file mode 100644 index 235e6c5351bd145a392967f0b62fa0b1cf764685..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 587 zcmV-R0<`^!P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00009a7bBm000XU z000XU0RWnu7ytkO2XskIMF-vq4GB95Q6&LD0000TX;fHrLvL+uWo~o;00000Lvm$d zbY)~9cWHEJAV*0}P-HG;2LJ#8!AV3xR5;6>lTT|CK^Vq=@668Z8go>z#rh{8iWH$G zdJqxRgXm}R<M>rn6e=jii`tYP>O}=>iArxFn@x6i=Jk+nG&TzLIlcqGd7kH;5mg0X z_i^rl?CPVF1CAkS0Nu4UwbtUCV_X!dDk1_R0KDt<<ez|RtE*~7NVAMO1T;qO?S13r z`DK7#z(X}a(+s?GSZkS#$7J4fqSXT6?w39`NwC%;B7_j;93=C81e+w3RfREz=gX&Y z-qX%9@;ql$6j)=3s<c}zKOBw9S%jvC=9W;`Aj19r0S2g5nW(aPZV7<i&W;>)0F-6P zgZ=^WkNIY2g{rRc-cR8RBOL1Wr3)m<^k_I3kftflITG(N#xVLDpovoy1wKuA_<4VJ zwsEBcK%VEk-`<|B!_0RmIOm8la_7??xkgG=a*f>l@R8wQFx$>TK%?9HKLB`hxkH8W z>f%`dZhid@zm>ia(8PGUbP6Lv5hKNT%!`#X0K^y<zeH8#Mz^cwWP*rbL~v<}suJoN zRh@1i1m13K9qr)y`ntv#NvuTxF@{jr#1KfFBdStW6;GaR$U+AI?N-YI3`e7I?BDpm Z`U%6y*xeD&x{v?>002ovPDHLkV1g2k{yP8w diff --git a/src/main/resources/assets/bloodutils/textures/items/tool_creative.png b/src/main/resources/assets/bloodutils/textures/items/tool_creative.png deleted file mode 100644 index 3722483e7d5f90e1ba6323db3105a75aba7bc135..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 214 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=DjSL74G){)!Z!AbW|YuPggKPElS(6|>?3C!kQWr;B5V#p&dP1p)>_E8p4c+4>yG z;#0ZY`d?B);vc(HrpfdP>vo=4GNZB4<M0Qd%rOR?bH`rEswpLN$xV2DF{yb;L`1); zmSkt|wy!SBWOM$hSaGeCey+0IqR7-(=#-8LJHz&B=cd4)7af4sF?hQAxvX<aXaWGq C%tj^v diff --git a/src/main/resources/assets/bloodutils/textures/misc/screenshots/t1.png b/src/main/resources/assets/bloodutils/textures/misc/screenshots/t1.png deleted file mode 100644 index 35ac670f0fc99d87168f59dcf71a3876739ba4b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 53606 zcmV(^K-IsAP)<h;3K|Lk000e1NJLTq00UM400H0#0ssI2DKcw)004jhNkl<Zc-ri} z`426}b?4W=WH3R11V}PKk{^Nq0X*8dOVmb5lr*+QiJQ2K6eW>-5@}MKEm>omlJ{98 zD{%6IotYmD2%`Z!Gr<4`1`uG(@BXvW_x9~m-#X{isZ(3uzW3cm8IT{}yH#CXUG?d+ ze9!dsZ$0qToA;~j>E9}C52&rn??3a-18RHn&HL2$!uLO{wlBZ^fZANY|E<uT|Ne)m zz3|(iML+vaXwSU!AhhuNPrZ2`wbbupOOHSNKK^;P-~aZ5ODq5Jhp6Gd#TAnJbLx~g zm`_|$@q~v~{QJ;w0i+g8>F=i|`MK{sL@oM#XsMTi{xJ39&wuYBYSlmP{QWP-KO0(N z0-v~Z@7x|gHvIcfy>&meFTHUuw0o#|e*f|H#|QoXGXACEi}1uZPYnm~_#2@;{nq`| zp8fWN)Smd}z0`2>)gM3S@56e)$;98mHz+<DU{NI|IofST{yt8W{o~63;sY*hgE+|4 zS%3q>zmF|>fTn&waWCoL*T;bWHrn>_t%31ub|#knxbr}VcKYRGd%hPih~F<c(6{*g z`F~6_*Q1BH*(~_6FM4gDrTUFedOR#)DJM?)hzvZx53geU*L2j2fB!+==rz{v{n_t4 zNG&xUam&fSro+v5AEM@)QsfUE7G1yZI9l+iOC33-d=USBIBvWBKKwcR{h}j$ImM}6 zB!#@?pb%*Irl;P@VhY*v_W=v=-?G0JeHtY;)rd0?5fcA4`uzlpq`n+nzYm)^`+eG= zQUo8d2z-sa_&Xn=rhd~t18efxZ|~{%vtQB2Cc7JA0!W-Y9ur9sk<^@(cyKtrx=YXc z)MNF0)u(=cgD#xEKkfD=le=f`#1%}VuiY<~Z_pLkq%PBVLr;E?wP8mmtSRh*okNE4 zKz(WPH$7Nj+b2$K6Z?wi@b(~k3miC&k-fS|!U3E*skh$hI$?HwVty`bEA1k(@i>0p zz6<rG#x;W<BrpB&Bh*qG2)5Lwu|XI1?@RkG8y>!8(Vhmthg~4qq)f;yzhB+OvVPFD zl{&C+NU7Jv{HQ*^M}ip(kjq=X+g)~n?>zY2VAF$#1kkvU+9;k%+f(CXG&IjPo3bC{ zk}m!IBlq9$Z`1sL%ql>wO9yqgkvbBdOwANL3F|JvOKALT%F39Us1!=_@A6a^$V|yD zG^69PFO>R3-gdn_e$PmqTc^>p6FCmvy5DD$sJD5TW)-lrI$rgfE)rzpVFHc?cy2Xg z!BFxz_VO^b)Z&cDAmIYzWbnO*)aHT@XBRDegI&ZMY3lK%KKVRwFt=x8nmJb&21Tg> z9?uw|3$a79G<3n$MPYOVw~zP&FbW+AO~wMWUN?4uk3MDcFj?xJqT|(bd>bct%E6Kb zkNZ-stc$m`D1zEZyp(U#0JHgDO&urVcwnn>f%+)f4Me>_bKY<|woLDWHUG4xXsI&P z<82E@i#;r*PMkOIH*C6oW_sxdADJ8f0!z`xJNjA94p9t@TYldUG+Q!FAK*ZyiF-*c zAx{_1UW{*CG@9biF3)8(royY2K6N7ENlYm|ktfjpddJm^rwiE&wPY7Q%Ll#}hPfgY z$%LS9gh6|HNd`;#dP#NhO#J3XXZGv&P&4iwUsybPqEW#rO?6@Pf<J}phnu@n@Bv+@ z3t(A7%WukM6FU>ayJJLRU>sh|+<AXRV=%_EPRGmI_~-pQO%{YkJ4NUM2i$P7KOOtl z6-sdgS^DEFU1q|>KQ{mX|AMEB$ziJmX7r7t@m8G^s-jXs>}q^cCPO+f0xvfHmqv|L z1dbH<vV>e90r+Ajl8zO6|Gz21I|^+ZjqV}0hp5TCQDxz<XhYr5**CohHJrUP(#AGS zGp-lI4TPqPl*z3UYocDlKY!MPHNIZhQ^tQD#ZdsxK7J>O9k`9)&$54#vK4jjg^phI z#V7eG-HX0)t)Bhjc!|VY>4}$cMtw8}e#pSn9)Y19VmB*|7s+gxgts)EaAVA#IF3KO zG%L0(u_{t%aSVkFr&x01O825|k35=FrpROiF8PUeY*Q}BCpw8={Ou1@^G;bJG_@j! z)OceJSG5(RIs%oBjk<Uy9V6l-j3mUQeJFLoD4t$C{vf~Ag!yn&d#;h(gPUmuWH@an zd<`Trb=dNzKYzB00B~~`1aL%|*N-#<e_lZ|tfS|?^AI)sCu{&X&rUlH8s3a(5bNMi zK>*A-^CNqDu{uih!a6b{TT;-^<}<Y*@rY#~DxLsMf5>vGqsCrXNAtX?U$)FXo$8c5 zwNzjn|Ah9Krg%p%1BqT(N2y+9?CDp2`0&z<IeaetQP=9waJo$r&KdN~1m}!!0U0L< ze!VlNq<VlF$Fy-$8=53lJm89}PO*)OH&VjFsbXOXO(Y=rDKn#V;vXgNBxySJD@JN+ zPS+zwft<8Qqq@i3SUgrL+|?PV;S2{cf=(*pTAog$Qe;2-e!e5yZ*p{<=&V*@#&G(8 z+U+H5GtG9S7&D}sh9a?;F(VN~k#x=29l<_@E7OQ6spyDpyVQ$u_78vzILLh+RWMUs zM`+?=3NOy_7(TmHN5)_4&{1j<-b{AH_Hg_KT$x|_-G{LyfhOj1Gv8&4ju=Wt9j$zJ zK(sWZR)lIe148tUG;?(_CL}%uJYEzd)kb=9bb|C{!?d5^PD@8eR5$?xe8g5{uCN!% zqia#uku%UApWWmX@^Iz^83D5fB(ZM`Z+7ZCmNZ7n-JA+*bqatnjWNTfWmrdySPJ7) zrqxT5cE=b2!t6wJx?}W?8VJUH<Tn{GhO&jTBZHQVkRbLh;Osf^!uT5DztGkZOU<k3 zXz43#P4VvGWIG(s%Rl-kw&Wh@>xlIgcl0neW3#R3h=D}}L+KCu2xVAoJ3>Z0dyO3( z`_i@U*n&@W#QNfHgtqX|!*^E{gqlcns|wq2c4Q~jWjm@5t9U2*dR91aj)n<vP?qQ1 zSRK8Sw6hTJX47I)>Yh*BY0kg#$%NJ6inAj+WL3-e(x$q5ivmz$AE>dXd*nh4#SlX@ zq)s;^7bmM9y+YNcIL@OkprkHxg}KF@?j$3k&UEzL&z&RMr>)`Z;YN!$la3gkU!s0S zyR9RP<otdv+Y<Bg?>@XV`{PQrTiCk>{;LA8aP}2%g^PB>a{^+lo6=}WjppeKF^7nV zbbOKrVpO*14otMKI^76PykHZEo4G&B&C5*jBTjALuD(t&6=COOuabc>spx9{IUVmm zQD5;UWA=578<TNRR-nj(vM&}W5=r8fct7lb(Hc*SFX0AVI?pUFokZG=1vCz`$SL$F zO4uq-i%Dn37<yrqDL85EGpGDnikga~HjL9&rsGVl`W@^?zja@#Mu=Z~kFA@EklR3G zio^bX<L&i_bfm0VlpL+7H^m7b&Sz$$fHzbn?Q3A?U&`T9;&X9%kq+##5|SU1{Oof0 z%MjV-WS8!C5snm0<0HW?3}4tTbFRMFuI<eFVpM?-CA8z<nGXy5vckZPzS66xy04T6 zkRA5;RcvfB7)`|ks!VTVsxQ_Z8+@uSwp|!~2{;Q|0XxZ@Y{9k*TyI}|?H+9S_`3AP zmc$odzlU1*^W(=)vM<4B_*%sQqp`=SA~H1@oLU(=QXM_QS<`eVc_PFNn--53q`?=# zfU~b|;E{(MVQo!_ZwOf^OH(YpYZ<=T$&<xXr$XY-OX6|;f(SEOA*B(i<`;HWrOXk` zYaxp_DkT^GlJu~Y3w%7!Y&L0&iy)-?`#N;$oJXhb!0DE<PcU;xyWK@Iy@ZYaX?J#f zU3Y#aW3Pk3F6@90pHlC5*~Q?bB)c46Hz&LJQAzb7j6({x5>oiWy7QZS2GJ6|9c;Uf zf^*U~o9J8Un-MzjFp?NeQnYjcrj&gs4)|d|XmrQEc~X5Hx&x{3I@w{XeufC`=o_!% zkB!N6r@4KKa$@R|Z&?1#lWF1iYI}`fl7P{M71^*-87VSFSu!ab&Ea&zM45P#F*e~y zX5>4`?k3M5GHF3({*fgS!W2-;HO~y$v!@5J5yK;cjk4W&LPPvvC|%q)kGt{6-yKJm z_*2;Et`1ouYI&!`1Y%$Wv+l$jR;9(Im|8xxG<<f}(ViiR@UK`-++*MP5H@^vUAkk* z-7VdvVh{}uGlF^<2N;H#op+~Z>t}+z(`(p>-Z7+<cG#T?J*%DX)C>(H-n$v4>WL>g zV4TriY}W15o%TvrI%iHZ_MmC$&>catJE!02*-UpX!wS#%Npx4FoLVQ*n#ssvsXuS} zG}OLd)7_NJ&|do}(jW0B=J@4KVj&V!Q|+C4Qc0=BGUd-mGuDg(k+pqO5hux@6QNgB z7I#t=Ps2iL3=}gwM3E<@!OFrcAIAAtVEGteXz|;1>_Z)0QD1!BWQZ81M<dIrM+dU7 z9_>dK#bTG7>xS)NG_^2ru|k~V9{okMZB8<#!Uh+dZN7dObNISrJsRB|mJ{0K%oD_z z3foxz%0K@oHTyRWoe|dXX|nFTSw!CzDBupm6+QYQap%XxqghP<Ny_|D6(gH>*O+Sa zHO{CEpGDn82R#q|b1B0YafMTW*00@G1Wuj=>M2=e%bbFgPMe)lWT>^-f^B}i`viw& zB7ZY#XC;_ocr*(1)rxwI-<&R_f;|>_g_vW=PbwL77{Er=u!21n!3yIQcJ3PVzzh#| zLcM`Ub|g@;yM`W(lZmZ=_N3T^3$s~rCmqqFy>}Zu8loq2d*$~&ip@xGWX4*)>e5ys z4oPS2(U8hI_87G&7Czq6jd0aW7ExN<@t}(|wnrYZ$9iPvuO0rI3jgR8ZQ}Rd^a`gj zqIawWqf}nDnU3SJ!XR(>WnzWh=YcxHQF`<-RW^ZIW&%yATpmkiHU}uqG$lJz$)BvG zD#LY%hjnYiuJW*Yv~Pjntr;$p31LY`%&0*#9t(#wa<GroE=G=Ovq~>Rj@oJ3vSM;W zM4u(xU>R2`*@$)OXCu2)7BbZh9pV}I>hFCNn?(<1kH*(ReUEXcse3G?2R2mW-DmW` zkj3Al-KoFFr%N)H*jZJONR&?QnH!5S!0$JIE|H`bGovV4c<eK^E`f>lcnSq6&-KZa z>#Pl}Dayz;;=Z2FgdjiQ^jQ_Tbo|ztLGZ(VXB7O9`0f%*_I5&7Zk3jsYI*4Xl#;ET zkyM?OL=aXHW?L9(YYDrE<nXA|lryC-prjy-j(m?V#&*Z}0VV4I(p^q%RODe4n~FS) zVq;1*F|=XI$FNm*YA+1x&IJuDhamE^+-GPXuueIttV%RXbN1M=Q|E1#a>D^u;9H+X zLmJtCEwI82481z_-=^HtSh^c`bs6bIELb-FD780IXOH<#+2)h(6eG{(W^^j8J4WCv zTetqW7duq<7#tiz%KQ$c7B7}Ryr)+Jke#4ioui$#6ZyHQ$WFvwUN(lT4BTY+m~Ghf z_f$k+_CGX2T;*!kf65V8>le0_@2wHZTh!^&Z*(T5%Xk<uF-2i9MUgSA-%O{m>oC*l zJ0+f`fBsR!*)+ncQDjPy{YHRtj!q>Qot;sz(?xg9=(l61Sn={j$ITjEErS?%(H#?0 zFc|;k1F78a?9}ep-|1JHJALfyAELJ43w?)_K!df-+EB|rehOiww$nl^8x^oy6$T?a zwHYps_K8|14LqH7o(eH?T2+i=I+rwEX*|jTiL(r25if;KV@~sE!>L)@lcF;>fWY|C z?iPWwb>JNFv&o3vaWK>u!m1rE45X_4N@LN4>54b>y8)eSiA0zZG`CZa>&eRN7Zvtv zeNLEL1_Y!ZUMTyHc(5;Hg@ox*_RHSlZ8}~0#j}kEq<-5<>SQTaU-;Swu`!rn#vyj5 zZqsjLr}$FXbI!~>Hm0zX(#|N)^c&w%QNP^h`;8A_vx#4(e$x(SFF$|eZcFfPQ9@Nw zC{BAc4t}~6<Y>E{U3QvwQKoi<eW%r!6{CnJYg<j+p6v29c4ms5eSP|@{L#Z%`8O@4 zC@INXR8$}lqH76V8mhTZ6+(&KuL@!9fiL4?U!+Ir*xiSyZPqVs`U$5}AH#{)cCu0t zzoS_FxTs$@hiUyXBwBma5#j3}#I{2;Y3=t1AHnAD_edxA<&NQ~*;XR<OmkpV(ys|d z8}zFO9J4A|CZn*8l*^dee!A`YEtnjm-=YxSj#0cySWc&SWk)#B>E*3R2`@6fy!_8U zdT0ZTKK^9wY`%7}oy!ASq~lWtT1RQ<BK$InBIxCh+$97&2}I}^HT3<9$_bR>2!0M` z@ypqDd(cTycuijt8VX@53=M%2BBAkI!UDH5Tr%G;w7Px+mw=OQZftt_kGJpv;~~*6 zjuVb0N56F5Ct_tzXu?p8x{g2hv0v<3N*~OP?LzE;XHx-!<j3QdMXiyyC?~l<{aSPq z|G4d&v)xs+v#DJt`xS~Chj6iY>Ds#rd+5?YXw#dBREyr$qOObj6+mY7i#eBH{r!*4 z&Hiz=3^Fmq@q3|#5%-B*=5*VThpu#;#<E8DR3cgX{%o>#Y07q~F{sE0<pHo%yrxPZ zQ)9X~%NRc-?8Kklw(__wHK$}JnJi+bMCEHPrRxzh5n!cj7WTXBdOiYkgtkPmTNK(- z990t^)oc&4F-Yk;17YavoFVK(*m4${OvG-Hr6dwkZ?lw~(KuvxE#q>E$iRjYDbPS< zfIJk;56-TSzX^-~a3I-GLS2ghshEcnW)jvlpMQ#QIw`jcA<5IJc^a_#tzXF{=^FNa zBubf5`gUzQWZ8dx_4hx9P36(>$^F|OHncOOB$?gy0%6oLU5n-gGGEvJgr|JY)3CUm zz9B<Jp-O7k8{}(CItoUj$j<}DDKo0lFXE$iUBzZmp>USLJym6fC)q1aA$As0{Ip(+ zA}!>XL3Ma<HtQ-A<U0nx$dPK>!`LD&4QH_#s62wFz#ufpS49h^z-^SnplT926&Q&B z6(fdH9AP@8>>E968A`?^y>TzP9!@wSCS;8@KDBlJPixgEV-tN>uvsGASIwGBuo%|i zaUST=FRMjHDX}wHb(~4hI1i|QL+P4&U%IASqqP?d$;X5en1o1R_CzG&Sum62tAFq@ zZ1C-L_%)hUwQKr9gHD6!De7b`i;z`KrB2mkbJ8tii%@<XG89v_z@8I2z^ZwbMwm)m z-~zuv%s-h1{w2}79hD`mLF}Ikd0{I9J$2*Ge1aC|RYmgC29Z32f~w2BXYQ=+0hXhW z7{%3!3WZy>!cA<O>gpdT^aB9o%5pNrej9V0igK)EniX!=r3IZ10Q9Z<GSS2kKgY;V z2_k8WU+Eh<bNo1tOp--WJK5f|J0P3MSbP26tcxM#sH!lHkagtogiVMIRqj*FIG^l2 zBCvbt(}=-$G5{Q^-D7kx_I_ZI1^7}d5|=Y)ED~^JJzbhf=;OzB>OG~Q%42#$2Ix|+ zowsEM0u985YWn@9_mtm?^-ljU(==dktoV;&CSb2KGaRM_6SBRtlBW0>uzU&N1kyJc zGZCc%_W8LhK6rTV@%IlI4n$b$$q&HHLhG9qEv-X4xm;o_5U_O`=lcJOIFQH%!Mc93 zG~-J49yiuI^SyYwR^xp=p*8tXV>2hcF|g<HJ3Ygh>g0QRn3H_QtZyWZS+c@si?B|q zybj{r)B;|fJaZ$rs5GsqG_$ERntK3yC1RK~`bpuJFvI8pE2XhAjo~s`_fQ_cVzYtW zyR<^BcYR;7O2_Fndw>H$yfK{+gc9uY3=~<pgf-~o*AAwBje!V*n8%z^$N@yOjB)}I zC9WA5NMaCEsFMEr<;TDF?#GwL_KTE9hE6ij#6QH@1abeh-gzAcvCn-_<y@<lCs<_J zwdmn42P!RK+G>~o8bs{k>5|*Mv-hPt8DGVo1)X*aJyS?%$o@V~ni3myoMeVX^k3=k zv)UVn<#&A6OIDezH~*WjesFGNo>|_qxv_d*tg<|No#nA~a#Y1WeX=8l-oN(2rOh`! z-xQNpP;ew>R(AU`(~}*psf5tw$64=k04FEl`U1*lgnQ025Nk^&XZr}t^#0wXDuO5G zxG~(hG}yW*)JKUjl1OCso{e!bl!Ls6p13jNh%hrn_$XPZ$jsDi<O&0rO7pr)Q@hoy zawCJOwEjV9{#0oSRcZE?!l`Dwu)<!kbytm&P6nxn;22rZhLLD#bWS!v$3FlrlD^*Z z$sv`9(V?471x?#NDZ?$r$i9~)CY0gU0Eh;_4$EiOgH75*od^<U_;~y4@o*nA1<|l+ z0tpcW107n3k6tsz+!PWq5MdB85Y42@K=gz1_gC7!pPAg)*GPz%iPtT|poM`12Hh(& zz0~<3@|K@N*!wa7{6LorZ|Q|X_){pr3SEZzS)UXW5@We9WFck)pe*vB$YYv?Xg))< zRvd>e^HN#p1!S9oc`s50ic;W{G_ZbvE%QJK!Z25o(DGkH3QI8097d~zrf4J-aAci8 za`UNa>2o`|@>g9<9?=22WkvECv7pS0R|9W4gdjHt9TkQ=<wbmAw_7&mN(OWp19<k^ zruD~B{4+9sZN*^JCQs^kY4&(FaoqqfHD4*4vQ!$JD<#2Le6AK9{7_+Z@PkFM$qc;g z$Y_@H$k<B_h{*<~$h2$5aB^WWZ>-!SSj9%9pMxJtBzLFagRN}(@G|J<G|6$HMkoC& zWB9_?Lxc+dzE|icf)CQyWGhx0<W%}00Ft<a2mB%QUg3`@?1PDry&x73jU)v?%OhjP zr@65^3Il+R3EhRPP!j!qDr|@zH@%W6QxIcx#z3h7&=_Q<8VlJb1W^;-$rd%YWe$UB zJQ&H2<6Qq=+E<w<1|Pt>s9226L4Nr-a%s(4W*#2asVxtSSmf7V`M}ax;unZ7K7c@P z4`4o1rD=+pPKjUHIuACX_`6OXiYLo1jU?ukPzNjyC=AMl>zz{9>;+-&8d{$RFJ9z% z$fTfwbv)#{sRLkJ0qjnP#y~Sdu>~xgsqwk&c=|kGiTN@&AJ02aIC5hkP%2#=Gp_m$ zpj1Vu!WmeNM)fu+Q`~1t$rq=~cz?LAxK_3(=T|-H;&Dusr0Jr1P<9<EcXE~$4%{9Q zoR3Eq2@N8`fWO$Q_^>|;=l(=n5B~VG+jvh-v_YT6QYh{?faTnJ;#(nUfBF5x%8B1J zrw1z7eqakbor|XJ=V1PcU0^Ju&9J_(S59uMEKrZey!1$g;8Nxvde^e_qZnY~{URmz z#pp*-{PEEbjh4|50nq#))_YvxBL;T{9}<8FJt3}qrPamA_rr&m#sG*`0?czX2I`0& zTu9P7!U3&+_L)xiPFo!Hr2-H#5IX{CHL3%kF&rul9N$@K`l5MT);ZlHb$v1ztUFck znz1)R#QZVq0__{Y33xO<$sc54A#^Wn!sTg4i|6#`G#>V;zb2&`7AYpoMvs_P%#!ZK z#dH@w8sq(3hCQ$V21(Vd%$+o6EVfDf>@UiZe?p1xa^<C|S#d^Kwj6^$F31^}l$G-F zgobAYeMF|<g9eJ#&{&C!Qp)SR;zK5MPb;D@r8(g?a=EB0R<9mMT~KJ@BSqo2+2G&y z_}>6t>oE{+S%4RN30V>Y4Mx6QJbiCX(o`dF=0=Y-9HO8qd>9EB$?V{pQm<3B+lzKv zeCL<>*^GM_`k?)T8Gg|2Vq-@O`Y;bHCA&%6&uI+nhC*gM_6aKkKv^oEEO-#;=V-vA zzaV4XSh|e#ZY=MGvDY)<t`PsUerX{3%<U=RB0Qbe>#jv)#!R8|v<{Jf+8Ac;k+DHc zYJmR9G8+bNf(!mI=W;@r83_b3GGmZ}x9n?&mKHe^nedkMiZIZTmU4D?`7x{kh_piZ z=jGa%;)V>p2&~Ct+)3Fuirk_XDwr^084f(fm)~SD1GLg)+z8XalWuNiJqo$%<SJbg z4x-z<b1y_B$Naj!ZgLYo&D&}KOD1!~`SSiWHGh!$DO2qY1^yaCm9knwS(jZ_QAp-Z zmWm1)rQ4k)<JnZ}IQOmlrl;QOoc=8{z}u6+Eo~lGiLE^Od1_B(%TG~Q1B*1rEkjzE z^C8dhmSWH`z2TV4JU1d98DAKM+Js~}9&ICQP6VH+67dsBj?KeZPT$}7>Ias_f`4VU z7t0w`c4~s2IB7#Vyyyj6&VDuqG`Gw*i;h&q+_LVls<}m)e8}pPH2JK!AJT-^F9eyl zkL;x~$KnhMXLHu-vkv=Uy*R!XWF&KP&*KU1A@q^h!I&dLpX0Ep(=7VXohH%e4S_x) zIQp?~M2a>FcEm(W?;4A&C;E|los1}AsjO01M@64QC05})TGpxrZuT7|)68jd*oTBH zjml(k5@R^5)nyE{PJ%3ds4Q@LWGwlYhAkaRrzu)rJ!uFC-&DuG<XWXWRr6PnAj9k( z-$BWFj2>2Hi5N+(<i^qK2DLbdv@S)x|$I%GP4yLDEj?Oje8X)wFCmnJ^b5gwhO@ zjMx^U_iD)aGeW68%Yth3RMLm0nUk`zK9A=_g`TanYIU-#xfLIY2&a_Zpp1QPOf?sU zt$HGtzwRd@*UM{54r6`HED~#(QyE_@LyYM!fQ6a+XITVp>aBZ5$Y@7V%qilD_kvV} z4F%cAh~R=KpY<ir2KpqyE9YZ6S}0Gai%mR7S68$rJ{c2_3O!Hwj6D)KRNCkVJv<tT z&PaAn7{g%7fAES$-crosXSTH9IwW7%%AG8ZTfTH`7&M=-s2*gJG0a0JV_D=aVE8<y zJX5Fxi|^LBCqE3v95mI;icg<9v_z>FW{sdDIn-LD7{1s<6uh(oedI7$P#udFC5DrQ zr&vn$A*(v}QqiB&n=bzo%Z-z-JY!9oH;TQJr2DlWe|&DlA9RpQQeU<^`3PjH3Ue>e zUyy1V6r;HeL%IlPszZ+a!kXgs<SHlYIYmYzDF@5GGYJIa+Sw<bI~`jrbAPemip>4f zmUt%^4pYhd{^U7-{+vrrD30M)^o-IR7Nn=mcq$oE<#F`cDbHW%;$X~~x{?LuBa2(~ zRTepdJ=ka5q5KHWrgoR+mSdsMRDL@Xy?jxW)uPH;kIP}mwCz+~FC&62k!CL+uuP#! zWml!biYr2!d35v1V(&_`LbDvp#i5_lf_qMr#(b9`$+0?T*W8Y92E<ul*89(MzV2~) zm&n1C@^D2?uK1ZUXa+M++S2m|A4bsg6bJCKVM*m9`CY_v1_^o|6O?Hhdlcfqtvp2= zGISveJz<+00X=K-joeJ>Jb)J@n)Vd*7~CUGLDK)i0wR&USg9!a!LaoH^&fwHX~aDW zsjvGIy$(z2ZirG?Uoq*81sXVnPO8ILMo1$GpS7_ILcTb1>9SKzzGCv>vaeqn259*P z0*f3JVp(cRZ1+Td+x4V8Zhg_Nn367%4t;tG$_sKFFcDHpAQQ2PX&A|`2$^A~Y8V+B z0&@LBY{}{4P=)}}{4Zyd{Op%;DQx*=W6EV%xg<_zV3uL!T7=aD%yX4@Io1SvWpL2r z*kln|iV3X65_jAsCWW`;&6t!EVV|gEn$+aG!$VLN_i^mE4F-Ht_mDvzggC))a-Xx3 zSSV{F(tdda@wx=bq9)0PS@lwZ%uBEr=COWB+I!dWJO;>>WgX_Plu;?6h~GO@iHisM zIs<x)k<c-d@@lm@w$|m5!X0Vgp)XE(6g~I7$i^cfqshjzKE4$0Na8VYhmx{W#KR)J zuwIj-SVlZFy%a5K5RZ&*VR%726yn}O@k1U?{`H@HVs1n{fxOqpN@tHu<Dmb<d^+J1 zTvSh&wGeR_bE6M1iA}*iO2KDwc23ZY73LpWHZs<eCE&wIqR2%W2^zPSGn>MLpu7{0 zVVBuUOg|z8J(xky494;`p)gbWLwUdSYdq#P)SBm$CMTAewP*nH6H6W+bXY7FxR3`X zGQj9|q{rh_KW1GC()=TTHf*O$_S^awr1Ml#!oh!aH2zVB_2U1LVFprFAP6AD>HIPb zSMJP;q`+~JNQan`R~MH>m0xHS%_+xhM477+k7|xZR_IZUP}j8{SEo7Cdc?p%rz=v8 z{>pkprBn3a*Ycy<YN4A_c~Ua=(3TF8>Os1IkZ3mcEs5)y3hN?qN#419w9?e4rEcAe z43tXU!gq$M9?Q?Bl*w9Fan|COh4Cy7VV1(>Tovp)!L5vYx`^Y60%+tnRyL03XakFQ zMTz4PkxBA{I5^+e6+a*C7%j)5!qN7bb!i3GS;NS{rA4nt<kCu5cQVekly&E5;Q7ST zf`Ny~do|lE8LYv&vwpx4e8}*TU?Y^cV^Ws^8EE6djk_1_5b+d&7oGPMki_aT$&#Rk zVpf)T;GvubASDvRNT^KHx-bIq#1^mc4HJlmOZ!R-lM-gMaE9=(%gDCWNN_OAzopxu zenSG;`XiFF!`!ah7wQ$`--NI3HENzhjYUc#aqaRra3mNMfnTb$9_W#A=|Lzs!7>Tx z^$B4Q<Val??V4jAB5;_|E)XH;sHd=lp7Iky?^hKwl7dPeO(jKGK)7!4ePK!q)j4)j zVA7*8d2$eaOEKNak<1HeiT4O0QgH-JDhf+#Jz8>)tISzSZ}K+<guMtcGoU)D>po`P zq=xk4OFu|zPo{8ia@I>VDrcPDUU%tIHP49UvZ<9wc!89V3~}0IWd@weTc@uOijH3o zo0?p$b)%P-tq>`k4OkY)MMENPlinZsEgN!B#LPob)X6BV2JT?Ql@YsRBbNZ3N;lTY zleK`(GSA;sJXryBVxJnx7-f+w3p)6PDp{ujbmsPrpL}9zF4h54D1c7*0%>9$n4;C* zc6zMAsJ5<iVjY@8R#W&{5NkMDoe!nMR~IUIsN<|j>PV*b&};-dx&R0nGEe`BdR&W` z>m$LJk(Q{mXF%3Ac?=`17W(XwZa8`eAxQt!<c+`*JuPEnFib>)ELBqNLI&eXI}@E% z%+pF{?_YoU{Y#V49rAOUutV93*Bw|of*A48F(#wn>7$5FF(`I?%F2@GC9^FlBLR~z z+d_>fd1<F1=wZ8x++OH!l3WYDP)zC^2P3_T3nkMNr@xR=b~Mx_4UqvUu_UW*C|U<1 zwvVOUMOk-+N|U<Sq{xhs0F#0cTGfciQE1k0TcKG>O(tR4IfZ7urVCHnPD{W0R1<&< zv@ks_L`Jej{bEU;b@U>lQz_UYB-!Lg%tBg<xZoR^I_?<xo+>1d9AjwnNYg7nTH@3b zOwN)YQnX5f5S@rA1gT;Ey&^yN)i`B6T>87oaA_$im#W8A6taW6Mn&+Dd^!@lyI6Fj z4@<hS=m@FsrX7xaGU}`c3`07PQ3pXs8nBt=h9zfUz6+0e(gtIK4i__%XHSZCOwc*i z!K<S#G7HJo;$a<n?krGDVI2|OA;F7Qi#?c=X0OoYrX87#Tc@?L{#!cmXnH9jfaXDw znWb-3VVjYDm{q7N8VqBm@G%p6If-B>yhKs(UiTatFcE;<sU+^m^nW>+1FS5YWXu*a z2a9f&EC|wyNeh)|_@8~{{Y#V9ecE*cerYj3?44z27OA*N<2ok6ob;8}BqzYH(+7hg zu|!Kk);bT_1LOgxY#uUv`f~41c3h{@q%RRLr8kKL#-dgh<5U!>C8N>})k&ePA?3KU zVPglMYHT5r1~2AN^?EXenMMh3i)(RxNm%+ON0oY=w9MplGyhzO@yNh`PbRzzwqieK zl!`@udWwWwU#)C57A9n6^TMQ#9lcl57r<ca$u||Ry1_Rg5?Q=0N|?@isIY`eb=&px zRurit5r;O}H|t$ja!+aGtro-?N;xtF5at%Dz8+hk9GZlfa^`ljx~>23KYRK8OOrk( z8J<YW3kv1X+)_Z~Iv7y=S;1nR0r)07-3xU=H|_x)844}`6TJuub*0B6mpz%Cf@de; zR-=(a;NwGUv>CbY*Qf(>V!q7*LYk0`!H^L`O5_CAi2_|B2MaBX&%OA*rO6LYGGI#q zTNxSb8P7@80`|ji{NX3&Mo&{_?n}gxTc}L6p&OS7BB7iHL%|6$SA(WY9;3e*#|Y{Y zO9_Qbe9ieQ{KJRo2g&;^zwnuo$UKas#$<@<&d3fpl?Rvr!eRbJxOP}4>j-5`1)1NN zoE}A}FR6-b+xG{lBVHRU!47dL!m@sQ+!xT$9lmvp;Nl80+`6o|H$SYoH#uLKzSe+) z6XQIvq9^qR<=b*{1ViFNs!+YGRj-z-H!^^vjY{r}($*ES+~d;qPs2B*w7y!fB@)3T zE%_pm*BzEp)7QoEMG+QFj{uIJq>D$|@a1^=M(4ax7%D^yQPx|Ne+P9w*(4C{(fkB4 z<d;9Nv^u9%nFnpPf5@+b`G22mIjfVd%$BpJG?|EV!cZ6DthXcWF*qI-agcHdaEmBM z*0S_b&iYlE9?v}N6y?xX;G&!(g3QgJ96C|zs0+ul+`9!jV)HceTIg+}Kam^^@tP5J z&5fRgJ)RTjB+3cmK`3LyrKyj+iWCGwKS+A!^v`KYsNlu+9~{rJ;nTFx4+fnC@y$;Y zB{vX}sB|CAhFaL2L7ud}hn+udvXT*5Db*+Zs19yi@ogh@)a5}>Hl4KQB^N{RNKPhl z1fvgwSo-@^PC|OdWi*sbD#{Chf9t;I$^yF9^D72`r%RN;zx=imp@<bh6g_a%;(pEY zdD0?LOZYCKO;ZB1)_RL+%#vT#O6WaglLX0+IAB&ybeBVa28%Al0k$$CO(8AeaWImt zj39$RHb&;xIuBar*C|^qkQOC>t$ooBu9B9l^dQUB$aCwovHs{`2{&?vS)Rw!Jzy&t zltVrjkE1FLHzA9e9A|0R%JJ5{#9Pbfko>^4tvKWOMp%_7aXaXmX8Go|Kl<d-<Wx(( zp)*zT4Xzn!s}33j>!JR+7v8rt>P1>^B;wGE7Q`mj*GhW#=sc5e_v?TB$)(XR(?2Ks zhms*~jz_JZj>UDPb?s%4Bc<m^wpcpFY4ytJ#z0*}c+%IS4C&O4{+z?j%6pV<DSGi~ zhJWLg4=hcF&&%aalTZ6+u*0nmLD1xSAXPJW`3nbGM=V>vE>S7;6CxtkNelD8zHu_+ zjeOaLBad1fViEb*o{vA~F>Xp44x~9#p1IN<Pjen#PmlalkX&BhWso(&bI>VAfOgQV zFhW`i>Uh|#!w8<JvXsHYOBX)67RNV;T|YA*o?hCOA~A3&RVXahB$>(S|8*_OEA0rC zi4EuoC3iVX^*g15WQ2T#sZ475$oy?qmyBF*h;(!?D3}FdjQHau-6S&GPb{w%s%N>J za)E|i*L6Y(bYz~FG$KaXUh!+N<el+suk~TeoRtv%ygrf0?0j4<gj}?0X+c1lulutR z(Agm9W%U;Y;*<pjt&axF>`0ra+y^D;vOuM;M=mP<VO`{+lE#~2ubJDP^ccK=v;b(m zL6E~ktD*h$gM@TwYY%+0S~w)l7$zl)x7O)eo@~T7Kgz?++$d~Ldi+hkxhIcY>zbq? z(dQf+lFB#qSw%<Gp%LN;Gd68F5^*G7)*+W1Qph@jDGgd*D_=4#y1CJ3kNlvO^;G2B zA(4xonoNYE?VYv)m2zY?RXHcL2`iK%A`~H7opfG!Y>Yu&DtJlBA$rT`c`-R8G|FNq zJd;q6p@A&)1=U;QPscUOWId{A%OYi5X=N}1t_;!d3jNCk52QVhEO54BLq3Br767l) z056EJ7wn}JPK?FCr4ooY2u-*~zZAuxouv0@NHXU}X0oRW#xCC4Nzv>PnQ=@#s0g#V zB(bZ)IaX3VVU{o^2SYK*AH)@7NN|!_clldqrgzEMZKy!S1MkX1o==UXn=M1)QO^Qv zVzP-uH1O>F{7dg!nzWHnaEynv{II2Zre1S<raaCv`LzRNb6OZOqBOwPYDr?SMV6b< zWRroLHCCN|lU^nHy?gq$S;^)pARAnnWM+_XBcldoj0dd;TB7tPlx*=u;fDL->mff^ zj%u07!$G)m#?cvl*qTF;9{Pw9@eK5L<`$@eOwQ|95UmF~_-R(@y`x7UjUsef$RVLq zN!s$mhP=*ztP&)J9%P&ot{HyfLN#sa=dy-G?~&kxSZsoS?Z{6W`6o0sTD0_hgTGir z_(X4adQ>!-Z2ixTW=uL;=?hkk^N|&4X~v|OrQDEZ1rAy&`0PT0?fQjJYfNTdMq`Va z><bC~OVotQ=yCoo*W)B@LZ-*LxFfQH37G#YkGY@^C8Uw+5(?D>M@h_dc)7yBNWnm0 zOr<z^TV&dTG0((x>TP-O$tq2|ZatKJ69QR;8ynwAx-0p%1b^Qeyh*kw+E}IRdxTly zEMzGx_?-uC%F}s+=KT;6wQf4DTzV1Q8rP-ilV7GvT!tX3^~dWXo$<w>;BM*TC<?x= z4g;duAWH^5BYJR8h={#VPTN6Rk@yiC(zim?lspDJHk*tksm+XJTavI0F?R`(*=GGa zI0-;DC)RP1&6=(u$p($qGB#9>${-socBCl32oWgheKyFZnzwLB%gVuf2e?^_(TQ|I zI$vq3GjKy6Dgtg~<ba2_=0-mr)D1-(aHs^hK1aFc(Jrp=4OJc!$VKwM@?FCc%y19} zOCdXbsL5wUtA)()bEEmEUSRQ`HXnLf$Y>f48gc>gINivQ$wzgRsaw_(%@_@dx{D-# z$<MI9q_VPwG~m4;K3VCXqu0ozR29&9HK~vSA|j3|hgl(>AQ2~%>?oqqjATbVKov1? zVIqCZ5rQ9;A(m12by)%M0Zc|ask$HhsOyR~{HW2VOI+lZ{$xri13ATkWGGm~SnDS^ zgkEJB3nORor({5@d<V!nO4CH!@gZ~Gz$~HSO^YcSgMwM7_kU4KKYZ(~8!K%b5zwrM z(35LszMWH+3~i1uD++OSViuCt$ry9k-`7KK{c-6E$CX+W{R5a)N?HbH9lTNN%uDZ> z!8GWGmIPVEGzeQoHY7CA)?p1j5j>dbRhL*pcPgW%)bAN%RMI7Z`y)82c$QMIc?h=} zgeZhnO)CoX98cC|+C$d=Bu9k<qvQjc$xus8*t1nHAx$#H#?ev<N2~}Kn48RVl4=^B zQO%740Eld;7y3JN@3b<>Vu~bc<VZ;Y2Q;J72np<zQLV24t<pnL1k&@PA{G#>$ZQxg zj0qpBWM5f9o<=1zB=GH9jE?gJ%9jX5Ar?lFwGGj711_oc_$Rm_ZT4VfQNDS?4F*-t zQ!k77*W7|%Wu1RyYl+eG^fHGGO*>^ALp|C18s#}LhP6?<YSDIR$u*494Xe^0k8$}Y zS5Hj_<eQNfo4a>~N;%eyM!!>e44YmpW}(38w20Husrbcnz_>*$UWAN5KH6$>2a|&| zEO|2Iqa=B$bFuC$GD&`J^wg!;uRKD~a#okIb)e^Oa~Wqx64{}dd1PFv2p<Q{>JuVH z#ExhNL|%Tuiuj>FA-BkjX3)>N0Pe$YQ1W6>kJ7{_gMMN=&3ZzJxSx|ICkTNeI>?O) zLXo&t8@mqcYCYy{>ygh?b00GxMX!nQn0pLJ8PcK(Z=!}hX8RsSb$rTnv-B-aj#}J? zB-2P6iDVilY^fobHf$}xCz&R~8WFNBnHUXGGJ(beTY|R^&4R6^e#UXDfifp6){xRH z#qzI<kVZAPkaZ`L00_3|P{eOG$y>4{34Orh<DgIL(>tY;4gYwXn=Iu*9g%HJey-!= zmR?;CZ|MVD@)4m%wzOZy7U-ns0YRUhvdpFm@qFvfNq>UQ^nhG<_y#CP_4Hdxf?dc# z5t3~|*A@;1`f4hYuZk3`Rs|W4q85p2sj}qsktVGeYAPgsT_jT>kIl%2lvPr3gQcB3 z0G#+dUc$p(`axtMC%1_eslT!fJ`OAuvotHJ?HeDej<uT@?$F+62>*mP^ZO4`az=1} z2=1}vh$LXCjHM_NVG)(}gX~mmQcaB4-ZWVVA-L@+%LYybc*#G+T1bD^6UUaPWhJsv zE}JuoxjL{~jjc8qi!kdk4YQQm3`VTao$ywmNz(9$8Sb#&m~}d^@$VNIX`DbqG~=`$ z(Jt@=Do&dND*_tYB5^&_o<(1x(zK?M7Hv#2{39|Tt=Os#j0<H0)9~Iw(^akYE=!Mu z(k8;hh_FSs_PU4xRR>0?807YP{ZAfQnp&wzx;PT9MvgThoNJv}8ET1=iW0V7|C3KH zEj6%Zmmv6~*FV}r#2ZA9M#|6}#nn!yrmV=KLWwL8KwZl~Sd=NII*`Paw8qr$ZP;p7 z%o5uLzT+~HPF9-6SC2$zWcVFDQ+zeZW)s}^;v1EO_rLbzkISsyfRdR0D5N?e8+uKY zUbAb1bm$tbG&fe(!d4Gu>Iz9Ut2G+$#Zt`&_~@b)MSHkW8zxesNGC^Pf}<6+FYLre z$0;GQUMEJ)B`~YS+@k_ws$h&7=cb0bO;{>km-$(juUbkj)OB9(S?2G=;zK98r;a3F zV;v`%AcK2WQ6~H;8GiZxpd_93!ADXTj{JNqu@b)dM3_0ANp`Z>s$rp2e3FrExbaCd zs*Ga603$;*QDrQd{UmqfC92vN;sf7~$0cM09;vZMMn!=q)!3s|<p=EniZ4ujN1_>E zgxyH>)6uaV>S_Myql$%QeHPMgq?(TC?gGugd!d<*)(r?Y2l*C+fuX;KNNYI^4y1K& zie{WZgMvO1Xx{jfN0vrLm*1qYFesOlBds-1Ix#TDGy!N>eeE~z$IU@HchuL1o+F+5 z3TeR(Y`_+JHrd$b|3T|kNd$cBekpbs%B{jWr~gWKCq1n((<EVw?hc<_%AJZe%AW;Q zhY;XFZU^$B!p2CTL%DA9e!l?ravF9B-4l9>XuDDd23r$_-qMo|#)x&Lk%xC~w8InX z!9lLjgDjw>Ze@l>`aC2}CVkyASGJRyR)$h~EF=0cYBCxxc)FlgSyumni)}enDeQE~ z@WsBiD2`u{v6@{#Bx;n3DM&Dgb7fLBW2hCCjhQ04f~a9HU9A&G>yPA1SSC(NYKR5q z=aSx+n4uFjDs%<UgUsX4r?c^mg#3eH5~|iLBg8-@HG|TV9hL~7=78l)TSLZ@At_h@ zFa(ya{}9g0kI2A+*Z%O6OABGtE5Xl=Zb9>ZeM~Zze3^B|5+O&DvCs=9U0^!O2uIA} z!3iw`Ig^B0ubS>T1UtiMgw<}!Q08|Olu>EMK$!$)o%Uipew4BO=_5<Sqn#cfxn}6O z<C&_u_)l)Z-wP`AK>=sowbki`awA-SR4qjA92@-zJwA-Dk~BjL6_*O3HvOy`f+O9C zP}n}aV)S3>l?-EpPgc?-qNgU~ES~`lVS1EOJrQZ1RgPvm7+H?#@yTe{x%tP&Ob=ib ze^APP(fT3g!y}NGhLXu-A$WA7(_$dwoN71$^<!QYbKxzvm#SYHTzwjR(DYMrG!z%a zmYLUTqudTW)@6lHtibu%7vB51W0T6AQcM&#@JIn$Ahjk0vAVf|v^*;A*>W{h_m3Mm zphyYspYrq%*^`=RqAV4I(;K|8>pxU|gLYbHQO%f>XYz-cvN61J%n@Lg#W|^3j=G%V zY7RVXcI*CY2n*qdouMs+6<{RNQ3m+YNq-{QIE0g{;~MGrsNzUx7{+jTGVqg0_$Rx_ zNx5fkCm4q>X<P@MJT=@;L#mn(O~4O689I&8(?;mDGkO|7zhq3e9o8M014E?IYO#m( za8C^NA*SaD3Wph6AG-AMMgFh#1cmq3bj)cF-Ehnuf)GlqGH5YU_lWQ@0KQ|(VuXOT z{_?Vt=NXnNgD7N$f-FG_c>U!k1j^v#7$}3tsGv**W{JQC6|)EqB+8(Q3aw$9Rh&ce z?FN)tPb|DI8Yi77cmDJdYD#(Hb#m~bOVXNOZF-2LuqX=;kh^(qG$c9~!7=xMq!}78 z0+~Wuv_nF0o@Z=_;r;O^S=cvPk7PlqAfyjZlNOBnWhe`U(PDm9+uuk)SdB!-v5|8I zyv%F8B9RJ;KSF(htk~&iKl}W9sY$C3eFx4h16v}RTxve6X#_zpeOWec$#joudRBfb zEq8ioh?qg~6m-F;+S@CuB#jZEnX6l)r5_0AF9uu7EKiggAgiH~<+-S&rE11FlMuWy za<AQ^2xLNE^GGHvdxx)_tU!Rfl}ASCq$I@93jFsnUtRUqORp1VLP)wgY<%gIdpo3E zYT_VWg;z+^vXOBik6~`wdXJK>)bzBMAp%T>O9v@6Fg`=L^nEgR_^C8q>7m?^{NV(w z*Z%mEuf>3cpPRwwwK5-0lo4QL#~3*Q%XY~jW0B1d)5*z2V%uX3h(V5#wjz~d)E$i$ zA-z74J6@Qw@U@-)!cw1u7Cik!{1TwYcjwPPwKP@rjRI$}3#qe(=e;ZeOi%W6s|8|i zp5Y-YM3H==bUMv8TBj6_ftV+#Eq<~d-TAXesL`mxSDcAia%?ob`A5_U0a@x)*339) z#**~LdKW5bNpaeUwAN*b*h=>(hxe4I#QK?M-$So0KB;g0i%%~NO-(Z0iguFlE`ZBh zl2%mq6s`NQ2XJnWKKGub$>DwT&p$<tJVkQxkPhYCqy`P964FGeF45Dg^k<)v@Qoq~ z(xgHHd#XS$j^y-#3U)PoQnWKjVNqRM6rR+pIeF2g8KS4Q?&<MdK5ddjPEsSnmWi1E zt5LcpqhA4Az101{7c;2OlF9k?d#t=q3Ymk`mS%v0Ra9!i!tR)vz{-%yEK+8lK1K6m z@EAn&O(@m4AVo?v2n8f*XOwD<&w%2T3|hp(DYC}As%aEbN#0Zhgy`!5Wn!ec8#hFm zW3Q*#!_ls#+21SELY;IKXMU}obZ$k{qoi@3B_f>mzPLhz{6@sA6lowtg#sgj8?#OI zxFV4}h&LYMidI`Gl7us~NG8Cd1xtoK;RsQD$F{^MJ}<HosXi~Kp$Mo#8j3IjP8l93 z(V!h`*}l=p_rl6#<o?55yB%WCv>#b_>KW@(^Co_h^;u^=cFIVI3Ew>PKVKT12WqOO zWGuw2;H`uE4VXo$L$Ef~;RTL~>m+fGp{Sd6<>0!S0c&ZYqUO4mzV$CZO-*7JZu%L_ z$_;P%W$FuGx1ggY3hbhwnCt?Vki@KrwANP!AEgYd|K`8=6g3%m{Y6NjkOfZA$}TlZ z)QDJVws{JYI>TEDp$;@xAiS@n????Mge|Jsqvk8nOfq8+FK`O4xuWPEY)F=<`%y}a ztDjO4)F(By`Q^MIy)dTC6|ptdZji+-%<46E0h>e(8>k$(u2{mD<$PqPDwEnsB?GAT zMWvVxpsG<t&`wlPYYF1gRg);Dq%dQetGHsg$Xg6t^#>t{n+&irtnIMQ*6G&MKIl_# zU0ABrRw}8UIVjb<`V3mZLXpWINLTYF%Tm2C+bcx!VVX#shW4d5qCg61Y>TBCR(l)x zB7v?>|Fw>;jBuiZh3V)-Q1P7xknnTShhSJglCBW2WJHk~R21G!@Wd^1@&)GVTH_<5 z?$)O)@dXJc*he9kO`1<4O<D!8?sozfGh$_}MEJ!5_;QcTDhT)zX@)B!q|J*AC+Pm5 z-800B2t!c>STMFX|J7%fCIhWdg#e#B9o3RxB8U+MRloSU^5ygCXZ|TQa1=hkhG&d$ zp|N1FgolW4)@dh!8o^QnAG?#*2o!KtW8vlQhm9=R`tVjWlA3Wz=6@Uvy_NKhhihJb zhX9&DWxwN^kqQzvW})MSia8-D6Gl)NH~t{)GxXK^`4`_u944n%UHmwcs6Mv*SE(wB z+Ptbjv5aV(8*SR3f9d^mn<o$rT2fsIACr{t!6_mFjvfTd`vL8k`NPbpqZ60XIqfZY zF3VtXTXPia#g(db*)s3XYAy~%8047tL2)UD?1r6uiTRg7O<JvIvknH=n>RNU^BF`v z2s8#86%OY%MU_e33PCFLC&(6tKBOuUNy#jcUJ(MXkStoFXqo2@^8ux55qd=>S0V68 zk!Rdo@R*^$N%tO#1-*ISkya10L~j=+5JBGA`>BOEfOYRf3Y4j5YW7)_w2@AWLqtA3 z{$n&47(`FQ#+Yc@9MRls#6+th+qi1w{)@3hGLXoKC1PPf6z7x(b-F(aCpvBiWCKGp zSP-o>eQ*bSS@#9$gIj2Wx#4p5A;p44=Bv5ML*h#yeG=?L&%B44f-nE_)6|@R6*;CW z0E-SD?W0-Z3ldBMUmj$Dg^VQuYi@GC!}ajizy8e9@MUq15RD)5d)n!8@-x=rvR@i? zmtidT2#EmDo(FcO)hPzsJMG45T3cW&coxKna)wcTB8oGnC%zu@xRa|jX=HRDZa9hz z7C;Ocp(8n@pgMH=6SU;fmZ(Om(9=Pix6HZ=8T3E+2#!$Eb=UNk>7Tr$h3lwx4MW{s zm7T}ROitzbNPK?1SvBcCDc2R3)kz4WT2f-R(uG<)P!(Wek&8wy=4t+a$6H0PB2_dh zCm1I)u!@5Cj;HRF1>H>uRjL}~V;WcCTeQ3+SUVZ(j|F^$^&tg{PzRhIa8ww3Jy0W= zq8N>n5=y`{iLCy$tdPi;M5Pb33DF)Z6Z_{z8$k#%C`dQ^kgS{-p%r~{twM%&Hr%t{ z4sKlOcTR?B+wnspiFIxgt*|73idI48Qj2g38w4PcZW*d_Z!xq|=?Z@kj6<KMCh5v{ zz|kO6_Ms+r(JDc!fd}$9IntF<0YcK%0kA~XOT6pPzVP0q;XkL34Ox<8ZuA+Tsy@-& zO1k2JrG*`nMuQw74sr=*o!d+v^k1c317@=!pwRAtC`QXZ02bU}&?kd)l-3O7*oGIA z*a&Yy4iXP|`b@%aX<0~mZuBk_ed6*^!^ogi&zh+aG1lo>KL+`d!D6=#8^@r^bE;kf zX(`8`F4fr@wEaYhc`Or!-=(q!L9B_v84KezqwoAM$kopGmG_6hk9BU5+lY*1urD4` zDtv$s?OrLf7bO;~;SFC0O#rAIdrEM`U0sd9IfmTC+Nf|amFm4`>+9g@AbI0p5?YT@ zwW?uOT#UIT(JLiWGch|85mv&bUExqIa;PScGOHOYh!vMQJn181dU8O(gTf6gcU5m% zO~_ECJq!g%Rgs8^5=p@%WM|sEXkaK~VQVH~JcqCee-J%-YHkXBMyvi}+!4a|C-Tb< z`TUxVSE_{1Eg0vta!fJ<Zf=i0_ui#NIF$&0W?@5UNzK@V;Df<ND=G042R7X!W3(xL z{7`sX*q-s*OAQ{PuWfvzX!23JF1X$nJK4YbbfgrZ87<0PZ-K7z;Nthb#g?J@X3>-@ z%S@qhs25$~Uy$IUvJ1vqNpMNAi<ho2kW0{&V~`(J*kv`YpgkbS%4mNW0TzVPFAeR` zl=#vLSn42u|6>dK;K9j?c`QwqXH=~Shzm5m2S@7KRD~~vu>fD_GakW0X3;H!Tpm+M zJJ3waXdhM2f}o#ZGZvh?GN>IR@YGNxly{~U26=Q`VB|fP<~sP?M7`I!g-|OkGZab; zV6w&O^g*95?Wihdty}cNszoaDRFZ_k@nJoi&`HHpUh1U!rBZDf*SwM|24)CzY!o8( zho3mKT&5=FtY9I*R4u{C%ya|{J(m<-YV|Fk`;tz=L)2g@+clQNKg8xyVBUJ5PpeL2 z6p^}$J+6b+m4^bvP>=!c>4pRm!Uvw~G@B7reN!oeD@Br)61~zDNarigj*+^rX74|W z+551Oog%>g>=BNer}U+;3&;figCvcQtB{rs@mO)ZGYfe}HH4+%3ebbH1y><jp+=p; zRbVcq8KAK7HxH5Hr&HYU2?~GK2dGJ8`I6~zLu$cUm0Xo_y3x(XXr&mg476fJRt%dE znuUs}g&J+~C^n(nu0+8VjF^#wB)XbcIQ}?|96xW!PIG*46fLfRi&Pk%8`*x~Pr{R; zFFjo0^k313{^;>-ef0T=uB7tI{Gh$y0_;MbO}ufL@iVtTS6~QHLxCk-&5c&0ZNb8E z(xDaQ5{fDXn8k%_LncFf0Wwv|J~}s=_IS@Eg$~6IO-mFHR~Y2|vZ={KI5z49EitOb zE&V1Yy73gc<s@E%d8BYLmT^M$U>U?Rx06a-9Dn>(UL^Av1V$=0QK224sDbq}Y2NU^ zQnU=dH6h^_&Sjb_%%r3fTul>3YQax6qsmT{>mUSE^M!Wcp{Nm}QqoneZKxJqH0my< z3JGHBF|Icmsn3Nw#6rSzFeH+~_GnZ)Op2okbKnx3;K_oRPDWAOXzsYw9V3B9*hAG& z1Ns8{95^omtO%ivxv6OHQAJulc4eZ;+*J4f@?AcY+|zFdsFmsZ{*3)7(+&7Z&E%Jw z0#a5Wl}(0$%=8W)^4-=|67fn1#8w2r?O1G#m<$Wxdm$W~OdYTO{>Nmr_%UGo)Z_AQ zq(X&|4pnPV#8q}Y6S~_(JQIdA#ist%Y6Sp6HXFlgMFyCq9)@iYLYok}^W-jnunDav z2Y%3J&`LL41s_?)a7Bvq-}O=pGIR@CAzg`lYOdBH(F(_je@O43Dwdgz{L9eQTahn} zh0lKp0`FA1!c9-7t2IJE9VfOR6a^L(S)6ljfv#YCR4s*}oCCnOe6!|8yB5AXG|AC8 zgI3u?QtcIwSbA_sHninNmcR82B+^L<fE5no09bIchTJBM;w8WW<wY9CvAdJLmHOQh z@=~>eld&~ujeUaolsfHE4xA?TL4(BCg#Il)))4Rb4aH6o6<S;e85aM+u*9Y5Rdss5 zK)t^dP%Q8IK`A#8GnP{ES*p)2n1zXA%NwVtWT1!#+`BAw=-2T$euwa6(~xiawJ11J zEzOdO`SIjMOv_wE-%KK1g|PxXGgU1NgTrVU*&0ZZK#XP&LyMy!gY-l$KmTZ}SViez zp&(R|nxdM6qAJNn6XnwpKq&#F>V>GX8D#$W>p0Er0U3g=LKSjVWUnfZ6Nmb<_s9sL zQ;?8|2ckbjY?5J27|C>6b+wK*2UjTwg$D*5SB=&n{A{SO2I1GCZMDMWP#lR&+dO_# zoz981yzFuuo=kUjXhpA8w4JT%3V$<$R@yfeZbb8%kxqGBg!EGw_^;;V2DE~`p8h6g zfCVS4R)83{m*d28k%8<uX&Pz5mps{}q2C#~gc?nVy3wHtJOCLCkGmjFQX`7a7mX85 zJE?J=!o0NLq6iJO^?*=C4PSPeQe;P6!ij=~;MvhQ(W)xT;2wq=^XM`X@{Op0hH8YU z8u*A*rvetfchbo|KPJkhQ{`P3{lb&766Bq*FU(`PosUc7Jw|1yCI(pz2sNTrsgy|b z3pRf#^_nTb_<JAwf+<F;DrWdgOJl)9Th`+#t-$nS31ttdL37eS&Q+RTicKS*$V`dJ zP;TVnjkK!JM4^@IPRUCyO@*77Gmxm(P*zNhTwhmP`UtnA!-G7Pj(JcGT*I$ndLDEm zpNCR_>ZTJ(G_5NGZwmiHN<Ki=YE$KZza$hcFtrVD|CN<@5qaat>r+!BuhBk1aX(RP z;txa7XWHCx3m{&}!pi55lZ*%FF@Q-aVS<qZQ4Eu52MYEot=5p=UUeAiaUQ^d6*<}v z;3TY|DM+m;mofzvn5@?AAZfA^Tt!DIJBkv#a!)C*AX=&EERoepa229ev^+GglR&Ev zA+KbG81Q(G&}wZ7t_o+NAFXIhw9qOpCXPdm@_0n)>ba5BqUxoIkY(Kv@Hf>o`Djh9 z_Gzr9N_U5kPnGz_H-%;upD+Dad^^<dAIi-_1gCE^m97x5qF|);UZOJAWLZJF(hwh? zZ;0Q3BSVJEqo?a|+^oxwygK+y>4j1iiRbpJR^*0YBKFUoKI-t9%A$)#-9<yM9?vZN zsi-WF30P=3lbWwl;UX;{4-ZFK@Y<+(O{-c8Xv{5Cm)6|MxR62+#UFi=O0A-W%PI7M zm8NleUk;|q`$*I#sF5t^>9L{Bj}{fZ@{?0ZGAkyD@(?(=DjKRbDmCO57au-s&^r3W zp&eOx4IqnRvku{mM>fJyF``lwkJi~&BURC@fMx^Q(<8lrbxGmwfLqmJ>BpI3M^PwO zI$JWM4I*jShaiJ0m8dW<JRi3th-w+C5fX$^K{2T)Q9&wHsZy?^q3YoKUQ6BRMxYgB z53r(r->a~K%Sp{3>1nTmPZ3&U%j7R!C)%N+2{d6P$yMu1<mW0xD@3TkRgeLu4^<et zFdhiQcko|jd4>KE;|{TgxQbRZ5?uK*5@;#8$wHTKs5n{-oTC4o<rUQojMJ{}Ex+~C zN2!rP8trQ8@e!3M5SsvwHu75u!_^`4G^FkYgLH%}nvM^Bnd5UoSI=o5{=-k;HWG3o zQHyS+aQSI5H#8hXl^BFB;M@+|!f}5<fpN8XX_Ui3bOrk)?d{ZK2uwdVEC>{s-qh~K zT?ltSyU6wYvm}^BuF|+T5b={z94M|26oN^z?;{B8)BBjId99YcPKg|om7U4#hZ@s= z%*E7x(=Gau*8Na23YHgPv9qXowCZX>Ya)$m*`irC#e}y_8y3CT%qB;N3eJVJB`5-t z$G@q_@PdFOYDmT^m&Z5;k$6upjIM74-_XcIYBZrL;Hi2@)!2nd7)g_2Lhmrs2w2Ry zc$~`=Hq2tfBRr}MwhkLNP>IwB8zd6dI<TnD4;97%jd<01p(Zy`NH|6Up%(^Mzl;P* z1}#ONh!4uRB|Q6eOO+b81ZM!jx@xH+sLFcQ+ATnJ#wz40KU5)C;cVEX631EJXLFTm zufji+P?h2;oNzx^sRm09E8;Ui<tl`gNULSN7nQ3Jt$yogk5Z#BP?f82v}*MyG-ctJ z20c*R1|?T9M`w_2g0R293K{_*T4BlvJ{r|2MDH)I$q*R*!-u8H-P}S+61Xp9JGF=r z{UN?J_&{l!#h+5O6mY9o3v<h%VgZ#y(9u`kzo<JQTZBDd^OesnBqe|wlorg_&>_3- z8}rQ2UpOUl9akFdfxiwfySgMupJ8rl7(K$njDSWN##EIcRc7C=W0WmrMD=5{m9Mj! zwWO_f6jr-emghlvHML?>Tspxm0|IBXD*h7DWGH3ypep*NW!BzH4uL7F6^Tl0QDqoS z5>_orsD4aic!Bx~VGyNSzTzlobZRGC;IYv`o?5JaoWc(XF1(c11yFG+rC$*Fg3B}4 zQpsy7QTdbX=B9>$<I<Ek#UjCrVt{1Bhwcwo!Z;zBG@T+UgesM&m<KRql$*96#1u6V ztj_$CwN$l0m4PWpDqBJoa+L~IIACM6iw7Sem6j;J8fr-;v_49xN^w<GC8da~*0>Aj zXql!`YE{@=g<Ao}OUTmO%q162blAA?QPLApD+t@8oo5E`m({#p+S`BeS!$|A0UZi+ zlUy~o$S$@1P0X>21TxpZKssD=qvse#`!XNx^3Q3l&I3bM4i1^f@dBFFYrm1s@X96h zyyj(tCl}o#mJ>u8Rux-Rw2CAn^wFN?aDM1vyVGg~$#OxSf<}&_kxKDvs(;O}5))jE z64)$t0hg=PS!0E;rPLa#tz}g~mhxsxLk6Y$!nX`pqbgv6XKv61oc|JTJ$TmA28z$v zqYoM7@f~OCMG!GZ?3J$Pl$0e-$^sLo%C<qFT8~_@m6oz%OG0ny)R2Zl93Jo-lLI*E zn!>GxKp$9Ys<%B#Sc69{6V~4NlL)6|V%=|o`o`R3Zry8t7#Xo;Zr$9}XiH4)Ls<|z z^k;5C>NDX@s|!>@!zw*Bq{e)#QWRFT5|x&UUT64eC#tMZ4WUXUs-y?-XOBuuQ5gj> z1z!pks#HtWS)i&frlg<>xk`m9<SG@akgL?u;((W-p5osj4*1dM-m^5E9F?o^*53K~ zXQ@f3Iw}=}E@&O5xQhNJey&FW`(m`}fRDcZW&1j8ai^@+rL6-)zL7G#hxA0)!EmFH zTy;RJ)jNrc6G4+?+mGhMQyhpYqqB~aqt&vv&#yCT&f^18<y|leSv|Q_{l6$V128LB zF7g3cF^?3=SkXvas93m+GHpNo%zLOMwf9A3qm%sp@qJh2_x&{jvRbx&Iop%++PX^B zT1sj;>{LZ;yfs57WN8?e5>)!N?Aw&2$+SGDNPA36u)+fdKNjhgz+Z3(S0YQD6yUH6 zb?vH>MW|X7%SArmR9E5xOQ(d#SYYY+?d8e;N1VdVMVBf7L1rv^hDJV_q?XE4dlHIs zqv6L+sYAo6%2I0F_Y>bL#wpw6gX77Ye17_wI6mo+{Ob=<Vy?8hfGS2*L#;kYRH}_C z>-%dZs@{elgesM&wzO3BWfT>v{yuSS09A7r_ywY}JAM{Mf*>$98>*12aGya#J3$rl ztIAdW0kdQUwH(=7Km80fboI&)T_$rwQ=K~g=xoC0g6|O>F_HYm+o49eKHwuzN@Exa zxTK<|KK1lJU79MAJU28zs&##24b>;&7;Z!>soo!zbb2G$Wn?kERDB~~i6d_f$;gEW zHVDK!t7O1Q+E(%Dt5pMzv6TlX7ZtIExJrp;h>#6Y)L4@WCo5n`PujA*OkjV)P{flQ zF|Hmp3<9Q4SE|GSZJhV$JIoZTlzNq1rs#KLIVB+}gmOwLMJ1GwKqtMbR*h~2c)A~? zd5g5EF<@@}48kWZ;m?zs76njiX_8-XWYW?1>-q_MX!w{S&#!8oLaBY9b&A4$oRLXL zC(+BcSDf0$<TJ=dMRZ~i6)wopR-csbui8w7V^#-@jFK|^*nl#(zc0TmOO*yyXsJ@6 zN*(arbVf;JfU06|?NEhWr9xH2RoZ}Y%xcQ&<B-*d+@Qudh0y01svddj*QjAk1$Bpu zFyboMI;i0ei30fcfDr_-i?@IFC^hs>1WW;ZR7)`6=Me58>RF%ikVp+kEFg(BB(sGs zQIH?UrV8?_g|M^Lx>IGD4$@TX>8#4!qS7s{SS&w_A3Rc#m%?nAF%=(lsfvh9V^FP| zN6nKZr-W;sOi}j0svLnIg%L;r5G152gJzgtoswDgpqdC+p;aMGEyF)6p=7BjMRFvk zfMqq$|G-k~c%m2!OvTm6ECMOCyJ##m4^>S`qq%x1#U)Uim}SpNmcqH!6X;ft#_Jg9 z{qhI=EM++R8r^4zCMrvv-8v=dB#S0UC-|2~7^rMB6<zk2d(p`THYy}4)kcM5{`-dO zj&}V_yX3!RM1@e*fv8^NM5O_Wk`tN)6b-6ybIU>%KB)$%;sd5JFMp2n2{mv-7uYra z2tZX>Bq{DxCGK$3KqgRMMx1;$=7mur5IjaeF2h^u;+#tOtf?L$>f=uyL5mknK5h<b z4asa7Nyb%_k&4e<J-<@*#PMrtnM_Z?ZYF~a#hF&xPSg>IN;GMbw<*=zNW;i2(5q_n z9u!5uuc(TOpsol$HSF3WDu-#i)8Q@BmA=Cevtr-4)+2#ExPKyLRgUtcNVx`AE^C)% z;NsS{xH~2Md1RAb{e7P3fW1VS=NQ5-WC*wtL85LlJtxcp!ABC+Xx1{CQ;D2e8&8xs zx1Ox{X_)nz9aw5j)IyNL1pYd^R4RM!3!vDknt67}Qn-U>$Gi;NY3WI!N!B`rI2D`Z z15UN@O=`@4f4e$SAe-teQK>en6j7--C5cKdZ-Y)GRAq?@p(;yM2vu34N<kGHGrjN8 z$LcyZjIYODFqAfgLc#o}pb8&ifGS{)NM9BvguZ5R6H~{0fGVuz_{zyRhl+!EUuppe zRg>>fOcJJ-ehs%roFyzMiV;M1>C0sGOZbwMRhpJ#9m{0Pf&!_U0#N$pllb)>E8sp% zRy4Kld6XR+>GiG^5TfwYfOKkD>Inp6fjOp#5}A0_EMA`|%2X=t{Y9ver;1PN`jba* zv`SHEbH<p{h@ymACZ%Y}jfs7dE;W2pTSICjdOkmh`9<kDnzSYkNfjVCXb`}HQ#A;j zAXVWns|KkeA74=@dTQ9qXe(?yMRuv8P^6S;O0`QBg-?0RJZS03nt7P-4B6sc?J5P7 zi@UzR;dRG-ssCIK-icEwqEd0H&PK)1Bt<7Uyd4r14qFn{$;1G&ilj?J!q3H2NiC_v z$B7E=F@mb~5J4ir$w?)O*<;3G&sY=5FRYW0(qzC>826m7{lUi<c^W*z@Sz8~IF#)U zoJYG~BsroLt;KRpDCvy$v%{Z=GEPjBRhPom>P%)!41E4YUAxy)5J8piJt+86A_NMm zXnJ!87KH5MpgIE4Wvb*H$)rr2{Fs(E)J9Al)oRirE_9qA)xUtUlW2*=Uhw>jL^9V? z7Kg2hWa6;r&!bR>>Zp*k7>e;n@CCq_IaSZ;pgTZHBAT8P)|ozi$FJW3>MMt~UsZa* z<K1f~5|2fy+QHWaq^kX8)sfxZ1E*54Q>jg`)W(y7p=tyy!XSSysq0<$_5J-_-6?Rn zc8*hsCMuVB&?Jjf9->lls+6cw!;a7d++Px>Ori=O(h*Uue*wc(C^dC%_}p<+xT(_S znItN0*r$;ndq+L8RLX@~x%*fN^OV1mBC5C;=6lyxSrCCrVlD@bS{}wIG!>-WpqO4% z<U^>s3US=vD2pPyNP7-UY<LUd00lK)6!cZ)=a>TBDf2@l3^5jbEVjo@;e!wLV<0zT z8RAJ{5>EXn2~-oA#6e?z4Q?6uP}jMO)Z-$AdP7fx!q*8qMa&|@IBprZBP_QmB$1TV z{gZ}MmDYfe8#pccBEMccMK$6`mZI#yBPT_9K*}DrGoTwmDjR#`37NvEscgtpd(>3Q zz+)4eico$u*$e^SEx8(pst&-<a6fCi)Za`YV2VprmMX=mBI}d~r&J0o<&rKqg+x`2 zQ>l@w!=Cpy^vvRqXNd}N3U`boQNgrer>c!A%JobTl{)g&u%n19Eop-(o?r=YYH9(e zR1GKGficT<AwOOlGglrHW66FaPUBUNGZy$BmmUa^qo&KK%Dzn87vG4eT*A5tanDa3 z#K<A^>OKBO@E%MvZ;`PyDlZGeHOOyKlABvXRq}z1s$@b~66?my4Ksyt<0B+el`!Xa z;!Yv66cK%H<O}>QxBTY6`V2MvL2!bUWy7^N^@=FUX^Yw*Ev}TJin94iN8ZIv=85K3 zgQZI2rLqn_zu$8l0(uzEZ!l}O!!<JKW(ZhBfgU2s*m(M}ln1AZSc*p82qh`&R1r?8 zEY%&SEGY5d6j*;FqFS-ugH!liqEuNhZsCcR$0=>(tdRF<13$JXAJ$cN{B-Qv^_)(1 zGPC6p;AK$@P_Y_RsU%36pGY?s<`eHi75YW3-`APeuckDY)TaY?a6-o9L({?mWOl;o zKB+z)+NbeZmhuxmo|Hg&lpV~aFApu!8iePnDhM)!N)?3BwVF~^s7ODBf&xzn)d(V+ zAyj+%UPbJ7$Aq}P6lIUxaFDh5$ht&Isop(*=$oHE+Og)+5s=M{ZHDyULXpi+ML-Wr zMMRRrk&9-jClfZF?krV`Q$;N0#Hpy%cp@nzUu`_G&8BcF6%k~V9hW*~MI&eRY1R7U z)g{P}Eqs<_%X@n2QDI3cwSWSzp%Ag)M{V8Txgil@hH{YpO-K==@0cmpO{&0KEFgYw zg@Cw+{J!)?RMG>Z03*4}FaJ|&S;b2fy;K!1QS|ajCVE-RPg#T-9jv`Kgv!Pk^+Kq# z#GA9hcL_G?6?N`30qzq4{X<P%gLu(@6;W&p1$GCiY8)wIscMkw%Tj(KQSDM&vQ#Nf zNtR+Y$4gntiBsA7<8#9&C}o3LnRT^bdUo)+B2SM{!}ldym<nrCWeZbbF@;x{1~90C zJPE#FDjw*m0YNM%mxL-{htY~?xnE{%LgQ9ki6!`_qhc&D?j%2<UW}%1c@R2>-<Nf- z7oqd4#AO%z)4BLbB2<P#_QX$J5UOLmcK5`+mfSsc@Qq<c9;e>iJoL~GPk#C-N`1H{ z1gy>!aU$S(L8`^Ha}glL249CGjVx6JQXN?;vIOT!kbA0-r^=>#DyMsjr(^x}iox3z zs*EC47+ZyEGRw1G6dbd)6+Gn?jQXENRUsA}WGCJ91TVc3YO|zfFsl-Nh<pUcGj24j z4yi3}?u5S<6V8S5Q{Q~I(oDVWqszD9r_JJ`vg5C|<y-^;R!0`zC6Y0oab6rqrC4NF z7O5LZRkM^)JTqVLGgm_0Q$^iVNZnIQ-N}M#In7j^1zu_aY<2Vyf8!NhA=nTJMmriF zaFMogqM8W(__Xww)dV+X!Gj|h=NBmu$IZpT*8}WP5H$ad8$8|kX>)$sCL(G?Tof5{ z>iBPCFYtWbR0A0WmQK!Y{d!J{@_<yGQRfCyI{_)@`0I*)dg_0cmaXzs0rk{Xx5od{ z`_!@vyz+u37+j|roUIu#`Qa}s1x{^!z`V5X-pJ_&PjdYG=cf@t<)z_7=L#*)I`Zle za9oP(#UWr3Hy3%X)fujypDVCM4WcM??Oi%W-9Snm|8fidTA-eCpcNox6a}>lnWpM* zc|h>%KK<Z>gfMiCCkWoo{0oy+0VZX0f-12QHi0vjl>ojJa%vZdItw|S5uQo|$#)A+ z@)mkUly4bSel8Q>b)a4^?|Bht7tPx*fBDN($>uaawIkHhHbAKT*rKSV5adEB$^(Ks zp{Q1nD!hekIV+>0RZA_dmU3KiMXrx~Zh_r}wAP;r#HC8UoT|R82k^lHxhlmRe*M`~ zOJmc=ipVd;9M|Ntleds!jx#D6jLXH#>KdF2o>=@-$5?W93##R&mkY1L%UK$+cQ+$o zi{?(L)zC)3zWme?p%(u0TcOT~P_0fqaSL?_bw*oMBSq2pFN>l|OPi+dB2|~cD9zAP z<Mf3@T?wPKL`n>JZu8(@JGSXUv5AG4jKHQ1Y)*|53?Am#fSd+p;Td-^BKT=1@lW<$ zWSw^lAN<kraz?ooA>dtW1uUZK(uC!Ty3CvL)2N^*lLEV2p*C>mb+M({@KIV_y#k@i zZBfMtrQU^~qC5!IQsdNFpvzOE%X1e-rG`|cu3p8umNq%-x^%QQ4H7J<fIpA5sUtQG z%DJmEo2kGtC~UlA{#|?UyGl-jBA+_OkNe}dN)sL0VP%_K-OEZJQ75xB=CU0DhkEh$ z#!u`nY%5eLKkd*8#qNS`q#dCci1b3J(lVzNci|~^Y9LevMS1FVl@>lV?n1p0XZcgL z@Wj+&FdJcN>ZnuD7^h|5ND(tNX4`d?Eod~GEjQ8yn;O&ZdIda{-iVBO>KHlRCG2T? zd)3{HfTd_yM1jWd_kt%61v=qrKlY~zell+4jQrG6CZ1tO9S9DwLba7VZA2*Mg-hLt zAECOG?`o_-;Vgx!-pDl0&Xk3}aUQz!nwp$8vlMEaH_xsjTd;!vaQiziHZ{h)SMVR( z6iOX-*_fwx6QF^BUGV5vzxve;0UHg0DRS!QylaOiNr6NCcTN{x3Z5G6PuXxT$sFxo zyy}wiL-|SGh~%e=@~15oP}@t%SJ!dvQjMabAceCg#dMaarV1yc3V+@0OpV$E6$%SA zuEzCV{LIvtVOJ3$UXdzT%715xbLtZ6l;uC?y{O*0aVEfCc=W5|b@dcjI=w}~lryfC zlGFCVPeY@)dO7d5fu{;9nsF~4c&aELzm5H=h@a$*?24b**H=qfGJj>VmiiP@WqF!k zW&<*YI_5S8rqsPur_@!b5^QE?D!P}uhnZ6M(pRdWBG0ZOS}PT>wR007A>h?hU>5{T zQD9%^<KbNxV|J==+ierV#qOn}<*BHAe4X>IuN92}M@2Q%ih`&WHC-zVY0i78sP9!% zrJ}q_Sw*3;(tDYDxffMok@H%ZDm;uW@Mnt=^aZ90VX9t!Mq69K0Hz9gCueNaxC}uj z|KaU8!^53Ux{3&KKLVzhqZb0EAn#Xj-6*gQ0S_4=0~~g}>}QQJPiH5mMiZJr8x^JG z4a*bT1_xQ5DnQU#9QEw*)Wwjd-b+Q@3TM$TXWcSq0gkEKAJ^AZhVW<5QniwJmX@4R zS$(Z#*6kz+qaBzkB&o&$lX*L?sHR@31l8f~&h)^#+bPYh+YkR44&Psi>xO_86nLT7 zR7Zi04!dzSC);P&*Z(+(oESW%$jPugrO2r}2zDv@RaEq~qI#LLfLV17GqsF`vyz2W zWu6+HaeZw|BTQvkf85?^sjrN}a!0*#=$v8-&V0a)4Q9RK!TUxv_00|3Ap%Om`;~Ux z5U|1!X!snn0q-N?oOXy!HU*BrroIk4r_ISCr`IxfBss$%CnFUvg-tslr|caua&p$Q za27Lj)-!XKG;`L2^;9*R{C2W-Ph7j)RNr8%I{2$dnroMy+KiT*chpWxPCfL#$$;JY zk4dg~bj($RH2L|j;%Y%aMtHwUT#dZ-U((kZp>yc``<ZDopQDqR`ugeGW3~)zs=K4J zW7B5NNBfRSYrq<1V4am<+l#?E>%kV?ky_!xS>DW9s-v!2$J8-yz0^*&PgH7GOsFuG z)uGZ*+mbT@u&=eOKP~w*sM_P%+miwDrs}+M8}mmI0wQ(&s_^<R&DS94JUap|slgR? zrn7`<wNqf7la66i1v44eCa3YNJ!XsDRE4$4z$W(Bc7jbF5Uju^qsSQ}rxZ4M>zt)a zojL2=8a3PGO{x0LM)8iNe#g`$VyUl7u~DME+N#tpabAZ?PWY?1sV=D0p8D6G{nyBU z)iF%%0t)R>SxyawLGaO{{G6h$8v=HuK)=~6<!!X>Ozi8u!aX<C&eTqUcvF|fOhes{ zb=D?EIVomxmWMSe#CE|ZCkRSxYAJixUNE+<id%{WC)-F??R~o-PV(Ey>Nu%RU#iZk z)SmI@F_jgel2b0B4wZ(+uzUEgD1fQm8E1rKNjNBt_Um5!<5!)oi$=f=!ZGVCOzptr zq`=X@G&D}D&f#c;YPH*$wq&Mu<Cy`11~WOU#nu&!wQI(vn5n(~t#MOxOBF&hYN554 zke%CfE@$GF_M|#NsYXun-`8k;ggQ>DQ)zGHzoJ<0I#g<xOQ;KAH~7zpVRuF^sbo+} z7(Yv2cMk%N;KEV_ETup@A8<>roYTTIf&%vdOlPy435R2fnOMTaHg={#%;X2b()zJB zGo>n`8Rc;6D&iVNaqH^hF89TXeM}btNu}`T(JpUyy^Z!K)@ib{`*JEH)MfekIjK%4 zYXtxG4O;3RiB*^Mw?h-)lAmEy-FXpkv$7?|ocA&Wj<cEVik9|ZHrv?3#DIyNIDNg1 z6(FeYdnsV5s3I$w$?)v88_yUsRooXVkXBbCt+Y&<S|(SxUiGSPlgEv?fhFmTkW>nP zSxBl=LpUQOHS%APEJ8)BQc=YEmO<+V|M?@9+SC2Im;eVMU<$vo_POm5aHw~<!tz=~ zf!o-YJi+W;;@QtgOZzdKIcaHE7ABA7tQrLO08IW$xkj;E#)9mnNZl8^wPi5bs%hD( zxzix?SdkmCf{?m<+`4!Y{qUD{CSEQi4dOo!By|s0A04so=Rft<mc78we_MKioe1cm zzzq;E8z9(7hZW>qnipai%xqNZ?uqlG(rBAm>ee=}Esgdwb~l^(X^8<7!<2SfI-})` z-I}w~tiN!sQ9GB3s9^0}qkOKvf^Mpa?&P!~b@3r~F^^Tl-<E__CmcG$lV}H%IYkgg z>mZDSq*DG{?yfOPX>@)c24HnD0p7WDXGC3KgTS1zdfOnN(?Ps*1S|^18s}c@=!V-5 zDz)3pifl`4mvf?07u!-7vzZeFFOHTZ2r?FA_I2m2;oY%nYR-ac)dh9uHnlhqOI64l z9c^8Fh?N5CC3kn}gw#cHUEW>aguW3uef}u*F46bP-FZTk48NPdBE@{&NnG6(0i{s0 zhw9FPfPM#YqmQ_wFF5sF207rm`xg6BU`MM`sT*z^RI0nXB2;?9jY^D`Y$xMR%w~9Z z43!uyv3X{+gxRr1P2IY(y8g<#j0Fu4^xWOl-8R;xsE&-XYR4nL(t%$iw2OJn??aS2 z4(&;NBM7OBg{+bP+9Q+N6%YzS)ZKAch=4^!$?l}D4G@rVSP`p@L%<>j@gM~3Xb2pU zz*yvcJ1-~s4QA~WC{fAaq!CsnhDs@`k}S|Q+GaKamDmwkhf0i=3{<ksW=u}bd3SYH zcKwBR{k3*kx!tLy=1i%7t<HLM7Wm6*9QZ|{s_|%qdCV{3kh;N^3_gEYx<83;P-ME3 z|3*Yy`Lp@Dm;eWPf&cFB{?0(L6s!H`|NNh~6oo0W4qk*Iuoooxy^8)AEJlGw3|4g* zR-N~4droRGn6-1#2=^jGC4-X~DzRtOVlz`Y$wnm}8I?w*FETe;{5RREFhr4=ohSu@ zHVYQrV5;=)Qhj$CZ5TuN>*ZYYvr%1q)i&Nkc8`Yj$e*?6*ErZ1k8Jap&3|3e_xw5z z)nVy=?W^kiM7+l$6QB(fgAh=qzy-(*1e6rm9RZiI8IYF+#O~!lIwGLQrP%0n+cP9J zQea=#+X#Eo2EN6V!R%T&$!{}D-r#YSvavBPN)_O(uEFam!%K}FRkR^YEn!u?3}Zv# zZ~tsmZyT%f9@-jL)hT=3v-Ud5H`FOOv`Ak0WkRcCt%?wE%hJGzfGG;J5s+Q~NxS|- z;`;v**WYPZg--RLqHrAzfrI>sHU%1iWsCy-mZWNzB7-FRW6WtP>*ZCntz`xzF-|fd zsoJr~ILUw{o0GWlC=G(f4a$2=LDC>jk_Izu?04`V`azJfpaFvH9_0<Ds`9eJyfQs^ zs<VpCtqzQ;orY&OjQK0)%&kr{{ZiPdMHha#$M!gMzi>mZQ1o6oi5?xVY$(zOCO{&L zIy6MmQc-W82$<!<{UhKwLaH_+Rr?dWQ{WCQNeq(w6xhpJhPPR5Oe%sT#z}riVw|)A z2(o)*8hNZt8e7Sj+rZu<c3!CEd8r|HvDb?IO(zH<3r?kAWKhvI@OO4F+TJi$U23q1 zjSNw%UMiry@(^42uTJ1<P>5A^pnZ`ROodEfqjhlMIfDWhwi|(ff0MZWR=X-pgN+Di zL}VHiXgonD1^PXS?RK)hL07vXq#_DT-DW8vF-Y<gQmG}$2}uSab+ML}LJ~7hb%!Li zEJ7U!+AQb<!J>k_cFo?oO>`8sl#Z#^LqCgEtffLuT``%nfKjzZL(6R%VALx|uU8Uc zFGcuLQTX=ws$Tpz4gn<vdQfk^{+)LH+r;&6w5uHfQxqugu_D8I8w5NT9`*7hwo~9x z8xkWVzYWPIBtHeVo60<d#2~4fkQgLY6Vf0MOx@;sC`4gt%&Nui1-E+kH(6uHD034T z$2voN_Cexj!GM5$O=8vXcNQwDmU=Jp7*@j{yVGimQ41LLGK~4F<uvkNolJwR)ZmXj zAC!c+X9Ucmp-O>%{@VirrZBfoXJ;oA=np1KQD9#e+gb3aI`rOYCo9FHB0{QmCfbB# z;L!+EStB8_^SwJEHG-hcg3jAqSjDL2i{*Uh#^Tx7KV;upQ*{uPzW~k-O=9v+>ug2) zr=sfGIO?5_PReTmBfp$!5&u<)npT8W`7;np`L7Q0>VD9lAUxw&7X<vNxc=|N^$YDv z86%xO-}54%UBRy}8};%b7Ez$nReG*is}?-!MS=c1?TAM<A@#zevw)x^B;+4<#MpPr z4#c;9`Wb8tKiI7yWif8?gP@ZIr=d||1b-DsG{{l7Lti1?>Ci;H^HNb?{u>u>-V$=& zOQy??tiMnML<jNTCa!;zxPG3veyUv_1T0Ez{#ozqPVH4%$GNWq@mkp^Ya}bW(_LAQ z`r?tF0<(8|DR`uUAY;LCcgn`V4yH$*`Za8b0c=R@onj-LdhyT*Bx)2XW$<?{Bsz;p ztmS5VW#P3X8@A*dR@eL~z1enGT4}ubHvBgf0Wa~|2?drS;Czh(qmC3<;U_&W8&zA# zwl|V_@MsVljl(0hm$rjo3XfQvD{J;~z>eeSXp3i<ofPb`R)e6E1*eYix7*mMoxtBX zM`16Ks?AJd&YSI+h1aNDS`<y+F`)h|2w44trSWPv1RPC)jpngy1*44}h@07sy0cMt z5VYBd;n8{7Xfy~KEV$eP8wQS${VbaqwyN39vVS|Borgx)!!FB3xS2gnz2A#QqK;{X zp8Gv-jCn;C$d(9bkK}GP1eQhw*2NK~Mt&|T8bpCt2}UD8u$_(e21cVnkd2CcDY1Q< z1v4;eva@9D98h)(1_*Xx!Kn`Zu9b&I@ZYua&>;RB6k6UQ#MLp5eoF-0*bBS|{>#cN zcURA@zPclzL4osCN`Y5NMT02ty1}R;2wo5v?EwVQ9&cw{Jo?;wv9Vz=3StN`NfNp^ zW7xIA&>;AeFm#DLv@QRgKYS{6v~Otw9Q2#r5w@?nZhHjmZU~HA!<TFuyFM!FNP+B@ zuN902fgn3x*#clE0(*DZ(qikMy;-cWd1hxTJ1<7C;N&DfNkTWzpmEFB3qv0s#DC-T zsD|bho)-ZPTC(YCV?w$i;AVzEXRu%v0Xrhm-C!HDk?5NIhFvJIFBpxpkZlHn*;{5K zu}x|0IkFYP?qV8BLPO!Nk%TVPGuU$1TZ$}fmQL80|KwfoA#kdq5LtKryCL9+9_vO@ z{cz<H+M!|0roi1I(Qa*H?4~Y-ie#eCmLQ0S5j#@Zam?9?B}=UG;MCZRv6GHHXy#%a z0fLhaf9J9ZHJZWB7#23SeUi`_MYcS5y-hCRe$oj&2v}W+c2@}aZtZ3N$bQUnBM{J@ z?P?QmYAvY<IJcen3io3e^W61SB9TFX?I73-iTawy*jZczf|3QhgCIRD`P#B0lAVBT z{-?b;1fB4AE}PJ1VPPXIVNMJhN<v#^5%!Xk@B~ZsjhFJLKJ-O|YU~@qK!a?ABjWQm zM!>#?K)M>OVp~Rx5e06*Ll@*Obl&y$NOVTqST7KK>4zVg8|#|Q@Z9)ch|5wiBw$aU z{bhzppLzB@tg%&E2ZECge_00FGCIDmLvWlKY_yodP*trn@?T@*_|O!>vGMY+>F`%= zl-ih_ZV33ZG1r!cKvrB>rNBlQx?HPR<Bgw@hlU!)8bQ#$>$w#nk<CM;wlOw`3;$8u z5(F!59J~JP^Y6tbkDjTTfzECN+uj;<E{C8W{+#^h#Gs*RgMBjx`|_W9<JDnO&PXYL z{aG7FwkM}S0JQy$NDAyS+G-)_L55x%0k<@XjiA6@u~Qf1DC`w9c9lG2P+%_*q*ICU z7VDiWAIGPmT+9r>7?!ZV%tp@U++e{e3x8QV&?Pd^Ha4(EZ(v^;tzDVH?0atv7;h9) zD9s#fkCazW;=3FHTgLNl!!-g}?=)Q78v;uM#rj%?`kKUcMS=3(i(shKQ7GBHqgAXF z1Z@he@Q}9f5Q8CU8)N4t`*9wq`fc9!1A^+k<GVJGXKDeU^TJ<aE$T)!(ev8C8f8@J z-s>2sF<WqG!eEyF8kHmH-n*m?rjFqq^56CbxvN3I%Q6IZC!t3FU`Gn9AfZN+SSbw2 zM7lGEi?Ms(7=|Pd6~Ry`2ugVB2!b#F=wSvAYz@n0!(JJ-$Qhi-q;K|}#+D7fZc|;& z>5TzsV*^;D15~~JY5>aWW^HT(+n)bg)Ds%B1xF+d+VHne1U!pR_AC^*PXw$RQeA}= zPl%YG0=qZ|cSS;33hZbS^N`Ru7okc*r7$E-Zkt)fN?~ZRim_&!joCVR{(BFx#?oYM z5R@!f1cH(U?R#Hte;RH5YSfM|g}+h-`JDq$scvdJ{}lnyXz8p*^{i6<D;11TZ{Hag zHG==f+3N0c1iaAN#C1KM#WPqMA~uKuyEzBHQ)Um_gMYA#Nh}3JLrExW6=Ni{XAoTe zgqf%q5lQmn0S0E~)7)^SO)c=(B?^8s>sP4<uv9CxLNvcfCE+3fXk-4{ve-_kde#jA z+poXBT@4i27Xb$u!#2a9(IH}^?O}#Fu%k`LAfc?-icLaNKzBbNxJ)>^9hv`XAFu46 z%j41xqLaAQ7X;-2cS67srmybsR~r5$`ETd+Gg>RPivx61`Ov|NSy}!o4T^WBM$-PZ zG5?i<+6}y}00HYLaGX!DG&n3vfu%0djufaeP<IR}4H4U$J<Of~i9wQt7zSlYNFJ;n z48mrEVAjsk2!h!ez<Xcrh|RFbp!gVT?0%;a@MoY;sX(Y-Bh+d7Diw?G82(jc{pv_R zr4m`)>E~ShSDhHxF%~Kn5no3GEr|{{mO9sk5dU@aDnh^!Lv3^jcDIBf1)hb0vc|Ad z3Ou`4G>bv<j`oZ}9uRce!~7s9O-}5g%kzSLtFT2VL5(d-HavMpHV8@<3<y|_KBdy| z-2=Zmn!W}Jgtp6Kb=OB7%70z*0X>qTeT5;qYeRVCA#Mmb^m;3IeZ#zdWL|HZmu<(b zK)@|8X$foe29}0}?a&g|?h-va19dlsWxb+V5X`EJ$c15JkVNfLdzgf8wvF3a2it>S z-6TY7`>p$@?d@J8tUjgE@a=(L{gv^{C!tXwv>koA>p`^hUxi$LV?JP=FvRuo-#5ke zTJCz)yljSh-MnrHSa*#8pi(nfFAA&<kiQ5^*yt<)oP;Z5pdt{ICtCF+q)Oo4`Lj=9 zljjTLD;ZzG?ns)h*n^HlVJ?n)wzqpN^U$$QPP-J=9!y`={8udynoR?2*GJ7JLiUP+ z-wy&lZ(cSkebc<oh=5rNydmIn{ZG?_b3+7d3<%q&D{v1KSZWE|0{~?$VUmI5C$vq0 z8+b+Kv*zD9;;z}Flu@v3V&${u@eE=?+8`)d@bMfA)`8%(S-e-N)AP!>=e+z^S}?J@ z21JDnM0>HI_QH{J9va0U(6hD^pXoRR%u?VD0ndnl3;Zzz+zI_uBuI9oz!4T8rx{EF zklggfg@tvugq;z9Bm-SK2redb`LNjfk%MFpi`C<p2>z}Ndb04>9`bJ(|9Tb1xemKm zBmWJ`{%cpmYD|H=0t9R{1hybxqc8X_M?mC1iGUTMVC@umW%RQp1<I)?as{dYBxCz* z`jG&nWcHZ!a~7AV2L#!vAs03~HL~m>&oZuOB7T9zPILspX>S&<x?rzH=ou96HQMMk zj{iD}pjPOhZlL~9Ap=%D6{)bN8v@=CaC-z~@W&AFvOIu0q`)hqpR=36B>hMLk_>Ir zkF<ob!nSi`OIIErmk5IM1C^0@Qyu(O5YGsU*9cGF2%}eaDy|HAHs(K74S#gfUwhd5 zMIhkNaKKk{*9`$j!=E1kM;O35Qs8;f=PWj`q0Uf0{m26}yK~y;vyB;S1PB^aL1e|O zW-?xmhbsuxWEPSq=Su!2Tiy`@wwt>~xH~Jtyh<%z9^z>iJFU<=&8psS<MgcHzpU`- z2*rmA(T8>g)C%zn8v*~1>FK%MZ3uYAq~N;^0S*33A)wO`c=jmxofyD6QsBj*&j=fs z1i`F1(3lOCe!i&sEyYS;%kT3qzK=Dw4CI+5O>EskP_m#C1g9<GucM9U3}Ifow0I37 zo_4vfF8o(f7`wd=(%jnPoIE*?5&_Qwf;R+Y*Sqh&`^V<>WAn17>#OE9;`z=i%H}^r zz&%*MwxK{Z7|uqYEcfih09N4%l^`g0#cCT^ihItBK1CoXSKxU;kRH99QU)z@owM({ z>5RCujk&AB-I+E1RY+T9McykkPOpjox}^A3NS;<?J6333q!J!g1Z1c3MI&I5FZfAu z{d@EJzs&0y^RhK`c7=ey{N*pJ;SX0-mj5IIZWI2sP+%{6Pe<$5HWXM91m=&2Gtg&* z0ZgJ#mU|@nD7*S#XJ{!1(#YlAF^M|);N+@foyz#P?CaA4g40gmFB|LDMb&*92VWO+ zR~P=vPDq8wdxgG3h0JM}GT0SbU%e*88R29g;AS8=L!NDl`%&&{5iEStylx1%ARu0) z{AVNJe>eT__^-M^&xpwPOQgV!9e<L0B+_NMCrg161hW*_#Q;Wg;^!WTJ~F)Zb1%M+ zHTIkG43+)b6gUV3B@5O~$kaEqtBb8`o9M1C0sa*g9_O|bbJw}}uR`L>$$#BtPP;_7 z8!8V@o6S%JeARK?5O6;T=mfzm0?zQaG#dfC1b%gKfEJ~KUK8}RP+)gAsMGo-xhD%f zl6yS%<91J|1VQ<m8-U<a#)4%{$orL*FIeWTT+i}h;rvX!YWNHa?XL*!O7Y)?vQCAr z{UCRzF(>|nz6x=#F3JvFG90_8d{rReXb`+1;N6CRznCV8fW4AHcjfQv;sD(b1xo12 zT6%U1J-w`7UFKx|k#~OnS!^%;;3KR_lYs;>b{t5vi+p$Fk8BBo(`fkXXz1$V*Xt76 zzY|~Q1+mUh{;Mc+lr;f*0^8e_9U3FIoYx<%*OejQI10RC1f1b-X%YcjLcS#NRK)%d zvU~NSz!Ai=AJbPCA855XuoQY^nTAs9*W6?;i~{RGQ2K=`Kv2pCSA(GaB2Rsb_G}i^ zwV9zyP3>$~Z?BLrt+RDi_&PV^KefhXv6{meL5D%PjUEInO5x06AG`L3fR|_pyif%E zhZX*^2)J3`e^Crvi;X9XJ7=_e4WhuJNVu~TPZ!gd2L$CTbpb)!9JriZ5<jxUB^QtU zD3W87>E6b>Je}9dRTSk`ZP6JQ)OAKfSA~kbJuTxvXP}ywga0Z@8;vjlrb618a@!37 zZwNR70cZYeLBNZ{oy{n)OA@Gh*CXs+9^&cZ0QG=imI6EaK*jOOHG^fws=RB45b~eM zCXcYaf#8(wepi&UnU$+Tw!Y5z_q-;B(_X-FKZY(R|J4ZDyZLVe9f#_yMyGi1o)PdC z4oKJhvwK58;=e2cw)^-b?qm`0EJiO$fqikO!sxY4?EhwVFE%ZH-0=`k1@5S3><SQ+ zEU^<1TvoUgW06ad7l_+{at6U)yYcVrlv7c?`?C1Ysa!fpzM+?-#h`q~WoFb84$Fak zL%>D^wEMLI(MCYyANEDSUnVXm0wVvFBH(6z&$(6j_%>smol~IG``K>v8izX-6gUn9 zt7qn|pMD0Lbd$<?kZw{LYsXfRJbEM-6@lP1+Qg;u-%d<iz4)&S{B`HQ(dByTw7cr~ zZ!;a&QWIdij+cRe1_kaA0slIE-4L)E0e=ox5dzA!^bZ>UAp&;s?$xnQ7tq-`1@4V? zc5d{lo1CoC>x+=0N==^N9uSlV8Kb~nASiFDBM45L*|*MX;u-{h>f~&OIGYK#?vwx8 zmFouyHxy+uW{>Upkgm%M-Vy=-+PrQE*aZRc8i9a2kMU}!z?;RZOAMSnIeym3TD(RW zy)Fd=jmdfBsb5=~<P$ky`N6}+KV2F8Z5+sTMiW=5SXbXDw?SeJy;Qq;@!z=+5KnG8 zs&5E*L%=Qw_>;j1n4-XI0-ezoua?QVXp7gSfFL`7ltVKfj67N7%8|p97(o2j3k0W* z{8!C4n}u*)2gy?VNB{s)AxT6*RQz2K-&{2RZ4<igM?eOG6$toOfAv>`5O5p?-Vm@O z0{&!eDgy4%uXni=I0AI8(%jWDIi(h_xyj>9HVG2)_>jj?mIC()g46zuTf5@Fn|*6D z{u`%FI#j@-B73n20SN@12>4gxs-VC#BA`uycP9dRY`|(<>0O0@6_j%`cU6GkMS#ww zgW!A@vM>3sBwcwRl;8I@uNlTnG*e^AI!GvcLe{a9$W~+>l_g82#a1yhcFFcp$iDAe z_N=2tg;0?t%OF{@j3p6fesAC3KmKyxcka3Op7WgNIrqFjOvD$Xjy^olrYZB@Sr<G= zaevao_MmL#*!-<l)t}NFmNm6#IeqeV_+G_ZKU27e71c48<SqP}kphoqfV}v&oo<`I z5jh~?)vtE!-mjX+l;nFqBu#{Uuf>~B>j$7RGijr#-s^7jDefuNEO)Hw-z|$r&g<*G z8PP!h%6^)-EkeB-$;_dHGbVSDydFW{x{2aNXC@aQ^nh1YUM8r@^8uesBVYE0T@mzD z_&%GCBb1-XK>qfAxK~qfw<6xVI+BrD-|#}PgSRwf_o@DGnv=*MU-%djLOfH=#W#EZ z=kM5^tL4a!Q^5LU??NGEo3~Zw8BpQA+#Y@3A5~dES-JjSGh^xghN~%uW%@49+T}<0 zy#{=IZ`I2)f~YmJ3_szFj+lFE=D8QdzNV|T#{f0VkgnuTyWYUDg^7@qP8k4_I{sZ8 zD3+k9?)|iskn2<C6OE7Z9az{|RWMn_CFN+;eH1QpZ&i1#Te$ySn{a~`P~}#oVc67Y z-{h~Ol(FgD##Sq@*WsI=A4j_XsN@{1oVZ=_>Q~ME(T&CG4q<Q++jMa4<!G9?oq^m@ z@?EF)ws7Fj8)ZJeR;As*FM6Egtv}DCW~#sYAs)BFcqVQli?Tl6mWNeo9Bc4TtH17Y z_#Nj(Z`H`~J9$;Qdq`gY?!1(~ZiPrJX~P2>c;VlgvO~s4LP?CZoi31MhA1oDy=qQ1 zd;LnOm=ZUY<(+T0XOJ+=JHKfySt|&wkf<HiE3!8K;hA(Ud1|%cZc}j&ajM-<m$}LR z&bPB!6{?k|&URn0j`b_Oq~B&95eL%cU|eE{#G(kZTAUEI$ZhB9m|vC>=2;c7wfFoU z1o%U>2la|@iB&@TR-W;>4%U`f{rIm15jKcWR%km%@g~Ljy-xDleOEbC!-cANx2pKV zQHzMi8`Xy{%L2(K*ADeWMGKJt9p=CtMN$Hf(NGNOEfH)~c}2;c?Z*TOXqE>r2`IZa z+#C7y+;bs4;}USMB2`HJ(m+_smPBeID|F;?(wa8G6Pm6OzGB12c;eufG2XBaes?<A zaVafj%qlZKO7k5SdKmlGPnW_6T!L0|%<}rol%Iz>v5!Acz8kme_bn;z<elLQ$$kOl z*wT>gQF88IX$#iSd(~hvb>&u!*y;<jf`W1H`5C3Vb|ZOzb^8z(gVV$IYCaTSt$H<L z;a`!?XtF7myG$x0J-A{JT?oF$O_J6Qmmu!`-tm)!+j_z$ZQ!Gh24u;~@oevbrC(Ao z?Li0E60euGWoN=_Iu7oByLIV}dv<Vw_dSgdZM){!P-=tx(1T-NCZ=;oQW;9u?5lQf z-x(wpyt_Sea-p3qrf0u{{ohOOp=p~tzg@Q#-ohEZ?N9U8A&|8dLh6ml6`l{y0>6Id zRI47O^v>{oZ!Q<e8bSL`eIl>Ecm6wTXluppdoSV~(U3AZS@`RVF4+uaJ(J6Y%G`DP zG%>a}Dk4JEW~ma`axN%7-2ELf5J56|RMN}ceh&J$c((PX6U#k~J5C3N6n!{2QCor6 zUBS5-Q9!_r$%(4eueUj@#kJIK2Cvx*8oIA!%z%tZNjxi545q4W4yrq-XE)OZIC~8a zo0ZecWJIhT%@3a*jz+jO)krGZC3-io5njBsj!PWgpOWV{Kg#fZF?!y;1LPCldMN_& zO3)Lq6opSJIa7_6xf(ZFzOF*OhNU}(Ki?+h7UIO={x9SoPTg9~eE8#|?xpDh)!IQ# zhSN6{fa8Me)iwoX<e+Me^8GuyRoA}{^{deDub5j`B*mHO>>#V%Ow^<n|NPtRL&X#m zJ&NaT4?f5vSmDOku8YHUBW7fG_w>&_RiB*({O{u%PAI-fgi2nNyI^xw@cxSY8btfI zkWwgh80{MQ(=Fa?@In4lD}_!w%U@^r2hZP@CNCD~OJtskj!SQdGu-<JPCP1eh;sT6 z(7T<Es8<c_66>u}4IzrBRDG5)bFZ|&`9-(w?zziJwWA+2oR1#-F$e8tU4Pp!jM|W+ z(sZ81%`rvN%R$ke`&pUQ$jUh_c{}&68aBdt=;6Xc5Kv}I(jrOM>GkN^0tNl|dQt5C zcHfykX-W<)&++?=-)mL5T5R#6UzhBJs=UAoZu|5nnOF(5NtW>`t8=5$2Z(f@!?n1Z znf{fX??eXsh}=HCtyp^Bz;}4iRnb4S7Q>=`N0x1O;DM=FDnR6fe~=*XX=QzVb=~y5 z``tUcMYxjdUW>T;xY+vF{7ae2joDR`Uq+;EUkrJE>c>H;psFCEL7PzSe`A;Z<4oS> zhN_C&dHVhG6&sI)#u9$j2ys<p1=ra`pBU2Ff1wovvC`nZ6z+V**<Fv)_P%%|38)Ek z+tnqH{KVZJw@Yt_m3+2ytQaJ22!E?)hL!}Y%EvI8{=9cg7O2Q#5LPChTW5WY3>Fi& zvldr64^cq8wR(K9$_k!VL}`OSDj0bhehj7H@u46Acwh?YXhn*ZSo*DTqQU>fg1=0< zg|>O{-vPxl$6=tI*4G3P)+J^a3RFtWd{#G2&Gy<jqA$jxD-MQzSmhm`?|?d*?<_5) z>}LIFX-V%EJ3I6i#umfTA_mak@BCJN^-C*lbhN)h_4%zuxRD*H17-f4Yh(ReJMe7t zee+r-FnHsuXWokyiRPmW<^`ehWiAEsRgJm@X_bTlIHdU{-Us!xOB=;E--R})WXHN` z9ggNJ_qf$qc;}0Ktu0td0|QY(*kdTrncmi!(MB%_0-+lWa`a`01t>1>%ape!GB^LM zmY^Zbe>x~teUWGeliB5&<n6Lf$$?(?mB$Yy2q?H&@N*R<Il4TZPg`!_UgGHLTko`v zlrN)v(Q!Vx%GabX77PA321!){AoUm!TlMMV+9-H1+qSJ&757$RZT1l=Y`h=#jV0Uk z=I(@#-SDuLZe94-&n5KqlhCX5GNpezt{SqqYTEIXxQKYOVGrAq;;Pg>9JP_@lT3do zL-(@a{oW5vW0$)k@B@T}d4-m>Kf0cs-;5-gK^r6q5&%~WAY-z?t@%%mkotYwDe=Ou z6Oy$eomJ0n4!90kY7ZHc&%#wdfq!-{u+Blh94oyN$JymL@$Va_-vXtmnwv$wyg$c9 z$9D1Ep0iyktyF1+dg)8`O~^n8f0x)VV;<1{o@91?iWH0<H3^0eOX%UdBnDWSY7#w; zHDVwnYNyiuWSZSf9%mpz%@EfA-e`88+WugK!nFTbEbfzO@X|`$2je9$4~`yd<eHx` z|Fhsn?JL?A%6KDkJ0_+5HJ4w^I&f0*<v1F?G<dcH3{7T;&POOhPEh)HbG%82F7j<= zU&(kD5U}tqGvjgkie#CpdeKgeXW%vN+9-fe+dK;@4lh3vMA002y14vrvr%Sxf`jr7 zN26s6ir%$W#IE&1m$WIZ1TZ2^z|;Pks!=zbOKQLx9d|>DH<`+%cI{?h$Rk_(8cL<l z<?C(v6t0|Nji>@)1Et^5HN`ls|F>XM8uQ4-hEHTHdq=`h#ro$z1wJ<5O$HC%M=woG z@(O+SYV>U?YZ}trIZVzYOp+1Gy13`S9}-FHk~1-}vr~!Ms)nwu5vC#F#WuF~0a0## zx4s9NUY`n12bV~az;{3QtL$NT3R+G1!lE(#{%`LQ_99#Coy^(tN7M<WSIGYuO7)KH zuBmsyy)N-hC2qjs^?K_KP>GJdbnFtM+JIt1eRwh8sO!})@t?m7CjFX)@%pNAGJJDg zFbHFFr)$7eCSyIjrE~9I-gLhuq8$hwpMKUzzL;1gAN-yB%Jn0!0Q#y`U75caXw7YN zMCezJIAY}dmMX=SZ)TzAP+2jywkv<^O#Thd)*IKMhkdvI_PN0KF0D^U1M#^OFC9t* z0|i;$*qDhPaV&Y0JU$dJJ7Sz3CSeZi=0Z&N<VluTq}Q35X2}0O&~6kcJ#OOYCWzpN zgqq#Qqv2+t;yj&u&~Z_w`J*Fk@JA1|t|KMQ*{rgy)O-H	ZlkAr%Hm_1C4G=LP=6 zkjl9OorJ-pqi?d`MDfOy1}4xz?V2IVI}cnge`VH*^B=Fh^F3O%@ctT7>Y7p5_i67+ zR>yjLp9W7gnA>H{8I8Y~REdzQNa$h*iih*S<j56nbnY#V;;Hp>e7xw95#0?lHub!0 z;Ff5o_xz`wFsc%!<;6uX5U-pnq~G^5?t5f0Q*#<<3a@kw-}JpRRpu&MF~am_M04M_ z;mH_W_+_Wvjq#_6p3of({1sUAiN#i*Vulz(=biNwzwbhP9=WB)=2Fnu=#xg<1=-g_ zrbPT;<w8o**rh@oAGAc9wm92$x3g*eUHjl_qq-2|!Zknd;p2S5!rwYFafT=H7eL@M z<Se=#Njd@P%6DYxKV|$i^4_OYXxhE3v^C6FmgB(E`^o<2%dFl0h=w@ZVa<crk6f)r zBU>FStcC@kZB}?SxY=7`L6U0*u421YDqyM6yD+7V%=l~O_UI=FckAJ$BEvZ)HAHtO zEi-3lV`n}rb&yEk?u76C=XO!Bu=leL**>&yA-!h61Vja?$Rf%o96|H?aKzj4+m{cT zZ5(s@w(>htQbS37t8poDJbC=Hml4yPKnNpHBe_k`t8G=N>k_mOEMjn{pGV1=kVOyg zv^6?9O2C{TEsB;@x^|*}h{mgxUqb(xR#g`7Rtw52!Od*m5S5ch^l39np=eP>(cLgo ztbU0iKM0uzGe-Y>@@oE<59nia9lyOZpfDbWcVU2O^)&bX_w6rg{B_7V#LeL0;i6JO zjdGFfhiT;*3_%G3n3IosR<>%=`Gox+I(65^{sc$O#hBf7jDwe2;*tMAW+dsmD0a(P z7TOLV+Q+M9LIEG~GZ#7%!<%@oRvOaVzT*h3rz(`r(}Rk4<^mVm4+9LK{N<+%-f!Qt zD?ypZtp|wUpNNBC!4$5t4U)Noci`%>b(0c9T195JPOZIdM@rT{xU^u>`<hT<Lhic1 zIkVeS-WJ7Z9bCENC&G&+<l)>y-MJt>*)76UKP-0BSq&&}zn98ay=zPsO>`YJ>+i(0 zh{4O}-iDlS`kPVy=-QEWAC@{0N8~KLw>;2`oYPXO;4VSEOs<2RfTXTaSpIFHk0+I( ziYS^a_2IeTBfq~2X?3E&f5@>gQd^y!qbuq=>{PXk%(JS4%JTbLa~qFsmHf&|Wg}Ei zKL?swyUPUVXXRXd3-A4*Im=pJtT9@3HGb!>hsy_D?cDF?_rDnOHAH8>BmKXilTe_G zLJvQ_d^z%E>Q>_w-CR(Or<{w!1RCG<_FXaTS#)}w<Gr$X^_V5Y4H2)*+--o60=hp^ zp4CT<IOmjD4wT19y36`B6e*33o03*cKgI}%AJ-PX7Fc>7>M%h^n~RkTWsKU~8=XlX z{Vhz*sZ14u$Rl~siJLiOl07eQ717>8sA$Usntwb;V?aGG?w_@a-JTzPRFudKF;R96 zpnqp8UY)eO`iVH@NHNf)ro2W8aK5gC?<Euy6`J!2xGv*mvF*Qq*g-=67b>yZ`)$b+ zl9q8A69|^CoE`P7n@|X?$^wpR>xxFoefcv?$zlEEmAC%#ti7-Pu51Kb`+$AV1jmPA z1=Bj=q{R#Li~GLfcY664`{MqYf^Sn^<HImFVo|i5!{dySLJADRjgYFsJl3Un>Ejf) zq-o8EzRVD-W6du*Jk48<QsVn85fA?B&31WbOy;|F{;5Ag_Wrpm?jt8ld*lk`)_-Zy z!@XA?T(Hb#4+WKmxY*(iPV+9)v<cVE842M7`G@$h)7`tiz%7i5DApoZkMaua786N2 z3w&X?{hKl)iT*M7X`jC?HD#R|0kkDwYMb9OAYVt_(mEIz)H?UwL~Ad4Vwl-+LHhU8 zYm&8a=n-a&Beaa^{p|zu@~pR|Yo|?TLwQ^idB(8DV|iyNT=H;tTTWd{k+HL!NbU@` zcZKc@iiSX;_(Z7v#1VL)%v9X{2-`I>z#38GlQ=YyYCU|>M(D*QvLtH93Jen2Q~XOg z)3+Znk6<sv#mjp>+O}|FW%y75&D7K0ZGvehAy;+re=c={ass^c-gMjYuh`{ZWjiBC z$Y<}T|C>_KtX3pxB$9G;vsX|-hBZj~dvS9@$BI<E$#EFh3uY^!6*Waxna}VQ$5Qtv z;yX7csy2`BZ>Tc4GSk0fFH5U+ct@UtVp%?tI3>xAvE&PG*Xjs3|LPeOq0=d$W+UBZ zio|X;qlq?`c@Bdl9F}0IyTZF`uTmbFJM-z0xuYcQCn_v4wzoL=e_*mR5S;p#f>z3} z-L$j{m}LbkuSR;h@*dPhF*W+LF5KC#`D}RGNXuJ_xh<;PT=X*OI#m7P&XYHgW^G(p z9KA6}BfHH>xdsjQFsHJ>jp84P0}5d;sa*<S@rz|6>pS)^z_3NC=8bKmJnWiE#6n?N zx1Dpy0fcB}aoW{!D-7@Ha-c2e_qGspT$qhp0l$Vh_BYyLu}WMd>A9{rQxfO-NsZiT zGN~_bS_tA3{8Q^fO~5CxcHa-agn?P3QG2p6q(@3n&^ID@7D6RzHT>gD>%Q8Gg?4Jn z*ds=Vjln5Pq9&^@5?0bQ_un@4blp9SGFcO;w6a%~Xe;fCzYnQ57OaA($)pQPn)}hZ zUxk3-9SfG~sA*I5xr<@{?u2koD{AF>XS%+6*>&$Yrsbr8F&Xq6|270w<vu<s^j_OV zx!>PvMQ=}B@kq~M_{X0C14P&`WAU5Jk)810+7~-Evh21mmS5DZ@A<j#Fv_g&%7DTn z7(bid$~u9KYGfMXNQ;QlR_yt!?<XVTF@a7*S2WCj5Wi$Zc2{K0SH1T{)!NM{xJqMt zfVs|9o3P?>_)Ad5FQ&K*3==*Lf=V*>n$=7c^OLzxNR`IW9X^1)yhRVne+yWRCDnBP zT|q8ahypkKP<E$@L3=a7C_-kOXQnXWJfhv<{D_$Z;keoCLd)Y{B{@l^(r!uVSAGv0 zJ^x6v!Xuzp5tl=$p(Gpc)Cpq`J2l2yuVSM;ozI4)p-<h$sLQQF(;Azbe3nHRlsN<W zflhnBqMm)vzr1mzI@Qb{S~`?<N#ubt)CrO`DPevs{%Tg7{&r^QNiA40PR`G6Uy@J? zu1$6N-9NM$%~!V?ZhPuYm7H%SHKT*8tQgH+UEqDiwkYP1PXVAp>?Btc;8g?Cd3M;q zS*_zh_7p0x-eT<qkY(XD^~t)<_}`rt1k|cx_zKzPCP(JVQ{ue!`H8HqfO<#I#X}p# zk@@gW)f92wB)w(O*Bk+pk4NCPYe@R`+pAHg`jh}&oEAV|m?%dR?(h|SGy_)J-d3zV z0r-5Z7w=sI5hn5iYjNo2FyH0i_Sqw|jElq?rb|tWU5*jO(ms4u44He3`39%9TjmcR zDAvJ^{#8V1`8pBrI4OhLGC-eSCcenf!~H#Y1TUI-m2vN&G9s(s<A5aLQHflJ&qS-$ zjM7R+q56vi_1|8e+y9Ku4BQctnh}%mc~tUa08~4=e!yc!?=ECVrZc@?F8#!=;cB1) zUg!A&hICz=gD{fuTZgh1{LJwfSzxNW&ChC@6SHT>ig0kV7yMJk6rd5RCBHh1UM`_v z;9M5?h>L`Ydc!&s%h%)kHStEfx1UW!GMWM)YVME1C_!8o77Qu-9yPkStGu93<`c!6 zP>UUeLAZt{h(}UP7XQ;Qr|xcg-g|BJPCX?>A-7bTbEih|uRbOX=oUdtCR`+V${YH9 ze6~7wSOur^-AbDH&q#^dB_o!tM1c5~ZOw>zPQOrlp-R09bx2PJeEgR9fQQw?c)Hc! zOUv)9zk7is{C|9);tU+Hd=B_n+-@$k5Cj@adBN@fUvZg?2TQMRauo7q`Y#<yze|!q z-&UscDa|rp=xAL!2tWr2JX5(XL}Ogl#i`F{UC^mM0U-jTfBJv1ZI|;6nxPW+uIN+5 zE`!B2m<0<CKXd=j!(&>of%}h4zm@&ZLI`NA1WoEEW!T74E8jr7@C-kZu=Qpp$W<XS zy<q(WJ^8*<-n^Xk*G7}z5}7%=yF7#!9__9^5hw#PB|mnQmw#!ck6!7o;DuBqH3&c$ z4?FBow4&z>Yp^6J;9jXPAu+7(wSbglZNY6%kHQJMBzO>A{vMS1RSaBR@waSthK80A zY(Xq;$#tqcNnVlPN9z>W2D+wNP4k23_4h<asAJoQzd2J-TW-nc`ji}xNQyu7Ff&Nw zrc=}C$QiIA00g&vFOWLtessN{A9TV4xpeWVJQt3`){~8@699Y6<-_{}yFQJ(tCLT5 z_lKF!=2I+D{5~9+J+6kkBSznKRbRg*^3{I;i$ct~30Z7}#CYA*#~-BtnJQUe;veO3 zBnk#jL1;Tx7re2U%FA2abPjQO)@<dmvB1}rnDGd}M7tIV<G8?T_Q?GG(mSGVaFY8= z{j3N^B-ewpS-UbKPVS#Kd80^1<ZzPKZ5+i?7sUMm@gyWDZI#~z1YmxHH=gnGs%R-% z&5B46N*#Mom3>S7|EH#e;<*u*O%M2pf8lDzB|gAs)zA;-y2Btc@0s=J=}$=6;I$hn zv;M@8Izzz#10|2Rp^CIQ8Ep#s6*ihw$+PKuy1E`qWeNGn=<3+EZ>^N53v}$CYJU&S zh36|)?XhYrKEObW@@_W@v!Gpvm`*)_#taQnb>394)hzbJ1VsfwguLPfHTVa{pSSt1 zRaQQK@k`H9CxF<twfZ;MtExX;;S&4TbnC&=pa5}4bLutJBx8)BsnfD`TByr!W6tg{ z#<RIG7z*)|eA|d#PG?l-w97<$^UkR5oGr0FkxL>OA{_K^F92Dp>_vc{u(xbLnGo_I zk;Lh0B2=yCM9s=y6VbCKBHz2GR1}8OADEKuwFxL#c4$c>@o^QO3!10A`MZ}n^(>r= zna;PO6aQ1|Id%fZc)@0&%i8R@IWzQK-QAe<WWMdzi^WXfdq$`|4S+yqG!71%_x8i~ z_GkXGazPTLDQali2jU_;P#B_m0vP#vJ4FiMH0R5*(9NZ659CeA9*+$)_c~uL&57V= z4+UUc5}U`#jN%G&4;>7KvG#aRi961#XkHdo>)+oce;mSS*x8re+-~0sYNmgTA(bQ` zfD}tEG@;iAQ33bhPev@84CGT%%p%e+1a*4$1jpHXiiRs$<Z{7vEb#2mSW$W(RR`cr za^tF{4__<luDXw=WdaHNU0%?~H<^Im0tmwzqyh}F_ybt?1*jD9pcG4u0kT3rWLvZb zNerdw>sVqH;DSOnpXanLnZMj0yyvOK3k)oP4^WRgR57H?ivTAe-00fF`TKu2&U;zZ z=igqz@G$Aw;pC)YPM9lee;VxMM>`!B2g?gba)9j|)zDi%yO!aB5_{kyN+?J0mS}E0 z${i?%PGMe?e)!7{9=Q3d8^*{&CB_$?f?38}=HYIk+LtyeM;N2)(_Jl|S~hFVa7UEX zkFL*$i|JZhH0M8DJmGWPXqs#h|2H!zh9)8n(EkeM1iVWik-AEWo}0Z{@W8v0MsbXI z_y_X|7?6*JOA^Mo9L%kK1{|w~y@(+`y-}iI7IWxI?fUW8Di8{N)p*<8s*pq?UYzez zPM;?c9sYU<=UxU0y1n6%#piz)r8l>K{dJcC==+1j>2T8M7VQE<K=W8p1SbEr-dD2< zCHn$@+^|#Og(q8PWIL?w5H(@H{tkUx0wUt@?FSq(C`k(^8NM_WfVd)_p=r&(2P@_l z?;LGE+hYS)dhjgZBo6hYDZ?Rg`(c>UcoO!rVghE#jzdc3wL9DX@wb4WeEQX2#b+A& z(pC3Br7+?B{zV|$Dpv;3yv8_mIz&PI(B>_@L1+l~e!|&j2w=_%uS~o=STt^x>vfT~ zw*=*GKGUDYeKm$#v+oTNUa)UC^I4CLwx{ce#e<VR3CK7BpUud66drisCt`J*DD&wr z)sm<bEx?K@Wwlr2tnqh(H9@*sRwLkw&xmK^?oO*@E%d%%-rk@<P=9MySr~(G8dr}! zgaKS4RCVYxwNM*0?dOOg62iAHTY_qd0Tv%7k<LC7MNGD$qjLT-dB#@wyL+#BSsvV1 z#Ss)?g4(sWmefl(oy`_*&#h(FpT-FvD#`;hpOHaik~m6Tm^ybAuK*wlAm>G?^@Ez{ z9Pa;lx);<$e|3Ey+{k`D60M18I#iE6rptw(Ap7RwW|kqB&00z6$mQQ%Ge%?qY^gr^ z3Dy?6cV3PNqw`6tz5Ce}(_DY<63L$R?y1YSvQ&`sDjWq;!K$cQS5-w7U|RJ6KK$Ef zQ}i$)7`_Mg9x|kOAu#^;U!MJeO@Dz>5#!h}3f&q>t!?EFj%nByI~=K(Ft^~Sw4h2| ztbLHtHJ|o|;(waqGuI^<X3KtNi_eG@)|1DE8C!yV$5OxA<oL$qYz%8Pzr7*^^tLDo zKxAzRCxJVjh7{rBVN!OhDt7ZuBqQ_CAL_Bd&9v8}k2c?K{}CL0r&SmDIrG>J_s+eI z$7+$iW@iuG<zlrWp<~gcsKx8a%$#VN!I3D~e)#tlH)#8H#^FroU=Vu?JRibgl;OoH zdxupj=xr`e-^zARQfcko>^m8n@mfvk5k`Eq&GsA|o^}yQA-1L`Yus<3<#an<jz5hH z)AoqPc!ZG@U?(8%!qmzbp4$<WH}`(%6c^#9Jn-y+p6|!2l!creLT}{jlPj>cO$aj; zjgr>G5*UA4dh(p~<tJRV-9@Wg{{1VDt-V8@X@fI$QidhqKu0brj2FG1dGoy)7>I<9 z5ajBYqUtbzJ!bo+`5VJ_?2(>Y5!h}Ii(IBqd&$}>98xJiHw5YTlP)6P5LLM3=zf`S z(IHPv3!|7i29L&TI-R=`3|9%3_!uHg(1Qxr3qa~+{kUKudq2+k6gP5L5*~hIS-(?+ zgFu@t@lpJx9*9v~t;c4Lm`@_(nCg}90Z{)v`sA#8&!~$u$aZ}u!Qnij#BVN|O`^FA zYw$G3#QV=nUai61)D%Qw{r7+9no}LD0>8#%-ZflLi)7}bpZ8LW;BE1g3leew_#cX{ zNI@T<H8a%UK3BMPL>XD4xdGdEt5GVW9Mj|ROauHY7zr}f0P(;b;q2YJ&t`uvFP7UE zvZ`eCfw&iW^L?Yq6J^<PBhr&MzREsN)@kRZq5Sd;DG&y4g*K}uaH~b9Xx+c1X*bc` zX!;VuVTr}U1fBkC40uM!A5p6CA3!+!ut7MhdW;U0xi1V27o!iOq#$Oi{;Q}=f05iH zxB~$S9nSPTWc{T+0Vj)saAKb)258H$bhp6AN=}Aw4Tt#WU3g6bY!)adVi;frP3@uk zO^EV(Y;c9B6d(vI0Vy16SIoBWRTN5(P^XQ{;DQ?JP|y0nDHa9n8E`vR*ja<2pSvOw zmekGXwg)R3jGu2Be@{72IyeYCA<^c2|E&d#YbB96)^$&o$vtqfYniK7&Z!USsiMHo zhc*{{RNN-(qHY+_BpQw4Au09THajIj*lct-*i;LVzgGBfxFaQ%-&Tg2pqk7L-T{JG z3*Gyy;B+<V{C`HIID1i1ypLBM*tSW!v>rt`?n#LpR7a3cN)p0<o<6*H2S*0r2Kf|I zd#hrc!7cjvWu=jk7f-+QMLD&^OF>pdsAmRRNL_iE+R#-T<&Nx_%~pTG8r+LDr>Q4( zJ1rAn_4#yWPE|G!@KRu*YHcKb?j}BClJ$SDNw_xul=o1$C9V~&(y>i_7*MJ-izKu7 z%e7GT5DhUbn)`FX0U;svO`i5xbu!1goi>hd+eZ1;xA(+ak!0>1`A8@alfv%OWj)H* z^-?3#*2wvtvFmcewXOk59pa1kSR@IP>+Q5}aob`ZBCmS{NWORd%)xUaz;q3yrsyUf z3M*SVcPhx$uy$jBfA;)Jd^7Hj%8-v*RxBwcan{VUZYQ(^Ne<2wemsxYFq|?Nj+w33 z#z-hueN!^qyDLMjfkD+I%$d455Ua_|vDfwnQ{OB-V<d`_O4t!No|F^0aY%L7Eu&*u zY`hS12Q`+Rm-W;dx9}=RmJ7?N!?H)8(~P{BAFBQQmIT01Qei*Dwq}+R#|PN&c`BqE zlRiwbtZ0-#;G#^xN)M#1gZk=D!8*-eHgdj_9(ENm{F|TKh82duj%kA{<o~~!VLb2% z?#GYh&of{YWX5<C`~=m5drW^=iW5lp%a&QUV0ujuhrU)4BAJ*L;^sZ5=eqU}r~YWR zwa5sDXnV-g28d}}|5-)JlR(qTMw6asu*U1132zDu)S<ppf?=OpV<fzjdj+$!q9#N+ zJAblHR8;Z8vcvE%<%uQD+_pV^l>NcVkCc93{refmCft&{p4_Q!wD}#C+HT}j!zrCb z$rjYu6gQA@Q53cw!?K=7dH1@)CB;1P^?g*fCo8<#5>KA%x;rhR!g%4wL$arge!n&I zF<NfqSo;Y6;hQqA2)1r_JzA(=vm}#KOJ640ii*@~vpDF5&zR0G$hM0>zoeUy72qix z^f&x?uKyVQkxy4snILQW;VxV$@X}SltAQ7aN1~w6KcU|@)Op@>tpw(Mf2{i1GgF70 z(X?!h*NOf$J}OjR#k@9>LZ~(^p=hFpizp}F*zROVp9fu1LMo)czVR7Tw<GndnQ5jc zODM^${*!^>CrrRuCi^iYnd(oYXL-Iyx~PRWLnMd3U}VhWihgu`1<)y!4t*0SG>NH9 zdR!E%^QP=6N%7R1!cPw*QKtz%|80UD6LQHX)sA9Bam7*uBiC9?(M9qE!_S-Rq}wS} z?ag`|zrpAk(ZDy_Gj6l>?*@K;HNtrCvsWJ7241mkgl`8}8^0#Xr*j2wgP)AGv=srq zDaB5lh@eck!I+Q-=+nj$w2_%$3+juK6%!Sai1%%*P$Y)2aF_FFH^uCSR{148%0!53 zEw?dw>fi!Q3WZ9<w6tCq65RYPf}wAMt1Zn9b{*ME`0s=m?%g!N8#|6le0>6KJ|^pF zQiyZu8n_}dn<M<#sxVAb2*$;nR{Qi>5`&2k`GIJLPAmuiaavZoF!v45e*m}Bjo+r| zUMFf)DaL~(RP4VTp63kUm+>>E#-{$K;?bl6w7CXH;G_b=WFBQc#gVN;4&&vJldL@s zjbOYh<G1}lq^5E`cmuU^J$qQv>2*=8C=))`;br|?0$P3NRAntxpZvmf_8o7?(eZ?w zniHKl_#_5@jPXTLSC!GU@;6Yl91rkQk&78g7WHS(5jP^kF)e$n2xq5RGJlGBPbwVV zN0c|x`KiS%4Wpi*3jP;eB|gjACxx!%I|G<p!T>d?s+R+8o;#T51}oO?9&yrTXNQx2 zl^loKfV6UDeGH@Y^!4-@(Y-<M`5V#3(^jr~aCnjUD;$p7i54CAD~ydhm__D<o0CNC z2I*v{)oYuU1i%%=uT3su7F{|mvYnF;P0K5y*aC0wlKs#GlrfKJZtO0w;Y4W8*1LK4 zB*2mjHn2%yKiQoF&7<78Xg-CJ5p+GRNY~|&{7>6hA%&@+l@ia(c~dkODXT)Nh(1p^ zz1yD@s~Hyi`z`X%w-ociY0$?@N)eO5P%q3lwe5`5<xz`Kaj8R}$h~VqUZ2i$fud1) z&A343dD|zV6Uf)@eNun!IJ8R%!{X&4eDcX+wtQq61`Ho9`3ZVa4A-E3om3q<23GHi zdPx4wy4c(rKz(S*f_Q*ouM9?aZuT-SR=lNxAL{x7=aVPFyk7--e2US-9Zp+j_JpEC zL?Up%*S52z`9OyT{0D5b*SCi=EU>8kmREWd^e3Ul#k5J?@RieYO{6w43VQpaf?CWh zdMHh}UBcMO($y-Q!VyWkA;}xS^8@rNU!7HFoay1Up71eK&?AIIlNxK1W3TDq=-Xe6 zRXteCgkP<T^L)PA+8Q?PdRn%l$lQrGP>gbnOq9=05N>ba1|PDJ5x8z-vIIdf;l-AU zOvzLCsLtpi6&%YuqPb6@l?Z8CjqQdJ$;pBGl_MPj#Q+aa$%Zb&d|}adA`^)nF>B&F zrh?b<D8Ftz+S(0n6eE5vJmASPr^2mTsHKKKv|cc1%Pvnyg)$HwcCP8JnBhbn5$ci( zUguPqJv_WFtRxDMZDkK9mK-{soaQM6QE3ad@IC*g^GztKJql|O+3y4>;&4CQ01<G- zy3Ys`8j?L`uA+4R4dzz1ICu4$eGf(=ELR>jXUL4)mt|3Hkwb+Ulgw`3GCwN3jV4HF z3>oi;K>f|J=}+|#dIdNaq2o0zNHdB1B~jiBT9*vd4i|NR!iP{E(d|&uJhYHUDZhhT z-3ShDRQaX6;DHZkpx~%e(6v7ndwe+u%Ow$F?F;4bQt<S&xOhC23WH5bLni*9P>?rR zyt3+BuEedtZnZVMr;!RqqDv!Jg4Xi9CYUxhw-U11OS~xr%f{7auIF8<<{J+<p1V1d zUG=n^{pjlliUa;2NJOpqgrSBA@DKxZAdNg6VQiAL*5L>n@Ee}PC{!}gC*^@<m^P3; zJrF%$0h}QUhF}SK6?8FDPQFggiT3V}*_HqDE~Kz5Nna?YY#WMe?SA*2DV4sy9hnbK zq0MwwhtBtw_ympPoIzEQ6=R_AIp9relrd_kGsikuS>qmaIx5<Ym9IJS@&0abl-T`R zTKaQ_q2d3Vm}`D$3`>7=Ti~|@Z=U}9Ok)zW1C?h8bsQ}Ge)55DLRuj2-G|3)WDkE@ z_LMhUvUIiR+Q>B?#53)oY(VYu?0=bz8>lxe-yqH>sFenZ$G!=p2@kAlxjk}G@H?y- zL12C2U5ttZZ(v6rtn2p9TjDHdfp+mM7CBY}<q6{%)-TXreyQzK2#0$V@a^9_F3LuB z^RJcl@X*6q<{m|6dpd={7c=Y|UK2+T-Lc%Jvs%u1FD1EZ?{I&Z>^_;4e-lh_-{yvr ztlFvC^AT$i6ui6w4)N^D7bDExk#mTFZNf~ep{>p*WlL%ld}%<Y{|#|n3V+rhO@{VN zUPSHBvwU<1zDnb_&M_;yOMkAUndp;aTXwe&a!#hy%7Qf&EZtqAxnEm&z$Lm3v3N;h z4)0+Sqez0IvDE#h$nFT9WqF)zU^1%IRiO9nP#ki7@{MF34uxnBoMPj4`B3A0YV@%M z)#Z8Mp|Yz-v@6o+*foMM#OzggZ=iivdgT1$H<ECb(zxLe`}!CI1sKN(0HRBN)N~cR z2(TxV@WI#jMdpvN%emlEvs&aH3k{Q~O=K8sJIl2ZF5U3v2h5U~K)w6eH7pSN7LvS! zTFs+K>R@vPCXL9AU4P=VG%f5|hfi`z*216%61BO%5l`p4dSZlKaNXGqOJmX_J41-> zP0}CpPdXIIn|ixDiGN)qj_KrbtF;s)<L|N&%Sfa`%JpIb8-<8@awFha{|X;_F((We z_ez&?{ho!~S3(L3KE|z3{i2~LE|(cH|L;f2NYvU6JW<<nK6VNIf^+*EM8_i35SsZ# z6%kKz!3n3K;L)TErO`%TBZT!cX3l_Jz+~chZe1^NFB(OW*wIw1zImS+sqf93*7C{) z2k9a!CZKp&Fh*o^OyHhnpX`-=iw}e^fh?RGC(!$YERYwRCcl6L1B$x8a50L96Y|DG zzYwR0csyIhH~K3>E706_%jS^?jBCr;nqF`Tl#Cj>Fi%8;!EfPMo)dv_Ow9N)4oc!p z1lNTJJ?z7~K4VlcP~`scD24=Da!UwJ%O^i`0{8V0-BQ9+57*!Q`U6J7!RV1rYrH<9 zT@SbAEX44MU~Ub6#`OJ9>RB|JFiH0;(`!IVLY->bHZ&eOR4AVDO$IHA<3vc6?fGi) z4~al$wJt+1OQ6vZ&gMYB)Md^IEZz*Us+nO%X>REe#!3>jU|a-xftE@t<FyINewHLN zdxkCwSc*-Ak=P<ARc+ogx|a}7^~m~J3<-|1Z6PsA!fK7Z3ciNK4V`3WWsB26kOkU~ zePA^M8FwJEkn+{Q<{a&55d8^Bk#%v)*$BCJqu}n_yizV<bfV0xAoRfsj1Ng(BcSRY zJ;Qj^_ZeO=4LK0_7BIc{toE8}vKicn&i9E}%T?R{xmFrD`A*oDdrTI%v7+nZpo0Rx zb&Oi#;J`}~MrtpakZ1mW7Uv%IOm5*X<ufI}Lo&K|qs*Q%IbpH(&_pquEqBY!8lSg$ znQ$Z7y$0ToOijL+8HtAGFo-1WBlm`yOwc*k!_rM5O&Aw<7Ubl<?*r)2O%*9mP49f9 zckSr<p|(h_p{&ZWQ#^2Ttv~IpIsU*&mg8t|bEE5Y<w?*(=^&&&?$;OsJ6Pm`H#%z! zuJ9VxV-p!o5`e47b4YkMd&Ls+Q7SKQQf^DoUgbP~C=Tn@CAvrwIH4ux_>UB#OB(3} zwiB9mR_G@;MBMC{g&sw{0|<$r#Q4{)`#T$ngK3_X6L_}1nazpA?i5jY;VD_OUD}6H zHEco6FiA*u4W$l+9ukDu1Wev8Ak92Wa~38r{3~|iWMnMyObDqbhpF#R>iyK}a>UvP z@Vf_w&k%U-#WL{%kuE^VTK;%A#o!FjcbQrcVnI*CKw+**&B^Ul=!e6_=JS|wK=5Hf zyO(J+T!jOo(W?{R->t5LSA#ut4+ZO9Qo$kpICA6SnJ&J;92a56LJZTcaBiG<w7M48 zILzP<dMb=ma3PNpm;b>@?w-|$vnMMr1)HgXqVFzduY+;e?-D%wf{6b1wMJ7ycK;RF zCFkyY;s*_g3K!utFH=GU8gix2f{3GXkzYB{CQS`lLbEU`!yE=2uza7t@05d|CnPl3 z*q@Z7!9&G38Dv8y@qEf;6Vs2jAC7I5ICz@esh_-%q<PXBNKPHkI0x1F-c6S@-y65d z)2G+96;pKR-#-$Q%&~<~@HmⅇrLSLlYJ|txl$kL4Sff`Ks-f^s$PwWry{mRv_;W z=4AgRGlo<sjeJXXfTBNHG>-{AWWz6KtRhv9isnMJr=k8-jcQ8D?kicJf`FH$u(tf0 zGb#cS_j$b=VEnoO|67P2PK3JhjTHw$kUJ&J1Dm#Zs3R9r0UP3OIL6jsI|l+K{lYbn zKqcW>XrvqXleTz!A(tcfIf1B&?nltPUopak6dK01dSCVgbahdSc83(`h)vNIp)k9= zRMRyS#m_`1^6<+EK)O4qpLOt20#Cn5s3!eybyqC$Y*N7N_KXK|%n~@p3~~FH1*gH& zt|9Wdy<Z)W_~p`p01>RDx$B>Z0`2LeZPu&6_RP|?q0eX>Gm>YVbw>sg?@u;lh4`R` zWTCe{gq!Y!vWHXhP_?}f1?c6~<5(E4IdyikntrgLMg0B1qYyOmHV@>OE>nmYWm!gU z?^YsBH8BACU=8M;7;5mnds>%V@c!*Eg4&=~G3d@|fs&~G@uN#p8k=;PvV0=<Pvp>b zZHnA&xyMj`4WU~P_zB_MnVy%70@cO@U`~vU3TKy~uy!k|3nz}wr@?wF8OpP~r<}nO zDhp{v0<GJS7}8g?c{58XGidPHHL4Z+g9`l$v1gfp3FxJnjo1h`*fV>vJ)2jcJKxcv zQh@34aFA<(tWrl#GAd>cTH5^|M$Y~_u*z7f13mV^?%*6qGZBul5!S~yDA3F)b`)OW zgXgKsTJ*bm*e)IFPG@44KW+9@_3nl00nTY-@_{&OGLV6)O<)ija+U>{AX3z2N9^8L z912BvaE=L0xN_>pCS<b%&y2{Ffqv`F)j&1<J!WV{H4{$6fCydeOSe!bGt&&PUJcDG zt99YWjozGf6V8=ADTf2iYW3mSr6G+2v;?6+;4)&hB3y?KGMrYexVhU}U)=#wEOiN+ z`%uiBepmI>>1@=}!s^T=^4B#y*iTICklO6r;<RXFUd-C%KyxNlU}g3Om%DScf&L-n zJtwx1;~|HU<`26w&gLCZ|4g4`y209(i|e}-c=)X&*6X*V^nWw|0$z?Rn_N%Xh7E8_ z_Cpy@=@B&T821~bX65qM;L5lV4t^TeWb@i&L+fniNL6Kbj_SW5?2K1~A!rEmD~i0? z(J^?MFbB^Y$OB#&5;R!s?Cy8vAB_)#!k>~<FknKv)r&e5VFV>HNrI9^UO4V2WzGW6 z1a%00FZgXGRRrvoqYcuOkW+^uK)x^*EXu^$LJN-!q0q9Z<6XR7hL*_1Bmm4lAJB4Q z$9;cjZRK3jF#j$5@1HxgEU{-`+0M)_AF5P`TreWrVI)X+i&?D|jimiSX~1%8d0tC| z+VUUI-D$o+A_mAq5uh-qD~YzjBb81p1_;FhFvYC(R$X5H)A%nuuK%~Bvby|t|34-T z5o+#s_H>RIV899dc?v6&W(Hj>*wP7W)iShE0Bwn4$drrJPU}K<Vo4{DKkDh4K+7ed z0-ZR&z7Op$0(CDV#H1Cc7#}0zCCLws8s9)B{}loJF)Vv7gB+wlCtC4qLOK)DfP8?K zI}4NPtQ!a@(VNqfMdS3@5^p3R7(sW*!NPc!4)J5a!_81X<jpyk;}?VikApendkg&9 zki$`DO=qL#6O!PbtP?abiD-BN&%@n<hJ<D9Ou?6mm=*K5)prVy&p`1~|2*QvyxmcH zWp>6Bj4f(!&<0BQD?ividWK$rTz&Z`8P4+^IgtBjh+}t*_g*>sY{zC}+n+wK-*;!t z@y73nUtI-dU1a@l%bbX0!EkapoqVjO{$ai=#KW5K!hXp|VHB?9nbJarE_Ol-Gn zmt;nGL%NSJwhrL3ou5wq%B}k^<=;*VPC}t>0nuWB<!X#LH1ZfsbGsml%f=)H|2sz; z;b2HPIt&02yOMKxE%7v4ZIOEWF*+7d)yGwB;aAQTqIkY=aG8A{X*Oi18-dhy?eLy# zKjippVwp^cTr$)04#a>SLyF}*G5?fx=Rg8ljwFNlzNG1zcv6*Mi?nPaSQ)p~)*FIw z(8oPSNYw&Y3eB$AQAYdvAVQKGSD>raiOULCPS+16aj#myy+MJ}9yq)Jy44|WaOVr@ zK!;MHJU@E^3`ez8R$wn*FikoMKMQ(l#fWdm<AjIs93MOo-WP-Zh=Pu|Naxb<Q(_Z5 z_fxwvKl%M<s<Q}H5c+mBkpDu+!zavtF~FiA?JTC{38`CxzzMl&g=f3CtZWN4cb(2K z?H4ix`hNn<BKQ*-$5|ouLES5U3NpVF&LcRY0H0MV4HNjM!%+5{P3OVO5x>7IoB@Z6 zpMm05W(mk#3ni@siwV3ZlItamdiBRD0`Li^;6a@g(N0G+;|?$E`dNY8$j8H|jdcs4 z5c$|qd}nV?7{8~2^&aa>{rcWKR}9v<+kJEKm&xE%ee1QZcPSX#(9M~PfaOFUbO{Y9 zTgM4w&HBX6_z5qqZy?nh!U`gRL1#7DqZNxFN2Zy%EqyX9oFRjf3u`oFlPg53&pEvR z7>I@xh~&1u=dS#ftV2~%3%pX6xjo*uK{RucUjE{Zu^l#~n2(a@w7^u+fjjL>yhZ;E z0&>+LBu$u_t%7&+dv7y6a~Zy)Lw@gT*jMiuQGXR04(j74zmkAhxefOBquZQoTdt6( zBqqP(e$J<epaGye9<+VL!TXcI-SUNZ0fN^{nj>XFbr=ETI&?@q#rO<li$M$;cON$f zoq!yazjN&Ai|95K9x{M??~e*%ef`G4vVj-3E%1HLm@vSEiGDtoDg8R7vlW+Xu%Gce zF#Q#!^P#r72zII?#z`)Mk_G#!LN~QNiy14NO#(J0Y6Fk^X>aBjB2~UzHCuPU*JH6< zKsnbjKY`It+2*FgR)`+A!|&jQ4K!dcVg8Oo$%~y0M;23OXzMfiN#kXUod#G21Hn=a zIM0S&&h#=HC+pKinDcP|WXKh1#EvT%pE$jWFVAX~a#63NDS_{Uo_chtaR=V`L^^o5 zj*@fdC*1k;Aam)gsFswZT(-cm5nhE3H<|4IlY=vDt(xsvj$}rz9j+Rk7%%8ZWzwe5 zKFf&US!8+6Q;YP;ZaUa!0>?NJ4SAG#^tY{q+d;3_Ft(XnGud!_dwu2!tet4I_V{V# z-;+~+QFWrXh~wev1CR)ugc{FTOzBmn=IO_Qzs)@^zI!TJn>+OjyX}mZexC!&yb4&C zWd^!mM9aAtesGbWdVUH1z@4?(in@ZnPf`zR%tU%%Y^C;Pr?u~VB(AUT=_E68o?~6a z1}HC&iUK;H4zAYx8y*2BbhMxa`08esvSwrJu4t|yLTZgmE`r~V;=-#vC-B4R-jM~G zFz3MY*h=<RLu|0H=-I_|3p+uxSfEh|qHBqFQ7b_r(@s$L5vUb$;EW#S-JG`njslV_ zj2_Aj)ZEgifBb9rysRH3Ck{)=G!WeP6#;tG-kn+*d`fz-^W|Z;uq16+C}gYFE`Ig5 zY#j^eo}>N|k1vt8PBJXseLMv{_LMYyZ;X114Kj+H_e~U+6#yg2>wgEZ=s%{iITR#J z7#qR=u)A9VJotQ)Aa1bKia1=1X4Dz0=uwWrjfA7%JjWrd0<$ubH1R^5141fj&sP<& ze4Pi49!J*IhnIp6X+)t)!X1u3DnPaTn-}$E)8O$Pg(SvfW74oM?|uS&$pr9L@4Ed% z8+;pOWMT903@j1@_*Hm}IC}51NQ>rjF<k5@!bfVCNP4(SD)Fd9o!s%lnTF))2k1nM zN`AQKTAK9pZ~w`Al~Cp)7<Kyr&zLkWkzN=cC~Z08p@rP-s>{tu{}uGS@?fpNV&SlC zp*rc3t9^PLj}THyT(q~zYC+*zwNQ8{seu+vBBSLV=WErX(k3~aqzmV-f8A=ZAGj`! z@Geu-M@UH@MwLyfT-cC+<a3^&e#}yT2Ll1VnhwXg@>oORM1Pvg$E7bS0V3yNT#?QH z*;62H-Eyz>|7U97IkCUn9MRX$7B0>_-g_AQhg;dkCRVyEf@C3Cd-}op7z_}D><WA* z#bug_f>lM#Q2x8#%pzFBM=D^XAN{hd?i0i+qu|U6@LJ(-ZuN4*Qc4dEkz<zuZ>{<l zGxvC*rvZg``m!obsM5f4J4^h{SRFjVTN_jqW82R0dq65oNb3WuV`1viB+=d&?U0Av zvk|!2(Y+MbJ27B_k3vZO(Bh~6N@nV~d^c8LTEU-u62vIy)%?R_bv2%LP_q^q-1|2` zWxSZe1y$sL@is?d!Gv=h$oGJ37~(vY9*~)LLMyLX51-F~^SnWRtCBc4)pZuLG|X`Z z<_`vu9%2ugBFYH5yngVU>8O<gK_%9)V}PD`=7B1SL`c`m2wYc{u!}@(E$sBzZBw?P zMx?qb`~&S;p_<cC4}?7&cgSpS0k<y1;e=7=!QPr@3}ni;+X(jGmfNhrc>a`RamDKr z$PeTD@<SWfqDi#^!XX{_F3FI~AnJ{t<o&YMZ_k523F8XqO8nu;UJUhkoWxxWRe24I zJmH--DFVdHln17p1`3;h<}l+yv~O=`j8+ukc|Y2x0<j22gnD^Flg}5}w6jgw4SO)@ z!e_&^BL1;fc8*!}dU5A=Uq5Mu9B#znIl!_!50?1}7GLuXJOb#UM}}}8H3WG&f@12| zII%fy`A8bRln%tIGUThCzXh_-LFO{Qf=|q42MjdIC80MEWNeY&QHxXHubvgp%mc5> z<hTnrjmZ(Wg9%8La%l9%w}_3&)4+r%RjTpKA@(?e{K230XXeOTRI*9Eg6m%n9XBzg z3jAHr8s#D|u?=ngG#w>NkHSmGIJ^@`qB6gqJT!YFlH0+(Y6s`vK}OQ}Il@Ql8c^n` z0N*(f`ElK(*C#NwHjxZXNW-@$Us3dMoX|pRUD+}4B+qbY&iwlBt5w&^o5Oqtb{0Y2 ztr7<N-Z0tYJRr^6GngE+%`KKz%E>TNHCm1)oOSk9PB-!zH(=lCA^m77l+=nT1-m8# zS0!py7P{oPYE8|~J-@Oz4D+8tezCz1-{xW6S%(F1kJ0lw576LG;*6ji%flV8%)SH8 zJ!M+|(dBIs+)CjHB}Kw{euw+>j)m&rY-Mf#c-Bas433i=Y7{uehtSKV{HG2C>QPGH z-#^BN`Uc}T2`x0zh4!z)!hR_hNXmtQ$xY>mZTD=K2AYy7EPaVI9!k=A@kt{)hO`QQ zVSjUvEbWMB;09dQ@MGq=cf)A^6kM07;Ej6eU)I7PkN|Q%-QSmufi6wKG^H*lb0}3E z7aTi2gI4%}EH+BkgNHYUfpHz~TqOFVs@fD|+pw3g>#(Q!>2w_SQLohW_+{wRaFWtp zO8ARl1UYFH&xug~zmBdxp2_u%+v8bg(;CL492=&|+wyXd%Iu6JDet1K$BA<!X-WDW zdD*-iiLn!tepJqnP~N75lsud)PD)6LWT_k~h4NP7ckk@q?X%DQe6H)huJ6lrKlk=k znclJZ!<9bBt-Dg%%eJDYP#HYvb@-)TvyoSVf&8)igW|_1?_Jsp%Ge0;r7k|NwO!Ps ze*q%2IK&E3cfp86dk%@+E(K0@yJvchU(lm2J)q#@gg;7RXXYY9OJv9DPT|e|7+cz9 zhJ?btZ(5aT3FBW*7!*g<{pM7V;&PJ#Kf+@hip)d@_j=1A$oQ30tgv90K)Cm<k@D~v zK~RTldN!N-jh+4et7Kr&;^-5Ko3KzJ?=mp>%$X{&1rwZO9ISXq!kEB6JOh?-?{(eL zAfU!7c-O0?oNH?8Vq8<4TmPjJQh^w1U76if^Xx{g)068TOvE@h*yF6gH|&gngJ!<p z$mk{kzI}gS5qkjMu@kTt-*Q0zZ@hAHw_04@3ENmWT(jb^c7h`g(X%eZSp)1j$WgJB zp{1UV5D&N%uJDUC_uJ_w(}O%Sl*=@roiE0aEFcXV0S@pPR8#Mqwtt*}q0=?BEh_^U zp`g7abWJ(rsEoXIq47!3FJ<V@T}eSWH>Ye3Dp&p<o2a9SnZynUaI;J|{@a3dF*B7P zV~Ql-m!ECIcxQDPW6Gk1w+WWhAw_u1dX*0~%^mHTo4ZOipu;LTj61c7pI-k{c{3^8 z36kx|P!2}77_r{87fSwCj5MCC^lX{_Szm@@Q>T#fKhgZwh2;5&BcNvGxU11w8&yd! zurGa1f4o<qbJdIwhXRx$oY+E!o>P*w@$v5lRC)qlyEVyL>(w!KUPy>e<@fk2@I;Mz z>eYAyWHbE2_jJ}j3yMyw7CWtw$ZE@nwC%Clq3eIwX428u)dz$*AqG@+{;x~D=Rk1w z<MJMSTCThE^|ob0mEYoUssLOG6;H1V$DGbn%E5JR^B4FgB5=_T%9_tQYkJ0gaH$#q zXB1CAJep+Y!;q?D22A+Y&^eG9f8%s!)r`R-YCY(AkV?#sC?VNjS@!%?Dbp{Vc~F@t z_>Cbg6)BZTltk;~YMw>4H6Gj*LWW@d@AbWe2B6ol<tMRE6UDLxi3N1c2Qh@=%F%XQ zF@E*=DdE195Rw?js4cQm`^6}e$BYDnM^++AMZ+r9hr!R++g54INrN&8E140PZ+czY z##xsiVr4r~S!MI|I=T2av$!@K8>z-oW@^H04S*Wia9O&AF>TUF4m5UEIuwZh;dwBg z@}GRz4P2j=`rM{~DY_6cCg7!_Wrynazv{n&?q?$f`=~)FeAT~_9O)>!B|aXoQmG-F zmGHHUjWUn3JZSuX9&%-59amf^gRhCrchhDLoF4>QE#X52B^6RrXZ}ff5s;q$EcR$I zs-Fv`q(f_g^D%STazUhltWhQ1B2KnpSu7dm=sSLt4&flqLs3K@P*+O6uvPi_{}Q0P z_G~nDPg^*Tud^XrVTTN!JkmM$?bV#qw!{M((3%@Br_B*}!Aq{3x!w$rIJhYI?1#Tg zNfVt!S4PJ`!r^$Q_%ninbPIF2k%pW@Y4R84@m%jsZ!#!;?nYFGQ$@-K6_#XZOB!pa zE%W`C0K2=n!wX>`L7&~-V2*gGlG?CD{)7hDw6cNl!|0x@5HDP*UezLD*HmJ<thIUM z!g^<6So6eKFZ9R+<9S?o^)?Cf-9TPdCP(@naFi{|NjhD`mmHxe33;t`5I8c$GY5?n zQ2212igoA)V|Bg_6c;lZ9oI&NMBp4%=jR39x58U3?ZCH(u|ZThXC*Tf<9JS~t$#st zQ{5glsF}r@`{T}C63Ibe>vgJY66=F|;VW)WdipW3!l$^IWS<G`{(z&>(T+6!2IG<d z%n*P+)M~r9wi=+CC(uS08&zVC@%5aA@7Qu2-nTx5U?@nWvo>1@xd^Dp|K&JFDF+^- z;wIV&^A<4g{A0|gAb&^Xs*jxGsN+Bm)WH<J#9EogXn8;}ub|r#*qJmzXQNfA3yX3b z4c|lKhAjbEgHYL$3QlptSkL+t<$cIZM^dM@v=(#c1f4|@Q8}y!*GtFR?UBuvf#2<N zH}RSpzh9x{>f;nYPf3HYz&9`yP;e96BNs9S7Dg!I%tAAmHX~;QygNvDnYjPq+VYd= zZJF&K&?da_@K3^TCeqY;0e544p3)>_*r>cIFF0BB3fahy3u_qdr(1&mN`ttAZNHEM z#Y;K7U^iIJ7?Zq^9BLo_Trjzn2%h$bEs{n(jI~cO!Ex|YLBY>x(r>BSlt#<Yd?l_5 z=IYIRu4ug;P1d1$(oQ)IO(o;#aDMDcNw2FaXaGqJ8_fU?NN2yZ{fE9@QdGQ(F*BQ? z&ZIX^DTRSPs^*F>?FN2r2#MsNZvZpLN5-2Zyq2hBSBh892)fk8$4wQ*>fT7zlOQ)? zDf;p2wpHuamA>zy%I_^t&I%N&oc5~7m37Tb0j~TLyu)`T1FV~((enAxY{aUyiWgD` zsy_(*+>yYGMYX)~C=wXzMS>)0WH;E?vNtJVNwczYO+0wr012z@E_l;=9Osrnmx4l2 zZ|QZ-j0_C}7Shz5jXp^<YnUFj$Je{EW-nW;E=iQC*9CypF##hAo5>WAp@H2oNs`3R z5|x?&N9!wB(Bv*Kn>VoZNm@}$!jw0mb?RabLJNWyHv4^*IO=OYHJG|ULzs9o$E6$% zIT?;Qb^Z4kVTPa$T%z#p7EY&+;AsJa0m}_hu`T`0<KA){T;w85)1Kz2KJGq1n5<2U z5#}~3AJN)8C)ojed<1Eqm-)GCc;TY|x6{$E!dNq@rlo01@vHRi0EcK{t_p^0NHza4 zwOFeK*#O&ULPrh`oahYZo-pBqpQ~a2CI{MM$K&Y^{>SO8HJH~1)DA5JY9ZV8NyLNU z>)(gBQZRbY+qN*I9FfxX4yy*ZlPW(Gbkr<hKFEMtTw+gck;~ZId4rEv;GxlcLy|a_ z?+CRw{7&Yt?2ay5lds6b^QIE5`r?+7Y*JiXbi&i9FfP}S#BV0KIqKZ7Egj@2&Dd(W z3u1)ah2)B&tBSCe*cXT0ir{tuN5byrbU)FvPuII)_TV{XiK1ceZ><Z>_d6rVQqG=F z{+0U|3(zzs6{{T=f$REOp@H~Pn(D%p^((yYSG(w~)v+boj~v)w1V?RMF@YNlsXqxR zTETaU%7FLoE(ke*JZsPe;AO&qsN?GIJfEB}m&PPlcnZt==kuPLcKbT$);O#30b%#> z2ST(VHL~~T@yc<Y%$>$;(2G1+-}C)T^wGWp4K#Vo${`Alj-FU4DITLA*bB#q1iL(a zSe6BBWV2)7VmYtml62fq9z(E?px}~W@Q%I<RVo>N>X^R_5x3xn=P4ev#}`S1UX3D4 z*?iKJJ>JY>F^5ZiZNze+6hz?FnOczN@&Nr#F`Fi41KO+5%~Ik!_KaS4CI^ON?&m5k z+(t1``*B%<lw^Rl_Fvh(cdaHsY_c0EmX`)GpLEY#;(dQYotN)hkgQdi)rB%DRpAO= zEi0W%29sRUSpHP-^Obu;>Y$lL#ch9d1!WTkGhzEvO%}=U89AiliaJlBINV@Bi-p?F z>AGuTg%H)zCmD4p%$8J;E22~=LFl{&weu~$tKWCMVio=W%d;W^c(u-jRnC@AH6E+4 z+EaT`9Sl>e>;=9L;XmtE|6B^kfxv>oyALicl!2r|4$-Ei9fgTW;cr^2$rHPAF}=Fp z$Wl)rRNw7IpXoh!8x;-<wQM8bF{Hq@)wxgbw~$*ygPb4w)y1*WIEM6Irc#-x?{==z z$SoA-43vJ4nB?(^Dh`WviYIL$H8trK%4WfY_$hX=qhnwuM2Lo&p{8Mxs*f)cvcPy_ zRmfQehZWa0Z@c_<ctN!?!E%k_<&kP;aB@17xps962TR8^AAvLU;EiVmUwYdOsg7)B zAv>GG@7n##-6%NA9JV4?xCz5dSKm4~nqc~{t^~;2d1ga}iZd%Uo0P+wHvV6Pu$71h zYZ_`xoRR}IV%G<2cfl@Q=Q}W__mQWf*0458>$1{$jZ7j4<T+@-L@LcVr`QD-!#tLZ z%%SE&qFxVS&7D&cHdPl(WTQ&ev<?#>HkJ{#u_4&Weq`+vD!^!Ve%CEE&8tZ|r&%7? z_93eJm&@S-f2cH;4X6H#FJ6`Sf;kszH2qoZn=kt0AT&>DMqRABSy7JTwro1}m;v_@ zFY&r(Z-@71FY93r1p@+!x{{11GC-6k=RBrTfq=xf!0t$Ve<}aw<jHyoL|DpMZcJaT z_^$%-_rJeD+w2X73BK0ajIO@@RX4zJdHp^lgyN>Mn#N&WGX^`K%HHl{PXo(Uf4B5@ z!Kv};JCKW}*hf2A?t;6EmVbt_fhGdw+xX>n1LAPcWb(xFRw?(}**(IvWxKr9c|$5) zb9OWw%qBGC$K-wPJ7h{vLnCpFfH~XKk?oe=h$$2`2Dm|Y(hPC80rI0N6WnFK)e>xx zpHMz|v2$+d-Vd)74I4Cugyr%??>?&%!p0u#kCpGl>GT!^&<|2m(7-IF#qIP>7d(jk Z>N?4idBfXVaG4VL>~its)Uc7{{{yYF=AQrn diff --git a/src/main/resources/assets/bloodutils/textures/misc/tab.png b/src/main/resources/assets/bloodutils/textures/misc/tab.png deleted file mode 100644 index 4226a378f26046fdcde5bd1a756beeccc0d2e33c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 277 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1SFYWcSQjy&H|6fVg?3oVGw3ym^DWND9B#o z>FdgVk5gJu#mLK8rVuD3n;8;O;+&tGo0?Yw<T5Zg7o{eaq^2m8XO?6rxO@5rr0Aux z1I4>NT^vI!P9L4($aTnphvB&CM6s9Jd%i5TTm1jk(QuKMNkJb3G#;%Lykq%BGttTH zWag}QDS{49)~q^U5W^_Qxa-{~$?(_Q1?35m^BQJyE?D(Cs<EPfW^>^lS>4@luBvJL zaky!H<<Ot6+Vv*ez56a^C-xQQC-#YYzbiI4-|w?&=GWTkHf--^|DI;SmhbW2d};S& RnGTS9Jzf1=);T3K0RTFfV#xpi diff --git a/src/main/resources/assets/bloodutils/textures/models/model_guide.png b/src/main/resources/assets/bloodutils/textures/models/model_guide.png deleted file mode 100644 index dba3d66291bbe219fafdae92f8619154008ac4df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 322 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzwj^(N7l!{JxM1({$v_d#0*}aI z1_r*vAk26?e?<yVkiEpy*OmPqr;LyULtfjacR-=@o-U3d5r^MSHWX@B5OEP#Z*65( z|1kfAaD~BZ8HJ_lO6n69ZcuhTp!ma=tK`z3>pv1@3(CS<PuQGiWLUG6fkDa1Z>K#^ z^C8YVeR>|Rk6f(N&6>5$!KI={`F~sS`{mcx)Rg<peZ;^}a_-=A$%gAvYYiD1Oj*L# z_ce5wMc3L`oK@ZbrHY-w=JB25-q%uZDn0lTC6)bl-ABu{hS5CX7ap9iDQQsde=vz( z!~2@J>goSXe)e0LV{I(*t0OPvSM6n<d3IiB!(~=S0Tv)yI88i%Ua<DJWpCJlUSsfd L^>bP0l+XkKF5`MT diff --git a/src/main/resources/assets/bloodutils/textures/models/model_reviver.png b/src/main/resources/assets/bloodutils/textures/models/model_reviver.png deleted file mode 100644 index 96b286ac2b2b85c2ddba1261cea631a1a8551517..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1058 zcmV+-1l{|IP)<h;3K|Lk000e1NJLTq004jh002M;1^@s6($;@}00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY4#NNd4#NS*Z>VGd000McNliru-U%KKIXC5zkevVk1FuO$ zK~#9!?b$(Y+eQ?|@xLgFW^4&bV*x3Q0PZ5lsk-gDC+HEn?isqsg#rVG0at+msjw|d zp=O3;7b58)BgTd)Kr#INHXLd+l7Kgw_l7gT^D7i1AO@B|)&2_xboelRS6J&XxdY(j zC<b7)Nq4?K3PMJsu<=@-@fY*!&fg{vYed2VpI*J<x36Ct?T4Jd{)sq_>-#iK;dp{^ zmbpopMln%1s^636Imvnjz}%$0#$PCg`<nnCf#1vE`|XDqXBmIK;1pN@=j9dPZF#Nw zs%!f5`^NaYyR`g4+ds6UDEk~laA#81W>b%;`laUt_yY=C{`<T5@A<PM9kc^{S_QYf zw)<v4;+o%@ILkO3)$P=52!dhVf8$Ku&yMl(gbDDEm+P+|(cWdYPI%i2a25EdY)@K~ z;Ci*J^Z9I@)Sops8?vGR1`G#avy7|cj^Q8x;M%JVq99ZR`%VDsEz^%_w@srMBADDP zSa^Y+c)_PEDo?$>^T`{pvfI`IXUCH|&xc`%b8cG?0JHUyv*SsfGAft13q`Td1o&76 zxXSwvwcFOtVT-&Da627DtyQ6}0rIRY=n8C+W1OpNftY}lyzxD+k79x#;3~Ooqyaf_ z3a~|vE%MHqfbt(-rGs|P9}R+U#;4>&1Q>EQS+?zWmQexYa8%a{ssZ+t0xYm@Rqc;W z0e<j|7i81kDeMToKi+1J%jHd-+lyAI8HFKpld1sR_XPO+I}dptYZ}Fkg3r(Srfg3- z##H-!|Gvuge(taG{%oCac09g+5TqFH?>RspUE9E@qi<H$0QIu(-5X~c_wD{&_wqEs zzCLJI@T;ZYv~~cy>h`WBy($j1?Ej!EfVGY<HmRTf`GNKezxD+AT-5;Oc$2&O`TuH@ za&i=7oFmIJ{#`8zg8<_kN27=@tK^&W1Ub+In2yJs3`Z<)7rY0qT04NQ6!FWOQ<C)x zdju!L?Y1tCW70Ie-{(j7Ilp}t0FbO#ssVcHT>yTVzAL6tjLY+#&*u|onMU!>oLw#H zea7oF@CPXZ+rj%U^-d9^X26YeL}9qs@$$qK;Lzv!haUgZSC9}6d!B#j@h`oG2&;W} zpY!<VK3>lOyrRlc;3!C(W$qo*!uCAA>fg05f9~U7Yz<(Xt6#|TtZ^Qn6)+qO>ht(2 z*ZTSNIgh`*U1%2}A|fIpA|fIpA|fIpA|fIpA|fIpA|fIpA|fIpA|fIpA|fIpA|fIp cA|i+MKMA2UL1-lEY5)KL07*qoM6N<$g50P4L;wH) diff --git a/src/main/resources/assets/forge/lang/en_US.lang b/src/main/resources/assets/forge/lang/en_US.lang deleted file mode 100644 index 2f9368d4..00000000 --- a/src/main/resources/assets/forge/lang/en_US.lang +++ /dev/null @@ -1,5 +0,0 @@ -commands.forge.usage=Use /forge <subcommand>. Subcommands are tps, track -commands.forge.usage.tracking=Use /forge track <type> <duration>. Valid types are te (Tile Entities). Duration is < 60. -commands.forge.tps.summary=%s : Mean tick time: %d ms. Mean TPS: %d - -commands.forge.tracking.te.enabled=Tile Entity tracking enabled for %d seconds. \ No newline at end of file diff --git a/src/main/resources/assets/forge/lang/es_ES.lang b/src/main/resources/assets/forge/lang/es_ES.lang deleted file mode 100644 index de2e5178..00000000 --- a/src/main/resources/assets/forge/lang/es_ES.lang +++ /dev/null @@ -1,212 +0,0 @@ -#Block Localization -tile.bloodAltar.name=Altar de Sangre -tile.bloodRune.blank.name=Runa de Sangre -tile.bloodRune.fill.name=Runa de Capacidad Aumentada -tile.bloodRune.empty.name=Runa de Dislocación -tile.bloodRune.orb.name=Runa del Orbe -tile.bloodRune.betterCapacity.name=Runa de Capacidad Superior -tile.speedRune.name=Runa de Velocidad -tile.efficiencyRune.name=Runa de Eficiencia -tile.runeOfSacrifice.name=Runa de Sacrificio -tile.runeOfSelfSacrifice.name=Runa de Auto-Sacrificio -tile.ritualStone.name=Piedra Ritual -tile.blockMasterStone.name=Piedra Ritual Maestra -tile.bloodSocket.name=Cuenca Llena -tile.imperfectRitualStone.name=Piedra Ritual Imperfecta -tile.armourForge.name=Forja de la Armadura del Alma -tile.emptySocket.name=Cuenca Vacía -tile.bloodStoneBrick.name=Ladrillo de Piedra de Sangre -tile.largeBloodStoneBrick.name=Ladrillo de Piedra de Sangre Grande -tile.blockWritingTable.name=Set de Química Alquímica -tile.blockHomHeart.name=Mesa de Hechizos -tile.bloodPedestal.name=Pedestal Arcano -tile.bloodPlinth.name=Plinto Arcano -tile.bloodTeleposer.name=Teleposador -tile.blockConduit.name=Conductor de Hechizos -tile.blockSpellParadigm.projectile.name=Generador de Partículas -tile.blockSpellParadigm.self.name=Auto-Aumentador -tile.blockSpellParadigm.melee.name=Agregador de Tumultos -tile.blockSpellParadigm.tool.name=Forjador de Herramientas -tile.blockSpellEnhancement.power1.name=Fortalecedor de Hechizos Inestables -tile.blockSpellEnhancement.power2.name=Fortalecedor de Hechizos Estándar -tile.blockSpellEnhancement.power3.name=Fortalecedor de Hechizos Reforzado -tile.blockSpellEnhancement.power4.name=Fortalecedor de Hechizos Imbuido -tile.blockSpellEnhancement.power5.name=Fortalecedor de Hechizos Demoníaco -tile.blockSpellEnhancement.cost1.name=Debilitador de Hechizos Inestable -tile.blockSpellEnhancement.cost2.name=Debilitador de Hechizos Estándar -tile.blockSpellEnhancement.cost3.name=Debilitador de Hechizos Reforzado -tile.blockSpellEnhancement.cost4.name=Debilitador de Hechizos Imbuido -tile.blockSpellEnhancement.cost5.name=Debilitador de Hechizos Demoníaco -tile.blockSpellEnhancement.potency1.name=Aumentador de Hechizos Inestable -tile.blockSpellEnhancement.potency2.name=Aumentador de Hechizos Estándar -tile.blockSpellEnhancement.potency3.name=Aumentador de Hechizos Reforzado -tile.blockSpellEnhancement.potency4.name=Aumentador de Hechizos Imbuido -tile.blockSpellEnhancement.potency5.name=Aumentador de Hechizos Demoníaco -tile.blockSpellModifier.default.name=Modificador de Hechizos por Defecto -tile.blockSpellModifier.offensive.name=Modificador de Hechizos Ofensivos -tile.blockSpellModifier.defensive.name=Modificador de Hechizos Defensivos -tile.blockSpellModifier.environmental.name=Modificador de Hechizos Ambientales -tile.blockSpellEffect.fire.name=Crisol de Fuego -tile.blockSpellEffect.ice.name=Creador de Hielo -tile.blockSpellEffect.wind.name=Generador de Viento -tile.blockSpellEffect.earth.name=Formador de Tierra -tile.alchemicCalcinator.name=Calcinador Alquímico -tile.crystalBelljar.name=Campana de Cristal -tile.blockReagentConduit.name=Relé Alquímico -tile.lifeEssenceFluidBlock.name=Esencia Vital - -#Item Localization -item.weakBloodOrb.name=Orbe de Sangre de Débil -item.apprenticeBloodOrb.name=Orbe de Sangre de Aprendiz -item.magicianBloodOrb.name=Orbe de Sangre de Mago -item.masterBloodOrb.name=Orbe de Sangre de Maestro -item.archmageBloodOrb.name=Orbe de Sangre de Archimago -item.energyBlast.name=Dinamitador de Energía -item.energySword.name=Hoja Vinculada -item.lavaCrystal.name=Cristal de Lava -item.waterSigil.name=Sello de Agua -item.lavaSigil.name=Sello de Lava -item.voidSigil.name=Sello del Vacío -item.blankSlate.name=Pizarra en Blanco -item.reinforcedSlate.name=Pizarra Reforzada -item.sacrificialDagger.name=Cuchillo de Sacrificios -item.daggerOfSacrifice.name=Daga de Sacrificio -item.airSigil.name=Sello de Aire -item.sigilOfTheFastMiner.name=Sello del Minero Rápido -item.sigilOfElementalAffinity.name=Sello de Afinidad Elemental -item.sigilOfHaste.name=Sello de Rapidez -item.sigilOfHolding.name=Sello de Propiedad -item.divinationSigil.name=Sello de Adivinación -item.waterScribeTool.name=Herramienta de Inscripción Elemental: Agua -item.fireScribeTool.name=Herramienta de Inscripción Elemental: Fuego -item.earthScribeTool.name=Herramienta de Inscripción Elemental: Tierra -item.airScribeTool.name=Herramienta de Inscripción Elemental: Aire -item.duskScribeTool.name=Herramienta de Inscripción Elemental: Crepúsculo -item.activationCrystalWeak.name=Cristal de Activación Débil -item.activationCrystalAwakened.name=Cristal de Activación Despertado -item.boundPickaxe.name=Pico Vinculado -item.boundAxe.name=Hacha Vinculada -item.boundShovel.name=Pala Vinculada -item.boundHelmet.name=Casco Vinculado -item.boundPlate.name=Pechera Vinculada -item.boundLeggings.name=Pantalones Vinculados -item.boundBoots.name=Botas Vinculadas -item.weakBloodShard.name=Esquirla de Sangre Débil -item.growthSigil.name=Sello de la Pequeña Arboleda -item.blankSpell.name=Cristal Desvinculado -item.alchemyFlask.name=Frasco de Poción -item.standardBindingAgent.name=Agente Vinculante Estándar -item.mundanePowerCatalyst.name=Catalizador de Poder Mundano -item.averagePowerCatalyst.name=Catalizador de Poder Medio -item.greaterPowerCatalyst.name=Catalizador de Poder Grandioso -item.mundaneLengtheningCatalyst.name=Catalizador de Alargamiento Mundano -item.averageLengtheningCatalyst.name=Catalizador de Alargamiento Medio -item.greaterLengtheningCatalyst.name=Catalizador de Alargamiento Grandioso -item.incendium.name=Incendium -item.magicales.name=Magicales -item.sanctus.name=Sanctus -item.aether.name=Aether -item.simpleCatalyst.name=Catalizador Simple -item.crepitous.name=Crepitous -item.crystallos.name=Crystallos -item.terrae.name=Terrae -item.aquasalus.name=Aquasalus -item.tennebrae.name=Tenebrae -item.demonBloodShard.name=Esquirla de Sangre de Demonio -item.sigilOfWind.name=Sello del Torbellino -item.telepositionFocus.name=Centro de Teleposición -item.enhancedTelepositionFocus.name=Centro de Teleposición Mejorado -item.reinforcedTelepositionFocus.name=Centro de Teleposición Reforzado -item.demonicTelepositionFocus.name=Centro de Teleposición Demoníaco -item.imbuedSlate.name=Pizarra Imbuida -item.demonicSlate.name=Pizarra Demoníaca -item.sigilOfTheBridge.name=Sello de Conexión Fantasma -item.armourInhibitor.name=Inhibidor de Armadura -item.cheatyItem.name=Orbe de Ensayo -item.weakFillingAgent.name=Agente Sustancioso Débil -item.standardFillingAgent.name=Centro de Teleposición Estándar -item.enhancedFillingAgent.name=Centro de Teleposición Mejorado -item.weakBindingAgent.name=Agente Vinculante Débil -item.ritualDiviner.name=Adivinador Ritual -item.sigilOfMagnetism.name=Sello de Magnetismo -item.itemDiabloKey.name=Llave de Vinculación -item.energyBazooka.name=Bazooka de Energía -item.bloodLightSigil.name=Sello de la Lámpara de Sangre -item.itemComplexSpellCrystal.name=Cristal de Hechizos Complejo -item.itemSigilOfSupression.name=Sello de Supresión -item.itemSigilOfEnderSeverance.name=Sello de Ruptura de Ender -item.bucketLife.name=Cubo de Vida -item.bloodMagicBaseItem.QuartzRod.name=Vara de Cuarzo -item.bloodMagicBaseItem.EmptyCore.name=Núcleo Vacío -item.bloodMagicBaseItem.MagicalesCable.name=Cable Magicales -item.bloodMagicBaseItem.WoodBrace.name=Puntal de Madera -item.bloodMagicBaseItem.StoneBrace.name=Puntal de Piedra -item.bloodMagicBaseItem.ProjectileCore.name=Núcleo de Proyectil -item.bloodMagicBaseItem.SelfCore.name=Auto-núcleo -item.bloodMagicBaseItem.MeleeCore.name=Núcleo de Tumulto -item.bloodMagicBaseItem.ToolCore.name=Núcleo de Herramienta -item.bloodMagicBaseItem.ParadigmBackPlate.name=Lámina Paradigma -item.bloodMagicBaseItem.OutputCable.name=Cable de Hechizos de Salida -item.bloodMagicBaseItem.InputCable.name=Cable de Hechizos de Entrada -item.bloodMagicBaseItem.FlameCore.name=Núcleo Ígneo -item.bloodMagicBaseItem.IcyCore.name=Núcleo Helado -item.bloodMagicBaseItem.GustCore.name=Núcleo Borrascoso -item.bloodMagicBaseItem.EarthenCore.name=Núcleo Terroso -item.bloodMagicBaseItem.CrackedRunicPlate.name=Placa Rúnica Resquebrajada -item.bloodMagicBaseItem.RunicPlate.name=Placa Rúnica -item.bloodMagicBaseItem.ScribedRunicPlate.name=Placa Rúnica Imbuida -item.bloodMagicBaseItem.DefaultCore.name=Núcleo Descalibrado -item.bloodMagicBaseItem.OffensiveCore.name=Núcleo Ofensivo -item.bloodMagicBaseItem.DefensiveCore.name=Núcleo Defensivo -item.bloodMagicBaseItem.EnvironmentalCore.name=Núcleo Ambiental -item.bloodMagicBaseItem.PowerCore.name=Núcleo de Poder -item.bloodMagicBaseItem.CostCore.name=Núcleo de Reducción -item.bloodMagicBaseItem.PotencyCore.name=Núcleo de Potencial -item.bloodMagicBaseItem.ObsidianBrace.name=Puntal de Obsidiana -item.bloodMagicAlchemyItem.Offensa.name=Offensa -item.bloodMagicAlchemyItem.Praesidium.name=Praesidium -item.bloodMagicAlchemyItem.OrbisTerrae.name=Orbis Terrae -item.bloodMagicAlchemyItem.StrengthenedCatalyst.name=Catalizador Fortalecido -item.bloodMagicAlchemyItem.ConcentratedCatalyst.name=Catalizador Concentrado -item.bloodMagicAlchemyItem.FracturedBone.name=Hueso Fracturado -item.bloodMagicAlchemyItem.Virtus.name=Virtus -item.bloodMagicAlchemyItem.Reductus.name=Reductus -item.bloodMagicAlchemyItem.Potentia.name=Potentia -item.sanguineHelmet.name=Yelmo Sanguíneo -item.itemSeerSigil.name=Sello de la Vista -item.itemFluidSigil.name=Sello del Fluido -item.multiTool.name=Maza Dinámica -item.itemCombinationalCatalyst.name=Catalizador Combinativo -item.sanguineRobe.name=Ropajes Sanguíneos -item.sanguinePants.name=Pantalones Sanguíneos -item.sanguineBoots.name=Botas Sanguíneas -item.itemAttunedCrystal.name=Direccionador Alquímico -item.itemTankSegmenter.name=Segmentador Alquímico -item.destinationClearer.name=Limpiador Alquímico -item.demonPlacer.name=Cristal de Demonio - -#Creative Tab -itemGroup.tabBloodMagic=Blood Magic - -#Extra Strings -bm.string.consume=Uso -bm.string.drain=Drenaje -bm.string.tier=Tier -bm.string.crafting.orb.shaped=Fabricación con forma de Orbe -bm.string.crafting.orb.shapeless=Fabricación sin forma de Orbe - -#Entities -entity.AWWayofTime.EarthElemental.name=Elemental de Tierra -entity.AWWayofTime.FireElemental.name=Elemental de Fuego -entity.AWWayofTime.HolyElemental.name=Elemental Sagrado -entity.AWWayofTime.ShadeElemental.name=Elemental Sombrío -entity.AWWayofTime.WaterElemental.name=Elemental de Agua -entity.AWWayofTime.AirElemental.name=Elemental de Aire -entity.AWWayofTime.Shade.name=Sombra -entity.AWWayofTime.BoulderFist.name=Puño Rocoso -entity.AWWayofTime.IceDemon.name=Demonio de Hielo -entity.AWWayofTime.SmallEarthGolem.name=Gólem de Tierra Pequeño -entity.AWWayofTime.WingedFireDemon.name=Demonio de Fuego Alado -entity.AWWayofTime.BileDemon.name=Demonio Malhumorado -entity.AWWayofTime.LowerGuardian.name=Guardián Inferior -entity.AWWayofTime.FallenAngel.name=Ángel Caído diff --git a/src/main/resources/assets/forge/lang/fr_FR.lang b/src/main/resources/assets/forge/lang/fr_FR.lang deleted file mode 100644 index bd01daa9..00000000 --- a/src/main/resources/assets/forge/lang/fr_FR.lang +++ /dev/null @@ -1,5 +0,0 @@ -commands.forge.usage=Utilisez /forge <sous-commande>. Les sous-commandes sont tps, track -commands.forge.usage.tracking=Utilisez /forge track <type> <durée>. Les types valides sont te (Tile Entities). La durée doit être inférieur à 60. -commands.forge.tps.summary=%s : Duré de tick : %d ms. TPS moyen : %d - -commands.forge.tracking.te.enabled=Trackage des Tile Entity activé pour %d secondes. \ No newline at end of file diff --git a/src/main/resources/assets/minecraft/textures/gui/container/creative_inventory/tab_blood.png b/src/main/resources/assets/minecraft/textures/gui/container/creative_inventory/tab_blood.png deleted file mode 100644 index d52684dc3751830e8b429267ce3085eb4093b7b8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1023 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G$6&6<n8Xl@E-&h>|H(?D8gCb z5n0T@z;_UY8Fx&~ehU<2FY)wsWxvNM%EvD5VXdRdz`)$&>EaktaqI1!gTAjFMA|M| zPptOfeiLC`8^{`(D!ko6cxB=ZhCZbw3OR<xcZ#R^``5dq)T`801t*0vf6|OMcQ{+l z?eqHlyMO8r@5X!W?R79?H@BZz8}mCezv1OS{%NU&p%aeToDa<Q{q32sYyZ!9fAw%y z%{?)CFYh-upJrfT5MXcs`38;Au+XRf-=V^G@yf0abL%p*H*?B&=<UBP*dSkV?}t*j zby?Ysn^m!Kci-=0Vqjw6073<Z1_m$_oze67VI_nA#`FIdZ%b}xWPY$j%G&nL1q}v4 zzf~JAALpCLh*cNJK&VM7k6aY2ok3baIu7&oG6_5c8dCe_fh0@`ru864DKI!F`LS#= zJ_6J-K-Ly~lWSZL37I7oYz227y3VP}PJi8(9tiTqmMD-fw2ANq>o(&f=i=XT9gtPu zctQF4Qm~o(LzNa?i&9ofiWGa#k$L9xo_iciUDj?*;c>X*#t`&R%}1)?@UPF};f$I2 z|7ORxY1%W^d@^j<^4;;6|G}f~^(Rj6XTlL@nBhsRhyuesChSQHGm#N3f|fXm)`!O- em`48VEa&?0($e=vt^qKsGI+ZBxvX<aXaWEh{P<e{ From 8241c3cbd13c58f68f74d1082fd6288c73d5c317 Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Wed, 29 Jul 2015 22:07:13 -0400 Subject: [PATCH 20/33] Added the .jsons for the base runes and added the BlockStates to it. --- .../alchemicalWizardry/ModBlocks.java | 2 +- .../common/block/BlockBloodRune.java | 30 +++++++++++-- .../blockstates/base_rune.json | 44 +++++++++++++++++++ .../blockstates/soul_armour_forge.json | 5 +++ 4 files changed, 77 insertions(+), 4 deletions(-) create mode 100644 src/main/resources/assets/alchemicalwizardry/blockstates/base_rune.json create mode 100644 src/main/resources/assets/alchemicalwizardry/blockstates/soul_armour_forge.json diff --git a/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java b/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java index fe8d95a6..eb22bdbc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java @@ -108,7 +108,7 @@ public class ModBlocks public static void init() { blockAltar = (BlockAltar) registerBlock(new BlockAltar(), "altar"); - bloodRune = (BlockBloodRune) registerBlock(new BlockBloodRune(), ItemBloodRuneBlock.class, ModBlocks.bloodRune.getUnlocalizedName()); + bloodRune = (BlockBloodRune) registerBlock(new BlockBloodRune(), ItemBloodRuneBlock.class, "base_rune"); speedRune = (BlockSpeedRune) registerBlock(new BlockSpeedRune(), "speed_rune"); efficiencyRune = (BlockEfficiencyRune) registerBlock(new BlockEfficiencyRune(), "efficiency_rune"); runeOfSacrifice = (BlockRuneOfSacrifice) registerBlock(new BlockRuneOfSacrifice(), "sacrifice_rune"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodRune.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodRune.java index 78edb95f..7bf74a8d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodRune.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodRune.java @@ -1,25 +1,49 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.ModBlocks; +import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.block.properties.IProperty; +import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.List; +import WayofTime.alchemicalWizardry.ModBlocks; public class BlockBloodRune extends Block { + public static final PropertyInteger INTEGER = PropertyInteger.create("rune", 0, 5); + public BlockBloodRune() { super(Material.iron); + this.setDefaultState(this.blockState.getBaseState().withProperty(INTEGER, Integer.valueOf(0))); setHardness(2.0F); setResistance(5.0F); } + + @Override + protected BlockState createBlockState() + { + return new BlockState(this, new IProperty[] {INTEGER}); + } + + @Override + public IBlockState getStateFromMeta(int meta) + { + return this.getDefaultState().withProperty(INTEGER, Integer.valueOf(meta)); + } + + @Override + public int getMetaFromState(IBlockState state) + { + return ((Integer)state.getValue(INTEGER)).intValue(); + } public int getRuneEffect(int metaData) { diff --git a/src/main/resources/assets/alchemicalwizardry/blockstates/base_rune.json b/src/main/resources/assets/alchemicalwizardry/blockstates/base_rune.json new file mode 100644 index 00000000..75063334 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/blockstates/base_rune.json @@ -0,0 +1,44 @@ +{ + "forge_marker": 1, + "defaults": { + "textures": { + "all": "alchemicalwizardry:blocks/BlankRune" + }, + "model": "cube_all", + "uvlock": true + }, + "variants": { + "rune": { + 0: { + "textures": { + "all": "alchemicalwizardry:blocks/AltarCapacityRune" + } + }, + 1: { + "textures": { + "all": "alchemicalwizardry:blocks/AltarCapacityRune" + } + }, + 2: { + "textures": { + "all": "alchemicalwizardry:blocks/DislocationRune" + } + }, + 3: { + "textures": { + "all": "alchemicalwizardry:blocks/OrbCapacityRune" + } + }, + 4: { + "textures": { + "all": "alchemicalwizardry:blocks/BetterCapacityRune" + } + }, + 5: { + "textures": { + "all": "alchemicalwizardry:blocks/AccelerationRune" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/alchemicalwizardry/blockstates/soul_armour_forge.json b/src/main/resources/assets/alchemicalwizardry/blockstates/soul_armour_forge.json new file mode 100644 index 00000000..e2dcb2d7 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardry/blockstates/soul_armour_forge.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "alchemicalwizardry:soul_armour_forge" } + } +} \ No newline at end of file From 9e2c0e6e7432f9f9ca8a029d088b9d17e5a36214 Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Thu, 30 Jul 2015 08:44:01 -0400 Subject: [PATCH 21/33] Fixed non-armour and non-sigil items --- .../projectile/EnergyBlastProjectile.java | 79 +++----- .../common/items/AWBaseItems.java | 25 +-- .../common/items/ActivationCrystal.java | 37 +--- .../common/items/AirScribeTool.java | 10 - .../common/items/ApprenticeBloodOrb.java | 10 - .../common/items/ArchmageBloodOrb.java | 10 - .../common/items/ArmourInhibitor.java | 105 +++------- .../common/items/BlankSpell.java | 69 +++---- .../common/items/BloodShard.java | 25 +-- .../common/items/BoundAxe.java | 118 ++++-------- .../common/items/BoundPickaxe.java | 179 ++++++------------ .../common/items/BoundShovel.java | 148 ++++----------- .../common/items/CheatyItem.java | 34 +--- .../common/items/CreativeDagger.java | 20 +- .../common/items/DaggerOfSacrifice.java | 36 ++-- .../common/items/DawnScribeTool.java | 10 - .../common/items/DemonPlacer.java | 129 +++---------- .../items/DemonicTelepositionFocus.java | 14 +- .../common/items/DuskScribeTool.java | 10 - .../common/items/EarthScribeTool.java | 10 - .../common/items/EnergyBattery.java | 37 ++-- .../common/items/EnergyBazooka.java | 66 +------ .../common/items/EnergyBlast.java | 66 +------ .../common/items/EnergyItems.java | 3 +- .../common/items/EnergySword.java | 60 +----- .../items/EnhancedTelepositionFocus.java | 14 +- .../common/items/FireScribeTool.java | 10 - .../common/items/ItemAlchemyBase.java | 37 +--- .../common/items/ItemBlockCrystalBelljar.java | 16 +- .../common/items/ItemBloodLetterPack.java | 31 +-- .../common/items/ItemComplexSpellCrystal.java | 23 +-- .../common/items/ItemComponents.java | 35 +--- .../common/items/ItemDiabloKey.java | 24 +-- .../common/items/ItemIncense.java | 39 +--- .../common/items/ItemMailOrderCatalogue.java | 10 - .../common/items/ItemRitualDismantler.java | 41 ++-- .../common/items/ItemRitualDiviner.java | 51 +++-- .../common/items/LavaCrystal.java | 31 +-- .../common/items/LifeBucket.java | 10 - .../common/items/MagicianBloodOrb.java | 10 - .../common/items/MasterBloodOrb.java | 10 - .../common/items/OrbOfTesting.java | 10 - .../items/ReinforcedTelepositionFocus.java | 14 +- .../common/items/SacrificialDagger.java | 39 ++-- .../common/items/TelepositionFocus.java | 10 - .../common/items/TranscendentBloodOrb.java | 10 - .../common/items/WaterScribeTool.java | 10 - .../common/items/sigil/SigilAir.java | 8 +- .../items/sigil/holding/ContainerHolding.java | 4 +- .../items/sigil/holding/GuiHolding.java | 5 +- .../sigil/holding/HoldingPacketHandler.java | 6 +- .../sigil/holding/HoldingPacketProcessor.java | 6 +- .../items/sigil/holding/ScrollHelper.java | 6 +- .../items/sigil/holding/SigilOfHolding.java | 7 +- .../common/potion/PotionAmphibian.java | 3 +- .../common/potion/PotionBoost.java | 3 +- .../common/potion/PotionDeaf.java | 3 +- .../common/potion/PotionDemonCloak.java | 3 +- .../common/potion/PotionDrowning.java | 3 +- .../common/potion/PotionFeatherFall.java | 3 +- .../common/potion/PotionFireFuse.java | 3 +- .../common/potion/PotionFlameCloak.java | 3 +- .../common/potion/PotionFlight.java | 3 +- .../common/potion/PotionHeavyHeart.java | 3 +- .../common/potion/PotionIceCloak.java | 3 +- .../common/potion/PotionInhibit.java | 3 +- .../common/potion/PotionPlanarBinding.java | 3 +- .../potion/PotionProjectileProtect.java | 3 +- .../common/potion/PotionReciprocation.java | 3 +- .../common/potion/PotionSoulFray.java | 3 +- .../common/potion/PotionSoulHarden.java | 3 +- .../renderer/model/ModelBloodAltar.java | 6 +- 72 files changed, 483 insertions(+), 1411 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java index 4dc6faf7..3d6b7e36 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java @@ -4,6 +4,7 @@ import java.util.Iterator; import java.util.List; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IProjectile; @@ -12,7 +13,9 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; @@ -20,7 +23,6 @@ import net.minecraft.world.World; import net.minecraftforge.fml.common.registry.IThrowableEntity; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; //Shamelessly ripped off from x3n0ph0b3 public class EnergyBlastProjectile extends Entity implements IProjectile, IThrowableEntity @@ -53,7 +55,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow super(par1World); this.setSize(0.5F, 0.5F); this.setPosition(par2, par4, par6); - yOffset = 0.0F; this.maxTicksInAir = 600; } @@ -68,7 +69,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow posY -= 0.2D; posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; this.setPosition(posX, posY, posZ); - yOffset = 0.0F; motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); @@ -88,7 +88,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow posY -= 0.2D; posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; this.setPosition(posX, posY, posZ); - yOffset = 0.0F; motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); @@ -104,7 +103,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow this.shootingEntity = par2EntityLivingBase; this.posY = par2EntityLivingBase.posY + (double) par2EntityLivingBase.getEyeHeight() - 0.10000000149011612D; double d0 = par3EntityLivingBase.posX - par2EntityLivingBase.posX; - double d1 = par3EntityLivingBase.boundingBox.minY + (double) (par3EntityLivingBase.height / 1.5F) - this.posY; + double d1 = par3EntityLivingBase.getBoundingBox().minY + (double) (par3EntityLivingBase.height / 1.5F) - this.posY; double d2 = par3EntityLivingBase.posZ - par2EntityLivingBase.posZ; double d3 = (double) MathHelper.sqrt_double(d0 * d0 + d2 * d2); @@ -115,7 +114,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow double d4 = d0 / d3; double d5 = d2 / d3; this.setLocationAndAngles(par2EntityLivingBase.posX + d4, this.posY, par2EntityLivingBase.posZ + d5, f2, f3); - this.yOffset = 0.0F; float f4 = (float) d3 * 0.2F; this.setThrowableHeading(d0, d1, d2, par4, par5); } @@ -155,18 +153,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow prevRotationPitch = rotationPitch = (float) (Math.atan2(var3, var10) * 180.0D / Math.PI); } - @Override - @SideOnly(Side.CLIENT) - /** - * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, - * posY, posZ, yaw, pitch - */ - public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) - { - this.setPosition(par1, par3, par5); - this.setRotation(par7, par8); - } - @Override @SideOnly(Side.CLIENT) /** @@ -233,28 +219,21 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow prevRotationPitch = rotationPitch = (float) (Math.atan2(motionY, var1) * 180.0D / Math.PI); } - Block var16 = worldObj.getBlock(xTile, yTile, zTile); + IBlockState state = worldObj.getBlockState(new BlockPos(xTile, yTile, zTile)); + Block var16 = state.getBlock(); if (var16 != null) { - var16.setBlockBoundsBasedOnState(worldObj, xTile, yTile, zTile); - AxisAlignedBB var2 = var16.getCollisionBoundingBoxFromPool(worldObj, xTile, yTile, zTile); + var16.setBlockBoundsBasedOnState(worldObj, new BlockPos(xTile, yTile, zTile)); + AxisAlignedBB var2 = var16.getCollisionBoundingBox(worldObj, new BlockPos(xTile, yTile, zTile), state); - if (var2 != null && var2.isVecInside(SpellHelper.createVec3(posX, posY, posZ))) + if (var2 != null && var2.isVecInside(new Vec3(posX, posY, posZ))) { inGround = true; } } - if (inGround) - { - Block var18 = worldObj.getBlock(xTile, yTile, zTile); - int var19 = worldObj.getBlockMetadata(xTile, yTile, zTile); - - if (var18.equals(Block.getBlockById(inTile)) && var19 == inData) - { - } - } else + if (!inGround) { ++ticksInAir; @@ -266,19 +245,19 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow } } - Vec3 var17 = SpellHelper.createVec3(posX, posY, posZ); - Vec3 var3 = SpellHelper.createVec3(posX + motionX, posY + motionY, posZ + motionZ); - MovingObjectPosition var4 = worldObj.func_147447_a(var17, var3, true, false, false); - var17 = SpellHelper.createVec3(posX, posY, posZ); - var3 = SpellHelper.createVec3(posX + motionX, posY + motionY, posZ + motionZ); + Vec3 var17 = new Vec3(posX, posY, posZ); + Vec3 var3 = new Vec3(posX + motionX, posY + motionY, posZ + motionZ); + MovingObjectPosition var4 = worldObj.rayTraceBlocks(var17, var3, true, false, false); + var17 = new Vec3(posX, posY, posZ); + var3 = new Vec3(posX + motionX, posY + motionY, posZ + motionZ); if (var4 != null) { - var3 = SpellHelper.createVec3(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord); + var3 = new Vec3(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord); } Entity var5 = null; - List var6 = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); + List var6 = worldObj.getEntitiesWithinAABBExcludingEntity(this, getBoundingBox().addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); double var7 = 0.0D; Iterator var9 = var6.iterator(); float var11; @@ -290,7 +269,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow if (var10.canBeCollidedWith() && (var10 != shootingEntity || ticksInAir >= 5)) { var11 = 0.3F; - AxisAlignedBB var12 = var10.boundingBox.expand(var11, var11, var11); + AxisAlignedBB var12 = var10.getBoundingBox().expand(var11, var11, var11); MovingObjectPosition var13 = var12.calculateIntercept(var17, var3); if (var13 != null) @@ -331,8 +310,8 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow public void doFiringParticles() { - worldObj.spawnParticle("mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - worldObj.spawnParticle("flame", posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); + worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + worldObj.spawnParticle(EnumParticleTypes.FLAME, posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); } /** @@ -379,13 +358,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow return false; } - @Override - @SideOnly(Side.CLIENT) - public float getShadowSize() - { - return 0.0F; - } - /** * Sets the amount of knockback the arrow applies when it hits a mob. */ @@ -462,20 +434,15 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow worldObj.createExplosion(shootingEntity, this.posX, this.posY, this.posZ, (float) (0.1), true); } - spawnHitParticles("magicCrit", 8); + spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); this.setDead(); } - private int d6() - { - return rand.nextInt(6) + 1; - } - - protected void spawnHitParticles(String string, int i) + protected void spawnHitParticles(EnumParticleTypes type, int i) { for (int particles = 0; particles < i; particles++) { - worldObj.spawnParticle(string, posX, posY - (string == "portal" ? 1 : 0), posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); + worldObj.spawnParticle(type, posX, posY - (type == EnumParticleTypes.PORTAL ? 1 : 0), posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/AWBaseItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/AWBaseItems.java index 2960e5ee..f45f9ae2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/AWBaseItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/AWBaseItems.java @@ -1,14 +1,12 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; - -import java.util.List; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; public class AWBaseItems extends Item { @@ -19,23 +17,6 @@ public class AWBaseItems extends Item setCreativeTab(AlchemicalWizardry.tabBloodMagic); } - public void registerIcons(IIconRegister iconRegister) - { - if (this.equals(ModItems.blankSlate)) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BlankSlate"); - } else if (this.equals(ModItems.reinforcedSlate)) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:ReinforcedSlate"); - } else if (this.equals(ModItems.imbuedSlate)) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:InfusedSlate"); - } else if (this.equals(ModItems.demonicSlate)) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DemonSlate"); - } - } - @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java index 75354585..1661b0ff 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java @@ -1,30 +1,27 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.List; + import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + import org.lwjgl.input.Keyboard; -import java.util.List; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; public class ActivationCrystal extends EnergyItems { private static final String[] ACTIVATION_CRYSTAL_NAMES = new String[]{"Weak", "Awakened", "Creative"}; - @SideOnly(Side.CLIENT) - private IIcon[] icons; - public ActivationCrystal() { super(); @@ -34,18 +31,6 @@ public class ActivationCrystal extends EnergyItems this.hasSubtypes = true; } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - icons = new IIcon[ACTIVATION_CRYSTAL_NAMES.length]; - - for (int i = 0; i < ACTIVATION_CRYSTAL_NAMES.length; ++i) - { - icons[i] = iconRegister.registerIcon("AlchemicalWizardry:" + "activationCrystal" + ACTIVATION_CRYSTAL_NAMES[i]); - } - } - @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { @@ -119,14 +104,6 @@ public class ActivationCrystal extends EnergyItems return ("" + "item.activationCrystal" + ACTIVATION_CRYSTAL_NAMES[meta]); } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int meta) - { - int j = MathHelper.clamp_int(meta, 0, ACTIVATION_CRYSTAL_NAMES.length - 1); - return icons[j]; - } - @Override @SideOnly(Side.CLIENT) public void getSubItems(Item id, CreativeTabs creativeTab, List list) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/AirScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/AirScribeTool.java index 612ee865..d3332bbc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/AirScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/AirScribeTool.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class AirScribeTool extends ScribeTool { @@ -10,11 +7,4 @@ public class AirScribeTool extends ScribeTool { super(4); } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:AirScribeTool"); - } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ApprenticeBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ApprenticeBloodOrb.java index ac3aa56c..64432cd8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ApprenticeBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ApprenticeBloodOrb.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class ApprenticeBloodOrb extends EnergyBattery { @@ -11,11 +8,4 @@ public class ApprenticeBloodOrb extends EnergyBattery super(damage); orbLevel = 2; } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:ApprenticeBloodOrb"); - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java index 065781e3..ae0ef586 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class ArchmageBloodOrb extends EnergyBattery { @@ -11,11 +8,4 @@ public class ArchmageBloodOrb extends EnergyBattery super(damage); orbLevel = 5; } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:ArchmageBloodOrb"); - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java index 8c3fe83b..20fd9f0c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java @@ -1,26 +1,18 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.List; + import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; - -import java.util.List; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; public class ArmourInhibitor extends EnergyItems { - @SideOnly(Side.CLIENT) - private IIcon activeIcon; - @SideOnly(Side.CLIENT) - private IIcon passiveIcon; private int tickDelay = 200; public ArmourInhibitor() @@ -32,117 +24,76 @@ public class ArmourInhibitor extends EnergyItems } @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { - par3List.add(StatCollector.translateToLocal("tooltip.armorinhibitor.desc1")); - par3List.add(StatCollector.translateToLocal("tooltip.armorinhibitor.desc2")); + list.add(StatCollector.translateToLocal("tooltip.armorinhibitor.desc1")); + list.add(StatCollector.translateToLocal("tooltip.armorinhibitor.desc2")); - if (!(par1ItemStack.getTagCompound() == null)) + if (!(stack.getTagCompound() == null)) { - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (stack.getTagCompound().getBoolean("isActive")) { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); + list.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else { - par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); + list.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); } - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); + list.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + stack.getTagCompound().getString("ownerName")); } } @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:ArmourInhibitor_deactivated"); - this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:ArmourInhibitor_activated"); - this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:ArmourInhibitor_deactivated"); - } + if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + { + return stack; + } - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) - { if (stack.getTagCompound() == null) { stack.setTagCompound(new NBTTagCompound()); } NBTTagCompound tag = stack.getTagCompound(); - - if (tag.getBoolean("isActive")) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) - { - if (par1 == 1) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - return par1ItemStack; - } - - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = par1ItemStack.getTagCompound(); tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); if (tag.getBoolean("isActive")) { - par1ItemStack.setItemDamage(1); - tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay); + stack.setItemDamage(1); + tag.setInteger("worldTimeDelay", (int) (world.getWorldTime() - 1) % tickDelay); } else { - par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); + stack.setItemDamage(stack.getMaxDamage()); } - return par1ItemStack; + return stack; } @Override - public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) + public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) { - if (!(par3Entity instanceof EntityPlayer)) + if (!(entity instanceof EntityPlayer)) { return; } - EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; + EntityPlayer player = (EntityPlayer) entity; - if (par1ItemStack.getTagCompound() == null) + if (stack.getTagCompound() == null) { - par1ItemStack.setTagCompound(new NBTTagCompound()); + stack.setTagCompound(new NBTTagCompound()); } - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (stack.getTagCompound().getBoolean("isActive")) { - if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) + if (world.getWorldTime() % tickDelay == stack.getTagCompound().getInteger("worldTimeDelay")) { } //TODO Do stuff - par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 2, 0)); + player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 2, 0, true, false)); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java index 885b7d07..6c73547c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java @@ -1,19 +1,17 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; - -import java.util.List; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; public class BlankSpell extends EnergyItems { @@ -25,76 +23,69 @@ public class BlankSpell extends EnergyItems } @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BlankSpell"); - } + list.add(StatCollector.translateToLocal("tooltip.blankspell.desc")); - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.blankspell.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) + if (!(stack.getTagCompound() == null)) { - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); + NBTTagCompound itemTag = stack.getTagCompound(); - if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) + if (!stack.getTagCompound().getString("ownerName").equals("")) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); + list.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + stack.getTagCompound().getString("ownerName")); } - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + itemTag.getInteger("xCoord") + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord")); - par3List.add(StatCollector.translateToLocal("tooltip.alchemy.dimension") + " " + getDimensionID(par1ItemStack)); + list.add(StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + itemTag.getInteger("xCoord") + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord")); + list.add(StatCollector.translateToLocal("tooltip.alchemy.dimension") + " " + getDimensionID(stack)); } } @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { - return par1ItemStack; + return stack; } - if (!par2World.isRemote) + if (!world.isRemote) { - World world = DimensionManager.getWorld(getDimensionID(par1ItemStack)); + World newWorld = DimensionManager.getWorld(getDimensionID(stack)); - if (world != null) + if (newWorld != null) { - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - TileEntity tileEntity = world.getTileEntity(itemTag.getInteger("xCoord"), itemTag.getInteger("yCoord"), itemTag.getInteger("zCoord")); + NBTTagCompound itemTag = stack.getTagCompound(); + TileEntity tileEntity = newWorld.getTileEntity(new BlockPos(itemTag.getInteger("xCoord"), itemTag.getInteger("yCoord"), itemTag.getInteger("zCoord"))); if (tileEntity instanceof TEHomHeart) { TEHomHeart homHeart = (TEHomHeart) tileEntity; - if (homHeart.canCastSpell(par1ItemStack, par2World, par3EntityPlayer)) + if (homHeart.canCastSpell(stack, world, player)) { - if(EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, homHeart.getCostForSpell())) + if(EnergyItems.syphonBatteries(stack, player, homHeart.getCostForSpell())) { - EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, homHeart.castSpell(par1ItemStack, par2World, par3EntityPlayer)); + EnergyItems.syphonBatteries(stack, player, homHeart.castSpell(stack, world, player)); } } else { - return par1ItemStack; + return stack; } } else { - return par1ItemStack; + return stack; } } else { - return par1ItemStack; + return stack; } } else { - return par1ItemStack; + return stack; } - par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - return par1ItemStack; + world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); + return stack; } public int getDimensionID(ItemStack itemStack) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BloodShard.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BloodShard.java index 82d93df7..ab74e4cb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BloodShard.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BloodShard.java @@ -1,15 +1,12 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; public class BloodShard extends Item implements ArmourUpgrade { @@ -20,22 +17,6 @@ public class BloodShard extends Item implements ArmourUpgrade setCreativeTab(AlchemicalWizardry.tabBloodMagic); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - if (this.equals(ModItems.weakBloodShard)) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WeakBloodShard"); - return; - } - - if (this.equals(ModItems.demonBloodShard)) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DemonBloodShard"); - } - } - public int getBloodShardLevel() { if (this.equals(ModItems.weakBloodShard)) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java index f0ac52c4..f5ab984c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java @@ -1,11 +1,10 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.BlockLeavesBase; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -13,11 +12,11 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemAxe; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; import net.minecraft.util.StatCollector; -import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.common.ItemType; @@ -25,17 +24,10 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import com.google.common.collect.HashMultiset; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - public class BoundAxe extends ItemAxe implements IBindable { public float efficiencyOnProperMaterial = 12.0F; public float damageVsEntity; - @SideOnly(Side.CLIENT) - private IIcon activeIcon; - @SideOnly(Side.CLIENT) - private IIcon passiveIcon; private int energyUsed; public BoundAxe() @@ -81,49 +73,21 @@ public class BoundAxe extends ItemAxe implements IBindable } @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundAxe_activated"); - this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundAxe_activated"); - this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) - { - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - if (tag.getBoolean("isActive")) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + public ItemStack onItemRightClick(ItemStack par1ItemStack, World world, EntityPlayer par3EntityPlayer) { if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); - par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); + par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (world.getWorldTime() - 1) % 200); return par1ItemStack; } - if (par2World.isRemote) + if (world.isRemote) { return par1ItemStack; } - if (!getActivated(par1ItemStack) || SpellHelper.isFakePlayer(par2World, par3EntityPlayer)) + if (!getActivated(par1ItemStack) || SpellHelper.isFakePlayer(world, par3EntityPlayer)) { return par1ItemStack; } @@ -138,10 +102,7 @@ public class BoundAxe extends ItemAxe implements IBindable return par1ItemStack; } - Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer); - int posX = (int) (blockVec.xCoord); - int posY = (int) (blockVec.yCoord); - int posZ = (int) (blockVec.zCoord); + BlockPos pos = par3EntityPlayer.getPosition(); boolean silkTouch = EnchantmentHelper.getSilkTouchModifier(par3EntityPlayer); int fortuneLvl = EnchantmentHelper.getFortuneModifier(par3EntityPlayer); @@ -153,21 +114,22 @@ public class BoundAxe extends ItemAxe implements IBindable { for (int k = -5; k <= 5; k++) { - Block block = par2World.getBlock(posX + i, posY + j, posZ + k); - int meta = par2World.getBlockMetadata(posX + i, posY + j, posZ + k); + BlockPos newPos = pos.add(i, j, k); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); if (block != null) { - float str = func_150893_a(par1ItemStack, block); + float str = getStrVsBlock(par1ItemStack, block); - if (str > 1.1f || block instanceof BlockLeavesBase && par2World.canMineBlock(par3EntityPlayer, posX + i, posY + j, posZ + k)) + if (str > 1.1f || block instanceof BlockLeavesBase && world.canMineBlockBody(par3EntityPlayer, newPos)) { - if (silkTouch && block.canSilkHarvest(par2World, par3EntityPlayer, posX + i, posY + j, posZ + k, meta)) + if (silkTouch && block.canSilkHarvest(world, newPos, state, par3EntityPlayer)) { - dropMultiset.add(new ItemType(block, meta)); + dropMultiset.add(new ItemType(block, block.getMetaFromState(state))); } else { - ArrayList<ItemStack> itemDropList = block.getDrops(par2World, posX + i, posY + j, posZ + k, meta, fortuneLvl); + List<ItemStack> itemDropList = block.getDrops(world, newPos, state, fortuneLvl); if (itemDropList != null) { @@ -176,20 +138,20 @@ public class BoundAxe extends ItemAxe implements IBindable } } - par2World.setBlockToAir(posX + i, posY + j, posZ + k); + world.setBlockToAir(newPos); } } } } } - BoundPickaxe.dropMultisetStacks(dropMultiset, par2World, posX, posY + par3EntityPlayer.getEyeHeight(), posZ); + BoundPickaxe.dropMultisetStacks(dropMultiset, world, pos.getX(), pos.getY() + par3EntityPlayer.getEyeHeight(), pos.getZ()); return par1ItemStack; } @Override - public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) + public void onUpdate(ItemStack par1ItemStack, World world, Entity par3Entity, int par4, boolean par5) { if (!(par3Entity instanceof EntityPlayer)) { @@ -202,7 +164,7 @@ public class BoundAxe extends ItemAxe implements IBindable { par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) + if (world.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) { if (!par3EntityPlayer.capabilities.isCreativeMode) { @@ -216,28 +178,14 @@ public class BoundAxe extends ItemAxe implements IBindable par1ItemStack.setItemDamage(0); } - public void setActivated(ItemStack par1ItemStack, boolean newActivated) + public void setActivated(ItemStack stack, boolean newActivated) { - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if (itemTag == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - itemTag.setBoolean("isActive", newActivated); + stack.setItemDamage(newActivated ? 1 : 0); } - public boolean getActivated(ItemStack par1ItemStack) + public boolean getActivated(ItemStack stack) { - if (!par1ItemStack.hasTagCompound()) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - return itemTag.getBoolean("isActive"); + return stack.getItemDamage() == 1; } /** @@ -245,14 +193,14 @@ public class BoundAxe extends ItemAxe implements IBindable * sword */ @Override - public float func_150893_a(ItemStack par1ItemStack, Block par2Block) + public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) { if (!getActivated(par1ItemStack)) { return 0.0F; } - return super.func_150893_a(par1ItemStack, par2Block); + return super.getStrVsBlock(par1ItemStack, par2Block); } /** @@ -264,7 +212,7 @@ public class BoundAxe extends ItemAxe implements IBindable return getActivated(par1ItemStack); } - public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, Block par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase) + public boolean onBlockDestroyed(ItemStack par1ItemStack, World world, Block par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase) { return true; } @@ -292,19 +240,19 @@ public class BoundAxe extends ItemAxe implements IBindable * FORGE: Overridden to allow custom tool effectiveness */ @Override - public float getDigSpeed(ItemStack stack, Block block, int meta) + public float getDigSpeed(ItemStack stack, IBlockState state) { if (!getActivated(stack)) { return 0.0F; } - if (ForgeHooks.isToolEffective(stack, block, meta)) + for (String type : getToolClasses(stack)) { - return efficiencyOnProperMaterial; + if (state.getBlock().isToolEffective(type, state)) + return efficiencyOnProperMaterial; } - - return func_150893_a(stack, block); + return super.getDigSpeed(stack, state); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java index 1a358bca..70b6eba4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java @@ -1,10 +1,9 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -13,11 +12,11 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; import net.minecraft.util.StatCollector; -import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.common.ItemType; @@ -26,17 +25,10 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import com.google.common.collect.HashMultiset; import com.google.common.collect.Multiset; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - public class BoundPickaxe extends ItemPickaxe implements IBindable { public float efficiencyOnProperMaterial = 12.0F; public float damageVsEntity; - @SideOnly(Side.CLIENT) - private IIcon activeIcon; - @SideOnly(Side.CLIENT) - private IIcon passiveIcon; private int energyUsed; @@ -61,14 +53,14 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable } @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { par3List.add(StatCollector.translateToLocal("tooltip.boundpickaxe.desc1")); par3List.add(StatCollector.translateToLocal("tooltip.boundpickaxe.desc2")); - if (!(par1ItemStack.getTagCompound() == null)) + if (!(stack.getTagCompound() == null)) { - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (stack.getTagCompound().getBoolean("isActive")) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -76,75 +68,44 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); } - if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) + if (!stack.getTagCompound().getString("ownerName").equals("")) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + stack.getTagCompound().getString("ownerName")); } } } @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer par3EntityPlayer) { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundPickaxe_activated"); - this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundPickaxe_activated"); - this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) - { - if (stack.getTagCompound() == null) + if (!EnergyItems.checkAndSetItemOwner(stack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - if (tag.getBoolean("isActive")) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); - par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); - return par1ItemStack; + this.setActivated(stack, !getActivated(stack)); + stack.getTagCompound().setInteger("worldTimeDelay", (int) (world.getWorldTime() - 1) % 200); + return stack; } - if (par2World.isRemote) + if (world.isRemote) { - return par1ItemStack; + return stack; } - if (!getActivated(par1ItemStack) || SpellHelper.isFakePlayer(par2World, par3EntityPlayer)) + if (!getActivated(stack) || SpellHelper.isFakePlayer(world, par3EntityPlayer)) { - return par1ItemStack; + return stack; } if (par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionInhibit)) { - return par1ItemStack; + return stack; } - if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 10000)) + if(!EnergyItems.syphonBatteries(stack, par3EntityPlayer, 10000)) { - return par1ItemStack; + return stack; } - Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer); - int posX = (int) (blockVec.xCoord); - int posY = (int) (blockVec.yCoord); - int posZ = (int) (blockVec.zCoord); + BlockPos pos = par3EntityPlayer.getPosition(); boolean silkTouch = EnchantmentHelper.getSilkTouchModifier(par3EntityPlayer); int fortuneLvl = EnchantmentHelper.getFortuneModifier(par3EntityPlayer); @@ -152,43 +113,44 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable for (int i = -5; i <= 5; i++) { - for (int j = -5; j <= 5; j++) + for (int j = 0; j <= 10; j++) { for (int k = -5; k <= 5; k++) { - Block block = par2World.getBlock(posX + i, posY + j, posZ + k); - int meta = par2World.getBlockMetadata(posX + i, posY + j, posZ + k); + BlockPos newPos = pos.add(i, j, k); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); - if (block != null && block.getBlockHardness(par2World, posX + i, posY + j, posZ + k) != -1) + if (block != null) { - float str = func_150893_a(par1ItemStack, block); + float str = getStrVsBlock(stack, block); - if (str > 1.1f && par2World.canMineBlock(par3EntityPlayer, posX + i, posY + j, posZ + k)) + if (str > 1.1f && world.canMineBlockBody(par3EntityPlayer, newPos)) { - if (silkTouch && block.canSilkHarvest(par2World, par3EntityPlayer, posX + i, posY + j, posZ + k, meta)) + if (silkTouch && block.canSilkHarvest(world, newPos, state, par3EntityPlayer)) { - dropMultiset.add(new ItemType(block, meta)); + dropMultiset.add(new ItemType(block, block.getMetaFromState(state))); } else { - ArrayList<ItemStack> itemDropList = block.getDrops(par2World, posX + i, posY + j, posZ + k, meta, fortuneLvl); + List<ItemStack> itemDropList = block.getDrops(world, newPos, state, fortuneLvl); if (itemDropList != null) { - for (ItemStack stack : itemDropList) - dropMultiset.add(ItemType.fromStack(stack), stack.stackSize); + for (ItemStack stacky : itemDropList) + dropMultiset.add(ItemType.fromStack(stacky), stacky.stackSize); } } - par2World.setBlockToAir(posX + i, posY + j, posZ + k); + world.setBlockToAir(newPos); } } } } } - dropMultisetStacks(dropMultiset, par2World, posX, posY + par3EntityPlayer.getEyeHeight(), posZ); + BoundPickaxe.dropMultisetStacks(dropMultiset, world, pos.getX(), pos.getY() + par3EntityPlayer.getEyeHeight(), pos.getZ()); - return par1ItemStack; + return stack; } public static void dropMultisetStacks(Multiset<ItemType> dropMultiset, World world, double x, double y, double z) @@ -212,7 +174,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable } @Override - public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) + public void onUpdate(ItemStack stack, World world, Entity par3Entity, int par4, boolean par5) { if (!(par3Entity instanceof EntityPlayer)) { @@ -221,47 +183,33 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; - if (par1ItemStack.getTagCompound() == null) + if (stack.getTagCompound() == null) { - par1ItemStack.setTagCompound(new NBTTagCompound()); + stack.setTagCompound(new NBTTagCompound()); } - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) + if (world.getWorldTime() % 200 == stack.getTagCompound().getInteger("worldTimeDelay") && stack.getTagCompound().getBoolean("isActive")) { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 20)) + if(!EnergyItems.syphonBatteries(stack, par3EntityPlayer, 20)) { - this.setActivated(par1ItemStack, false); + this.setActivated(stack, false); } } } - par1ItemStack.setItemDamage(0); + stack.setItemDamage(0); } - public void setActivated(ItemStack par1ItemStack, boolean newActivated) + public void setActivated(ItemStack stack, boolean newActivated) { - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if (itemTag == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - itemTag.setBoolean("isActive", newActivated); + stack.setItemDamage(newActivated ? 1 : 0); } - public boolean getActivated(ItemStack par1ItemStack) + public boolean getActivated(ItemStack stack) { - if (!par1ItemStack.hasTagCompound()) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - return itemTag.getBoolean("isActive"); + return stack.getItemDamage() == 1; } /** @@ -269,34 +217,23 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable * sword */ @Override - public float func_150893_a(ItemStack par1ItemStack, Block par2Block) //getStrVsBlock + public float getStrVsBlock(ItemStack stack, Block par2Block) //getStrVsBlock { - if (!getActivated(par1ItemStack)) + if (!getActivated(stack)) { return 0.0F; } - return super.func_150893_a(par1ItemStack, par2Block); + return super.getStrVsBlock(stack, par2Block); } /** * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise * the damage on the stack. */ - public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) + public boolean hitEntity(ItemStack stack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) { - return getActivated(par1ItemStack); - } - - @Override - public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, Block par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase) - { - - if (par7EntityLivingBase instanceof EntityPlayer) - { - EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par7EntityLivingBase, getEnergyUsed()); - } - return true; + return getActivated(stack); } @SideOnly(Side.CLIENT) @@ -322,19 +259,19 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable * FORGE: Overridden to allow custom tool effectiveness */ @Override - public float getDigSpeed(ItemStack stack, Block block, int meta) + public float getDigSpeed(ItemStack stack, IBlockState state) { if (!getActivated(stack)) { return 0.0F; } - if (ForgeHooks.isToolEffective(stack, block, meta)) + for (String type : getToolClasses(stack)) { - return efficiencyOnProperMaterial; + if (state.getBlock().isToolEffective(type, state)) + return efficiencyOnProperMaterial; } - - return func_150893_a(stack, block); + return super.getDigSpeed(stack, state); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java index 3dbfc338..fc43ba2d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java @@ -1,45 +1,33 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemSpade; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; import net.minecraft.util.StatCollector; -import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.common.ItemType; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import com.google.common.collect.HashMultiset; -import com.google.common.collect.Multimap; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class BoundShovel extends ItemSpade implements IBindable { public float efficiencyOnProperMaterial = 12.0F; public float damageVsEntity; - @SideOnly(Side.CLIENT) - private IIcon activeIcon; - @SideOnly(Side.CLIENT) - private IIcon passiveIcon; - private int energyUsed; public BoundShovel() @@ -85,67 +73,36 @@ public class BoundShovel extends ItemSpade implements IBindable } @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer par3EntityPlayer) { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundShovel_activated"); - this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundShovel_activated"); - this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) - { - if (stack.getTagCompound() == null) + if (!EnergyItems.checkAndSetItemOwner(stack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - if (tag.getBoolean("isActive")) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) - { - this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); - par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); - return par1ItemStack; + this.setActivated(stack, !getActivated(stack)); + stack.getTagCompound().setInteger("worldTimeDelay", (int) (world.getWorldTime() - 1) % 200); + return stack; } - if (par2World.isRemote) + if (world.isRemote) { - return par1ItemStack; + return stack; } - if (!getActivated(par1ItemStack) || SpellHelper.isFakePlayer(par2World, par3EntityPlayer)) + if (!getActivated(stack) || SpellHelper.isFakePlayer(world, par3EntityPlayer)) { - return par1ItemStack; + return stack; } if (par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionInhibit)) { - return par1ItemStack; + return stack; } - if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 10000)) + if(!EnergyItems.syphonBatteries(stack, par3EntityPlayer, 10000)) { - return par1ItemStack; + return stack; } - Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer); - int posX = (int) (blockVec.xCoord); - int posY = (int) (blockVec.yCoord); - int posZ = (int) (blockVec.zCoord); + BlockPos pos = par3EntityPlayer.getPosition(); boolean silkTouch = EnchantmentHelper.getSilkTouchModifier(par3EntityPlayer); int fortuneLvl = EnchantmentHelper.getFortuneModifier(par3EntityPlayer); @@ -157,39 +114,40 @@ public class BoundShovel extends ItemSpade implements IBindable { for (int k = -5; k <= 5; k++) { - Block block = par2World.getBlock(posX + i, posY + j, posZ + k); - int meta = par2World.getBlockMetadata(posX + i, posY + j, posZ + k); + BlockPos newPos = pos.add(i, j, k); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); if (block != null) { - float str = func_150893_a(par1ItemStack, block); + float str = getStrVsBlock(stack, block); - if (str > 1.1f && par2World.canMineBlock(par3EntityPlayer, posX + i, posY + j, posZ + k)) + if (str > 1.1f && world.canMineBlockBody(par3EntityPlayer, newPos)) { - if (silkTouch && block.canSilkHarvest(par2World, par3EntityPlayer, posX + i, posY + j, posZ + k, meta)) + if (silkTouch && block.canSilkHarvest(world, newPos, state, par3EntityPlayer)) { - dropMultiset.add(new ItemType(block, meta)); + dropMultiset.add(new ItemType(block, block.getMetaFromState(state))); } else { - ArrayList<ItemStack> itemDropList = block.getDrops(par2World, posX + i, posY + j, posZ + k, meta, fortuneLvl); + List<ItemStack> itemDropList = block.getDrops(world, newPos, state, fortuneLvl); if (itemDropList != null) { - for (ItemStack stack : itemDropList) - dropMultiset.add(ItemType.fromStack(stack), stack.stackSize); + for (ItemStack stacky : itemDropList) + dropMultiset.add(ItemType.fromStack(stacky), stacky.stackSize); } } - par2World.setBlockToAir(posX + i, posY + j, posZ + k); + world.setBlockToAir(newPos); } } } } } - BoundPickaxe.dropMultisetStacks(dropMultiset, par2World, posX, posY + par3EntityPlayer.getEyeHeight(), posZ); - - return par1ItemStack; + BoundPickaxe.dropMultisetStacks(dropMultiset, world, pos.getX(), pos.getY() + par3EntityPlayer.getEyeHeight(), pos.getZ()); + + return stack; } @Override @@ -220,28 +178,14 @@ public class BoundShovel extends ItemSpade implements IBindable par1ItemStack.setItemDamage(0); } - public void setActivated(ItemStack par1ItemStack, boolean newActivated) + public void setActivated(ItemStack stack, boolean newActivated) { - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if (itemTag == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - itemTag.setBoolean("isActive", newActivated); + stack.setItemDamage(newActivated ? 1 : 0); } - public boolean getActivated(ItemStack par1ItemStack) + public boolean getActivated(ItemStack stack) { - if (!par1ItemStack.hasTagCompound()) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - return itemTag.getBoolean("isActive"); + return stack.getItemDamage() == 1; } /** @@ -249,14 +193,14 @@ public class BoundShovel extends ItemSpade implements IBindable * sword */ @Override - public float func_150893_a(ItemStack par1ItemStack, Block par2Block) + public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) { if (!getActivated(par1ItemStack)) { return 0.0F; } - return super.func_150893_a(par1ItemStack, par2Block); + return super.getStrVsBlock(par1ItemStack, par2Block); } /** @@ -291,31 +235,23 @@ public class BoundShovel extends ItemSpade implements IBindable return 30; } - @Override - public Multimap getItemAttributeModifiers() - { - Multimap multimap = super.getItemAttributeModifiers(); - multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Tool modifier", (double) this.damageVsEntity, 0)); - return multimap; - } - /** * FORGE: Overridden to allow custom tool effectiveness */ @Override - public float getDigSpeed(ItemStack stack, Block block, int meta) + public float getDigSpeed(ItemStack stack, IBlockState state) { if (!getActivated(stack)) { return 0.0F; } - if (ForgeHooks.isToolEffective(stack, block, meta)) + for (String type : getToolClasses(stack)) { - return efficiencyOnProperMaterial; + if (state.getBlock().isToolEffective(type, state)) + return efficiencyOnProperMaterial; } - - return func_150893_a(stack, block); + return super.getDigSpeed(stack, state); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/CheatyItem.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/CheatyItem.java index f15d7a6a..3629b6c7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/CheatyItem.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/CheatyItem.java @@ -1,24 +1,21 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.server.MinecraftServer; -import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.FakePlayer; - -import java.util.List; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; +import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class CheatyItem extends Item implements IBindable { @@ -29,13 +26,6 @@ public class CheatyItem extends Item implements IBindable setCreativeTab(AlchemicalWizardry.tabBloodMagic); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:EnergyBattery"); - } - @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { @@ -119,7 +109,7 @@ public class CheatyItem extends Item implements IBindable for (int l = 0; l < 8; ++l) { - world.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); + world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); } } @@ -176,10 +166,4 @@ public class CheatyItem extends Item implements IBindable int currentEssence = data.currentEssence; return (currentEssence); } - - @Override - public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemStack) - { - return false; - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeDagger.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeDagger.java index a3074d2a..a15a6f00 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeDagger.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeDagger.java @@ -1,17 +1,19 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.api.event.SacrificeKnifeUsedEvent; -import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.FakePlayer; import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.event.SacrificeKnifeUsedEvent; +import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; @@ -20,7 +22,6 @@ public class CreativeDagger extends Item public CreativeDagger() { super(); - setTextureName("AlchemicalWizardry:SacrificialDagger"); setMaxStackSize(1); setCreativeTab(AlchemicalWizardry.tabBloodMagic); setFull3D(); @@ -69,7 +70,7 @@ public class CreativeDagger extends Item for (int l = 0; l < 8; ++l) { - world.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); + world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); } if (!world.isRemote && SpellHelper.isFakePlayer(world, player)) @@ -83,10 +84,8 @@ public class CreativeDagger extends Item public void findAndFillAltar(World world, EntityPlayer player, int amount) { - int posX = (int) Math.round(player.posX - 0.5f); - int posY = (int) player.posY; - int posZ = (int) Math.round(player.posZ - 0.5f); - IBloodAltar altarEntity = getAltar(world, posX, posY, posZ); + BlockPos pos = player.getPosition(); + IBloodAltar altarEntity = getAltar(world, pos); if (altarEntity == null) { @@ -97,7 +96,7 @@ public class CreativeDagger extends Item altarEntity.startCycle(); } - public IBloodAltar getAltar(World world, int x, int y, int z) + public IBloodAltar getAltar(World world, BlockPos pos) { TileEntity tileEntity; @@ -107,7 +106,8 @@ public class CreativeDagger extends Item { for (int k = -2; k <= 1; k++) { - tileEntity = world.getTileEntity(i + x, k + y, j + z); + BlockPos newPos = pos.add(i, j, k); + tileEntity = world.getTileEntity(newPos); if(tileEntity instanceof IBloodAltar) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java index 856ac155..2b87a8ca 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.common.items; import java.util.List; +import java.util.UUID; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeModifier; @@ -17,20 +17,18 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; import WayofTime.alchemicalWizardry.common.IDemon; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; import com.google.common.collect.Multimap; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - public class DaggerOfSacrifice extends EnergyItems { public DaggerOfSacrifice() @@ -43,13 +41,6 @@ public class DaggerOfSacrifice extends EnergyItems setMaxDamage(100); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DaggerOfSacrifice"); - } - @Override public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) { @@ -118,7 +109,7 @@ public class DaggerOfSacrifice extends EnergyItems } @Override - public float func_150893_a(ItemStack par1ItemStack, Block par2Block) + public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) { if (par2Block == Blocks.web) { @@ -140,16 +131,14 @@ public class DaggerOfSacrifice extends EnergyItems public Multimap getItemAttributeModifiers() { Multimap multimap = super.getItemAttributeModifiers(); - multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Tool modifier", 1.0d, 0)); + multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(4186465, 46565), "Tool modifier", 1.0d, 0)); return multimap; } public boolean findAndNotifyAltarOfDemon(World world, EntityLivingBase sacrifice) { - int posX = (int) Math.round(sacrifice.posX - 0.5f); - int posY = (int) sacrifice.posY; - int posZ = (int) Math.round(sacrifice.posZ - 0.5f); - IBloodAltar altarEntity = this.getAltar(world, posX, posY, posZ); + BlockPos pos = sacrifice.getPosition(); + IBloodAltar altarEntity = this.getAltar(world, pos); if (altarEntity == null) { @@ -163,10 +152,8 @@ public class DaggerOfSacrifice extends EnergyItems public boolean findAndFillAltar(World world, EntityLivingBase sacrifice, int amount) { - int posX = (int) Math.round(sacrifice.posX - 0.5f); - int posY = (int) sacrifice.posY; - int posZ = (int) Math.round(sacrifice.posZ - 0.5f); - IBloodAltar altarEntity = this.getAltar(world, posX, posY, posZ); + BlockPos pos = sacrifice.getPosition(); + IBloodAltar altarEntity = this.getAltar(world, pos); if (altarEntity == null) { @@ -178,7 +165,7 @@ public class DaggerOfSacrifice extends EnergyItems return true; } - public IBloodAltar getAltar(World world, int x, int y, int z) + public IBloodAltar getAltar(World world, BlockPos pos) { TileEntity tileEntity; @@ -188,7 +175,8 @@ public class DaggerOfSacrifice extends EnergyItems { for (int k = -2; k <= 1; k++) { - tileEntity = world.getTileEntity(i + x, k + y, j + z); + BlockPos newPos = pos.add(i, j, k); + tileEntity = world.getTileEntity(newPos); if ((tileEntity instanceof IBloodAltar)) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DawnScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DawnScribeTool.java index a0bda137..61814e22 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DawnScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DawnScribeTool.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class DawnScribeTool extends ScribeTool { @@ -10,11 +7,4 @@ public class DawnScribeTool extends ScribeTool { super(6); } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DawnScribeTool"); - } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java index 98e7a6db..f9caf63f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java @@ -1,29 +1,24 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.List; + +import net.minecraft.block.BlockFence; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityList; -import net.minecraft.entity.EntityList.EntityEggInfo; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.Facing; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.StatCollector; import net.minecraft.world.World; - -import java.util.List; +import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; public class DemonPlacer extends Item { @@ -35,48 +30,45 @@ public class DemonPlacer extends Item this.maxStackSize = 1; } - @SideOnly(Side.CLIENT) - public int getColorFromItemStack(ItemStack par1ItemStack, int par2) - { - EntityEggInfo entityegginfo = (EntityEggInfo) EntityList.entityEggs.get(Integer.valueOf(par1ItemStack.getItemDamage())); - return entityegginfo != null ? (par2 == 0 ? entityegginfo.primaryColor : entityegginfo.secondaryColor) : 16777215; - } - /** - * Callback for item usage. If the item does something special on right clicking, he will have one of those. Return - * True if something happen and false if it don't. This is for ITEMS, not BLOCKS + * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer */ - public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) + @Override + public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) { - if (par3World.isRemote) + if (world.isRemote) { return true; - } else + } + else if (!playerIn.func_175151_a(pos.offset(side), side, stack)) { - Block i1 = par3World.getBlock(par4, par5, par6); - par4 += Facing.offsetsXForSide[par7]; - par5 += Facing.offsetsYForSide[par7]; - par6 += Facing.offsetsZForSide[par7]; + return false; + } + else + { + IBlockState iblockstate = world.getBlockState(pos); + + pos = pos.offset(side); double d0 = 0.0D; - if (par7 == 1 && i1 != null && i1.getRenderType() == 11) + if (side == EnumFacing.UP && iblockstate instanceof BlockFence) { d0 = 0.5D; } - String demonName = DemonPlacer.getDemonString(par1ItemStack); - Entity entity = spawnCreature(par3World, demonName, (double) par4 + 0.5D, (double) par5 + d0, (double) par6 + 0.5D, par1ItemStack); + String demonName = DemonPlacer.getDemonString(stack); + Entity entity = spawnCreature(world, demonName, (double)pos.getX() + 0.5D, (double)pos.getY() + d0, (double)pos.getZ() + 0.5D, stack); if (entity != null) { - if (entity instanceof EntityLivingBase && par1ItemStack.hasDisplayName()) + if (entity instanceof EntityLivingBase && stack.hasDisplayName()) { - ((EntityLiving) entity).setCustomNameTag(par1ItemStack.getDisplayName()); + entity.setCustomNameTag(stack.getDisplayName()); } - if (!par2EntityPlayer.capabilities.isCreativeMode) + if (!playerIn.capabilities.isCreativeMode) { - --par1ItemStack.stackSize; + --stack.stackSize; } } @@ -84,64 +76,6 @@ public class DemonPlacer extends Item } } - /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer - */ - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (par2World.isRemote) - { - return par1ItemStack; - } else - { - MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, true); - - if (movingobjectposition == null) - { - return par1ItemStack; - } else - { - if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - int i = movingobjectposition.blockX; - int j = movingobjectposition.blockY; - int k = movingobjectposition.blockZ; - - if (!par2World.canMineBlock(par3EntityPlayer, i, j, k)) - { - return par1ItemStack; - } - - if (!par3EntityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, par1ItemStack)) - { - return par1ItemStack; - } - - if (par2World.getBlock(i, j, k).getMaterial() == Material.water) - { - String demonName = DemonPlacer.getDemonString(par1ItemStack); - Entity entity = spawnCreature(par2World, demonName, (double) i, (double) j, (double) k, par1ItemStack); - - if (entity != null) - { - if (entity instanceof EntityLivingBase && par1ItemStack.hasDisplayName()) - { - ((EntityLiving) entity).setCustomNameTag(par1ItemStack.getDisplayName()); - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) - { - --par1ItemStack.stackSize; - } - } - } - } - - return par1ItemStack; - } - } - } - /** * Spawns the creature specified by the egg's type in the location specified by the last three parameters. * Parameters: world, entityID, x, y, z. @@ -230,11 +164,4 @@ public class DemonPlacer extends Item } } } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DemonPlacer"); - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonicTelepositionFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonicTelepositionFocus.java index 799fc38e..c4508bc1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonicTelepositionFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonicTelepositionFocus.java @@ -1,15 +1,12 @@ package WayofTime.alchemicalWizardry.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; -import java.util.List; - public class DemonicTelepositionFocus extends TelepositionFocus { public DemonicTelepositionFocus() @@ -17,13 +14,6 @@ public class DemonicTelepositionFocus extends TelepositionFocus super(4); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DemonicTeleposerFocus"); - } - @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java index 6de25769..600cb2da 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class DuskScribeTool extends ScribeTool { @@ -10,11 +7,4 @@ public class DuskScribeTool extends ScribeTool { super(5); } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DuskScribeTool"); - } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EarthScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EarthScribeTool.java index 824d3925..530fce10 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EarthScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EarthScribeTool.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class EarthScribeTool extends ScribeTool { @@ -10,11 +7,4 @@ public class EarthScribeTool extends ScribeTool { super(3); } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:EarthScribeTool"); - } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java index 30ccc0cd..a713fe7c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java @@ -1,5 +1,15 @@ package WayofTime.alchemicalWizardry.common.items; +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.server.MinecraftServer; +import net.minecraft.util.EnumParticleTypes; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; @@ -7,18 +17,6 @@ import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; - -import java.util.List; public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBloodOrb { @@ -34,13 +32,6 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl orbLevel = 1; } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:EnergyBattery"); - } - @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { @@ -125,7 +116,7 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl for (int l = 0; l < 8; ++l) { - world.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); + world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); } } @@ -210,10 +201,4 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl return data.currentEssence; } - - @Override - public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemStack) - { - return false; - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java index c5fd3364..c9e44de7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java @@ -1,27 +1,19 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaMainProjectile; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.List; + import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.util.Vec3; import net.minecraft.world.World; - -import java.util.List; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaMainProjectile; public class EnergyBazooka extends EnergyItems { - @SideOnly(Side.CLIENT) - private IIcon activeIcon; - @SideOnly(Side.CLIENT) - private IIcon passiveIcon; private int damage; public EnergyBazooka() @@ -35,34 +27,6 @@ public class EnergyBazooka extends EnergyItems damage = 12; } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:EnergyBazooka_activated"); - this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:EnergyBazooka_activated"); - this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) - { - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - if (tag.getBoolean("isActive")) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -168,28 +132,14 @@ public class EnergyBazooka extends EnergyItems } } - public void setActivated(ItemStack par1ItemStack, boolean newActivated) + public void setActivated(ItemStack stack, boolean newActivated) { - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if (itemTag == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - itemTag.setBoolean("isActive", newActivated); + stack.setItemDamage(newActivated ? 1 : 0); } - public boolean getActivated(ItemStack par1ItemStack) + public boolean getActivated(ItemStack stack) { - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if (itemTag == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - return itemTag.getBoolean("isActive"); + return stack.getItemDamage() == 1; } public void setDelay(ItemStack par1ItemStack, int newDelay) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlast.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlast.java index 03023a79..f1103f4f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlast.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlast.java @@ -1,26 +1,18 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.List; + import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; - -import java.util.List; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; public class EnergyBlast extends EnergyItems { - @SideOnly(Side.CLIENT) - private IIcon activeIcon; - @SideOnly(Side.CLIENT) - private IIcon passiveIcon; private int damage; public EnergyBlast() @@ -35,34 +27,6 @@ public class EnergyBlast extends EnergyItems damage = 12; } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:EnergyBlaster_activated"); - this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:EnergyBlaster_activated"); - this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) - { - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - if (tag.getBoolean("isActive")) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -162,28 +126,14 @@ public class EnergyBlast extends EnergyItems } } - public void setActivated(ItemStack par1ItemStack, boolean newActivated) + public void setActivated(ItemStack stack, boolean newActivated) { - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if (itemTag == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - itemTag.setBoolean("isActive", newActivated); + stack.setItemDamage(newActivated ? 1 : 0); } - public boolean getActivated(ItemStack par1ItemStack) + public boolean getActivated(ItemStack stack) { - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if (itemTag == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - return itemTag.getBoolean("isActive"); + return stack.getItemDamage() == 1; } public void setDelay(ItemStack par1ItemStack, int newDelay) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java index 34be619d..ee96a703 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java @@ -11,6 +11,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.server.MinecraftServer; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; public class EnergyItems extends Item implements IBindable @@ -47,7 +48,7 @@ public class EnergyItems extends Item implements IBindable float f3 = f * f * 0.6F - 0.7F; for (int l = 0; l < 8; ++l) { - world.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); + world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); } } for (int i = 0; i < damage; i++) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergySword.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergySword.java index 2ac7f609..ac626b63 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergySword.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergySword.java @@ -4,7 +4,6 @@ import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -14,21 +13,14 @@ import net.minecraft.item.ItemSword; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class EnergySword extends ItemSword { - @SideOnly(Side.CLIENT) - private IIcon activeIcon; - @SideOnly(Side.CLIENT) - private IIcon passiveIcon; private int energyUsed; public EnergySword() @@ -50,34 +42,6 @@ public class EnergySword extends ItemSword { return this.energyUsed; } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundSword_activated"); - this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundSword_activated"); - this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) - { - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - if (tag.getBoolean("isActive")) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } private OmegaParadigm getOmegaParadigmOfWeilder(EntityPlayer player) { @@ -171,28 +135,14 @@ public class EnergySword extends ItemSword par1ItemStack.setItemDamage(0); } - public void setActivated(ItemStack par1ItemStack, boolean newActivated) + public void setActivated(ItemStack stack, boolean newActivated) { - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if (itemTag == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - itemTag.setBoolean("isActive", newActivated); + stack.setItemDamage(newActivated ? 1 : 0); } - public boolean getActivated(ItemStack par1ItemStack) + public boolean getActivated(ItemStack stack) { - NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - - if (itemTag == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - return itemTag.getBoolean("isActive"); + return stack.getItemDamage() == 1; } public float func_82803_g() @@ -224,7 +174,7 @@ public class EnergySword extends ItemSword } @Override - public float func_150893_a(ItemStack par1ItemStack, Block par2Block) + public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) { if (par2Block == Blocks.web) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnhancedTelepositionFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnhancedTelepositionFocus.java index 165ecda3..2b4d1a42 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnhancedTelepositionFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnhancedTelepositionFocus.java @@ -1,15 +1,12 @@ package WayofTime.alchemicalWizardry.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; -import java.util.List; - public class EnhancedTelepositionFocus extends TelepositionFocus { public EnhancedTelepositionFocus() @@ -17,13 +14,6 @@ public class EnhancedTelepositionFocus extends TelepositionFocus super(2); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:EnhancedTeleposerFocus"); - } - @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/FireScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/FireScribeTool.java index 67420fc2..8b3a55f9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/FireScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/FireScribeTool.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class FireScribeTool extends ScribeTool { @@ -10,11 +7,4 @@ public class FireScribeTool extends ScribeTool { super(2); } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:FireScribeTool"); - } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemAlchemyBase.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemAlchemyBase.java index bb60ec62..29a9148d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemAlchemyBase.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemAlchemyBase.java @@ -1,30 +1,27 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.List; + import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + import org.lwjgl.input.Keyboard; -import java.util.List; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; public class ItemAlchemyBase extends Item { private static final String[] ITEM_NAMES = new String[]{"Offensa", "Praesidium", "OrbisTerrae", "StrengthenedCatalyst", "ConcentratedCatalyst", "FracturedBone", "Virtus", "Reductus", "Potentia"}; - @SideOnly(Side.CLIENT) - private IIcon[] icons; - public ItemAlchemyBase() { super(); @@ -33,18 +30,6 @@ public class ItemAlchemyBase extends Item this.hasSubtypes = true; } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - icons = new IIcon[ITEM_NAMES.length]; - - for (int i = 0; i < ITEM_NAMES.length; ++i) - { - icons[i] = iconRegister.registerIcon("AlchemicalWizardry:" + "baseAlchemyItem" + ITEM_NAMES[i]); - } - } - @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { @@ -85,14 +70,6 @@ public class ItemAlchemyBase extends Item return ("" + "item.bloodMagicAlchemyItem." + ITEM_NAMES[meta]); } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int meta) - { - int j = MathHelper.clamp_int(meta, 0, ITEM_NAMES.length - 1); - return icons[j]; - } - @Override @SideOnly(Side.CLIENT) public void getSubItems(Item id, CreativeTabs creativeTab, List list) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBlockCrystalBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBlockCrystalBelljar.java index b6452305..5e10c4a1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBlockCrystalBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBlockCrystalBelljar.java @@ -3,11 +3,14 @@ package WayofTime.alchemicalWizardry.common.items; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; @@ -77,17 +80,14 @@ public class ItemBlockCrystalBelljar extends ItemBlock } @Override - public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) + public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, IBlockState newState) { - if (!world.setBlock(x, y, z, field_150939_a, metadata, 3)) - { - return false; - } + if (!world.setBlockState(pos, newState, 3)) return false; - if (world.getBlock(x, y, z) == field_150939_a) + IBlockState state = world.getBlockState(pos); + if (state.getBlock() == this.block) { - field_150939_a.onBlockPlacedBy(world, x, y, z, player, stack); - field_150939_a.onPostBlockPlaced(world, x, y, z, metadata); + this.block.onBlockPlacedBy(world, pos, state, player, stack); } return true; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodLetterPack.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodLetterPack.java index dc5354c8..c223d9de 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodLetterPack.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodLetterPack.java @@ -2,14 +2,13 @@ package WayofTime.alchemicalWizardry.common.items; import java.util.List; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.StatCollector; import net.minecraft.world.World; @@ -18,14 +17,9 @@ import WayofTime.alchemicalWizardry.api.items.IAltarManipulator; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAltarManipulator -{ - @SideOnly(Side.CLIENT) - private IIcon plateIcon; - +{ public int conversionRate = 100; //LP / half heart public float activationPoint = 0.5f; public int tickRate = 20; @@ -37,13 +31,6 @@ public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAl setCreativeTab(AlchemicalWizardry.tabBloodMagic); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodPack"); - } - @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { @@ -54,12 +41,6 @@ public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAl par3List.add(StatCollector.translateToLocal("tooltip.lp.storedlp") + " " + this.getStoredLP(par1ItemStack)); } } - - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) - { - return this.plateIcon; - } @Override public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) @@ -84,11 +65,9 @@ public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAl { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - int x = movingobjectposition.blockX; - int y = movingobjectposition.blockY; - int z = movingobjectposition.blockZ; + BlockPos pos = movingobjectposition.func_178782_a(); - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); if (!(tile instanceof TEAltar)) { @@ -106,7 +85,7 @@ public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAl amount -= filledAmount; this.setStoredLP(itemStack, amount); - world.markBlockForUpdate(x, y, z); + world.markBlockForUpdate(pos); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComplexSpellCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComplexSpellCrystal.java index 3798a1c7..c6830b10 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComplexSpellCrystal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComplexSpellCrystal.java @@ -1,19 +1,17 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.StatCollector; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; - -import java.util.List; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; public class ItemComplexSpellCrystal extends EnergyItems { @@ -24,13 +22,6 @@ public class ItemComplexSpellCrystal extends EnergyItems setCreativeTab(AlchemicalWizardry.tabBloodMagic); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:ComplexCrystal"); - } - @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { @@ -65,7 +56,7 @@ public class ItemComplexSpellCrystal extends EnergyItems if (world != null) { NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - TileEntity tileEntity = world.getTileEntity(itemTag.getInteger("xCoord"), itemTag.getInteger("yCoord"), itemTag.getInteger("zCoord")); + TileEntity tileEntity = world.getTileEntity(new BlockPos(itemTag.getInteger("xCoord"), itemTag.getInteger("yCoord"), itemTag.getInteger("zCoord"))); if (tileEntity instanceof TESpellParadigmBlock) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java index 4175c955..7ccfc9d3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java @@ -1,26 +1,21 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.List; + import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; - -import java.util.List; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; public class ItemComponents extends Item { private static final String[] ITEM_NAMES = new String[]{"QuartzRod", "EmptyCore", "MagicalesCable", "WoodBrace", "StoneBrace", "ProjectileCore", "SelfCore", "MeleeCore", "ParadigmBackPlate", "OutputCable", "FlameCore", "IcyCore", "GustCore", "EarthenCore", "InputCable", "CrackedRunicPlate", "RunicPlate", "ScribedRunicPlate", "DefaultCore", "OffensiveCore", "DefensiveCore", "EnvironmentalCore", "PowerCore", "CostCore", "PotencyCore", "ObsidianBrace", "ToolCore", "EtherealSlate", "LifeShard", "SoulShard", "SoulRunicPlate", "LifeBrace", "EnderShard"}; - @SideOnly(Side.CLIENT) - private IIcon[] icons; - public ItemComponents() { super(); @@ -29,18 +24,6 @@ public class ItemComponents extends Item this.hasSubtypes = true; } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - icons = new IIcon[ITEM_NAMES.length]; - - for (int i = 0; i < ITEM_NAMES.length; ++i) - { - icons[i] = iconRegister.registerIcon("AlchemicalWizardry:" + "baseItem" + ITEM_NAMES[i]); - } - } - @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -55,14 +38,6 @@ public class ItemComponents extends Item return ("" + "item.bloodMagicBaseItem." + ITEM_NAMES[meta]); } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int meta) - { - int j = MathHelper.clamp_int(meta, 0, ITEM_NAMES.length - 1); - return icons[j]; - } - @Override @SideOnly(Side.CLIENT) public void getSubItems(Item id, CreativeTabs creativeTab, List list) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java index a2fb0288..98079478 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java @@ -1,12 +1,7 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.List; + import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -16,8 +11,12 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.FakePlayer; - -import java.util.List; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class ItemDiabloKey extends EnergyItems { @@ -30,13 +29,6 @@ public class ItemDiabloKey extends EnergyItems this.hasSubtypes = true; } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DiabloKey"); - } - @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemIncense.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemIncense.java index f906c402..3788f9da 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemIncense.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemIncense.java @@ -2,32 +2,27 @@ package WayofTime.alchemicalWizardry.common.items; import java.util.List; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.util.StatCollector; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.oredict.OreDictionary; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; import WayofTime.alchemicalWizardry.api.sacrifice.IIncense; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class ItemIncense extends Item implements IIncense { private static final String[] ITEM_NAMES = new String[]{"Woodash", "Byrrus", "Livens", "Viridis", "Purpura"}; - @SideOnly(Side.CLIENT) - private IIcon[] icons; - public ItemIncense() { super(); @@ -36,26 +31,6 @@ public class ItemIncense extends Item implements IIncense this.hasSubtypes = true; } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - icons = new IIcon[ITEM_NAMES.length]; - - IIcon baseIcon = iconRegister.registerIcon("AlchemicalWizardry:" + "baseIncenseItem"); - - for (int i = 0; i < ITEM_NAMES.length; ++i) - { - if(this.doesIncenseHaveUniqueTexture(i)) - { - icons[i] = iconRegister.registerIcon("AlchemicalWizardry:" + "baseIncenseItem" + ITEM_NAMES[i]); - }else - { - icons[i] = baseIcon; - } - } - } - @Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { @@ -69,14 +44,6 @@ public class ItemIncense extends Item implements IIncense return ("" + "item.bloodMagicIncenseItem." + ITEM_NAMES[meta]); } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int meta) - { - int j = MathHelper.clamp_int(meta, 0, ITEM_NAMES.length - 1); - return icons[j]; - } - @Override @SideOnly(Side.CLIENT) public void getSubItems(Item id, CreativeTabs creativeTab, List list) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemMailOrderCatalogue.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemMailOrderCatalogue.java index 2e2e07e7..be16d5c9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemMailOrderCatalogue.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemMailOrderCatalogue.java @@ -1,14 +1,11 @@ package WayofTime.alchemicalWizardry.common.items; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.entity.mob.MailOrderEntityItem; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class ItemMailOrderCatalogue extends Item { @@ -18,13 +15,6 @@ public class ItemMailOrderCatalogue extends Item this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:MailOrder"); - } - @Override public boolean hasCustomEntity(ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java index 597177ca..6f74f440 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java @@ -1,21 +1,20 @@ package WayofTime.alchemicalWizardry.common.items; +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.common.block.BlockRitualStone; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; - -import java.util.List; public class ItemRitualDismantler extends EnergyItems { @@ -26,13 +25,6 @@ public class ItemRitualDismantler extends EnergyItems setCreativeTab(AlchemicalWizardry.tabBloodMagic); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:ritual_dismantler"); - } - @Override public void addInformation(ItemStack stack, EntityPlayer player, List par3List, boolean x) { @@ -42,15 +34,15 @@ public class ItemRitualDismantler extends EnergyItems } @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10) + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) { - return EnergyItems.checkAndSetItemOwner(stack, player) && breakRitualStoneAtMasterStone(stack, player, world, x, y, z); + return EnergyItems.checkAndSetItemOwner(stack, player) && breakRitualStoneAtMasterStone(stack, player, world, pos); } - public boolean breakRitualStoneAtMasterStone(ItemStack stack, EntityPlayer player, World world, int x, int y, int z) + public boolean breakRitualStoneAtMasterStone(ItemStack stack, EntityPlayer player, World world, BlockPos pos) { ItemStack[] playerInventory = player.inventory.mainInventory; - TileEntity tileEntity = world.getTileEntity(x, y, z); + TileEntity tileEntity = world.getTileEntity(pos); if (tileEntity instanceof TEMasterStone) { @@ -75,17 +67,18 @@ public class ItemRitualDismantler extends EnergyItems for (RitualComponent rc : ritualList) { - if (!world.isAirBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)) && world.getBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)) instanceof BlockRitualStone) + BlockPos newPos = pos.add(rc.getX(direction), rc.getY(), rc.getZ(direction)); + if (!world.isAirBlock(newPos) && world.getBlockState(newPos).getBlock() instanceof BlockRitualStone) { if (freeSpace >= 0) { if (EnergyItems.syphonBatteries(stack, player, getEnergyUsed()) || player.capabilities.isCreativeMode) { - world.setBlockToAir(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)); + world.setBlockToAir(newPos); player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.ritualStone)); if (world.isRemote) { - world.playAuxSFX(2005, x, y + 1, z, 0); + world.playAuxSFX(2005, pos.offsetUp(), 0); return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java index 4f6b419c..c101711a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java @@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.common.items; import java.util.List; import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -12,11 +12,15 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.EnumFacing; import net.minecraft.util.IChatComponent; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; @@ -29,8 +33,6 @@ import WayofTime.alchemicalWizardry.api.rituals.IRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner { @@ -46,13 +48,6 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner this.hasSubtypes = true; } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:RitualDiviner"); - } - @Override public void addInformation(ItemStack stack, EntityPlayer player, List par3List, boolean x) { @@ -166,15 +161,15 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner } @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10) + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) { if (!EnergyItems.checkAndSetItemOwner(stack, player)) return false; - if(placeRitualStoneAtMasterStone(stack, player, world, x, y, z)) + if(placeRitualStoneAtMasterStone(stack, player, world, pos)) { - this.setStoredLocation(stack, new Int3(x, y, z)); + this.setStoredLocation(stack, new Int3(pos)); return true; - }else if(!(world.getBlock(x, y, z) instanceof IRitualStone || world.getBlock(x, y, z) instanceof IMasterRitualStone) && !player.isSneaking()) + }else if(!(world.getBlockState(pos).getBlock() instanceof IRitualStone || world.getBlockState(pos).getBlock() instanceof IMasterRitualStone) && !player.isSneaking()) { if(world.isRemote) { @@ -188,12 +183,12 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner return false; } - public boolean placeRitualStoneAtMasterStone(ItemStack stack, EntityPlayer player, World world, int x, int y, int z) + public boolean placeRitualStoneAtMasterStone(ItemStack stack, EntityPlayer player, World world, BlockPos pos) { int direction = this.getDirection(stack); ItemStack[] playerInventory = player.inventory.mainInventory; - TileEntity tileEntity = world.getTileEntity(x, y, z); + TileEntity tileEntity = world.getTileEntity(pos); if (tileEntity instanceof TEMasterStone) { @@ -221,13 +216,15 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner for (RitualComponent rc : ritualList) { - if (world.isAirBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction))) + BlockPos newPos = pos.add(rc.getX(direction), rc.getY(), rc.getZ(direction)); + + if (world.isAirBlock(newPos)) { if (playerInvRitualStoneLocation >= 0 || player.capabilities.isCreativeMode) { if (rc.getStoneType() > this.maxMetaData + this.getMaxRuneDisplacement(stack)) { - world.playAuxSFX(200, x, y + 1, z, 0); + world.playAuxSFX(200, newPos.offsetUp(), 0); return true; } @@ -238,11 +235,11 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner if(EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) { - world.setBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction), ModBlocks.ritualStone, rc.getStoneType(), 3); + world.setBlockState(newPos, ModBlocks.ritualStone.getStateFromMeta(rc.getStoneType()), 3); if (world.isRemote) { - world.playAuxSFX(2005, x, y + 1, z, 0); + world.playAuxSFX(2005, newPos.offsetUp(), 0); return true; } @@ -252,29 +249,29 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner } } else { - Block block = world.getBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)); + IBlockState state = world.getBlockState(newPos); + Block block = state.getBlock(); if (block == ModBlocks.ritualStone) { - int metadata = world.getBlockMetadata(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)); - + int metadata = block.getMetaFromState(state); if (metadata != rc.getStoneType()) { if(EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) { if (rc.getStoneType() > this.maxMetaData + this.getMaxRuneDisplacement(stack)) { - world.playAuxSFX(200, x, y + 1, z, 0); + world.playAuxSFX(200, newPos.offsetUp(), 0); return true; } - world.setBlockMetadataWithNotify(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction), rc.getStoneType(), 3); + world.setBlockState(newPos, ModBlocks.ritualStone.getStateFromMeta(rc.getStoneType()), 3); return true; } } } else { - world.playAuxSFX(0, x, y + 1, z, 0); + world.playAuxSFX(0, newPos.offsetUp(), 0); return true; } } @@ -295,7 +292,7 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner int y = loc.yCoord; int z = loc.zCoord; - if(!this.placeRitualStoneAtMasterStone(stack, (EntityPlayer)entity, world, x, y, z)) + if(!this.placeRitualStoneAtMasterStone(stack, (EntityPlayer)entity, world, new BlockPos(x, y, z))) { this.voidStoredLocation(stack); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java index eec96479..c813115f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java @@ -2,18 +2,13 @@ package WayofTime.alchemicalWizardry.common.items; import java.util.List; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.server.MinecraftServer; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import net.minecraft.world.WorldProvider; -import net.minecraftforge.common.DimensionManager; import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; public class LavaCrystal extends EnergyItems { @@ -26,13 +21,6 @@ public class LavaCrystal extends EnergyItems setEnergyUsed(25); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:LavaCrystal"); - } - /* * Used to have the item contain itself. */ @@ -83,22 +71,7 @@ public class LavaCrystal extends EnergyItems return false; } -// World world = MinecraftServer.getServer().worldServers[0]; - WorldProvider provider = DimensionManager.getProvider(0); - if(provider == null || provider.worldObj == null) - { - return false; - } - World world = provider.worldObj; - LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); - - if (data == null) - { - data = new LifeEssenceNetwork(ownerName); - world.setItemData(ownerName, data); - } - - if (data.currentEssence >= this.getEnergyUsed()) + if (SoulNetworkHandler.getCurrentEssence(ownerName) >= this.getEnergyUsed()) { return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/LifeBucket.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/LifeBucket.java index daaec1d1..7a19f8bd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/LifeBucket.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/LifeBucket.java @@ -1,9 +1,6 @@ package WayofTime.alchemicalWizardry.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemBucket; public class LifeBucket extends ItemBucket @@ -12,11 +9,4 @@ public class LifeBucket extends ItemBucket { super(block); } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:LifeBucket"); - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/MagicianBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/MagicianBloodOrb.java index 737760e4..0bfa4a49 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/MagicianBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/MagicianBloodOrb.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class MagicianBloodOrb extends EnergyBattery { @@ -11,11 +8,4 @@ public class MagicianBloodOrb extends EnergyBattery super(damage); orbLevel = 3; } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:MagicianBloodOrb"); - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java index e82a160d..64021b33 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class MasterBloodOrb extends EnergyBattery { @@ -11,11 +8,4 @@ public class MasterBloodOrb extends EnergyBattery super(damage); orbLevel = 4; } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:MasterBloodOrb"); - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/OrbOfTesting.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/OrbOfTesting.java index 4cd07069..1afe84a4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/OrbOfTesting.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/OrbOfTesting.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -21,13 +18,6 @@ public class OrbOfTesting extends EnergyItems this.setEnergyUsed(100); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Untitled"); - } - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { if (!par3EntityPlayer.shouldHeal()) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ReinforcedTelepositionFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ReinforcedTelepositionFocus.java index 8d83eb3f..90c5f01d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ReinforcedTelepositionFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ReinforcedTelepositionFocus.java @@ -1,15 +1,12 @@ package WayofTime.alchemicalWizardry.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; -import java.util.List; - public class ReinforcedTelepositionFocus extends TelepositionFocus { public ReinforcedTelepositionFocus() @@ -17,13 +14,6 @@ public class ReinforcedTelepositionFocus extends TelepositionFocus super(3); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:ReinforcedTeleposerFocus"); - } - @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java index b40ee311..a3b7b28b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java @@ -2,7 +2,6 @@ package WayofTime.alchemicalWizardry.common.items; import java.util.List; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumAction; @@ -10,18 +9,20 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.FakePlayer; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.event.SacrificeKnifeUsedEvent; import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class SacrificialDagger extends Item { @@ -33,19 +34,6 @@ public class SacrificialDagger extends Item setFull3D(); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - if (AlchemicalWizardry.wimpySettings) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); - } else - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SacrificialDagger"); - } - } - @Override public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { @@ -85,7 +73,7 @@ public class SacrificialDagger extends Item @Override public EnumAction getItemUseAction(ItemStack stack) { - return EnumAction.bow; + return EnumAction.BOW; } @Override @@ -132,7 +120,7 @@ public class SacrificialDagger extends Item for (int l = 0; l < 8; ++l) { - world.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); + world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); } if (!world.isRemote && SpellHelper.isFakePlayer(world, player)) @@ -158,10 +146,8 @@ public class SacrificialDagger extends Item public void findAndFillAltar(World world, EntityPlayer player, int amount) { - int posX = (int) Math.round(player.posX - 0.5f); - int posY = (int) player.posY; - int posZ = (int) Math.round(player.posZ - 0.5f); - IBloodAltar altarEntity = getAltar(world, posX, posY, posZ); + BlockPos pos = player.getPosition(); + IBloodAltar altarEntity = getAltar(world, pos); if (altarEntity == null) { @@ -172,7 +158,7 @@ public class SacrificialDagger extends Item altarEntity.startCycle(); } - public IBloodAltar getAltar(World world, int x, int y, int z) + public IBloodAltar getAltar(World world, BlockPos pos) { TileEntity tileEntity; @@ -182,7 +168,8 @@ public class SacrificialDagger extends Item { for (int k = -2; k <= 1; k++) { - tileEntity = world.getTileEntity(i + x, k + y, j + z); + BlockPos newPos = pos.add(i, j, k); + tileEntity = world.getTileEntity(newPos); if(tileEntity instanceof IBloodAltar) { @@ -240,8 +227,8 @@ public class SacrificialDagger extends Item @Override @SideOnly(Side.CLIENT) - public boolean hasEffect(ItemStack stack, int pass) + public boolean hasEffect(ItemStack stack) { - return this.canUseForSacrifice(stack) || super.hasEffect(stack, pass); + return this.canUseForSacrifice(stack) || super.hasEffect(stack); } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java index 9a7a4fbb..156dca5a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java @@ -2,7 +2,6 @@ package WayofTime.alchemicalWizardry.common.items; import java.util.List; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -11,8 +10,6 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class TelepositionFocus extends EnergyItems { @@ -26,13 +23,6 @@ public class TelepositionFocus extends EnergyItems this.focusLevel = focusLevel; } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:TeleposerFocus"); - } - @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/TranscendentBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/TranscendentBloodOrb.java index ecab2b21..665f8d88 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/TranscendentBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/TranscendentBloodOrb.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.items; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class TranscendentBloodOrb extends EnergyBattery { @@ -11,11 +8,4 @@ public class TranscendentBloodOrb extends EnergyBattery super(damage); orbLevel = 6; } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:TranscendentBloodOrb"); - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java index bec61005..cec691aa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java @@ -1,9 +1,6 @@ package WayofTime.alchemicalWizardry.common.items; import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class WaterScribeTool extends ScribeTool { @@ -12,11 +9,4 @@ public class WaterScribeTool extends ScribeTool super(1); setCreativeTab(AlchemicalWizardry.tabBloodMagic); } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WaterScribeTool"); - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java index 78f7b38d..61b14e09 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java @@ -2,19 +2,19 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import java.util.List; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import codechicken.lib.render.TextureUtils.IIconRegister; public class SigilAir extends EnergyItems implements ArmourUpgrade, ISigil { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ContainerHolding.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ContainerHolding.java index c3d0e651..e4d3afc2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ContainerHolding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ContainerHolding.java @@ -1,12 +1,12 @@ package WayofTime.alchemicalWizardry.common.items.sigil.holding; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import cpw.mods.fml.common.FMLCommonHandler; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.common.FMLCommonHandler; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; public class ContainerHolding extends Container { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/GuiHolding.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/GuiHolding.java index 3abcf197..f47ee663 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/GuiHolding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/GuiHolding.java @@ -1,10 +1,11 @@ package WayofTime.alchemicalWizardry.common.items.sigil.holding; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketHandler.java index 6da027bd..f6acf021 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketHandler.java @@ -1,8 +1,8 @@ package WayofTime.alchemicalWizardry.common.items.sigil.holding; -import cpw.mods.fml.common.network.NetworkRegistry; -import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; -import cpw.mods.fml.relauncher.Side; +import net.minecraftforge.fml.common.network.NetworkRegistry; +import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; +import net.minecraftforge.fml.relauncher.Side; public class HoldingPacketHandler { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketProcessor.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketProcessor.java index ad44abdf..dc82e3b1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketProcessor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketProcessor.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.common.items.sigil.holding; -import cpw.mods.fml.common.network.simpleimpl.IMessage; -import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; -import cpw.mods.fml.common.network.simpleimpl.MessageContext; import io.netty.buffer.ByteBuf; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.common.network.simpleimpl.IMessage; +import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; +import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; public class HoldingPacketProcessor implements IMessage, IMessageHandler<HoldingPacketProcessor, IMessage> { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ScrollHelper.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ScrollHelper.java index c40984b6..bb96bf84 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ScrollHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ScrollHelper.java @@ -6,9 +6,9 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.client.event.MouseEvent; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class ScrollHelper diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java index c26c7265..d01f7316 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java @@ -2,20 +2,19 @@ package WayofTime.alchemicalWizardry.common.items.sigil.holding; import java.util.List; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import codechicken.lib.render.TextureUtils.IIconRegister; public class SigilOfHolding extends EnergyItems { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionAmphibian.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionAmphibian.java index 1e3afb29..910fa201 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionAmphibian.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionAmphibian.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; public class PotionAmphibian extends Potion { public PotionAmphibian(int par1, boolean par2, int par3) { - super(par1, par2, par3); + super(par1, new ResourceLocation("speed"), par2, par3); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBoost.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBoost.java index 132205bb..829a64a6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBoost.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBoost.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; public class PotionBoost extends Potion { public PotionBoost(int par1, boolean par2, int par3) { - super(par1, par2, par3); + super(par1, new ResourceLocation("speed"),par2, par3); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDeaf.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDeaf.java index fc46e77b..ef3f6d8c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDeaf.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDeaf.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; public class PotionDeaf extends Potion { public PotionDeaf(int par1, boolean par2, int par3) { - super(par1, par2, par3); + super(par1, new ResourceLocation("speed"),par2, par3); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDemonCloak.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDemonCloak.java index ea2045f4..f227139e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDemonCloak.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDemonCloak.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; public class PotionDemonCloak extends Potion { public PotionDemonCloak(int par1, boolean par2, int par3) { - super(par1, par2, par3); + super(par1, new ResourceLocation("speed"),par2, par3); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDrowning.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDrowning.java index 87558f26..e93d897e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDrowning.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDrowning.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; public class PotionDrowning extends Potion { public PotionDrowning(int par1, boolean par2, int par3) { - super(par1, par2, par3); + super(par1, new ResourceLocation("speed"),par2, par3); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFeatherFall.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFeatherFall.java index 0c35263b..241eda04 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFeatherFall.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFeatherFall.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; public class PotionFeatherFall extends Potion { public PotionFeatherFall(int par1, boolean par2, int par3) { - super(par1, par2, par3); + super(par1, new ResourceLocation("speed"),par2, par3); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFireFuse.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFireFuse.java index 8fe5d527..2d044f6c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFireFuse.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFireFuse.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; public class PotionFireFuse extends Potion { public PotionFireFuse(int par1, boolean par2, int par3) { - super(par1, par2, par3); + super(par1, new ResourceLocation("speed"),par2, par3); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlameCloak.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlameCloak.java index 46363b11..ff7e0727 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlameCloak.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlameCloak.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; public class PotionFlameCloak extends Potion { public PotionFlameCloak(int par1, boolean par2, int par3) { - super(par1, par2, par3); + super(par1, new ResourceLocation("speed"),par2, par3); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlight.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlight.java index 23e93e57..be96423e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlight.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlight.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; public class PotionFlight extends Potion { public PotionFlight(int par1, boolean par2, int par3) { - super(par1, par2, par3); + super(par1, new ResourceLocation("speed"),par2, par3); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionHeavyHeart.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionHeavyHeart.java index 952fb59c..e2111686 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionHeavyHeart.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionHeavyHeart.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; public class PotionHeavyHeart extends Potion { public PotionHeavyHeart(int par1, boolean par2, int par3) { - super(par1, par2, par3); + super(par1, new ResourceLocation("speed"),par2, par3); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionIceCloak.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionIceCloak.java index c2ba716a..64b588ad 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionIceCloak.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionIceCloak.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; public class PotionIceCloak extends Potion { public PotionIceCloak(int par1, boolean par2, int par3) { - super(par1, par2, par3); + super(par1, new ResourceLocation("speed"),par2, par3); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionInhibit.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionInhibit.java index 2214e105..42164497 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionInhibit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionInhibit.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; public class PotionInhibit extends Potion { public PotionInhibit(int par1, boolean par2, int par3) { - super(par1, par2, par3); + super(par1, new ResourceLocation("speed"),par2, par3); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionPlanarBinding.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionPlanarBinding.java index 54d6cd72..35165db5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionPlanarBinding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionPlanarBinding.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; public class PotionPlanarBinding extends Potion { public PotionPlanarBinding(int par1, boolean par2, int par3) { - super(par1, par2, par3); + super(par1, new ResourceLocation("speed"),par2, par3); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionProjectileProtect.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionProjectileProtect.java index 317edd54..e6dd1a9d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionProjectileProtect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionProjectileProtect.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; public class PotionProjectileProtect extends Potion { public PotionProjectileProtect(int par1, boolean par2, int par3) { - super(par1, par2, par3); + super(par1, new ResourceLocation("speed"),par2, par3); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionReciprocation.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionReciprocation.java index ddceed0b..e152a45a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionReciprocation.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionReciprocation.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; public class PotionReciprocation extends Potion { public PotionReciprocation(int par1, boolean par2, int par3) { - super(par1, par2, par3); + super(par1, new ResourceLocation("speed"),par2, par3); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulFray.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulFray.java index 304b0307..03c2323e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulFray.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulFray.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; import java.util.ArrayList; @@ -10,7 +11,7 @@ public class PotionSoulFray extends Potion { public PotionSoulFray(int par1, boolean par2, int par3) { - super(par1, par2, par3); + super(par1, new ResourceLocation("speed"),par2, par3); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulHarden.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulHarden.java index 0ac24694..e78da4d9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulHarden.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulHarden.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; public class PotionSoulHarden extends Potion { public PotionSoulHarden(int par1, boolean par2, int par3) { - super(par1, par2, par3); + super(par1, new ResourceLocation("speed"),par2, par3); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java index 8443086a..82a9d3b7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java @@ -17,16 +17,16 @@ public class ModelBloodAltar extends ModelBase { private static final ResourceLocation altar_texture = new ResourceLocation("alchemicalwizardry:textures/models/altar.png"); - private IModelCustom modelBloodAltar; +// private IModelCustom modelBloodAltar; public ModelBloodAltar() { - modelBloodAltar = AdvancedModelLoader.loadModel(new ResourceLocation("alchemicalwizardry:models/bloodaltar-fixeUV.obj")); +// modelBloodAltar = AdvancedModelLoader.loadModel(new ResourceLocation("alchemicalwizardry:models/bloodaltar-fixeUV.obj")); } public void renderBloodAltar() { - modelBloodAltar.renderAll(); +// modelBloodAltar.renderAll(); } public void renderBloodAltar(TEAltar altar, double x, double y, double z) From 230b44fe88b1c5d225aeaa3dfe6ea7b254ca8ace Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Thu, 30 Jul 2015 09:31:16 -0400 Subject: [PATCH 22/33] Finished all errors except for the sigils. --- .../api/items/ItemSpellMultiTool.java | 6 - .../EntityBloodLightProjectile.java | 49 +-- .../EntityEnergyBazookaMainProjectile.java | 3 +- ...ntityEnergyBazookaSecondaryProjectile.java | 166 ++++----- .../entity/projectile/EntityMeteor.java | 4 +- .../entity/projectile/EntityParticleBeam.java | 52 +-- .../projectile/ExplosionProjectile.java | 7 +- .../entity/projectile/FireProjectile.java | 14 +- .../entity/projectile/HolyProjectile.java | 7 +- .../entity/projectile/IceProjectile.java | 12 +- .../projectile/LightningBoltProjectile.java | 7 +- .../entity/projectile/MudProjectile.java | 7 +- .../entity/projectile/TeleportProjectile.java | 7 +- .../entity/projectile/WaterProjectile.java | 7 +- .../entity/projectile/WindGustProjectile.java | 7 +- .../common/items/armour/BoundArmour.java | 323 ++++++++---------- .../common/items/armour/OmegaArmour.java | 14 +- .../common/items/armour/OmegaArmourEarth.java | 57 +--- .../common/items/armour/OmegaArmourFire.java | 62 +--- .../common/items/armour/OmegaArmourWater.java | 62 +--- .../common/items/armour/OmegaArmourWind.java | 57 +--- .../items/energy/ItemAttunedCrystal.java | 108 ++---- .../items/energy/ItemDestinationClearer.java | 27 +- .../items/energy/ItemTankSegmenter.java | 92 +---- .../common/items/potion/AlchemyFlask.java | 39 +-- .../common/items/potion/AlchemyReagent.java | 67 +--- .../potion/AverageLengtheningCatalyst.java | 10 - .../items/potion/AveragePowerCatalyst.java | 10 - .../items/potion/CombinationalCatalyst.java | 11 +- .../items/potion/EnhancedFillingAgent.java | 10 - .../potion/GreaterLengtheningCatalyst.java | 10 - .../items/potion/GreaterPowerCatalyst.java | 10 - .../potion/MundaneLengtheningCatalyst.java | 10 - .../items/potion/MundanePowerCatalyst.java | 10 - .../items/potion/StandardBindingAgent.java | 20 +- .../items/potion/StandardFillingAgent.java | 10 - .../common/items/potion/WeakBindingAgent.java | 10 - .../common/items/potion/WeakFillingAgent.java | 22 +- .../items/routing/InputRoutingFocus.java | 10 - .../items/routing/OutputRoutingFocus.java | 43 +-- .../items/sigil/holding/SigilOfHolding.java | 89 ++--- .../summoning/meteor/MeteorParadigm.java | 8 +- .../summoning/meteor/MeteorRegistry.java | 13 +- .../common/tileEntity/TEReagentConduit.java | 10 + 44 files changed, 431 insertions(+), 1148 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java index c734d12b..4d5b1fd2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java @@ -43,12 +43,6 @@ public class ItemSpellMultiTool extends Item this.setMaxStackSize(1); this.setFull3D(); } - - @Override - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundTool"); - } @Override public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java index c0490bd8..0cc5adf7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java @@ -1,12 +1,15 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; -import WayofTime.alchemicalWizardry.ModBlocks; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Blocks; +import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.ModBlocks; public class EntityBloodLightProjectile extends EnergyBlastProjectile @@ -55,39 +58,12 @@ public class EntityBloodLightProjectile extends EnergyBlastProjectile this.onImpact(mop.entityHit); } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - int sideHit = mop.sideHit; - int blockX = mop.blockX; - int blockY = mop.blockY; - int blockZ = mop.blockZ; - - if (sideHit == 0 && this.worldObj.isAirBlock(blockX, blockY - 1, blockZ)) + EnumFacing facing = mop.field_178784_b; + BlockPos position = mop.func_178782_a().offset(facing); + + if(this.worldObj.isAirBlock(position)) { - this.worldObj.setBlock(blockX, blockY - 1, blockZ, ModBlocks.blockBloodLight); - } - - if (sideHit == 1 && this.worldObj.isAirBlock(blockX, blockY + 1, blockZ)) - { - this.worldObj.setBlock(blockX, blockY + 1, blockZ, ModBlocks.blockBloodLight); - } - - if (sideHit == 2 && this.worldObj.isAirBlock(blockX, blockY, blockZ - 1)) - { - this.worldObj.setBlock(blockX, blockY, blockZ - 1, ModBlocks.blockBloodLight); - } - - if (sideHit == 3 && this.worldObj.isAirBlock(blockX, blockY, blockZ + 1)) - { - this.worldObj.setBlock(blockX, blockY, blockZ + 1, ModBlocks.blockBloodLight); - } - - if (sideHit == 4 && this.worldObj.isAirBlock(blockX - 1, blockY, blockZ)) - { - this.worldObj.setBlock(blockX - 1, blockY, blockZ, ModBlocks.blockBloodLight); - } - - if (sideHit == 5 && this.worldObj.isAirBlock(blockX + 1, blockY, blockZ)) - { - this.worldObj.setBlock(blockX + 1, blockY, blockZ, ModBlocks.blockBloodLight); + this.worldObj.setBlockState(position, ModBlocks.blockBloodLight.getDefaultState()); } } @@ -110,12 +86,13 @@ public class EntityBloodLightProjectile extends EnergyBlastProjectile } } - if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ)) + BlockPos pos = new BlockPos(this.posX, this.posY, this.posZ); + if (worldObj.isAirBlock(pos)) { - worldObj.setBlock((int) this.posX, (int) this.posY, (int) this.posZ, Blocks.fire); + worldObj.setBlockState(pos, Blocks.fire.getDefaultState()); } - spawnHitParticles("magicCrit", 8); + spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); this.setDead(); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java index fbc3fa57..11617db3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -76,7 +77,7 @@ public class EntityEnergyBazookaMainProjectile extends EnergyBlastProjectile worldObj.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, (float) (5.0f), false); } - spawnHitParticles("magicCrit", 8); + spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); this.setDead(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java index 8ab1b0dc..992b733d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java @@ -4,20 +4,23 @@ import java.util.Iterator; import java.util.List; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IProjectile; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectile implements IProjectile { @@ -48,7 +51,6 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil super(par1World); this.setSize(0.5F, 0.5F); this.setPosition(par2, par4, par6); - yOffset = 0.0F; this.damage = damage; } @@ -63,7 +65,6 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil posY -= 0.2D; posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; this.setPosition(posX, posY, posZ); - yOffset = 0.0F; motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); @@ -102,18 +103,6 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil prevRotationPitch = rotationPitch = (float) (Math.atan2(var3, var10) * 180.0D / Math.PI); } - @Override - @SideOnly(Side.CLIENT) - /** - * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, - * posY, posZ, yaw, pitch - */ - public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) - { - this.setPosition(par1, par3, par5); - this.setRotation(par7, par8); - } - @Override @SideOnly(Side.CLIENT) /** @@ -180,28 +169,21 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil prevRotationPitch = rotationPitch = (float) (Math.atan2(motionY, var1) * 180.0D / Math.PI); } - Block var16 = worldObj.getBlock(xTile, yTile, zTile); + IBlockState state = worldObj.getBlockState(new BlockPos(xTile, yTile, zTile)); + Block var16 = state.getBlock(); if (var16 != null) { - var16.setBlockBoundsBasedOnState(worldObj, xTile, yTile, zTile); - AxisAlignedBB var2 = var16.getCollisionBoundingBoxFromPool(worldObj, xTile, yTile, zTile); + var16.setBlockBoundsBasedOnState(worldObj, new BlockPos(xTile, yTile, zTile)); + AxisAlignedBB var2 = var16.getCollisionBoundingBox(worldObj, new BlockPos(xTile, yTile, zTile), state); - if (var2 != null && var2.isVecInside(SpellHelper.createVec3(posX, posY, posZ))) + if (var2 != null && var2.isVecInside(new Vec3(posX, posY, posZ))) { inGround = true; } } - if (inGround) - { - Block var18 = worldObj.getBlock(xTile, yTile, zTile); - int var19 = worldObj.getBlockMetadata(xTile, yTile, zTile); - - if (var18.equals(Block.getBlockById(inTile)) && var19 == inData) - { - } - } else + if (!inGround) { ++ticksInAir; @@ -213,19 +195,19 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil } } - Vec3 var17 = SpellHelper.createVec3(posX, posY, posZ); - Vec3 var3 = SpellHelper.createVec3(posX + motionX, posY + motionY, posZ + motionZ); - MovingObjectPosition var4 = worldObj.func_147447_a(var17, var3, true, false, false); - var17 = SpellHelper.createVec3(posX, posY, posZ); - var3 = SpellHelper.createVec3(posX + motionX, posY + motionY, posZ + motionZ); + Vec3 var17 = new Vec3(posX, posY, posZ); + Vec3 var3 = new Vec3(posX + motionX, posY + motionY, posZ + motionZ); + MovingObjectPosition var4 = worldObj.rayTraceBlocks(var17, var3, true, false, false); + var17 = new Vec3(posX, posY, posZ); + var3 = new Vec3(posX + motionX, posY + motionY, posZ + motionZ); if (var4 != null) { - var3 = SpellHelper.createVec3(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord); + var3 = new Vec3(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord); } Entity var5 = null; - List var6 = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); + List var6 = worldObj.getEntitiesWithinAABBExcludingEntity(this, getBoundingBox().addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); double var7 = 0.0D; Iterator var9 = var6.iterator(); float var11; @@ -237,7 +219,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil if (var10.canBeCollidedWith() && (var10 != shootingEntity || ticksInAir >= 5)) { var11 = 0.3F; - AxisAlignedBB var12 = var10.boundingBox.expand(var11, var11, var11); + AxisAlignedBB var12 = var10.getBoundingBox().expand(var11, var11, var11); MovingObjectPosition var13 = var12.calculateIntercept(var17, var3); if (var13 != null) @@ -278,8 +260,8 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil public void doFiringParticles() { - worldObj.spawnParticle("mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - worldObj.spawnParticle("flame", posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); + worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + worldObj.spawnParticle(EnumParticleTypes.FLAME, posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); } /** @@ -320,13 +302,6 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil return false; } - @Override - @SideOnly(Side.CLIENT) - public float getShadowSize() - { - return 0.0F; - } - /** * Sets the amount of knockback the arrow applies when it hits a mob. */ @@ -382,7 +357,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil this.onImpact(mop.entityHit); } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - this.groundImpact(mop.sideHit); + this.groundImpact(mop.field_178784_b); worldObj.createExplosion(shootingEntity, posX, posY, posZ, 2, false); } } @@ -399,7 +374,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil worldObj.createExplosion(shootingEntity, posX, posY, posZ, 2, false); } - spawnHitParticles("magicCrit", 8); + spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); this.setDead(); } @@ -408,11 +383,11 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil return rand.nextInt(6) + 1; } - public void spawnHitParticles(String string, int i) + protected void spawnHitParticles(EnumParticleTypes type, int i) { for (int particles = 0; particles < i; particles++) { - worldObj.spawnParticle(string, posX, posY - (string == "portal" ? 1 : 0), posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); + worldObj.spawnParticle(type, posX, posY - (type == EnumParticleTypes.PORTAL ? 1 : 0), posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); } } @@ -426,7 +401,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil return DamageSource.causeMobDamage(shootingEntity); } - public void groundImpact(int sideHit) + public void groundImpact(EnumFacing sideHit) { this.ricochet(sideHit); } @@ -441,27 +416,21 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil return d + d * ((rand.nextFloat() - 0.5D) / 4); } - private void ricochet(int sideHit) - { - switch (sideHit) + private void ricochet(EnumFacing sideHit) + { + if(sideHit.getFrontOffsetX() != 0) { - case 0: - case 1: - // topHit, bottomHit, reflect Y - motionY = motionY * -1; - break; - - case 2: - case 3: - // westHit, eastHit, reflect Z - motionZ = motionZ * -1; - break; - - case 4: - case 5: - // southHit, northHit, reflect X - motionX = motionX * -1; - break; + motionX *= -1; + } + + if(sideHit.getFrontOffsetY() != 0) + { + motionY *= -1; + } + + if(sideHit.getFrontOffsetZ() != 0) + { + motionZ *= -1; } ricochetCounter++; @@ -472,32 +441,33 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil for (int particles = 0; particles < 4; particles++) { - switch (sideHit) - { - case 0: - worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), -gaussian(0.1D), gaussian(0.1D)); - break; - - case 1: - worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); - break; - - case 2: - worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), -gaussian(0.1D)); - break; - - case 3: - worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); - break; - - case 4: - worldObj.spawnParticle("smoke", posX, posY, posZ, -gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); - break; - - case 5: - worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); - break; - } + worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); +// switch (sideHit) +// { +// case 0: +// worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), -gaussian(0.1D), gaussian(0.1D)); +// break; +// +// case 1: +// worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); +// break; +// +// case 2: +// worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), -gaussian(0.1D)); +// break; +// +// case 3: +// worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); +// break; +// +// case 4: +// worldObj.spawnParticle("smoke", posX, posY, posZ, -gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); +// break; +// +// case 5: +// worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); +// break; +// } } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java index 2307236c..9b234851 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java @@ -74,7 +74,7 @@ public class EntityMeteor extends EnergyBlastProjectile this.onImpact(mop.entityHit); } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - MeteorRegistry.createMeteorImpact(worldObj, mop.blockX, mop.blockY, mop.blockZ, this.meteorID, new boolean[]{hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae}); + MeteorRegistry.createMeteorImpact(worldObj, mop.func_178782_a(), this.meteorID, new boolean[]{hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae}); } this.setDead(); @@ -83,7 +83,7 @@ public class EntityMeteor extends EnergyBlastProjectile @Override public void onImpact(Entity mop) { - MeteorRegistry.createMeteorImpact(worldObj, (int) this.posX, (int) this.posY, (int) this.posZ, meteorID, new boolean[]{hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae}); + MeteorRegistry.createMeteorImpact(worldObj, this.getPosition(), meteorID, new boolean[]{hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae}); this.setDead(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityParticleBeam.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityParticleBeam.java index 88c92ad2..e2a0ba8e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityParticleBeam.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityParticleBeam.java @@ -1,18 +1,17 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; -import cpw.mods.fml.client.FMLClientHandler; -import cpw.mods.fml.common.registry.IThrowableEntity; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.particle.EntityCloudFX; -import net.minecraft.client.particle.EntityFX; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IProjectile; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MathHelper; import net.minecraft.world.World; +import net.minecraftforge.fml.common.registry.IThrowableEntity; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; //Shamelessly ripped off from x3n0ph0b3 public class EntityParticleBeam extends Entity implements IProjectile, IThrowableEntity @@ -51,7 +50,6 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl super(par1World); this.setSize(0.5F, 0.5F); this.setPosition(par2, par4, par6); - yOffset = 0.0F; this.maxTicksInAir = 600; } @@ -66,7 +64,6 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl posY -= 0.2D; posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; this.setPosition(posX, posY, posZ); - yOffset = 0.0F; motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); @@ -86,7 +83,6 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl posY -= 0.2D; posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; this.setPosition(posX, posY, posZ); - yOffset = 0.0F; motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); @@ -102,7 +98,7 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl this.shootingEntity = par2EntityLivingBase; this.posY = par2EntityLivingBase.posY + (double) par2EntityLivingBase.getEyeHeight() - 0.10000000149011612D; double d0 = par3EntityLivingBase.posX - par2EntityLivingBase.posX; - double d1 = par3EntityLivingBase.boundingBox.minY + (double) (par3EntityLivingBase.height / 1.5F) - this.posY; + double d1 = par3EntityLivingBase.getBoundingBox().minY + (double) (par3EntityLivingBase.height / 1.5F) - this.posY; double d2 = par3EntityLivingBase.posZ - par2EntityLivingBase.posZ; double d3 = (double) MathHelper.sqrt_double(d0 * d0 + d2 * d2); @@ -113,7 +109,6 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl double d4 = d0 / d3; double d5 = d2 / d3; this.setLocationAndAngles(par2EntityLivingBase.posX + d4, this.posY, par2EntityLivingBase.posZ + d5, f2, f3); - this.yOffset = 0.0F; float f4 = (float) d3 * 0.2F; this.setThrowableHeading(d0, d1, d2, par4, par5); } @@ -153,18 +148,6 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl prevRotationPitch = rotationPitch = (float) (Math.atan2(var3, var10) * 180.0D / Math.PI); } - @Override - @SideOnly(Side.CLIENT) - /** - * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, - * posY, posZ, yaw, pitch - */ - public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) - { - this.setPosition(par1, par3, par5); - this.setRotation(par7, par8); - } - @Override @SideOnly(Side.CLIENT) /** @@ -225,9 +208,11 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl { return; } - EntityFX particle = new EntityCloudFX(worldObj, posX, posY, posZ, 0, 0, 0); - particle.setRBGColorF(colourRed + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()), colourGreen + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()), colourBlue + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat())); - FMLClientHandler.instance().getClient().effectRenderer.addEffect(particle); + + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); +// EntityFX particle = new EntityCloudFX(worldObj, posX, posY, posZ, 0, 0, 0); +// particle.setRBGColorF(colourRed + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()), colourGreen + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()), colourBlue + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat())); +// FMLClientHandler.instance().getClient().effectRenderer.addEffect(particle); } /** @@ -282,21 +267,6 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl return false; } - @Override - @SideOnly(Side.CLIENT) - public float getShadowSize() - { - return 0.0F; - } - - protected void spawnHitParticles(String string, int i) - { - for (int particles = 0; particles < i; particles++) - { - worldObj.spawnParticle(string, posX, posY - (string == "portal" ? 1 : 0), posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); - } - } - public DamageSource getDamageSource() { return DamageSource.causeMobDamage(shootingEntity); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/ExplosionProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/ExplosionProjectile.java index 24c6af9b..6ab68863 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/ExplosionProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/ExplosionProjectile.java @@ -4,6 +4,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -81,15 +82,15 @@ public class ExplosionProjectile extends EnergyBlastProjectile } } - spawnHitParticles("magicCrit", 8); + spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); this.setDead(); } @Override public void doFiringParticles() { - worldObj.spawnParticle("mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - worldObj.spawnParticle("explode", posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); + worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + worldObj.spawnParticle(EnumParticleTypes.EXPLOSION_LARGE, posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java index ba8f3041..f01f4812 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java @@ -4,7 +4,9 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Blocks; import net.minecraft.potion.Potion; +import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -60,9 +62,10 @@ public class FireProjectile extends EnergyBlastProjectile { for (int k = -1; k <= 1; k++) { - if (worldObj.isAirBlock((int) this.posX + i, (int) this.posY + j, (int) this.posZ + k)) + BlockPos newPos = new BlockPos(this.posX + i, this.posY + j, this.posZ + k); + if (worldObj.isAirBlock(newPos)) { - worldObj.setBlock((int) this.posX + i, (int) this.posY + j, (int) this.posZ + k, Blocks.fire); + worldObj.setBlockState(newPos, Blocks.fire.getDefaultState()); } } } @@ -97,12 +100,13 @@ public class FireProjectile extends EnergyBlastProjectile } } - if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ)) + BlockPos newPos = new BlockPos(this.posX, this.posY, this.posZ); + if (worldObj.isAirBlock(newPos)) { - worldObj.setBlock((int) this.posX, (int) this.posY, (int) this.posZ, Blocks.fire); + worldObj.setBlockState(newPos, Blocks.fire.getDefaultState()); } - spawnHitParticles("magicCrit", 8); + spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); this.setDead(); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java index 2497c43e..24fb77fa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java @@ -4,6 +4,7 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -79,14 +80,14 @@ public class HolyProjectile extends EnergyBlastProjectile } } - spawnHitParticles("magicCrit", 8); + spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); this.setDead(); } @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpell", posX, posY, posZ, 1.0F, 1.0F, 1.0F); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, posX, posY, posZ, 1.0F, 1.0F, 1.0F); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java index 247a6dd3..29d44965 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java @@ -5,6 +5,7 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; @@ -82,19 +83,14 @@ public class IceProjectile extends EnergyBlastProjectile } } - if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ)) - { - //worldObj.setBlock((int)this.posX, (int)this.posY, (int)this.posZ,Block.fire.blockID); - } - - spawnHitParticles("magicCrit", 8); + spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); this.setDead(); } @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "explode", posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.EXPLOSION_LARGE, posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java index 3273cf11..f936106f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java @@ -6,6 +6,7 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -83,15 +84,15 @@ public class LightningBoltProjectile extends EnergyBlastProjectile } } - spawnHitParticles("magicCrit", 8); + spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); this.setDead(); } @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpell", posX, posY, posZ, 1.0F, 1.0F, 1.0F); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, posX, posY, posZ, 1.0F, 1.0F, 1.0F); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java index 3d6ba693..938a94c8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java @@ -7,6 +7,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -87,15 +88,15 @@ public class MudProjectile extends EnergyBlastProjectile } } - spawnHitParticles("magicCrit", 8); + spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); this.setDead(); } @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpell", posX, posY, posZ, 0.5F, 0.297F, 0.0664F); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, posX, posY, posZ, 0.5F, 0.297F, 0.0664F); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java index 5e6a0d77..6ed6d1a2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java @@ -7,6 +7,7 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; @@ -131,15 +132,15 @@ public class TeleportProjectile extends EnergyBlastProjectile } } - spawnHitParticles("magicCrit", 8); + spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); this.setDead(); } @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "portal", posX, posY, posZ, -motionX, -motionY, -motionZ); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.PORTAL, posX, posY, posZ, -motionX, -motionY, -motionZ); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java index aa5c24f0..d76b227b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java @@ -6,6 +6,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -77,14 +78,14 @@ public class WaterProjectile extends EnergyBlastProjectile } } - spawnHitParticles("magicCrit", 8); + spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); this.setDead(); } @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "portal", posX, posY, posZ, -motionX, -motionY, -motionZ); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.PORTAL, posX, posY, posZ, -motionX, -motionY, -motionZ); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java index d04c27c2..59562027 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java @@ -4,6 +4,7 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -74,14 +75,14 @@ public class WindGustProjectile extends EnergyBlastProjectile } } - spawnHitParticles("magicCrit", 8); + spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); this.setDead(); } @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), "mobSpell", posX, posY, posZ, 1.0F, 1.0F, 1.0F); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, posX, posY, posZ, 1.0F, 1.0F, 1.0F); } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java index c6c1f305..23bcef7b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java @@ -3,26 +3,24 @@ package WayofTime.alchemicalWizardry.common.items.armour; import java.util.List; import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumAction; -import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.potion.Potion; import net.minecraft.util.DamageSource; -import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.ISpecialArmor; import net.minecraftforge.common.util.Constants; -import thaumcraft.api.IGoggles; -import thaumcraft.api.IRunicArmor; -import thaumcraft.api.nodes.IRevealer; +import net.minecraftforge.fml.common.Optional; +import net.minecraftforge.fml.common.Optional.Interface; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles; @@ -32,23 +30,12 @@ import WayofTime.alchemicalWizardry.api.items.interfaces.ILPGauge; import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.items.sigil.SigilDivination; import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaArmour; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.Optional.Interface; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; @Optional.InterfaceList(value = {@Interface(iface = "thaumcraft.api.nodes.IRevealer", modid = "Thaumcraft"), @Interface(iface = "thaumcraft.api.IGoggles", modid = "Thaumcraft"), @Interface(iface = "thaumcraft.api.IRunicArmor", modid = "Thaumcraft")}) -public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialArmor, IBindable, IRevealer, IGoggles, IRunicArmor, ILPGauge +public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialArmor, IBindable, ILPGauge//, IRevealer, IGoggles, IRunicArmor { private static int invSize = 9; @SideOnly(Side.CLIENT) - private IIcon helmetIcon; - @SideOnly(Side.CLIENT) - private IIcon plateIcon; - @SideOnly(Side.CLIENT) - private IIcon leggingsIcon; - @SideOnly(Side.CLIENT) - private IIcon bootsIcon; public static boolean tryComplexRendering = true; @@ -109,10 +96,10 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA if (((EntityPlayer) entityLiving).getItemInUseDuration() > 0) { EnumAction enumaction = ((EntityPlayer) entityLiving).getItemInUse().getItemUseAction(); - if (enumaction == EnumAction.block) + if (enumaction == EnumAction.BLOCK) { this.model.heldItemRight = 3; - } else if (enumaction == EnumAction.bow) + } else if (enumaction == EnumAction.BOW) { this.model.aimedBow = true; } @@ -128,44 +115,6 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA } } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); - this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundHelmet"); - this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundPlate"); - this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundLeggings"); - this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundBoots"); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) - { - if (this.equals(ModItems.boundHelmet)) - { - return this.helmetIcon; - } - - if (this.equals(ModItems.boundPlate)) - { - return this.plateIcon; - } - - if (this.equals(ModItems.boundLeggings)) - { - return this.leggingsIcon; - } - - if (this.equals(ModItems.boundBoots)) - { - return this.bootsIcon; - } - - return this.itemIcon; - } - @Override public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) { @@ -594,66 +543,66 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA return false; } - @Optional.Method(modid = "Thaumcraft") - public boolean hasIRevealer(ItemStack itemStack) - { - ItemStack[] inv = getInternalInventory(itemStack); - - if (inv == null) - { - return false; - } - - for (ItemStack item : inv) - { - if (item == null) - { - continue; - } - - if (item.getItem() instanceof IRevealer) - { - return true; - } - } - - return false; - } - - @Optional.Method(modid = "Thaumcraft") - public boolean hasIGoggles(ItemStack itemStack) - { - ItemStack[] inv = getInternalInventory(itemStack); - - if (inv == null) - { - return false; - } - - int blood = getMaxBloodShardLevel(itemStack); - - for (ItemStack item : inv) - { - if (item == null) - { - continue; - } - if (item.getItem() instanceof ArmourUpgrade && blood > 0) - { - if (item.getItem() instanceof IGoggles) - { - return true; - } - - if(((ArmourUpgrade)item.getItem()).isUpgrade()) - { - blood--; - } - } - } - - return false; - } +// @Optional.Method(modid = "Thaumcraft") +// public boolean hasIRevealer(ItemStack itemStack) +// { +// ItemStack[] inv = getInternalInventory(itemStack); +// +// if (inv == null) +// { +// return false; +// } +// +// for (ItemStack item : inv) +// { +// if (item == null) +// { +// continue; +// } +// +// if (item.getItem() instanceof IRevealer) +// { +// return true; +// } +// } +// +// return false; +// } +// +// @Optional.Method(modid = "Thaumcraft") +// public boolean hasIGoggles(ItemStack itemStack) +// { +// ItemStack[] inv = getInternalInventory(itemStack); +// +// if (inv == null) +// { +// return false; +// } +// +// int blood = getMaxBloodShardLevel(itemStack); +// +// for (ItemStack item : inv) +// { +// if (item == null) +// { +// continue; +// } +// if (item.getItem() instanceof ArmourUpgrade && blood > 0) +// { +// if (item.getItem() instanceof IGoggles) +// { +// return true; +// } +// +// if(((ArmourUpgrade)item.getItem()).isUpgrade()) +// { +// blood--; +// } +// } +// } +// +// return false; +// } @Override public boolean canSeeLPBar(ItemStack itemStack) @@ -783,75 +732,75 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA tag.setBoolean("invisible", invisible); } - @Override - @Optional.Method(modid = "Thaumcraft") - public boolean showNodes(ItemStack itemstack, EntityLivingBase player) - { - return this.hasIRevealer(itemstack); - } - - @Override - @Optional.Method(modid = "Thaumcraft") - public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) - { - return this.hasIGoggles(itemstack); - } - - @Override - @Optional.Method(modid = "Thaumcraft") - public int getRunicCharge(ItemStack itemstack) - { - ItemStack[] inv = this.getInternalInventory(itemstack); - int shardLevel = this.getMaxBloodShardLevel(itemstack); - int count = 0; - int harden = 0; - - if (inv == null) - { - return 0; - } - - for (ItemStack stack : inv) - { - if (count >= shardLevel) - { - break; - } - - if (stack == null || !(stack.getItem() instanceof ArmourUpgrade)) - { - continue; - } - - if (stack.getItem() instanceof ItemArmor && ((ItemArmor) stack.getItem()).armorType != this.armorType) - { - continue; - } - - if (stack.hasTagCompound()) - { - NBTTagCompound tag = stack.getTagCompound(); - - int enchLvl = tag.getByte("RS.HARDEN"); - - if (stack.getItem() instanceof IRunicArmor) - { - enchLvl += ((IRunicArmor) stack.getItem()).getRunicCharge(stack); - } - - if (enchLvl > 0) - { - harden += enchLvl; - if (((ArmourUpgrade) stack.getItem()).isUpgrade()) - { - count += 1; - } - } - } - } - - return harden; - } +// @Override +// @Optional.Method(modid = "Thaumcraft") +// public boolean showNodes(ItemStack itemstack, EntityLivingBase player) +// { +// return this.hasIRevealer(itemstack); +// } +// +// @Override +// @Optional.Method(modid = "Thaumcraft") +// public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) +// { +// return this.hasIGoggles(itemstack); +// } +// +// @Override +// @Optional.Method(modid = "Thaumcraft") +// public int getRunicCharge(ItemStack itemstack) +// { +// ItemStack[] inv = this.getInternalInventory(itemstack); +// int shardLevel = this.getMaxBloodShardLevel(itemstack); +// int count = 0; +// int harden = 0; +// +// if (inv == null) +// { +// return 0; +// } +// +// for (ItemStack stack : inv) +// { +// if (count >= shardLevel) +// { +// break; +// } +// +// if (stack == null || !(stack.getItem() instanceof ArmourUpgrade)) +// { +// continue; +// } +// +// if (stack.getItem() instanceof ItemArmor && ((ItemArmor) stack.getItem()).armorType != this.armorType) +// { +// continue; +// } +// +// if (stack.hasTagCompound()) +// { +// NBTTagCompound tag = stack.getTagCompound(); +// +// int enchLvl = tag.getByte("RS.HARDEN"); +// +// if (stack.getItem() instanceof IRunicArmor) +// { +// enchLvl += ((IRunicArmor) stack.getItem()).getRunicCharge(stack); +// } +// +// if (enchLvl > 0) +// { +// harden += enchLvl; +// if (((ArmourUpgrade) stack.getItem()).isUpgrade()) +// { +// count += 1; +// } +// } +// } +// } +// +// return harden; +// } @Override public boolean showIngameHUD(World world, ItemStack stack, EntityPlayer player) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java index ca292038..fb8bdc9c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java @@ -20,15 +20,16 @@ import net.minecraft.item.EnumAction; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public abstract class OmegaArmour extends BoundArmour { @@ -90,10 +91,9 @@ public abstract class OmegaArmour extends BoundArmour { if(this.storeBiomeID()) { - int xCoord = (int) Math.floor(player.posX); - int zCoord = (int) Math.floor(player.posZ); + BlockPos pos = player.getPosition(); - BiomeGenBase biome = world.getBiomeGenForCoords(xCoord, zCoord); + BiomeGenBase biome = world.getBiomeGenForCoords(pos); if(biome != null) { this.setBiomeIDStored(itemStack, biome.biomeID); @@ -376,10 +376,10 @@ public abstract class OmegaArmour extends BoundArmour if (((EntityPlayer) entityLiving).getItemInUseDuration() > 0) { EnumAction enumaction = ((EntityPlayer) entityLiving).getItemInUse().getItemUseAction(); - if (enumaction == EnumAction.block) + if (enumaction == EnumAction.BLOCK) { this.model.heldItemRight = 3; - } else if (enumaction == EnumAction.bow) + } else if (enumaction == EnumAction.BOW) { this.model.aimedBow = true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourEarth.java index a60bd254..41545359 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourEarth.java @@ -3,32 +3,19 @@ package WayofTime.alchemicalWizardry.common.items.armour; import java.util.UUID; import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import WayofTime.alchemicalWizardry.ModItems; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaEarth; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - public class OmegaArmourEarth extends OmegaArmour -{ - @SideOnly(Side.CLIENT) - private IIcon helmetIcon; - @SideOnly(Side.CLIENT) - private IIcon plateIcon; - @SideOnly(Side.CLIENT) - private IIcon leggingsIcon; - @SideOnly(Side.CLIENT) - private IIcon bootsIcon; - +{ public OmegaArmourEarth(int armorType) { super(armorType); @@ -55,44 +42,6 @@ public class OmegaArmourEarth extends OmegaArmour return new ModelOmegaEarth(0.5f, false, false, true, false); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); - this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaHelmet_earth"); - this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaPlate_earth"); - this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaLeggings_earth"); - this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaBoots_earth"); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) - { - if (this.equals(ModItems.boundHelmetEarth)) - { - return this.helmetIcon; - } - - if (this.equals(ModItems.boundPlateEarth)) - { - return this.plateIcon; - } - - if (this.equals(ModItems.boundLeggingsEarth)) - { - return this.leggingsIcon; - } - - if (this.equals(ModItems.boundBootsEarth)) - { - return this.bootsIcon; - } - - return this.itemIcon; - } - @Override public Multimap getAttributeModifiers(ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourFire.java index 2f9d6825..eabc089b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourFire.java @@ -2,34 +2,22 @@ package WayofTime.alchemicalWizardry.common.items.armour; import java.util.UUID; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.Entity; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraft.world.biome.BiomeGenBase; -import WayofTime.alchemicalWizardry.ModItems; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaFire; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; public class OmegaArmourFire extends OmegaArmour -{ - @SideOnly(Side.CLIENT) - private IIcon helmetIcon; - @SideOnly(Side.CLIENT) - private IIcon plateIcon; - @SideOnly(Side.CLIENT) - private IIcon leggingsIcon; - @SideOnly(Side.CLIENT) - private IIcon bootsIcon; - +{ public OmegaArmourFire(int armorType) { super(armorType); @@ -57,44 +45,6 @@ public class OmegaArmourFire extends OmegaArmour return new ModelOmegaFire(0.5f, false, false, true, false); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); - this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaHelmet_fire"); - this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaPlate_fire"); - this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaLeggings_fire"); - this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaBoots_fire"); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) - { - if (this.equals(ModItems.boundHelmetFire)) - { - return this.helmetIcon; - } - - if (this.equals(ModItems.boundPlateFire)) - { - return this.plateIcon; - } - - if (this.equals(ModItems.boundLeggingsFire)) - { - return this.leggingsIcon; - } - - if (this.equals(ModItems.boundBootsFire)) - { - return this.bootsIcon; - } - - return this.itemIcon; - } - @Override public Multimap getAttributeModifiers(ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWater.java index 6afb527a..0ef14b4f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWater.java @@ -2,33 +2,21 @@ package WayofTime.alchemicalWizardry.common.items.armour; import java.util.UUID; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraft.world.biome.BiomeGenBase; -import WayofTime.alchemicalWizardry.ModItems; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWater; +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; + public class OmegaArmourWater extends OmegaArmour -{ - @SideOnly(Side.CLIENT) - private IIcon helmetIcon; - @SideOnly(Side.CLIENT) - private IIcon plateIcon; - @SideOnly(Side.CLIENT) - private IIcon leggingsIcon; - @SideOnly(Side.CLIENT) - private IIcon bootsIcon; - +{ public OmegaArmourWater(int armorType) { super(armorType); @@ -55,44 +43,6 @@ public class OmegaArmourWater extends OmegaArmour return new ModelOmegaWater(0.5f, false, false, true, false); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); - this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaHelmet_water"); - this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaPlate_water"); - this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaLeggings_water"); - this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaBoots_water"); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) - { - if (this.equals(ModItems.boundHelmetWater)) - { - return this.helmetIcon; - } - - if (this.equals(ModItems.boundPlateWater)) - { - return this.plateIcon; - } - - if (this.equals(ModItems.boundLeggingsWater)) - { - return this.leggingsIcon; - } - - if (this.equals(ModItems.boundBootsWater)) - { - return this.bootsIcon; - } - - return this.itemIcon; - } - @Override public Multimap getAttributeModifiers(ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWind.java index 1048d1c4..47408e50 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWind.java @@ -3,32 +3,19 @@ package WayofTime.alchemicalWizardry.common.items.armour; import java.util.UUID; import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import WayofTime.alchemicalWizardry.ModItems; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWind; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - public class OmegaArmourWind extends OmegaArmour -{ - @SideOnly(Side.CLIENT) - private IIcon helmetIcon; - @SideOnly(Side.CLIENT) - private IIcon plateIcon; - @SideOnly(Side.CLIENT) - private IIcon leggingsIcon; - @SideOnly(Side.CLIENT) - private IIcon bootsIcon; - +{ public OmegaArmourWind(int armorType) { super(armorType); @@ -55,44 +42,6 @@ public class OmegaArmourWind extends OmegaArmour return new ModelOmegaWind(0.5f, false, false, true, false); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); - this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaHelmet_wind"); - this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaPlate_wind"); - this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaLeggings_wind"); - this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaBoots_wind"); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) - { - if (this.equals(ModItems.boundHelmetWind)) - { - return this.helmetIcon; - } - - if (this.equals(ModItems.boundPlateWind)) - { - return this.plateIcon; - } - - if (this.equals(ModItems.boundLeggingsWind)) - { - return this.leggingsIcon; - } - - if (this.equals(ModItems.boundBootsWind)) - { - return this.bootsIcon; - } - - return this.itemIcon; - } - @Override public Multimap getAttributeModifiers(ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemAttunedCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemAttunedCrystal.java index 87729e2a..fed941e1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemAttunedCrystal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemAttunedCrystal.java @@ -1,36 +1,34 @@ package WayofTime.alchemicalWizardry.common.items.energy; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.api.alchemy.energy.*; -import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; -import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.LinkedList; +import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.ChatComponentTranslation; -import net.minecraft.util.IIcon; +import net.minecraft.util.EnumFacing; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -import java.util.LinkedList; -import java.util.List; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; +import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; +import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; public class ItemAttunedCrystal extends Item implements IReagentManipulator { public static final int maxDistance = 6; - - public IIcon crystalBody; - public IIcon crystalLabel; - + public ItemAttunedCrystal() { super(); @@ -78,62 +76,6 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator } } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.crystalBody = iconRegister.registerIcon("AlchemicalWizardry:AttunedCrystal1"); - this.crystalLabel = iconRegister.registerIcon("AlchemicalWizardry:AttunedCrystal2"); - } - - @Override - @SideOnly(Side.CLIENT) - public int getColorFromItemStack(ItemStack stack, int pass) - { - switch (pass) - { - case 0: - return 256 * (256 * 255 + 255) + 255; - case 1: - Reagent reagent = this.getReagent(stack); - if (reagent != null) - { - return (reagent.getColourRed() * 256 * 256 + reagent.getColourGreen() * 256 + reagent.getColourBlue()); - } - break; - } - - return 256 * (256 * 255 + 255) + 255; - } - - @Override - @SideOnly(Side.CLIENT) - public boolean requiresMultipleRenderPasses() - { - return true; - } - - @Override - @SideOnly(Side.CLIENT) - public int getRenderPasses(int meta) - { - return 2; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass) - { - switch (pass) - { - case 0: - return this.crystalBody; - case 1: - return this.crystalLabel; - } - return this.itemIcon; - } - @Override public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { @@ -157,11 +99,9 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - int x = movingobjectposition.blockX; - int y = movingobjectposition.blockY; - int z = movingobjectposition.blockZ; + BlockPos pos = movingobjectposition.func_178782_a(); - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); if (!(tile instanceof IReagentHandler)) { @@ -172,7 +112,7 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator if (player.isSneaking()) { - ReagentContainerInfo[] infos = relay.getContainerInfo(ForgeDirection.UNKNOWN); + ReagentContainerInfo[] infos = relay.getContainerInfo(EnumFacing.UP); if (infos != null) { List<Reagent> reagentList = new LinkedList(); @@ -223,13 +163,13 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator return itemStack; } - if (dimension != world.provider.getDimensionId() || Math.abs(coords.xCoord - x) > maxDistance || Math.abs(coords.yCoord - y) > maxDistance || Math.abs(coords.zCoord - z) > maxDistance) + if (dimension != world.provider.getDimensionId() || Math.abs(coords.xCoord - pos.getX()) > maxDistance || Math.abs(coords.yCoord - pos.getY()) > maxDistance || Math.abs(coords.zCoord - pos.getZ()) > maxDistance) { player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.error.toofar")); return itemStack; } - TileEntity pastTile = world.getTileEntity(coords.xCoord, coords.yCoord, coords.zCoord); + TileEntity pastTile = world.getTileEntity(new BlockPos(coords.xCoord, coords.yCoord, coords.zCoord)); if (!(pastTile instanceof TEReagentConduit)) { player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.error.cannotfind")); @@ -247,10 +187,10 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator if (player.isSneaking()) { - pastRelay.removeReagentDestinationViaActual(reagent, x, y, z); + pastRelay.removeReagentDestinationViaActual(reagent, pos); } else { - if (pastRelay.addReagentDestinationViaActual(reagent, x, y, z)) + if (pastRelay.addReagentDestinationViaActual(reagent, pos)) { player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("message.attunedcrystal.linked") + " " + reagent.name)); } else @@ -258,13 +198,13 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.error.noconnections")); } } - world.markBlockForUpdate(coords.xCoord, coords.yCoord, coords.zCoord); + world.markBlockForUpdate(new BlockPos(coords.xCoord, coords.yCoord, coords.zCoord)); } else { int dimension = world.provider.getDimensionId(); this.setDimension(itemStack, dimension); - this.setCoordinates(itemStack, new Int3(x, y, z)); + this.setCoordinates(itemStack, new Int3(pos)); player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.linking")); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemDestinationClearer.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemDestinationClearer.java index d4642a7f..5ea4e85c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemDestinationClearer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemDestinationClearer.java @@ -1,21 +1,19 @@ package WayofTime.alchemicalWizardry.common.items.energy; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; -import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentTranslation; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.StatCollector; import net.minecraft.world.World; - -import java.util.List; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; +import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; public class ItemDestinationClearer extends Item implements IReagentManipulator { @@ -26,13 +24,6 @@ public class ItemDestinationClearer extends Item implements IReagentManipulator this.maxStackSize = 1; } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:TankClearer"); - } - @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { @@ -57,11 +48,9 @@ public class ItemDestinationClearer extends Item implements IReagentManipulator { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - int x = movingobjectposition.blockX; - int y = movingobjectposition.blockY; - int z = movingobjectposition.blockZ; + BlockPos pos = movingobjectposition.func_178782_a(); - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); if (!(tile instanceof TEReagentConduit)) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemTankSegmenter.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemTankSegmenter.java index 83bbbd6b..19e02a18 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemTankSegmenter.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemTankSegmenter.java @@ -1,33 +1,29 @@ package WayofTime.alchemicalWizardry.common.items.energy; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.*; -import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.LinkedList; +import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; -import net.minecraft.util.IIcon; +import net.minecraft.util.EnumFacing; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -import java.util.LinkedList; -import java.util.List; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ISegmentedReagentHandler; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; +import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; public class ItemTankSegmenter extends Item implements IReagentManipulator { - @SideOnly(Side.CLIENT) - public IIcon crystalBody; - @SideOnly(Side.CLIENT) - public IIcon crystalLabel; - public ItemTankSegmenter() { super(); @@ -64,62 +60,6 @@ public class ItemTankSegmenter extends Item implements IReagentManipulator } } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.crystalBody = iconRegister.registerIcon("AlchemicalWizardry:TankSegmenter1"); - this.crystalLabel = iconRegister.registerIcon("AlchemicalWizardry:TankSegmenter2"); - } - - @Override - @SideOnly(Side.CLIENT) - public int getColorFromItemStack(ItemStack stack, int pass) - { - switch (pass) - { - case 0: - return 256 * (256 * 255 + 255) + 255; - case 1: - Reagent reagent = this.getReagent(stack); - if (reagent != null) - { - return (reagent.getColourRed() * 256 * 256 + reagent.getColourGreen() * 256 + reagent.getColourBlue()); - } - break; - } - - return 256 * (256 * 255 + 255) + 255; - } - - @Override - @SideOnly(Side.CLIENT) - public boolean requiresMultipleRenderPasses() - { - return true; - } - - @Override - @SideOnly(Side.CLIENT) - public int getRenderPasses(int meta) - { - return 2; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass) - { - switch (pass) - { - case 0: - return this.crystalBody; - case 1: - return this.crystalLabel; - } - return this.itemIcon; - } - @Override public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { @@ -136,10 +76,8 @@ public class ItemTankSegmenter extends Item implements IReagentManipulator { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - int x = movingobjectposition.blockX; - int y = movingobjectposition.blockY; - int z = movingobjectposition.blockZ; - TileEntity tile = world.getTileEntity(x, y, z); + BlockPos pos = movingobjectposition.func_178782_a(); + TileEntity tile = world.getTileEntity(pos); if (!(tile instanceof ISegmentedReagentHandler)) { return itemStack; @@ -148,7 +86,7 @@ public class ItemTankSegmenter extends Item implements IReagentManipulator if (player.isSneaking()) { - ReagentContainerInfo[] infos = reagentHandler.getContainerInfo(ForgeDirection.UNKNOWN); + ReagentContainerInfo[] infos = reagentHandler.getContainerInfo(EnumFacing.UP); if (infos != null) { List<Reagent> reagentList = new LinkedList(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java index 27ac77f7..520db9fd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper; -import com.google.common.collect.HashMultimap; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.entity.ai.attributes.IAttribute; @@ -23,12 +23,10 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; +import com.google.common.collect.HashMultimap; public class AlchemyFlask extends Item { @@ -40,13 +38,6 @@ public class AlchemyFlask extends Item setCreativeTab(AlchemicalWizardry.tabBloodMagic); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:PotionFlask"); - } - public static ArrayList<AlchemyPotionHelper> getEffects(ItemStack par1ItemStack) { if (par1ItemStack.hasTagCompound() && par1ItemStack.getTagCompound().hasKey("CustomFlaskEffects")) @@ -149,10 +140,10 @@ public class AlchemyFlask extends Item { if (this.isPotionThrowable(par1ItemStack)) { - return EnumAction.none; + return EnumAction.NONE; } - return EnumAction.drink; + return EnumAction.DRINK; } /** @@ -283,7 +274,7 @@ public class AlchemyFlask extends Item PotionEffect potioneffect = (PotionEffect) iterator.next(); String s = StatCollector.translateToLocal(potioneffect.getEffectName()).trim(); Potion potion = Potion.potionTypes[potioneffect.getPotionID()]; - Map map = potion.func_111186_k(); + Map map = potion.getAttributeModifierMap(); if (map != null && map.size() > 0) { @@ -293,7 +284,7 @@ public class AlchemyFlask extends Item { Entry entry = (Entry) iterator1.next(); AttributeModifier attributemodifier = (AttributeModifier) entry.getValue(); - AttributeModifier attributemodifier1 = new AttributeModifier(attributemodifier.getName(), potion.func_111183_a(potioneffect.getAmplifier(), attributemodifier), attributemodifier.getOperation()); + AttributeModifier attributemodifier1 = new AttributeModifier(attributemodifier.getName(), potion.getAttributeModifierAmount(potioneffect.getAmplifier(), attributemodifier), attributemodifier.getOperation()); hashmultimap.put(((IAttribute) entry.getKey()).getAttributeUnlocalizedName(), attributemodifier1); } } @@ -345,11 +336,11 @@ public class AlchemyFlask extends Item if (d0 > 0.0D) { - par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocalFormatted("attribute.modifier.plus." + attributemodifier2.getOperation(), new Object[]{ItemStack.field_111284_a.format(d1), StatCollector.translateToLocal("attribute.name." + (String) entry1.getKey())})); + par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocalFormatted("attribute.modifier.plus." + attributemodifier2.getOperation(), new Object[]{ItemStack.DECIMALFORMAT.format(d1), StatCollector.translateToLocal("attribute.name." + (String) entry1.getKey())})); } else if (d0 < 0.0D) { d1 *= -1.0D; - par3List.add(EnumChatFormatting.RED + StatCollector.translateToLocalFormatted("attribute.modifier.take." + attributemodifier2.getOperation(), new Object[]{ItemStack.field_111284_a.format(d1), StatCollector.translateToLocal("attribute.name." + (String) entry1.getKey())})); + par3List.add(EnumChatFormatting.RED + StatCollector.translateToLocalFormatted("attribute.modifier.take." + attributemodifier2.getOperation(), new Object[]{ItemStack.DECIMALFORMAT.format(d1), StatCollector.translateToLocal("attribute.name." + (String) entry1.getKey())})); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java index 4f7caa72..4b856a08 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java @@ -1,19 +1,17 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; + import org.lwjgl.input.Keyboard; -import java.util.List; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; public class AlchemyReagent extends Item { @@ -24,61 +22,6 @@ public class AlchemyReagent extends Item this.setMaxStackSize(64); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - if (this == ModItems.incendium) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Incendium"); - return; - } - if (this == ModItems.magicales) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Magicales"); - return; - } - if (this == ModItems.sanctus) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Sanctus"); - return; - } - if (this == ModItems.aether) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Aether"); - return; - } - if (this == ModItems.simpleCatalyst) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SimpleCatalyst"); - return; - } - if (this == ModItems.crepitous) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Crepitous"); - return; - } - if (this == ModItems.crystallos) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Crystallos"); - return; - } - if (this == ModItems.terrae) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Terrae"); - return; - } - if (this == ModItems.aquasalus) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Aquasalus"); - return; - } - if (this == ModItems.tennebrae) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Tennebrae"); - } - } - @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java index eb7885dd..168c4897 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class AverageLengtheningCatalyst extends LengtheningCatalyst { @@ -10,11 +7,4 @@ public class AverageLengtheningCatalyst extends LengtheningCatalyst { super(2); } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:AverageLengtheningCatalyst"); - } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java index 1fb50aec..7ec8f7d6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class AveragePowerCatalyst extends PowerCatalyst { @@ -10,11 +7,4 @@ public class AveragePowerCatalyst extends PowerCatalyst { super(2); } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:AveragePowerCatalyst"); - } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/CombinationalCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/CombinationalCatalyst.java index 071d7c9b..543b313f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/CombinationalCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/CombinationalCatalyst.java @@ -1,11 +1,8 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import net.minecraft.item.Item; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.alchemy.ICombinationalCatalyst; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.Item; public class CombinationalCatalyst extends Item implements ICombinationalCatalyst { @@ -15,10 +12,4 @@ public class CombinationalCatalyst extends Item implements ICombinationalCatalys this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:CombinationalCatalyst"); - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java index b4026634..8d02cf07 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java @@ -1,9 +1,6 @@ package WayofTime.alchemicalWizardry.common.items.potion; import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class EnhancedFillingAgent extends WeakFillingAgent { @@ -41,11 +38,4 @@ public class EnhancedFillingAgent extends WeakFillingAgent } return 0; } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:EnhancedFillingAgent"); - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java index 32d0e599..ccafc906 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class GreaterLengtheningCatalyst extends LengtheningCatalyst { @@ -10,11 +7,4 @@ public class GreaterLengtheningCatalyst extends LengtheningCatalyst { super(3); } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:GreaterLengtheningCatalyst"); - } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java index 56dbe73f..c1967cb2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class GreaterPowerCatalyst extends PowerCatalyst { @@ -10,11 +7,4 @@ public class GreaterPowerCatalyst extends PowerCatalyst { super(3); } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:GreaterPowerCatalyst"); - } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java index 581a4575..ddfe0d02 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class MundaneLengtheningCatalyst extends LengtheningCatalyst { @@ -10,11 +7,4 @@ public class MundaneLengtheningCatalyst extends LengtheningCatalyst { super(1); } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:MundaneLengtheningCatalyst"); - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java index 0a85efbe..e25e8878 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class MundanePowerCatalyst extends PowerCatalyst { @@ -10,11 +7,4 @@ public class MundanePowerCatalyst extends PowerCatalyst { super(1); } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:MundanePowerCatalyst"); - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java index 8c963024..d3953953 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java @@ -1,19 +1,18 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -import WayofTime.alchemicalWizardry.common.IBindingAgent; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; + import org.lwjgl.input.Keyboard; -import java.util.List; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +import WayofTime.alchemicalWizardry.common.IBindingAgent; public class StandardBindingAgent extends Item implements IBindingAgent { @@ -29,13 +28,6 @@ public class StandardBindingAgent extends Item implements IBindingAgent return (float) Math.pow(0.65, potions); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:StandardBindingAgent"); - } - @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java index c0a93be4..44d8bc4a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java @@ -1,9 +1,6 @@ package WayofTime.alchemicalWizardry.common.items.potion; import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class StandardFillingAgent extends WeakFillingAgent { @@ -28,11 +25,4 @@ public class StandardFillingAgent extends WeakFillingAgent return 0; } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:StandardFillingAgent"); - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java index 86c941e5..b95591c6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; public class WeakBindingAgent extends StandardBindingAgent { @@ -16,11 +13,4 @@ public class WeakBindingAgent extends StandardBindingAgent { return (float) Math.pow(0.4, potions); } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WeakBindingAgent"); - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java index d65b9e1c..04155e3a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java @@ -1,20 +1,19 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -import WayofTime.alchemicalWizardry.common.IFillingAgent; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.List; +import java.util.Random; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; + import org.lwjgl.input.Keyboard; -import java.util.List; -import java.util.Random; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +import WayofTime.alchemicalWizardry.common.IFillingAgent; public class WeakFillingAgent extends Item implements IFillingAgent { @@ -48,13 +47,6 @@ public class WeakFillingAgent extends Item implements IFillingAgent return 0; } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WeakFillingAgent"); - } - @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java index eb0ce04e..96ee3421 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java @@ -1,8 +1,5 @@ package WayofTime.alchemicalWizardry.common.items.routing; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import codechicken.lib.render.TextureUtils.IIconRegister; public class InputRoutingFocus extends RoutingFocus { @@ -10,11 +7,4 @@ public class InputRoutingFocus extends RoutingFocus { super(); } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:InputRoutingFocus"); - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/OutputRoutingFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/OutputRoutingFocus.java index 22965e3d..4c2e323f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/OutputRoutingFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/OutputRoutingFocus.java @@ -2,30 +2,23 @@ package WayofTime.alchemicalWizardry.common.items.routing; import java.util.List; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitDefault; import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitGlobal; import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitIgnMeta; import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitMatchNBT; import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitModItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class OutputRoutingFocus extends RoutingFocus implements ILimitedRoutingFocus -{ - IIcon modItemIcon; - IIcon ignMetaIcon; - IIcon matchNBTIcon; - IIcon globalIcon; - +{ public OutputRoutingFocus() { super(); @@ -46,36 +39,6 @@ public class OutputRoutingFocus extends RoutingFocus implements ILimitedRoutingF } } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:OutputRoutingFocus"); - this.modItemIcon = iconRegister.registerIcon("AlchemicalWizardry:OutputRoutingFocusModItems"); - this.ignMetaIcon = iconRegister.registerIcon("AlchemicalWizardry:OutputRoutingFocusIgnMeta"); - this.matchNBTIcon = iconRegister.registerIcon("AlchemicalWizardry:OutputRoutingFocusMatchNBT"); - this.globalIcon = iconRegister.registerIcon("AlchemicalWizardry:OutputRoutingFocusGlobal"); - } - - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int damage) - { - switch(damage) - { - case 0: - return this.itemIcon; - case 1: - return this.modItemIcon; - case 2: - return this.ignMetaIcon; - case 3: - return this.matchNBTIcon; - case 4: - return this.globalIcon; - } - return this.itemIcon; - } - @Override public String getUnlocalizedName(ItemStack itemStack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java index d01f7316..b512434d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java @@ -7,14 +7,13 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.util.MathHelper; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import codechicken.lib.render.TextureUtils.IIconRegister; public class SigilOfHolding extends EnergyItems { @@ -30,51 +29,21 @@ public class SigilOfHolding extends EnergyItems } @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfHolding"); - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) - { - if (!(stack.getTagCompound() == null)) - { - ItemStack[] inv = getInternalInventory(stack); - - if (inv == null) - { - return this.itemIcon; - } - - ItemStack item = getCurrentSigil(stack); - - if (item != null) - { - return item.getIconIndex(); - } - } - - return this.itemIcon; - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) + public void addInformation(ItemStack stack, EntityPlayer player, List par3List, boolean par4) { par3List.add(StatCollector.translateToLocal("tooltip.sigilofholding.desc")); - if (!(par1ItemStack.getTagCompound() == null)) + if (!(stack.getTagCompound() == null)) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - ItemStack[] inv = getInternalInventory(par1ItemStack); + par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + stack.getTagCompound().getString("ownerName")); + ItemStack[] inv = getInternalInventory(stack); if (inv == null) { return; } - int currentSlot = getCurrentItem(par1ItemStack); + int currentSlot = getCurrentItem(stack); ItemStack item = inv[currentSlot]; if (item != null) @@ -93,12 +62,12 @@ public class SigilOfHolding extends EnergyItems } @Override - public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) { - if (checkAndSetItemOwner(par1ItemStack, par2EntityPlayer)) + if (checkAndSetItemOwner(stack, player)) { - int currentSlot = getCurrentItem(par1ItemStack); - ItemStack[] inv = getInternalInventory(par1ItemStack); + int currentSlot = getCurrentItem(stack); + ItemStack[] inv = getInternalInventory(stack); if (inv == null) { @@ -112,9 +81,9 @@ public class SigilOfHolding extends EnergyItems return false; } - boolean bool = itemUsed.getItem().onItemUse(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10); + boolean bool = itemUsed.getItem().onItemUse(stack, player, world, pos, side, hitX, hitY, hitZ); - saveInventory(par1ItemStack, inv); + saveInventory(stack, inv); return bool; } @@ -123,36 +92,36 @@ public class SigilOfHolding extends EnergyItems } @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + public ItemStack onItemRightClick(ItemStack stack, World par2World, EntityPlayer par3EntityPlayer) { - if (checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) + if (checkAndSetItemOwner(stack, par3EntityPlayer)) { if (par3EntityPlayer.isSneaking()) { - InventoryHolding.setUUID(par1ItemStack); + InventoryHolding.setUUID(stack); par3EntityPlayer.openGui(AlchemicalWizardry.instance, 3, par3EntityPlayer.worldObj, (int) par3EntityPlayer.posX, (int) par3EntityPlayer.posY, (int) par3EntityPlayer.posZ); - return par1ItemStack; + return stack; } - int currentSlot = getCurrentItem(par1ItemStack); - ItemStack[] inv = getInternalInventory(par1ItemStack); + int currentSlot = getCurrentItem(stack); + ItemStack[] inv = getInternalInventory(stack); if (inv == null) { - return par1ItemStack; + return stack; } ItemStack itemUsed = inv[currentSlot]; if (itemUsed == null) { - return par1ItemStack; + return stack; } itemUsed.getItem().onItemRightClick(itemUsed, par2World, par3EntityPlayer); - saveInventory(par1ItemStack, inv); + saveInventory(stack, inv); } - return par1ItemStack; + return stack; } public static int next(int mode) @@ -183,7 +152,7 @@ public class SigilOfHolding extends EnergyItems { if (itemStack.getTagCompound() == null) { - itemStack.getTagCompound() = new NBTTagCompound(); + itemStack.setTagCompound(new NBTTagCompound()); itemStack.getTagCompound().setInteger(NBT_CURRENT_SIGIL, invSize); } } @@ -283,17 +252,17 @@ public class SigilOfHolding extends EnergyItems } @Override - public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) + public void onUpdate(ItemStack stack, World par2World, Entity par3Entity, int par4, boolean par5) { - if (!(par1ItemStack.getTagCompound() == null)) + if (!(stack.getTagCompound() == null)) { - this.tickInternalInventory(par1ItemStack, par2World, par3Entity, par4, par5); + this.tickInternalInventory(stack, par2World, par3Entity, par4, par5); } } - public void tickInternalInventory(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) + public void tickInternalInventory(ItemStack stack, World par2World, Entity par3Entity, int par4, boolean par5) { - ItemStack[] inv = getInternalInventory(par1ItemStack); + ItemStack[] inv = getInternalInventory(stack); if (inv == null) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java index 1d8aabd1..65423c95 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java @@ -38,10 +38,8 @@ public class MeteorParadigm } } - public void createMeteorImpact(World world, int x, int y, int z, boolean[] flags) - { - BlockPos pos = new BlockPos(x, y, z); - + public void createMeteorImpact(World world, BlockPos pos, boolean[] flags) + { boolean hasTerrae = false; boolean hasOrbisTerrae = false; boolean hasCrystallos = false; @@ -70,7 +68,7 @@ public class MeteorParadigm chance += 100; } - world.createExplosion(null, x, y, z, newRadius * 4, AlchemicalWizardry.doMeteorsDestroyBlocks); + world.createExplosion(null, pos.getX(), pos.getY(), pos.getZ(), newRadius * 4, AlchemicalWizardry.doMeteorsDestroyBlocks); float iceChance = hasCrystallos ? 1 : 0; float soulChance = hasIncendium ? 1 : 0; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java index 7deedd38..1ed03f73 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java @@ -1,12 +1,13 @@ package WayofTime.alchemicalWizardry.common.summoning.meteor; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; - import java.util.ArrayList; import java.util.List; +import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.oredict.OreDictionary; + public class MeteorRegistry { public static List<MeteorParadigm> paradigmList = new ArrayList(); @@ -26,11 +27,11 @@ public class MeteorRegistry } } - public static void createMeteorImpact(World world, int x, int y, int z, int paradigmID, boolean[] flags) + public static void createMeteorImpact(World world, BlockPos pos, int paradigmID, boolean[] flags) { if (paradigmID < paradigmList.size()) { - paradigmList.get(paradigmID).createMeteorImpact(world, x, y, z, flags); + paradigmList.get(paradigmID).createMeteorImpact(world, pos, flags); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java index 7cabc726..6b74b1e9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java @@ -542,4 +542,14 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp return super.drain(from, resource, doDrain); } + + public void removeReagentDestinationViaActual(Reagent reagent, BlockPos pos) + { + this.removeReagentDestinationViaActual(reagent, pos.getX(), pos.getY(), pos.getZ()); + } + + public boolean addReagentDestinationViaActual(Reagent reagent, BlockPos pos) + { + return addReagentDestinationViaActual(reagent, pos.getX(), pos.getY(), pos.getZ()); + } } \ No newline at end of file From d0b15c29de2bcf01897cadd4e0b4fdeb46273c01 Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Thu, 30 Jul 2015 10:16:16 -0400 Subject: [PATCH 23/33] Made the Toggleable sigil to make it easier for toggle sigils. Will replace the NBT editing in the sigils. --- .../common/items/sigil/SigilOfWind.java | 74 +++---------------- .../common/items/sigil/SigilToggleable.java | 17 +++++ 2 files changed, 29 insertions(+), 62 deletions(-) create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilToggleable.java diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java index 71f8cf0b..729cc171 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java @@ -1,30 +1,21 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import java.util.List; + import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import java.util.List; - -public class SigilOfWind extends EnergyItems implements ArmourUpgrade, ISigil +public class SigilOfWind extends SigilToggleable implements ArmourUpgrade, ISigil { - @SideOnly(Side.CLIENT) - private IIcon activeIcon; - @SideOnly(Side.CLIENT) - private IIcon passiveIcon; - public SigilOfWind() { super(); @@ -40,7 +31,7 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade, ISigil if (!(par1ItemStack.getTagCompound() == null)) { - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -52,47 +43,6 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade, ISigil } } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WindSigil_deactivated"); - this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:WindSigil_activated"); - this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:WindSigil_deactivated"); - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) - { - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - if (tag.getBoolean("isActive")) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) - { - if (par1 == 1) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -107,13 +57,13 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade, ISigil } NBTTagCompound tag = par1ItemStack.getTagCompound(); - tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); + this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (this.getActivated(par1ItemStack) && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); - par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 2, 1)); + par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 2, 1, true, false)); } else { par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); @@ -148,7 +98,7 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade, ISigil { if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - par1ItemStack.getTagCompound().setBoolean("isActive", false); + this.setActivated(par1ItemStack, false); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilToggleable.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilToggleable.java new file mode 100644 index 00000000..2c5b9f53 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilToggleable.java @@ -0,0 +1,17 @@ +package WayofTime.alchemicalWizardry.common.items.sigil; + +import net.minecraft.item.ItemStack; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; + +public class SigilToggleable extends EnergyItems +{ + public void setActivated(ItemStack stack, boolean newActivated) + { + stack.setItemDamage(newActivated ? 1 : 0); + } + + public boolean getActivated(ItemStack stack) + { + return stack.getItemDamage() == 1; + } +} From b2f7ec6030f084107c7ea9b6177bf17906a0050d Mon Sep 17 00:00:00 2001 From: Arcaratus <byou64@gmail.com> Date: Thu, 30 Jul 2015 10:21:53 -0400 Subject: [PATCH 24/33] Finished TileEntities --- .../AlchemicalWizardry.java | 16 +++--- .../api/soulNetwork/SoulNetworkHandler.java | 26 ++++++++++ .../client/ClientProxy.java | 12 ++--- .../common/NewPacketHandler.java | 12 ++--- .../block/BlockAlchemicalCalcinator.java | 6 +-- .../common/block/BlockBelljar.java | 16 +++--- .../common/block/BlockChemistrySet.java | 4 +- .../common/block/BlockSchematicSaver.java | 2 +- .../common/block/BlockSpellTable.java | 6 +-- .../common/items/BlankSpell.java | 21 +++----- .../common/items/EnergyItems.java | 34 ++----------- .../block/RenderAlchemicCalcinator.java | 6 +-- .../renderer/block/RenderCrystalBelljar.java | 6 +-- .../renderer/block/RenderWritingTable.java | 6 +-- .../itemRender/TEBellJarItemRenderer.java | 4 +- .../rituals/RitualEffectAutoAlchemy.java | 44 ++++++++-------- .../rituals/RitualEffectDemonPortal.java | 4 +- ...nator.java => TEAlchemicalCalcinator.java} | 50 +++++++------------ .../common/tileEntity/TEAltar.java | 21 +++----- .../common/tileEntity/TEBellJar.java | 4 +- ...EWritingTable.java => TEChemistrySet.java} | 20 +++----- .../common/tileEntity/TEConduit.java | 2 +- .../common/tileEntity/TECrucible.java | 2 +- .../common/tileEntity/TEMasterStone.java | 11 ++-- .../common/tileEntity/TEMimicBlock.java | 4 +- .../common/tileEntity/TEPedestal.java | 1 - .../common/tileEntity/TEPlinth.java | 2 +- .../common/tileEntity/TEReagentConduit.java | 28 +++++------ .../common/tileEntity/TESchematicSaver.java | 3 +- .../common/tileEntity/TESpellBlock.java | 3 -- .../tileEntity/TESpellParadigmBlock.java | 10 +--- .../{TEHomHeart.java => TESpellTable.java} | 4 +- .../common/tileEntity/TETeleposer.java | 6 +-- .../container/ContainerWritingTable.java | 6 +-- .../common/tileEntity/gui/GuiHandler.java | 10 ++-- .../tileEntity/gui/GuiWritingTable.java | 4 +- 36 files changed, 183 insertions(+), 233 deletions(-) rename src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/{TEAlchemicCalcinator.java => TEAlchemicalCalcinator.java} (90%) rename src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/{TEWritingTable.java => TEChemistrySet.java} (98%) rename src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/{TEHomHeart.java => TESpellTable.java} (95%) diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index 99836f43..4b915857 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -259,12 +259,12 @@ import WayofTime.alchemicalWizardry.common.spell.simple.SpellWateryGrave; import WayofTime.alchemicalWizardry.common.spell.simple.SpellWindGust; import WayofTime.alchemicalWizardry.common.summoning.SummoningHelperAW; import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; import WayofTime.alchemicalWizardry.common.tileEntity.TECrucible; -import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpellTable; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; import WayofTime.alchemicalWizardry.common.tileEntity.TEMimicBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TEOrientable; @@ -280,7 +280,7 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiHandler; //import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration; @@ -761,8 +761,8 @@ public class AlchemicalWizardry GameRegistry.registerTileEntity(TEAltar.class, "containerAltar"); GameRegistry.registerTileEntity(TEMasterStone.class, "containerMasterStone"); GameRegistry.registerTileEntity(TESocket.class, "containerSocket"); - GameRegistry.registerTileEntity(TEWritingTable.class, "containerWritingTable"); - GameRegistry.registerTileEntity(TEHomHeart.class, "containerHomHeart"); + GameRegistry.registerTileEntity(TEChemistrySet.class, "containerWritingTable"); + GameRegistry.registerTileEntity(TESpellTable.class, "containerHomHeart"); GameRegistry.registerTileEntity(TEPedestal.class, "containerPedestal"); GameRegistry.registerTileEntity(TEPlinth.class, "containerPlinth"); GameRegistry.registerTileEntity(TETeleposer.class, "containerTeleposer"); @@ -777,8 +777,8 @@ public class AlchemicalWizardry GameRegistry.registerTileEntity(TESchematicSaver.class, "containerSchematicSaver"); GameRegistry.registerTileEntity(TESpectralBlock.class, "containerSpectralBlock"); GameRegistry.registerTileEntity(TEReagentConduit.class, "containerReagentConduit"); - GameRegistry.registerTileEntity(TEBellJar.class, "containerBellJar"); - GameRegistry.registerTileEntity(TEAlchemicCalcinator.class, "containerAlchemicCalcinator"); + GameRegistry.registerTileEntity(TEBelljar.class, "containerBellJar"); + GameRegistry.registerTileEntity(TEAlchemicalCalcinator.class, "containerAlchemicCalcinator"); GameRegistry.registerTileEntity(TEDemonChest.class, "containerDemonChest"); GameRegistry.registerTileEntity(TEMimicBlock.class, "containerMimic"); GameRegistry.registerTileEntity(TECrucible.class, "containerCrucible"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java index 4796f951..ea051a0d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java @@ -19,6 +19,32 @@ import WayofTime.alchemicalWizardry.api.event.ItemDrainNetworkEvent; public class SoulNetworkHandler { + public static boolean canSyphonInContainer(ItemStack ist, int damageToBeDone) + { + if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) + { + String ownerName = ist.getTagCompound().getString("ownerName"); + + if (MinecraftServer.getServer() == null) + { + return false; + } + + World world = MinecraftServer.getServer().worldServers[0]; + LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); + + if (data == null) + { + data = new LifeEssenceNetwork(ownerName); + world.setItemData(ownerName, data); + } + + return data.currentEssence >= damageToBeDone; + } + + return false; + } + public static boolean syphonFromNetworkWhileInContainer(ItemStack ist, int damageToBeDone) { String ownerName = ""; diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java b/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java index 2def5126..1832540e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java @@ -89,9 +89,9 @@ import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBazoo import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBlastProjectile; import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderMeteor; import WayofTime.alchemicalWizardry.common.thread.GAPIChecker; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; @@ -101,7 +101,7 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; public class ClientProxy extends CommonProxy { @@ -152,7 +152,7 @@ public class ClientProxy extends CommonProxy ClientRegistry.bindTileEntitySpecialRenderer(TEAltar.class, new TEAltarRenderer()); ClientRegistry.bindTileEntitySpecialRenderer(TEPedestal.class, new RenderPedestal()); ClientRegistry.bindTileEntitySpecialRenderer(TEPlinth.class, new RenderPlinth()); - ClientRegistry.bindTileEntitySpecialRenderer(TEWritingTable.class, new RenderWritingTable()); + ClientRegistry.bindTileEntitySpecialRenderer(TEChemistrySet.class, new RenderWritingTable()); ClientRegistry.bindTileEntitySpecialRenderer(TEConduit.class, new RenderConduit()); ClientRegistry.bindTileEntitySpecialRenderer(TESpellEffectBlock.class, new RenderSpellEffectBlock()); ClientRegistry.bindTileEntitySpecialRenderer(TESpellEnhancementBlock.class, new RenderSpellEnhancementBlock()); @@ -160,8 +160,8 @@ public class ClientProxy extends CommonProxy ClientRegistry.bindTileEntitySpecialRenderer(TESpellModifierBlock.class, new RenderSpellModifierBlock()); ClientRegistry.bindTileEntitySpecialRenderer(TEReagentConduit.class, new RenderReagentConduit()); ClientRegistry.bindTileEntitySpecialRenderer(TEMasterStone.class, new RenderMasterStone()); - ClientRegistry.bindTileEntitySpecialRenderer(TEAlchemicCalcinator.class, new RenderAlchemicCalcinator()); - ClientRegistry.bindTileEntitySpecialRenderer(TEBellJar.class, new RenderCrystalBelljar()); + ClientRegistry.bindTileEntitySpecialRenderer(TEAlchemicalCalcinator.class, new RenderAlchemicCalcinator()); + ClientRegistry.bindTileEntitySpecialRenderer(TEBelljar.class, new RenderCrystalBelljar()); //Item Renderer stuff MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockConduit), new TEConduitItemRenderer()); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java index 1902d47b..f11a4853 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java @@ -39,7 +39,7 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; public enum NewPacketHandler { @@ -194,9 +194,9 @@ public enum NewPacketHandler { World world = AlchemicalWizardry.proxy.getClientWorld(); TileEntity te = world.getTileEntity(msg.pos); - if (te instanceof TEWritingTable) + if (te instanceof TEChemistrySet) { - TEWritingTable WritingTable = (TEWritingTable) te; + TEChemistrySet WritingTable = (TEChemistrySet) te; WritingTable.handlePacketData(msg.items); } @@ -809,10 +809,10 @@ public enum NewPacketHandler boolean hasStacks5 = newBuffer.readBoolean(); - ((TEWritingTableMessage) msg).items = new int[TEWritingTable.sizeInv * 3]; + ((TEWritingTableMessage) msg).items = new int[TEChemistrySet.sizeInv * 3]; if (hasStacks5) { - ((TEWritingTableMessage) msg).items = new int[TEWritingTable.sizeInv * 3]; + ((TEWritingTableMessage) msg).items = new int[TEChemistrySet.sizeInv * 3]; for (int i = 0; i < ((TEWritingTableMessage) msg).items.length; i++) { ((TEWritingTableMessage) msg).items[i] = newBuffer.readInt(); @@ -971,7 +971,7 @@ public enum NewPacketHandler return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg); } - public static Packet getPacket(TEWritingTable tileWritingTable) + public static Packet getPacket(TEChemistrySet tileWritingTable) { TEWritingTableMessage msg = new TEWritingTableMessage(); msg.index = 6; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicalCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicalCalcinator.java index 2413fa19..ae0548f9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicalCalcinator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicalCalcinator.java @@ -2,7 +2,7 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -30,7 +30,7 @@ public class BlockAlchemicalCalcinator extends BlockContainer @Override public TileEntity createNewTileEntity(World world, int meta) { - return new TEAlchemicCalcinator(); + return new TEAlchemicalCalcinator(); } @Override @@ -105,7 +105,7 @@ public class BlockAlchemicalCalcinator extends BlockContainer @Override public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { - TEAlchemicCalcinator tileEntity = (TEAlchemicCalcinator) world.getTileEntity(blockPos); + TEAlchemicalCalcinator tileEntity = (TEAlchemicalCalcinator) world.getTileEntity(blockPos); if (tileEntity == null || player.isSneaking()) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java index fa724cc9..b96d8d4b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java @@ -21,7 +21,7 @@ import net.minecraft.world.World; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -77,12 +77,12 @@ public class BlockBelljar extends BlockContainer { TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TEBellJar) + if (tile instanceof TEBelljar) { NBTTagCompound tag = stack.getTagCompound(); if (tag != null) { - ((TEBellJar) tile).readTankNBTOnPlace(tag); + ((TEBelljar) tile).readTankNBTOnPlace(tag); } } } @@ -90,7 +90,7 @@ public class BlockBelljar extends BlockContainer @Override public TileEntity createNewTileEntity(World world, int meta) { - return new TEBellJar(); + return new TEBelljar(); } @Override @@ -121,9 +121,9 @@ public class BlockBelljar extends BlockContainer public int getComparatorInputOverride(World world, BlockPos blockPos) { TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TEBellJar) + if (tile instanceof TEBelljar) { - return ((TEBellJar) tile).getRSPowerOutput(); + return ((TEBelljar) tile).getRSPowerOutput(); } return 15; } @@ -142,11 +142,11 @@ public class BlockBelljar extends BlockContainer TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TEBellJar) + if (tile instanceof TEBelljar) { ItemStack drop = new ItemStack(this); NBTTagCompound tag = new NBTTagCompound(); - ((TEBellJar) tile).writeTankNBT(tag); + ((TEBelljar) tile).writeTankNBT(tag); drop.setTagCompound(tag); list.add(drop); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java index fabb3416..9830f182 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -92,7 +92,7 @@ public class BlockChemistrySet extends BlockContainer @Override public TileEntity createNewTileEntity(World world, int meta) { - return new TEWritingTable(); + return new TEChemistrySet(); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java index 7c0f86e3..7d7ab440 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java @@ -35,7 +35,7 @@ public class BlockSchematicSaver extends BlockContainer TESchematicSaver tileEntity = (TESchematicSaver) world.getTileEntity(blockPos); - tileEntity.rightClickBlock(player, side.getIndex()); + tileEntity.rightClickBlock(); return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java index af6bfe66..89b4746e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.common.items.BlankSpell; -import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpellTable; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -25,7 +25,7 @@ public class BlockSpellTable extends BlockContainer @Override public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { - TEHomHeart tileEntity = (TEHomHeart) world.getTileEntity(blockPos); + TESpellTable tileEntity = (TESpellTable) world.getTileEntity(blockPos); if (tileEntity == null || player.isSneaking()) { @@ -58,6 +58,6 @@ public class BlockSpellTable extends BlockContainer @Override public TileEntity createNewTileEntity(World world, int metaMaybe) { - return new TEHomHeart(); + return new TESpellTable(); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java index 885b7d07..fea0b907 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java @@ -1,14 +1,12 @@ package WayofTime.alchemicalWizardry.common.items; import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpellTable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; @@ -24,13 +22,6 @@ public class BlankSpell extends EnergyItems setCreativeTab(AlchemicalWizardry.tabBloodMagic); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BlankSpell"); - } - @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { @@ -65,13 +56,13 @@ public class BlankSpell extends EnergyItems if (world != null) { NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - TileEntity tileEntity = world.getTileEntity(itemTag.getInteger("xCoord"), itemTag.getInteger("yCoord"), itemTag.getInteger("zCoord")); + TileEntity tileEntity = world.getTileEntity(new BlockPos(itemTag.getInteger("xCoord"), itemTag.getInteger("yCoord"), itemTag.getInteger("zCoord"))); - if (tileEntity instanceof TEHomHeart) + if (tileEntity instanceof TESpellTable) { - TEHomHeart homHeart = (TEHomHeart) tileEntity; + TESpellTable homHeart = (TESpellTable) tileEntity; - if (homHeart.canCastSpell(par1ItemStack, par2World, par3EntityPlayer)) + if (homHeart.canCastSpell()) { if(EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, homHeart.getCostForSpell())) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java index 34be619d..5f487513 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java @@ -11,6 +11,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.server.MinecraftServer; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; public class EnergyItems extends Item implements IBindable @@ -47,7 +48,7 @@ public class EnergyItems extends Item implements IBindable float f3 = f * f * 0.6F - 0.7F; for (int l = 0; l < 8; ++l) { - world.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); + world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); } } for (int i = 0; i < damage; i++) @@ -115,6 +116,7 @@ public class EnergyItems extends Item implements IBindable return false; } + @Deprecated public static boolean canSyphonInContainer(ItemStack ist, int damageToBeDone) { if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) @@ -173,6 +175,7 @@ public class EnergyItems extends Item implements IBindable } } + @Deprecated public static boolean syphonAndDamageWhileInContainer(ItemStack ist, EntityPlayer player, int damageToBeDone) { if (!syphonWhileInContainer(ist, damageToBeDone)) @@ -222,35 +225,6 @@ public class EnergyItems extends Item implements IBindable return item.getTagCompound().getString("ownerName"); } - @Deprecated - public static void drainPlayerNetwork(EntityPlayer player, int damageToBeDone) - { - String ownerName = SpellHelper.getUsername(player); - - if (MinecraftServer.getServer() == null) - { - return; - } - - World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); - - if (data == null) - { - data = new LifeEssenceNetwork(ownerName); - world.setItemData(ownerName, data); - } - - if (data.currentEssence >= damageToBeDone) - { - data.currentEssence -= damageToBeDone; - data.markDirty(); - } else - { - hurtPlayer(player, damageToBeDone); - } - } - @Deprecated public static int getCurrentEssence(String ownerName) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java index 8ae26a81..cff17f3b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java @@ -4,7 +4,7 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import WayofTime.alchemicalWizardry.common.renderer.model.ModelAlchemicalCalcinator; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator; import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.RenderItem; @@ -41,9 +41,9 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer @Override public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) { - if (tileEntity instanceof TEAlchemicCalcinator) + if (tileEntity instanceof TEAlchemicalCalcinator) { - TEAlchemicCalcinator tileAltar = (TEAlchemicCalcinator) tileEntity; + TEAlchemicalCalcinator tileAltar = (TEAlchemicalCalcinator) tileEntity; GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java index b37b9391..10e53fd4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java @@ -4,7 +4,7 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import WayofTime.alchemicalWizardry.common.renderer.model.ModelCrystalBelljar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; @@ -24,9 +24,9 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer @Override public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { - if (tileEntity instanceof TEBellJar) + if (tileEntity instanceof TEBelljar) { - TEBellJar tileAltar = (TEBellJar) tileEntity; + TEBelljar tileAltar = (TEBelljar) tileEntity; GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/CrystalBelljar.png"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java index c9f36674..fd8c119a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.common.renderer.block; import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.RenderItem; @@ -37,9 +37,9 @@ public class RenderWritingTable extends TileEntitySpecialRenderer @Override public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { - if (tileEntity instanceof TEWritingTable) + if (tileEntity instanceof TEChemistrySet) { - TEWritingTable tileAltar = (TEWritingTable) tileEntity; + TEChemistrySet tileAltar = (TEChemistrySet) tileEntity; GL11.glDisable(GL11.GL_LIGHTING); GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java index b9826145..faedc1ec 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java @@ -14,7 +14,7 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import WayofTime.alchemicalWizardry.common.renderer.model.ModelCrystalBelljar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; import cpw.mods.fml.client.FMLClientHandler; public class TEBellJarItemRenderer implements IItemRenderer @@ -35,7 +35,7 @@ public class TEBellJarItemRenderer implements IItemRenderer GL11.glPopMatrix(); GL11.glPopMatrix(); - ReagentContainerInfo[] info = TEBellJar.getContainerInfoFromItem(item); + ReagentContainerInfo[] info = TEBelljar.getContainerInfoFromItem(item); if (info.length >= 1 && info[0] != null) { ReagentStack reagentStack = info[0].reagent; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java index 7dd7beaf..8f1e1d64 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java @@ -18,7 +18,7 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; public class RitualEffectAutoAlchemy extends RitualEffect { @@ -60,7 +60,7 @@ public class RitualEffectAutoAlchemy extends RitualEffect ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(targetStack); if (recipe != null) { - TEWritingTable alchemyEntity; + TEChemistrySet alchemyEntity; IInventory outputInv = null; IInventory inputInv1 = null; IInventory inputInv2 = null; @@ -70,63 +70,63 @@ public class RitualEffectAutoAlchemy extends RitualEffect TileEntity eastEntity = world.getTileEntity(x + 1, y, z); TileEntity westEntity = world.getTileEntity(x - 1, y, z); - if (northEntity instanceof TEWritingTable) + if (northEntity instanceof TEChemistrySet) { - alchemyEntity = (TEWritingTable) northEntity; - if (southEntity instanceof IInventory && !(southEntity instanceof TEWritingTable)) + alchemyEntity = (TEChemistrySet) northEntity; + if (southEntity instanceof IInventory && !(southEntity instanceof TEChemistrySet)) { outputInv = (IInventory) southEntity; } - if (eastEntity instanceof IInventory && !(eastEntity instanceof TEWritingTable)) + if (eastEntity instanceof IInventory && !(eastEntity instanceof TEChemistrySet)) { inputInv1 = (IInventory) eastEntity; } - if (westEntity instanceof IInventory && !(westEntity instanceof TEWritingTable)) + if (westEntity instanceof IInventory && !(westEntity instanceof TEChemistrySet)) { inputInv2 = (IInventory) westEntity; } - } else if (southEntity instanceof TEWritingTable) + } else if (southEntity instanceof TEChemistrySet) { - alchemyEntity = (TEWritingTable) southEntity; - if (northEntity instanceof IInventory && !(northEntity instanceof TEWritingTable)) + alchemyEntity = (TEChemistrySet) southEntity; + if (northEntity instanceof IInventory && !(northEntity instanceof TEChemistrySet)) { outputInv = (IInventory) northEntity; } - if (eastEntity instanceof IInventory && !(eastEntity instanceof TEWritingTable)) + if (eastEntity instanceof IInventory && !(eastEntity instanceof TEChemistrySet)) { inputInv1 = (IInventory) eastEntity; } - if (westEntity instanceof IInventory && !(westEntity instanceof TEWritingTable)) + if (westEntity instanceof IInventory && !(westEntity instanceof TEChemistrySet)) { inputInv2 = (IInventory) westEntity; } - } else if (eastEntity instanceof TEWritingTable) + } else if (eastEntity instanceof TEChemistrySet) { - alchemyEntity = (TEWritingTable) eastEntity; - if (westEntity instanceof IInventory && !(westEntity instanceof TEWritingTable)) + alchemyEntity = (TEChemistrySet) eastEntity; + if (westEntity instanceof IInventory && !(westEntity instanceof TEChemistrySet)) { outputInv = (IInventory) westEntity; } - if (northEntity instanceof IInventory && !(northEntity instanceof TEWritingTable)) + if (northEntity instanceof IInventory && !(northEntity instanceof TEChemistrySet)) { inputInv1 = (IInventory) northEntity; } - if (southEntity instanceof IInventory && !(southEntity instanceof TEWritingTable)) + if (southEntity instanceof IInventory && !(southEntity instanceof TEChemistrySet)) { inputInv2 = (IInventory) southEntity; } - } else if (westEntity instanceof TEWritingTable) + } else if (westEntity instanceof TEChemistrySet) { - alchemyEntity = (TEWritingTable) westEntity; - if (eastEntity instanceof IInventory && !(eastEntity instanceof TEWritingTable)) + alchemyEntity = (TEChemistrySet) westEntity; + if (eastEntity instanceof IInventory && !(eastEntity instanceof TEChemistrySet)) { outputInv = (IInventory) eastEntity; } - if (northEntity instanceof IInventory && !(northEntity instanceof TEWritingTable)) + if (northEntity instanceof IInventory && !(northEntity instanceof TEChemistrySet)) { inputInv1 = (IInventory) northEntity; } - if (southEntity instanceof IInventory && !(southEntity instanceof TEWritingTable)) + if (southEntity instanceof IInventory && !(southEntity instanceof TEChemistrySet)) { inputInv2 = (IInventory) southEntity; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java index f4313d20..ad15551d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java @@ -21,7 +21,7 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; public class RitualEffectDemonPortal extends RitualEffect { @@ -137,7 +137,7 @@ public class RitualEffectDemonPortal extends RitualEffect for(Int3 pos : jarLocations) { - if(!(ritualStone.getWorld().getTileEntity(x + pos.xCoord, y + pos.yCoord, z + pos.zCoord) instanceof TEBellJar)) + if(!(ritualStone.getWorld().getTileEntity(x + pos.xCoord, y + pos.yCoord, z + pos.zCoord) instanceof TEBelljar)) { return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicalCalcinator.java similarity index 90% rename from src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicCalcinator.java rename to src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicalCalcinator.java index f585b570..b406f3dc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicCalcinator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicalCalcinator.java @@ -20,19 +20,16 @@ import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory, IUpdatePlayerListBox +public class TEAlchemicalCalcinator extends TEReagentConduit implements IInventory, IUpdatePlayerListBox { protected ItemStack[] inv; protected ReagentContainer bufferTank = new ReagentContainer(Reagent.REAGENT_SIZE * 2); protected int bufferTransferRate = 20; - private int lpPerTick = 10; - private int ticksPerReagent = 200; + private int progress; - public int progress; - - public TEAlchemicCalcinator() + public TEAlchemicalCalcinator() { super(1, Reagent.REAGENT_SIZE * 4); this.inv = new ItemStack[2]; @@ -56,7 +53,7 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory for (int i = 0; i < tagList.tagCount(); i++) { - NBTTagCompound savedTag = (NBTTagCompound) tagList.getCompoundTagAt(i); + NBTTagCompound savedTag = tagList.getCompoundTagAt(i); if (savedTag.getBoolean("Empty")) { @@ -85,7 +82,6 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory for (int i = 0; i < inv.length; i++) { - ItemStack stack = inv[i]; NBTTagCompound savedTag = new NBTTagCompound(); if (inv[i] != null) @@ -128,7 +124,10 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory public void tickProgress() { + int lpPerTick = 10; + int ticksPerReagent = 200; ItemStack reagentItemStack = this.getStackInSlot(1); + if (reagentItemStack == null) { progress = 0; @@ -165,7 +164,7 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); } - if (progress >= this.ticksPerReagent) + if (progress >= ticksPerReagent) { progress = 0; this.bufferTank.fill(possibleReagent, true); @@ -200,7 +199,7 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory for (int i = 0; i < invTagList.tagCount(); i++) { - NBTTagCompound savedTag = (NBTTagCompound) invTagList.getCompoundTagAt(i); + NBTTagCompound savedTag = invTagList.getCompoundTagAt(i); if (savedTag.getBoolean("Empty")) { @@ -235,7 +234,6 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory for (int i = 0; i < inv.length; i++) { - ItemStack stack = inv[i]; NBTTagCompound savedTag = new NBTTagCompound(); if (inv[i] != null) @@ -342,14 +340,10 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory } @Override - public void openInventory(EntityPlayer player) - { - } + public void openInventory(EntityPlayer player) {} @Override - public void closeInventory(EntityPlayer player) - { - } + public void closeInventory(EntityPlayer player) {} @Override public String getName() @@ -381,32 +375,26 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory } @Override - public IChatComponent getDisplayName() { - // TODO Auto-generated method stub + public IChatComponent getDisplayName() + { return null; } @Override - public int getField(int id) { - // TODO Auto-generated method stub + public int getField(int id) + { return 0; } @Override - public void setField(int id, int value) { - // TODO Auto-generated method stub - - } + public void setField(int id, int value) {} @Override - public int getFieldCount() { - // TODO Auto-generated method stub + public int getFieldCount() + { return 0; } @Override - public void clear() { - // TODO Auto-generated method stub - - } + public void clear() {} } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java index bd663b57..ff3cc550 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java @@ -106,11 +106,6 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I return filledAmount; } - - public int getRSPowerOutput() - { - return 5; - } public void addToDemonBloodDuration(int dur) { @@ -509,8 +504,8 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I if(worldObj.getWorldTime() % Math.max(20 - this.accelerationUpgrades, 1) == 0) { int syphonMax = (int) (20 * this.dislocationMultiplier); - int fluidInputted = 0; - int fluidOutputted = 0; + int fluidInputted; + int fluidOutputted; fluidInputted = Math.min(syphonMax, -this.fluid.amount + capacity); fluidInputted = Math.min(this.fluidInput.amount, fluidInputted); this.fluid.amount += fluidInputted; @@ -688,9 +683,9 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I } } - FluidStack flMain = new FluidStack(fluidData[0], fluidData[1]); - FluidStack flIn = new FluidStack(fluidData[2], fluidData[3]); - FluidStack flOut = new FluidStack(fluidData[4], fluidData[5]); + FluidStack flMain = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, fluidData[1]); //First parameter was fluidData[0] --Checking to see if this will cause issues or not + FluidStack flIn = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, fluidData[3]); //" " + FluidStack flOut = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, fluidData[5]); //" " this.setMainFluid(flMain); this.setInputFluid(flIn); @@ -901,7 +896,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I sortList[1] = 0; } else { - sortList[0] = this.fluid.fluidID; + sortList[0] = this.fluid.getFluidID(); sortList[1] = this.fluid.amount; } @@ -911,7 +906,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I sortList[3] = 0; } else { - sortList[2] = this.fluidInput.fluidID; + sortList[2] = this.fluidInput.getFluidID(); sortList[3] = this.fluidInput.amount; } @@ -921,7 +916,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I sortList[5] = 0; } else { - sortList[4] = this.fluidOutput.fluidID; + sortList[4] = this.fluidOutput.getFluidID(); sortList[5] = this.fluidOutput.amount; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java index b12c426c..2a04adc1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java @@ -14,9 +14,9 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraftforge.common.util.Constants; -public class TEBellJar extends TEReagentConduit +public class TEBelljar extends TEReagentConduit { - public TEBellJar() + public TEBelljar() { super(1, 16000); this.maxConnextions = 1; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEChemistrySet.java similarity index 98% rename from src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java rename to src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEChemistrySet.java index 270fce74..502c3f75 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEChemistrySet.java @@ -23,7 +23,7 @@ import WayofTime.alchemicalWizardry.common.alchemy.ICombinationalCatalyst; import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -public class TEWritingTable extends TEInventory implements ISidedInventory, IUpdatePlayerListBox +public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpdatePlayerListBox { public static final int sizeInv = 7; @@ -32,7 +32,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory, IUpd private int accelerationTime; - public TEWritingTable() + public TEChemistrySet() { super(sizeInv); } @@ -180,13 +180,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory, IUpd public boolean containsCombinationCatalyst() { - if (getCombinationCatalystPosition() != -1) - { - return true; - } else - { - return false; - } + return getCombinationCatalystPosition() != -1; } public int getCombinationCatalystPosition() @@ -742,10 +736,10 @@ public class TEWritingTable extends TEInventory implements ISidedInventory, IUpd { switch(facing) { - case DOWN: - return new int[]{6}; - default: - return new int[]{0, 1, 2, 3, 4, 5}; + case DOWN: + return new int[]{6}; + default: + return new int[]{0, 1, 2, 3, 4, 5}; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java index 1a24d7f4..ed90c954 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java @@ -20,6 +20,6 @@ public class TEConduit extends TESpellBlock @Override protected void applySpellChange(SpellParadigm parad) { - return; + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java index b498a309..1b4f449c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java @@ -266,7 +266,7 @@ public class TECrucible extends TEInventory implements IUpdatePlayerListBox @Override public boolean isItemValidForSlot(int slot, ItemStack stack) { - return stack != null ? stack.getItem() instanceof IIncense : false; + return stack != null && stack.getItem() instanceof IIncense; } public int getRSPowerOutput() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java index 83ee371f..01d78af0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java @@ -56,7 +56,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp public TEMasterStone() { tanks = new ReagentContainer[]{new ReagentContainer(1000), new ReagentContainer(1000), new ReagentContainer(1000)}; - this.attunedTankMap = new HashMap(); + this.attunedTankMap = new HashMap<Reagent, Integer>(); isActive = false; owner = ""; @@ -454,9 +454,8 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp public AxisAlignedBB getRenderBoundingBox() { - double renderExtention = 1.0d; - AxisAlignedBB bb = new AxisAlignedBB(pos.add(-renderExtention, -renderExtention, -renderExtention), pos.add(1 + renderExtention, 1 + renderExtention, 1 + renderExtention)); - return bb; + double renderExtension = 1.0d; + return new AxisAlignedBB(pos.add(-renderExtension, -renderExtension, -renderExtension), pos.add(1 + renderExtension, 1 + renderExtension, 1 + renderExtension)); } /* ISegmentedReagentHandler */ @@ -484,7 +483,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp ReagentStack remainingStack = resource.copy(); remainingStack.amount = maxFill - totalFill; - boolean doesReagentMatch = tanks[i].getReagent() == null ? false : tanks[i].getReagent().isReagentEqual(remainingStack); + boolean doesReagentMatch = tanks[i].getReagent() != null && tanks[i].getReagent().isReagentEqual(remainingStack); if (doesReagentMatch) { @@ -637,7 +636,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp return; } - this.attunedTankMap.put(reagent, new Integer(total)); + this.attunedTankMap.put(reagent, total); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java index bc0774a9..d059a92e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java @@ -58,7 +58,7 @@ public class TEMimicBlock extends TileEntity implements IUpdatePlayerListBox for (int i = 0; i < tagList.tagCount(); i++) { - NBTTagCompound tag = (NBTTagCompound) tagList.getCompoundTagAt(i); + NBTTagCompound tag = tagList.getCompoundTagAt(i); int slot = tag.getByte("Slot"); if (slot >= 0 && slot < inv.length) @@ -79,8 +79,6 @@ public class TEMimicBlock extends TileEntity implements IUpdatePlayerListBox for (int i = 0; i < inv.length; i++) { - ItemStack stack = inv[i]; - if (inv[i] != null) { NBTTagCompound tag = new NBTTagCompound(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java index 87ff82be..7b664d7f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java @@ -135,5 +135,4 @@ public class TEPedestal extends TEInventory SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 2, pos); } } - } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java index 4096e114..579581ae 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java @@ -36,7 +36,7 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox private int progressInterval; private int progress; - public static List<PlinthComponent> pedestalPositions = new ArrayList(); + public static List<PlinthComponent> pedestalPositions = new ArrayList<PlinthComponent>(); public TEPlinth() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java index 7cabc726..5d6b8ce3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java @@ -17,7 +17,6 @@ import net.minecraft.server.gui.IUpdatePlayerListBox; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -55,9 +54,9 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp { super(numberOfTanks, size); - destinationList = new LinkedList(); - reagentTargetList = new HashMap(); - reagentTankDesignationList = new HashMap(); + destinationList = new LinkedList<ColourAndCoords>(); + reagentTargetList = new HashMap<Reagent, List<Int3>>(); + reagentTankDesignationList = new HashMap<Reagent, Integer>(); } public Int3 getColour() @@ -164,7 +163,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp NBTTagList tagList = tag.getTagList("destinationList", Constants.NBT.TAG_COMPOUND); - destinationList = new LinkedList(); + destinationList = new LinkedList<ColourAndCoords>(); for (int i = 0; i < tagList.tagCount(); i++) { @@ -173,7 +172,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp destinationList.add(ColourAndCoords.readFromNBT(savedTag)); } - reagentTargetList = new HashMap(); + reagentTargetList = new HashMap<Reagent, List<Int3>>(); NBTTagList reagentTagList = tag.getTagList("reagentTargetList", Constants.NBT.TAG_COMPOUND); @@ -183,7 +182,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp Reagent reagent = ReagentRegistry.getReagentForKey(savedTag.getString("reagent")); - List<Int3> coordList = new LinkedList(); + List<Int3> coordList = new LinkedList<Int3>(); NBTTagList coordinateList = savedTag.getTagList("coordinateList", Constants.NBT.TAG_COMPOUND); @@ -195,7 +194,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp reagentTargetList.put(reagent, coordList); } - reagentTankDesignationList = new HashMap(); + reagentTankDesignationList = new HashMap<Reagent, Integer>(); NBTTagList tankDesignationList = tag.getTagList("tankDesignationList", Constants.NBT.TAG_COMPOUND); @@ -203,7 +202,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp { NBTTagCompound savedTag = tankDesignationList.getCompoundTagAt(i); - this.reagentTankDesignationList.put(ReagentRegistry.getReagentForKey(savedTag.getString("reagent")), new Integer(savedTag.getInteger("integer"))); + this.reagentTankDesignationList.put(ReagentRegistry.getReagentForKey(savedTag.getString("reagent")), savedTag.getInteger("integer")); } } @@ -211,7 +210,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp { NBTTagList tagList = tag.getTagList("destinationList", Constants.NBT.TAG_COMPOUND); - destinationList = new LinkedList(); + destinationList = new LinkedList<ColourAndCoords>(); for (int i = 0; i < tagList.tagCount(); i++) { @@ -315,7 +314,6 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp int amount = Math.min(((IReagentHandler) tile).fill(EnumFacing.UP, maxDrainAmount, false), amountLeft); if (amount > 0) { - amountLeft -= amount; totalTransfered += amount; ReagentStack stack = this.drain(EnumFacing.UP, new ReagentStack(entry.getKey(), amount), true); @@ -342,13 +340,11 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp } } - @SideOnly(Side.CLIENT) public void sendPlayerStuffs() { Minecraft mc = Minecraft.getMinecraft(); EntityPlayer player = mc.thePlayer; - World world = mc.theWorld; if (SpellHelper.canPlayerSeeAlchemy(player)) { for (ColourAndCoords colourSet : this.destinationList) @@ -387,7 +383,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp public List<ColourAndCoords> compileListForReagentTargets(Map<Reagent, List<Int3>> map) { - List<ColourAndCoords> list = new LinkedList(); + List<ColourAndCoords> list = new LinkedList<ColourAndCoords>(); for (Entry<Reagent, List<Int3>> entry : map.entrySet()) { @@ -475,7 +471,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp List<Int3> coordList = this.reagentTargetList.get(reagent); if (coordList == null) { - List<Int3> newCoordList = new LinkedList(); + List<Int3> newCoordList = new LinkedList<Int3>(); newCoordList.add(newCoord); this.reagentTargetList.put(reagent, newCoordList); } else @@ -486,7 +482,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp return true; } else { - List<Int3> newCoordList = new LinkedList(); + List<Int3> newCoordList = new LinkedList<Int3>(); newCoordList.add(newCoord); this.reagentTargetList.put(reagent, newCoordList); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java index e4e46c92..82cd940e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java @@ -7,7 +7,6 @@ import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import WayofTime.alchemicalWizardry.AlchemicalWizardry; @@ -21,7 +20,7 @@ public class TESchematicSaver extends TileEntity { public Block targetBlock = ModBlocks.largeBloodStoneBrick; - public void rightClickBlock(EntityPlayer player, int side) + public void rightClickBlock() { BuildingSchematic schematic = new BuildingSchematic(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java index c83379c9..278c943a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java @@ -24,9 +24,6 @@ public abstract class TESpellBlock extends TEOrientable implements ISpellTile public TESpellBlock getTileAtOutput() { EnumFacing output = this.getOutputDirection(); - int xOffset = output.getFrontOffsetX(); - int yOffset = output.getFrontOffsetY(); - int zOffset = output.getFrontOffsetZ(); TileEntity tile = worldObj.getTileEntity(pos.add(output.getDirectionVec())); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java index 4e06b26d..c60c5ebc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java @@ -31,10 +31,7 @@ public class TESpellParadigmBlock extends TESpellBlock implements ISpellParadigm } @Override - protected void applySpellChange(SpellParadigm parad) - { - - } + protected void applySpellChange(SpellParadigm parad) {} public boolean canInputRecieve() { @@ -68,10 +65,7 @@ public class TESpellParadigmBlock extends TESpellBlock implements ISpellParadigm } @Override - public void setInputDirection(EnumFacing direction) - { - - } + public void setInputDirection(EnumFacing direction) {} @Override public EnumFacing getInputDirection() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellTable.java similarity index 95% rename from src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java rename to src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellTable.java index 7ebffa93..d90314d9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellTable.java @@ -9,9 +9,9 @@ import net.minecraft.world.World; import WayofTime.alchemicalWizardry.common.spell.simple.HomSpell; import WayofTime.alchemicalWizardry.common.spell.simple.HomSpellRegistry; -public class TEHomHeart extends TileEntity +public class TESpellTable extends TileEntity { - public boolean canCastSpell(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + public boolean canCastSpell() { return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java index 3687e1ad..018f3244 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.tileEntity; import java.util.Iterator; import java.util.List; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -14,7 +15,6 @@ import net.minecraft.util.BlockPos; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.common.NewPacketHandler; import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; @@ -127,7 +127,7 @@ public class TETeleposer extends TEInventory implements IUpdatePlayerListBox entityCount++; } - if (EnergyItems.canSyphonInContainer(focus, damage * (focusLevel * 2 - 1) * (focusLevel * 2 - 1) * (focusLevel * 2 - 1) + damage * entityCount)) + if (SoulNetworkHandler.canSyphonInContainer(focus, damage * (focusLevel * 2 - 1) * (focusLevel * 2 - 1) * (focusLevel * 2 - 1) + damage * entityCount)) { for (int k = 0; k <= (focusLevel * 2 - 2); k++) for (int i = -(focusLevel - 1); i <= (focusLevel - 1); i++) @@ -148,7 +148,7 @@ public class TETeleposer extends TEInventory implements IUpdatePlayerListBox entityCount = 0; } - EnergyItems.syphonWhileInContainer(focus, damage * transportCount + damage * entityCount); + SoulNetworkHandler.syphonFromNetworkWhileInContainer(focus, damage * transportCount + damage * entityCount); //Teleport if (worldF.equals(worldObj)) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java index 647f43e7..23bc01cc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.common.tileEntity.container; import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; @@ -10,9 +10,9 @@ import net.minecraft.item.ItemStack; public class ContainerWritingTable extends Container { - protected TEWritingTable tileEntity; + protected TEChemistrySet tileEntity; - public ContainerWritingTable(InventoryPlayer inventoryPlayer, TEWritingTable te) + public ContainerWritingTable(InventoryPlayer inventoryPlayer, TEChemistrySet te) { tileEntity = te; addSlotToContainer(new Slot(tileEntity, 0, 152, 110)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java index 587178d7..496aac83 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java @@ -10,7 +10,7 @@ import WayofTime.alchemicalWizardry.common.items.sigil.holding.ContainerHolding; import WayofTime.alchemicalWizardry.common.items.sigil.holding.GuiHolding; import WayofTime.alchemicalWizardry.common.items.sigil.holding.InventoryHolding; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerTeleposer; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable; @@ -28,9 +28,9 @@ public class GuiHandler implements IGuiHandler case 0: tileEntity = world.getTileEntity(pos); - if (tileEntity instanceof TEWritingTable) + if (tileEntity instanceof TEChemistrySet) { - return new ContainerWritingTable(player.inventory, (TEWritingTable) tileEntity); + return new ContainerWritingTable(player.inventory, (TEChemistrySet) tileEntity); } case 1: @@ -62,9 +62,9 @@ public class GuiHandler implements IGuiHandler case 0: tileEntity = world.getTileEntity(pos); - if (tileEntity instanceof TEWritingTable) + if (tileEntity instanceof TEChemistrySet) { - return new GuiWritingTable(player.inventory, (TEWritingTable) tileEntity); + return new GuiWritingTable(player.inventory, (TEChemistrySet) tileEntity); } break; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java index a0c1baba..06339896 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java @@ -7,12 +7,12 @@ import net.minecraft.util.StatCollector; import org.lwjgl.opengl.GL11; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable; public class GuiWritingTable extends GuiContainer { - public GuiWritingTable(InventoryPlayer inventoryPlayer, TEWritingTable tileEntity) + public GuiWritingTable(InventoryPlayer inventoryPlayer, TEChemistrySet tileEntity) { super(new ContainerWritingTable(inventoryPlayer, tileEntity)); xSize = 176; From a9507b3b681cdf80576f880df3e53c4921bb18df Mon Sep 17 00:00:00 2001 From: Arcaratus <byou64@gmail.com> Date: Thu, 30 Jul 2015 14:52:39 -0400 Subject: [PATCH 25/33] Finished (almost) everything !items --- .../AlchemicalWizardry.java | 2 +- .../api/ILimitingLogic.java | 2 +- .../alchemicalWizardry/api/Int3.java | 1 - .../api/RoutingFocusParadigm.java | 4 +- .../AlchemicalPotionCreationHandler.java | 2 +- .../api/alchemy/AlchemyRecipeRegistry.java | 2 +- .../api/alchemy/energy/ReagentRegistry.java | 4 +- .../api/alchemy/energy/ReagentStack.java | 3 +- .../energy/TileSegmentedReagentHandler.java | 4 +- .../AltarRecipeRegistry.java | 4 +- .../api/bindingRegistry/BindingRegistry.java | 2 +- .../bindingRegistry/UnbindingRegistry.java | 2 +- .../api/compress/CompressionRegistry.java | 4 +- .../api/event/AddToNetworkEvent.java | 1 - .../api/event/TeleposeEvent.java | 44 +-- .../api/harvest/HarvestRegistry.java | 2 +- .../api/items/ItemSpellMultiTool.java | 17 +- .../api/items/ShapelessBloodOrbRecipe.java | 2 +- .../api/items/interfaces/IRitualDiviner.java | 10 +- .../api/rituals/RitualEffect.java | 5 +- .../api/rituals/Rituals.java | 4 +- .../soulNetwork/ComplexNetworkHandler.java | 8 +- .../api/spell/EntitySpellProjectile.java | 8 +- .../api/spell/SpellEffectRegistry.java | 8 +- .../api/spell/SpellParadigm.java | 2 +- .../api/spell/SpellParadigmMelee.java | 9 +- .../api/spell/SpellParadigmProjectile.java | 4 +- .../api/spell/SpellParadigmSelf.java | 7 +- .../api/spell/SpellParadigmTool.java | 35 +- .../summoningRegistry/SummoningRegistry.java | 2 +- .../client/BlockRenderer.java | 5 - .../client/ClientProxy.java | 15 +- .../client/gui/ConfigGuiFactory.java | 4 +- .../client/nei/NEIAlchemyRecipeHandler.java | 356 ++++++++--------- .../client/nei/NEIAltarRecipeHandler.java | 374 +++++++++--------- .../client/nei/NEIBindingRitualHandler.java | 272 ++++++------- .../client/nei/NEIBloodOrbShapedHandler.java | 284 ++++++------- .../nei/NEIBloodOrbShapelessHandler.java | 270 ++++++------- .../client/nei/NEIConfig.java | 71 ++-- .../client/renderer/RenderHelper.java | 2 +- .../client/renderer/RitualDivinerRender.java | 3 +- .../common/CommonProxy.java | 37 +- .../common/achievements/AchievementsMod.java | 2 +- .../achievements/AchievementsRegistry.java | 4 +- .../alchemy/CombinedPotionRegistry.java | 2 +- .../bloodAltarUpgrade/UpgradedAltars.java | 10 +- .../common/demonVillage/BlockSet.java | 2 +- .../demonVillage/BuildingSchematic.java | 4 +- .../common/demonVillage/TileBlockSet.java | 8 - .../ai/EntityDemonAIHurtByTarget.java | 2 +- .../demonHoard/DemonHoardPacket.java | 5 +- .../demonHoard/DemonPacketRegistry.java | 2 +- .../demon/EntityMinorDemonGrunt.java | 2 +- .../demonHoard/demon/IHoardDemon.java | 3 + .../loot/DemonVillageLootRegistry.java | 2 +- .../demonVillage/tileEntity/TEDemonChest.java | 5 +- .../tileEntity/TEDemonPortal.java | 29 +- .../common/entity/mob/EntityBileDemon.java | 2 - .../common/entity/mob/EntityBoulderFist.java | 5 +- .../common/entity/mob/EntityDemon.java | 54 +-- .../common/entity/mob/EntityElemental.java | 52 ++- .../common/entity/mob/EntityFallenAngel.java | 5 +- .../entity/mob/EntityFireElemental.java | 1 + .../entity/mob/EntityHolyElemental.java | 1 + .../common/entity/mob/EntityIceDemon.java | 6 +- .../entity/mob/EntityLowerGuardian.java | 11 +- .../common/entity/mob/EntityShade.java | 5 +- .../entity/mob/EntityShadeElemental.java | 1 + .../entity/mob/EntitySmallEarthGolem.java | 8 +- .../entity/mob/EntityWaterElemental.java | 1 + .../entity/mob/EntityWingedFireDemon.java | 6 +- .../projectile/EnergyBlastProjectile.java | 14 +- .../entity/projectile/EntityBeamParticle.java | 16 - .../EntityBloodLightProjectile.java | 1 - .../EntityEnergyBazookaMainProjectile.java | 4 +- ...ntityEnergyBazookaSecondaryProjectile.java | 16 +- .../entity/projectile/EntityParticleBeam.java | 2 - .../entity/projectile/FireProjectile.java | 6 +- .../entity/projectile/HolyProjectile.java | 4 +- .../entity/projectile/IceProjectile.java | 6 +- .../entity/projectile/MudProjectile.java | 2 +- .../entity/projectile/TeleportProjectile.java | 4 +- .../entity/projectile/WaterProjectile.java | 4 +- .../entity/projectile/WindGustProjectile.java | 2 +- .../common/omega/IEnchantmentGlyph.java | 5 +- .../common/omega/IStabilityGlyph.java | 2 +- .../common/omega/OmegaRegistry.java | 2 +- .../renderer/AlchemyCircleRenderer.java | 4 - .../common/renderer/BeamRenderer.java | 150 ------- ...r.java => RenderAlchemicalCalcinator.java} | 10 +- .../common/renderer/block/RenderAltar.java | 80 ++++ ...tingTable.java => RenderChemistrySet.java} | 115 +----- .../common/renderer/block/RenderConduit.java | 3 +- .../renderer/block/RenderCrystalBelljar.java | 10 +- .../common/renderer/block/RenderPedestal.java | 99 ----- .../common/renderer/block/RenderPlinth.java | 99 ----- .../common/renderer/block/ShaderHelper.java | 196 --------- .../renderer/block/TEAltarRenderer.java | 178 --------- ...r.java => TEChemistrySetItemRenderer.java} | 10 +- ...itingTable.java => ModelChemistrySet.java} | 4 +- .../RenderEnergyBazookaMainProjectile.java | 2 +- .../renderer/projectile/RenderMeteor.java | 2 +- .../rituals/RitualEffectAnimalGrowth.java | 2 +- .../rituals/RitualEffectApiaryOverclock.java | 2 +- .../rituals/RitualEffectAutoAlchemy.java | 19 +- .../common/rituals/RitualEffectBinding.java | 2 +- .../rituals/RitualEffectBiomeChanger.java | 4 +- .../rituals/RitualEffectContainment.java | 3 +- .../common/rituals/RitualEffectCrafting.java | 10 +- .../common/rituals/RitualEffectCrushing.java | 17 +- .../rituals/RitualEffectDemonPortal.java | 6 +- .../common/rituals/RitualEffectEllipsoid.java | 2 +- .../rituals/RitualEffectEvaporation.java | 2 +- .../common/rituals/RitualEffectExpulsion.java | 21 +- .../rituals/RitualEffectFeatheredEarth.java | 2 +- .../rituals/RitualEffectFeatheredKnife.java | 2 +- .../common/rituals/RitualEffectFlight.java | 2 +- .../rituals/RitualEffectFullStomach.java | 2 +- .../common/rituals/RitualEffectGrowth.java | 2 +- .../common/rituals/RitualEffectHarvest.java | 2 +- .../common/rituals/RitualEffectHealing.java | 4 +- .../rituals/RitualEffectInterdiction.java | 2 +- .../rituals/RitualEffectItemRouting.java | 23 +- .../rituals/RitualEffectItemSuction.java | 8 +- .../common/rituals/RitualEffectJumping.java | 6 +- .../common/rituals/RitualEffectLava.java | 4 +- .../common/rituals/RitualEffectLeap.java | 2 +- .../rituals/RitualEffectLifeConduit.java | 2 +- .../common/rituals/RitualEffectMagnetic.java | 3 +- .../rituals/RitualEffectOmegaStalling.java | 2 +- .../common/rituals/RitualEffectOmegaTest.java | 6 +- .../common/rituals/RitualEffectSpawnWard.java | 14 +- .../rituals/RitualEffectSphereCreator.java | 4 +- .../rituals/RitualEffectSummonMeteor.java | 2 +- .../rituals/RitualEffectSupression.java | 2 +- .../common/rituals/RitualEffectUnbinding.java | 2 +- .../rituals/RitualEffectVeilOfEvil.java | 14 +- .../common/rituals/RitualEffectWater.java | 2 +- .../rituals/RitualEffectWellOfSuffering.java | 6 +- .../routing/RoutingFocusLogicIgnMeta.java | 2 +- .../routing/RoutingFocusLogicLimit.java | 1 + .../common/spell/simple/SpellEarthBender.java | 5 +- ...WritingTable.java => GuiChemistrySet.java} | 4 +- .../common/tileEntity/gui/GuiHandler.java | 5 +- .../common/tileEntity/gui/GuiTeleposer.java | 1 - 145 files changed, 1261 insertions(+), 2156 deletions(-) delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/TileBlockSet.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBeamParticle.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/BeamRenderer.java rename src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/{RenderAlchemicCalcinator.java => RenderAlchemicalCalcinator.java} (96%) create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAltar.java rename src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/{RenderWritingTable.java => RenderChemistrySet.java} (56%) delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/ShaderHelper.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java rename src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/{TEWritingTableItemRenderer.java => TEChemistrySetItemRenderer.java} (88%) rename src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/{ModelWritingTable.java => ModelChemistrySet.java} (98%) rename src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/{GuiWritingTable.java => GuiChemistrySet.java} (93%) diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index 4b915857..9ab17dd8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -828,7 +828,7 @@ public class AlchemicalWizardry blacklistAccelerators(); MinecraftForge.EVENT_BUS.register(new ModLivingDropsEvent()); - proxy.InitRendering(); + proxy.initRendering(); NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler()); ItemStack gunpowderStack = new ItemStack(Items.gunpowder); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/ILimitingLogic.java b/src/main/java/WayofTime/alchemicalWizardry/api/ILimitingLogic.java index 30ab2ca8..2d7a4912 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/ILimitingLogic.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/ILimitingLogic.java @@ -2,5 +2,5 @@ package WayofTime.alchemicalWizardry.api; public interface ILimitingLogic { - public int getRoutingLimit(); + int getRoutingLimit(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/Int3.java b/src/main/java/WayofTime/alchemicalWizardry/api/Int3.java index bf29e713..7c8fa226 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/Int3.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/Int3.java @@ -3,7 +3,6 @@ package WayofTime.alchemicalWizardry.api; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.BlockPos; - public class Int3 { public int xCoord; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusParadigm.java index c41cab43..d77a2e1a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusParadigm.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusParadigm.java @@ -7,9 +7,9 @@ import net.minecraft.item.ItemStack; public class RoutingFocusParadigm { - public List<RoutingFocusLogic> logicList = new LinkedList(); + public List<RoutingFocusLogic> logicList = new LinkedList<RoutingFocusLogic>(); - public List<RoutingFocusPosAndFacing> locationList = new LinkedList(); + public List<RoutingFocusPosAndFacing> locationList = new LinkedList<RoutingFocusPosAndFacing>(); public int maximumAmount = 0; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemicalPotionCreationHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemicalPotionCreationHandler.java index 6af04910..a6ca090d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemicalPotionCreationHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemicalPotionCreationHandler.java @@ -6,7 +6,7 @@ import java.util.ArrayList; public class AlchemicalPotionCreationHandler { - public static ArrayList<AlchemyPotionHandlerComponent> registeredPotionEffects = new ArrayList(); + public static ArrayList<AlchemyPotionHandlerComponent> registeredPotionEffects = new ArrayList<AlchemyPotionHandlerComponent>(); public static void addPotion(ItemStack itemStack, int potionID, int tickDuration) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipeRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipeRegistry.java index dfb24596..99ad2868 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipeRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipeRegistry.java @@ -8,7 +8,7 @@ import java.util.List; public class AlchemyRecipeRegistry { - public static List<AlchemyRecipe> recipes = new ArrayList(); + public static List<AlchemyRecipe> recipes = new ArrayList<AlchemyRecipe>(); public static void registerRecipe(ItemStack output, int amountNeeded, ItemStack[] recipe, int bloodOrbLevel) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentRegistry.java index 20b43931..429587a1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentRegistry.java @@ -9,8 +9,8 @@ import net.minecraft.item.ItemStack; public class ReagentRegistry { - public static Map<String, Reagent> reagentList = new HashMap(); - public static Map<ItemStack, ReagentStack> itemToReagentMap = new HashMap(); + public static Map<String, Reagent> reagentList = new HashMap<String, Reagent>(); + public static Map<ItemStack, ReagentStack> itemToReagentMap = new HashMap<ItemStack, ReagentStack>(); public static Reagent sanctusReagent; public static Reagent incendiumReagent; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentStack.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentStack.java index f8583970..8923f3d3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentStack.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentStack.java @@ -28,9 +28,8 @@ public class ReagentStack } int amount = tag.getInteger("amount"); - ReagentStack stack = new ReagentStack(reagent, amount); - return stack; + return new ReagentStack(reagent, amount); } public NBTTagCompound writeToNBT(NBTTagCompound tag) diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileSegmentedReagentHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileSegmentedReagentHandler.java index ec4b9068..f965ab7a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileSegmentedReagentHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileSegmentedReagentHandler.java @@ -30,7 +30,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente { super(); - this.attunedTankMap = new HashMap(); + this.attunedTankMap = new HashMap<Reagent, Integer>(); this.tanks = new ReagentContainer[numberOfTanks]; for (int i = 0; i < numberOfTanks; i++) { @@ -116,7 +116,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente ReagentStack remainingStack = resource.copy(); remainingStack.amount = maxFill - totalFill; - boolean doesReagentMatch = tanks[i].getReagent() == null ? false : tanks[i].getReagent().isReagentEqual(remainingStack); + boolean doesReagentMatch = tanks[i].getReagent() != null && tanks[i].getReagent().isReagentEqual(remainingStack); if (doesReagentMatch) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipeRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipeRegistry.java index 528e7b75..566fbfe9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipeRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipeRegistry.java @@ -9,8 +9,8 @@ import net.minecraft.item.ItemStack; public class AltarRecipeRegistry { - public static List<AltarRecipe> altarRecipes = new LinkedList(); - public static Map<Integer, ItemStack> orbMap = new HashMap(); + public static List<AltarRecipe> altarRecipes = new LinkedList<AltarRecipe>(); + public static Map<Integer, ItemStack> orbMap = new HashMap<Integer, ItemStack>(); public static void registerAltarRecipe(ItemStack result, ItemStack requiredItem, int minTier, int liquidRequired, int consumptionRate, int drainRate, boolean canBeFilled) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRegistry.java index ba069118..407f74ff 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRegistry.java @@ -7,7 +7,7 @@ import java.util.List; public class BindingRegistry { - public static List<BindingRecipe> bindingRecipes = new LinkedList(); + public static List<BindingRecipe> bindingRecipes = new LinkedList<BindingRecipe>(); public static void registerRecipe(ItemStack output, ItemStack input) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRegistry.java index 3ae2eaf2..d031edd3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRegistry.java @@ -7,7 +7,7 @@ import java.util.List; public class UnbindingRegistry { - public static List<UnbindingRecipe> unbindingRecipes = new LinkedList(); + public static List<UnbindingRecipe> unbindingRecipes = new LinkedList<UnbindingRecipe>(); public static void addAllUnbindingRecipesFromBinding() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionRegistry.java index 689b022a..342b9b7d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionRegistry.java @@ -15,8 +15,8 @@ import net.minecraft.world.World; */ public class CompressionRegistry { - public static List<CompressionHandler> compressionRegistry = new ArrayList(); - public static Map<ItemStack, Integer> thresholdMap = new HashMap(); + public static List<CompressionHandler> compressionRegistry = new ArrayList<CompressionHandler>(); + public static Map<ItemStack, Integer> thresholdMap = new HashMap<ItemStack, Integer>(); public static void registerHandler(CompressionHandler handler) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/AddToNetworkEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/AddToNetworkEvent.java index def8381b..448f4712 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/AddToNetworkEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/AddToNetworkEvent.java @@ -3,7 +3,6 @@ package WayofTime.alchemicalWizardry.api.event; import net.minecraftforge.fml.common.eventhandler.Cancelable; import net.minecraftforge.fml.common.eventhandler.Event; - @Cancelable public class AddToNetworkEvent extends Event { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/TeleposeEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/TeleposeEvent.java index a1f63f9d..4fc7310f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/TeleposeEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/TeleposeEvent.java @@ -8,45 +8,43 @@ import net.minecraft.world.World; import net.minecraftforge.fml.common.eventhandler.Cancelable; import net.minecraftforge.fml.common.eventhandler.Event; - /** Fired when a teleposer attempts to transpose two blocks. Use this to perform special cleanup or compensation, or cancel it entirely to prevent the transposition. */ @Cancelable public class TeleposeEvent extends Event { + public final World initialWorld; + public final BlockPos initialPos; - public final World initialWorld; - public final BlockPos initialPos; + public final Block initialBlock; + public final IBlockState initialState; - public final Block initialBlock; - public final IBlockState initialState; + public final World finalWorld; + public final BlockPos finalPos; - public final World finalWorld; - public final BlockPos finalPos; + public final Block finalBlock; + public final IBlockState finalState; - public final Block finalBlock; - public final IBlockState finalState; - - public TeleposeEvent(World wi, BlockPos posi, IBlockState statei, World wf, BlockPos posf, IBlockState statef) { - initialWorld = wi; - initialPos = posi; + public TeleposeEvent(World wi, BlockPos posi, IBlockState statei, World wf, BlockPos posf, IBlockState statef) + { + initialWorld = wi; + initialPos = posi; - initialState = statei; - initialBlock = initialState.getBlock(); + initialState = statei; + initialBlock = initialState.getBlock(); - finalWorld = wf; - finalPos = posf; + finalWorld = wf; + finalPos = posf; - finalState = statef; - finalBlock = finalState.getBlock(); - } + finalState = statef; + finalBlock = finalState.getBlock(); + } - public TileEntity getInitialTile() { + public TileEntity getInitialTile() { return initialWorld.getTileEntity(initialPos); } - public TileEntity getFinalTile() { + public TileEntity getFinalTile() { return finalWorld.getTileEntity(finalPos); } - } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/harvest/HarvestRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/harvest/HarvestRegistry.java index bc30ddc8..2d5e884b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/harvest/HarvestRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/harvest/HarvestRegistry.java @@ -10,7 +10,7 @@ import net.minecraft.world.World; public class HarvestRegistry { - public static List<IHarvestHandler> handlerList = new ArrayList(); + public static List<IHarvestHandler> handlerList = new ArrayList<IHarvestHandler>(); public static void registerHarvestHandler(IHarvestHandler handler) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java index 4d5b1fd2..40773cb5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java @@ -252,7 +252,7 @@ public class ItemSpellMultiTool extends Item public Set<String> getToolClasses(ItemStack stack) { - Set<String> set = new HashSet(); + Set<String> set = new HashSet<String>(); if (this.getHarvestLevel(stack, "pickaxe") > -1) { @@ -369,7 +369,7 @@ public class ItemSpellMultiTool extends Item MovingObjectPosition mop = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, false); - int cost = 0; + int cost; if (mop != null && mop.typeOfHit.equals(MovingObjectPosition.MovingObjectType.BLOCK)) { @@ -549,10 +549,7 @@ public class ItemSpellMultiTool extends Item public void setDuration(ItemStack container, World world, int duration) { - if (world.isRemote) - { - return; - } else + if (!world.isRemote) { World overWorld = DimensionManager.getWorld(0); long worldtime = overWorld.getTotalWorldTime(); @@ -632,10 +629,10 @@ public class ItemSpellMultiTool extends Item NBTTagList tagList = tagiest.getTagList("Effects", Constants.NBT.TAG_COMPOUND); - List<SpellEffect> spellEffectList = new LinkedList(); + List<SpellEffect> spellEffectList = new LinkedList<SpellEffect>(); for (int i = 0; i < tagList.tagCount(); i++) { - NBTTagCompound tag = (NBTTagCompound) tagList.getCompoundTagAt(i); + NBTTagCompound tag = tagList.getCompoundTagAt(i); SpellEffect eff = SpellEffect.getEffectFromTag(tag); if (eff != null) @@ -729,10 +726,10 @@ public class ItemSpellMultiTool extends Item NBTTagList tagList = tagiest.getTagList("ToolTips", Constants.NBT.TAG_COMPOUND); - List<String> toolTipList = new LinkedList(); + List<String> toolTipList = new LinkedList<String>(); for (int i = 0; i < tagList.tagCount(); i++) { - NBTTagCompound tag = (NBTTagCompound) tagList.getCompoundTagAt(i); + NBTTagCompound tag = tagList.getCompoundTagAt(i); String str = tag.getString("tip"); if (str != null) diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapelessBloodOrbRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapelessBloodOrbRecipe.java index 44514568..0040f745 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapelessBloodOrbRecipe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapelessBloodOrbRecipe.java @@ -134,7 +134,7 @@ public class ShapelessBloodOrbRecipe implements IRecipe //If target is integer, then we should be check the blood orb value of the item instead if (next instanceof Integer) { - if (slot != null && slot.getItem() instanceof IBloodOrb) + if (slot.getItem() instanceof IBloodOrb) { IBloodOrb orb = (IBloodOrb) slot.getItem(); if (orb.getOrbLevel() < (Integer) next) diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IRitualDiviner.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IRitualDiviner.java index 03094a88..2189a6ed 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IRitualDiviner.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IRitualDiviner.java @@ -2,13 +2,21 @@ package WayofTime.alchemicalWizardry.api.items.interfaces; import net.minecraft.item.ItemStack; -public interface IRitualDiviner { +public interface IRitualDiviner +{ int cycleDirection(ItemStack stack); + String getCurrentRitual(ItemStack stack); + int getDirection(ItemStack stack); + int getMaxRuneDisplacement(ItemStack stack); + String getNameForDirection(int direction); + void setCurrentRitual(ItemStack stack, String ritualID); + void setDirection(ItemStack stack, int direction); + void setMaxRuneDisplacement(ItemStack stack, int displacement); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java index 15a558d9..8bbe8397 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java @@ -17,10 +17,7 @@ public abstract class RitualEffect return true; } - public void onRitualBroken(IMasterRitualStone ritualStone, RitualBreakMethod method) - { - - } + public void onRitualBroken(IMasterRitualStone ritualStone, RitualBreakMethod method) {} public abstract int getCostPerRefresh(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java index 8be6be44..a45f0fd1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java @@ -26,8 +26,8 @@ public class Rituals public final MRSRenderer customRenderer; - public static Map<String, Rituals> ritualMap = new HashMap(); - public static List<String> keyList = new LinkedList(); + public static Map<String, Rituals> ritualMap = new HashMap<String, Rituals>(); + public static List<String> keyList = new LinkedList<String>(); public Rituals(int crystalLevel, int actCost, RitualEffect effect, String name, MRSRenderer renderer) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/ComplexNetworkHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/ComplexNetworkHandler.java index 8d351d1e..0718624a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/ComplexNetworkHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/ComplexNetworkHandler.java @@ -23,7 +23,7 @@ import com.google.gson.GsonBuilder; public class ComplexNetworkHandler { public static String fileName = "config/BloodMagic/soulnetworkKeys"; - static HashMap<UUID, String> keyMap = new HashMap(); + static HashMap<UUID, String> keyMap = new HashMap<UUID, String>(); public static UUID getUUIDFromPlayer(EntityPlayer player) { return player.getPersistentID(); @@ -70,9 +70,8 @@ public class ComplexNetworkHandler try { br = new BufferedReader(new FileReader(save)); - HashMap schema = gson.fromJson(br, keyMap.getClass()); - - keyMap = schema; + + keyMap = gson.fromJson(br, keyMap.getClass()); if(keyMap != null) { @@ -86,7 +85,6 @@ public class ComplexNetworkHandler e.printStackTrace(); } } - else { keyMap = null; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java index 556f6c0a..c4afda4e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java @@ -45,10 +45,10 @@ public class EntitySpellProjectile extends Entity implements IProjectile //Custom variables private int maxRicochet = 0; private float damage = 1; - public List<IProjectileImpactEffect> impactList = new ArrayList(); + public List<IProjectileImpactEffect> impactList = new ArrayList<IProjectileImpactEffect>(); private boolean penetration = false; - public List<IProjectileUpdateEffect> updateEffectList = new ArrayList(); - public List<SpellEffect> spellEffectList = new LinkedList(); + public List<IProjectileUpdateEffect> updateEffectList = new ArrayList<IProjectileUpdateEffect>(); + public List<SpellEffect> spellEffectList = new LinkedList<SpellEffect>(); private int blocksBroken = 0; public EntitySpellProjectile(World par1World) @@ -323,7 +323,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile NBTTagList tagList = par1NBTTagCompound.getTagList("Effects", Constants.NBT.TAG_COMPOUND); - List<SpellEffect> spellEffectList = new LinkedList(); + List<SpellEffect> spellEffectList = new LinkedList<SpellEffect>(); for (int i = 0; i < tagList.tagCount(); i++) { NBTTagCompound tag = tagList.getCompoundTagAt(i); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffectRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffectRegistry.java index f217b12a..fcdd82f5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffectRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffectRegistry.java @@ -8,9 +8,9 @@ import java.util.Map.Entry; public class SpellEffectRegistry { - public static Map<Class<? extends SpellParadigm>, List<ComplexSpellEffect>> effectRegistry = new HashMap(); - public static Map<String, ComplexSpellType> typeRegistry = new HashMap(); - public static Map<String, ComplexSpellModifier> modifierRegistry = new HashMap(); + public static Map<Class<? extends SpellParadigm>, List<ComplexSpellEffect>> effectRegistry = new HashMap<Class<? extends SpellParadigm>, List<ComplexSpellEffect>>(); + public static Map<String, ComplexSpellType> typeRegistry = new HashMap<String, ComplexSpellType>(); + public static Map<String, ComplexSpellModifier> modifierRegistry = new HashMap<String, ComplexSpellModifier>(); public static void registerSpellEffect(Class<? extends SpellParadigm> paraClass, ComplexSpellEffect effect) { @@ -43,7 +43,7 @@ public class SpellEffectRegistry effectList.add(effect); }else { - List<ComplexSpellEffect> effectList = new LinkedList(); + List<ComplexSpellEffect> effectList = new LinkedList<ComplexSpellEffect>(); effectList.add(effect); effectRegistry.put(paraClass, effectList); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigm.java index 5423cb4f..4f72d4ff 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigm.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigm.java @@ -9,7 +9,7 @@ import net.minecraft.world.World; public abstract class SpellParadigm { - protected List<SpellEffect> bufferedEffectList = new LinkedList(); + protected List<SpellEffect> bufferedEffectList = new LinkedList<SpellEffect>(); public void addBufferedEffect(SpellEffect effect) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmMelee.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmMelee.java index 629f7dba..12023f7a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmMelee.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmMelee.java @@ -15,15 +15,12 @@ public class SpellParadigmMelee extends SpellParadigm public SpellParadigmMelee() { - this.entityEffectList = new ArrayList(); - this.worldEffectList = new ArrayList(); + this.entityEffectList = new ArrayList<IMeleeSpellEntityEffect>(); + this.worldEffectList = new ArrayList<IMeleeSpellWorldEffect>(); } @Override - public void enhanceParadigm(SpellEnhancement enh) - { - - } + public void enhanceParadigm(SpellEnhancement enh) {} @Override public void castSpell(World world, EntityPlayer entityPlayer, ItemStack itemStack) diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmProjectile.java index 8b6f6a31..f1a33800 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmProjectile.java @@ -25,8 +25,8 @@ public class SpellParadigmProjectile extends SpellParadigm this.damageSource = DamageSource.generic; this.damage = 1; this.cost = 0; - this.impactList = new ArrayList(); - this.updateEffectList = new ArrayList(); + this.impactList = new ArrayList<IProjectileImpactEffect>(); + this.updateEffectList = new ArrayList<IProjectileUpdateEffect>(); this.penetration = false; this.ricochetMax = 0; this.isSilkTouch = false; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmSelf.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmSelf.java index 89cffe07..91c6ab1d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmSelf.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmSelf.java @@ -14,14 +14,11 @@ public class SpellParadigmSelf extends SpellParadigm public SpellParadigmSelf() { - selfSpellEffectList = new ArrayList(); + selfSpellEffectList = new ArrayList<ISelfSpellEffect>(); } @Override - public void enhanceParadigm(SpellEnhancement enh) - { - - } + public void enhanceParadigm(SpellEnhancement enh) {} @Override public void castSpell(World world, EntityPlayer entityPlayer, ItemStack itemStack) diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmTool.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmTool.java index 137742c6..e61795b9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmTool.java @@ -49,31 +49,31 @@ public class SpellParadigmTool extends SpellParadigm public SpellParadigmTool() { - this.leftClickEffectList = new LinkedList(); - this.rightClickEffectList = new LinkedList(); - this.toolUpdateEffectList = new LinkedList(); - this.toolSummonEffectList = new LinkedList(); - this.toolBanishEffectList = new LinkedList(); - this.breakBlockEffectList = new LinkedList(); - this.itemManipulatorEffectList = new LinkedList(); - this.digAreaEffectList = new LinkedList(); - this.specialDamageEffectList = new LinkedList(); - this.durationHash = new HashMap(); + this.leftClickEffectList = new LinkedList<ILeftClickEffect>(); + this.rightClickEffectList = new LinkedList<IRightClickEffect>(); + this.toolUpdateEffectList = new LinkedList<IToolUpdateEffect>(); + this.toolSummonEffectList = new LinkedList<IOnSummonTool>(); + this.toolBanishEffectList = new LinkedList<IOnBanishTool>(); + this.breakBlockEffectList = new LinkedList<IOnBreakBlock>(); + this.itemManipulatorEffectList = new LinkedList<IItemManipulator>(); + this.digAreaEffectList = new LinkedList<IDigAreaEffect>(); + this.specialDamageEffectList = new LinkedList<ISpecialDamageEffect>(); + this.durationHash = new HashMap<String, Integer>(); - this.toolInfoString = new HashMap(); - this.critChanceHash = new HashMap(); + this.toolInfoString = new HashMap<String, String>(); + this.critChanceHash = new HashMap<String, Float>(); - this.harvestLevel = new HashMap(); + this.harvestLevel = new HashMap<String, Integer>(); this.harvestLevel.put("pickaxe", -1); this.harvestLevel.put("shovel", -1); this.harvestLevel.put("axe", -1); - this.digSpeed = new HashMap(); + this.digSpeed = new HashMap<String, Float>(); this.digSpeed.put("pickaxe", 1.0f); this.digSpeed.put("shovel", 1.0f); this.digSpeed.put("axe", 1.0f); - this.maxDamageHash = new HashMap(); + this.maxDamageHash = new HashMap<String, Float>(); this.maxDamageHash.put("default", 5.0f); this.fortuneLevel = 0; @@ -356,8 +356,7 @@ public class SpellParadigmTool extends SpellParadigm for (IItemManipulator eff : this.itemManipulatorEffectList) { - List<ItemStack> newHeldList = eff.handleItemsOnBlockBroken(toolStack, heldList); - heldList = newHeldList; + heldList = eff.handleItemsOnBlockBroken(toolStack, heldList); } return heldList; @@ -465,7 +464,7 @@ public class SpellParadigmTool extends SpellParadigm public float getAddedDamageForEntity(Entity entity) { - HashMap<String, Float> hash = new HashMap(); + HashMap<String, Float> hash = new HashMap<String, Float>(); for (ISpecialDamageEffect effect : this.specialDamageEffectList) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistry.java index 18180d8c..01c065f8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistry.java @@ -9,7 +9,7 @@ import java.util.List; public class SummoningRegistry { - public static List<SummoningRegistryComponent> summoningList = new ArrayList(); + public static List<SummoningRegistryComponent> summoningList = new ArrayList<SummoningRegistryComponent>(); public static void registerSummon(SummoningHelper s, ItemStack[] ring1, ItemStack[] ring2, ItemStack[] ring3, int amountUsed, int bloodOrbLevel) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/BlockRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/client/BlockRenderer.java index 5c0d5ef2..8ade0296 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/BlockRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/BlockRenderer.java @@ -11,9 +11,4 @@ public class BlockRenderer { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation("alchemicalwizardry:" + block.getUnlocalizedName().substring(5), "inventory")); } - - public static void registerBlocks() - { - - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java b/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java index 911fc563..3c5f4b04 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java @@ -41,7 +41,7 @@ import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazooka import WayofTime.alchemicalWizardry.common.entity.projectile.EntityMeteor; import WayofTime.alchemicalWizardry.common.entity.projectile.EntityParticleBeam; import WayofTime.alchemicalWizardry.common.items.sigil.holding.ScrollHelper; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderAlchemicCalcinator; +import WayofTime.alchemicalWizardry.common.renderer.block.RenderAlchemicalCalcinator; import WayofTime.alchemicalWizardry.common.renderer.block.RenderConduit; import WayofTime.alchemicalWizardry.common.renderer.block.RenderCrystalBelljar; import WayofTime.alchemicalWizardry.common.renderer.block.RenderMasterStone; @@ -52,9 +52,8 @@ import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellEffectBlock import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellEnhancementBlock; import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellModifierBlock; import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellParadigmBlock; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderWritingTable; -import WayofTime.alchemicalWizardry.common.renderer.block.ShaderHelper; -import WayofTime.alchemicalWizardry.common.renderer.block.TEAltarRenderer; +import WayofTime.alchemicalWizardry.common.renderer.block.RenderChemistrySet; +import WayofTime.alchemicalWizardry.common.renderer.block.RenderAltar; import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEAlchemicalCalcinatorItemRenderer; import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEAltarItemRenderer; import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEBellJarItemRenderer; @@ -149,10 +148,10 @@ public class ClientProxy extends CommonProxy MinecraftForge.EVENT_BUS.register(new RitualDivinerRender()); - ClientRegistry.bindTileEntitySpecialRenderer(TEAltar.class, new TEAltarRenderer()); + ClientRegistry.bindTileEntitySpecialRenderer(TEAltar.class, new RenderAltar()); ClientRegistry.bindTileEntitySpecialRenderer(TEPedestal.class, new RenderPedestal()); ClientRegistry.bindTileEntitySpecialRenderer(TEPlinth.class, new RenderPlinth()); - ClientRegistry.bindTileEntitySpecialRenderer(TEChemistrySet.class, new RenderWritingTable()); + ClientRegistry.bindTileEntitySpecialRenderer(TEChemistrySet.class, new RenderChemistrySet()); ClientRegistry.bindTileEntitySpecialRenderer(TEConduit.class, new RenderConduit()); ClientRegistry.bindTileEntitySpecialRenderer(TESpellEffectBlock.class, new RenderSpellEffectBlock()); ClientRegistry.bindTileEntitySpecialRenderer(TESpellEnhancementBlock.class, new RenderSpellEnhancementBlock()); @@ -160,7 +159,7 @@ public class ClientProxy extends CommonProxy ClientRegistry.bindTileEntitySpecialRenderer(TESpellModifierBlock.class, new RenderSpellModifierBlock()); ClientRegistry.bindTileEntitySpecialRenderer(TEReagentConduit.class, new RenderReagentConduit()); ClientRegistry.bindTileEntitySpecialRenderer(TEMasterStone.class, new RenderMasterStone()); - ClientRegistry.bindTileEntitySpecialRenderer(TEAlchemicalCalcinator.class, new RenderAlchemicCalcinator()); + ClientRegistry.bindTileEntitySpecialRenderer(TEAlchemicalCalcinator.class, new RenderAlchemicalCalcinator()); ClientRegistry.bindTileEntitySpecialRenderer(TEBelljar.class, new RenderCrystalBelljar()); //Item Renderer stuff @@ -181,7 +180,7 @@ public class ClientProxy extends CommonProxy } @Override - public void InitRendering() + public void initRendering() { MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockAltar), new TEAltarItemRenderer()); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGuiFactory.java b/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGuiFactory.java index 9cea4d60..6413230c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGuiFactory.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGuiFactory.java @@ -9,9 +9,7 @@ import net.minecraftforge.fml.client.IModGuiFactory; public class ConfigGuiFactory implements IModGuiFactory { @Override - public void initialize(Minecraft minecraftInstance) { - - } + public void initialize(Minecraft minecraftInstance) {} @Override public Class<? extends GuiScreen> mainConfigGuiClass() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAlchemyRecipeHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAlchemyRecipeHandler.java index 55608511..c92c0b0f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAlchemyRecipeHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAlchemyRecipeHandler.java @@ -1,178 +1,178 @@ -//package WayofTime.alchemicalWizardry.client.nei; -// -//import static WayofTime.alchemicalWizardry.client.nei.NEIConfig.bloodOrbs; -// -//import java.awt.Rectangle; -//import java.util.ArrayList; -//import java.util.List; -// -//import net.minecraft.client.Minecraft; -//import net.minecraft.client.gui.inventory.GuiContainer; -//import net.minecraft.item.Item; -//import net.minecraft.item.ItemStack; -//import net.minecraft.util.ResourceLocation; -//import net.minecraft.util.StatCollector; -//import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe; -//import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -//import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -//import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiWritingTable; -//import codechicken.nei.ItemList; -//import codechicken.nei.NEIServerUtils; -//import codechicken.nei.PositionedStack; -//import codechicken.nei.recipe.TemplateRecipeHandler; -// -///** -// * NEI Alchemy Recipe Handler by joshie * -// */ -//public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler { -// public class CachedAlchemyRecipe extends CachedRecipe { -// public class BloodOrbs { -// public PositionedStack stack; -// -// public BloodOrbs(ItemStack orb) { -// this.stack = new PositionedStack(orb, 136, 47, false); -// } -// } -// -// ArrayList<BloodOrbs> orbs; -// PositionedStack output; -// List<PositionedStack> inputs; -// int lp; -// -// public CachedAlchemyRecipe(AlchemyRecipe recipe, ItemStack orb) { -// this(recipe); -// this.orbs = new ArrayList<BloodOrbs>(); -// orbs.add(new BloodOrbs(orb)); -// } -// -// public CachedAlchemyRecipe(AlchemyRecipe recipe) { -// List<PositionedStack> inputs = new ArrayList<PositionedStack>(); -// ItemStack[] stacks = recipe.getRecipe(); -// if (stacks.length > 0) inputs.add(new PositionedStack(stacks[0], 76, 3)); -// if (stacks.length > 1) inputs.add(new PositionedStack(stacks[1], 51, 19)); -// if (stacks.length > 2) inputs.add(new PositionedStack(stacks[2], 101, 19)); -// if (stacks.length > 3) inputs.add(new PositionedStack(stacks[3], 64, 47)); -// if (stacks.length > 4) inputs.add(new PositionedStack(stacks[4], 88, 47)); -// this.inputs = inputs; -// this.output = new PositionedStack(recipe.getResult(), 76, 25); -// this.lp = recipe.getAmountNeeded() * 100; -// this.orbs = new ArrayList<BloodOrbs>(); -// for (Item orb : bloodOrbs) { -// if (((IBloodOrb) orb).getOrbLevel() >= recipe.getOrbLevel()) { -// orbs.add(new BloodOrbs(new ItemStack(orb))); -// } -// } -// } -// -// @Override -// public List<PositionedStack> getIngredients() { -// return inputs; -// } -// -// @Override -// public PositionedStack getResult() { -// return output; -// } -// -// @Override -// public PositionedStack getOtherStack() { -// if (orbs == null || orbs.size() <= 0) return null; -// return orbs.get((cycleticks / 48) % orbs.size()).stack; -// } -// } -// -// @Override -// public TemplateRecipeHandler newInstance() { -// for (ItemStack item : ItemList.items) { -// if (item != null && item.getItem() instanceof IBloodOrb) { -// bloodOrbs.add(item.getItem()); -// } -// } -// -// return super.newInstance(); -// } -// -// @Override -// public String getOverlayIdentifier() { -// return "alchemicalwizardry.alchemy"; -// } -// -// @Override -// public void loadTransferRects() { -// transferRects.add(new RecipeTransferRect(new Rectangle(134, 22, 16, 24), "alchemicalwizardry.alchemy")); -// } -// -// @Override -// public Class<? extends GuiContainer> getGuiClass() { -// return GuiWritingTable.class; -// } -// -// @Override -// public void loadCraftingRecipes(String outputId, Object... results) { -// if (outputId.equals("alchemicalwizardry.alchemy") && getClass() == NEIAlchemyRecipeHandler.class) { -// for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) { -// if (recipe.getResult() != null) arecipes.add(new CachedAlchemyRecipe(recipe)); -// } -// } else { -// super.loadCraftingRecipes(outputId, results); -// } -// } -// -// @Override -// public void loadCraftingRecipes(ItemStack result) { -// for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) { -// if (recipe == null) continue; -// if (NEIServerUtils.areStacksSameTypeCrafting(result, recipe.getResult())) { -// arecipes.add(new CachedAlchemyRecipe(recipe)); -// } -// } -// } -// -// @Override -// public void loadUsageRecipes(ItemStack ingredient) { -// if (ingredient.getItem() instanceof IBloodOrb) { -// for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) { -// if (recipe == null) continue; -// if (((IBloodOrb) ingredient.getItem()).getOrbLevel() >= recipe.getOrbLevel()) { -// arecipes.add(new CachedAlchemyRecipe(recipe, ingredient)); -// } -// } -// } else { -// for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) { -// if (recipe == null) continue; -// ItemStack[] stacks = recipe.getRecipe(); -// for (ItemStack stack : stacks) { -// if (NEIServerUtils.areStacksSameTypeCrafting(stack, ingredient)) { -// arecipes.add(new CachedAlchemyRecipe(recipe)); -// break; -// } -// } -// } -// } -// } -// -// @Override -// public void drawExtras(int id) { -// CachedAlchemyRecipe cache = (CachedAlchemyRecipe) arecipes.get(id); -// Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + cache.lp + "LP", getLPX(cache.lp), 34, 0); -// } -// -// public int getLPX(int lp) { -// if (lp < 10) return 122; -// else if (lp < 100) return 122; -// else if (lp < 1000) return 130; -// else if (lp < 10000) return 127; -// else if (lp < 100000) return 124; -// return 122; -// } -// -// @Override -// public String getRecipeName() { -// return StatCollector.translateToLocal("tile.blockWritingTable.name"); -// } -// -// @Override -// public String getGuiTexture() { -// return new ResourceLocation("alchemicalwizardry", "gui/nei/alchemy.png").toString(); -// } -//} +package WayofTime.alchemicalWizardry.client.nei; + +import static WayofTime.alchemicalWizardry.client.nei.NEIConfig.bloodOrbs; + +import java.awt.Rectangle; +import java.util.ArrayList; +import java.util.List; + +import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiChemistrySet; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; +import codechicken.nei.ItemList; +import codechicken.nei.NEIServerUtils; +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.TemplateRecipeHandler; + +/** + * NEI Alchemy Recipe Handler by joshie * + */ +public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler { + public class CachedAlchemyRecipe extends CachedRecipe { + public class BloodOrbs { + public PositionedStack stack; + + public BloodOrbs(ItemStack orb) { + this.stack = new PositionedStack(orb, 136, 47, false); + } + } + + ArrayList<BloodOrbs> orbs; + PositionedStack output; + List<PositionedStack> inputs; + int lp; + + public CachedAlchemyRecipe(AlchemyRecipe recipe, ItemStack orb) { + this(recipe); + this.orbs = new ArrayList<BloodOrbs>(); + orbs.add(new BloodOrbs(orb)); + } + + public CachedAlchemyRecipe(AlchemyRecipe recipe) { + List<PositionedStack> inputs = new ArrayList<PositionedStack>(); + ItemStack[] stacks = recipe.getRecipe(); + if (stacks.length > 0) inputs.add(new PositionedStack(stacks[0], 76, 3)); + if (stacks.length > 1) inputs.add(new PositionedStack(stacks[1], 51, 19)); + if (stacks.length > 2) inputs.add(new PositionedStack(stacks[2], 101, 19)); + if (stacks.length > 3) inputs.add(new PositionedStack(stacks[3], 64, 47)); + if (stacks.length > 4) inputs.add(new PositionedStack(stacks[4], 88, 47)); + this.inputs = inputs; + this.output = new PositionedStack(recipe.getResult(), 76, 25); + this.lp = recipe.getAmountNeeded() * 100; + this.orbs = new ArrayList<BloodOrbs>(); + for (Item orb : bloodOrbs) { + if (((IBloodOrb) orb).getOrbLevel() >= recipe.getOrbLevel()) { + orbs.add(new BloodOrbs(new ItemStack(orb))); + } + } + } + + @Override + public List<PositionedStack> getIngredients() { + return inputs; + } + + @Override + public PositionedStack getResult() { + return output; + } + + @Override + public PositionedStack getOtherStack() { + if (orbs == null || orbs.size() <= 0) return null; + return orbs.get((cycleticks / 48) % orbs.size()).stack; + } + } + + @Override + public TemplateRecipeHandler newInstance() { + for (ItemStack item : ItemList.items) { + if (item != null && item.getItem() instanceof IBloodOrb) { + bloodOrbs.add(item.getItem()); + } + } + + return super.newInstance(); + } + + @Override + public String getOverlayIdentifier() { + return "alchemicalwizardry.alchemy"; + } + + @Override + public void loadTransferRects() { + transferRects.add(new RecipeTransferRect(new Rectangle(134, 22, 16, 24), "alchemicalwizardry.alchemy")); + } + + @Override + public Class<? extends GuiContainer> getGuiClass() { + return GuiChemistrySet.class; + } + + @Override + public void loadCraftingRecipes(String outputId, Object... results) { + if (outputId.equals("alchemicalwizardry.alchemy") && getClass() == NEIAlchemyRecipeHandler.class) { + for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) { + if (recipe.getResult() != null) arecipes.add(new CachedAlchemyRecipe(recipe)); + } + } else { + super.loadCraftingRecipes(outputId, results); + } + } + + @Override + public void loadCraftingRecipes(ItemStack result) { + for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) { + if (recipe == null) continue; + if (NEIServerUtils.areStacksSameTypeCrafting(result, recipe.getResult())) { + arecipes.add(new CachedAlchemyRecipe(recipe)); + } + } + } + + @Override + public void loadUsageRecipes(ItemStack ingredient) { + if (ingredient.getItem() instanceof IBloodOrb) { + for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) { + if (recipe == null) continue; + if (((IBloodOrb) ingredient.getItem()).getOrbLevel() >= recipe.getOrbLevel()) { + arecipes.add(new CachedAlchemyRecipe(recipe, ingredient)); + } + } + } else { + for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) { + if (recipe == null) continue; + ItemStack[] stacks = recipe.getRecipe(); + for (ItemStack stack : stacks) { + if (NEIServerUtils.areStacksSameTypeCrafting(stack, ingredient)) { + arecipes.add(new CachedAlchemyRecipe(recipe)); + break; + } + } + } + } + } + + @Override + public void drawExtras(int id) { + CachedAlchemyRecipe cache = (CachedAlchemyRecipe) arecipes.get(id); + Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + cache.lp + "LP", getLPX(cache.lp), 34, 0); + } + + public int getLPX(int lp) { + if (lp < 10) return 122; + else if (lp < 100) return 122; + else if (lp < 1000) return 130; + else if (lp < 10000) return 127; + else if (lp < 100000) return 124; + return 122; + } + + @Override + public String getRecipeName() { + return StatCollector.translateToLocal("tile.blockWritingTable.name"); + } + + @Override + public String getGuiTexture() { + return new ResourceLocation("alchemicalwizardry", "gui/nei/alchemy.png").toString(); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAltarRecipeHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAltarRecipeHandler.java index 0b264e4a..c932f60a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAltarRecipeHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAltarRecipeHandler.java @@ -1,187 +1,187 @@ -//package WayofTime.alchemicalWizardry.client.nei; -// -//import java.awt.Dimension; -//import java.awt.Point; -//import java.awt.Rectangle; -//import java.lang.reflect.Field; -//import java.util.List; -// -//import net.minecraft.client.Minecraft; -//import net.minecraft.client.gui.ScaledResolution; -//import net.minecraft.item.ItemStack; -//import net.minecraft.util.ResourceLocation; -//import net.minecraft.util.StatCollector; -// -//import org.lwjgl.input.Mouse; -// -//import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; -//import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; -//import codechicken.nei.NEIServerUtils; -//import codechicken.nei.PositionedStack; -//import codechicken.nei.recipe.GuiRecipe; -//import codechicken.nei.recipe.TemplateRecipeHandler; -// -///** -// * NEI Altar Recipe Handler by joshie * -// */ -//public class NEIAltarRecipeHandler extends TemplateRecipeHandler { -// public class CachedAltarRecipe extends CachedRecipe { -// PositionedStack input; -//// PositionedStack inputItems; -// PositionedStack output; -// int tier, lp_amount, consumption, drain; -// -// public CachedAltarRecipe(AltarRecipe recipe) { -//// inputItems = new PositionedStack(recipe.input, 38, 2, false); -// input = new PositionedStack(recipe.requiredItem, 38, 2, false); -// output = new PositionedStack(recipe.result, 132, 32, false); -// tier = recipe.minTier; -// lp_amount = recipe.liquidRequired; -// consumption = recipe.consumptionRate; -// drain = recipe.drainRate; -// } -// -// @Override -// public PositionedStack getIngredient() { -// return input; -// } -// -// @Override -// public PositionedStack getResult() { -// return output; -// } -// } -// -// @Override -// public void loadCraftingRecipes(String outputId, Object... results) { -// if (outputId.equals("alchemicalwizardry.altar") && getClass() == NEIAltarRecipeHandler.class) { -// for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) { -// if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe)); -// } -// } else { -// super.loadCraftingRecipes(outputId, results); -// } -// } -// -// @Override -// public void loadCraftingRecipes(ItemStack result) { -// for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) { -// if(NEIServerUtils.areStacksSameTypeCrafting(recipe.result, result)) { -// if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe)); -// } -// } -// } -// -// @Override -// public void loadUsageRecipes(ItemStack ingredient) { -// for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) { -// if(NEIServerUtils.areStacksSameTypeCrafting(recipe.requiredItem, ingredient)) { -// if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe)); -// } -// } -// } -// -// //Mouse Position helper -// public Point getMouse(int width, int height) { -// Point mousepos = getMousePosition(); -// int guiLeft = (width - 176) / 2; -// int guiTop = (height - 166) / 2; -// Point relMouse = new Point(mousepos.x - guiLeft, mousepos.y - guiTop); -// return relMouse; -// } -// -// //width helper, getting width normal way hates me on compile -// public int getGuiWidth(GuiRecipe gui) { -// try { -// Field f = gui.getClass().getField("width"); -// return (Integer) f.get(gui); -// } catch (NoSuchFieldException e) { -// try { -// Field f = gui.getClass().getField("field_146294_l"); -// return (Integer) f.get(gui); -// } catch (Exception e2) { -// return 0; -// } -// } catch (Exception e) { -// e.printStackTrace(); -// return 0; -// } -// } -// -// //height helper, getting height normal way hates me on compile -// public int getGuiHeight(GuiRecipe gui) { -// try { -// Field f = gui.getClass().getField("height"); -// return (Integer) f.get(gui); -// } catch (NoSuchFieldException e) { -// try { -// Field f = gui.getClass().getField("field_146295_m"); -// return (Integer) f.get(gui); -// } catch (Exception e2) { -// return 0; -// } -// } catch (Exception e) { -// e.printStackTrace(); -// return 0; -// } -// } -// -// @Override -// public void drawExtras(int id) { -// CachedAltarRecipe recipe = (CachedAltarRecipe) arecipes.get(id); -// Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + StatCollector.translateToLocal("bm.string.tier") + ": " + recipe.tier, 78, 5, 0); -// Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + "LP: " + recipe.lp_amount, 78, 15, 0); -// } -// -// @Override -// public List<String> handleTooltip(GuiRecipe gui, List<String> currenttip, int id) { -// currenttip = super.handleTooltip(gui, currenttip, id); -// Point mouse = getMouse(getGuiWidth(gui), getGuiHeight(gui)); -// CachedAltarRecipe recipe = (CachedAltarRecipe) arecipes.get(id); -// int yLow = id % 2 == 0 ? 38 : 102; -// int yHigh = id % 2 == 0 ? 72 : 136; -// if(mouse.x >= 19 && mouse.x <= 80 && mouse.y >= yLow && mouse.y <= yHigh) { -// currenttip.add(StatCollector.translateToLocal("bm.string.consume") + ": " + recipe.consumption + "LP/t"); -// currenttip.add(StatCollector.translateToLocal("bm.string.drain") + ": " + recipe.drain + "LP/t"); -// } -// -// return currenttip; -// } -// -// @Override -// public String getOverlayIdentifier() { -// return "altarrecipes"; -// } -// -// @Override -// public void loadTransferRects() { -// transferRects.add(new RecipeTransferRect(new Rectangle(90, 32, 22, 16), "alchemicalwizardry.altar")); -// } -// -// @Override -// public String getRecipeName() { -// return " " + StatCollector.translateToLocal("tile.bloodAltar.name"); -// } -// -// @Override -// public String getGuiTexture() { -// return new ResourceLocation("alchemicalwizardry", "gui/nei/altar.png").toString(); -// } -// -// public static Point getMousePosition() { -// Dimension size = displaySize(); -// Dimension res = displayRes(); -// return new Point(Mouse.getX() * size.width / res.width, size.height - Mouse.getY() * size.height / res.height - 1); -// } -// -// public static Dimension displaySize() { -// Minecraft mc = Minecraft.getMinecraft(); -// ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); -// return new Dimension(res.getScaledWidth(), res.getScaledHeight()); -// } -// -// public static Dimension displayRes() { -// Minecraft mc = Minecraft.getMinecraft(); -// return new Dimension(mc.displayWidth, mc.displayHeight); -// } -//} +package WayofTime.alchemicalWizardry.client.nei; + +import java.awt.Dimension; +import java.awt.Point; +import java.awt.Rectangle; +import java.lang.reflect.Field; +import java.util.List; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; + +import org.lwjgl.input.Mouse; + +import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; +import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; +import codechicken.nei.NEIServerUtils; +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.GuiRecipe; +import codechicken.nei.recipe.TemplateRecipeHandler; + +/** + * NEI Altar Recipe Handler by joshie * + */ +public class NEIAltarRecipeHandler extends TemplateRecipeHandler { + public class CachedAltarRecipe extends CachedRecipe { + PositionedStack input; +// PositionedStack inputItems; + PositionedStack output; + int tier, lp_amount, consumption, drain; + + public CachedAltarRecipe(AltarRecipe recipe) { +// inputItems = new PositionedStack(recipe.input, 38, 2, false); + input = new PositionedStack(recipe.requiredItem, 38, 2, false); + output = new PositionedStack(recipe.result, 132, 32, false); + tier = recipe.minTier; + lp_amount = recipe.liquidRequired; + consumption = recipe.consumptionRate; + drain = recipe.drainRate; + } + + @Override + public PositionedStack getIngredient() { + return input; + } + + @Override + public PositionedStack getResult() { + return output; + } + } + + @Override + public void loadCraftingRecipes(String outputId, Object... results) { + if (outputId.equals("alchemicalwizardry.altar") && getClass() == NEIAltarRecipeHandler.class) { + for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) { + if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe)); + } + } else { + super.loadCraftingRecipes(outputId, results); + } + } + + @Override + public void loadCraftingRecipes(ItemStack result) { + for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) { + if(NEIServerUtils.areStacksSameTypeCrafting(recipe.result, result)) { + if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe)); + } + } + } + + @Override + public void loadUsageRecipes(ItemStack ingredient) { + for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) { + if(NEIServerUtils.areStacksSameTypeCrafting(recipe.requiredItem, ingredient)) { + if(recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe)); + } + } + } + + //Mouse Position helper + public Point getMouse(int width, int height) { + Point mousepos = getMousePosition(); + int guiLeft = (width - 176) / 2; + int guiTop = (height - 166) / 2; + Point relMouse = new Point(mousepos.x - guiLeft, mousepos.y - guiTop); + return relMouse; + } + + //width helper, getting width normal way hates me on compile + public int getGuiWidth(GuiRecipe gui) { + try { + Field f = gui.getClass().getField("width"); + return (Integer) f.get(gui); + } catch (NoSuchFieldException e) { + try { + Field f = gui.getClass().getField("field_146294_l"); + return (Integer) f.get(gui); + } catch (Exception e2) { + return 0; + } + } catch (Exception e) { + e.printStackTrace(); + return 0; + } + } + + //height helper, getting height normal way hates me on compile + public int getGuiHeight(GuiRecipe gui) { + try { + Field f = gui.getClass().getField("height"); + return (Integer) f.get(gui); + } catch (NoSuchFieldException e) { + try { + Field f = gui.getClass().getField("field_146295_m"); + return (Integer) f.get(gui); + } catch (Exception e2) { + return 0; + } + } catch (Exception e) { + e.printStackTrace(); + return 0; + } + } + + @Override + public void drawExtras(int id) { + CachedAltarRecipe recipe = (CachedAltarRecipe) arecipes.get(id); + Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + StatCollector.translateToLocal("bm.string.tier") + ": " + recipe.tier, 78, 5, 0); + Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + "LP: " + recipe.lp_amount, 78, 15, 0); + } + + @Override + public List<String> handleTooltip(GuiRecipe gui, List<String> currenttip, int id) { + currenttip = super.handleTooltip(gui, currenttip, id); + Point mouse = getMouse(getGuiWidth(gui), getGuiHeight(gui)); + CachedAltarRecipe recipe = (CachedAltarRecipe) arecipes.get(id); + int yLow = id % 2 == 0 ? 38 : 102; + int yHigh = id % 2 == 0 ? 72 : 136; + if(mouse.x >= 19 && mouse.x <= 80 && mouse.y >= yLow && mouse.y <= yHigh) { + currenttip.add(StatCollector.translateToLocal("bm.string.consume") + ": " + recipe.consumption + "LP/t"); + currenttip.add(StatCollector.translateToLocal("bm.string.drain") + ": " + recipe.drain + "LP/t"); + } + + return currenttip; + } + + @Override + public String getOverlayIdentifier() { + return "altarrecipes"; + } + + @Override + public void loadTransferRects() { + transferRects.add(new RecipeTransferRect(new Rectangle(90, 32, 22, 16), "alchemicalwizardry.altar")); + } + + @Override + public String getRecipeName() { + return " " + StatCollector.translateToLocal("tile.bloodAltar.name"); + } + + @Override + public String getGuiTexture() { + return new ResourceLocation("alchemicalwizardry", "gui/nei/altar.png").toString(); + } + + public static Point getMousePosition() { + Dimension size = displaySize(); + Dimension res = displayRes(); + return new Point(Mouse.getX() * size.width / res.width, size.height - Mouse.getY() * size.height / res.height - 1); + } + + public static Dimension displaySize() { + Minecraft mc = Minecraft.getMinecraft(); + ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); + return new Dimension(res.getScaledWidth(), res.getScaledHeight()); + } + + public static Dimension displayRes() { + Minecraft mc = Minecraft.getMinecraft(); + return new Dimension(mc.displayWidth, mc.displayHeight); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBindingRitualHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBindingRitualHandler.java index 58e9196d..21f2fba8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBindingRitualHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBindingRitualHandler.java @@ -1,136 +1,136 @@ -//package WayofTime.alchemicalWizardry.client.nei; -// -//import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe; -//import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; -//import codechicken.nei.NEIServerUtils; -//import codechicken.nei.PositionedStack; -//import codechicken.nei.recipe.TemplateRecipeHandler; -//import net.minecraft.client.Minecraft; -//import net.minecraft.client.gui.ScaledResolution; -//import net.minecraft.item.ItemStack; -//import net.minecraft.util.ResourceLocation; -//import org.lwjgl.input.Mouse; -// -//import java.awt.*; -// -///** -// * Binding Ritual Handler by Arcaratus -// */ -//public class NEIBindingRitualHandler extends TemplateRecipeHandler -//{ -// public class CachedBindingRecipe extends CachedRecipe -// { -// PositionedStack input, output; -// -// public CachedBindingRecipe(BindingRecipe recipe) -// { -// input = new PositionedStack(recipe.requiredItem, 37, 21, false); -// output = new PositionedStack(recipe.outputItem, 110, 21, false); -// } -// -// @Override -// public PositionedStack getIngredient() -// { -// return input; -// } -// -// @Override -// public PositionedStack getResult() -// { -// return output; -// } -// } -// -// @Override -// public void loadCraftingRecipes(String outputId, Object... results) -// { -// if (outputId.equals("alchemicalwizardry.bindingritual") && getClass() == NEIBindingRitualHandler.class) -// { -// for (BindingRecipe recipe : BindingRegistry.bindingRecipes) -// { -// if (recipe != null && recipe.outputItem != null) -// { -// arecipes.add(new CachedBindingRecipe(recipe)); -// } -// } -// } -// else -// { -// super.loadCraftingRecipes(outputId, results); -// } -// } -// -// @Override -// public void loadCraftingRecipes(ItemStack result) -// { -// for (BindingRecipe recipe: BindingRegistry.bindingRecipes) -// { -// if (NEIServerUtils.areStacksSameTypeCrafting(recipe.outputItem, result)) -// { -// if (recipe != null && recipe.outputItem != null) -// { -// arecipes.add(new CachedBindingRecipe(recipe)); -// } -// } -// } -// } -// -// @Override -// public void loadUsageRecipes(ItemStack ingredient) -// { -// for (BindingRecipe recipe: BindingRegistry.bindingRecipes) -// { -// if (NEIServerUtils.areStacksSameTypeCrafting(recipe.requiredItem, ingredient)) -// { -// if (recipe != null && recipe.outputItem != null) -// { -// arecipes.add(new CachedBindingRecipe(recipe)); -// } -// } -// } -// } -// -// @Override -// public String getOverlayIdentifier() -// { -// return "alchemicalwizardry.bindingritual"; -// } -// -// @Override -// public void loadTransferRects() -// { -// transferRects.add(new RecipeTransferRect(new Rectangle(68, 20, 22, 16), "alchemicalwizardry.bindingritual")); -// } -// -// @Override -// public String getRecipeName() -// { -// return "Binding Ritual"; -// } -// -// @Override -// public String getGuiTexture() -// { -// return new ResourceLocation("alchemicalwizardry", "gui/nei/bindingRitual.png").toString(); -// } -// -// public static Point getMousePosition() -// { -// Dimension size = displaySize(); -// Dimension res = displayRes(); -// return new Point(Mouse.getX() * size.width / res.width, size.height - Mouse.getY() * size.height / res.height - 1); -// } -// -// public static Dimension displaySize() -// { -// Minecraft mc = Minecraft.getMinecraft(); -// ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); -// return new Dimension(res.getScaledWidth(), res.getScaledHeight()); -// } -// -// public static Dimension displayRes() -// { -// Minecraft mc = Minecraft.getMinecraft(); -// return new Dimension(mc.displayWidth, mc.displayHeight); -// } -//} \ No newline at end of file +package WayofTime.alchemicalWizardry.client.nei; + +import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe; +import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; +import codechicken.nei.NEIServerUtils; +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.TemplateRecipeHandler; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.input.Mouse; + +import java.awt.*; + +/** + * Binding Ritual Handler by Arcaratus + */ +public class NEIBindingRitualHandler extends TemplateRecipeHandler +{ + public class CachedBindingRecipe extends CachedRecipe + { + PositionedStack input, output; + + public CachedBindingRecipe(BindingRecipe recipe) + { + input = new PositionedStack(recipe.requiredItem, 37, 21, false); + output = new PositionedStack(recipe.outputItem, 110, 21, false); + } + + @Override + public PositionedStack getIngredient() + { + return input; + } + + @Override + public PositionedStack getResult() + { + return output; + } + } + + @Override + public void loadCraftingRecipes(String outputId, Object... results) + { + if (outputId.equals("alchemicalwizardry.bindingritual") && getClass() == NEIBindingRitualHandler.class) + { + for (BindingRecipe recipe : BindingRegistry.bindingRecipes) + { + if (recipe != null && recipe.outputItem != null) + { + arecipes.add(new CachedBindingRecipe(recipe)); + } + } + } + else + { + super.loadCraftingRecipes(outputId, results); + } + } + + @Override + public void loadCraftingRecipes(ItemStack result) + { + for (BindingRecipe recipe: BindingRegistry.bindingRecipes) + { + if (NEIServerUtils.areStacksSameTypeCrafting(recipe.outputItem, result)) + { + if (recipe != null && recipe.outputItem != null) + { + arecipes.add(new CachedBindingRecipe(recipe)); + } + } + } + } + + @Override + public void loadUsageRecipes(ItemStack ingredient) + { + for (BindingRecipe recipe: BindingRegistry.bindingRecipes) + { + if (NEIServerUtils.areStacksSameTypeCrafting(recipe.requiredItem, ingredient)) + { + if (recipe != null && recipe.outputItem != null) + { + arecipes.add(new CachedBindingRecipe(recipe)); + } + } + } + } + + @Override + public String getOverlayIdentifier() + { + return "alchemicalwizardry.bindingritual"; + } + + @Override + public void loadTransferRects() + { + transferRects.add(new RecipeTransferRect(new Rectangle(68, 20, 22, 16), "alchemicalwizardry.bindingritual")); + } + + @Override + public String getRecipeName() + { + return "Binding Ritual"; + } + + @Override + public String getGuiTexture() + { + return new ResourceLocation("alchemicalwizardry", "gui/nei/bindingRitual.png").toString(); + } + + public static Point getMousePosition() + { + Dimension size = displaySize(); + Dimension res = displayRes(); + return new Point(Mouse.getX() * size.width / res.width, size.height - Mouse.getY() * size.height / res.height - 1); + } + + public static Dimension displaySize() + { + Minecraft mc = Minecraft.getMinecraft(); + ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); + return new Dimension(res.getScaledWidth(), res.getScaledHeight()); + } + + public static Dimension displayRes() + { + Minecraft mc = Minecraft.getMinecraft(); + return new Dimension(mc.displayWidth, mc.displayHeight); + } +} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapedHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapedHandler.java index e67afd56..b32f47cd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapedHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapedHandler.java @@ -1,142 +1,142 @@ -//package WayofTime.alchemicalWizardry.client.nei; -// -//import java.awt.Rectangle; -//import java.util.ArrayList; -//import java.util.List; -// -//import net.minecraft.item.Item; -//import net.minecraft.item.ItemStack; -//import net.minecraft.item.crafting.CraftingManager; -//import net.minecraft.item.crafting.IRecipe; -//import net.minecraft.util.StatCollector; -//import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; -//import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -//import codechicken.nei.NEIServerUtils; -//import codechicken.nei.PositionedStack; -//import codechicken.nei.recipe.ShapedRecipeHandler; -// -///** -// * NEI Blood Orb Shaped Recipe Handler by joshie * -// */ -//public class NEIBloodOrbShapedHandler extends ShapedRecipeHandler { -// public class CachedBloodOrbRecipe extends CachedShapedRecipe { -// public CachedBloodOrbRecipe(int width, int height, Object[] items, ItemStack out) { -// super(width, height, items, out); -// } -// -// @Override -// public void setIngredients(int width, int height, Object[] items) { -// for (int x = 0; x < width; x++) { -// for (int y = 0; y < height; y++) { -// if (items[y * width + x] == null) -// continue; -// -// Object o = items[y * width + x]; -// if (o instanceof ItemStack) { -// PositionedStack stack = new PositionedStack(items[y * width + x], 25 + x * 18, 6 + y * 18, false); -// stack.setMaxSize(1); -// ingredients.add(stack); -// } else if (o instanceof Integer) { -// ArrayList<ItemStack> orbs = new ArrayList(); -// for (Item item : NEIConfig.bloodOrbs) { -// if (((IBloodOrb) item).getOrbLevel() >= (Integer) o) { -// orbs.add(new ItemStack(item)); -// } -// } -// -// PositionedStack stack = new PositionedStack(orbs, 25 + x * 18, 6 + y * 18, false); -// stack.setMaxSize(1); -// ingredients.add(stack); -// }else if(o instanceof List) -// { -// PositionedStack stack = new PositionedStack(o, 25 + x * 18, 6 + y * 18, false); -// stack.setMaxSize(1); -// ingredients.add(stack); -// } -// } -// } -// } -// } -// -// @Override -// public void loadCraftingRecipes(String outputId, Object... results) { -// if (outputId.equals("crafting") && getClass() == NEIBloodOrbShapedHandler.class) { -// for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) { -// if (irecipe instanceof ShapedBloodOrbRecipe) { -// CachedBloodOrbRecipe recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe); -// if (recipe == null) -// continue; -// -// recipe.computeVisuals(); -// arecipes.add(recipe); -// } -// } -// } else { -// super.loadCraftingRecipes(outputId, results); -// } -// } -// -// @Override -// public void loadCraftingRecipes(ItemStack result) { -// for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) { -// if (irecipe instanceof ShapedBloodOrbRecipe) { -// CachedBloodOrbRecipe recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe); -// if (recipe == null || !NEIServerUtils.areStacksSameTypeCrafting(recipe.result.item, result)) -// continue; -// -// recipe.computeVisuals(); -// arecipes.add(recipe); -// } -// } -// } -// -// @Override -// public void loadUsageRecipes(ItemStack ingredient) { -// for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) { -// CachedShapedRecipe recipe = null; -// if (irecipe instanceof ShapedBloodOrbRecipe) -// recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe); -// -// if (recipe == null || !recipe.contains(recipe.ingredients, ingredient.getItem())) -// continue; -// -// recipe.computeVisuals(); -// if (recipe.contains(recipe.ingredients, ingredient)) { -// recipe.setIngredientPermutation(recipe.ingredients, ingredient); -// arecipes.add(recipe); -// } -// } -// } -// -// private CachedBloodOrbRecipe forgeShapedRecipe(ShapedBloodOrbRecipe recipe) { -// int width; -// int height; -// try { -// width = recipe.width; -// height = recipe.height; -// } catch (Exception e) { -// e.printStackTrace(); -// return null; -// } -// -// Object[] items = recipe.getInput(); -// for (Object item : items) -// if (item instanceof List && ((List<?>) item).isEmpty())// ore -// // handler, -// // no ores -// return null; -// -// return new CachedBloodOrbRecipe(width, height, items, recipe.getRecipeOutput()); -// } -// -// @Override -// public void loadTransferRects() { -// transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18), "crafting")); -// } -// -// -// @Override -// public String getRecipeName() { -// return StatCollector.translateToLocal("bm.string.crafting.orb.shaped"); -// } -//} +package WayofTime.alchemicalWizardry.client.nei; + +import java.awt.Rectangle; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.util.StatCollector; +import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; +import codechicken.nei.NEIServerUtils; +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.ShapedRecipeHandler; + +/** + * NEI Blood Orb Shaped Recipe Handler by joshie * + */ +public class NEIBloodOrbShapedHandler extends ShapedRecipeHandler { + public class CachedBloodOrbRecipe extends CachedShapedRecipe { + public CachedBloodOrbRecipe(int width, int height, Object[] items, ItemStack out) { + super(width, height, items, out); + } + + @Override + public void setIngredients(int width, int height, Object[] items) { + for (int x = 0; x < width; x++) { + for (int y = 0; y < height; y++) { + if (items[y * width + x] == null) + continue; + + Object o = items[y * width + x]; + if (o instanceof ItemStack) { + PositionedStack stack = new PositionedStack(items[y * width + x], 25 + x * 18, 6 + y * 18, false); + stack.setMaxSize(1); + ingredients.add(stack); + } else if (o instanceof Integer) { + ArrayList<ItemStack> orbs = new ArrayList(); + for (Item item : NEIConfig.bloodOrbs) { + if (((IBloodOrb) item).getOrbLevel() >= (Integer) o) { + orbs.add(new ItemStack(item)); + } + } + + PositionedStack stack = new PositionedStack(orbs, 25 + x * 18, 6 + y * 18, false); + stack.setMaxSize(1); + ingredients.add(stack); + }else if(o instanceof List) + { + PositionedStack stack = new PositionedStack(o, 25 + x * 18, 6 + y * 18, false); + stack.setMaxSize(1); + ingredients.add(stack); + } + } + } + } + } + + @Override + public void loadCraftingRecipes(String outputId, Object... results) { + if (outputId.equals("crafting") && getClass() == NEIBloodOrbShapedHandler.class) { + for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) { + if (irecipe instanceof ShapedBloodOrbRecipe) { + CachedBloodOrbRecipe recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe); + if (recipe == null) + continue; + + recipe.computeVisuals(); + arecipes.add(recipe); + } + } + } else { + super.loadCraftingRecipes(outputId, results); + } + } + + @Override + public void loadCraftingRecipes(ItemStack result) { + for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) { + if (irecipe instanceof ShapedBloodOrbRecipe) { + CachedBloodOrbRecipe recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe); + if (recipe == null || !NEIServerUtils.areStacksSameTypeCrafting(recipe.result.item, result)) + continue; + + recipe.computeVisuals(); + arecipes.add(recipe); + } + } + } + + @Override + public void loadUsageRecipes(ItemStack ingredient) { + for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) { + CachedShapedRecipe recipe = null; + if (irecipe instanceof ShapedBloodOrbRecipe) + recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe); + + if (recipe == null || !recipe.contains(recipe.ingredients, ingredient.getItem())) + continue; + + recipe.computeVisuals(); + if (recipe.contains(recipe.ingredients, ingredient)) { + recipe.setIngredientPermutation(recipe.ingredients, ingredient); + arecipes.add(recipe); + } + } + } + + private CachedBloodOrbRecipe forgeShapedRecipe(ShapedBloodOrbRecipe recipe) { + int width; + int height; + try { + width = recipe.width; + height = recipe.height; + } catch (Exception e) { + e.printStackTrace(); + return null; + } + + Object[] items = recipe.getInput(); + for (Object item : items) + if (item instanceof List && ((List<?>) item).isEmpty())// ore + // handler, + // no ores + return null; + + return new CachedBloodOrbRecipe(width, height, items, recipe.getRecipeOutput()); + } + + @Override + public void loadTransferRects() { + transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18), "crafting")); + } + + + @Override + public String getRecipeName() { + return StatCollector.translateToLocal("bm.string.crafting.orb.shaped"); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapelessHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapelessHandler.java index ce531bb0..ebf7afba 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapelessHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapelessHandler.java @@ -1,135 +1,135 @@ -//package WayofTime.alchemicalWizardry.client.nei; -// -//import java.awt.Rectangle; -//import java.util.ArrayList; -//import java.util.List; -// -//import net.minecraft.item.Item; -//import net.minecraft.item.ItemStack; -//import net.minecraft.item.crafting.CraftingManager; -//import net.minecraft.item.crafting.IRecipe; -//import net.minecraft.util.StatCollector; -//import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; -//import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -//import codechicken.nei.NEIServerUtils; -//import codechicken.nei.PositionedStack; -//import codechicken.nei.recipe.ShapelessRecipeHandler; -// -///** -// * NEI Blood Orb Shapeless Recipe Handler by joshie * -// */ -//public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler { -// public class CachedBloodOrbRecipe extends CachedShapelessRecipe { -// public CachedBloodOrbRecipe(ArrayList<Object> items, ItemStack recipeOutput) { -// super(items, recipeOutput); -// } -// -// @Override -// public void setIngredients(List<?> items) { -// ingredients.clear(); -// for (int ingred = 0; ingred < items.size(); ingred++) { -// Object o = items.get(ingred); -// if (o instanceof ItemStack) { -// PositionedStack stack = new PositionedStack(items.get(ingred), 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18); -// stack.setMaxSize(1); -// ingredients.add(stack); -// } else if (o instanceof Integer) { -// ArrayList<ItemStack> orbs = new ArrayList(); -// for (Item item : NEIConfig.bloodOrbs) { -// if (((IBloodOrb) item).getOrbLevel() >= (Integer) o) { -// orbs.add(new ItemStack(item)); -// } -// } -// -// PositionedStack stack = new PositionedStack(orbs, 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18); -// stack.setMaxSize(1); -// ingredients.add(stack); -// }else if(o instanceof List) -// { -// PositionedStack stack = new PositionedStack(o, 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18); -// stack.setMaxSize(1); -// ingredients.add(stack); -// } -// } -// } -// } -// -// @Override -// public void loadCraftingRecipes(String outputId, Object... results) { -// if (outputId.equals("crafting") && getClass() == NEIBloodOrbShapelessHandler.class) { -// List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList(); -// for (IRecipe irecipe : allrecipes) { -// CachedBloodOrbRecipe recipe = null; -// if (irecipe instanceof ShapelessBloodOrbRecipe) -// recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe); -// -// if (recipe == null) -// continue; -// -// arecipes.add(recipe); -// } -// } else { -// super.loadCraftingRecipes(outputId, results); -// } -// } -// -// @Override -// public void loadCraftingRecipes(ItemStack result) { -// List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList(); -// for (IRecipe irecipe : allrecipes) { -// if (NEIServerUtils.areStacksSameTypeCrafting(irecipe.getRecipeOutput(), result)) { -// CachedBloodOrbRecipe recipe = null; -// if (irecipe instanceof ShapelessBloodOrbRecipe) -// recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe); -// -// if (recipe == null) -// continue; -// -// arecipes.add(recipe); -// } -// } -// } -// -// @Override -// public void loadUsageRecipes(ItemStack ingredient) { -// List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList(); -// for (IRecipe irecipe : allrecipes) { -// CachedBloodOrbRecipe recipe = null; -// if (irecipe instanceof ShapelessBloodOrbRecipe) -// recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe); -// -// if (recipe == null) -// continue; -// -// if (recipe.contains(recipe.ingredients, ingredient)) { -// recipe.setIngredientPermutation(recipe.ingredients, ingredient); -// arecipes.add(recipe); -// } -// } -// } -// -// public CachedBloodOrbRecipe forgeShapelessRecipe(ShapelessBloodOrbRecipe recipe) { -// ArrayList<Object> items = recipe.getInput(); -// -// for (Object item : items) -// if (item instanceof List && ((List<?>) item).isEmpty())//ore handler, no ores -// return null; -// -// return new CachedBloodOrbRecipe(items, recipe.getRecipeOutput()); -// } -// -// @Override -// public void loadTransferRects() { -// transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18), "crafting")); -// } -// -// @Override -// public String getOverlayIdentifier() { -// return "crafting"; -// } -// -// @Override -// public String getRecipeName() { -// return StatCollector.translateToLocal("bm.string.crafting.orb.shapeless"); -// } -//} +package WayofTime.alchemicalWizardry.client.nei; + +import java.awt.Rectangle; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.util.StatCollector; +import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; +import codechicken.nei.NEIServerUtils; +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.ShapelessRecipeHandler; + +/** + * NEI Blood Orb Shapeless Recipe Handler by joshie * + */ +public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler { + public class CachedBloodOrbRecipe extends CachedShapelessRecipe { + public CachedBloodOrbRecipe(ArrayList<Object> items, ItemStack recipeOutput) { + super(items, recipeOutput); + } + + @Override + public void setIngredients(List<?> items) { + ingredients.clear(); + for (int ingred = 0; ingred < items.size(); ingred++) { + Object o = items.get(ingred); + if (o instanceof ItemStack) { + PositionedStack stack = new PositionedStack(items.get(ingred), 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18); + stack.setMaxSize(1); + ingredients.add(stack); + } else if (o instanceof Integer) { + ArrayList<ItemStack> orbs = new ArrayList<ItemStack>(); + for (Item item : NEIConfig.bloodOrbs) { + if (((IBloodOrb) item).getOrbLevel() >= (Integer) o) { + orbs.add(new ItemStack(item)); + } + } + + PositionedStack stack = new PositionedStack(orbs, 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18); + stack.setMaxSize(1); + ingredients.add(stack); + }else if(o instanceof List) + { + PositionedStack stack = new PositionedStack(o, 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18); + stack.setMaxSize(1); + ingredients.add(stack); + } + } + } + } + + @Override + public void loadCraftingRecipes(String outputId, Object... results) { + if (outputId.equals("crafting") && getClass() == NEIBloodOrbShapelessHandler.class) { + List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList(); + for (IRecipe irecipe : allrecipes) { + CachedBloodOrbRecipe recipe = null; + if (irecipe instanceof ShapelessBloodOrbRecipe) + recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe); + + if (recipe == null) + continue; + + arecipes.add(recipe); + } + } else { + super.loadCraftingRecipes(outputId, results); + } + } + + @Override + public void loadCraftingRecipes(ItemStack result) { + List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList(); + for (IRecipe irecipe : allrecipes) { + if (NEIServerUtils.areStacksSameTypeCrafting(irecipe.getRecipeOutput(), result)) { + CachedBloodOrbRecipe recipe = null; + if (irecipe instanceof ShapelessBloodOrbRecipe) + recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe); + + if (recipe == null) + continue; + + arecipes.add(recipe); + } + } + } + + @Override + public void loadUsageRecipes(ItemStack ingredient) { + List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList(); + for (IRecipe irecipe : allrecipes) { + CachedBloodOrbRecipe recipe = null; + if (irecipe instanceof ShapelessBloodOrbRecipe) + recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe); + + if (recipe == null) + continue; + + if (recipe.contains(recipe.ingredients, ingredient)) { + recipe.setIngredientPermutation(recipe.ingredients, ingredient); + arecipes.add(recipe); + } + } + } + + public CachedBloodOrbRecipe forgeShapelessRecipe(ShapelessBloodOrbRecipe recipe) { + ArrayList<Object> items = recipe.getInput(); + + for (Object item : items) + if (item instanceof List && ((List<?>) item).isEmpty())//ore handler, no ores + return null; + + return new CachedBloodOrbRecipe(items, recipe.getRecipeOutput()); + } + + @Override + public void loadTransferRects() { + transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18), "crafting")); + } + + @Override + public String getOverlayIdentifier() { + return "crafting"; + } + + @Override + public String getRecipeName() { + return StatCollector.translateToLocal("bm.string.crafting.orb.shapeless"); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIConfig.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIConfig.java index b074ba6e..4fa27786 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIConfig.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIConfig.java @@ -1,35 +1,36 @@ -//package WayofTime.alchemicalWizardry.client.nei; -// -//import java.util.ArrayList; -// -//import net.minecraft.item.Item; -//import codechicken.nei.api.API; -//import codechicken.nei.api.IConfigureNEI; -// -//public class NEIConfig implements IConfigureNEI { -// public static ArrayList<Item> bloodOrbs = new ArrayList<Item>(); -// -// @Override -// public void loadConfig() { -// API.registerRecipeHandler(new NEIAlchemyRecipeHandler()); -// API.registerUsageHandler(new NEIAlchemyRecipeHandler()); -// API.registerRecipeHandler(new NEIAltarRecipeHandler()); -// API.registerUsageHandler(new NEIAltarRecipeHandler()); -// API.registerRecipeHandler(new NEIBloodOrbShapedHandler()); -// API.registerUsageHandler(new NEIBloodOrbShapedHandler()); -// API.registerRecipeHandler(new NEIBloodOrbShapelessHandler()); -// API.registerUsageHandler(new NEIBloodOrbShapelessHandler()); -// API.registerRecipeHandler(new NEIBindingRitualHandler()); -// API.registerUsageHandler(new NEIBindingRitualHandler()); -// } -// -// @Override -// public String getName() { -// return "Blood Magic NEI"; -// } -// -// @Override -// public String getVersion() { -// return "1.3"; -// } -//} +package WayofTime.alchemicalWizardry.client.nei; + + +import java.util.ArrayList; + +import net.minecraft.item.Item; +import codechicken.nei.api.API; +import codechicken.nei.api.IConfigureNEI; + +public class NEIConfig implements IConfigureNEI { + public static ArrayList<Item> bloodOrbs = new ArrayList<Item>(); + + @Override + public void loadConfig() { + API.registerRecipeHandler(new NEIAlchemyRecipeHandler()); + API.registerUsageHandler(new NEIAlchemyRecipeHandler()); + API.registerRecipeHandler(new NEIAltarRecipeHandler()); + API.registerUsageHandler(new NEIAltarRecipeHandler()); + API.registerRecipeHandler(new NEIBloodOrbShapedHandler()); + API.registerUsageHandler(new NEIBloodOrbShapedHandler()); + API.registerRecipeHandler(new NEIBloodOrbShapelessHandler()); + API.registerUsageHandler(new NEIBloodOrbShapelessHandler()); + API.registerRecipeHandler(new NEIBindingRitualHandler()); + API.registerUsageHandler(new NEIBindingRitualHandler()); + } + + @Override + public String getName() { + return "Blood Magic NEI"; + } + + @Override + public String getVersion() { + return "1.3"; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderHelper.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderHelper.java index 502d4334..7c551e80 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderHelper.java @@ -167,7 +167,7 @@ public class RenderHelper private static List<HUDElement> getHUDElements(Minecraft mc) { - List<HUDElement> elements = new ArrayList(); + List<HUDElement> elements = new ArrayList<HUDElement>(); MovingObjectPosition movingobjectposition = mc.objectMouseOver; World world = mc.theWorld; diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RitualDivinerRender.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RitualDivinerRender.java index e2ceb005..9b877d3f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RitualDivinerRender.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RitualDivinerRender.java @@ -21,8 +21,7 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; - -/* +/** * Created in Scala by Alex-Hawks * Translated and implemented by Arcaratus */ diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java b/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java index 867e2b15..5fdf116b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java @@ -33,38 +33,16 @@ public class CommonProxy // Nothing here as the server doesn't render graphics! } - public void registerPostSideObjects() - { - - } + public void registerPostSideObjects() {} - public void registerEntities() - { - } + public void registerEntities() {} public World getClientWorld() { return null; } - public void registerActions() - { - } - - public void registerEvents() - { - } - - public void registerSoundHandler() - { - // Nothing here as this is a server side proxy - } - - public void registerTileEntities() - { - GameRegistry.registerTileEntity(TEAltar.class, "containerAltar"); - GameRegistry.registerTileEntity(TEMasterStone.class, "containerMasterStone"); - } + public void registerEvents() {} public void registerEntityTrackers() { @@ -88,12 +66,5 @@ public class CommonProxy EntityRegistry.registerModEntity(BookEntityItem.class, "bookEntityItem", 17, AlchemicalWizardry.instance, 120, 3, true); } - public void registerTickHandlers() - { - } - - public void InitRendering() - { - // TODO Auto-generated method stub - } + public void initRendering() {} } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsMod.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsMod.java index c499c440..9511664d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsMod.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsMod.java @@ -10,7 +10,7 @@ import java.util.List; public class AchievementsMod extends Achievement { - public static List<Achievement> achievements = new ArrayList(); + public static List<Achievement> achievements = new ArrayList<Achievement>(); public AchievementsMod(String name, int x, int y, ItemStack icon, Achievement parent) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsRegistry.java index 2f09461d..cd5f27b5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsRegistry.java @@ -10,8 +10,8 @@ import java.util.List; public class AchievementsRegistry { - public final static List<Item> craftinglist = new ArrayList(); - public final static List<Item> pickupList = new ArrayList(); + public final static List<Item> craftinglist = new ArrayList<Item>(); + public final static List<Item> pickupList = new ArrayList<Item>(); public static void init() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionRegistry.java index 0ac3bf52..0c0c4618 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionRegistry.java @@ -11,7 +11,7 @@ import java.util.List; public class CombinedPotionRegistry { - public static List<CombinedPotionComponent> potionList = new ArrayList(); + public static List<CombinedPotionComponent> potionList = new ArrayList<CombinedPotionComponent>(); public static void registerCombinedPotionRecipe(Potion result, Potion pot1, Potion pot2) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java index 7b064de4..013b550b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java @@ -14,11 +14,11 @@ import WayofTime.alchemicalWizardry.common.block.BlockBloodRune; public class UpgradedAltars { - public static List<AltarComponent> secondTierAltar = new ArrayList(); - public static List<AltarComponent> thirdTierAltar = new ArrayList(); - public static List<AltarComponent> fourthTierAltar = new ArrayList(); - public static List<AltarComponent> fifthTierAltar = new ArrayList(); - public static List<AltarComponent> sixthTierAltar = new ArrayList(); + public static List<AltarComponent> secondTierAltar = new ArrayList<AltarComponent>(); + public static List<AltarComponent> thirdTierAltar = new ArrayList<AltarComponent>(); + public static List<AltarComponent> fourthTierAltar = new ArrayList<AltarComponent>(); + public static List<AltarComponent> fifthTierAltar = new ArrayList<AltarComponent>(); + public static List<AltarComponent> sixthTierAltar = new ArrayList<AltarComponent>(); public static int highestAltar = 6; public static int isAltarValid(World world, BlockPos pos) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java index 527b60dc..6186b6c9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java @@ -40,7 +40,7 @@ public class BlockSet { this.blockid = blockid; this.metadata = new int[4]; - positions = new ArrayList(); + positions = new ArrayList<Int3>(); } public BlockSet(Block block) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java index fb706a13..6c62e88a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java @@ -30,7 +30,7 @@ public class BuildingSchematic public BuildingSchematic(String name) { this.name = name; - blockList = new ArrayList(); + blockList = new ArrayList<BlockSet>(); this.doorX = 0; this.doorZ = 0; this.doorY = 0; @@ -90,7 +90,7 @@ public class BuildingSchematic public List<Int3> getGriddedPositions(EnumFacing dir) { - List<Int3> positionList = new ArrayList(); + List<Int3> positionList = new ArrayList<Int3>(); for (BlockSet blockSet : blockList) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/TileBlockSet.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/TileBlockSet.java deleted file mode 100644 index a135df1a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/TileBlockSet.java +++ /dev/null @@ -1,8 +0,0 @@ -package WayofTime.alchemicalWizardry.common.demonVillage; - -import net.minecraft.nbt.NBTTagCompound; - -public class TileBlockSet extends BlockSet -{ - public NBTTagCompound tag; -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityDemonAIHurtByTarget.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityDemonAIHurtByTarget.java index a80ea0ba..303ab7a2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityDemonAIHurtByTarget.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityDemonAIHurtByTarget.java @@ -36,7 +36,7 @@ public class EntityDemonAIHurtByTarget extends EntityAIHurtByTarget this.taskOwner.setAttackTarget(this.taskOwner.getAITarget()); - if (this.entityCallsForHelp && this.taskOwner instanceof IHoardDemon) + if (this.entityCallsForHelp) { if(portal instanceof TEDemonPortal) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonHoardPacket.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonHoardPacket.java index ba35ddde..8d0274ad 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonHoardPacket.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonHoardPacket.java @@ -5,10 +5,7 @@ import net.minecraft.world.World; public abstract class DemonHoardPacket { - public DemonHoardPacket() - { - - } + public DemonHoardPacket() {} public abstract int summonDemons(TEDemonPortal teDemonPortal, World world, int x, int y, int z, DemonType type, int tier, boolean spawnGuardian); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketRegistry.java index fd193f95..2d30d788 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketRegistry.java @@ -9,7 +9,7 @@ import net.minecraft.world.World; public class DemonPacketRegistry { - public static Map<String, DemonHoardPacket> packetMap = new HashMap(); + public static Map<String, DemonHoardPacket> packetMap = new HashMap<String, DemonHoardPacket>(); public static boolean registerDemonPacket(String string, DemonHoardPacket packet) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGrunt.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGrunt.java index 613eaf56..f257f01b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGrunt.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGrunt.java @@ -513,6 +513,6 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan BlockPos position = demon.getPortalLocation(); TileEntity portal = worldObj.getTileEntity(this.demonPortal); - return portal instanceof TEDemonPortal ? portal == worldObj.getTileEntity(position) : false; + return portal instanceof TEDemonPortal && portal == worldObj.getTileEntity(position); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/IHoardDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/IHoardDemon.java index 61732750..aee48836 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/IHoardDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/IHoardDemon.java @@ -5,7 +5,10 @@ import net.minecraft.util.BlockPos; public interface IHoardDemon { void setPortalLocation(BlockPos position); + BlockPos getPortalLocation(); + boolean thrallDemon(BlockPos location); + boolean isSamePortal(IHoardDemon demon); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/loot/DemonVillageLootRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/loot/DemonVillageLootRegistry.java index 2b648fb8..b5e4d0d1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/loot/DemonVillageLootRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/loot/DemonVillageLootRegistry.java @@ -11,7 +11,7 @@ import WayofTime.alchemicalWizardry.ModItems; public class DemonVillageLootRegistry { - public static ArrayList<WeightedRandomChestContent> list1 = new ArrayList(); + public static ArrayList<WeightedRandomChestContent> list1 = new ArrayList<WeightedRandomChestContent>(); public static void init() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonChest.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonChest.java index 8444a3a9..528d6142 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonChest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonChest.java @@ -43,10 +43,7 @@ public class TEDemonChest extends TileEntityChest implements ITilePortalNode } @Override - public void checkForAdjacentChests() - { - - } + public void checkForAdjacentChests() {} @Override public void setPortalLocation(TEDemonPortal teDemonPortal) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java index a086a797..d5a1fee6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java @@ -66,9 +66,9 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox public static int[] tierCostList = new int[]{1500}; - public Set<IHoardDemon> hoardList = new HashSet(); + public Set<IHoardDemon> hoardList = new HashSet<IHoardDemon>(); - public static List<DemonBuilding> buildingList = new ArrayList(); + public static List<DemonBuilding> buildingList = new ArrayList<DemonBuilding>(); public Random rand = new Random(); private GridSpace[][] area; @@ -168,7 +168,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox { float totalChance = 0; - Map<String, Float> map = new HashMap(); + Map<String, Float> map = new HashMap<String, Float>(); map.put("roadChance", this.getRoadChance()); map.put("houseChance", this.getHouseChance()); map.put("demonPortalChance", this.getDemonPortalChance()); @@ -661,7 +661,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox public List<EnumFacing> findValidExtentionDirection(int x, int z) { - List<EnumFacing> directions = new LinkedList(); + List<EnumFacing> directions = new LinkedList<EnumFacing>(); if (this.getGridSpace(x, z) == null || !this.getGridSpace(x, z).isRoadSegment()) { @@ -1197,7 +1197,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox // GridSpaceHolder grid = this.createGSH(); - List<EnumFacing> directions = new ArrayList(); + List<EnumFacing> directions = new ArrayList<EnumFacing>(); for (int i = 2; i < 6; i++) { @@ -1210,7 +1210,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox return 0; } - HashMap<EnumFacing, List<DemonBuilding>> schemMap = new HashMap(); + HashMap<EnumFacing, List<DemonBuilding>> schemMap = new HashMap<EnumFacing, List<DemonBuilding>>(); for (EnumFacing nextDir : directions) { @@ -1226,7 +1226,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox schemMap.get(nextDir).add(build); } else { - schemMap.put(nextDir, new ArrayList()); + schemMap.put(nextDir, new ArrayList<DemonBuilding>()); schemMap.get(nextDir).add(build); } } @@ -1353,7 +1353,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox return 0; } - List<EnumFacing> directions = new ArrayList(); + List<EnumFacing> directions = new ArrayList<EnumFacing>(); for (int i = 2; i < 6; i++) { @@ -1369,7 +1369,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox return 0; } - HashMap<EnumFacing, List<DemonBuilding>> schemMap = new HashMap(); + HashMap<EnumFacing, List<DemonBuilding>> schemMap = new HashMap<EnumFacing, List<DemonBuilding>>(); for (EnumFacing nextDir : directions) { @@ -1390,7 +1390,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox schemMap.get(nextDir).add(build); } else { - schemMap.put(nextDir, new ArrayList()); + schemMap.put(nextDir, new ArrayList<DemonBuilding>()); schemMap.get(nextDir).add(build); } } else @@ -1418,10 +1418,6 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox build.setAllGridSpaces(x + xOff, z + zOff, yLevel, chosenDirection.getOpposite(), GridSpace.HOUSE, grid); this.loadGSH(grid); - DemonVillagePath path = new DemonVillagePath(pos.getX() + (x) * 5, yLevel, pos.getZ() + (z) * 5, chosenDirection, 2); - - Int3AndBool temp = path.constructFullPath(this, worldObj, this.getRoadStepClearance()); - return build.getNumberOfGridSpaces(); } @@ -1451,11 +1447,6 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox public void createRoad(int xi, int yi, int zi, EnumFacing dir, int length, boolean doesNotDrop) { - int curX = xi; - int curY = yi; - int curZ = zi; - int roadRadius = this.getRoadRadius(); - if (dir.getFrontOffsetY() != 0) { return; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java index 58b13aa2..08dbb8bc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java @@ -17,8 +17,6 @@ import WayofTime.alchemicalWizardry.AlchemicalWizardry; public class EntityBileDemon extends EntityDemon { - - public EntityBileDemon(World par1World) { super(par1World, AlchemicalWizardry.entityBileDemonID); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java index 973908d4..7d431217 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java @@ -21,9 +21,6 @@ public class EntityBoulderFist extends EntityDemon { private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); - private static float maxTamedHealth = 60.0F; - private static float maxUntamedHealth = 50.0F; - public EntityBoulderFist(World par1World) { super(par1World, AlchemicalWizardry.entityBoulderFistID); @@ -56,6 +53,8 @@ public class EntityBoulderFist extends EntityDemon super.applyEntityAttributes(); //This line affects the speed of the monster this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D); + float maxTamedHealth = 60.0F; + float maxUntamedHealth = 50.0F; //My guess is that this will alter the max health if (this.isTamed()) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java index c65baff2..ad095378 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java @@ -9,7 +9,6 @@ import net.minecraft.entity.monster.EntityGhast; import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.entity.passive.EntityHorse; import net.minecraft.entity.passive.EntityTameable; -import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.item.ItemFood; @@ -183,6 +182,7 @@ public class EntityDemon extends EntityTameable implements IDemon } } + @Override /** * main AI tick function, replaces updateEntityActionState */ @@ -191,6 +191,7 @@ public class EntityDemon extends EntityTameable implements IDemon this.dataWatcher.updateObject(18, this.getHealth()); } + @Override protected void entityInit() { super.entityInit(); @@ -207,6 +208,7 @@ public class EntityDemon extends EntityTameable implements IDemon this.playSound("mob.zombie.step", 0.15F, 1.0F); } + @Override /** * (abstract) Protected helper method to write subclass entity data to NBT. */ @@ -217,6 +219,7 @@ public class EntityDemon extends EntityTameable implements IDemon par1NBTTagCompound.setByte("attackTimer", (byte) attackTimer); } + @Override /** * (abstract) Protected helper method to read subclass entity data from NBT. */ @@ -228,6 +231,7 @@ public class EntityDemon extends EntityTameable implements IDemon attackTimer = par1NBTTagCompound.getByte("attackTimer"); } + @Override /** * Returns the sound this mob makes while it's alive. */ @@ -236,6 +240,7 @@ public class EntityDemon extends EntityTameable implements IDemon return "none"; } + @Override /** * Returns the sound this mob makes when it is hurt. */ @@ -244,6 +249,7 @@ public class EntityDemon extends EntityTameable implements IDemon return "mob.irongolem.hit"; } + @Override /** * Returns the sound this mob makes on death. */ @@ -252,6 +258,7 @@ public class EntityDemon extends EntityTameable implements IDemon return "mob.irongolem.death"; } + @Override /** * Returns the volume for the sounds this mob makes. */ @@ -273,6 +280,7 @@ public class EntityDemon extends EntityTameable implements IDemon return attackTimer; } + @Override /** * Called to update the entity's position/logic. */ @@ -281,11 +289,13 @@ public class EntityDemon extends EntityTameable implements IDemon super.onUpdate(); } + @Override public float getEyeHeight() { return this.height * 0.8F; } + @Override /** * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently * use in wolves. @@ -295,6 +305,7 @@ public class EntityDemon extends EntityTameable implements IDemon return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); } + @Override /** * Called when the entity is attacked. */ @@ -317,6 +328,7 @@ public class EntityDemon extends EntityTameable implements IDemon } } + @Override public boolean attackEntityAsMob(Entity par1Entity) { this.attackTimer = 10; @@ -332,6 +344,7 @@ public class EntityDemon extends EntityTameable implements IDemon return flag; } + @Override public void setTamed(boolean par1) { super.setTamed(par1); @@ -402,7 +415,7 @@ public class EntityDemon extends EntityTameable implements IDemon if (itemstack.stackSize <= 0) { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); } if (!this.worldObj.isRemote) @@ -463,41 +476,7 @@ public class EntityDemon extends EntityTameable implements IDemon } } - /** - * Return this wolf's collar color. - */ - public int getCollarColor() - { - return this.dataWatcher.getWatchableObjectByte(20) & 15; - } - - /** - * Set this wolf's collar color. - */ - public void setCollarColor(int par1) - { - this.dataWatcher.updateObject(20, par1 & 15); - } - - /** - * This function is used when two same-species animals in 'love mode' breed to generate the new baby animal. - */ - public EntityWolf spawnBabyAnimal(EntityAgeable par1EntityAgeable) - { - return null; - } - - public void func_70918_i(boolean par1) - { - if (par1) - { - this.dataWatcher.updateObject(19, 1); - } else - { - this.dataWatcher.updateObject(19, 0); - } - } - + @Override /** * Returns true if the mob is currently able to mate with the specified mob. */ @@ -511,6 +490,7 @@ public class EntityDemon extends EntityTameable implements IDemon return this.dataWatcher.getWatchableObjectByte(19) == 1; } + @Override /** * Determines if an entity can be despawned, used on idle far away entities */ diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java index 99934c7f..b37b4695 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java @@ -45,19 +45,20 @@ public class EntityElemental extends EntityDemon } } - public int courseChangeCooldown; +// public int courseChangeCooldown; public double waypointX; public double waypointY; public double waypointZ; - private Entity targetedEntity; +/* private Entity targetedEntity; /** * Cooldown time between target loss and new target aquirement. - */ + private int aggroCooldown; public int prevAttackCounter; public int attackCounter; - +*/ + @Override /** * The explosion radius of spawned fireballs. */ @@ -69,18 +70,7 @@ public class EntityElemental extends EntityDemon } } - protected void fall(float par1) - { - } - - /** - * Takes in the distance the entity has fallen this tick and whether its on the ground to update the fall distance - * and deal fall damage if landing on the ground. Args: distanceFallenThisTick, onGround - */ - protected void updateFallState(double par1, boolean par3) - { - } - + @Override /** * Moves the entity based on the specified heading. Args: strafe, forward */ @@ -140,6 +130,7 @@ public class EntityElemental extends EntityDemon this.limbSwing += this.limbSwingAmount; } + @Override /** * returns true if this entity is by a ladder, false otherwise */ @@ -177,6 +168,7 @@ public class EntityElemental extends EntityDemon return true; } + @Override /** * Will return how many at most can spawn in a chunk at once. */ @@ -185,6 +177,7 @@ public class EntityElemental extends EntityDemon return 1; } + @Override /** * (abstract) Protected helper method to write subclass entity data to NBT. */ @@ -193,6 +186,7 @@ public class EntityElemental extends EntityDemon super.writeEntityToNBT(par1NBTTagCompound); } + @Override /** * (abstract) Protected helper method to read subclass entity data from NBT. */ @@ -221,6 +215,7 @@ public class EntityElemental extends EntityDemon } } + @Override /** * Returns true if the newer Entity AI code should be run */ @@ -229,6 +224,7 @@ public class EntityElemental extends EntityDemon return false; } + @Override /** * Sets the active target the Task system uses for tracking */ @@ -245,6 +241,7 @@ public class EntityElemental extends EntityDemon } } + @Override /** * main AI tick function, replaces updateEntityActionState */ @@ -253,6 +250,7 @@ public class EntityElemental extends EntityDemon this.dataWatcher.updateObject(18, this.getHealth()); } + @Override protected void entityInit() { super.entityInit(); @@ -261,6 +259,7 @@ public class EntityElemental extends EntityDemon this.dataWatcher.addObject(25, 0); } + @Override /** * Plays step sound at given x, y, z for the entity */ @@ -269,6 +268,7 @@ public class EntityElemental extends EntityDemon this.playSound("mob.zombie.step", 0.15F, 1.0F); } + @Override /** * Returns the sound this mob makes while it's alive. */ @@ -278,6 +278,7 @@ public class EntityElemental extends EntityDemon return "none"; } + @Override /** * Returns the sound this mob makes when it is hurt. */ @@ -286,6 +287,7 @@ public class EntityElemental extends EntityDemon return "none"; } + @Override /** * Returns the sound this mob makes on death. */ @@ -294,6 +296,7 @@ public class EntityElemental extends EntityDemon return "none"; } + @Override /** * Returns the volume for the sounds this mob makes. */ @@ -302,6 +305,7 @@ public class EntityElemental extends EntityDemon return 0.4F; } + @Override /** * Returns the item ID for the item the mob drops on death. */ @@ -310,6 +314,7 @@ public class EntityElemental extends EntityDemon return -1; } + @Override /** * Called to update the entity's position/logic. */ @@ -323,11 +328,13 @@ public class EntityElemental extends EntityDemon } } + @Override public float getEyeHeight() { return this.height * 0.8F; } + @Override /** * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently * use in wolves. @@ -337,6 +344,7 @@ public class EntityElemental extends EntityDemon return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); } + @Override /** * Called when the entity is attacked. */ @@ -359,12 +367,14 @@ public class EntityElemental extends EntityDemon } } + @Override public boolean attackEntityAsMob(Entity par1Entity) { int i = this.isTamed() ? 6 : 7; return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); } + @Override public void setTamed(boolean par1) { super.setTamed(par1); @@ -378,10 +388,7 @@ public class EntityElemental extends EntityDemon } } - /** - * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. - */ - + @Override /** * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on * the animal type) @@ -391,6 +398,7 @@ public class EntityElemental extends EntityDemon return false; } + @Override /** * Determines whether this wolf is angry or not. */ @@ -399,6 +407,7 @@ public class EntityElemental extends EntityDemon return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; } + @Override /** * Sets whether this wolf is angry or not. */ @@ -426,6 +435,7 @@ public class EntityElemental extends EntityDemon } } + @Override /** * Returns true if the mob is currently able to mate with the specified mob. */ @@ -434,11 +444,13 @@ public class EntityElemental extends EntityDemon return false; } + @Override public boolean func_70922_bv() { return this.dataWatcher.getWatchableObjectByte(19) == 1; } + @Override /** * Determines if an entity can be despawned, used on idle far away entities */ diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java index 2fc2b8e5..8c654f08 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java @@ -25,9 +25,6 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 40, 40, 15.0F); private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); - private static float maxTamedHealth = 50.0F; - private static float maxUntamedHealth = 50.0F; - public EntityFallenAngel(World par1World) { super(par1World, AlchemicalWizardry.entityFallenAngelID); @@ -60,6 +57,8 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob super.applyEntityAttributes(); //This line affects the speed of the monster this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D); + float maxTamedHealth = 50.0F; + float maxUntamedHealth = 50.0F; //My guess is that this will alter the max health if (this.isTamed()) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFireElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFireElemental.java index b09aa6e5..c54d4588 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFireElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFireElemental.java @@ -15,6 +15,7 @@ public class EntityFireElemental extends EntityElemental implements IMob this.isImmuneToFire = true; } + @Override public void inflictEffectOnEntity(Entity target) { if (target instanceof EntityLivingBase) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityHolyElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityHolyElemental.java index 51be44c9..bbccf90e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityHolyElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityHolyElemental.java @@ -16,6 +16,7 @@ public class EntityHolyElemental extends EntityElemental implements IMob super(world, AlchemicalWizardry.entityHolyElementalID); } + @Override public void inflictEffectOnEntity(Entity target) { if (target instanceof EntityLivingBase) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java index 7f221801..33f72245 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java @@ -24,9 +24,6 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 30, 50, 15.0F); private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); - private static float maxTamedHealth = 50.0F; - private static float maxUntamedHealth = 30.0F; - public EntityIceDemon(World par1World) { super(par1World, AlchemicalWizardry.entityIceDemonID); @@ -56,6 +53,8 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob super.applyEntityAttributes(); //This line affects the speed of the monster this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.40000001192092896D); + float maxTamedHealth = 50.0F; + float maxUntamedHealth = 30.0F; //My guess is that this will alter the max health if (this.isTamed()) @@ -67,6 +66,7 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob } } + @Override /** * Attack the specified entity using a ranged attack. */ diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java index 7b38c3df..6429aa2c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java @@ -19,10 +19,6 @@ import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; public class EntityLowerGuardian extends EntityDemon { - private static float maxTamedHealth = 50.0F; - private static float maxUntamedHealth = 30.0F; - private int attackTimer; - public EntityLowerGuardian(World par1World) { super(par1World, AlchemicalWizardry.entityLowerGuardianID); @@ -41,7 +37,6 @@ public class EntityLowerGuardian extends EntityDemon this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false)); this.setAggro(false); this.setTamed(false); - attackTimer = 0; } @Override @@ -50,6 +45,8 @@ public class EntityLowerGuardian extends EntityDemon super.applyEntityAttributes(); //This line affects the speed of the monster this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D); + float maxTamedHealth = 50.0F; + float maxUntamedHealth = 30.0F; //My guess is that this will alter the max health if (this.isTamed()) @@ -61,8 +58,10 @@ public class EntityLowerGuardian extends EntityDemon } } - public EntityAgeable createChild(EntityAgeable par1EntityAgeable) +/* public EntityAgeable createChild(EntityAgeable par1EntityAgeable) { return this.spawnBabyAnimal(par1EntityAgeable); } + I don't know what this method changed to + */ } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java index 299a2efc..4f76dc33 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java @@ -22,9 +22,6 @@ public class EntityShade extends EntityDemon { private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); - private static float maxTamedHealth = 50.0F; - private static float maxUntamedHealth = 100.0F; - public EntityShade(World par1World) { super(par1World, AlchemicalWizardry.entityShadeID); @@ -56,6 +53,8 @@ public class EntityShade extends EntityDemon super.applyEntityAttributes(); //This line affects the speed of the monster this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D); + float maxTamedHealth = 50.0F; + float maxUntamedHealth = 100.0F; //My guess is that this will alter the max health if (this.isTamed()) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShadeElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShadeElemental.java index 004fcce4..3e5ed0f3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShadeElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShadeElemental.java @@ -15,6 +15,7 @@ public class EntityShadeElemental extends EntityElemental implements IMob super(world, AlchemicalWizardry.entityShadeElementalID); } + @Override public void inflictEffectOnEntity(Entity target) { if (target instanceof EntityLivingBase) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java index ea827fcd..d8b5da90 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java @@ -25,9 +25,6 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 25, 25, 15.0F); private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); - private static float maxTamedHealth = 20.0F; - private static float maxUntamedHealth = 10.0F; - public EntitySmallEarthGolem(World par1World) { super(par1World, AlchemicalWizardry.entitySmallEarthGolemID); @@ -58,6 +55,8 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM super.applyEntityAttributes(); //This line affects the speed of the monster this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.40000001192092896D); + float maxTamedHealth = 20.0F; + float maxUntamedHealth = 10.0F; //My guess is that this will alter the max health if (this.isTamed()) @@ -68,7 +67,8 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); } } - + + @Override /** * Attack the specified entity using a ranged attack. */ diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWaterElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWaterElemental.java index ab141887..449a1ea2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWaterElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWaterElemental.java @@ -14,6 +14,7 @@ public class EntityWaterElemental extends EntityElemental implements IMob super(world, AlchemicalWizardry.entityWaterElementalID); } + @Override public void inflictEffectOnEntity(Entity target) { if (target instanceof EntityLivingBase) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java index 5b6720db..ef2de0c2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java @@ -25,9 +25,6 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 40, 40, 15.0F); private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); - private static float maxTamedHealth = 100.0F; - private static float maxUntamedHealth = 200.0F; - public EntityWingedFireDemon(World par1World) { super(par1World, AlchemicalWizardry.entityWingedFireDemonID); @@ -60,6 +57,8 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM super.applyEntityAttributes(); //This line affects the speed of the monster this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D); + float maxTamedHealth = 100.0F; + float maxUntamedHealth = 200.0F; //My guess is that this will alter the max health if (this.isTamed()) @@ -73,6 +72,7 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM //this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D); } + @Override /** * Attack the specified entity using a ranged attack. */ diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java index 3d6b7e36..57cde54c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java @@ -24,7 +24,7 @@ import net.minecraftforge.fml.common.registry.IThrowableEntity; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -//Shamelessly ripped off from x3n0ph0b3 +//Shamelessly ripped off from x3n0ph0b3 //Shame! public class EnergyBlastProjectile extends Entity implements IProjectile, IThrowableEntity { protected int xTile = -1; @@ -39,8 +39,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow public EntityLivingBase shootingEntity; protected int ticksInAir = 0; protected int maxTicksInAir = 600; - private int ricochetCounter = 0; - private boolean scheduledForDeath = false; protected int projectileDamage; public EnergyBlastProjectile(World par1World) @@ -114,7 +112,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow double d4 = d0 / d3; double d5 = d2 / d3; this.setLocationAndAngles(par2EntityLivingBase.posX + d4, this.posY, par2EntityLivingBase.posZ + d5, f2, f3); - float f4 = (float) d3 * 0.2F; this.setThrowableHeading(d0, d1, d2, par4, par5); } @@ -261,6 +258,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow double var7 = 0.0D; Iterator var9 = var6.iterator(); float var11; + boolean scheduledForDeath = false; while (var9.hasNext()) { @@ -358,13 +356,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow return false; } - /** - * Sets the amount of knockback the arrow applies when it hits a mob. - */ - public void setKnockbackStrength(int par1) - { - } - /** * If returns false, the item will not inflict any damage against entities. */ @@ -483,6 +474,5 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow { if (entity instanceof EntityLivingBase) this.shootingEntity = (EntityLivingBase) entity; - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBeamParticle.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBeamParticle.java deleted file mode 100644 index d4029d91..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBeamParticle.java +++ /dev/null @@ -1,16 +0,0 @@ -package WayofTime.alchemicalWizardry.common.entity.projectile; - -import net.minecraft.client.particle.EntityFX; -import net.minecraft.world.World; - -public class EntityBeamParticle extends EntityFX -{ - - protected EntityBeamParticle(World p_i1218_1_, double p_i1218_2_, - double p_i1218_4_, double p_i1218_6_) - { - super(p_i1218_1_, p_i1218_2_, p_i1218_4_, p_i1218_6_); - // TODO Auto-generated constructor stub - } - -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java index 0cc5adf7..4b1665fb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java @@ -11,7 +11,6 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.ModBlocks; - public class EntityBloodLightProjectile extends EnergyBlastProjectile { public EntityBloodLightProjectile(World par1World) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java index 11617db3..55f8b9f0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java @@ -53,7 +53,7 @@ public class EntityEnergyBazookaMainProjectile extends EnergyBlastProjectile this.onImpact(mop.entityHit); } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - worldObj.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, (float) (5.0f), false); + worldObj.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, 5.0f, false); this.spawnSecondaryProjectiles(); } @@ -74,7 +74,7 @@ public class EntityEnergyBazookaMainProjectile extends EnergyBlastProjectile spawnSecondaryProjectiles(); } - worldObj.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, (float) (5.0f), false); + worldObj.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, 5.0f, false); } spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java index 992b733d..ad105632 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java @@ -302,13 +302,6 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil return false; } - /** - * Sets the amount of knockback the arrow applies when it hits a mob. - */ - public void setKnockbackStrength(int par1) - { - } - /** * If returns false, the item will not inflict any damage against entities. */ @@ -318,6 +311,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil return false; } + @Override /** * Whether the arrow has a stream of critical hit particles flying behind * it. @@ -335,6 +329,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil } } + @Override /** * Whether the arrow has a stream of critical hit particles flying behind * it. @@ -345,6 +340,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil return (var1 & 1) != 0; } + @Override public void onImpact(MovingObjectPosition mop) { if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null) @@ -362,6 +358,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil } } + @Override public void onImpact(Entity mop) { if (mop == shootingEntity && ticksInAir > 3) @@ -383,6 +380,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil return rand.nextInt(6) + 1; } + @Override protected void spawnHitParticles(EnumParticleTypes type, int i) { for (int particles = 0; particles < i; particles++) @@ -391,11 +389,13 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil } } + @Override public void doDamage(int i, Entity mop) { mop.attackEntityFrom(this.getDamageSource(), i); } + @Override public DamageSource getDamageSource() { return DamageSource.causeMobDamage(shootingEntity); @@ -406,11 +406,13 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil this.ricochet(sideHit); } + @Override public double smallGauss(double d) { return (worldObj.rand.nextFloat() - 0.5D) * d; } + @Override public double gaussian(double d) { return d + d * ((rand.nextFloat() - 0.5D) / 4); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityParticleBeam.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityParticleBeam.java index e2a0ba8e..32ac5547 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityParticleBeam.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityParticleBeam.java @@ -34,7 +34,6 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl public EntityLivingBase shootingEntity; protected int ticksInAir = 0; protected int maxTicksInAir = 600; - private int ricochetCounter = 0; private boolean scheduledForDeath = false; protected int projectileDamage; @@ -109,7 +108,6 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl double d4 = d0 / d3; double d5 = d2 / d3; this.setLocationAndAngles(par2EntityLivingBase.posX + d4, this.posY, par2EntityLivingBase.posZ + d5, f2, f3); - float f4 = (float) d3 * 0.2F; this.setThrowableHeading(d0, d1, d2, par4, par5); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java index f01f4812..19b1086a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java @@ -86,12 +86,12 @@ public class FireProjectile extends EnergyBlastProjectile { if (mop instanceof EntityLivingBase) { - ((EntityLivingBase) mop).setFire(10 * this.projectileDamage); + mop.setFire(10 * this.projectileDamage); ((EntityLivingBase) mop).setRevengeTarget(shootingEntity); - if (((EntityLivingBase) mop).isPotionActive(Potion.fireResistance) || ((EntityLivingBase) mop).isImmuneToFire()) + if (((EntityLivingBase) mop).isPotionActive(Potion.fireResistance) || mop.isImmuneToFire()) { - ((EntityLivingBase) mop).attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); + mop.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); } else { doDamage(projectileDamage, mop); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java index 24fb77fa..f662ab31 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java @@ -52,7 +52,7 @@ public class HolyProjectile extends EnergyBlastProjectile } this.onImpact(mop.entityHit); - } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + } //else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { } @@ -72,7 +72,7 @@ public class HolyProjectile extends EnergyBlastProjectile { if (((EntityLivingBase) mop).isEntityUndead()) { - doDamage((int) (projectileDamage * 2), mop); + doDamage(projectileDamage * 2, mop); } else { doDamage(projectileDamage, mop); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java index 29d44965..130f88f9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java @@ -54,7 +54,7 @@ public class IceProjectile extends EnergyBlastProjectile } this.onImpact(mop.entityHit); - } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + }// else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { } this.setDead(); @@ -71,9 +71,9 @@ public class IceProjectile extends EnergyBlastProjectile { if (mop instanceof EntityLivingBase) { - if (((EntityLivingBase) mop).isImmuneToFire()) + if (mop.isImmuneToFire()) { - doDamage((int) (projectileDamage * 2), mop); + doDamage(projectileDamage * 2, mop); ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 200, 2)); } else { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java index 938a94c8..6995f529 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java @@ -60,7 +60,7 @@ public class MudProjectile extends EnergyBlastProjectile } this.onImpact(mop.entityHit); - } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + }// else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java index 6ed6d1a2..8b2308b7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java @@ -84,7 +84,7 @@ public class TeleportProjectile extends EnergyBlastProjectile { if (shootingEntity.isRiding()) { - shootingEntity.mountEntity((Entity) null); + shootingEntity.mountEntity(null); } shootingEntity.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ); } @@ -118,7 +118,7 @@ public class TeleportProjectile extends EnergyBlastProjectile { if (shootingEntity.isRiding()) { - shootingEntity.mountEntity((Entity) null); + shootingEntity.mountEntity(null); } shootingEntity.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java index d76b227b..556bddbe 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java @@ -49,7 +49,7 @@ public class WaterProjectile extends EnergyBlastProjectile } this.onImpact(mop.entityHit); - } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + }// else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { } @@ -66,7 +66,7 @@ public class WaterProjectile extends EnergyBlastProjectile { if (mop instanceof EntityLivingBase) { - if (((EntityLivingBase) mop).isImmuneToFire()) + if (mop.isImmuneToFire()) { doDamage(projectileDamage * 2, mop); ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 80, 1)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java index 59562027..6af663b7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java @@ -52,7 +52,7 @@ public class WindGustProjectile extends EnergyBlastProjectile } this.onImpact(mop.entityHit); - } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + }// else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/IEnchantmentGlyph.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/IEnchantmentGlyph.java index d4716f18..06c4b2fc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/IEnchantmentGlyph.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/IEnchantmentGlyph.java @@ -5,6 +5,7 @@ import net.minecraft.world.World; public interface IEnchantmentGlyph extends IStabilityGlyph { - public int getEnchantability(World world, BlockPos pos, int meta); - public int getEnchantmentLevel(World world, BlockPos pos, int meta); + int getEnchantability(World world, BlockPos pos, int meta); + + int getEnchantmentLevel(World world, BlockPos pos, int meta); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/IStabilityGlyph.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/IStabilityGlyph.java index 97bf5814..2b826b0f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/IStabilityGlyph.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/IStabilityGlyph.java @@ -5,5 +5,5 @@ import net.minecraft.world.World; public interface IStabilityGlyph { - public int getAdditionalStabilityForFaceCount(World world, BlockPos pos, int meta, int faceCount); + int getAdditionalStabilityForFaceCount(World world, BlockPos pos, int meta, int faceCount); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaRegistry.java index d8106b55..0f804337 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaRegistry.java @@ -9,7 +9,7 @@ import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; public class OmegaRegistry { - public static HashMap<Reagent, OmegaParadigm> omegaList = new HashMap(); + public static HashMap<Reagent, OmegaParadigm> omegaList = new HashMap<Reagent, OmegaParadigm>(); public static void registerParadigm(Reagent reagent, OmegaParadigm parad) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/AlchemyCircleRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/AlchemyCircleRenderer.java index d3aeb4d9..29185083 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/AlchemyCircleRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/AlchemyCircleRenderer.java @@ -2,7 +2,6 @@ package WayofTime.alchemicalWizardry.common.renderer; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.WorldRenderer; -import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; @@ -48,15 +47,12 @@ public class AlchemyCircleRenderer extends MRSRenderer } GL11.glPushMatrix(); - float f1 = 1.0f; Tessellator tessellator = Tessellator.getInstance(); this.bindTexture(resourceLocation); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_CULL_FACE); - float f2 = 0; - float f3 = -f2 * 0.2F - (float) MathHelper.floor_float(-f2 * 0.1F); // GL11.glEnable(GL11.GL_BLEND); // GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/BeamRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/BeamRenderer.java deleted file mode 100644 index 5617feb8..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/BeamRenderer.java +++ /dev/null @@ -1,150 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer; - -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; -import net.minecraft.client.renderer.texture.TextureManager; -import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; -import net.minecraft.util.MathHelper; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.api.ColourAndCoords; - -public class BeamRenderer -{ - private static final ResourceLocation field_110629_a = new ResourceLocation("textures/entity/beacon_beam.png"); - - public int xInit; - public int yInit; - public int zInit; - - public int xFinal; - public int yFinal; - public int zFinal; - - public int colourRed; - public int colourGreen; - public int colourBlue; - public int colourIntensity; - - public double size; - - public void setInitialPosition(int x, int y, int z) - { - this.xInit = x; - this.yInit = y; - this.zInit = z; - } - - public void setColourAndFinalPosition(ColourAndCoords col) - { - this.colourRed = col.colourRed; - this.colourGreen = col.colourGreen; - this.colourBlue = col.colourBlue; - this.colourIntensity = col.colourIntensity; - - this.xFinal = col.xCoord; - this.yFinal = col.yCoord; - this.zFinal = col.zCoord; - } - - public void setSize(double size) - { - this.size = size; - } - - protected static void bindTexture(ResourceLocation p_147499_1_) - { - TextureManager texturemanager = TileEntityRendererDispatcher.instance.renderEngine; - - if (texturemanager != null) - { - texturemanager.bindTexture(p_147499_1_); - } - } - - public void render(double d0, double d1, double d2) - { - int xDiff = this.xFinal - this.xInit; - int yDiff = this.yFinal - this.yInit; - int zDiff = this.zFinal - this.zInit; - - float planarAngle = (float) (Math.atan2(-zDiff, xDiff) * 180d / Math.PI); //Radians - float verticalAngle = (float) (Math.atan2(yDiff, Math.sqrt(xDiff * xDiff + zDiff + zDiff)) * 180d / Math.PI); - - float distance = (float) Math.sqrt(xDiff * xDiff + yDiff * yDiff + zDiff * zDiff); //Total distance - - GL11.glPushMatrix(); - float f1 = 1.0f; - Tessellator tessellator = Tessellator.getInstance(); - BeamRenderer.bindTexture(field_110629_a); - GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); - GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_CULL_FACE); - float f2 = 0; - float f3 = -f2 * 0.2F - (float) MathHelper.floor_float(-f2 * 0.1F); - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - - - GL11.glDepthMask(false); - WorldRenderer wr = tessellator.getWorldRenderer(); - - wr.startDrawingQuads(); - wr.func_178961_b(colourRed, colourGreen, colourBlue, colourIntensity); - - double inside = -(this.size / 2d); - double outside = 1.0d - (0.50d - this.size / 2d) - 0.5d; - - double d18 = inside; - double d19 = inside; - double d20 = outside; - double d21 = inside; - double d22 = inside; - double d23 = outside; - double d24 = outside; - double d25 = outside; - double d26 = (double) (distance * f1);// + 0.2; - double d27 = 0.0D; - double d28 = 1.0D; - double d29 = (double) (-1.0F + f3); - double d30 = (double) (distance * f1) + d29; - - GL11.glTranslated(d0 + 0.5, d1 + 0.5, d2 + 0.5); - - GL11.glRotatef(planarAngle, 0F, 1F, 0F); //Rotate on planar axis - GL11.glRotatef(verticalAngle, 0F, 0F, 1F); //Rotate vertical axis - //GL11.glRotatef(tileAltar.getWorldObj().getWorldTime()*2f, 1F, 0F, 0F); //Rotate cylindrically - - double offset = 0; - -// tessellator.setBrightness(240); - float s = 1F / 16F; - wr.addVertexWithUV(d26, d18, d19, d28, d30); - wr.addVertexWithUV(offset, d18, d19, d28, d29); - wr.addVertexWithUV(offset, d20, d21, d27, d29); - wr.addVertexWithUV(d26, d20, d21, d27, d30); - wr.addVertexWithUV(d26, d24, d25, d28, d30); - wr.addVertexWithUV(offset, d24, d25, d28, d29); - wr.addVertexWithUV(offset, d22, d23, d27, d29); - wr.addVertexWithUV(d26, d22, d23, d27, d30); - wr.addVertexWithUV(d26, d20, d21, d28, d30); - wr.addVertexWithUV(offset, d20, d21, d28, d29); - wr.addVertexWithUV(offset, d24, d25, d27, d29); - wr.addVertexWithUV(d26, d24, d25, d27, d30); - wr.addVertexWithUV(d26, d22, d23, d28, d30); - wr.addVertexWithUV(offset, d22, d23, d28, d29); - wr.addVertexWithUV(offset, d18, d19, d27, d29); - wr.addVertexWithUV(d26, d18, d19, d27, d30); - - tessellator.draw(); - GL11.glDepthMask(true); - - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_TEXTURE_2D); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - GL11.glPopMatrix(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicalCalcinator.java similarity index 96% rename from src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java rename to src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicalCalcinator.java index 8ab63111..defed192 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicalCalcinator.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.common.renderer.block; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.WorldRenderer; @@ -19,16 +20,15 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import WayofTime.alchemicalWizardry.common.renderer.model.ModelAlchemicalCalcinator; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; -public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer +public class RenderAlchemicalCalcinator extends TileEntitySpecialRenderer { private final RenderItem customRenderItem; private ModelAlchemicalCalcinator modelConduit = new ModelAlchemicalCalcinator(); private ResourceLocation resourceLocation = new ResourceLocation("alchemicalwizardry:textures/models/Reagent.png"); - public RenderAlchemicCalcinator() + public RenderAlchemicalCalcinator() { customRenderItem = Minecraft.getMinecraft().getRenderItem(); } @@ -36,9 +36,9 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer @Override public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) { - if (tileEntity instanceof TEAlchemicCalcinator) + if (tileEntity instanceof TEAlchemicalCalcinator) { - TEAlchemicCalcinator tileAltar = (TEAlchemicCalcinator) tileEntity; + TEAlchemicalCalcinator tileAltar = (TEAlchemicalCalcinator) tileEntity; GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAltar.java new file mode 100644 index 00000000..6f1294a2 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAltar.java @@ -0,0 +1,80 @@ +package WayofTime.alchemicalWizardry.common.renderer.block; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; + +import org.lwjgl.opengl.GL11; + +import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; + +public class RenderAltar extends TileEntitySpecialRenderer +{ + private ModelBloodAltar modelBloodAltar = new ModelBloodAltar(); + private final RenderItem customRenderItem; + + public RenderAltar() + { + customRenderItem = Minecraft.getMinecraft().getRenderItem(); + } + + @Override + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) + { + modelBloodAltar.renderBloodAltar((TEAltar) tileEntity, d0, d1, d2); + modelBloodAltar.renderBloodLevel((TEAltar) tileEntity, d0, d1, d2); + + if (tileEntity instanceof TEAltar) + { + TEAltar tileAltar = (TEAltar) tileEntity; + GL11.glPushMatrix(); + + if (tileAltar.getStackInSlot(0) != null) + { + float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0)); + float rotationAngle = Minecraft.getMinecraft().gameSettings.fancyGraphics ? (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL) : 0; + EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld()); + ghostEntityItem.hoverStart = 0.0F; + ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0)); + float displacement = 0.2F; + + if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) + { + GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.7F, (float) d2 + 0.5F); + } else + { + GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.6F, (float) d2 + 0.5F); + } + GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); + GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F); + customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel + } + + GL11.glPopMatrix(); + } + } + + private float getGhostItemScaleFactor(ItemStack itemStack) + { + float scaleFactor = 1.0F; + + if (itemStack != null) + { + if (itemStack.getItem() instanceof ItemBlock) + { + return 0.9f; + } else + { + return 0.65f; + } + } + + return scaleFactor; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderChemistrySet.java similarity index 56% rename from src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java rename to src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderChemistrySet.java index 32177778..cc3aa790 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderChemistrySet.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.common.renderer.block; +import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; @@ -7,21 +8,19 @@ import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.client.FMLClientHandler; import org.lwjgl.opengl.GL11; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelChemistrySet; -public class RenderWritingTable extends TileEntitySpecialRenderer +public class RenderChemistrySet extends TileEntitySpecialRenderer { - private ModelWritingTable modelWritingTable = new ModelWritingTable(); + private ModelChemistrySet modelChemistrySet = new ModelChemistrySet(); private final RenderItem customRenderItem; - public RenderWritingTable() + public RenderChemistrySet() { customRenderItem = Minecraft.getMinecraft().getRenderItem(); } @@ -29,9 +28,9 @@ public class RenderWritingTable extends TileEntitySpecialRenderer @Override public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int a) { - if (tileEntity instanceof TEWritingTable) + if (tileEntity instanceof TEChemistrySet) { - TEWritingTable tileAltar = (TEWritingTable) tileEntity; + TEChemistrySet tileAltar = (TEChemistrySet) tileEntity; GL11.glDisable(GL11.GL_LIGHTING); GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); @@ -39,7 +38,7 @@ public class RenderWritingTable extends TileEntitySpecialRenderer FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelWritingTable.render(null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); + this.modelChemistrySet.render(null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); GL11.glPopMatrix(); @@ -164,102 +163,4 @@ public class RenderWritingTable extends TileEntitySpecialRenderer return 0.0f; } } - - private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, EnumFacing forgeDirection) - { - if (ghostItemStack != null) - { - if (ghostItemStack.getItem() instanceof ItemBlock) - { - switch (forgeDirection) - { - case DOWN: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 2.7F, (float) z + 0.5F); - return; - } - - case UP: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.25F, (float) z + 0.5F); - return; - } - - case NORTH: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.7F); - return; - } - - case SOUTH: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.3F); - return; - } - - case EAST: - { - GL11.glTranslatef((float) x + 0.3F, (float) y + 0.5F, (float) z + 0.5F); - return; - } - - case WEST: - { - GL11.glTranslatef((float) x + 0.70F, (float) y + 0.5F, (float) z + 0.5F); - return; - } - - default: - { - - } - } - } else - { - switch (forgeDirection) - { - case DOWN: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.6F, (float) z + 0.5F); - return; - } - - case UP: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.20F, (float) z + 0.5F); - return; - } - - case NORTH: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.7F); - return; - } - - case SOUTH: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.3F); - return; - } - - case EAST: - { - GL11.glTranslatef((float) x + 0.3F, (float) y + 0.4F, (float) z + 0.5F); - return; - } - - case WEST: - { - GL11.glTranslatef((float) x + 0.70F, (float) y + 0.4F, (float) z + 0.5F); - return; - } - - default: - { - - } - } - } - } - } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java index dcbacfcf..2eb6d20a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.common.renderer.block; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.client.FMLClientHandler; @@ -27,7 +26,7 @@ public class RenderConduit extends TileEntitySpecialRenderer FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelConduit.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileConduit.getInputDirection(), tileConduit.getOutputDirection()); + this.modelConduit.render(null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileConduit.getInputDirection(), tileConduit.getOutputDirection()); GL11.glPopMatrix(); GL11.glPopMatrix(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java index 5ee91be0..fbd21044 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.common.renderer.block; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; @@ -15,7 +16,6 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import WayofTime.alchemicalWizardry.common.renderer.model.ModelCrystalBelljar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; public class RenderCrystalBelljar extends TileEntitySpecialRenderer { @@ -23,13 +23,12 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer private ResourceLocation resourceLocation = new ResourceLocation("alchemicalwizardry:textures/models/Reagent.png"); - @Override public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) { - if (tileEntity instanceof TEBellJar) + if (tileEntity instanceof TEBelljar) { - TEBellJar tileAltar = (TEBellJar) tileEntity; + TEBelljar tileAltar = (TEBelljar) tileEntity; GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/CrystalBelljar.png"); @@ -57,15 +56,12 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer private void renderTankContents(double x, double y, double z, int colourRed, int colourGreen, int colourBlue, int colourIntensity) { GL11.glPushMatrix(); - float f1 = 1.0f; Tessellator tessellator = Tessellator.getInstance(); this.bindTexture(resourceLocation); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_CULL_FACE); - float f2 = 0; - float f3 = -f2 * 0.2F - (float) MathHelper.floor_float(-f2 * 0.1F); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glDepthMask(false); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java index 452c5a44..21e05777 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java @@ -7,7 +7,6 @@ import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.client.FMLClientHandler; @@ -95,102 +94,4 @@ public class RenderPedestal extends TileEntitySpecialRenderer return scaleFactor; } - - private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, EnumFacing forgeDirection) - { - if (ghostItemStack != null) - { - if (ghostItemStack.getItem() instanceof ItemBlock) - { - switch (forgeDirection) - { - case DOWN: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 2.7F, (float) z + 0.5F); - return; - } - - case UP: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.25F, (float) z + 0.5F); - return; - } - - case NORTH: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.7F); - return; - } - - case SOUTH: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.3F); - return; - } - - case EAST: - { - GL11.glTranslatef((float) x + 0.3F, (float) y + 0.5F, (float) z + 0.5F); - return; - } - - case WEST: - { - GL11.glTranslatef((float) x + 0.70F, (float) y + 0.5F, (float) z + 0.5F); - return; - } - - default: - { - - } - } - } else - { - switch (forgeDirection) - { - case DOWN: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.6F, (float) z + 0.5F); - return; - } - - case UP: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.20F, (float) z + 0.5F); - return; - } - - case NORTH: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.7F); - return; - } - - case SOUTH: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.3F); - return; - } - - case EAST: - { - GL11.glTranslatef((float) x + 0.3F, (float) y + 0.4F, (float) z + 0.5F); - return; - } - - case WEST: - { - GL11.glTranslatef((float) x + 0.70F, (float) y + 0.4F, (float) z + 0.5F); - return; - } - - default: - { - - } - } - } - } - } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java index af26a435..759c6e97 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java @@ -7,7 +7,6 @@ import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.client.FMLClientHandler; @@ -89,102 +88,4 @@ public class RenderPlinth extends TileEntitySpecialRenderer return scaleFactor; } - - private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, EnumFacing forgeDirection) - { - if (ghostItemStack != null) - { - if (ghostItemStack.getItem() instanceof ItemBlock) - { - switch (forgeDirection) - { - case DOWN: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 2.7F, (float) z + 0.5F); - return; - } - - case UP: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.25F, (float) z + 0.5F); - return; - } - - case NORTH: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.7F); - return; - } - - case SOUTH: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.3F); - return; - } - - case EAST: - { - GL11.glTranslatef((float) x + 0.3F, (float) y + 0.5F, (float) z + 0.5F); - return; - } - - case WEST: - { - GL11.glTranslatef((float) x + 0.70F, (float) y + 0.5F, (float) z + 0.5F); - return; - } - - default: - { - - } - } - } else - { - switch (forgeDirection) - { - case DOWN: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.6F, (float) z + 0.5F); - return; - } - - case UP: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.20F, (float) z + 0.5F); - return; - } - - case NORTH: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.7F); - return; - } - - case SOUTH: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.3F); - return; - } - - case EAST: - { - GL11.glTranslatef((float) x + 0.3F, (float) y + 0.4F, (float) z + 0.5F); - return; - } - - case WEST: - { - GL11.glTranslatef((float) x + 0.70F, (float) y + 0.4F, (float) z + 0.5F); - return; - } - - default: - { - - } - } - } - } - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/ShaderHelper.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/ShaderHelper.java deleted file mode 100644 index 7e72c42e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/ShaderHelper.java +++ /dev/null @@ -1,196 +0,0 @@ -/** - * This class was created by <Vazkii>. It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * File Created @ [Apr 9, 2014, 11:20:26 PM (GMT)] - */ -package WayofTime.alchemicalWizardry.common.renderer.block; - -import org.lwjgl.opengl.ARBFragmentShader; -import org.lwjgl.opengl.ARBShaderObjects; -import org.lwjgl.opengl.ARBVertexShader; -import org.lwjgl.opengl.GL11; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; - -public final class ShaderHelper -{ - - private static final int VERT = ARBVertexShader.GL_VERTEX_SHADER_ARB; - private static final int FRAG = ARBFragmentShader.GL_FRAGMENT_SHADER_ARB; - - public static int beam = 0; - - public static void initShaders() - { - beam = createProgram(null, "/assets/alchemicalwizardry/shaders/beam.frag"); - } - - public static void useShaderWithProps(int shader, Object... props) - { - ARBShaderObjects.glUseProgramObjectARB(shader); - - if (shader != 0 && props.length % 2 == 0) - { - int propCount = props.length / 2; - for (int i = 0; i < propCount; i++) - { - String propName = (String) props[i * 2]; - Object propVal = props[i * 2 + 1]; - - int uniform = ARBShaderObjects.glGetUniformLocationARB(shader, propName); - if (propVal instanceof Integer) - ARBShaderObjects.glUniform1iARB(uniform, (Integer) propVal); - if (propVal instanceof Float) - ARBShaderObjects.glUniform1fARB(uniform, (Float) propVal); - } - } - } - - public static void useShader(int shader) - { - useShaderWithProps(shader); - } - - public static void releaseShader() - { - useShader(0); - } - - public static boolean useShaders() - { - return true; - } - - // Most of the code taken from the LWJGL wiki - // http://lwjgl.org/wiki/index.php?title=GLSL_Shaders_with_LWJGL - private static int createProgram(String vert, String frag) - { - int vertId = 0, fragId = 0, program = 0; - if (vert != null) - vertId = createShader(vert, VERT); - if (frag != null) - fragId = createShader(frag, FRAG); - - program = ARBShaderObjects.glCreateProgramObjectARB(); - if (program == 0) - return 0; - - if (vert != null) - ARBShaderObjects.glAttachObjectARB(program, vertId); - if (frag != null) - ARBShaderObjects.glAttachObjectARB(program, fragId); - - ARBShaderObjects.glLinkProgramARB(program); - if (ARBShaderObjects.glGetObjectParameteriARB(program, ARBShaderObjects.GL_OBJECT_LINK_STATUS_ARB) == GL11.GL_FALSE) - { - return 0; - } - - ARBShaderObjects.glValidateProgramARB(program); - if (ARBShaderObjects.glGetObjectParameteriARB(program, ARBShaderObjects.GL_OBJECT_VALIDATE_STATUS_ARB) == GL11.GL_FALSE) - { - return 0; - } - - return program; - } - - private static int createShader(String filename, int shaderType) - { - int shader = 0; - try - { - shader = ARBShaderObjects.glCreateShaderObjectARB(shaderType); - - if (shader == 0) - return 0; - - ARBShaderObjects.glShaderSourceARB(shader, readFileAsString(filename)); - ARBShaderObjects.glCompileShaderARB(shader); - - if (ARBShaderObjects.glGetObjectParameteriARB(shader, ARBShaderObjects.GL_OBJECT_COMPILE_STATUS_ARB) == GL11.GL_FALSE) - throw new RuntimeException("Error creating shader: " + getLogInfo(shader)); - - return shader; - } catch (Exception e) - { - ARBShaderObjects.glDeleteObjectARB(shader); - e.printStackTrace(); - return -1; - } - } - - private static String getLogInfo(int obj) - { - return ARBShaderObjects.glGetInfoLogARB(obj, ARBShaderObjects.glGetObjectParameteriARB(obj, ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB)); - } - - private static String readFileAsString(String filename) throws Exception - { - StringBuilder source = new StringBuilder(); - InputStream in = ShaderHelper.class.getResourceAsStream(filename); - Exception exception = null; - BufferedReader reader; - - if (in == null) - return ""; - - try - { - reader = new BufferedReader(new InputStreamReader(in, "UTF-8")); - - Exception innerExc = null; - try - { - String line; - while ((line = reader.readLine()) != null) - source.append(line).append('\n'); - } catch (Exception exc) - { - exception = exc; - } finally - { - try - { - reader.close(); - } catch (Exception exc) - { - if (innerExc == null) - innerExc = exc; - else exc.printStackTrace(); - } - } - - if (innerExc != null) - throw innerExc; - } catch (Exception exc) - { - exception = exc; - } finally - { - try - { - in.close(); - } catch (Exception exc) - { - if (exception == null) - exception = exc; - else exc.printStackTrace(); - } - - if (exception != null) - throw exception; - } - - return source.toString(); - } -} - diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java deleted file mode 100644 index cecd038d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java +++ /dev/null @@ -1,178 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; - -public class TEAltarRenderer extends TileEntitySpecialRenderer -{ - private ModelBloodAltar modelBloodAltar = new ModelBloodAltar(); - private final RenderItem customRenderItem; - - public TEAltarRenderer() - { - customRenderItem = Minecraft.getMinecraft().getRenderItem(); - } - - @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) - { - modelBloodAltar.renderBloodAltar((TEAltar) tileEntity, d0, d1, d2); - modelBloodAltar.renderBloodLevel((TEAltar) tileEntity, d0, d1, d2); - - if (tileEntity instanceof TEAltar) - { - TEAltar tileAltar = (TEAltar) tileEntity; - GL11.glPushMatrix(); - - if (tileAltar.getStackInSlot(0) != null) - { - float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0)); - float rotationAngle = Minecraft.getMinecraft().gameSettings.fancyGraphics ? (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL) : 0; - EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld()); - ghostEntityItem.hoverStart = 0.0F; - ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0)); - float displacement = 0.2F; - - if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) - { - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.7F, (float) d2 + 0.5F); - } else - { - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.6F, (float) d2 + 0.5F); - } - GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); - GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F); - customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel - } - - GL11.glPopMatrix(); - } - } - - private float getGhostItemScaleFactor(ItemStack itemStack) - { - float scaleFactor = 1.0F; - - if (itemStack != null) - { - if (itemStack.getItem() instanceof ItemBlock) - { - return 0.9f; - } else - { - return 0.65f; - } - } - - return scaleFactor; - } - - private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, EnumFacing forgeDirection) - { - if (ghostItemStack != null) - { - if (ghostItemStack.getItem() instanceof ItemBlock) - { - switch (forgeDirection) - { - case DOWN: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 2.7F, (float) z + 0.5F); - return; - } - - case UP: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.25F, (float) z + 0.5F); - return; - } - - case NORTH: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.7F); - return; - } - - case SOUTH: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.3F); - return; - } - - case EAST: - { - GL11.glTranslatef((float) x + 0.3F, (float) y + 0.5F, (float) z + 0.5F); - return; - } - - case WEST: - { - GL11.glTranslatef((float) x + 0.70F, (float) y + 0.5F, (float) z + 0.5F); - return; - } - - default: - { - return; - } - } - } else - { - switch (forgeDirection) - { - case DOWN: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.6F, (float) z + 0.5F); - return; - } - - case UP: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.20F, (float) z + 0.5F); - return; - } - - case NORTH: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.7F); - return; - } - - case SOUTH: - { - GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.3F); - return; - } - - case EAST: - { - GL11.glTranslatef((float) x + 0.3F, (float) y + 0.4F, (float) z + 0.5F); - return; - } - - case WEST: - { - GL11.glTranslatef((float) x + 0.70F, (float) y + 0.4F, (float) z + 0.5F); - return; - } - - default: - { - return; - } - } - } - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEWritingTableItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEChemistrySetItemRenderer.java similarity index 88% rename from src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEWritingTableItemRenderer.java rename to src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEChemistrySetItemRenderer.java index 43bf7569..2292f83b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEWritingTableItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEChemistrySetItemRenderer.java @@ -8,15 +8,15 @@ import net.minecraftforge.fml.client.FMLClientHandler; import org.lwjgl.opengl.GL11; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelChemistrySet; -public class TEWritingTableItemRenderer implements IItemRenderer +public class TEChemistrySetItemRenderer implements IItemRenderer { - private ModelWritingTable model; + private ModelChemistrySet model; - public TEWritingTableItemRenderer() + public TEChemistrySetItemRenderer() { - model = new ModelWritingTable(); + model = new ModelChemistrySet(); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelChemistrySet.java similarity index 98% rename from src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelWritingTable.java rename to src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelChemistrySet.java index 15dede34..2dfc6c8f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelChemistrySet.java @@ -4,7 +4,7 @@ import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -public class ModelWritingTable extends ModelBase +public class ModelChemistrySet extends ModelBase { //fields ModelRenderer base; @@ -21,7 +21,7 @@ public class ModelWritingTable extends ModelBase ModelRenderer input3; ModelRenderer Shape1; - public ModelWritingTable() + public ModelChemistrySet() { textureWidth = 64; textureHeight = 64; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java index 3ea79b1e..826cec70 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java @@ -20,11 +20,11 @@ public class RenderEnergyBazookaMainProjectile extends Render public ModelBase model = new ModelEnergyBazookaMainProjectile(); private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/EnergyBazookaMainProjectile.png"); - private float scale = 1.0f; @Override public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1) { + float scale = 1.0f; GL11.glPushMatrix(); GL11.glTranslatef((float) d0, (float) d1, (float) d2); GL11.glEnable(GL12.GL_RESCALE_NORMAL); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java index cbbd4374..f33d1178 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java @@ -21,11 +21,11 @@ public class RenderMeteor extends Render public ModelBase model = new ModelMeteor(); private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/Meteor.png"); - private float scale = 1.0f; @Override public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1) { + float scale = 1.0f; GL11.glPushMatrix(); GL11.glTranslatef((float) d0, (float) d1, (float) d2); GL11.glEnable(GL12.GL_RESCALE_NORMAL); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java index 4274305b..a9068614 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java @@ -133,7 +133,7 @@ public class RitualEffectAnimalGrowth extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> animalGrowthRitual = new ArrayList(); + ArrayList<RitualComponent> animalGrowthRitual = new ArrayList<RitualComponent>(); animalGrowthRitual.add(new RitualComponent(0, 0, 2, RitualComponent.DUSK)); animalGrowthRitual.add(new RitualComponent(2, 0, 0, RitualComponent.DUSK)); animalGrowthRitual.add(new RitualComponent(0, 0, -2, RitualComponent.DUSK)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java index e0657394..f1878498 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java @@ -57,7 +57,7 @@ public class RitualEffectApiaryOverclock extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> apiaryRitual = new ArrayList(); + ArrayList<RitualComponent> apiaryRitual = new ArrayList<RitualComponent>(); apiaryRitual.add(new RitualComponent(1, 0, 0, RitualComponent.DUSK)); apiaryRitual.add(new RitualComponent(1, 0, 1, RitualComponent.DUSK)); apiaryRitual.add(new RitualComponent(1, 0, -1, RitualComponent.DUSK)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java index a763c07b..c8406e13 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java @@ -45,7 +45,7 @@ public class RitualEffectAutoAlchemy extends RitualEffect int flag = 0; TileEntity topEntity = world.getTileEntity(pos.offsetUp()); - if (!(topEntity instanceof IBloodAltar) || !(topEntity instanceof IBloodAltar)) + if (!(topEntity instanceof IBloodAltar)) { return; } @@ -88,7 +88,7 @@ public class RitualEffectAutoAlchemy extends RitualEffect } else if (southEntity instanceof TEChemistrySet) { alchemyEntity = (TEChemistrySet) southEntity; - if (northEntity instanceof IInventory && !(northEntity instanceof TEChemistrySet)) + if (northEntity instanceof IInventory) { outputInv = (IInventory) northEntity; } @@ -107,26 +107,26 @@ public class RitualEffectAutoAlchemy extends RitualEffect { outputInv = (IInventory) westEntity; } - if (northEntity instanceof IInventory && !(northEntity instanceof TEChemistrySet)) + if (northEntity instanceof IInventory) { inputInv1 = (IInventory) northEntity; } - if (southEntity instanceof IInventory && !(southEntity instanceof TEChemistrySet)) + if (southEntity instanceof IInventory) { inputInv2 = (IInventory) southEntity; } } else if (westEntity instanceof TEChemistrySet) { alchemyEntity = (TEChemistrySet) westEntity; - if (eastEntity instanceof IInventory && !(eastEntity instanceof TEChemistrySet)) + if (eastEntity instanceof IInventory) { outputInv = (IInventory) eastEntity; } - if (northEntity instanceof IInventory && !(northEntity instanceof TEChemistrySet)) + if (northEntity instanceof IInventory) { inputInv1 = (IInventory) northEntity; } - if (southEntity instanceof IInventory && !(southEntity instanceof TEChemistrySet)) + if (southEntity instanceof IInventory) { inputInv2 = (IInventory) southEntity; } @@ -135,7 +135,7 @@ public class RitualEffectAutoAlchemy extends RitualEffect return; } - if (alchemyEntity != null && hasPotentia) + if (hasPotentia) { alchemyEntity.setAccelerationTime(5); if (alchemyEntity.isWorking()) @@ -239,7 +239,6 @@ public class RitualEffectAutoAlchemy extends RitualEffect break; } } - continue; } } @@ -404,7 +403,7 @@ public class RitualEffectAutoAlchemy extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> autoAlchemyRitual = new ArrayList(); + ArrayList<RitualComponent> autoAlchemyRitual = new ArrayList<RitualComponent>(); autoAlchemyRitual.add(new RitualComponent(1, 0, 1, RitualComponent.DUSK)); autoAlchemyRitual.add(new RitualComponent(1, 0, -1, RitualComponent.DUSK)); autoAlchemyRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.DUSK)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java index 5e1343db..5416441b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java @@ -159,7 +159,7 @@ public class RitualEffectBinding extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> boundSoulRitual = new ArrayList(); + ArrayList<RitualComponent> boundSoulRitual = new ArrayList<RitualComponent>(); boundSoulRitual.add(new RitualComponent(3, 0, 0, 2)); boundSoulRitual.add(new RitualComponent(-3, 0, 0, 2)); boundSoulRitual.add(new RitualComponent(0, 0, 3, 2)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java index fd1d6c92..a113d896 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java @@ -215,8 +215,6 @@ public class RitualEffectBiomeChanger extends RitualEffect } } - boolean wantsSnow = false; - boolean wantsRain = true; int biomeID = 1; BiomeGenBase[] biomeList = BiomeGenBase.getBiomeGenArray(); int iteration = 0; @@ -290,7 +288,7 @@ public class RitualEffectBiomeChanger extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> biomeChangerRitual = new ArrayList(); + ArrayList<RitualComponent> biomeChangerRitual = new ArrayList<RitualComponent>(); biomeChangerRitual.add(new RitualComponent(1, 0, -2, RitualComponent.AIR)); biomeChangerRitual.add(new RitualComponent(1, 0, -3, RitualComponent.AIR)); biomeChangerRitual.add(new RitualComponent(2, 0, -1, RitualComponent.AIR)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java index 231a638a..bdd237f6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java @@ -44,7 +44,6 @@ public class RitualEffectContainment extends RitualEffect List<Entity> entityList = SpellHelper.getEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, d0, d0); boolean flag = false; boolean hasCrepitous = this.canDrainReagent(ritualStone, ReagentRegistry.crepitousReagent, crepitousDrain, false); - boolean hasTerrae = this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false); boolean hasMagicales = this.canDrainReagent(ritualStone, ReagentRegistry.magicalesReagent, magicalesDrain, false); for (Entity entity : entityList) @@ -108,7 +107,7 @@ public class RitualEffectContainment extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> containmentRitual = new ArrayList(); + ArrayList<RitualComponent> containmentRitual = new ArrayList<RitualComponent>(); containmentRitual.add(new RitualComponent(1, 0, 0, 3)); containmentRitual.add(new RitualComponent(-1, 0, 0, 3)); containmentRitual.add(new RitualComponent(0, 0, 1, 3)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java index 630665a0..5b5a623b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java @@ -98,7 +98,7 @@ public class RitualEffectCrafting extends RitualEffect { if(((IInventory) inv).getSizeInventory() <= slotDesignation || !((IInventory) inv).isItemValidForSlot(slotDesignation, ((IInventory) inv).getStackInSlot(slotDesignation))) { - continue; + }else { ItemStack invStack = ((IInventory) inv).getStackInSlot(slotDesignation); @@ -131,7 +131,7 @@ public class RitualEffectCrafting extends RitualEffect IInventory outputInv = null; - List<IInventory> invList = new ArrayList(); + List<IInventory> invList = new ArrayList<IInventory>(); TileEntity northEntity = world.getTileEntity(pos.add(0, -1, -2)); TileEntity southEntity = world.getTileEntity(pos.add(0, -1, 2)); @@ -250,7 +250,7 @@ public class RitualEffectCrafting extends RitualEffect invList.add(outputInv); } - Map<Integer, Map<Integer, Integer>> syphonMap = new HashMap(); //Inventory, Slot, how much claimed + Map<Integer, Map<Integer, Integer>> syphonMap = new HashMap<Integer, Map<Integer, Integer>>(); //Inventory, Slot, how much claimed for(int n = 0; n < recipe.length; n++) //Look for the correct items { @@ -299,7 +299,7 @@ public class RitualEffectCrafting extends RitualEffect Map<Integer, Integer> slotMap = syphonMap.get(i); if(slotMap == null) { - slotMap = new HashMap(); + slotMap = new HashMap<Integer, Integer>(); syphonMap.put(i, slotMap); } @@ -389,7 +389,7 @@ public class RitualEffectCrafting extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> autoCraftingRitual = new ArrayList(); + ArrayList<RitualComponent> autoCraftingRitual = new ArrayList<RitualComponent>(); this.addCornerRunes(autoCraftingRitual, 1, 1, RitualComponent.EARTH); this.addParallelRunes(autoCraftingRitual, 1, 1, RitualComponent.EARTH); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java index f5d4296a..7d461d57 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java @@ -82,7 +82,6 @@ public class RitualEffectCrushing extends RitualEffect boolean hasVirtus = this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false); boolean hasIncendium = this.canDrainReagent(ritualStone, ReagentRegistry.incendiumReagent, incendiumDrain, false); - boolean isSilkTouch = hasCrystallos; int fortuneLevel = 0; if (hasOrbisTerrae) { @@ -117,17 +116,17 @@ public class RitualEffectCrushing extends RitualEffect continue; } - if (block != null && !world.isAirBlock(newPos)) + if (!world.isAirBlock(newPos)) { if ((block.equals(ModBlocks.ritualStone) || block.equals(ModBlocks.blockMasterStone)) || SpellHelper.isBlockFluid(block)) { continue; } - if (isSilkTouch && block.canSilkHarvest(world, newPos, state, null)) + if (hasCrystallos && block.canSilkHarvest(world, newPos, state, null)) { ItemStack item = new ItemStack(block, 1, block.getMetaFromState(state)); - ItemStack copyStack = item.copyItemStack(item); + ItemStack copyStack = ItemStack.copyItemStack(item); SpellHelper.insertStackIntoInventory(copyStack, tileEntity, EnumFacing.DOWN); @@ -151,7 +150,7 @@ public class RitualEffectCrushing extends RitualEffect for (ItemStack item : itemDropList) { hasIncendium = hasIncendium && this.canDrainReagent(ritualStone, ReagentRegistry.incendiumReagent, incendiumDrain, false); - ItemStack copyStack = item.copyItemStack(item); + ItemStack copyStack = ItemStack.copyItemStack(item); if (this.usesIncendium(copyStack)) { @@ -206,9 +205,6 @@ public class RitualEffectCrushing extends RitualEffect { return true; } - } else - { - } } return false; @@ -233,9 +229,6 @@ public class RitualEffectCrushing extends RitualEffect copyStack = new ItemStack(Blocks.netherrack, stackSize, 0); } } - } else - { - } return copyStack; @@ -252,7 +245,7 @@ public class RitualEffectCrushing extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> crushingRitual = new ArrayList(); + ArrayList<RitualComponent> crushingRitual = new ArrayList<RitualComponent>(); crushingRitual.add(new RitualComponent(0, 0, 1, RitualComponent.EARTH)); crushingRitual.add(new RitualComponent(1, 0, 0, RitualComponent.EARTH)); crushingRitual.add(new RitualComponent(0, 0, -1, RitualComponent.EARTH)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java index 2a93bb54..2674b0ce 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Random; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; @@ -21,7 +22,6 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; public class RitualEffectDemonPortal extends RitualEffect { @@ -136,7 +136,7 @@ public class RitualEffectDemonPortal extends RitualEffect for(Int3 pos : jarLocations) { - if(!(ritualStone.getWorldObj().getTileEntity(position.add(pos.xCoord, pos.yCoord, pos.zCoord)) instanceof TEBellJar)) + if(!(ritualStone.getWorldObj().getTileEntity(position.add(pos.xCoord, pos.yCoord, pos.zCoord)) instanceof TEBelljar)) { return false; } @@ -148,7 +148,7 @@ public class RitualEffectDemonPortal extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> demonRitual = new ArrayList(); + ArrayList<RitualComponent> demonRitual = new ArrayList<RitualComponent>(); this.addParallelRunes(demonRitual, 3, 0, RitualComponent.FIRE); this.addParallelRunes(demonRitual, 5, 0, RitualComponent.FIRE); this.addCornerRunes(demonRitual, 2, 0, RitualComponent.AIR); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java index a44aae46..bdb47c52 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java @@ -192,7 +192,7 @@ public class RitualEffectEllipsoid extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> ellipsoidRitual = new ArrayList(); + ArrayList<RitualComponent> ellipsoidRitual = new ArrayList<RitualComponent>(); ellipsoidRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.DUSK)); ellipsoidRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.DUSK)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java index 7d83e46c..53c81bba 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java @@ -138,7 +138,7 @@ public class RitualEffectEvaporation extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> ellipsoidRitual = new ArrayList(); + ArrayList<RitualComponent> ellipsoidRitual = new ArrayList<RitualComponent>(); ellipsoidRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.DUSK)); ellipsoidRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.DUSK)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java index 92e57285..74d0926b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java @@ -163,14 +163,14 @@ public class RitualEffectExpulsion extends RitualEffect double z = entityLiving.posZ; Random rand = new Random(); double d0 = x + (rand.nextDouble() - 0.5D) * distance; - double d1 = y + (double) (rand.nextInt((int) distance) - (distance) / 2); + double d1 = y + (rand.nextInt((int) distance) - (distance) / 2); double d2 = z + (rand.nextDouble() - 0.5D) * distance; int i = 0; while (!teleportTo(entityLiving, d0, d1, d2, x, y, z) && i < 100) { d0 = x + (rand.nextDouble() - 0.5D) * distance; - d1 = y + (double) (rand.nextInt((int) distance) - (distance) / 2); + d1 = y + (rand.nextInt((int) distance) - (distance) / 2); d2 = z + (rand.nextDouble() - 0.5D) * distance; i++; } @@ -192,9 +192,6 @@ public class RitualEffectExpulsion extends RitualEffect return false; } - double d3 = lastX; - double d4 = lastY; - double d5 = lastZ; SpellTeleport.moveEntityViaTeleport(entityLiving, event.targetX, event.targetY, event.targetZ); boolean flag = false; @@ -237,7 +234,7 @@ public class RitualEffectExpulsion extends RitualEffect if (!flag) { - SpellTeleport.moveEntityViaTeleport(entityLiving, d3, d4, d5); + SpellTeleport.moveEntityViaTeleport(entityLiving, lastX, lastY, lastZ); return false; } else { @@ -249,9 +246,9 @@ public class RitualEffectExpulsion extends RitualEffect float f = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; float f1 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; float f2 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; - double d7 = d3 + (entityLiving.posX - d3) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; - double d8 = d4 + (entityLiving.posY - d4) * d6 + entityLiving.worldObj.rand.nextDouble() * (double) entityLiving.height; - double d9 = d5 + (entityLiving.posZ - d5) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; + double d7 = lastX + (entityLiving.posX - lastX) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; + double d8 = lastY + (entityLiving.posY - lastY) * d6 + entityLiving.worldObj.rand.nextDouble() * (double) entityLiving.height; + double d9 = lastZ + (entityLiving.posZ - lastZ) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; entityLiving.worldObj.spawnParticle(EnumParticleTypes.PORTAL, d7, d8, d9, (double) f, (double) f1, (double) f2); } return true; @@ -262,7 +259,7 @@ public class RitualEffectExpulsion extends RitualEffect { if (entityLiving instanceof EntityPlayer) { - if (entityLiving != null && entityLiving instanceof EntityPlayerMP) + if (entityLiving instanceof EntityPlayerMP) { EntityPlayerMP entityplayermp = (EntityPlayerMP) entityLiving; @@ -274,7 +271,7 @@ public class RitualEffectExpulsion extends RitualEffect { if (entityLiving.isRiding()) { - entityLiving.mountEntity((Entity) null); + entityLiving.mountEntity(null); } entityLiving.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ); } @@ -289,7 +286,7 @@ public class RitualEffectExpulsion extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> expulsionRitual = new ArrayList(); + ArrayList<RitualComponent> expulsionRitual = new ArrayList<RitualComponent>(); expulsionRitual.add(new RitualComponent(2, 0, 2, RitualComponent.EARTH)); expulsionRitual.add(new RitualComponent(2, 0, 1, RitualComponent.EARTH)); expulsionRitual.add(new RitualComponent(1, 0, 2, RitualComponent.EARTH)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java index cd446a38..6b8faa20 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java @@ -102,7 +102,7 @@ public class RitualEffectFeatheredEarth extends RitualEffect //Nullifies all fal @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> featheredEarthRitual = new ArrayList(); + ArrayList<RitualComponent> featheredEarthRitual = new ArrayList<RitualComponent>(); featheredEarthRitual.add(new RitualComponent(1, 0, 0, RitualComponent.DUSK)); featheredEarthRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.DUSK)); featheredEarthRitual.add(new RitualComponent(0, 0, 1, RitualComponent.DUSK)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java index 8d0e9579..39c0e4e7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java @@ -135,7 +135,7 @@ public class RitualEffectFeatheredKnife extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> featheredKnifeRitual = new ArrayList(); + ArrayList<RitualComponent> featheredKnifeRitual = new ArrayList<RitualComponent>(); featheredKnifeRitual.add(new RitualComponent(1, 0, 0, RitualComponent.DUSK)); featheredKnifeRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.DUSK)); featheredKnifeRitual.add(new RitualComponent(0, 0, 1, RitualComponent.DUSK)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java index b3b7102a..177d7a7e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java @@ -95,7 +95,7 @@ public class RitualEffectFlight extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> flightRitual = new ArrayList(); + ArrayList<RitualComponent> flightRitual = new ArrayList<RitualComponent>(); flightRitual.add(new RitualComponent(1, 0, 0, RitualComponent.DUSK)); flightRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.DUSK)); flightRitual.add(new RitualComponent(0, 0, 1, RitualComponent.DUSK)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java index 36bb9bf8..2d967606 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java @@ -113,7 +113,7 @@ public class RitualEffectFullStomach extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> fullRitual = new ArrayList(); + ArrayList<RitualComponent> fullRitual = new ArrayList<RitualComponent>(); fullRitual.add(new RitualComponent(0, 0, 3, RitualComponent.FIRE)); fullRitual.add(new RitualComponent(0, 0, -3, RitualComponent.FIRE)); fullRitual.add(new RitualComponent(3, 0, 0, RitualComponent.FIRE)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java index 6502585e..3ec289cd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java @@ -111,7 +111,7 @@ public class RitualEffectGrowth extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> growthRitual = new ArrayList(); + ArrayList<RitualComponent> growthRitual = new ArrayList<RitualComponent>(); growthRitual.add(new RitualComponent(1, 0, 0, 1)); growthRitual.add(new RitualComponent(-1, 0, 0, 1)); growthRitual.add(new RitualComponent(0, 0, 1, 1)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java index c0f7dcf6..55307e88 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java @@ -109,7 +109,7 @@ public class RitualEffectHarvest extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> harvestRitual = new ArrayList(); + ArrayList<RitualComponent> harvestRitual = new ArrayList<RitualComponent>(); harvestRitual.add(new RitualComponent(1, 0, 1, RitualComponent.DUSK)); harvestRitual.add(new RitualComponent(1, 0, -1, RitualComponent.DUSK)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java index f2eac94b..8a39075a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java @@ -82,7 +82,7 @@ public class RitualEffectHealing extends RitualEffect if (livingEntity.getHealth() + 0.1f < livingEntity.getMaxHealth()) { PotionEffect effect = livingEntity.getActivePotionEffect(Potion.regeneration); - if (effect == null || (effect != null && effect.getAmplifier() <= potency && effect.getDuration() <= timeDelay)) + if (effect == null || (effect.getAmplifier() <= potency && effect.getDuration() <= timeDelay)) { if (!hasVirtus || (this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false))) { @@ -128,7 +128,7 @@ public class RitualEffectHealing extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> healingRitual = new ArrayList(); + ArrayList<RitualComponent> healingRitual = new ArrayList<RitualComponent>(); healingRitual.add(new RitualComponent(4, 0, 0, RitualComponent.AIR)); healingRitual.add(new RitualComponent(5, 0, -1, RitualComponent.AIR)); healingRitual.add(new RitualComponent(5, 0, 1, RitualComponent.AIR)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java index 63447ab4..6a6253dd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java @@ -123,7 +123,7 @@ public class RitualEffectInterdiction extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> interdictionRitual = new ArrayList(); + ArrayList<RitualComponent> interdictionRitual = new ArrayList<RitualComponent>(); interdictionRitual.add(new RitualComponent(1, 0, 0, 4)); interdictionRitual.add(new RitualComponent(-1, 0, 0, 4)); interdictionRitual.add(new RitualComponent(0, 0, 1, 4)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java index 73defce4..ab737d9b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java @@ -1,10 +1,7 @@ package WayofTime.alchemicalWizardry.common.rituals; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; -import java.util.Random; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; @@ -19,21 +16,17 @@ import WayofTime.alchemicalWizardry.api.RoutingFocusPosAndFacing; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.items.routing.InputRoutingFocus; import WayofTime.alchemicalWizardry.common.items.routing.OutputRoutingFocus; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class RitualEffectItemRouting extends RitualEffect { - Random rand = new Random(); - @Override public void performEffect(IMasterRitualStone ritualStone) { String owner = ritualStone.getOwner(); - int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); World world = ritualStone.getWorldObj(); BlockPos pos = ritualStone.getPosition(); @@ -42,9 +35,7 @@ public class RitualEffectItemRouting extends RitualEffect return; } - Map<Int3, IInventory> tileMap = new HashMap(); - - List<IInventory> outputList = new ArrayList(); + List<IInventory> outputList = new ArrayList<IInventory>(); for(int i=0; i<4; i++) //Check output foci chests, return if none available { Int3 outputFocusChest = this.getOutputBufferChestLocation(i); @@ -64,7 +55,7 @@ public class RitualEffectItemRouting extends RitualEffect for(IInventory outputFocusInventory : outputList) { { - OutputRoutingFocus outputFocus;; + OutputRoutingFocus outputFocus; RoutingFocusParadigm parad = new RoutingFocusParadigm(); @@ -168,7 +159,7 @@ public class RitualEffectItemRouting extends RitualEffect if(parad.doesItemMatch(keyStack, syphonedStack)) { - ItemStack newStack = null; + ItemStack newStack; if(parad.maximumAmount <= 0) { newStack = SpellHelper.insertStackIntoInventory(syphonedStack, outputChestInventory, inputDirection); @@ -181,9 +172,7 @@ public class RitualEffectItemRouting extends RitualEffect continue; } - int numberSyphoned = size - newStack.stackSize; - - if(newStack != null && newStack.stackSize <= 0) + if(newStack.stackSize <= 0) { size = newStack.stackSize; newStack = null; @@ -246,7 +235,7 @@ public class RitualEffectItemRouting extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> omegaRitual = new ArrayList(); + ArrayList<RitualComponent> omegaRitual = new ArrayList<RitualComponent>(); this.addCornerRunes(omegaRitual, 1, 0, RitualComponent.BLANK); this.addOffsetRunes(omegaRitual, 2, 1, 0, RitualComponent.FIRE); @@ -256,6 +245,4 @@ public class RitualEffectItemRouting extends RitualEffect return omegaRitual; } - - } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java index cccb4273..0e5112be 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java @@ -21,8 +21,6 @@ public class RitualEffectItemSuction extends RitualEffect { public static final int reductusDrain = 1; - public static final int timeDelayMin = 60; - @Override public void performEffect(IMasterRitualStone ritualStone) { @@ -61,8 +59,6 @@ public class RitualEffectItemSuction extends RitualEffect if (itemDropList != null) { - int invSize = tileEntity.getSizeInventory(); - for (EntityItem itemEntity : itemDropList) { // hasReductus = hasReductus && this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); @@ -70,7 +66,6 @@ public class RitualEffectItemSuction extends RitualEffect // { // continue; // } - ItemStack item = itemEntity.getEntityItem(); ItemStack copyStack = itemEntity.getEntityItem().copy(); int pastAmount = copyStack.stackSize; @@ -100,7 +95,6 @@ public class RitualEffectItemSuction extends RitualEffect if (count > 0) { SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * Math.min(count, 100)); - return; } } } @@ -114,7 +108,7 @@ public class RitualEffectItemSuction extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> suctionRitual = new ArrayList(); + ArrayList<RitualComponent> suctionRitual = new ArrayList<RitualComponent>(); suctionRitual.add(new RitualComponent(2, 0, 0, RitualComponent.AIR)); suctionRitual.add(new RitualComponent(-2, 0, 0, RitualComponent.AIR)); suctionRitual.add(new RitualComponent(0, 0, 2, RitualComponent.AIR)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java index be388038..bd77b632 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java @@ -18,8 +18,8 @@ import java.util.List; public class RitualEffectJumping extends RitualEffect { - public static final int aetherDrain = 10; - public static final int terraeDrain = 10; + public final int aetherDrain = 10; + public final int terraeDrain = 10; @Override public void performEffect(IMasterRitualStone ritualStone) @@ -98,7 +98,7 @@ public class RitualEffectJumping extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> jumpingRitual = new ArrayList(); + ArrayList<RitualComponent> jumpingRitual = new ArrayList<RitualComponent>(); for (int i = -1; i <= 1; i++) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java index d21f233b..030ab73a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java @@ -115,8 +115,6 @@ public class RitualEffectLava extends RitualEffect } } } - - } @Override @@ -128,7 +126,7 @@ public class RitualEffectLava extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> lavaRitual = new ArrayList(); + ArrayList<RitualComponent> lavaRitual = new ArrayList<RitualComponent>(); lavaRitual.add(new RitualComponent(1, 0, 0, 2)); lavaRitual.add(new RitualComponent(-1, 0, 0, 2)); lavaRitual.add(new RitualComponent(0, 0, 1, 2)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java index 47c54f00..2774c4fb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java @@ -208,7 +208,7 @@ public class RitualEffectLeap extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> leapingRitual = new ArrayList(); + ArrayList<RitualComponent> leapingRitual = new ArrayList<RitualComponent>(); leapingRitual.add(new RitualComponent(0, 0, -2, RitualComponent.DUSK)); leapingRitual.add(new RitualComponent(1, 0, -1, RitualComponent.AIR)); leapingRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.AIR)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java index 65b28ff9..da3b7397 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java @@ -97,7 +97,7 @@ public class RitualEffectLifeConduit extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> conduitRitual = new ArrayList(); + ArrayList<RitualComponent> conduitRitual = new ArrayList<RitualComponent>(); conduitRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.FIRE)); conduitRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.FIRE)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java index ab661c3a..8aed0a4c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java @@ -172,7 +172,6 @@ public class RitualEffectMagnetic extends RitualEffect j = pos.getY() - 1; this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); - return; } } } @@ -204,7 +203,7 @@ public class RitualEffectMagnetic extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> magneticRitual = new ArrayList(); + ArrayList<RitualComponent> magneticRitual = new ArrayList<RitualComponent>(); magneticRitual.add(new RitualComponent(1, 0, 1, RitualComponent.EARTH)); magneticRitual.add(new RitualComponent(1, 0, -1, RitualComponent.EARTH)); magneticRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.EARTH)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java index b3fe7231..363e5d6f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java @@ -72,7 +72,7 @@ public class RitualEffectOmegaStalling extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> omegaRitual = new ArrayList(); + ArrayList<RitualComponent> omegaRitual = new ArrayList<RitualComponent>(); this.addCornerRunes(omegaRitual, 1, 0, RitualComponent.FIRE); this.addOffsetRunes(omegaRitual, 2, 1, 0, RitualComponent.DUSK); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java index d2460140..1092ad61 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java @@ -67,7 +67,7 @@ public class RitualEffectOmegaTest extends RitualEffect Reagent reagent = null; - Map<Reagent, Integer> reagentMap = new HashMap(); + Map<Reagent, Integer> reagentMap = new HashMap<Reagent, Integer>(); for(int i=0; i<4; i++) { Int3 jarLoc = this.getJarLocation(i); @@ -133,7 +133,7 @@ public class RitualEffectOmegaTest extends RitualEffect if(!isTesting) { - int drainLeft = this.drainTotal; + int drainLeft = drainTotal; for(int i = 0; i < 4; i++) { if(drainLeft <= 0) @@ -173,7 +173,7 @@ public class RitualEffectOmegaTest extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> omegaRitual = new ArrayList(); + ArrayList<RitualComponent> omegaRitual = new ArrayList<RitualComponent>(); this.addCornerRunes(omegaRitual, 1, 0, RitualComponent.DUSK); this.addCornerRunes(omegaRitual, 2, 0, RitualComponent.DUSK); this.addCornerRunes(omegaRitual, 3, 0, RitualComponent.BLANK); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java index 07a11c4d..5cb2deda 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java @@ -34,9 +34,9 @@ public class RitualEffectSpawnWard extends RitualEffect int dimension = world.provider.getDimensionId(); - if (AlchemicalWizardryEventHooks.respawnMap.containsKey(new Integer(dimension))) + if (AlchemicalWizardryEventHooks.respawnMap.containsKey(dimension)) { - List<CoordAndRange> list = AlchemicalWizardryEventHooks.respawnMap.get(new Integer(dimension)); + List<CoordAndRange> list = AlchemicalWizardryEventHooks.respawnMap.get(dimension); if (list != null) { if (!list.contains(new CoordAndRange(pos, horizRange, vertRange))) @@ -55,15 +55,15 @@ public class RitualEffectSpawnWard extends RitualEffect } } else { - list = new LinkedList(); + list = new LinkedList<CoordAndRange>(); list.add(new CoordAndRange(pos, horizRange, vertRange)); - AlchemicalWizardryEventHooks.respawnMap.put(new Integer(dimension), list); + AlchemicalWizardryEventHooks.respawnMap.put(dimension, list); } } else { - List<CoordAndRange> list = new LinkedList(); + List<CoordAndRange> list = new LinkedList<CoordAndRange>(); list.add(new CoordAndRange(pos, horizRange, vertRange)); - AlchemicalWizardryEventHooks.respawnMap.put(new Integer(dimension), list); + AlchemicalWizardryEventHooks.respawnMap.put(dimension, list); } @@ -80,7 +80,7 @@ public class RitualEffectSpawnWard extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> wardRitualRitual = new ArrayList(); + ArrayList<RitualComponent> wardRitualRitual = new ArrayList<RitualComponent>(); for (int i = 2; i <= 4; i++) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSphereCreator.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSphereCreator.java index aead349e..49d79db6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSphereCreator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSphereCreator.java @@ -170,8 +170,6 @@ public class RitualEffectSphereCreator extends RitualEffect ritualStone.setActive(false); this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); - return; - } } @@ -203,7 +201,7 @@ public class RitualEffectSphereCreator extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> magneticRitual = new ArrayList(); + ArrayList<RitualComponent> magneticRitual = new ArrayList<RitualComponent>(); magneticRitual.add(new RitualComponent(1, 0, 1, RitualComponent.EARTH)); magneticRitual.add(new RitualComponent(1, 0, -1, RitualComponent.EARTH)); magneticRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.EARTH)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java index 9e4cb891..48969c77 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java @@ -103,7 +103,7 @@ public class RitualEffectSummonMeteor extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> meteorRitual = new ArrayList(); + ArrayList<RitualComponent> meteorRitual = new ArrayList<RitualComponent>(); meteorRitual.add(new RitualComponent(2, 0, 0, RitualComponent.FIRE)); meteorRitual.add(new RitualComponent(-2, 0, 0, RitualComponent.FIRE)); meteorRitual.add(new RitualComponent(0, 0, 2, RitualComponent.FIRE)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSupression.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSupression.java index 851c97bf..dc3150e8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSupression.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSupression.java @@ -123,7 +123,7 @@ public class RitualEffectSupression extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> supressionRitual = new ArrayList(); + ArrayList<RitualComponent> supressionRitual = new ArrayList<RitualComponent>(); supressionRitual.add(new RitualComponent(2, 0, 2, RitualComponent.WATER)); supressionRitual.add(new RitualComponent(2, 0, -2, RitualComponent.WATER)); supressionRitual.add(new RitualComponent(-2, 0, 2, RitualComponent.WATER)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java index aaa76a64..8bd7bbbc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java @@ -166,7 +166,7 @@ public class RitualEffectUnbinding extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> unbindingRitual = new ArrayList(); + ArrayList<RitualComponent> unbindingRitual = new ArrayList<RitualComponent>(); unbindingRitual.add(new RitualComponent(-2, 0, 0, 4)); unbindingRitual.add(new RitualComponent(2, 0, 0, 4)); unbindingRitual.add(new RitualComponent(0, 0, 2, 4)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectVeilOfEvil.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectVeilOfEvil.java index 0710499e..b1efd0e2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectVeilOfEvil.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectVeilOfEvil.java @@ -34,9 +34,9 @@ public class RitualEffectVeilOfEvil extends RitualEffect int dimension = world.provider.getDimensionId(); - if (AlchemicalWizardryEventHooks.forceSpawnMap.containsKey(new Integer(dimension))) + if (AlchemicalWizardryEventHooks.forceSpawnMap.containsKey(dimension)) { - List<CoordAndRange> list = AlchemicalWizardryEventHooks.forceSpawnMap.get(new Integer(dimension)); + List<CoordAndRange> list = AlchemicalWizardryEventHooks.forceSpawnMap.get(dimension); if (list != null) { if (!list.contains(new CoordAndRange(pos, horizRange, vertRange))) @@ -57,15 +57,15 @@ public class RitualEffectVeilOfEvil extends RitualEffect } } else { - list = new LinkedList(); + list = new LinkedList<CoordAndRange>(); list.add(new CoordAndRange(pos, horizRange, vertRange)); - AlchemicalWizardryEventHooks.forceSpawnMap.put(new Integer(dimension), list); + AlchemicalWizardryEventHooks.forceSpawnMap.put(dimension, list); } } else { - List<CoordAndRange> list = new LinkedList(); + List<CoordAndRange> list = new LinkedList<CoordAndRange>(); list.add(new CoordAndRange(pos, horizRange, vertRange)); - AlchemicalWizardryEventHooks.forceSpawnMap.put(new Integer(dimension), list); + AlchemicalWizardryEventHooks.forceSpawnMap.put(dimension, list); } @@ -82,7 +82,7 @@ public class RitualEffectVeilOfEvil extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> veilRitual = new ArrayList(); + ArrayList<RitualComponent> veilRitual = new ArrayList<RitualComponent>(); veilRitual.add(new RitualComponent(1, 0, 2, RitualComponent.DUSK)); veilRitual.add(new RitualComponent(2, 0, 1, RitualComponent.DUSK)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java index e0080ad8..87e19084 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java @@ -193,7 +193,7 @@ public class RitualEffectWater extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> waterRitual = new ArrayList(); + ArrayList<RitualComponent> waterRitual = new ArrayList<RitualComponent>(); waterRitual.add(new RitualComponent(-1, 0, 1, 1)); waterRitual.add(new RitualComponent(-1, 0, -1, 1)); waterRitual.add(new RitualComponent(1, 0, -1, 1)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java index c6bba4f3..365e40b7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java @@ -35,7 +35,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect World world = ritualStone.getWorldObj(); BlockPos pos = ritualStone.getPosition(); - if (world.getWorldTime() % this.timeDelay != 0) + if (world.getWorldTime() % timeDelay != 0) { return; } @@ -95,7 +95,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect entityCount++; - tileAltar.sacrificialDaggerCall(this.amount * (hasTennebrae ? 2 : 1) * (hasOffensa ? 2 : 1), true); + tileAltar.sacrificialDaggerCall(amount * (hasTennebrae ? 2 : 1) * (hasOffensa ? 2 : 1), true); } } @@ -117,7 +117,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> wellOfSufferingRitual = new ArrayList(); + ArrayList<RitualComponent> wellOfSufferingRitual = new ArrayList<RitualComponent>(); wellOfSufferingRitual.add(new RitualComponent(1, 0, 1, RitualComponent.FIRE)); wellOfSufferingRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.FIRE)); wellOfSufferingRitual.add(new RitualComponent(1, 0, -1, RitualComponent.FIRE)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicIgnMeta.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicIgnMeta.java index 7fb2f489..2dd2077b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicIgnMeta.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicIgnMeta.java @@ -8,6 +8,6 @@ public class RoutingFocusLogicIgnMeta extends RoutingFocusLogic @Override public boolean getDefaultMatch(ItemStack keyStack, ItemStack checkedStack) { - return (keyStack != null ? checkedStack != null && keyStack.getItem() == checkedStack.getItem() : false); + return keyStack != null && checkedStack != null && keyStack.getItem() == checkedStack.getItem(); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimit.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimit.java index 26fb3495..ad1aed90 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimit.java @@ -5,6 +5,7 @@ import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; public class RoutingFocusLogicLimit extends RoutingFocusLogic implements ILimitingLogic { + @Override public int getRoutingLimit() { return 0; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java index 5a984a87..0891c0f3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java @@ -2,6 +2,7 @@ package WayofTime.alchemicalWizardry.common.spell.simple; import java.util.Random; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -78,7 +79,7 @@ public class SpellEarthBender extends HomSpell if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(stack, player, this.getDefensiveEnergy()); + SoulNetworkHandler.syphonAndDamageFromNetwork(stack, player, this.getDefensiveEnergy()); } double xCoord = player.posX; @@ -144,7 +145,7 @@ public class SpellEarthBender extends HomSpell if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(stack, player, this.getEnvironmentalEnergy()); + SoulNetworkHandler.syphonAndDamageFromNetwork(stack, player, this.getEnvironmentalEnergy()); } int range = 3; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiChemistrySet.java similarity index 93% rename from src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java rename to src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiChemistrySet.java index 06339896..e1a05602 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiChemistrySet.java @@ -10,9 +10,9 @@ import org.lwjgl.opengl.GL11; import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable; -public class GuiWritingTable extends GuiContainer +public class GuiChemistrySet extends GuiContainer { - public GuiWritingTable(InventoryPlayer inventoryPlayer, TEChemistrySet tileEntity) + public GuiChemistrySet(InventoryPlayer inventoryPlayer, TEChemistrySet tileEntity) { super(new ContainerWritingTable(inventoryPlayer, tileEntity)); xSize = 176; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java index 496aac83..8245881e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.common.tileEntity.gui; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.world.World; @@ -55,8 +54,6 @@ public class GuiHandler implements IGuiHandler TileEntity tileEntity; BlockPos pos = new BlockPos(x, y, z); - ItemStack held = player.getHeldItem(); - switch (id) { case 0: @@ -64,7 +61,7 @@ public class GuiHandler implements IGuiHandler if (tileEntity instanceof TEChemistrySet) { - return new GuiWritingTable(player.inventory, (TEChemistrySet) tileEntity); + return new GuiChemistrySet(player.inventory, (TEChemistrySet) tileEntity); } break; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiTeleposer.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiTeleposer.java index 35187582..050849d6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiTeleposer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiTeleposer.java @@ -2,7 +2,6 @@ package WayofTime.alchemicalWizardry.common.tileEntity.gui; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerTeleposer; -import net.minecraft.client.gui.inventory.GuiBrewingStand; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; From d88cc2d79ea4c7c2361aaa686789c41dc8fec039 Mon Sep 17 00:00:00 2001 From: Arcaratus <byou64@gmail.com> Date: Thu, 30 Jul 2015 15:53:50 -0400 Subject: [PATCH 26/33] Finished ModItems --- .../AlchemicalWizardry.java | 9 +- .../alchemicalWizardry/ModItems.java | 392 +++++++----------- .../common/AlchemicalWizardryEventHooks.java | 4 +- .../common/block/BlockArmourForge.java | 2 +- .../common/items/ActivationCrystal.java | 5 +- .../{EnergySword.java => BoundBlade.java} | 4 +- .../common/items/armour/BoundArmour.java | 6 +- .../common/omega/OmegaParadigm.java | 2 +- .../common/rituals/RitualEffectUnbinding.java | 2 +- 9 files changed, 158 insertions(+), 268 deletions(-) rename src/main/java/WayofTime/alchemicalWizardry/common/items/{EnergySword.java => BoundBlade.java} (98%) diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index 9ab17dd8..86496076 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -563,7 +563,6 @@ public class AlchemicalWizardry ModBlocks.init(); ModItems.init(); - ModItems.registerItems(); RecipeSorter.register("AWWayofTime:shapedorb", ShapedBloodOrbRecipe.class, Category.SHAPED, "before:minecraft:shapeless"); RecipeSorter.register("AWWayofTime:shapelessorb", ShapelessBloodOrbRecipe.class, Category.SHAPELESS, "after:minecraft:shapeless"); @@ -1535,10 +1534,10 @@ public class AlchemicalWizardry ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems, 1, 7), new ReagentStack(ReagentRegistry.reductusReagent, 1000)); ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems, 1, 8), new ReagentStack(ReagentRegistry.potentiaReagent, 1000)); - OmegaRegistry.registerParadigm(ReagentRegistry.aquasalusReagent, new OmegaParadigmWater((OmegaArmour)ModItems.boundHelmetWater, (OmegaArmour)ModItems.boundPlateWater, (OmegaArmour)ModItems.boundLeggingsWater, (OmegaArmour)ModItems.boundBootsWater)); - OmegaRegistry.registerParadigm(ReagentRegistry.terraeReagent, new OmegaParadigmEarth((OmegaArmour)ModItems.boundHelmetEarth, (OmegaArmour)ModItems.boundPlateEarth, (OmegaArmour)ModItems.boundLeggingsEarth, (OmegaArmour)ModItems.boundBootsEarth)); - OmegaRegistry.registerParadigm(ReagentRegistry.aetherReagent, new OmegaParadigmWind((OmegaArmour)ModItems.boundHelmetWind, (OmegaArmour)ModItems.boundPlateWind, (OmegaArmour)ModItems.boundLeggingsWind, (OmegaArmour)ModItems.boundBootsWind)); - OmegaRegistry.registerParadigm(ReagentRegistry.incendiumReagent, new OmegaParadigmFire((OmegaArmour)ModItems.boundHelmetFire, (OmegaArmour)ModItems.boundPlateFire, (OmegaArmour)ModItems.boundLeggingsFire, (OmegaArmour)ModItems.boundBootsFire)); + OmegaRegistry.registerParadigm(ReagentRegistry.aquasalusReagent, new OmegaParadigmWater((OmegaArmour)ModItems.boundHelmetWater, (OmegaArmour)ModItems.boundChestplateWater, (OmegaArmour)ModItems.boundLeggingsWater, (OmegaArmour)ModItems.boundBootsWater)); + OmegaRegistry.registerParadigm(ReagentRegistry.terraeReagent, new OmegaParadigmEarth((OmegaArmour)ModItems.boundHelmetEarth, (OmegaArmour)ModItems.boundChestplateEarth, (OmegaArmour)ModItems.boundLeggingsEarth, (OmegaArmour)ModItems.boundBootsEarth)); + OmegaRegistry.registerParadigm(ReagentRegistry.aetherReagent, new OmegaParadigmWind((OmegaArmour)ModItems.boundHelmetWind, (OmegaArmour)ModItems.boundChestplateWind, (OmegaArmour)ModItems.boundLeggingsWind, (OmegaArmour)ModItems.boundBootsWind)); + OmegaRegistry.registerParadigm(ReagentRegistry.incendiumReagent, new OmegaParadigmFire((OmegaArmour)ModItems.boundHelmetFire, (OmegaArmour)ModItems.boundChestplateFire, (OmegaArmour)ModItems.boundLeggingsFire, (OmegaArmour)ModItems.boundBootsFire)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/ModItems.java b/src/main/java/WayofTime/alchemicalWizardry/ModItems.java index aea436af..4b6cf98b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/ModItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/ModItems.java @@ -28,7 +28,7 @@ import WayofTime.alchemicalWizardry.common.items.EarthScribeTool; import WayofTime.alchemicalWizardry.common.items.EnergyBattery; import WayofTime.alchemicalWizardry.common.items.EnergyBazooka; import WayofTime.alchemicalWizardry.common.items.EnergyBlast; -import WayofTime.alchemicalWizardry.common.items.EnergySword; +import WayofTime.alchemicalWizardry.common.items.BoundBlade; import WayofTime.alchemicalWizardry.common.items.EnhancedTelepositionFocus; import WayofTime.alchemicalWizardry.common.items.FireScribeTool; import WayofTime.alchemicalWizardry.common.items.ItemAlchemyBase; @@ -94,6 +94,8 @@ import WayofTime.alchemicalWizardry.common.items.sigil.SigilVoid; import WayofTime.alchemicalWizardry.common.items.sigil.SigilWater; import WayofTime.alchemicalWizardry.common.items.sigil.holding.SigilOfHolding; +import java.util.ArrayList; + /** * Created with IntelliJ IDEA. * User: Pokefenn @@ -131,7 +133,7 @@ public class ModItems public static Item boundAxe; public static Item boundShovel; public static Item boundHelmet; - public static Item boundPlate; + public static Item boundChestplate; public static Item boundLeggings; public static Item boundBoots; public static Item weakBloodShard; @@ -216,22 +218,22 @@ public class ModItems public static Item itemAssassinSigil; public static Item boundHelmetWater; - public static Item boundPlateWater; + public static Item boundChestplateWater; public static Item boundLeggingsWater; public static Item boundBootsWater; public static Item boundHelmetEarth; - public static Item boundPlateEarth; + public static Item boundChestplateEarth; public static Item boundLeggingsEarth; public static Item boundBootsEarth; public static Item boundHelmetWind; - public static Item boundPlateWind; + public static Item boundChestplateWind; public static Item boundLeggingsWind; public static Item boundBootsWind; public static Item boundHelmetFire; - public static Item boundPlateFire; + public static Item boundChestplateFire; public static Item boundLeggingsFire; public static Item boundBootsFire; @@ -244,269 +246,159 @@ public class ModItems public static Item ritualDismantler; + public static ArrayList<String> itemsNotToBeRegistered = new ArrayList<String>(); + public static void init() { - weakBloodOrb = new EnergyBattery(5000).setUnlocalizedName("weakBloodOrb"); - apprenticeBloodOrb = new ApprenticeBloodOrb(25000).setUnlocalizedName("apprenticeBloodOrb"); - magicianBloodOrb = new MagicianBloodOrb(150000).setUnlocalizedName("magicianBloodOrb"); - masterBloodOrb = new MasterBloodOrb(1000000).setUnlocalizedName("masterBloodOrb"); - archmageBloodOrb = new ArchmageBloodOrb(10000000).setUnlocalizedName("archmageBloodOrb"); - transcendentBloodOrb = new TranscendentBloodOrb(30000000).setUnlocalizedName("transcendentBloodOrb"); - energyBlaster = new EnergyBlast().setUnlocalizedName("energyBlast"); - energySword = new EnergySword().setUnlocalizedName("energySword"); - lavaCrystal = new LavaCrystal().setUnlocalizedName("lavaCrystal"); - waterSigil = new SigilWater().setUnlocalizedName("waterSigil"); - lavaSigil = new SigilLava().setUnlocalizedName("lavaSigil"); - voidSigil = new SigilVoid().setUnlocalizedName("voidSigil"); - blankSlate = new AWBaseItems().setUnlocalizedName("blankSlate"); - reinforcedSlate = new AWBaseItems().setUnlocalizedName("reinforcedSlate"); - sacrificialDagger = new SacrificialDagger().setUnlocalizedName("sacrificialDagger"); - daggerOfSacrifice = new DaggerOfSacrifice().setUnlocalizedName("daggerOfSacrifice"); - airSigil = new SigilAir().setUnlocalizedName("airSigil"); - sigilOfTheFastMiner = new SigilOfTheFastMiner().setUnlocalizedName("sigilOfTheFastMiner"); - sigilOfElementalAffinity = new SigilOfElementalAffinity().setUnlocalizedName("sigilOfElementalAffinity"); - sigilOfHaste = new SigilOfHaste().setUnlocalizedName("sigilOfHaste"); - sigilOfHolding = new SigilOfHolding().setUnlocalizedName("sigilOfHolding"); - divinationSigil = new SigilDivination().setUnlocalizedName("divinationSigil"); - waterScribeTool = new WaterScribeTool().setUnlocalizedName("waterScribeTool"); - fireScribeTool = new FireScribeTool().setUnlocalizedName("fireScribeTool"); - earthScribeTool = new EarthScribeTool().setUnlocalizedName("earthScribeTool"); - airScribeTool = new AirScribeTool().setUnlocalizedName("airScribeTool"); - activationCrystal = new ActivationCrystal(); - boundPickaxe = new BoundPickaxe().setUnlocalizedName("boundPickaxe"); - boundAxe = new BoundAxe().setUnlocalizedName("boundAxe"); - boundShovel = new BoundShovel().setUnlocalizedName("boundShovel"); - boundHelmet = new BoundArmour(0).setUnlocalizedName("boundHelmet"); - boundPlate = new BoundArmour(1).setUnlocalizedName("boundPlate"); - boundLeggings = new BoundArmour(2).setUnlocalizedName("boundLeggings"); - boundBoots = new BoundArmour(3).setUnlocalizedName("boundBoots"); - weakBloodShard = new BloodShard().setUnlocalizedName("weakBloodShard"); - growthSigil = new SigilOfGrowth().setUnlocalizedName("growthSigil"); - blankSpell = new BlankSpell().setUnlocalizedName("blankSpell"); - alchemyFlask = new AlchemyFlask().setUnlocalizedName("alchemyFlask"); - standardBindingAgent = new StandardBindingAgent().setUnlocalizedName("standardBindingAgent"); - mundanePowerCatalyst = new MundanePowerCatalyst().setUnlocalizedName("mundanePowerCatalyst"); - averagePowerCatalyst = new AveragePowerCatalyst().setUnlocalizedName("averagePowerCatalyst"); - greaterPowerCatalyst = new GreaterPowerCatalyst().setUnlocalizedName("greaterPowerCatalyst"); - mundaneLengtheningCatalyst = new MundaneLengtheningCatalyst().setUnlocalizedName("mundaneLengtheningCatalyst"); - averageLengtheningCatalyst = new AverageLengtheningCatalyst().setUnlocalizedName("averageLengtheningCatalyst"); - greaterLengtheningCatalyst = new GreaterLengtheningCatalyst().setUnlocalizedName("greaterLengtheningCatalyst"); - incendium = new AlchemyReagent().setUnlocalizedName("incendium"); - magicales = new AlchemyReagent().setUnlocalizedName("magicales"); - sanctus = new AlchemyReagent().setUnlocalizedName("sanctus"); - aether = new AlchemyReagent().setUnlocalizedName("aether"); - simpleCatalyst = new AlchemyReagent().setUnlocalizedName("simpleCatalyst"); - crepitous = new AlchemyReagent().setUnlocalizedName("crepitous"); - crystallos = new AlchemyReagent().setUnlocalizedName("crystallos"); - terrae = new AlchemyReagent().setUnlocalizedName("terrae"); - aquasalus = new AlchemyReagent().setUnlocalizedName("aquasalus"); - tennebrae = new AlchemyReagent().setUnlocalizedName("tennebrae"); - demonBloodShard = new BloodShard().setUnlocalizedName("demonBloodShard"); - sigilOfWind = new SigilOfWind().setUnlocalizedName("sigilOfWind"); - telepositionFocus = new TelepositionFocus(1).setUnlocalizedName("telepositionFocus"); - enhancedTelepositionFocus = new EnhancedTelepositionFocus().setUnlocalizedName("enhancedTelepositionFocus"); - reinforcedTelepositionFocus = new ReinforcedTelepositionFocus().setUnlocalizedName("reinforcedTelepositionFocus"); - demonicTelepositionFocus = new DemonicTelepositionFocus().setUnlocalizedName("demonicTelepositionFocus"); - imbuedSlate = new AWBaseItems().setUnlocalizedName("imbuedSlate"); - demonicSlate = new AWBaseItems().setUnlocalizedName("demonicSlate"); - duskScribeTool = new DuskScribeTool().setUnlocalizedName("duskScribeTool"); - sigilOfTheBridge = new SigilOfTheBridge().setUnlocalizedName("sigilOfTheBridge"); - armourInhibitor = new ArmourInhibitor().setUnlocalizedName("armourInhibitor"); - creativeFiller = new CheatyItem().setUnlocalizedName("cheatyItem"); - demonPlacer = new DemonPlacer().setUnlocalizedName("demonPlacer"); - creativeDagger = new CreativeDagger().setUnlocalizedName("creativeDagger"); - weakFillingAgent = new WeakFillingAgent().setUnlocalizedName("weakFillingAgent"); - standardFillingAgent = new StandardFillingAgent().setUnlocalizedName("standardFillingAgent"); - enhancedFillingAgent = new EnhancedFillingAgent().setUnlocalizedName("enhancedFillingAgent"); - weakBindingAgent = new WeakBindingAgent().setUnlocalizedName("weakBindingAgent"); - itemRitualDiviner = new ItemRitualDiviner().setUnlocalizedName("ritualDiviner"); - sigilOfMagnetism = new SigilOfMagnetism().setUnlocalizedName("sigilOfMagnetism"); - itemKeyOfDiablo = new ItemDiabloKey().setUnlocalizedName("itemDiabloKey"); - energyBazooka = new EnergyBazooka().setUnlocalizedName("energyBazooka"); - itemBloodLightSigil = new SigilBloodLight().setUnlocalizedName("bloodLightSigil"); - itemComplexSpellCrystal = new ItemComplexSpellCrystal().setUnlocalizedName("itemComplexSpellCrystal"); - bucketLife = (new LifeBucket(ModBlocks.blockLifeEssence)).setUnlocalizedName("bucketLife").setContainerItem(Items.bucket).setCreativeTab(CreativeTabs.tabMisc); - itemSigilOfEnderSeverance = (new SigilOfEnderSeverance()).setUnlocalizedName("itemSigilOfEnderSeverance"); - baseItems = new ItemComponents().setUnlocalizedName("baseItems"); - baseAlchemyItems = new ItemAlchemyBase().setUnlocalizedName("baseAlchemyItems"); - itemSigilOfSupression = new SigilOfSupression().setUnlocalizedName("itemSigilOfSupression"); - itemFluidSigil = new SigilFluid().setUnlocalizedName("itemFluidSigil"); - itemSeerSigil = new SigilSeer().setUnlocalizedName("itemSeerSigil"); - customTool = (ItemSpellMultiTool)(new ItemSpellMultiTool().setUnlocalizedName("multiTool")); + weakBloodOrb = registerItem(new EnergyBattery(5000), "weak_blood_orb"); + apprenticeBloodOrb = registerItem(new ApprenticeBloodOrb(25000), "apprentice_blood_orb"); + magicianBloodOrb = registerItem(new MagicianBloodOrb(150000), "magician_blood_orb"); + masterBloodOrb = registerItem(new MasterBloodOrb(1000000), "master_blood_orb"); + archmageBloodOrb = registerItem(new ArchmageBloodOrb(10000000), "archmage_blood_orb"); + transcendentBloodOrb = registerItem(new TranscendentBloodOrb(30000000), "transcendent_blood_orb"); + energyBlaster = registerItem(new EnergyBlast(), "energy_blaster"); + energySword = registerItem(new BoundBlade(), "bound_blade"); + lavaCrystal = registerItem(new LavaCrystal(), "lava_crystal"); + waterSigil = registerItem(new SigilWater(), "water_sigil"); + lavaSigil = registerItem(new SigilLava(), "lava_sigil"); + voidSigil = registerItem(new SigilVoid(), "void_sigil"); + blankSlate = registerItem(new AWBaseItems(), "blank_slate"); + reinforcedSlate = registerItem(new AWBaseItems(), "reinforced_slate"); + sacrificialDagger = registerItem(new SacrificialDagger(), "sacrificial_agger"); + daggerOfSacrifice = registerItem(new DaggerOfSacrifice(), "dagger_of_sacrifice"); + airSigil = registerItem(new SigilAir(), "air_sigil"); + sigilOfTheFastMiner = registerItem(new SigilOfTheFastMiner(), "sigil_of_the_fast_miner"); + sigilOfElementalAffinity = registerItem(new SigilOfElementalAffinity(), "sigil_of_elemental_affinity"); + sigilOfHaste = registerItem(new SigilOfHaste(), "sigil_of_haste"); + sigilOfHolding = registerItem(new SigilOfHolding(), "sigil_of_holding"); + divinationSigil = registerItem(new SigilDivination(), "divination_sigil"); + waterScribeTool = registerItem(new WaterScribeTool(), "water_scribe_tool"); + fireScribeTool = registerItem(new FireScribeTool(), "fire_scribe_tool"); + earthScribeTool = registerItem(new EarthScribeTool(), "earth_scribe_tool"); + airScribeTool = registerItem(new AirScribeTool(), "air_scribe_tool"); + activationCrystal = registerItem(new ActivationCrystal(), "activation_crystal"); + boundPickaxe = registerItem(new BoundPickaxe(), "bound_pickaxe"); + boundAxe = registerItem(new BoundAxe(), "bound_axe"); + boundShovel = registerItem(new BoundShovel(), "bound_shovel"); + boundHelmet = registerItem(new BoundArmour(0), "bound_helmet"); + boundChestplate = registerItem(new BoundArmour(1), "bound_chestplate"); + boundLeggings = registerItem(new BoundArmour(2), "bound_leggings"); + boundBoots = registerItem(new BoundArmour(3), "bound_boots"); + weakBloodShard = registerItem(new BloodShard(), "weak_blood_shard"); + growthSigil = registerItem(new SigilOfGrowth(), "growth_sigil"); + blankSpell = registerItem(new BlankSpell(), "blank_spell"); + alchemyFlask = registerItem(new AlchemyFlask(), "alchemy_flask"); + standardBindingAgent = registerItem(new StandardBindingAgent(), "standard_binding_agent"); + mundanePowerCatalyst = registerItem(new MundanePowerCatalyst(), "mundane_power_catalyst"); + averagePowerCatalyst = registerItem(new AveragePowerCatalyst(), "average_power_catalyst"); + greaterPowerCatalyst = registerItem(new GreaterPowerCatalyst(), "greater_power_catalyst"); + mundaneLengtheningCatalyst = registerItem(new MundaneLengtheningCatalyst(), "mundane_lengthening_catalyst"); + averageLengtheningCatalyst = registerItem(new AverageLengtheningCatalyst(), "average_lengthening_catalyst"); + greaterLengtheningCatalyst = registerItem(new GreaterLengtheningCatalyst(), "greater_lengthening_catalyst"); + incendium = registerItem(new AlchemyReagent(), "incendium"); + magicales = registerItem(new AlchemyReagent(), "magicales"); + sanctus = registerItem(new AlchemyReagent(), "sanctus"); + aether = registerItem(new AlchemyReagent(), "aether"); + simpleCatalyst = registerItem(new AlchemyReagent(), "simple_catalyst"); + crepitous = registerItem(new AlchemyReagent(), "crepitous"); + crystallos = registerItem(new AlchemyReagent(), "crystallos"); + terrae = registerItem(new AlchemyReagent(), "terrae"); + aquasalus = registerItem(new AlchemyReagent(), "aquasalus"); + tennebrae = registerItem(new AlchemyReagent(), "tennebrae"); + demonBloodShard = registerItem(new BloodShard(), "demon_blood_shard"); + sigilOfWind = registerItem(new SigilOfWind(), "sigil_of_wind"); + telepositionFocus = registerItem(new TelepositionFocus(1), "teleposition_focus"); + enhancedTelepositionFocus = registerItem(new EnhancedTelepositionFocus(), "enhanced_teleposition_focus"); + reinforcedTelepositionFocus = registerItem(new ReinforcedTelepositionFocus(), "reinforced_teleposition_focus"); + demonicTelepositionFocus = registerItem(new DemonicTelepositionFocus(), "demonic_teleposition_focus"); + imbuedSlate = registerItem(new AWBaseItems(), "imbued_slate"); + demonicSlate = registerItem(new AWBaseItems(), "demonic_slate"); + duskScribeTool = registerItem(new DuskScribeTool(), "dusk_scribe_tool"); + sigilOfTheBridge = registerItem(new SigilOfTheBridge(), "sigil_of_the_bridge"); + armourInhibitor = registerItem(new ArmourInhibitor(), "armour_inhibitor"); + creativeFiller = registerItem(new CheatyItem(), "creative_orb"); + demonPlacer = registerItem(new DemonPlacer(), "demon_placer"); + creativeDagger = registerItem(new CreativeDagger(), "creative_dagger"); + weakFillingAgent = registerItem(new WeakFillingAgent(), "weak_filling_agent"); + standardFillingAgent = registerItem(new StandardFillingAgent(), "standard_filling_agent"); + enhancedFillingAgent = registerItem(new EnhancedFillingAgent(), "enhanced_filling_agent"); + weakBindingAgent = registerItem(new WeakBindingAgent(), "weak_binding_agent"); + itemRitualDiviner = registerItem(new ItemRitualDiviner(), "ritual_diviner"); + sigilOfMagnetism = registerItem(new SigilOfMagnetism(), "sigil_of_magnetism"); + itemKeyOfDiablo = registerItem(new ItemDiabloKey(), "key_of_binding"); + energyBazooka = registerItem(new EnergyBazooka(), "energy_bazooka"); + itemBloodLightSigil = registerItem(new SigilBloodLight(), "blood_light_sigil"); + itemComplexSpellCrystal = registerItem(new ItemComplexSpellCrystal(), "complex_spell_crystal"); + bucketLife = registerItem(new LifeBucket(ModBlocks.blockLifeEssence), "bucket_life").setContainerItem(Items.bucket).setCreativeTab(CreativeTabs.tabMisc); + itemSigilOfEnderSeverance = registerItem(new SigilOfEnderSeverance(), "sigil_of_ender_severance"); + baseItems = registerItem(new ItemComponents(), "base_items"); + baseAlchemyItems = registerItem(new ItemAlchemyBase(), "base_alchemy_items"); + itemSigilOfSupression = registerItem(new SigilOfSupression(), "sigil_of_suppression"); + itemFluidSigil = registerItem(new SigilFluid(), "fluid_sigil"); + itemSeerSigil = registerItem(new SigilSeer(), "sigil_of_sight"); + customTool = (ItemSpellMultiTool) registerItem(new ItemSpellMultiTool(), "multi_tool"); SpellParadigmTool.customTool = customTool; - itemCombinationalCatalyst = new CombinationalCatalyst().setUnlocalizedName("itemCombinationalCatalyst"); - itemAttunedCrystal = new ItemAttunedCrystal().setUnlocalizedName("itemAttunedCrystal"); - itemTankSegmenter = new ItemTankSegmenter().setUnlocalizedName("itemTankSegmenter"); - itemDestinationClearer = new ItemDestinationClearer().setUnlocalizedName("destinationClearer"); + itemCombinationalCatalyst = registerItem(new CombinationalCatalyst(), "combinational_catalyst"); + itemAttunedCrystal = registerItem(new ItemAttunedCrystal(), "attuned_crystal"); + itemTankSegmenter = registerItem(new ItemTankSegmenter(), "tank_segmenter"); + itemDestinationClearer = registerItem(new ItemDestinationClearer(), "destination_clearer"); - dawnScribeTool = new DawnScribeTool().setUnlocalizedName("dawnScribeTool"); + dawnScribeTool = registerItem(new DawnScribeTool(), "dawn_scribe_tool"); - itemBloodPack = new ItemBloodLetterPack().setUnlocalizedName("itemBloodPack"); - itemHarvestSigil = new SigilHarvest().setUnlocalizedName("itemHarvestSigil"); - itemCompressionSigil = new SigilPackRat().setUnlocalizedName("itemCompressionSigil"); - itemAssassinSigil = new SigilOfTheAssassin().setUnlocalizedName("itemAssassinSigil"); + itemBloodPack = registerItem(new ItemBloodLetterPack(), "blood_pack"); + itemHarvestSigil = registerItem(new SigilHarvest(), "harvest_sigil"); + itemCompressionSigil = registerItem(new SigilPackRat(), "compression_sigil"); + itemAssassinSigil = registerItem(new SigilOfTheAssassin(), "assassin_sigil"); - boundHelmetWater = new OmegaArmourWater(0).setUnlocalizedName("boundHelmetWater"); - boundPlateWater = new OmegaArmourWater(1).setUnlocalizedName("boundPlateWater"); - boundLeggingsWater = new OmegaArmourWater(2).setUnlocalizedName("boundLeggingsWater"); - boundBootsWater = new OmegaArmourWater(3).setUnlocalizedName("boundBootsWater"); + boundHelmetWater = registerItem(new OmegaArmourWater(0), "bound_helmet_water"); + boundChestplateWater = registerItem(new OmegaArmourWater(1), "bound_chestplate_water"); + boundLeggingsWater = registerItem(new OmegaArmourWater(2), "bound_leggings_water"); + boundBootsWater = registerItem(new OmegaArmourWater(3), "bound_boots_water"); - boundHelmetEarth = new OmegaArmourEarth(0).setUnlocalizedName("boundHelmetEarth"); - boundPlateEarth = new OmegaArmourEarth(1).setUnlocalizedName("boundPlateEarth"); - boundLeggingsEarth = new OmegaArmourEarth(2).setUnlocalizedName("boundLeggingsEarth"); - boundBootsEarth = new OmegaArmourEarth(3).setUnlocalizedName("boundBootsEarth"); + boundHelmetEarth = registerItem(new OmegaArmourEarth(0), "bound_helmet_earth"); + boundChestplateEarth = registerItem(new OmegaArmourEarth(1), "bound_chestplate_earth"); + boundLeggingsEarth = registerItem(new OmegaArmourEarth(2), "bound_leggings_earth"); + boundBootsEarth = registerItem(new OmegaArmourEarth(3), "bound_boots_earth"); - boundHelmetWind = new OmegaArmourWind(0).setUnlocalizedName("boundHelmetWind"); - boundPlateWind = new OmegaArmourWind(1).setUnlocalizedName("boundPlateWind"); - boundLeggingsWind = new OmegaArmourWind(2).setUnlocalizedName("boundLeggingsWind"); - boundBootsWind = new OmegaArmourWind(3).setUnlocalizedName("boundBootsWind"); + boundHelmetWind = registerItem(new OmegaArmourWind(0), "bound_helmet_wind"); + boundChestplateWind = registerItem(new OmegaArmourWind(1), "bound_chestplate_wind"); + boundLeggingsWind = registerItem(new OmegaArmourWind(2), "bound_leggings_wind"); + boundBootsWind = registerItem(new OmegaArmourWind(3), "bound_boots_wind"); - boundHelmetFire = new OmegaArmourFire(0).setUnlocalizedName("boundHelmetFire"); - boundPlateFire = new OmegaArmourFire(1).setUnlocalizedName("boundPlateFire"); - boundLeggingsFire = new OmegaArmourFire(2).setUnlocalizedName("boundLeggingsFire"); - boundBootsFire = new OmegaArmourFire(3).setUnlocalizedName("boundBootsFire"); + boundHelmetFire = registerItem(new OmegaArmourFire(0), "bound_helmet_fire"); + boundChestplateFire = registerItem(new OmegaArmourFire(1), "bound_chestplate_fire"); + boundLeggingsFire = registerItem(new OmegaArmourFire(2), "bound_leggings_fire"); + boundBootsFire = registerItem(new OmegaArmourFire(3), "bound_boots_fire"); - inputRoutingFocus = new InputRoutingFocus().setUnlocalizedName("inputRoutingFocus"); - outputRoutingFocus = new OutputRoutingFocus().setUnlocalizedName("outputRoutingFocus"); + inputRoutingFocus = registerItem(new InputRoutingFocus(), "input_routing_focus"); + outputRoutingFocus = registerItem(new OutputRoutingFocus(), "output_routing_focus"); - itemIncense = new ItemIncense().setUnlocalizedName("bloodMagicIncenseItem"); + itemIncense = registerItem(new ItemIncense(), "incense"); - ritualDismantler = new ItemRitualDismantler().setUnlocalizedName("ritualDismantler"); + ritualDismantler = registerItem(new ItemRitualDismantler(), "ritual_dismantler"); } - public static void registerItems() + public static Item registerItem(Item item, String unlocalizedName) { - GameRegistry.registerItem(ModItems.weakBloodOrb, "weakBloodOrb"); - GameRegistry.registerItem(ModItems.apprenticeBloodOrb, "apprenticeBloodOrb"); - GameRegistry.registerItem(ModItems.magicianBloodOrb, "magicianBloodOrb"); - GameRegistry.registerItem(ModItems.energyBlaster, "energyBlaster"); + item.setUnlocalizedName(unlocalizedName); + item.setCreativeTab(AlchemicalWizardry.tabBloodMagic); + itemsNotToBeRegistered.clear(); - GameRegistry.registerItem(ModItems.energySword, "energySword"); - GameRegistry.registerItem(ModItems.lavaCrystal, "lavaCrystal"); - GameRegistry.registerItem(ModItems.waterSigil, "waterSigil"); - GameRegistry.registerItem(ModItems.lavaSigil, "lavaSigil"); - GameRegistry.registerItem(ModItems.voidSigil, "voidSigil"); - GameRegistry.registerItem(ModItems.blankSlate, "blankSlate"); - GameRegistry.registerItem(ModItems.reinforcedSlate, "reinforcedSlate"); - GameRegistry.registerItem(ModItems.sacrificialDagger, "sacrificialKnife"); - GameRegistry.registerItem(ModItems.daggerOfSacrifice, "daggerOfSacrifice"); - GameRegistry.registerItem(ModItems.airSigil, "airSigil"); - GameRegistry.registerItem(ModItems.sigilOfTheFastMiner, "sigilOfTheFastMiner"); - GameRegistry.registerItem(ModItems.sigilOfElementalAffinity, "sigilOfElementalAffinity"); - GameRegistry.registerItem(ModItems.sigilOfHaste, "sigilOfHaste"); - GameRegistry.registerItem(ModItems.sigilOfHolding, "sigilOfHolding"); - GameRegistry.registerItem(ModItems.divinationSigil, "divinationSigil"); - GameRegistry.registerItem(ModItems.waterScribeTool, "waterScribeTool"); - GameRegistry.registerItem(ModItems.fireScribeTool, "fireScribeTool"); - GameRegistry.registerItem(ModItems.earthScribeTool, "earthScribeTool"); - GameRegistry.registerItem(ModItems.airScribeTool, "airScribeTool"); - GameRegistry.registerItem(ModItems.activationCrystal, "activationCrystal"); - GameRegistry.registerItem(ModItems.boundPickaxe, "boundPickaxe"); - GameRegistry.registerItem(ModItems.boundAxe, "boundAxe"); - GameRegistry.registerItem(ModItems.boundShovel, "boundShovel"); - GameRegistry.registerItem(ModItems.boundHelmet, "boundHelmet"); - GameRegistry.registerItem(ModItems.boundPlate, "boundPlate"); - GameRegistry.registerItem(ModItems.boundLeggings, "boundLeggings"); - GameRegistry.registerItem(ModItems.boundBoots, "boundBoots"); - GameRegistry.registerItem(ModItems.weakBloodShard, "weakBloodShard"); - GameRegistry.registerItem(ModItems.growthSigil, "growthSigil"); - GameRegistry.registerItem(ModItems.blankSpell, "blankSpell"); - GameRegistry.registerItem(ModItems.masterBloodOrb, "masterBloodOrb"); - GameRegistry.registerItem(ModItems.alchemyFlask, "alchemyFlask"); - GameRegistry.registerItem(ModItems.standardBindingAgent, "standardBindingAgent"); - GameRegistry.registerItem(ModItems.mundanePowerCatalyst, "mundanePowerCatalyst"); - GameRegistry.registerItem(ModItems.averagePowerCatalyst, "averagePowerCatalyst"); - GameRegistry.registerItem(ModItems.greaterPowerCatalyst, "greaterPowerCatalyst"); - GameRegistry.registerItem(ModItems.mundaneLengtheningCatalyst, "mundaneLengtheningCatalyst"); - GameRegistry.registerItem(ModItems.averageLengtheningCatalyst, "averageLengtheningCatalyst"); - GameRegistry.registerItem(ModItems.greaterLengtheningCatalyst, "greaterLengtheningCatalyst"); - GameRegistry.registerItem(ModItems.incendium, "incendium"); - GameRegistry.registerItem(ModItems.magicales, "magicales"); - GameRegistry.registerItem(ModItems.sanctus, "sanctus"); - GameRegistry.registerItem(ModItems.aether, "aether"); - GameRegistry.registerItem(ModItems.simpleCatalyst, "simpleCatalyst"); - GameRegistry.registerItem(ModItems.crepitous, "crepitous"); - GameRegistry.registerItem(ModItems.crystallos, "crystallos"); - GameRegistry.registerItem(ModItems.terrae, "terrae"); - GameRegistry.registerItem(ModItems.aquasalus, "aquasalus"); - GameRegistry.registerItem(ModItems.tennebrae, "tennebrae"); - GameRegistry.registerItem(ModItems.demonBloodShard, "demonBloodShard"); - GameRegistry.registerItem(ModItems.archmageBloodOrb, "archmageBloodOrb"); - GameRegistry.registerItem(ModItems.transcendentBloodOrb, "transcendentBloodOrb"); - GameRegistry.registerItem(ModItems.sigilOfWind, "sigilOfWind"); - GameRegistry.registerItem(ModItems.telepositionFocus, "telepositionFocus"); - GameRegistry.registerItem(ModItems.enhancedTelepositionFocus, "enhancedTelepositionFocus"); - GameRegistry.registerItem(ModItems.reinforcedTelepositionFocus, "reinforcedTelepositionFocus"); - GameRegistry.registerItem(ModItems.demonicTelepositionFocus, "demonicTelepositionFocus"); - GameRegistry.registerItem(ModItems.imbuedSlate, "imbuedSlate"); - GameRegistry.registerItem(ModItems.demonicSlate, "demonicSlate"); - GameRegistry.registerItem(ModItems.duskScribeTool, "duskScribeTool"); - GameRegistry.registerItem(ModItems.sigilOfTheBridge, "sigilOfTheBridge"); - GameRegistry.registerItem(ModItems.armourInhibitor, "armourInhibitor"); - GameRegistry.registerItem(ModItems.creativeFiller, "creativeFiller"); - GameRegistry.registerItem(ModItems.demonPlacer, "demonPlacer"); - GameRegistry.registerItem(ModItems.creativeDagger, "creativeDagger"); + for (String unlocName : BloodMagicConfiguration.itemsToBeDisabled) + { + if (unlocName.equals(unlocalizedName)) + { + itemsNotToBeRegistered.add(unlocName); + } + } - GameRegistry.registerItem(ModItems.weakFillingAgent, "weakFillingAgent"); - GameRegistry.registerItem(ModItems.standardFillingAgent, "standardFillingAgent"); - GameRegistry.registerItem(ModItems.enhancedFillingAgent, "enhancedFillingAgent"); - GameRegistry.registerItem(ModItems.weakBindingAgent, "weakBindingAgent"); - GameRegistry.registerItem(ModItems.itemRitualDiviner, "itemRitualDiviner"); - GameRegistry.registerItem(ModItems.sigilOfMagnetism, "sigilOfMagnetism"); - GameRegistry.registerItem(ModItems.itemKeyOfDiablo, "itemKeyOfDiablo"); - GameRegistry.registerItem(ModItems.energyBazooka, "energyBazooka"); - GameRegistry.registerItem(ModItems.itemBloodLightSigil, "itemBloodLightSigil"); - GameRegistry.registerItem(ModItems.itemComplexSpellCrystal, "itemComplexSpellCrystal"); - GameRegistry.registerItem(ModItems.itemSigilOfSupression, "sigilOfSupression"); - GameRegistry.registerItem(ModItems.itemSigilOfEnderSeverance, "sigilOfEnderSeverance"); - GameRegistry.registerItem(ModItems.itemFluidSigil, "fluidSigil"); - GameRegistry.registerItem(ModItems.itemSeerSigil, "seerSigil"); + if (!itemsNotToBeRegistered.contains(unlocalizedName)) + { + GameRegistry.registerItem(item, unlocalizedName); + } - GameRegistry.registerItem(ModItems.customTool, "customTool"); - - GameRegistry.registerItem(ModItems.bucketLife, "bucketLife"); - GameRegistry.registerItem(ModItems.itemCombinationalCatalyst, "itemCombinationalCatalyst"); - - GameRegistry.registerItem(ModItems.itemAttunedCrystal, "itemAttunedCrystal"); - GameRegistry.registerItem(ModItems.itemTankSegmenter, "itemTankSegmenter"); - GameRegistry.registerItem(ModItems.itemDestinationClearer, "itemDestinationClearer"); - - GameRegistry.registerItem(ModItems.baseItems, "bloodMagicBaseItems"); - GameRegistry.registerItem(ModItems.baseAlchemyItems, "bloodMagicBaseAlchemyItems"); - - GameRegistry.registerItem(ModItems.dawnScribeTool, "dawnScribeTool"); - - GameRegistry.registerItem(ModItems.itemBloodPack, "itemBloodPack"); - GameRegistry.registerItem(ModItems.itemHarvestSigil, "itemHarvestSigil"); - GameRegistry.registerItem(ModItems.itemCompressionSigil, "itemCompressionSigil"); - GameRegistry.registerItem(ModItems.itemAssassinSigil, "itemAssassinSigil"); - - GameRegistry.registerItem(ModItems.boundHelmetWater, "boundHelmetWater"); - GameRegistry.registerItem(ModItems.boundPlateWater, "boundPlateWater"); - GameRegistry.registerItem(ModItems.boundLeggingsWater, "boundLeggingsWater"); - GameRegistry.registerItem(ModItems.boundBootsWater, "boundBootsWater"); - - GameRegistry.registerItem(ModItems.boundHelmetEarth, "boundHelmetEarth"); - GameRegistry.registerItem(ModItems.boundPlateEarth, "boundPlateEarth"); - GameRegistry.registerItem(ModItems.boundLeggingsEarth, "boundLeggingsEarth"); - GameRegistry.registerItem(ModItems.boundBootsEarth, "boundBootsEarth"); - - GameRegistry.registerItem(ModItems.boundHelmetWind, "boundHelmetWind"); - GameRegistry.registerItem(ModItems.boundPlateWind, "boundPlateWind"); - GameRegistry.registerItem(ModItems.boundLeggingsWind, "boundLeggingsWind"); - GameRegistry.registerItem(ModItems.boundBootsWind, "boundBootsWind"); - - GameRegistry.registerItem(ModItems.boundHelmetFire, "boundHelmetFire"); - GameRegistry.registerItem(ModItems.boundPlateFire, "boundPlateFire"); - GameRegistry.registerItem(ModItems.boundLeggingsFire, "boundLeggingsFire"); - GameRegistry.registerItem(ModItems.boundBootsFire, "boundBootsFire"); - - GameRegistry.registerItem(ModItems.inputRoutingFocus, "inputRoutingFocus"); - GameRegistry.registerItem(ModItems.outputRoutingFocus, "outputRoutingFocus"); - - GameRegistry.registerItem(ModItems.itemIncense, "bloodMagicIncenseItem"); - GameRegistry.registerItem(ModItems.ritualDismantler, "ritualDismantler"); + return item; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java index 4ab35e17..12d99c12 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java @@ -49,7 +49,7 @@ import WayofTime.alchemicalWizardry.api.event.TeleposeEvent; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergySword; +import WayofTime.alchemicalWizardry.common.items.BoundBlade; import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; @@ -84,7 +84,7 @@ public class AlchemicalWizardryEventHooks parad.onEmptyHandEntityInteract(player, event.target); }else { - if(heldItem.getItem() instanceof EnergySword) + if(heldItem.getItem() instanceof BoundBlade) { parad.onBoundSwordInteractWithEntity(player, event.target); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockArmourForge.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockArmourForge.java index 7d6c7d6f..3a806593 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockArmourForge.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockArmourForge.java @@ -68,7 +68,7 @@ public class BlockArmourForge extends Block { case 0: list = plateList; - armourPiece = new ItemStack(ModItems.boundPlate, 1, 0); + armourPiece = new ItemStack(ModItems.boundChestplate, 1, 0); break; case 1: diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java index 1661b0ff..53825022 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java @@ -20,14 +20,13 @@ import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; public class ActivationCrystal extends EnergyItems { - private static final String[] ACTIVATION_CRYSTAL_NAMES = new String[]{"Weak", "Awakened", "Creative"}; + private static final String[] ACTIVATION_CRYSTAL_NAMES = new String[]{"weak", "awakened", "creative"}; public ActivationCrystal() { super(); this.maxStackSize = 1; setEnergyUsed(100); - this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); this.hasSubtypes = true; } @@ -101,7 +100,7 @@ public class ActivationCrystal extends EnergyItems { //This is what will do all the localisation things on the alchemy components so you dont have to set it :D int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ACTIVATION_CRYSTAL_NAMES.length - 1); - return ("" + "item.activationCrystal" + ACTIVATION_CRYSTAL_NAMES[meta]); + return (getUnlocalizedName() + "_" + ACTIVATION_CRYSTAL_NAMES[meta]); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergySword.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundBlade.java similarity index 98% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/EnergySword.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/BoundBlade.java index ac626b63..a049c65a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergySword.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundBlade.java @@ -19,11 +19,11 @@ import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; -public class EnergySword extends ItemSword +public class BoundBlade extends ItemSword { private int energyUsed; - public EnergySword() + public BoundBlade() { super(AlchemicalWizardry.bloodBoundToolMaterial); this.maxStackSize = 1; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java index 23bcef7b..fc61d289 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java @@ -209,7 +209,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA return 3; } - if (armor.getItem() == ModItems.boundPlate) + if (armor.getItem() == ModItems.boundChestplate) { return 8; } @@ -284,7 +284,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA { if (this.getIsInvisible(stack)) { - if (this == ModItems.boundHelmet || this == ModItems.boundPlate || this == ModItems.boundBoots) + if (this == ModItems.boundHelmet || this == ModItems.boundChestplate || this == ModItems.boundBoots) { return "alchemicalwizardry:models/armor/boundArmour_invisible_layer_1.png"; } @@ -296,7 +296,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA } } - if (this == ModItems.boundHelmet || this == ModItems.boundPlate || this == ModItems.boundBoots) + if (this == ModItems.boundHelmet || this == ModItems.boundChestplate || this == ModItems.boundBoots) { return "alchemicalwizardry:models/armor/boundArmour_layer_1.png"; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigm.java index 0952bff3..3c93d301 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigm.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigm.java @@ -48,7 +48,7 @@ public class OmegaParadigm ItemStack leggingsStack = armours[1]; ItemStack bootsStack = armours[0]; - if(helmetStack != null && helmetStack.getItem() == ModItems.boundHelmet && chestStack != null && chestStack.getItem() == ModItems.boundPlate && leggingsStack != null && leggingsStack.getItem() == ModItems.boundLeggings && bootsStack != null && bootsStack.getItem() == ModItems.boundBoots) + if(helmetStack != null && helmetStack.getItem() == ModItems.boundHelmet && chestStack != null && chestStack.getItem() == ModItems.boundChestplate && leggingsStack != null && leggingsStack.getItem() == ModItems.boundLeggings && bootsStack != null && bootsStack.getItem() == ModItems.boundBoots) { long worldSeed = player.worldObj.getSeed(); Random rand = new Random(worldSeed + stability * (affinity + 7) * 94 + 84321*x - 17423*y + 76*z - 1623451*enchantability + 2 * enchantmentLevel); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java index 8bd7bbbc..4caeaf44 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java @@ -84,7 +84,7 @@ public class RitualEffectUnbinding extends RitualEffect if (itemStack.getItem() == ModItems.boundHelmet) { ritualStone.setVar1(5); - } else if (itemStack.getItem() == ModItems.boundPlate) + } else if (itemStack.getItem() == ModItems.boundChestplate) { ritualStone.setVar1(8); } else if (itemStack.getItem() == ModItems.boundLeggings) From a2c4f4b965a52d5a1c858962bdf0760e1511ce3e Mon Sep 17 00:00:00 2001 From: Arcaratus <byou64@gmail.com> Date: Thu, 30 Jul 2015 17:24:20 -0400 Subject: [PATCH 27/33] All the items !sigils --- .../AlchemicalWizardry.java | 52 +-- .../alchemicalWizardry/ModItems.java | 42 +-- .../common/block/BlockAltar.java | 6 +- .../common/entity/mob/EntityDemon.java | 6 +- .../common/items/ActivationCrystal.java | 7 +- .../common/items/AirScribeTool.java | 1 - .../common/items/ApprenticeBloodOrb.java | 3 +- .../common/items/ArchmageBloodOrb.java | 3 +- .../common/items/ArmourInhibitor.java | 11 +- .../{AWBaseItems.java => BaseItems.java} | 7 +- .../{EnergyItems.java => BindableItems.java} | 6 +- .../common/items/BlankSpell.java | 18 +- .../common/items/BloodShard.java | 7 +- .../common/items/BoundAxe.java | 12 +- .../common/items/BoundBlade.java | 9 +- .../common/items/BoundPickaxe.java | 9 +- .../common/items/BoundShovel.java | 9 +- .../common/items/CreativeDagger.java | 2 - .../{CheatyItem.java => CreativeOrb.java} | 59 +-- .../common/items/DaggerOfSacrifice.java | 10 +- .../common/items/DawnScribeTool.java | 1 - .../{DemonPlacer.java => DemonCrystal.java} | 14 +- .../common/items/DuskScribeTool.java | 1 - .../common/items/EarthScribeTool.java | 1 - .../common/items/EnergyBazooka.java | 8 +- .../{EnergyBlast.java => EnergyBlaster.java} | 11 +- .../common/items/FireScribeTool.java | 1 - .../common/items/ItemAlchemyBase.java | 7 +- .../common/items/ItemBlockCrystalBelljar.java | 1 + .../common/items/ItemBloodLetterPack.java | 7 +- .../common/items/ItemBloodRuneBlock.java | 7 +- .../common/items/ItemComplexSpellCrystal.java | 8 +- .../common/items/ItemComponents.java | 7 +- .../common/items/ItemCrystalBlock.java | 7 +- .../items/ItemEnchantmentGlyphBlock.java | 16 +- .../common/items/ItemIncense.java | 7 +- .../common/items/ItemMailOrderCatalogue.java | 1 - .../common/items/ItemRitualDismantler.java | 8 +- .../common/items/ItemRitualDiviner.java | 18 +- .../common/items/ItemSpellEffectBlock.java | 6 +- .../items/ItemSpellEnhancementBlock.java | 3 +- .../common/items/ItemSpellModifierBlock.java | 7 +- .../common/items/ItemSpellParadigmBlock.java | 4 - .../common/items/ItemStabilityGlyphBlock.java | 10 +- .../{ItemDiabloKey.java => KeyOfBinding.java} | 14 +- .../common/items/LavaCrystal.java | 21 +- .../common/items/MagicianBloodOrb.java | 3 +- .../common/items/MasterBloodOrb.java | 3 +- .../items/{EnergyBattery.java => Orb.java} | 15 +- .../common/items/OrbOfTesting.java | 35 -- .../common/items/SacrificialDagger.java | 3 +- .../common/items/ScribeTool.java | 6 +- .../common/items/TelepositionFocus.java | 4 +- .../common/items/TranscendentBloodOrb.java | 3 +- .../common/items/WaterScribeTool.java | 3 - .../common/items/armour/BoundArmour.java | 16 +- .../common/items/armour/OmegaArmour.java | 15 +- ...onClearer.java => AlchemicalCleanser.java} | 8 +- ...unedCrystal.java => AlchemicalRouter.java} | 14 +- ...egmenter.java => AlchemicalSegmenter.java} | 8 +- .../common/items/potion/AlchemyFlask.java | 10 +- .../common/items/potion/AlchemyReagent.java | 4 +- .../potion/AverageLengtheningCatalyst.java | 1 - .../items/potion/AveragePowerCatalyst.java | 1 - .../items/potion/CombinationalCatalyst.java | 3 - .../items/potion/EnhancedFillingAgent.java | 3 - .../potion/GreaterLengtheningCatalyst.java | 1 - .../items/potion/GreaterPowerCatalyst.java | 1 - .../items/potion/LengtheningCatalyst.java | 2 - .../potion/MundaneLengtheningCatalyst.java | 1 - .../items/potion/MundanePowerCatalyst.java | 1 - .../common/items/potion/PowerCatalyst.java | 2 - .../items/potion/StandardBindingAgent.java | 2 - .../items/potion/StandardFillingAgent.java | 3 - .../common/items/potion/WeakBindingAgent.java | 1 - .../common/items/potion/WeakFillingAgent.java | 2 - .../items/routing/InputRoutingFocus.java | 1 - .../items/routing/OutputRoutingFocus.java | 32 +- .../common/items/sigil/SigilAir.java | 8 +- .../common/items/sigil/SigilBloodLight.java | 10 +- .../common/items/sigil/SigilDivination.java | 8 +- .../common/items/sigil/SigilHarvest.java | 10 +- .../common/items/sigil/SigilLava.java | 12 +- .../items/sigil/SigilOfElementalAffinity.java | 10 +- .../items/sigil/SigilOfEnderSeverance.java | 10 +- .../common/items/sigil/SigilOfGrowth.java | 14 +- .../common/items/sigil/SigilOfHaste.java | 10 +- .../common/items/sigil/SigilOfMagnetism.java | 10 +- .../common/items/sigil/SigilOfSupression.java | 10 +- .../items/sigil/SigilOfTheAssassin.java | 6 +- .../common/items/sigil/SigilOfTheBridge.java | 10 +- .../items/sigil/SigilOfTheFastMiner.java | 10 +- .../common/items/sigil/SigilOfWind.java | 8 +- .../common/items/sigil/SigilPackRat.java | 10 +- .../common/items/sigil/SigilSeer.java | 4 +- .../common/items/sigil/SigilToggleable.java | 4 +- .../common/items/sigil/SigilVoid.java | 8 +- .../common/items/sigil/SigilWater.java | 8 +- .../items/sigil/holding/SigilOfHolding.java | 4 +- .../common/potion/PotionAmphibian.java | 19 - ...nDemonCloak.java => PotionBloodMagic.java} | 4 +- .../common/potion/PotionBoost.java | 19 - .../common/potion/PotionDeaf.java | 19 - .../common/potion/PotionDrowning.java | 19 - .../common/potion/PotionFeatherFall.java | 19 - .../common/potion/PotionFireFuse.java | 19 - .../common/potion/PotionFlameCloak.java | 19 - .../common/potion/PotionFlight.java | 19 - .../common/potion/PotionHeavyHeart.java | 19 - .../common/potion/PotionIceCloak.java | 19 - .../common/potion/PotionInhibit.java | 19 - .../common/potion/PotionPlanarBinding.java | 19 - .../potion/PotionProjectileProtect.java | 19 - .../common/potion/PotionReciprocation.java | 19 - .../common/potion/PotionSoulFray.java | 35 -- .../common/potion/PotionSoulHarden.java | 19 - .../common/rituals/RitualEffectExpulsion.java | 5 +- .../common/rituals/RitualEffectUnbinding.java | 6 +- .../common/spell/simple/SpellEarthBender.java | 14 +- .../common/spell/simple/SpellExplosions.java | 18 +- .../common/spell/simple/SpellFireBurst.java | 18 +- .../common/spell/simple/SpellFrozenWater.java | 14 +- .../common/spell/simple/SpellHolyBlast.java | 18 +- .../spell/simple/SpellLightningBolt.java | 18 +- .../common/spell/simple/SpellTeleport.java | 18 +- .../common/spell/simple/SpellWateryGrave.java | 18 +- .../common/spell/simple/SpellWindGust.java | 18 +- .../common/tileEntity/TEPlinth.java | 10 +- .../assets/alchemicalwizardry/lang/en_US.lang | 356 +++++++++--------- 129 files changed, 587 insertions(+), 1134 deletions(-) rename src/main/java/WayofTime/alchemicalWizardry/common/items/{AWBaseItems.java => BaseItems.java} (73%) rename src/main/java/WayofTime/alchemicalWizardry/common/items/{EnergyItems.java => BindableItems.java} (97%) rename src/main/java/WayofTime/alchemicalWizardry/common/items/{CheatyItem.java => CreativeOrb.java} (65%) rename src/main/java/WayofTime/alchemicalWizardry/common/items/{DemonPlacer.java => DemonCrystal.java} (93%) rename src/main/java/WayofTime/alchemicalWizardry/common/items/{EnergyBlast.java => EnergyBlaster.java} (91%) rename src/main/java/WayofTime/alchemicalWizardry/common/items/{ItemDiabloKey.java => KeyOfBinding.java} (85%) rename src/main/java/WayofTime/alchemicalWizardry/common/items/{EnergyBattery.java => Orb.java} (93%) delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/OrbOfTesting.java rename src/main/java/WayofTime/alchemicalWizardry/common/items/energy/{ItemDestinationClearer.java => AlchemicalCleanser.java} (88%) rename src/main/java/WayofTime/alchemicalWizardry/common/items/energy/{ItemAttunedCrystal.java => AlchemicalRouter.java} (97%) rename src/main/java/WayofTime/alchemicalWizardry/common/items/energy/{ItemTankSegmenter.java => AlchemicalSegmenter.java} (96%) delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionAmphibian.java rename src/main/java/WayofTime/alchemicalWizardry/common/potion/{PotionDemonCloak.java => PotionBloodMagic.java} (76%) delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBoost.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDeaf.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDrowning.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFeatherFall.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFireFuse.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlameCloak.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlight.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionHeavyHeart.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionIceCloak.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionInhibit.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionPlanarBinding.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionProjectileProtect.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionReciprocation.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulFray.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulHarden.java diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index 86496076..a76b1bad 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -11,6 +11,7 @@ import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; +import WayofTime.alchemicalWizardry.common.potion.*; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -129,23 +130,6 @@ import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmFire; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmWater; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmWind; import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; -import WayofTime.alchemicalWizardry.common.potion.PotionAmphibian; -import WayofTime.alchemicalWizardry.common.potion.PotionBoost; -import WayofTime.alchemicalWizardry.common.potion.PotionDeaf; -import WayofTime.alchemicalWizardry.common.potion.PotionDemonCloak; -import WayofTime.alchemicalWizardry.common.potion.PotionDrowning; -import WayofTime.alchemicalWizardry.common.potion.PotionFeatherFall; -import WayofTime.alchemicalWizardry.common.potion.PotionFireFuse; -import WayofTime.alchemicalWizardry.common.potion.PotionFlameCloak; -import WayofTime.alchemicalWizardry.common.potion.PotionFlight; -import WayofTime.alchemicalWizardry.common.potion.PotionHeavyHeart; -import WayofTime.alchemicalWizardry.common.potion.PotionIceCloak; -import WayofTime.alchemicalWizardry.common.potion.PotionInhibit; -import WayofTime.alchemicalWizardry.common.potion.PotionPlanarBinding; -import WayofTime.alchemicalWizardry.common.potion.PotionProjectileProtect; -import WayofTime.alchemicalWizardry.common.potion.PotionReciprocation; -import WayofTime.alchemicalWizardry.common.potion.PotionSoulFray; -import WayofTime.alchemicalWizardry.common.potion.PotionSoulHarden; import WayofTime.alchemicalWizardry.common.renderer.AlchemyCircleRenderer; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectAnimalGrowth; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectAutoAlchemy; @@ -731,23 +715,23 @@ public class AlchemicalWizardry GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModItems.itemBloodLightSigil), "btb", "sss", "bob", 'o', magicianBloodOrbStack, 'b', glowstoneBlockStack, 't', new ItemStack(Blocks.torch), 's', imbuedSlateStack)); GameRegistry.addRecipe(new ItemStack(ModItems.itemKeyOfDiablo), " gw", "gdg", "wg ", 'w', weakBloodShardStack, 'g', goldIngotStack, 'd', diamondStack); GameRegistry.addRecipe(new ItemStack(ModItems.itemBloodPack), "gbg","flf","gsg",'s', blankSlateStack,'g', glassStack,'f',new ItemStack(Items.flint,1,craftingConstant),'b', emptyBucketStack, 'l', new ItemStack(Items.leather_chestplate)); - customPotionDrowning = (new PotionDrowning(customPotionDrowningID, true, 0)).setIconIndex(0, 0).setPotionName("Drowning"); - customPotionBoost = (new PotionBoost(customPotionBoostID, false, 0)).setIconIndex(0, 0).setPotionName("Boost"); - customPotionProjProt = (new PotionProjectileProtect(customPotionProjProtID, false, 0)).setIconIndex(0, 0).setPotionName("Whirlwind"); - customPotionInhibit = (new PotionInhibit(customPotionInhibitID, false, 0)).setIconIndex(0, 0).setPotionName("Inhibit"); - customPotionFlight = (new PotionFlight(customPotionFlightID, false, 0)).setIconIndex(0, 0).setPotionName("Flight"); - customPotionReciprocation = (new PotionReciprocation(customPotionReciprocationID, false, 0xFFFFFF)).setIconIndex(0, 0).setPotionName("Reciprocation"); - customPotionFlameCloak = (new PotionFlameCloak(customPotionFlameCloakID, false, 0).setIconIndex(0, 0).setPotionName("Flame Cloak")); - customPotionIceCloak = (new PotionIceCloak(customPotionIceCloakID, false, 0).setIconIndex(0, 0).setPotionName("Ice Cloak")); - customPotionHeavyHeart = (new PotionHeavyHeart(customPotionHeavyHeartID, true, 0).setIconIndex(0, 0).setPotionName("Heavy Heart")); - customPotionFireFuse = (new PotionFireFuse(customPotionFireFuseID, true, 0).setIconIndex(0, 0).setPotionName("Fire Fuse")); - customPotionPlanarBinding = (new PotionPlanarBinding(customPotionPlanarBindingID, true, 0).setIconIndex(0, 0).setPotionName("Planar Binding")); - customPotionSoulFray = (new PotionSoulFray(customPotionSoulFrayID, true, 0).setIconIndex(0, 0).setPotionName("Soul Fray")); - customPotionSoulHarden = (new PotionSoulHarden(customPotionSoulHardenID, false, 0).setIconIndex(0, 0).setPotionName("Soul Harden")); - customPotionDeaf = (new PotionDeaf(customPotionDeafID, true, 0).setIconIndex(0, 0).setPotionName("Deafness")); - customPotionFeatherFall = (new PotionFeatherFall(customPotionFeatherFallID, false, 0).setIconIndex(0, 0).setPotionName("Feather Fall")); - customPotionDemonCloak = (new PotionDemonCloak(customPotionDemonCloakID, false, 0).setIconIndex(0, 0).setPotionName("Demon Cloaking")); - customPotionAmphibian = (new PotionAmphibian(customPotionAmphibianID, false, 0).setIconIndex(0, 0).setPotionName("Amphibian")); + customPotionDrowning = (new PotionBloodMagic(customPotionDrowningID, true, 0)).setIconIndex(0, 0).setPotionName("Drowning"); + customPotionBoost = (new PotionBloodMagic(customPotionBoostID, false, 0)).setIconIndex(0, 0).setPotionName("Boost"); + customPotionProjProt = (new PotionBloodMagic(customPotionProjProtID, false, 0)).setIconIndex(0, 0).setPotionName("Whirlwind"); + customPotionInhibit = (new PotionBloodMagic(customPotionInhibitID, false, 0)).setIconIndex(0, 0).setPotionName("Inhibit"); + customPotionFlight = (new PotionBloodMagic(customPotionFlightID, false, 0)).setIconIndex(0, 0).setPotionName("Flight"); + customPotionReciprocation = (new PotionBloodMagic(customPotionReciprocationID, false, 0xFFFFFF)).setIconIndex(0, 0).setPotionName("Reciprocation"); + customPotionFlameCloak = (new PotionBloodMagic(customPotionFlameCloakID, false, 0).setIconIndex(0, 0).setPotionName("Flame Cloak")); + customPotionIceCloak = (new PotionBloodMagic(customPotionIceCloakID, false, 0).setIconIndex(0, 0).setPotionName("Ice Cloak")); + customPotionHeavyHeart = (new PotionBloodMagic(customPotionHeavyHeartID, true, 0).setIconIndex(0, 0).setPotionName("Heavy Heart")); + customPotionFireFuse = (new PotionBloodMagic(customPotionFireFuseID, true, 0).setIconIndex(0, 0).setPotionName("Fire Fuse")); + customPotionPlanarBinding = (new PotionBloodMagic(customPotionPlanarBindingID, true, 0).setIconIndex(0, 0).setPotionName("Planar Binding")); + customPotionSoulFray = (new PotionBloodMagic(customPotionSoulFrayID, true, 0).setIconIndex(0, 0).setPotionName("Soul Fray")); + customPotionSoulHarden = (new PotionBloodMagic(customPotionSoulHardenID, false, 0).setIconIndex(0, 0).setPotionName("Soul Harden")); + customPotionDeaf = (new PotionBloodMagic(customPotionDeafID, true, 0).setIconIndex(0, 0).setPotionName("Deafness")); + customPotionFeatherFall = (new PotionBloodMagic(customPotionFeatherFallID, false, 0).setIconIndex(0, 0).setPotionName("Feather Fall")); + customPotionDemonCloak = (new PotionBloodMagic(customPotionDemonCloakID, false, 0).setIconIndex(0, 0).setPotionName("Demon Cloaking")); + customPotionAmphibian = (new PotionBloodMagic(customPotionAmphibianID, false, 0).setIconIndex(0, 0).setPotionName("Amphibian")); ItemStack masterBloodOrbStack = new ItemStack(ModItems.masterBloodOrb); ItemStack transcendentBloodOrbStack = new ItemStack(ModItems.transcendentBloodOrb); diff --git a/src/main/java/WayofTime/alchemicalWizardry/ModItems.java b/src/main/java/WayofTime/alchemicalWizardry/ModItems.java index 4b6cf98b..97f51174 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/ModItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/ModItems.java @@ -6,7 +6,7 @@ import net.minecraft.item.Item; import net.minecraftforge.fml.common.registry.GameRegistry; import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; -import WayofTime.alchemicalWizardry.common.items.AWBaseItems; +import WayofTime.alchemicalWizardry.common.items.BaseItems; import WayofTime.alchemicalWizardry.common.items.ActivationCrystal; import WayofTime.alchemicalWizardry.common.items.AirScribeTool; import WayofTime.alchemicalWizardry.common.items.ApprenticeBloodOrb; @@ -17,17 +17,17 @@ import WayofTime.alchemicalWizardry.common.items.BloodShard; import WayofTime.alchemicalWizardry.common.items.BoundAxe; import WayofTime.alchemicalWizardry.common.items.BoundPickaxe; import WayofTime.alchemicalWizardry.common.items.BoundShovel; -import WayofTime.alchemicalWizardry.common.items.CheatyItem; +import WayofTime.alchemicalWizardry.common.items.CreativeOrb; import WayofTime.alchemicalWizardry.common.items.CreativeDagger; import WayofTime.alchemicalWizardry.common.items.DaggerOfSacrifice; import WayofTime.alchemicalWizardry.common.items.DawnScribeTool; -import WayofTime.alchemicalWizardry.common.items.DemonPlacer; +import WayofTime.alchemicalWizardry.common.items.DemonCrystal; import WayofTime.alchemicalWizardry.common.items.DemonicTelepositionFocus; import WayofTime.alchemicalWizardry.common.items.DuskScribeTool; import WayofTime.alchemicalWizardry.common.items.EarthScribeTool; -import WayofTime.alchemicalWizardry.common.items.EnergyBattery; +import WayofTime.alchemicalWizardry.common.items.Orb; import WayofTime.alchemicalWizardry.common.items.EnergyBazooka; -import WayofTime.alchemicalWizardry.common.items.EnergyBlast; +import WayofTime.alchemicalWizardry.common.items.EnergyBlaster; import WayofTime.alchemicalWizardry.common.items.BoundBlade; import WayofTime.alchemicalWizardry.common.items.EnhancedTelepositionFocus; import WayofTime.alchemicalWizardry.common.items.FireScribeTool; @@ -35,7 +35,7 @@ import WayofTime.alchemicalWizardry.common.items.ItemAlchemyBase; import WayofTime.alchemicalWizardry.common.items.ItemBloodLetterPack; import WayofTime.alchemicalWizardry.common.items.ItemComplexSpellCrystal; import WayofTime.alchemicalWizardry.common.items.ItemComponents; -import WayofTime.alchemicalWizardry.common.items.ItemDiabloKey; +import WayofTime.alchemicalWizardry.common.items.KeyOfBinding; import WayofTime.alchemicalWizardry.common.items.ItemIncense; import WayofTime.alchemicalWizardry.common.items.ItemRitualDismantler; import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; @@ -53,9 +53,9 @@ import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourEarth; import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourFire; import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourWater; import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourWind; -import WayofTime.alchemicalWizardry.common.items.energy.ItemAttunedCrystal; -import WayofTime.alchemicalWizardry.common.items.energy.ItemDestinationClearer; -import WayofTime.alchemicalWizardry.common.items.energy.ItemTankSegmenter; +import WayofTime.alchemicalWizardry.common.items.energy.AlchemicalRouter; +import WayofTime.alchemicalWizardry.common.items.energy.AlchemicalCleanser; +import WayofTime.alchemicalWizardry.common.items.energy.AlchemicalSegmenter; import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask; import WayofTime.alchemicalWizardry.common.items.potion.AlchemyReagent; import WayofTime.alchemicalWizardry.common.items.potion.AverageLengtheningCatalyst; @@ -250,20 +250,20 @@ public class ModItems public static void init() { - weakBloodOrb = registerItem(new EnergyBattery(5000), "weak_blood_orb"); + weakBloodOrb = registerItem(new Orb(5000), "weak_blood_orb"); apprenticeBloodOrb = registerItem(new ApprenticeBloodOrb(25000), "apprentice_blood_orb"); magicianBloodOrb = registerItem(new MagicianBloodOrb(150000), "magician_blood_orb"); masterBloodOrb = registerItem(new MasterBloodOrb(1000000), "master_blood_orb"); archmageBloodOrb = registerItem(new ArchmageBloodOrb(10000000), "archmage_blood_orb"); transcendentBloodOrb = registerItem(new TranscendentBloodOrb(30000000), "transcendent_blood_orb"); - energyBlaster = registerItem(new EnergyBlast(), "energy_blaster"); + energyBlaster = registerItem(new EnergyBlaster(), "energy_blaster"); energySword = registerItem(new BoundBlade(), "bound_blade"); lavaCrystal = registerItem(new LavaCrystal(), "lava_crystal"); waterSigil = registerItem(new SigilWater(), "water_sigil"); lavaSigil = registerItem(new SigilLava(), "lava_sigil"); voidSigil = registerItem(new SigilVoid(), "void_sigil"); - blankSlate = registerItem(new AWBaseItems(), "blank_slate"); - reinforcedSlate = registerItem(new AWBaseItems(), "reinforced_slate"); + blankSlate = registerItem(new BaseItems(), "blank_slate"); + reinforcedSlate = registerItem(new BaseItems(), "reinforced_slate"); sacrificialDagger = registerItem(new SacrificialDagger(), "sacrificial_agger"); daggerOfSacrifice = registerItem(new DaggerOfSacrifice(), "dagger_of_sacrifice"); airSigil = registerItem(new SigilAir(), "air_sigil"); @@ -311,13 +311,13 @@ public class ModItems enhancedTelepositionFocus = registerItem(new EnhancedTelepositionFocus(), "enhanced_teleposition_focus"); reinforcedTelepositionFocus = registerItem(new ReinforcedTelepositionFocus(), "reinforced_teleposition_focus"); demonicTelepositionFocus = registerItem(new DemonicTelepositionFocus(), "demonic_teleposition_focus"); - imbuedSlate = registerItem(new AWBaseItems(), "imbued_slate"); - demonicSlate = registerItem(new AWBaseItems(), "demonic_slate"); + imbuedSlate = registerItem(new BaseItems(), "imbued_slate"); + demonicSlate = registerItem(new BaseItems(), "demonic_slate"); duskScribeTool = registerItem(new DuskScribeTool(), "dusk_scribe_tool"); sigilOfTheBridge = registerItem(new SigilOfTheBridge(), "sigil_of_the_bridge"); armourInhibitor = registerItem(new ArmourInhibitor(), "armour_inhibitor"); - creativeFiller = registerItem(new CheatyItem(), "creative_orb"); - demonPlacer = registerItem(new DemonPlacer(), "demon_placer"); + creativeFiller = registerItem(new CreativeOrb(), "creative_orb"); + demonPlacer = registerItem(new DemonCrystal(), "demon_crystal"); creativeDagger = registerItem(new CreativeDagger(), "creative_dagger"); weakFillingAgent = registerItem(new WeakFillingAgent(), "weak_filling_agent"); standardFillingAgent = registerItem(new StandardFillingAgent(), "standard_filling_agent"); @@ -325,7 +325,7 @@ public class ModItems weakBindingAgent = registerItem(new WeakBindingAgent(), "weak_binding_agent"); itemRitualDiviner = registerItem(new ItemRitualDiviner(), "ritual_diviner"); sigilOfMagnetism = registerItem(new SigilOfMagnetism(), "sigil_of_magnetism"); - itemKeyOfDiablo = registerItem(new ItemDiabloKey(), "key_of_binding"); + itemKeyOfDiablo = registerItem(new KeyOfBinding(), "key_of_binding"); energyBazooka = registerItem(new EnergyBazooka(), "energy_bazooka"); itemBloodLightSigil = registerItem(new SigilBloodLight(), "blood_light_sigil"); itemComplexSpellCrystal = registerItem(new ItemComplexSpellCrystal(), "complex_spell_crystal"); @@ -341,9 +341,9 @@ public class ModItems SpellParadigmTool.customTool = customTool; itemCombinationalCatalyst = registerItem(new CombinationalCatalyst(), "combinational_catalyst"); - itemAttunedCrystal = registerItem(new ItemAttunedCrystal(), "attuned_crystal"); - itemTankSegmenter = registerItem(new ItemTankSegmenter(), "tank_segmenter"); - itemDestinationClearer = registerItem(new ItemDestinationClearer(), "destination_clearer"); + itemAttunedCrystal = registerItem(new AlchemicalRouter(), "alchemical_router"); + itemTankSegmenter = registerItem(new AlchemicalSegmenter(), "alchemical_segmenter"); + itemDestinationClearer = registerItem(new AlchemicalCleanser(), "alchemical_cleanser"); dawnScribeTool = registerItem(new DawnScribeTool(), "dawn_scribe_tool"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAltar.java index 736658bd..9397611b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAltar.java @@ -16,7 +16,7 @@ import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.api.items.IAltarManipulator; -import WayofTime.alchemicalWizardry.common.items.EnergyBattery; +import WayofTime.alchemicalWizardry.common.items.Orb; import WayofTime.alchemicalWizardry.common.items.sigil.holding.SigilOfHolding; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; import net.minecraftforge.fml.relauncher.Side; @@ -46,9 +46,9 @@ public class BlockAltar extends BlockContainer { ItemStack stack = ((TEAltar) tile).getStackInSlot(0); - if (stack != null && stack.getItem() instanceof EnergyBattery) + if (stack != null && stack.getItem() instanceof Orb) { - EnergyBattery bloodOrb = (EnergyBattery) stack.getItem(); + Orb bloodOrb = (Orb) stack.getItem(); int maxEssence = bloodOrb.getMaxEssence(); int currentEssence = bloodOrb.getCurrentEssence(stack); int level = currentEssence * 15 / maxEssence; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java index ad095378..e87ee5a8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java @@ -19,7 +19,7 @@ import net.minecraft.util.DamageSource; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.common.IDemon; -import WayofTime.alchemicalWizardry.common.items.DemonPlacer; +import WayofTime.alchemicalWizardry.common.items.DemonCrystal; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class EntityDemon extends EntityTameable implements IDemon @@ -103,11 +103,11 @@ public class EntityDemon extends EntityTameable implements IDemon { ItemStack drop = new ItemStack(ModItems.demonPlacer); - DemonPlacer.setDemonString(drop, this.getDemonID()); + DemonCrystal.setDemonString(drop, this.getDemonID()); if ((this.getOwner() instanceof EntityPlayer)) { - DemonPlacer.setOwnerName(drop, SpellHelper.getUsername((EntityPlayer) this.getOwner())); + DemonCrystal.setOwnerName(drop, SpellHelper.getUsername((EntityPlayer) this.getOwner())); } if (this.hasCustomName()) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java index 53825022..f38bce26 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java @@ -15,12 +15,11 @@ import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -public class ActivationCrystal extends EnergyItems +public class ActivationCrystal extends BindableItems { - private static final String[] ACTIVATION_CRYSTAL_NAMES = new String[]{"weak", "awakened", "creative"}; + private final String[] ACTIVATION_CRYSTAL_NAMES = new String[]{"weak", "awakened", "creative"}; public ActivationCrystal() { @@ -86,7 +85,7 @@ public class ActivationCrystal extends EnergyItems @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); + BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); return par1ItemStack; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/AirScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/AirScribeTool.java index d3332bbc..6934b94d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/AirScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/AirScribeTool.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.items; - public class AirScribeTool extends ScribeTool { public AirScribeTool() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ApprenticeBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ApprenticeBloodOrb.java index 64432cd8..bef0d188 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ApprenticeBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ApprenticeBloodOrb.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.common.items; - -public class ApprenticeBloodOrb extends EnergyBattery +public class ApprenticeBloodOrb extends Orb { public ApprenticeBloodOrb(int damage) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java index ae0ef586..01a53cd3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.common.items; - -public class ArchmageBloodOrb extends EnergyBattery +public class ArchmageBloodOrb extends Orb { public ArchmageBloodOrb(int damage) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java index 20fd9f0c..5c9ffbd4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java @@ -11,16 +11,13 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; -public class ArmourInhibitor extends EnergyItems +public class ArmourInhibitor extends BindableItems { - private int tickDelay = 200; - public ArmourInhibitor() { super(); this.maxStackSize = 1; setEnergyUsed(0); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -46,7 +43,9 @@ public class ArmourInhibitor extends EnergyItems @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + int tickDelay = 200; + + if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return stack; } @@ -88,7 +87,7 @@ public class ArmourInhibitor extends EnergyItems if (stack.getTagCompound().getBoolean("isActive")) { - if (world.getWorldTime() % tickDelay == stack.getTagCompound().getInteger("worldTimeDelay")) +// if (world.getWorldTime() % tickDelay == stack.getTagCompound().getInteger("worldTimeDelay")) { } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/AWBaseItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BaseItems.java similarity index 73% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/AWBaseItems.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/BaseItems.java index f45f9ae2..943734d1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/AWBaseItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BaseItems.java @@ -6,15 +6,12 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -public class AWBaseItems extends Item +public class BaseItems extends Item { - public AWBaseItems() + public BaseItems() { super(); - setMaxStackSize(64); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BindableItems.java similarity index 97% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/BindableItems.java index 5f487513..2ccd7c81 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BindableItems.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; @@ -14,14 +13,13 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; -public class EnergyItems extends Item implements IBindable +public class BindableItems extends Item implements IBindable { private int energyUsed; - public EnergyItems() + public BindableItems() { super(); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } protected void setEnergyUsed(int par1int) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java index 6c73547c..c0cbf1e6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java @@ -2,6 +2,7 @@ package WayofTime.alchemicalWizardry.common.items; import java.util.List; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpellTable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -10,16 +11,13 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; -public class BlankSpell extends EnergyItems +public class BlankSpell extends BindableItems { public BlankSpell() { super(); this.setMaxStackSize(1); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -44,7 +42,7 @@ public class BlankSpell extends EnergyItems @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return stack; } @@ -58,15 +56,15 @@ public class BlankSpell extends EnergyItems NBTTagCompound itemTag = stack.getTagCompound(); TileEntity tileEntity = newWorld.getTileEntity(new BlockPos(itemTag.getInteger("xCoord"), itemTag.getInteger("yCoord"), itemTag.getInteger("zCoord"))); - if (tileEntity instanceof TEHomHeart) + if (tileEntity instanceof TESpellTable) { - TEHomHeart homHeart = (TEHomHeart) tileEntity; + TESpellTable homHeart = (TESpellTable) tileEntity; - if (homHeart.canCastSpell(stack, world, player)) + if (homHeart.canCastSpell()) { - if(EnergyItems.syphonBatteries(stack, player, homHeart.getCostForSpell())) + if(BindableItems.syphonBatteries(stack, player, homHeart.getCostForSpell())) { - EnergyItems.syphonBatteries(stack, player, homHeart.castSpell(stack, world, player)); + BindableItems.syphonBatteries(stack, player, homHeart.castSpell(stack, world, player)); } } else { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BloodShard.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BloodShard.java index ab74e4cb..1c1adf9e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BloodShard.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BloodShard.java @@ -4,7 +4,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; @@ -13,8 +12,6 @@ public class BloodShard extends Item implements ArmourUpgrade public BloodShard() { super(); - this.maxStackSize = 64; - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } public int getBloodShardLevel() @@ -31,9 +28,7 @@ public class BloodShard extends Item implements ArmourUpgrade } @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) - { - } + public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {} @Override public boolean isUpgrade() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java index f5ab984c..cbeefaef 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java @@ -33,10 +33,9 @@ public class BoundAxe extends ItemAxe implements IBindable public BoundAxe() { super(AlchemicalWizardry.bloodBoundToolMaterial); - this.maxStackSize = 1; + setMaxStackSize(1); this.efficiencyOnProperMaterial = 12.0F; this.damageVsEntity = 5; - setCreativeTab(AlchemicalWizardry.tabBloodMagic); setEnergyUsed(5); } @@ -75,7 +74,7 @@ public class BoundAxe extends ItemAxe implements IBindable @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World world, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (world.getWorldTime() - 1) % 200); @@ -97,7 +96,7 @@ public class BoundAxe extends ItemAxe implements IBindable return par1ItemStack; } - if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 10000)) + if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 10000)) { return par1ItemStack; } @@ -168,7 +167,7 @@ public class BoundAxe extends ItemAxe implements IBindable { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 20)) + if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 20)) { this.setActivated(par1ItemStack, false); } @@ -203,6 +202,7 @@ public class BoundAxe extends ItemAxe implements IBindable return super.getStrVsBlock(par1ItemStack, par2Block); } + @Override /** * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise * the damage on the stack. @@ -217,8 +217,8 @@ public class BoundAxe extends ItemAxe implements IBindable return true; } + @Override @SideOnly(Side.CLIENT) - /** * Returns True is the item is renderer in full 3D when hold. */ diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundBlade.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundBlade.java index a049c65a..90ab85e9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundBlade.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundBlade.java @@ -26,8 +26,7 @@ public class BoundBlade extends ItemSword public BoundBlade() { super(AlchemicalWizardry.bloodBoundToolMaterial); - this.maxStackSize = 1; - setCreativeTab(AlchemicalWizardry.tabBloodMagic); + setMaxStackSize(1); setEnergyUsed(50); setFull3D(); setMaxDamage(100); @@ -72,7 +71,7 @@ public class BoundBlade extends ItemSword { if (par3EntityLivingBase instanceof EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, (EntityPlayer) par3EntityLivingBase) || !EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3EntityLivingBase, this.getEnergyUsed())) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, (EntityPlayer) par3EntityLivingBase) || !BindableItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3EntityLivingBase, this.getEnergyUsed())) { return false; } @@ -85,7 +84,7 @@ public class BoundBlade extends ItemSword @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100); @@ -125,7 +124,7 @@ public class BoundBlade extends ItemSword { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 50)) + if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 50)) { this.setActivated(par1ItemStack, false); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java index 70b6eba4..70d8bc36 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java @@ -35,10 +35,9 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable public BoundPickaxe() { super(AlchemicalWizardry.bloodBoundToolMaterial); - this.maxStackSize = 1; + setMaxStackSize(1); this.efficiencyOnProperMaterial = 12.0F; this.damageVsEntity = 5; - setCreativeTab(AlchemicalWizardry.tabBloodMagic); this.setEnergyUsed(5); } @@ -78,7 +77,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(stack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(stack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { this.setActivated(stack, !getActivated(stack)); stack.getTagCompound().setInteger("worldTimeDelay", (int) (world.getWorldTime() - 1) % 200); @@ -100,7 +99,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable return stack; } - if(!EnergyItems.syphonBatteries(stack, par3EntityPlayer, 10000)) + if(!BindableItems.syphonBatteries(stack, par3EntityPlayer, 10000)) { return stack; } @@ -192,7 +191,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!EnergyItems.syphonBatteries(stack, par3EntityPlayer, 20)) + if(!BindableItems.syphonBatteries(stack, par3EntityPlayer, 20)) { this.setActivated(stack, false); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java index fc43ba2d..aaa46ea5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java @@ -33,10 +33,9 @@ public class BoundShovel extends ItemSpade implements IBindable public BoundShovel() { super(AlchemicalWizardry.bloodBoundToolMaterial); - this.maxStackSize = 1; + setMaxStackSize(1); this.efficiencyOnProperMaterial = 12.0F; this.damageVsEntity = 5; - setCreativeTab(AlchemicalWizardry.tabBloodMagic); setEnergyUsed(5); } @@ -75,7 +74,7 @@ public class BoundShovel extends ItemSpade implements IBindable @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(stack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(stack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { this.setActivated(stack, !getActivated(stack)); stack.getTagCompound().setInteger("worldTimeDelay", (int) (world.getWorldTime() - 1) % 200); @@ -97,7 +96,7 @@ public class BoundShovel extends ItemSpade implements IBindable return stack; } - if(!EnergyItems.syphonBatteries(stack, par3EntityPlayer, 10000)) + if(!BindableItems.syphonBatteries(stack, par3EntityPlayer, 10000)) { return stack; } @@ -168,7 +167,7 @@ public class BoundShovel extends ItemSpade implements IBindable { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 20)) + if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 20)) { this.setActivated(par1ItemStack, false); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeDagger.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeDagger.java index a15a6f00..f962d785 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeDagger.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeDagger.java @@ -11,7 +11,6 @@ import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.FakePlayer; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.event.SacrificeKnifeUsedEvent; import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; @@ -23,7 +22,6 @@ public class CreativeDagger extends Item { super(); setMaxStackSize(1); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); setFull3D(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/CheatyItem.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeOrb.java similarity index 65% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/CheatyItem.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeOrb.java index 3629b6c7..9fa2cb2c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/CheatyItem.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeOrb.java @@ -11,19 +11,17 @@ import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.FakePlayer; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -public class CheatyItem extends Item implements IBindable +public class CreativeOrb extends Item implements IBindable { - public CheatyItem() + public CreativeOrb() { super(); setMaxStackSize(1); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -43,7 +41,7 @@ public class CheatyItem extends Item implements IBindable { World world = par3EntityPlayer.worldObj; - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer instanceof FakePlayer) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer instanceof FakePlayer) { return par1ItemStack; } @@ -79,54 +77,6 @@ public class CheatyItem extends Item implements IBindable return par1ItemStack; } - /* - * @return the damage that was not deducted - */ - public int damageItem(ItemStack par1ItemStack, int par2int) - { - if (par2int == 0) - { - return 0; - } - - int before = this.getDamage(par1ItemStack); - this.setDamage(par1ItemStack, this.getDamage(par1ItemStack) + par2int); - return par2int - (this.getDamage(par1ItemStack) - before); - } - - protected void damagePlayer(World world, EntityPlayer player, int damage) - { - if (world != null) - { - double posX = player.posX; - double posY = player.posY; - double posZ = player.posZ; - world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - float f = 1.0F; - float f1 = f * 0.6F + 0.4F; - float f2 = f * f * 0.7F - 0.5F; - float f3 = f * f * 0.6F - 0.7F; - - for (int l = 0; l < 8; ++l) - { - world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); - } - } - - if (!player.capabilities.isCreativeMode) - { - for (int i = 0; i < damage; i++) - { - player.setHealth((player.getHealth() - 1)); - } - } - - if (player.getHealth() <= 0) - { - player.inventory.dropAllItems(); - } - } - @Override public ItemStack getContainerItem(ItemStack itemStack) { @@ -163,7 +113,6 @@ public class CheatyItem extends Item implements IBindable worldSave.setItemData(owner, data); } - int currentEssence = data.currentEssence; - return (currentEssence); + return data.currentEssence; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java index 2b87a8ca..72140cd4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java @@ -21,7 +21,6 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; import WayofTime.alchemicalWizardry.common.IDemon; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; @@ -29,13 +28,12 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import com.google.common.collect.Multimap; -public class DaggerOfSacrifice extends EnergyItems +public class DaggerOfSacrifice extends BindableItems { public DaggerOfSacrifice() { super(); - this.maxStackSize = 1; - setCreativeTab(AlchemicalWizardry.tabBloodMagic); + setMaxStackSize(1); setEnergyUsed(100); setFull3D(); setMaxDamage(100); @@ -128,9 +126,9 @@ public class DaggerOfSacrifice extends EnergyItems } @Override - public Multimap getItemAttributeModifiers() + public Multimap getAttributeModifiers(ItemStack itemStack) { - Multimap multimap = super.getItemAttributeModifiers(); + Multimap multimap = super.getAttributeModifiers(itemStack); multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(4186465, 46565), "Tool modifier", 1.0d, 0)); return multimap; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DawnScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DawnScribeTool.java index 61814e22..f54f5615 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DawnScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DawnScribeTool.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.items; - public class DawnScribeTool extends ScribeTool { public DawnScribeTool() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonCrystal.java similarity index 93% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/DemonCrystal.java index f9caf63f..504d7527 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonCrystal.java @@ -20,14 +20,14 @@ import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry; import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; -public class DemonPlacer extends Item +public class DemonCrystal extends Item { - public DemonPlacer() + public DemonCrystal() { super(); this.setHasSubtypes(true); this.setCreativeTab(CreativeTabs.tabMisc); - this.maxStackSize = 1; + setMaxStackSize(1); } /** @@ -56,7 +56,7 @@ public class DemonPlacer extends Item d0 = 0.5D; } - String demonName = DemonPlacer.getDemonString(stack); + String demonName = DemonCrystal.getDemonString(stack); Entity entity = spawnCreature(world, demonName, (double)pos.getX() + 0.5D, (double)pos.getY() + d0, (double)pos.getZ() + 0.5D, stack); if (entity != null) @@ -88,7 +88,7 @@ public class DemonPlacer extends Item { entity = SummoningRegistry.getEntityWithID(par0World, par1); - if (entity != null && entity instanceof EntityLivingBase) + if (entity != null) { EntityLiving entityliving = (EntityLiving) entity; entity.setLocationAndAngles(par2, par4, par6, MathHelper.wrapAngleTo180_float(par0World.rand.nextFloat() * 360.0F), 0.0F); @@ -96,9 +96,9 @@ public class DemonPlacer extends Item entityliving.renderYawOffset = entityliving.rotationYaw; if (entityliving instanceof EntityDemon) { - ((EntityDemon) entityliving).func_152115_b(DemonPlacer.getOwnerName(itemStack)); + ((EntityDemon) entityliving).func_152115_b(DemonCrystal.getOwnerName(itemStack)); - if (!DemonPlacer.getOwnerName(itemStack).equals("")) + if (!DemonCrystal.getOwnerName(itemStack).equals("")) { ((EntityDemon) entityliving).setTamed(true); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java index 600cb2da..53db87f3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.items; - public class DuskScribeTool extends ScribeTool { public DuskScribeTool() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EarthScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EarthScribeTool.java index 530fce10..9a33f1e8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EarthScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EarthScribeTool.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.items; - public class EarthScribeTool extends ScribeTool { public EarthScribeTool() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java index c9e44de7..13b03ab3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java @@ -9,10 +9,9 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaMainProjectile; -public class EnergyBazooka extends EnergyItems +public class EnergyBazooka extends BindableItems { private int damage; @@ -20,7 +19,6 @@ public class EnergyBazooka extends EnergyItems { super(); setMaxStackSize(1); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); setFull3D(); setMaxDamage(250); this.setEnergyUsed(20000); @@ -32,7 +30,7 @@ public class EnergyBazooka extends EnergyItems { final int maxDelay = 150; - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100); @@ -100,7 +98,7 @@ public class EnergyBazooka extends EnergyItems { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 50)) + if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 50)) { this.setActivated(par1ItemStack, false); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlast.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlaster.java similarity index 91% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlast.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlaster.java index f1103f4f..6f896545 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlast.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlaster.java @@ -8,19 +8,16 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; -public class EnergyBlast extends EnergyItems +public class EnergyBlaster extends BindableItems { private int damage; - public EnergyBlast() + public EnergyBlaster() { super(); setMaxStackSize(1); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - setUnlocalizedName("energyBlaster"); setFull3D(); setMaxDamage(250); this.setEnergyUsed(150); @@ -32,7 +29,7 @@ public class EnergyBlast extends EnergyItems { final int maxDelay = 15; - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100); @@ -92,7 +89,7 @@ public class EnergyBlast extends EnergyItems { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 50)) + if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 50)) { this.setActivated(par1ItemStack, false); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/FireScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/FireScribeTool.java index 8b3a55f9..204cb63e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/FireScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/FireScribeTool.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.items; - public class FireScribeTool extends ScribeTool { public FireScribeTool() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemAlchemyBase.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemAlchemyBase.java index 29a9148d..92019075 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemAlchemyBase.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemAlchemyBase.java @@ -15,18 +15,15 @@ import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; public class ItemAlchemyBase extends Item { - private static final String[] ITEM_NAMES = new String[]{"Offensa", "Praesidium", "OrbisTerrae", "StrengthenedCatalyst", "ConcentratedCatalyst", "FracturedBone", "Virtus", "Reductus", "Potentia"}; + private final String[] ITEM_NAMES = new String[]{"offensa", "praesidium", "orbis_terrae", "strengthened_catalyst", "concentrated_catalyst", "fractured_bone", "virtus", "reductus", "potentia"}; public ItemAlchemyBase() { super(); - this.maxStackSize = 64; - this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); this.hasSubtypes = true; } @@ -67,7 +64,7 @@ public class ItemAlchemyBase extends Item public String getUnlocalizedName(ItemStack itemStack) { int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ITEM_NAMES.length - 1); - return ("" + "item.bloodMagicAlchemyItem." + ITEM_NAMES[meta]); + return (getUnlocalizedName() + "." + ITEM_NAMES[meta]); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBlockCrystalBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBlockCrystalBelljar.java index 5e10c4a1..790362e5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBlockCrystalBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBlockCrystalBelljar.java @@ -27,6 +27,7 @@ public class ItemBlockCrystalBelljar extends ItemBlock this.setMaxStackSize(16); } + @Override public int getMetadata(int par1) { return par1; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodLetterPack.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodLetterPack.java index c223d9de..fa709bfa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodLetterPack.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodLetterPack.java @@ -12,7 +12,6 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.IAltarManipulator; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; @@ -28,7 +27,6 @@ public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAl public ItemBloodLetterPack() { super(ArmorMaterial.CHAIN, 0, 1); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -140,10 +138,7 @@ public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAl } @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) - { - - } + public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {} @Override public boolean isUpgrade() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java index 7932014c..00f46b90 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java @@ -10,9 +10,9 @@ public class ItemBloodRuneBlock extends ItemBlock { super(block); setHasSubtypes(true); - } + @Override public String getUnlocalizedName(ItemStack itemstack) { String name; @@ -20,16 +20,12 @@ public class ItemBloodRuneBlock extends ItemBlock switch (itemstack.getItemDamage()) { case 0: - { name = "blank"; break; - } case 1: - { name = "fill"; break; - } case 2: name = "empty"; @@ -54,6 +50,7 @@ public class ItemBloodRuneBlock extends ItemBlock return getUnlocalizedName() + "." + name; } + @Override public int getMetadata(int par1) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComplexSpellCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComplexSpellCrystal.java index c6830b10..81550c21 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComplexSpellCrystal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComplexSpellCrystal.java @@ -10,16 +10,14 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; -public class ItemComplexSpellCrystal extends EnergyItems +public class ItemComplexSpellCrystal extends BindableItems { public ItemComplexSpellCrystal() { super(); - this.setMaxStackSize(1); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); + setMaxStackSize(1); } @Override @@ -44,7 +42,7 @@ public class ItemComplexSpellCrystal extends EnergyItems @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java index 7ccfc9d3..78fd031c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java @@ -10,17 +10,14 @@ import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; public class ItemComponents extends Item { - private static final String[] ITEM_NAMES = new String[]{"QuartzRod", "EmptyCore", "MagicalesCable", "WoodBrace", "StoneBrace", "ProjectileCore", "SelfCore", "MeleeCore", "ParadigmBackPlate", "OutputCable", "FlameCore", "IcyCore", "GustCore", "EarthenCore", "InputCable", "CrackedRunicPlate", "RunicPlate", "ScribedRunicPlate", "DefaultCore", "OffensiveCore", "DefensiveCore", "EnvironmentalCore", "PowerCore", "CostCore", "PotencyCore", "ObsidianBrace", "ToolCore", "EtherealSlate", "LifeShard", "SoulShard", "SoulRunicPlate", "LifeBrace", "EnderShard"}; + private final String[] ITEM_NAMES = new String[]{"quartz_rod", "empty_core", "magicales_cable", "wood_brace", "stone_brace", "projectile_core", "self_core", "melee_core", "paradigm_back_plate", "output_cable", "flame_core", "icy_core", "gust_core", "earthen_core", "input_cable", "cracked_runic_plate", "runic_plate", "scribed_runic_plate", "default_core", "offensive_core", "defensive_core", "environmental_core", "power_core", "cost_core", "potency_core", "obsidian_brace", "tool_core", "ethereal_slate", "life_shard", "soul_shard", "soul_runic_plate", "life_brace", "ender_shard"}; public ItemComponents() { super(); - this.maxStackSize = 64; - this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); this.hasSubtypes = true; } @@ -35,7 +32,7 @@ public class ItemComponents extends Item { //This is what will do all the localisation things on the alchemy components so you dont have to set it :D int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ITEM_NAMES.length - 1); - return ("" + "item.bloodMagicBaseItem." + ITEM_NAMES[meta]); + return (getUnlocalizedName() + "." + ITEM_NAMES[meta]); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemCrystalBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemCrystalBlock.java index 75c7ae92..8b496da3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemCrystalBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemCrystalBlock.java @@ -10,9 +10,9 @@ public class ItemCrystalBlock extends ItemBlock { super(par1); setHasSubtypes(true); - } + @Override public String getUnlocalizedName(ItemStack itemstack) { String name; @@ -20,16 +20,12 @@ public class ItemCrystalBlock extends ItemBlock switch (itemstack.getItemDamage()) { case 0: - { name = "fullCrystal"; break; - } case 1: - { name = "crystalBrick"; break; - } default: name = "broken"; @@ -38,6 +34,7 @@ public class ItemCrystalBlock extends ItemBlock return getUnlocalizedName() + "." + name; } + @Override public int getMetadata(int par1) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemEnchantmentGlyphBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemEnchantmentGlyphBlock.java index 4dfc459b..3b1063e1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemEnchantmentGlyphBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemEnchantmentGlyphBlock.java @@ -19,16 +19,16 @@ public class ItemEnchantmentGlyphBlock extends ItemBlock switch (itemstack.getItemDamage()) { - case 0: - name = "enchantability"; - break; + case 0: + name = "enchantability"; + break; - case 1: - name = "enchantmentLevel"; - break; + case 1: + name = "enchantmentLevel"; + break; - default: - name = "broken"; + default: + name = "broken"; } return getUnlocalizedName() + "." + name; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemIncense.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemIncense.java index 3788f9da..2e48ba20 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemIncense.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemIncense.java @@ -14,20 +14,17 @@ import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.oredict.OreDictionary; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; import WayofTime.alchemicalWizardry.api.sacrifice.IIncense; public class ItemIncense extends Item implements IIncense { - private static final String[] ITEM_NAMES = new String[]{"Woodash", "Byrrus", "Livens", "Viridis", "Purpura"}; + private final String[] ITEM_NAMES = new String[]{"wood_ash", "byrrus", "livens", "viridis", "purpura"}; public ItemIncense() { super(); - this.maxStackSize = 64; - this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); this.hasSubtypes = true; } @@ -41,7 +38,7 @@ public class ItemIncense extends Item implements IIncense public String getUnlocalizedName(ItemStack itemStack) { int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ITEM_NAMES.length - 1); - return ("" + "item.bloodMagicIncenseItem." + ITEM_NAMES[meta]); + return (getUnlocalizedName() + "." + ITEM_NAMES[meta]); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemMailOrderCatalogue.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemMailOrderCatalogue.java index be16d5c9..e2916f15 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemMailOrderCatalogue.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemMailOrderCatalogue.java @@ -12,7 +12,6 @@ public class ItemMailOrderCatalogue extends Item public ItemMailOrderCatalogue() { super(); - this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java index 6f74f440..a62bb184 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java @@ -9,20 +9,18 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.common.block.BlockRitualStone; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -public class ItemRitualDismantler extends EnergyItems +public class ItemRitualDismantler extends BindableItems { public ItemRitualDismantler() { super(); setMaxStackSize(1); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -36,7 +34,7 @@ public class ItemRitualDismantler extends EnergyItems @Override public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) { - return EnergyItems.checkAndSetItemOwner(stack, player) && breakRitualStoneAtMasterStone(stack, player, world, pos); + return BindableItems.checkAndSetItemOwner(stack, player) && breakRitualStoneAtMasterStone(stack, player, world, pos); } public boolean breakRitualStoneAtMasterStone(ItemStack stack, EntityPlayer player, World world, BlockPos pos) @@ -72,7 +70,7 @@ public class ItemRitualDismantler extends EnergyItems { if (freeSpace >= 0) { - if (EnergyItems.syphonBatteries(stack, player, getEnergyUsed()) || player.capabilities.isCreativeMode) + if (BindableItems.syphonBatteries(stack, player, getEnergyUsed()) || player.capabilities.isCreativeMode) { world.setBlockToAir(newPos); player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.ritualStone)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java index c101711a..f34e5283 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java @@ -24,7 +24,6 @@ import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.items.interfaces.IRitualDiviner; @@ -34,17 +33,16 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner +public class ItemRitualDiviner extends BindableItems implements IRitualDiviner { private int maxMetaData; public ItemRitualDiviner() { super(); - this.maxStackSize = 1; + setMaxStackSize(1); setEnergyUsed(100); - this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.maxMetaData = 4; + setMaxDamage(4); this.hasSubtypes = true; } @@ -163,7 +161,7 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner @Override public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) { - if (!EnergyItems.checkAndSetItemOwner(stack, player)) return false; + if (!BindableItems.checkAndSetItemOwner(stack, player)) return false; if(placeRitualStoneAtMasterStone(stack, player, world, pos)) { @@ -233,7 +231,7 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner player.inventory.decrStackSize(playerInvRitualStoneLocation, 1); } - if(EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) + if(BindableItems.syphonBatteries(stack, player, getEnergyUsed())) { world.setBlockState(newPos, ModBlocks.ritualStone.getStateFromMeta(rc.getStoneType()), 3); @@ -257,7 +255,7 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner int metadata = block.getMetaFromState(state); if (metadata != rc.getStoneType()) { - if(EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) + if(BindableItems.syphonBatteries(stack, player, getEnergyUsed())) { if (rc.getStoneType() > this.maxMetaData + this.getMaxRuneDisplacement(stack)) { @@ -361,7 +359,7 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner @Override public ItemStack onItemRightClick(ItemStack stack, World par2World, EntityPlayer par3EntityPlayer) { - if (EnergyItems.checkAndSetItemOwner(stack, par3EntityPlayer) && par3EntityPlayer.isSneaking()) + if (BindableItems.checkAndSetItemOwner(stack, par3EntityPlayer) && par3EntityPlayer.isSneaking()) { rotateRituals(par2World,par3EntityPlayer, stack, true); } @@ -376,7 +374,7 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner { EntityPlayer player = (EntityPlayer) entityLiving; - if (!EnergyItems.checkAndSetItemOwner(stack,player)) return true; + if (!BindableItems.checkAndSetItemOwner(stack, player)) return true; if (!player.isSwingInProgress) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEffectBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEffectBlock.java index e9ec4502..8a33e9af 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEffectBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEffectBlock.java @@ -12,6 +12,7 @@ public class ItemSpellEffectBlock extends ItemBlock setHasSubtypes(true); } + @Override public String getUnlocalizedName(ItemStack itemstack) { String name; @@ -19,16 +20,12 @@ public class ItemSpellEffectBlock extends ItemBlock switch (itemstack.getItemDamage()) { case 0: - { name = "fire"; break; - } case 1: - { name = "ice"; break; - } case 2: name = "wind"; @@ -45,6 +42,7 @@ public class ItemSpellEffectBlock extends ItemBlock return getUnlocalizedName() + "." + name; } + @Override public int getMetadata(int par1) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEnhancementBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEnhancementBlock.java index 5c515c3f..0e121a16 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEnhancementBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEnhancementBlock.java @@ -10,9 +10,9 @@ public class ItemSpellEnhancementBlock extends ItemBlock { super(par1); setHasSubtypes(true); - } + @Override public String getUnlocalizedName(ItemStack itemstack) { String name; @@ -86,6 +86,7 @@ public class ItemSpellEnhancementBlock extends ItemBlock return getUnlocalizedName() + "." + name; } + @Override public int getMetadata(int par1) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellModifierBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellModifierBlock.java index 44e02d7b..99cfebc6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellModifierBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellModifierBlock.java @@ -10,9 +10,9 @@ public class ItemSpellModifierBlock extends ItemBlock { super(par1); setHasSubtypes(true); - } + @Override public String getUnlocalizedName(ItemStack itemstack) { String name; @@ -20,16 +20,12 @@ public class ItemSpellModifierBlock extends ItemBlock switch (itemstack.getItemDamage()) { case 0: - { name = "default"; break; - } case 1: - { name = "offensive"; break; - } case 2: name = "defensive"; @@ -46,6 +42,7 @@ public class ItemSpellModifierBlock extends ItemBlock return getUnlocalizedName() + "." + name; } + @Override public int getMetadata(int par1) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellParadigmBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellParadigmBlock.java index 2984cdb7..1868c9dc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellParadigmBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellParadigmBlock.java @@ -20,16 +20,12 @@ public class ItemSpellParadigmBlock extends ItemBlock switch (itemstack.getItemDamage()) { case 0: - { name = "projectile"; break; - } case 1: - { name = "self"; break; - } case 2: name = "melee"; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemStabilityGlyphBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemStabilityGlyphBlock.java index 289fe3ec..45a0b90a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemStabilityGlyphBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemStabilityGlyphBlock.java @@ -19,12 +19,12 @@ public class ItemStabilityGlyphBlock extends ItemBlock switch (itemstack.getItemDamage()) { - case 0: - name = "stability1"; - break; + case 0: + name = "stability1"; + break; - default: - name = "broken"; + default: + name = "broken"; } return getUnlocalizedName() + "." + name; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/KeyOfBinding.java similarity index 85% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/KeyOfBinding.java index 98079478..16c07641 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/KeyOfBinding.java @@ -13,18 +13,16 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.FakePlayer; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -public class ItemDiabloKey extends EnergyItems +public class KeyOfBinding extends BindableItems { - public ItemDiabloKey() + public KeyOfBinding() { super(); setMaxStackSize(1); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); this.setEnergyUsed(1000); this.hasSubtypes = true; } @@ -42,7 +40,7 @@ public class ItemDiabloKey extends EnergyItems public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { World world = par3EntityPlayer.worldObj; - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer instanceof FakePlayer || par3EntityPlayer instanceof EntityPlayerMP) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer instanceof FakePlayer || par3EntityPlayer instanceof EntityPlayerMP) { return par1ItemStack; } @@ -85,14 +83,14 @@ public class ItemDiabloKey extends EnergyItems Item item = itemStack.getItem(); - if (item instanceof ItemDiabloKey) + if (item instanceof KeyOfBinding) { continue; } if (item instanceof IBindable) { - EnergyItems.checkAndSetItemOwner(itemStack, ownerName); + BindableItems.checkAndSetItemOwner(itemStack, ownerName); } } @@ -105,7 +103,7 @@ public class ItemDiabloKey extends EnergyItems { list.add(new ItemStack(ModItems.itemKeyOfDiablo)); ItemStack boundKey = new ItemStack(ModItems.itemKeyOfDiablo); - EnergyItems.checkAndSetItemOwner(boundKey, "Server-wide Soul Network"); + BindableItems.checkAndSetItemOwner(boundKey, "Server-wide Soul Network"); list.add(boundKey); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java index c813115f..5cac4a71 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java @@ -7,17 +7,14 @@ import net.minecraft.item.ItemStack; import net.minecraft.server.MinecraftServer; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -public class LavaCrystal extends EnergyItems +public class LavaCrystal extends BindableItems { public LavaCrystal() { super(); setMaxStackSize(1); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - setUnlocalizedName("lavaCrystal"); setEnergyUsed(25); } @@ -27,24 +24,22 @@ public class LavaCrystal extends EnergyItems @Override public ItemStack getContainerItem(ItemStack itemStack) { - { - syphonWhileInContainer(itemStack, this.getEnergyUsed()); - ItemStack copiedStack = itemStack.copy(); - copiedStack.setItemDamage(copiedStack.getItemDamage()); - copiedStack.stackSize = 1; - return copiedStack; - } + SoulNetworkHandler.syphonFromNetwork(itemStack, this.getEnergyUsed()); + ItemStack copiedStack = itemStack.copy(); + copiedStack.setItemDamage(copiedStack.getItemDamage()); + copiedStack.stackSize = 1; + return copiedStack; } @Override - public boolean hasContainerItem() + public boolean hasContainerItem(ItemStack itemStack) { return true; } public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); + BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); return par1ItemStack; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/MagicianBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/MagicianBloodOrb.java index 0bfa4a49..26795324 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/MagicianBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/MagicianBloodOrb.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.common.items; - -public class MagicianBloodOrb extends EnergyBattery +public class MagicianBloodOrb extends Orb { public MagicianBloodOrb(int damage) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java index 64021b33..f7b15ab0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.common.items; - -public class MasterBloodOrb extends EnergyBattery +public class MasterBloodOrb extends Orb { public MasterBloodOrb(int damage) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/Orb.java similarity index 93% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/Orb.java index a713fe7c..42a6a3b1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/Orb.java @@ -10,7 +10,6 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; @@ -18,16 +17,15 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBloodOrb +public class Orb extends Item implements ArmourUpgrade, IBindable, IBloodOrb { private int maxEssence; protected int orbLevel; - public EnergyBattery(int damage) + public Orb(int damage) { super(); setMaxStackSize(1); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); maxEssence = damage; orbLevel = 1; } @@ -42,9 +40,10 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl } } + @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) { return par1ItemStack; } @@ -82,7 +81,7 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl } SoulNetworkHandler.addCurrentEssenceToMaximum(itemTag.getString("ownerName"), 200, this.getMaxEssence()); - EnergyItems.hurtPlayer(par3EntityPlayer, 200); + BindableItems.hurtPlayer(par3EntityPlayer, 200); return par1ItemStack; } @@ -145,9 +144,7 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl } @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) - { - } + public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {} @Override public boolean isUpgrade() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/OrbOfTesting.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/OrbOfTesting.java deleted file mode 100644 index 1afe84a4..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/OrbOfTesting.java +++ /dev/null @@ -1,35 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public class OrbOfTesting extends EnergyItems -{ - public OrbOfTesting() - { - super(); - setMaxStackSize(1); - setCreativeTab(CreativeTabs.tabMisc); - setUnlocalizedName("orbOfTesting"); - setMaxDamage(100); - setFull3D(); - this.setEnergyUsed(100); - } - - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - if (!par3EntityPlayer.shouldHeal()) - { - return par1ItemStack; - } - - if (syphonBatteries(par1ItemStack, par3EntityPlayer, this.getEnergyUsed())) - { - par3EntityPlayer.heal(1); - } - - return par1ItemStack; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java index a3b7b28b..2ad4253e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java @@ -29,8 +29,7 @@ public class SacrificialDagger extends Item public SacrificialDagger() { super(); - this.maxStackSize = 1; - setCreativeTab(AlchemicalWizardry.tabBloodMagic); + setMaxStackSize(1); setFull3D(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ScribeTool.java index 7714e676..57fd29fc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ScribeTool.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; @@ -8,7 +7,7 @@ import net.minecraft.world.World; import java.util.List; -public class ScribeTool extends EnergyItems +public class ScribeTool extends BindableItems { private int meta; @@ -16,7 +15,6 @@ public class ScribeTool extends EnergyItems { super(); setMaxStackSize(1); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); setMaxDamage(10); setEnergyUsed(10); this.meta = inkType; @@ -36,7 +34,7 @@ public class ScribeTool extends EnergyItems @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) + if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) { if (par1ItemStack.getItemDamage() > 0) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java index 156dca5a..503643e0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java @@ -11,7 +11,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; import WayofTime.alchemicalWizardry.AlchemicalWizardry; -public class TelepositionFocus extends EnergyItems +public class TelepositionFocus extends BindableItems { private int focusLevel; @@ -45,7 +45,7 @@ public class TelepositionFocus extends EnergyItems @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) + if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) { if (par3EntityPlayer.isSneaking()) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/TranscendentBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/TranscendentBloodOrb.java index 665f8d88..d8535662 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/TranscendentBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/TranscendentBloodOrb.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.common.items; - -public class TranscendentBloodOrb extends EnergyBattery +public class TranscendentBloodOrb extends Orb { public TranscendentBloodOrb(int damage) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java index cec691aa..06d18615 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java @@ -1,12 +1,9 @@ package WayofTime.alchemicalWizardry.common.items; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; - public class WaterScribeTool extends ScribeTool { public WaterScribeTool() { super(1); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java index fc61d289..b26cccab 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java @@ -27,7 +27,7 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.api.items.interfaces.ILPGauge; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import WayofTime.alchemicalWizardry.common.items.sigil.SigilDivination; import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaArmour; @@ -43,7 +43,6 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA { super(ItemArmor.ArmorMaterial.GOLD, 0, armorType); setMaxDamage(1000); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } ModelBiped model1 = null; @@ -139,7 +138,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA @Override public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { - double armourReduction = 0.0; + double armourReduction; int f = 0; int h = 0; @@ -232,7 +231,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA { if (entity instanceof EntityPlayer) { - EnergyItems.checkAndSetItemOwner(stack, (EntityPlayer) entity); + BindableItems.checkAndSetItemOwner(stack, (EntityPlayer) entity); if (((EntityPlayer) entity).capabilities.isCreativeMode) { @@ -313,7 +312,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); + BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); return super.onItemRightClick(par1ItemStack, par2World, par3EntityPlayer); } @@ -339,11 +338,11 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA { if (itemStack.getItemDamage() > 0) { - EnergyItems.checkAndSetItemOwner(itemStack, player); + BindableItems.checkAndSetItemOwner(itemStack, player); if (!player.capabilities.isCreativeMode) { - if(EnergyItems.syphonBatteries(itemStack, player, itemStack.getItemDamage() * 75)) + if(BindableItems.syphonBatteries(itemStack, player, itemStack.getItemDamage() * 75)) { itemStack.setItemDamage(0); } @@ -380,7 +379,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA { if (getUpgradeCostMultiplier(par1ItemStack) > 0.02f) { - EnergyItems.syphonBatteries(par1ItemStack, par3Entity, (int) (((ArmourUpgrade) inv[i].getItem()).getEnergyForTenSeconds() * getUpgradeCostMultiplier(par1ItemStack))); + BindableItems.syphonBatteries(par1ItemStack, par3Entity, (int) (((ArmourUpgrade) inv[i].getItem()).getEnergyForTenSeconds() * getUpgradeCostMultiplier(par1ItemStack))); } } } @@ -442,7 +441,6 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA if (nextItem == null) { candidateSlot = i; - continue; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java index fb8bdc9c..14d756b0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java @@ -28,7 +28,7 @@ import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; public abstract class OmegaArmour extends BoundArmour @@ -40,7 +40,7 @@ public abstract class OmegaArmour extends BoundArmour protected boolean storeYLevel = false; protected boolean storeSeesSky = false; - protected List<Enchantment> illegalEnchantmentList = new LinkedList(); + protected List<Enchantment> illegalEnchantmentList = new LinkedList<Enchantment>(); public float reagentDrainPerDamage = 0.1f; @@ -129,7 +129,7 @@ public abstract class OmegaArmour extends BoundArmour { if (!player.capabilities.isCreativeMode) { - if(EnergyItems.syphonBatteries(itemStack, player, itemStack.getItemDamage() * 75)) + if(BindableItems.syphonBatteries(itemStack, player, itemStack.getItemDamage() * 75)) { float reagentAmount = APISpellHelper.getPlayerCurrentReagentAmount(player); @@ -176,7 +176,7 @@ public abstract class OmegaArmour extends BoundArmour } } - Map<Enchantment, Map<Integer, Integer>> map = new HashMap(); + Map<Enchantment, Map<Integer, Integer>> map = new HashMap<Enchantment, Map<Integer, Integer>>(); for(Object obj : enchantList) { @@ -184,7 +184,7 @@ public abstract class OmegaArmour extends BoundArmour if(!map.containsKey(enchantmentdata.enchantmentobj)) { - map.put(enchantmentdata.enchantmentobj, new HashMap()); + map.put(enchantmentdata.enchantmentobj, new HashMap<Integer, Integer>()); } Map<Integer, Integer> numMap = map.get(enchantmentdata.enchantmentobj); @@ -308,9 +308,8 @@ public abstract class OmegaArmour extends BoundArmour } NBTTagCompound tag = omegaTag.getCompoundTag("armour"); - ItemStack armourStack = ItemStack.loadItemStackFromNBT(tag); - - return armourStack; + + return ItemStack.loadItemStackFromNBT(tag); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemDestinationClearer.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalCleanser.java similarity index 88% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemDestinationClearer.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalCleanser.java index 5ea4e85c..985a8f23 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemDestinationClearer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalCleanser.java @@ -11,17 +11,15 @@ import net.minecraft.util.ChatComponentTranslation; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; -public class ItemDestinationClearer extends Item implements IReagentManipulator +public class AlchemicalCleanser extends Item implements IReagentManipulator { - public ItemDestinationClearer() + public AlchemicalCleanser() { super(); - this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.maxStackSize = 1; + setMaxStackSize(1); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemAttunedCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalRouter.java similarity index 97% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemAttunedCrystal.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalRouter.java index fed941e1..eaa27a2b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemAttunedCrystal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalRouter.java @@ -15,7 +15,6 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; @@ -25,16 +24,13 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; -public class ItemAttunedCrystal extends Item implements IReagentManipulator +public class AlchemicalRouter extends Item implements IReagentManipulator { - public static final int maxDistance = 6; - - public ItemAttunedCrystal() + public AlchemicalRouter() { super(); - this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); this.hasSubtypes = true; - this.maxStackSize = 1; + setMaxStackSize(1); } @Override @@ -115,7 +111,7 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator ReagentContainerInfo[] infos = relay.getContainerInfo(EnumFacing.UP); if (infos != null) { - List<Reagent> reagentList = new LinkedList(); + List<Reagent> reagentList = new LinkedList<Reagent>(); for (ReagentContainerInfo info : infos) { if (info != null) @@ -163,6 +159,8 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator return itemStack; } + final int maxDistance = 6; + if (dimension != world.provider.getDimensionId() || Math.abs(coords.xCoord - pos.getX()) > maxDistance || Math.abs(coords.yCoord - pos.getY()) > maxDistance || Math.abs(coords.zCoord - pos.getZ()) > maxDistance) { player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.error.toofar")); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemTankSegmenter.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalSegmenter.java similarity index 96% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemTankSegmenter.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalSegmenter.java index 19e02a18..fe20f238 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemTankSegmenter.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalSegmenter.java @@ -14,7 +14,6 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ISegmentedReagentHandler; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; @@ -22,14 +21,13 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; -public class ItemTankSegmenter extends Item implements IReagentManipulator +public class AlchemicalSegmenter extends Item implements IReagentManipulator { - public ItemTankSegmenter() + public AlchemicalSegmenter() { super(); - this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); this.hasSubtypes = true; - this.maxStackSize = 1; + setMaxStackSize(1); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java index 520db9fd..013a085a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java @@ -23,7 +23,6 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper; import com.google.common.collect.HashMultimap; @@ -33,16 +32,15 @@ public class AlchemyFlask extends Item public AlchemyFlask() { super(); - this.setMaxDamage(8); - this.setMaxStackSize(1); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); + setMaxDamage(8); + setMaxStackSize(1); } public static ArrayList<AlchemyPotionHelper> getEffects(ItemStack par1ItemStack) { if (par1ItemStack.hasTagCompound() && par1ItemStack.getTagCompound().hasKey("CustomFlaskEffects")) { - ArrayList<AlchemyPotionHelper> arraylist = new ArrayList(); + ArrayList<AlchemyPotionHelper> arraylist = new ArrayList<AlchemyPotionHelper>(); NBTTagList nbttaglist = par1ItemStack.getTagCompound().getTagList("CustomFlaskEffects", Constants.NBT.TAG_COMPOUND); for (int i = 0; i < nbttaglist.tagCount(); ++i) @@ -63,7 +61,7 @@ public class AlchemyFlask extends Item if (list != null) { - ArrayList<PotionEffect> newList = new ArrayList(); + ArrayList<PotionEffect> newList = new ArrayList<PotionEffect>(); for (AlchemyPotionHelper aph : list) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java index 4b856a08..fe205e3d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java @@ -10,7 +10,6 @@ import net.minecraft.util.StatCollector; import org.lwjgl.input.Keyboard; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; public class AlchemyReagent extends Item @@ -18,8 +17,7 @@ public class AlchemyReagent extends Item public AlchemyReagent() { super(); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - this.setMaxStackSize(64); + setMaxStackSize(64); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java index 168c4897..594fce54 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.items.potion; - public class AverageLengtheningCatalyst extends LengtheningCatalyst { public AverageLengtheningCatalyst() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java index 7ec8f7d6..8f6143b4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.items.potion; - public class AveragePowerCatalyst extends PowerCatalyst { public AveragePowerCatalyst() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/CombinationalCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/CombinationalCatalyst.java index 543b313f..d61144f7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/CombinationalCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/CombinationalCatalyst.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.common.items.potion; import net.minecraft.item.Item; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.alchemy.ICombinationalCatalyst; public class CombinationalCatalyst extends Item implements ICombinationalCatalyst @@ -9,7 +8,5 @@ public class CombinationalCatalyst extends Item implements ICombinationalCatalys public CombinationalCatalyst() { super(); - this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); } - } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java index 8d02cf07..4a870991 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java @@ -1,13 +1,10 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; - public class EnhancedFillingAgent extends WeakFillingAgent { public EnhancedFillingAgent() { super(); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java index ccafc906..f0e63816 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.items.potion; - public class GreaterLengtheningCatalyst extends LengtheningCatalyst { public GreaterLengtheningCatalyst() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java index c1967cb2..779d4d76 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.items.potion; - public class GreaterPowerCatalyst extends PowerCatalyst { public GreaterPowerCatalyst() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/LengtheningCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/LengtheningCatalyst.java index 628ff26e..66bf2586 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/LengtheningCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/LengtheningCatalyst.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; import WayofTime.alchemicalWizardry.common.ICatalyst; import net.minecraft.entity.player.EntityPlayer; @@ -19,7 +18,6 @@ public class LengtheningCatalyst extends Item implements ICatalyst public LengtheningCatalyst(int catalystStrength) { this.catalystStrength = catalystStrength; - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java index ddfe0d02..aa78b151 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.items.potion; - public class MundaneLengtheningCatalyst extends LengtheningCatalyst { public MundaneLengtheningCatalyst() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java index e25e8878..958b0013 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.items.potion; - public class MundanePowerCatalyst extends PowerCatalyst { public MundanePowerCatalyst() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/PowerCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/PowerCatalyst.java index fc965408..967a0d34 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/PowerCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/PowerCatalyst.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; import WayofTime.alchemicalWizardry.common.ICatalyst; import net.minecraft.entity.player.EntityPlayer; @@ -21,7 +20,6 @@ public class PowerCatalyst extends Item implements ICatalyst { super(); this.catalystStrength = catalystStrength; - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java index d3953953..8e70f9ea 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java @@ -10,7 +10,6 @@ import net.minecraft.util.StatCollector; import org.lwjgl.input.Keyboard; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; import WayofTime.alchemicalWizardry.common.IBindingAgent; @@ -19,7 +18,6 @@ public class StandardBindingAgent extends Item implements IBindingAgent public StandardBindingAgent() { super(); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java index 44d8bc4a..21854904 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java @@ -1,13 +1,10 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; - public class StandardFillingAgent extends WeakFillingAgent { public StandardFillingAgent() { super(); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java index b95591c6..bc755dc1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.items.potion; - public class WeakBindingAgent extends StandardBindingAgent { public WeakBindingAgent() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java index 04155e3a..8203572a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java @@ -11,7 +11,6 @@ import net.minecraft.util.StatCollector; import org.lwjgl.input.Keyboard; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; import WayofTime.alchemicalWizardry.common.IFillingAgent; @@ -20,7 +19,6 @@ public class WeakFillingAgent extends Item implements IFillingAgent public WeakFillingAgent() { super(); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java index 96ee3421..74ce08b8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.items.routing; - public class InputRoutingFocus extends RoutingFocus { public InputRoutingFocus() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/OutputRoutingFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/OutputRoutingFocus.java index 4c2e323f..b8a5f0fc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/OutputRoutingFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/OutputRoutingFocus.java @@ -44,23 +44,23 @@ public class OutputRoutingFocus extends RoutingFocus implements ILimitedRoutingF { String addedString = ""; - switch(itemStack.getItemDamage()) + switch (itemStack.getItemDamage()) { - case 0: - addedString = "default"; - break; - case 1: - addedString = "modItem"; - break; - case 2: - addedString = "ignMeta"; - break; - case 3: - addedString = "matchNBT"; - break; - case 4: - addedString = "global"; - break; + case 0: + addedString = "default"; + break; + case 1: + addedString = "modItem"; + break; + case 2: + addedString = "ignMeta"; + break; + case 3: + addedString = "matchNBT"; + break; + case 4: + addedString = "global"; + break; } return super.getUnlocalizedName() + "." + addedString; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java index 61b14e09..eacefd8b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java @@ -13,10 +13,10 @@ import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import codechicken.lib.render.TextureUtils.IIconRegister; -public class SigilAir extends EnergyItems implements ArmourUpgrade, ISigil +public class SigilAir extends BindableItems implements ArmourUpgrade, ISigil { public SigilAir() { @@ -48,7 +48,7 @@ public class SigilAir extends EnergyItems implements ArmourUpgrade, ISigil @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -75,7 +75,7 @@ public class SigilAir extends EnergyItems implements ArmourUpgrade, ISigil if (!par3EntityPlayer.capabilities.isCreativeMode) { - if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { if(!par2World.isRemote) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilBloodLight.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilBloodLight.java index eeb69c9e..767ef64b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilBloodLight.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilBloodLight.java @@ -16,11 +16,11 @@ import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; import WayofTime.alchemicalWizardry.common.entity.projectile.EntityBloodLightProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class SigilBloodLight extends EnergyItems implements IHolding, ArmourUpgrade, ISigil +public class SigilBloodLight extends BindableItems implements IHolding, ArmourUpgrade, ISigil { public SigilBloodLight() { @@ -51,7 +51,7 @@ public class SigilBloodLight extends EnergyItems implements IHolding, ArmourUpgr @Override public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) { - if(!EnergyItems.checkAndSetItemOwner(par1ItemStack, par2EntityPlayer) || !EnergyItems.syphonBatteries(par1ItemStack, par2EntityPlayer, getEnergyUsed())) + if(!BindableItems.checkAndSetItemOwner(par1ItemStack, par2EntityPlayer) || !BindableItems.syphonBatteries(par1ItemStack, par2EntityPlayer, getEnergyUsed())) { return true; } @@ -97,7 +97,7 @@ public class SigilBloodLight extends EnergyItems implements IHolding, ArmourUpgr @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -107,7 +107,7 @@ public class SigilBloodLight extends EnergyItems implements IHolding, ArmourUpgr par1ItemStack.setTagCompound(new NBTTagCompound()); } - if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed() * 5)) + if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed() * 5)) { return par1ItemStack; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilDivination.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilDivination.java index 26f59fae..f713efd9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilDivination.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilDivination.java @@ -22,7 +22,7 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -57,14 +57,14 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); + BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.worldObj.isRemote) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.worldObj.isRemote) { return par1ItemStack; } - if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 0)) + if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 0)) { return par1ItemStack; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilHarvest.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilHarvest.java index 08db2402..535c5ff4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilHarvest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilHarvest.java @@ -15,11 +15,11 @@ import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class SigilHarvest extends EnergyItems implements IHolding, ArmourUpgrade, ISigil +public class SigilHarvest extends BindableItems implements IHolding, ArmourUpgrade, ISigil { @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -97,7 +97,7 @@ public class SigilHarvest extends EnergyItems implements IHolding, ArmourUpgrade @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -117,7 +117,7 @@ public class SigilHarvest extends EnergyItems implements IHolding, ArmourUpgrade if (!par3EntityPlayer.capabilities.isCreativeMode) { - if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { tag.setBoolean("isActive", false); } @@ -168,7 +168,7 @@ public class SigilHarvest extends EnergyItems implements IHolding, ArmourUpgrade { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.getTagCompound().setBoolean("isActive", false); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilLava.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilLava.java index cbc7dc86..0bdcef3a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilLava.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilLava.java @@ -22,8 +22,8 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.items.EnergyBattery; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.Orb; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -82,7 +82,7 @@ public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil @Override public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { - if (world.isRemote || !EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (world.isRemote || !BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return false; } @@ -98,7 +98,7 @@ public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil FluidStack fluid = new FluidStack(FluidRegistry.LAVA, 1000); int amount = ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(side), fluid, false); - if (amount > 0 && EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) + if (amount > 0 && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) { ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(side), fluid, true); } @@ -146,7 +146,7 @@ public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil return false; } - if(this.canPlaceContainedLiquid(world, x, y, z, x, y, z) && EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) + if(this.canPlaceContainedLiquid(world, x, y, z, x, y, z) && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) { return this.tryPlaceContainedLiquid(world, x, y, z, x, y, z); } @@ -212,7 +212,7 @@ public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil { continue; } - if (stack.getItem() instanceof EnergyBattery && !usedBattery) + if (stack.getItem() instanceof Orb && !usedBattery) { if (stack.getItemDamage() <= stack.getMaxDamage() - damageToBeDone) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java index 7d636c01..770cb4ce 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java @@ -2,7 +2,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; @@ -18,7 +18,7 @@ import net.minecraft.world.World; import java.util.List; -public class SigilOfElementalAffinity extends EnergyItems implements ISigil +public class SigilOfElementalAffinity extends BindableItems implements ISigil { @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -97,7 +97,7 @@ public class SigilOfElementalAffinity extends EnergyItems implements ISigil @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -110,7 +110,7 @@ public class SigilOfElementalAffinity extends EnergyItems implements ISigil NBTTagCompound tag = par1ItemStack.getTagCompound(); tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); - if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (tag.getBoolean("isActive") && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); @@ -150,7 +150,7 @@ public class SigilOfElementalAffinity extends EnergyItems implements ISigil { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.getTagCompound().setBoolean("isActive", false); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfEnderSeverance.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfEnderSeverance.java index 5ed0ea63..d8d262a0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfEnderSeverance.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfEnderSeverance.java @@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -20,7 +20,7 @@ import net.minecraft.world.World; import java.util.List; -public class SigilOfEnderSeverance extends EnergyItems implements IHolding, ISigil +public class SigilOfEnderSeverance extends BindableItems implements IHolding, ISigil { @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -98,7 +98,7 @@ public class SigilOfEnderSeverance extends EnergyItems implements IHolding, ISig @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -118,7 +118,7 @@ public class SigilOfEnderSeverance extends EnergyItems implements IHolding, ISig if (!par3EntityPlayer.capabilities.isCreativeMode) { - if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { tag.setBoolean("isActive", false); } @@ -161,7 +161,7 @@ public class SigilOfEnderSeverance extends EnergyItems implements IHolding, ISig { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.getTagCompound().setBoolean("isActive", false); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java index f888d5a2..d5687613 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java @@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import cpw.mods.fml.common.eventhandler.Event.Result; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -24,7 +24,7 @@ import net.minecraftforge.event.entity.player.BonemealEvent; import java.util.List; -public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil +public class SigilOfGrowth extends BindableItems implements ArmourUpgrade, ISigil { @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -104,11 +104,11 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil @Override public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) { - if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par2EntityPlayer)) + if (BindableItems.checkAndSetItemOwner(par1ItemStack, par2EntityPlayer)) { if (applyBonemeal(par1ItemStack, par3World, par4, par5, par6, par2EntityPlayer)) { - EnergyItems.syphonBatteries(par1ItemStack, par2EntityPlayer, getEnergyUsed()); + BindableItems.syphonBatteries(par1ItemStack, par2EntityPlayer, getEnergyUsed()); if (par3World.isRemote) { @@ -125,7 +125,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -143,7 +143,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil NBTTagCompound tag = par1ItemStack.getTagCompound(); tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); - if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (tag.getBoolean("isActive") && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay); @@ -172,7 +172,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil { if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) { - if(!EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed())) + if(!BindableItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed())) { par1ItemStack.getTagCompound().setBoolean("isActive", false); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java index 12b772ca..ed103ecf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java @@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; @@ -18,7 +18,7 @@ import net.minecraft.world.World; import java.util.List; -public class SigilOfHaste extends EnergyItems implements ArmourUpgrade, ISigil +public class SigilOfHaste extends BindableItems implements ArmourUpgrade, ISigil { @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -96,7 +96,7 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade, ISigil @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -109,7 +109,7 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade, ISigil NBTTagCompound tag = par1ItemStack.getTagCompound(); tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); - if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (tag.getBoolean("isActive") && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); @@ -146,7 +146,7 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade, ISigil { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.getTagCompound().setBoolean("isActive", false); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java index 34725eb3..1d7346b7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java @@ -17,11 +17,11 @@ import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHolding, ISigil +public class SigilOfMagnetism extends BindableItems implements ArmourUpgrade, IHolding, ISigil { @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -100,7 +100,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHol @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -113,7 +113,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHol NBTTagCompound tag = par1ItemStack.getTagCompound(); tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); - if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (tag.getBoolean("isActive") && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay); @@ -144,7 +144,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHol { if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) { - if(!EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed())) + if(!BindableItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed())) { par1ItemStack.getTagCompound().setBoolean("isActive", false); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfSupression.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfSupression.java index 370ef3af..8506987a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfSupression.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfSupression.java @@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer; import cpw.mods.fml.relauncher.Side; @@ -22,7 +22,7 @@ import net.minecraft.world.World; import java.util.List; -public class SigilOfSupression extends EnergyItems implements ArmourUpgrade, ISigil +public class SigilOfSupression extends BindableItems implements ArmourUpgrade, ISigil { @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -104,7 +104,7 @@ public class SigilOfSupression extends EnergyItems implements ArmourUpgrade, ISi { int tickDelay = 200; - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || SpellHelper.isFakePlayer(par2World, par3EntityPlayer)) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || SpellHelper.isFakePlayer(par2World, par3EntityPlayer)) { return par1ItemStack; } @@ -129,7 +129,7 @@ public class SigilOfSupression extends EnergyItems implements ArmourUpgrade, ISi if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { tag.setBoolean("isActive", false); } @@ -206,7 +206,7 @@ public class SigilOfSupression extends EnergyItems implements ArmourUpgrade, ISi { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.getTagCompound().setBoolean("isActive", false); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheAssassin.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheAssassin.java index 4bfa7e8d..c2361c91 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheAssassin.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheAssassin.java @@ -22,13 +22,13 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.EnderTeleportEvent; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class SigilOfTheAssassin extends EnergyItems implements ArmourUpgrade, ISigil +public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, ISigil { public SigilOfTheAssassin() { @@ -79,7 +79,7 @@ public class SigilOfTheAssassin extends EnergyItems implements ArmourUpgrade, IS */ public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java index 7b023b8b..facb1c68 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java @@ -4,7 +4,7 @@ import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -21,7 +21,7 @@ import net.minecraft.world.World; import java.util.List; -public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade, ISigil +public class SigilOfTheBridge extends BindableItems implements ArmourUpgrade, ISigil { @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -101,7 +101,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade, ISig @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -114,7 +114,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade, ISig NBTTagCompound tag = par1ItemStack.getTagCompound(); tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); - if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (tag.getBoolean("isActive") && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay); @@ -145,7 +145,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade, ISig { if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) { - if(EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, this.getLPUsed(par1ItemStack))) + if(BindableItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, this.getLPUsed(par1ItemStack))) { this.setLPUsed(par1ItemStack, 0); }else diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java index 37755b9f..f4054fbc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java @@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; @@ -19,7 +19,7 @@ import net.minecraft.world.World; import java.util.List; -public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade, ISigil +public class SigilOfTheFastMiner extends BindableItems implements ArmourUpgrade, ISigil { @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -97,7 +97,7 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade, I @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -110,7 +110,7 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade, I NBTTagCompound tag = par1ItemStack.getTagCompound(); tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); - if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (tag.getBoolean("isActive") && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); @@ -147,7 +147,7 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade, I { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.getTagCompound().setBoolean("isActive", false); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java index 729cc171..aee7a0ba 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java @@ -12,7 +12,7 @@ import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; public class SigilOfWind extends SigilToggleable implements ArmourUpgrade, ISigil { @@ -46,7 +46,7 @@ public class SigilOfWind extends SigilToggleable implements ArmourUpgrade, ISigi @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -59,7 +59,7 @@ public class SigilOfWind extends SigilToggleable implements ArmourUpgrade, ISigi NBTTagCompound tag = par1ItemStack.getTagCompound(); this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - if (this.getActivated(par1ItemStack) && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (this.getActivated(par1ItemStack) && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); @@ -96,7 +96,7 @@ public class SigilOfWind extends SigilToggleable implements ArmourUpgrade, ISigi { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { this.setActivated(par1ItemStack, false); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilPackRat.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilPackRat.java index 1014041e..7303bfd6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilPackRat.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilPackRat.java @@ -16,11 +16,11 @@ import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.compress.CompressionRegistry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class SigilPackRat extends EnergyItems implements IHolding, ArmourUpgrade, ISigil +public class SigilPackRat extends BindableItems implements IHolding, ArmourUpgrade, ISigil { @SideOnly(Side.CLIENT) private IIcon activeIcon; @@ -98,7 +98,7 @@ public class SigilPackRat extends EnergyItems implements IHolding, ArmourUpgrade @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -118,7 +118,7 @@ public class SigilPackRat extends EnergyItems implements IHolding, ArmourUpgrade if (!par3EntityPlayer.capabilities.isCreativeMode) { - if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { tag.setBoolean("isActive", false); } @@ -159,7 +159,7 @@ public class SigilPackRat extends EnergyItems implements IHolding, ArmourUpgrade { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.getTagCompound().setBoolean("isActive", false); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilSeer.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilSeer.java index cdca8941..22261ae0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilSeer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilSeer.java @@ -4,7 +4,7 @@ import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; @@ -47,7 +47,7 @@ public class SigilSeer extends Item implements IHolding, ArmourUpgrade, ISigil @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.worldObj.isRemote) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.worldObj.isRemote) { return par1ItemStack; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilToggleable.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilToggleable.java index 2c5b9f53..ae698659 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilToggleable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilToggleable.java @@ -1,9 +1,9 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import net.minecraft.item.ItemStack; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; -public class SigilToggleable extends EnergyItems +public class SigilToggleable extends BindableItems { public void setActivated(ItemStack stack, boolean newActivated) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilVoid.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilVoid.java index c62ee182..a3238858 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilVoid.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilVoid.java @@ -15,7 +15,7 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -79,7 +79,7 @@ public class SigilVoid extends ItemBucket implements ArmourUpgrade, ISigil @Override public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { - if (world.isRemote || !EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (world.isRemote || !BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return false; } @@ -96,7 +96,7 @@ public class SigilVoid extends ItemBucket implements ArmourUpgrade, ISigil { FluidStack amount = ((IFluidHandler) tile).drain(ForgeDirection.getOrientation(side), 1000, false); - if (amount != null && amount.amount > 0 && EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) + if (amount != null && amount.amount > 0 && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) { ((IFluidHandler) tile).drain(ForgeDirection.getOrientation(side), 1000, true); return true; @@ -140,7 +140,7 @@ public class SigilVoid extends ItemBucket implements ArmourUpgrade, ISigil return false; } - if (SpellHelper.isBlockFluid(world.getBlock(x, y, z)) && EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) + if (SpellHelper.isBlockFluid(world.getBlock(x, y, z)) && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) { world.setBlockToAir(x, y, z); return true; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilWater.java index d9bf86a6..02d5db2b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilWater.java @@ -22,7 +22,7 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -83,7 +83,7 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil @Override public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { - if (world.isRemote || !EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (world.isRemote || !BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return false; } @@ -99,7 +99,7 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil FluidStack fluid = new FluidStack(FluidRegistry.WATER, 1000); int amount = ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(side), fluid, false); - if (amount > 0 && EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) + if (amount > 0 && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) { ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(side), fluid, true); } @@ -147,7 +147,7 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil return false; } - if(this.canPlaceContainedLiquid(world, x, y, z, x, y, z) && EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) + if(this.canPlaceContainedLiquid(world, x, y, z, x, y, z) && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) { return this.tryPlaceContainedLiquid(world, x, y, z, x, y, z); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java index b512434d..6f038c94 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java @@ -13,9 +13,9 @@ import net.minecraft.util.MathHelper; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; -public class SigilOfHolding extends EnergyItems +public class SigilOfHolding extends BindableItems { private static int invSize = 4; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionAmphibian.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionAmphibian.java deleted file mode 100644 index 910fa201..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionAmphibian.java +++ /dev/null @@ -1,19 +0,0 @@ -package WayofTime.alchemicalWizardry.common.potion; - -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; - -public class PotionAmphibian extends Potion -{ - public PotionAmphibian(int par1, boolean par2, int par3) - { - super(par1, new ResourceLocation("speed"), par2, par3); - } - - @Override - public Potion setIconIndex(int par1, int par2) - { - super.setIconIndex(par1, par2); - return this; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDemonCloak.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBloodMagic.java similarity index 76% rename from src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDemonCloak.java rename to src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBloodMagic.java index f227139e..4b86628d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDemonCloak.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBloodMagic.java @@ -3,9 +3,9 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; import net.minecraft.util.ResourceLocation; -public class PotionDemonCloak extends Potion +public class PotionBloodMagic extends Potion { - public PotionDemonCloak(int par1, boolean par2, int par3) + public PotionBloodMagic(int par1, boolean par2, int par3) { super(par1, new ResourceLocation("speed"),par2, par3); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBoost.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBoost.java deleted file mode 100644 index 829a64a6..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBoost.java +++ /dev/null @@ -1,19 +0,0 @@ -package WayofTime.alchemicalWizardry.common.potion; - -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; - -public class PotionBoost extends Potion -{ - public PotionBoost(int par1, boolean par2, int par3) - { - super(par1, new ResourceLocation("speed"),par2, par3); - } - - @Override - public Potion setIconIndex(int par1, int par2) - { - super.setIconIndex(par1, par2); - return this; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDeaf.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDeaf.java deleted file mode 100644 index ef3f6d8c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDeaf.java +++ /dev/null @@ -1,19 +0,0 @@ -package WayofTime.alchemicalWizardry.common.potion; - -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; - -public class PotionDeaf extends Potion -{ - public PotionDeaf(int par1, boolean par2, int par3) - { - super(par1, new ResourceLocation("speed"),par2, par3); - } - - @Override - public Potion setIconIndex(int par1, int par2) - { - super.setIconIndex(par1, par2); - return this; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDrowning.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDrowning.java deleted file mode 100644 index e93d897e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDrowning.java +++ /dev/null @@ -1,19 +0,0 @@ -package WayofTime.alchemicalWizardry.common.potion; - -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; - -public class PotionDrowning extends Potion -{ - public PotionDrowning(int par1, boolean par2, int par3) - { - super(par1, new ResourceLocation("speed"),par2, par3); - } - - @Override - public Potion setIconIndex(int par1, int par2) - { - super.setIconIndex(par1, par2); - return this; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFeatherFall.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFeatherFall.java deleted file mode 100644 index 241eda04..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFeatherFall.java +++ /dev/null @@ -1,19 +0,0 @@ -package WayofTime.alchemicalWizardry.common.potion; - -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; - -public class PotionFeatherFall extends Potion -{ - public PotionFeatherFall(int par1, boolean par2, int par3) - { - super(par1, new ResourceLocation("speed"),par2, par3); - } - - @Override - public Potion setIconIndex(int par1, int par2) - { - super.setIconIndex(par1, par2); - return this; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFireFuse.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFireFuse.java deleted file mode 100644 index 2d044f6c..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFireFuse.java +++ /dev/null @@ -1,19 +0,0 @@ -package WayofTime.alchemicalWizardry.common.potion; - -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; - -public class PotionFireFuse extends Potion -{ - public PotionFireFuse(int par1, boolean par2, int par3) - { - super(par1, new ResourceLocation("speed"),par2, par3); - } - - @Override - public Potion setIconIndex(int par1, int par2) - { - super.setIconIndex(par1, par2); - return this; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlameCloak.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlameCloak.java deleted file mode 100644 index ff7e0727..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlameCloak.java +++ /dev/null @@ -1,19 +0,0 @@ -package WayofTime.alchemicalWizardry.common.potion; - -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; - -public class PotionFlameCloak extends Potion -{ - public PotionFlameCloak(int par1, boolean par2, int par3) - { - super(par1, new ResourceLocation("speed"),par2, par3); - } - - @Override - public Potion setIconIndex(int par1, int par2) - { - super.setIconIndex(par1, par2); - return this; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlight.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlight.java deleted file mode 100644 index be96423e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlight.java +++ /dev/null @@ -1,19 +0,0 @@ -package WayofTime.alchemicalWizardry.common.potion; - -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; - -public class PotionFlight extends Potion -{ - public PotionFlight(int par1, boolean par2, int par3) - { - super(par1, new ResourceLocation("speed"),par2, par3); - } - - @Override - public Potion setIconIndex(int par1, int par2) - { - super.setIconIndex(par1, par2); - return this; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionHeavyHeart.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionHeavyHeart.java deleted file mode 100644 index e2111686..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionHeavyHeart.java +++ /dev/null @@ -1,19 +0,0 @@ -package WayofTime.alchemicalWizardry.common.potion; - -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; - -public class PotionHeavyHeart extends Potion -{ - public PotionHeavyHeart(int par1, boolean par2, int par3) - { - super(par1, new ResourceLocation("speed"),par2, par3); - } - - @Override - public Potion setIconIndex(int par1, int par2) - { - super.setIconIndex(par1, par2); - return this; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionIceCloak.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionIceCloak.java deleted file mode 100644 index 64b588ad..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionIceCloak.java +++ /dev/null @@ -1,19 +0,0 @@ -package WayofTime.alchemicalWizardry.common.potion; - -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; - -public class PotionIceCloak extends Potion -{ - public PotionIceCloak(int par1, boolean par2, int par3) - { - super(par1, new ResourceLocation("speed"),par2, par3); - } - - @Override - public Potion setIconIndex(int par1, int par2) - { - super.setIconIndex(par1, par2); - return this; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionInhibit.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionInhibit.java deleted file mode 100644 index 42164497..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionInhibit.java +++ /dev/null @@ -1,19 +0,0 @@ -package WayofTime.alchemicalWizardry.common.potion; - -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; - -public class PotionInhibit extends Potion -{ - public PotionInhibit(int par1, boolean par2, int par3) - { - super(par1, new ResourceLocation("speed"),par2, par3); - } - - @Override - public Potion setIconIndex(int par1, int par2) - { - super.setIconIndex(par1, par2); - return this; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionPlanarBinding.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionPlanarBinding.java deleted file mode 100644 index 35165db5..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionPlanarBinding.java +++ /dev/null @@ -1,19 +0,0 @@ -package WayofTime.alchemicalWizardry.common.potion; - -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; - -public class PotionPlanarBinding extends Potion -{ - public PotionPlanarBinding(int par1, boolean par2, int par3) - { - super(par1, new ResourceLocation("speed"),par2, par3); - } - - @Override - public Potion setIconIndex(int par1, int par2) - { - super.setIconIndex(par1, par2); - return this; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionProjectileProtect.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionProjectileProtect.java deleted file mode 100644 index e6dd1a9d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionProjectileProtect.java +++ /dev/null @@ -1,19 +0,0 @@ -package WayofTime.alchemicalWizardry.common.potion; - -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; - -public class PotionProjectileProtect extends Potion -{ - public PotionProjectileProtect(int par1, boolean par2, int par3) - { - super(par1, new ResourceLocation("speed"),par2, par3); - } - - @Override - public Potion setIconIndex(int par1, int par2) - { - super.setIconIndex(par1, par2); - return this; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionReciprocation.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionReciprocation.java deleted file mode 100644 index e152a45a..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionReciprocation.java +++ /dev/null @@ -1,19 +0,0 @@ -package WayofTime.alchemicalWizardry.common.potion; - -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; - -public class PotionReciprocation extends Potion -{ - public PotionReciprocation(int par1, boolean par2, int par3) - { - super(par1, new ResourceLocation("speed"),par2, par3); - } - - @Override - public Potion setIconIndex(int par1, int par2) - { - super.setIconIndex(par1, par2); - return this; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulFray.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulFray.java deleted file mode 100644 index 03c2323e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulFray.java +++ /dev/null @@ -1,35 +0,0 @@ -package WayofTime.alchemicalWizardry.common.potion; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; - -import java.util.ArrayList; - -public class PotionSoulFray extends Potion -{ - public PotionSoulFray(int par1, boolean par2, int par3) - { - super(par1, new ResourceLocation("speed"),par2, par3); - } - - @Override - public Potion setIconIndex(int par1, int par2) - { - super.setIconIndex(par1, par2); - return this; - } - - @Override - public void performEffect(EntityLivingBase entityLivingBase, int level) - { - entityLivingBase.getActivePotionEffect(this).setCurativeItems(new ArrayList<ItemStack>()); - } - - @Override - public boolean isReady(int duration, int level) - { - return true; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulHarden.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulHarden.java deleted file mode 100644 index e78da4d9..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulHarden.java +++ /dev/null @@ -1,19 +0,0 @@ -package WayofTime.alchemicalWizardry.common.potion; - -import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; - -public class PotionSoulHarden extends Potion -{ - public PotionSoulHarden(int par1, boolean par2, int par3) - { - super(par1, new ResourceLocation("speed"),par2, par3); - } - - @Override - public Potion setIconIndex(int par1, int par2) - { - super.setIconIndex(par1, par2); - return this; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java index 74d0926b..0ee1c57e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java @@ -6,7 +6,6 @@ import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -25,7 +24,7 @@ import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport; @@ -79,7 +78,7 @@ public class RitualEffectExpulsion extends RitualEffect for (int i = 0; i < inventoryTile.getSizeInventory(); i++) { ItemStack stack = inventoryTile.getStackInSlot(i); - if (stack != null && stack.getItem() instanceof IBindable && EnergyItems.getOwnerName(stack).equals(playerString)) + if (stack != null && stack.getItem() instanceof IBindable && BindableItems.getOwnerName(stack).equals(playerString)) { test = true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java index 4caeaf44..18badc5d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java @@ -9,7 +9,7 @@ import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.effect.EntityLightningBolt; @@ -66,14 +66,14 @@ public class RitualEffectUnbinding extends RitualEffect boolean hasSanctus = this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false); if (hasSanctus) { - if (itemStack.getItem() instanceof IBindable && !EnergyItems.getOwnerName(itemStack).equals("")) + if (itemStack.getItem() instanceof IBindable && !BindableItems.getOwnerName(itemStack).equals("")) { world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z - 5)); world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z + 5)); world.addWeatherEffect(new EntityLightningBolt(world, x - 5, y + 1, z)); world.addWeatherEffect(new EntityLightningBolt(world, x + 5, y + 1, z)); - EnergyItems.setItemOwner(itemStack, ""); + BindableItems.setItemOwner(itemStack, ""); this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true); drain = true; ritualStone.setActive(false); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java index 0891c0f3..e4c6f282 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java @@ -11,7 +11,7 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class SpellEarthBender extends HomSpell @@ -27,14 +27,14 @@ public class SpellEarthBender extends HomSpell @Override public ItemStack onOffensiveRangedRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return stack; } if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveRangedEnergy()); + BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveRangedEnergy()); } world.spawnEntityInWorld(new MudProjectile(world, player, 8, false)); @@ -45,14 +45,14 @@ public class SpellEarthBender extends HomSpell @Override public ItemStack onOffensiveMeleeRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return stack; } if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveMeleeEnergy()); + BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveMeleeEnergy()); } if (!world.isRemote) @@ -72,7 +72,7 @@ public class SpellEarthBender extends HomSpell @Override public ItemStack onDefensiveRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return stack; } @@ -138,7 +138,7 @@ public class SpellEarthBender extends HomSpell @Override public ItemStack onEnvironmentalRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return stack; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellExplosions.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellExplosions.java index 4bf48cf2..e5c4a333 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellExplosions.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellExplosions.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.common.spell.simple; import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -21,14 +21,14 @@ public class SpellExplosions extends HomSpell @Override public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); @@ -44,14 +44,14 @@ public class SpellExplosions extends HomSpell @Override public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } int distance = 4; @@ -64,14 +64,14 @@ public class SpellExplosions extends HomSpell @Override public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); } int distance = 4; @@ -82,14 +82,14 @@ public class SpellExplosions extends HomSpell @Override public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); } int radius = 3; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java index aad3367c..f8b23fdc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java @@ -13,7 +13,7 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; public class SpellFireBurst extends HomSpell { @@ -28,14 +28,14 @@ public class SpellFireBurst extends HomSpell @Override public ItemStack onOffensiveRangedRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return stack; } if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveRangedEnergy()); + BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveRangedEnergy()); } world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); @@ -52,14 +52,14 @@ public class SpellFireBurst extends HomSpell @Override public ItemStack onOffensiveMeleeRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return stack; } if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveMeleeEnergy()); + BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveMeleeEnergy()); } world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); @@ -81,14 +81,14 @@ public class SpellFireBurst extends HomSpell @Override public ItemStack onDefensiveRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return stack; } if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(stack, player, this.getDefensiveEnergy()); + BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getDefensiveEnergy()); } world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); @@ -118,14 +118,14 @@ public class SpellFireBurst extends HomSpell @Override public ItemStack onEnvironmentalRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return stack; } if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(stack, player, this.getEnvironmentalEnergy()); + BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getEnvironmentalEnergy()); } world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java index 85615bb9..10cf5ccb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java @@ -9,7 +9,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; public class SpellFrozenWater extends HomSpell { @@ -24,14 +24,14 @@ public class SpellFrozenWater extends HomSpell @Override public ItemStack onOffensiveRangedRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return stack; } if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveRangedEnergy()); + BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveRangedEnergy()); } world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); @@ -47,14 +47,14 @@ public class SpellFrozenWater extends HomSpell @Override public ItemStack onOffensiveMeleeRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return stack; } if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveMeleeEnergy()); + BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveMeleeEnergy()); } for (int i = -2; i <= 2; i++) @@ -70,7 +70,7 @@ public class SpellFrozenWater extends HomSpell { if (!player.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(stack, player, getDefensiveEnergy()); + BindableItems.syphonAndDamageWhileInContainer(stack, player, getDefensiveEnergy()); } float yaw = player.rotationYaw; @@ -178,7 +178,7 @@ public class SpellFrozenWater extends HomSpell @Override public ItemStack onEnvironmentalRightClick(ItemStack stack, World world, EntityPlayer player) { - if (!EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return stack; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java index 8e05809c..f837d538 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.common.spell.simple; import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -28,14 +28,14 @@ public class SpellHolyBlast extends HomSpell @Override public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); @@ -51,14 +51,14 @@ public class SpellHolyBlast extends HomSpell @Override public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } int distance = 2; @@ -106,14 +106,14 @@ public class SpellHolyBlast extends HomSpell @Override public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); } if (!par2World.isRemote) @@ -130,14 +130,14 @@ public class SpellHolyBlast extends HomSpell @Override public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); } int d0 = 3; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java index 1ec3912d..e2f4cb5c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.common.spell.simple; import WayofTime.alchemicalWizardry.common.entity.projectile.LightningBoltProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.player.EntityPlayer; @@ -24,14 +24,14 @@ public class SpellLightningBolt extends HomSpell @Override public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); @@ -48,14 +48,14 @@ public class SpellLightningBolt extends HomSpell public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { //TODO Make it work better...? - if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } double xCoord = par3EntityPlayer.posX; @@ -82,14 +82,14 @@ public class SpellLightningBolt extends HomSpell @Override public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); } double xCoord = par3EntityPlayer.posX; @@ -112,14 +112,14 @@ public class SpellLightningBolt extends HomSpell @Override public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); } if (!par2World.isRemote) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java index 219da278..a4158eaf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java @@ -18,7 +18,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.EnderTeleportEvent; import WayofTime.alchemicalWizardry.common.entity.projectile.TeleportProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class SpellTeleport extends HomSpell @@ -34,14 +34,14 @@ public class SpellTeleport extends HomSpell @Override public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.spawnEntityInWorld(new TeleportProjectile(par2World, par3EntityPlayer, 8, true)); @@ -53,14 +53,14 @@ public class SpellTeleport extends HomSpell @Override public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } par2World.spawnEntityInWorld(new TeleportProjectile(par2World, par3EntityPlayer, 8, false)); @@ -70,14 +70,14 @@ public class SpellTeleport extends HomSpell @Override public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); } double xCoord = par3EntityPlayer.posX; @@ -96,14 +96,14 @@ public class SpellTeleport extends HomSpell @Override public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); } if (!par2World.isRemote) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java index 32c701f3..054538fe 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java @@ -16,7 +16,7 @@ import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class SpellWateryGrave extends HomSpell @@ -32,14 +32,14 @@ public class SpellWateryGrave extends HomSpell @Override public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.spawnEntityInWorld(new WaterProjectile(par2World, par3EntityPlayer, 8)); @@ -50,14 +50,14 @@ public class SpellWateryGrave extends HomSpell @Override public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } if (!par2World.isRemote) @@ -77,14 +77,14 @@ public class SpellWateryGrave extends HomSpell @Override public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); } int d0 = 3; @@ -130,14 +130,14 @@ public class SpellWateryGrave extends HomSpell @Override public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); } int range = 2; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java index ea359f44..2bbfd322 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.common.spell.simple; import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -28,14 +28,14 @@ public class SpellWindGust extends HomSpell @Override public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); @@ -51,14 +51,14 @@ public class SpellWindGust extends HomSpell @Override public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } int distance = 3; @@ -98,14 +98,14 @@ public class SpellWindGust extends HomSpell @Override public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); } int distance = 3; @@ -137,14 +137,14 @@ public class SpellWindGust extends HomSpell @Override public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); + BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); } int d0 = 3; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java index 579581ae..05be629f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java @@ -20,7 +20,7 @@ import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistryCompo import WayofTime.alchemicalWizardry.common.IDemon; import WayofTime.alchemicalWizardry.common.NewPacketHandler; import WayofTime.alchemicalWizardry.common.PlinthComponent; -import WayofTime.alchemicalWizardry.common.items.EnergyBattery; +import WayofTime.alchemicalWizardry.common.items.Orb; public class TEPlinth extends TEInventory implements IUpdatePlayerListBox { @@ -173,9 +173,9 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox if (!isActive()) { - if (getStackInSlot(0) != null && getStackInSlot(0).getItem() instanceof EnergyBattery) + if (getStackInSlot(0) != null && getStackInSlot(0).getItem() instanceof Orb) { - int bloodOrbLevel = ((EnergyBattery) getStackInSlot(0).getItem()).getOrbLevel(); + int bloodOrbLevel = ((Orb) getStackInSlot(0).getItem()).getOrbLevel(); if (SummoningRegistry.isRecipeValid(bloodOrbLevel, composeItemsForRingAndParadigm(1, true), composeItemsForRingAndParadigm(2, true), composeItemsForRingAndParadigm(3, true))) { @@ -203,7 +203,7 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox } } else { - if (getStackInSlot(0) != null && getStackInSlot(0).getItem() instanceof EnergyBattery) + if (getStackInSlot(0) != null && getStackInSlot(0).getItem() instanceof Orb) { if (progress % progressInterval == 0) { @@ -246,7 +246,7 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox if (progress >= progressInterval * 18) { - int bloodOrbLevel = ((EnergyBattery) getStackInSlot(0).getItem()).getOrbLevel(); + int bloodOrbLevel = ((Orb) getStackInSlot(0).getItem()).getOrbLevel(); EntityLivingBase entity = SummoningRegistry.getEntity(worldObj, bloodOrbLevel, ring1Inv, ring2Inv, ring3Inv); if (entity != null) diff --git a/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang b/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang index 93b52d6c..d8485d0e 100644 --- a/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang +++ b/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang @@ -70,178 +70,178 @@ tile.spectral_block.name=Spectral Block tile.incense_crucible.name=Incense Crucible #Item Localization -item.weakBloodOrb.name=Weak Blood Orb -item.apprenticeBloodOrb.name=Apprentice Blood Orb -item.magicianBloodOrb.name=Magician's Blood Orb -item.masterBloodOrb.name=Master Blood Orb -item.archmageBloodOrb.name=Archmage's Blood Orb -item.energyBlast.name=Energy Blaster -item.energySword.name=Bound Blade -item.lavaCrystal.name=Lava Crystal -item.waterSigil.name=Water Sigil -item.lavaSigil.name=Lava Sigil -item.voidSigil.name=Void Sigil -item.blankSlate.name=Blank Slate -item.reinforcedSlate.name=Reinforced Slate -item.sacrificialDagger.name=Sacrificial Knife -item.daggerOfSacrifice.name=Dagger of Sacrifice -item.airSigil.name=Air Sigil -item.sigilOfTheFastMiner.name=Sigil of the Fast Miner -item.sigilOfElementalAffinity.name=Sigil of Elemental Affinity -item.sigilOfHaste.name=Sigil of Haste -item.sigilOfHolding.name=Sigil of Holding -item.divinationSigil.name=Divination Sigil -item.waterScribeTool.name=Elemental Inscription Tool: Water -item.fireScribeTool.name=Elemental Inscription Tool: Fire -item.earthScribeTool.name=Elemental Inscription Tool: Earth -item.airScribeTool.name=Elemental Inscription Tool: Air -item.duskScribeTool.name=Elemental Inscription Tool: Dusk -item.activationCrystalWeak.name=Weak Activation Crystal -item.activationCrystalAwakened.name=Awakened Activation Crystal -item.activationCrystalCreative.name=Creative Activation Crystal -item.boundPickaxe.name=Bound Pickaxe -item.boundAxe.name=Bound Axe -item.boundShovel.name=Bound Shovel -item.boundHelmet.name=Bound Helmet -item.boundPlate.name=Bound Plate -item.boundLeggings.name=Bound Leggings -item.boundBoots.name=Bound Boots -item.weakBloodShard.name=Weak Blood Shard -item.growthSigil.name=Sigil of the Green Grove -item.blankSpell.name=Unbound Crystal -item.alchemyFlask.name=Potion Flask -item.standardBindingAgent.name=Standard Binding Agent -item.mundanePowerCatalyst.name=Mundane Power Catalyst -item.averagePowerCatalyst.name=Average Power Catalyst -item.greaterPowerCatalyst.name=Greater Power Catalyst -item.mundaneLengtheningCatalyst.name=Mundane Lengthening Catalyst -item.averageLengtheningCatalyst.name=Average Lengthening Catalyst -item.greaterLengtheningCatalyst.name=Greater Lengthening Catalyst +item.weak_blood_orb.name=Weak Blood Orb +item.apprentice_blood_orb.name=Apprentice Blood Orb +item.magician_blood_orb.name=Magician's Blood Orb +item.master_blood_orb.name=Master Blood Orb +item.archmage_blood_orb.name=Archmage's Blood Orb +item.energy_blast.name=Energy Blaster +item.energy_sword.name=Bound Blade +item.lava_crystal.name=Lava Crystal +item.water_sigil.name=Water Sigil +item.lava_sigil.name=Lava Sigil +item.void_sigil.name=Void Sigil +item.blank_slate.name=Blank Slate +item.reinforced_slate.name=Reinforced Slate +item.sacrificial_dagger.name=Sacrificial Knife +item.dagger_of_sacrifice.name=Dagger of Sacrifice +item.air_sigil.name=Air Sigil +item.sigil_of_the_fast_miner.name=Sigil of the Fast Miner +item.sigil_of_elemental_affinity.name=Sigil of Elemental Affinity +item.sigil_of_haste.name=Sigil of Haste +item.sigil_of_holding.name=Sigil of Holding +item.divination_sigil.name=Divination Sigil +item.water_scribe_tool.name=Elemental Inscription Tool: Water +item.fire_scribe_tool.name=Elemental Inscription Tool: Fire +item.earth_scribe_tool.name=Elemental Inscription Tool: Earth +item.air_scribe_tool.name=Elemental Inscription Tool: Air +item.dusk_scribe_tool.name=Elemental Inscription Tool: Dusk +item.activation_crystal_weak.name=Weak Activation Crystal +item.activation_crystal_awakened.name=Awakened Activation Crystal +item.activation_crystal_creative.name=Creative Activation Crystal +item.bound_pickaxe.name=Bound Pickaxe +item.bound_axe.name=Bound Axe +item.bound_shovel.name=Bound Shovel +item.bound_helmet.name=Bound Helmet +item.bound_chestplate.name=Bound Chestplate +item.bound_leggings.name=Bound Leggings +item.bound_boots.name=Bound Boots +item.weak_blood_shard.name=Weak Blood Shard +item.growth_sigil.name=Sigil of the Green Grove +item.blank_spell.name=Unbound Crystal +item.alchemy_flask.name=Potion Flask +item.standard_binding_agent.name=Standard Binding Agent +item.mundane_power_catalyst.name=Mundane Power Catalyst +item.average_power_catalyst.name=Average Power Catalyst +item.greater_power_catalyst.name=Greater Power Catalyst +item.mundane_lengthening_catalyst.name=Mundane Lengthening Catalyst +item.average_lengthening_catalyst.name=Average Lengthening Catalyst +item.greater_lengthening_catalyst.name=Greater Lengthening Catalyst item.incendium.name=Incendium item.magicales.name=Magicales item.sanctus.name=Sanctus item.aether.name=Aether -item.simpleCatalyst.name=Simple Catalyst +item.simple_catalyst.name=Simple Catalyst item.crepitous.name=Crepitous item.crystallos.name=Crystallos item.terrae.name=Terrae item.aquasalus.name=Aquasalus item.tennebrae.name=Tenebrae -item.demonBloodShard.name=Demon Blood Shard -item.sigilOfWind.name=Sigil of the Whirlwind -item.telepositionFocus.name=Teleposition Focus -item.enhancedTelepositionFocus.name=Enhanced Teleposition Focus -item.reinforcedTelepositionFocus.name=Reinforced Teleposition Focus -item.demonicTelepositionFocus.name=Demonic Teleposition Focus -item.imbuedSlate.name=Imbued Slate -item.demonicSlate.name=Demonic Slate -item.sigilOfTheBridge.name=Sigil of the Phantom Bridge -item.armourInhibitor.name=Armour Inhibitor -item.cheatyItem.name=Orb of Testing -item.weakFillingAgent.name=Weak Filling Agent -item.standardFillingAgent.name=Standard Filling Agent -item.enhancedFillingAgent.name=Enhanced Filling Agent -item.weakBindingAgent.name=Weak Binding Agent -item.ritualDiviner.name=Ritual Diviner -item.ritualDismantler.name=Ritual Dismantler -item.sigilOfMagnetism.name=Sigil of Magnetism -item.itemDiabloKey.name=Key of Binding -item.energyBazooka.name=Energy Bazooka -item.bloodLightSigil.name=Sigil of the Blood Lamp -item.itemComplexSpellCrystal.name=Complex Spell Crystal -item.itemSigilOfSupression.name=Sigil of Supression -item.itemSigilOfEnderSeverance.name=Sigil of Ender Severance -item.bucketLife.name=Bucket of Life -item.bloodMagicBaseItem.QuartzRod.name=Quartz Rod -item.bloodMagicBaseItem.EmptyCore.name=Empty Core -item.bloodMagicBaseItem.MagicalesCable.name=Magicales Cable -item.bloodMagicBaseItem.WoodBrace.name=Wooden Brace -item.bloodMagicBaseItem.StoneBrace.name=Stone Brace -item.bloodMagicBaseItem.ProjectileCore.name=Projectile Core -item.bloodMagicBaseItem.SelfCore.name=Self Core -item.bloodMagicBaseItem.MeleeCore.name=Melee Core -item.bloodMagicBaseItem.ToolCore.name=Tool Core -item.bloodMagicBaseItem.ParadigmBackPlate.name=Paradigm Plate -item.bloodMagicBaseItem.OutputCable.name=Output Spell Cable -item.bloodMagicBaseItem.InputCable.name=Input Spell Cable -item.bloodMagicBaseItem.FlameCore.name=Fire Core -item.bloodMagicBaseItem.IcyCore.name=Icy Core -item.bloodMagicBaseItem.GustCore.name=Gusty Core -item.bloodMagicBaseItem.EarthenCore.name=Earthen Core -item.bloodMagicBaseItem.CrackedRunicPlate.name=Cracked Runic Plate -item.bloodMagicBaseItem.RunicPlate.name=Runic Plate -item.bloodMagicBaseItem.ScribedRunicPlate.name=Imbued Runic Plate -item.bloodMagicBaseItem.DefaultCore.name=Unattuned Core -item.bloodMagicBaseItem.OffensiveCore.name=Offensive Core -item.bloodMagicBaseItem.DefensiveCore.name=Defensive Core -item.bloodMagicBaseItem.EnvironmentalCore.name=Environmental Core -item.bloodMagicBaseItem.PowerCore.name=Power Core -item.bloodMagicBaseItem.CostCore.name=Reduction Core -item.bloodMagicBaseItem.PotencyCore.name=Potency Core -item.bloodMagicBaseItem.ObsidianBrace.name=Obsidian Brace -item.bloodMagicBaseItem.EtherealSlate.name=Ethereal Slate -item.bloodMagicBaseItem.LifeShard.name=Life Shard -item.bloodMagicBaseItem.SoulShard.name=Soul Shard -item.bloodMagicBaseItem.LifeBrace.name=Living Brace -item.bloodMagicBaseItem.SoulRunicPlate.name=Soul Runic Plate -item.bloodMagicAlchemyItem.Offensa.name=Offensa -item.bloodMagicAlchemyItem.Praesidium.name=Praesidium -item.bloodMagicAlchemyItem.OrbisTerrae.name=Orbis Terrae -item.bloodMagicAlchemyItem.StrengthenedCatalyst.name=Strengthened Catalyst -item.bloodMagicAlchemyItem.ConcentratedCatalyst.name=Concentrated Catalyst -item.bloodMagicAlchemyItem.FracturedBone.name=Fractured Bone -item.bloodMagicAlchemyItem.Virtus.name=Virtus -item.bloodMagicAlchemyItem.Reductus.name=Reductus -item.bloodMagicAlchemyItem.Potentia.name=Potentia -item.sanguineHelmet.name=Sanguine Helmet -item.itemSeerSigil.name=Sigil of Sight -item.itemFluidSigil.name= -item.multiTool.name=Dynamic Mace -item.itemCombinationalCatalyst.name=Combinational Catalyst -item.sanguineRobe.name=Sanguine Robes -item.sanguinePants.name=Sanguine Leggings -item.sanguineBoots.name=Sanguine Boots -item.itemAttunedCrystal.name=Alchemic Router -item.itemTankSegmenter.name=Alchemic Segmenter -item.destinationClearer.name=Alchemic Cleanser -item.demonPlacer.name=Demon Crystal -item.creativeDagger.name=Creative Sacrificial Knife -item.itemBloodPack.name=Blood Letter's Pack -item.itemHarvestSigil.name=Harvest Goddess Sigil -item.itemCompressionSigil.name=Sigil of Compression -item.itemAssassinSigil.name=Sigil of the Assassin -item.transcendentBloodOrb.name=Transcendent Blood Orb -item.itemMailCatalogue.name=Mail Order Catalogue -item.inputRoutingFocus.name=Input Routing Focus -item.bloodMagicBaseItem.EnderShard.name=Ender Shard -item.outputRoutingFocus.default.name=Default Output Routing Focus -item.outputRoutingFocus.modItem.name=Output Routing Focus (ModItem) -item.outputRoutingFocus.ignMeta.name=Output Routing Focus (Ignore Meta) -item.outputRoutingFocus.matchNBT.name=Output Routing Focus (MatchNBT) -item.outputRoutingFocus.global.name=Output Routing Focus (Global) -item.dawnScribeTool.name=Elemental Inscription Tool: Dawn -item.boundHelmetEarth.name=Earth Omega Helmet -item.boundPlateEarth.name=Earth Omega Plate -item.boundLeggingsEarth.name=Earth Omega Leggings -item.boundBootsEarth.name=Earth Omega Boots -item.boundHelmetWind.name=Wind Omega Helmet -item.boundPlateWind.name=Wind Omega Plate -item.boundLeggingsWind.name=Wind Omega Leggings -item.boundBootsWind.name=Wind Omega Boots -item.boundHelmetFire.name=Fire Omega Helmet -item.boundPlateFire.name=Fire Omega Plate -item.boundLeggingsFire.name=Fire Omega Leggings -item.boundBootsFire.name=Fire Omega Boots -item.boundHelmetWater.name=Water Omega Helmet -item.boundPlateWater.name=Water Omega Plate -item.boundLeggingsWater.name=Water Omega Leggings -item.boundBootsWater.name=Water Omega Boots +item.demon_blood_shard.name=Demon Blood Shard +item.sigil_of_wind.name=Sigil of the Whirlwind +item.teleposition_focus.name=Teleposition Focus +item.enhanced_teleposition_focus.name=Enhanced Teleposition Focus +item.reinforced_teleposition_focus.name=Reinforced Teleposition Focus +item.demonic_teleposition_focus.name=Demonic Teleposition Focus +item.imbued_slate.name=Imbued Slate +item.demonic_slate.name=Demonic Slate +item.sigil_of_the_bridge.name=Sigil of the Phantom Bridge +item.armour_inhibitor.name=Armour Inhibitor +item.creative_orb.name=Orb of Testing +item.weak_filling_agent.name=Weak Filling Agent +item.standard_filling_agent.name=Standard Filling Agent +item.enhanced_filling_agent.name=Enhanced Filling Agent +item.weak_binding_agent.name=Weak Binding Agent +item.ritual_diviner.name=Ritual Diviner +item.ritual_dismantler.name=Ritual Dismantler +item.sigil_of_magnetism.name=Sigil of Magnetism +item.key_of_binding.name=Key of Binding +item.energy_bazooka.name=Energy Bazooka +item.blood_light_sigil.name=Sigil of the Blood Lamp +item.complex_spell_crystal.name=Complex Spell Crystal +item.sigil_of_supression.name=Sigil of Supression +item.sigil_of_ender_severance.name=Sigil of Ender Severance +item.bucket_life.name=Bucket of Life +item.base_items.quartz_rod.name=Quartz Rod +item.base_items.empty_core.name=Empty Core +item.base_items.magicales_cable.name=Magicales Cable +item.base_items.wood_brace.name=Wooden Brace +item.base_items.stone_brace.name=Stone Brace +item.base_items.projectile_core.name=Projectile Core +item.base_items.self_core.name=Self Core +item.base_items.melee_core.name=Melee Core +item.base_items.tool_core.name=Tool Core +item.base_items.paradigm_back_plate.name=Paradigm Plate +item.base_items.output_cable.name=Output Spell Cable +item.base_items.input_cable.name=Input Spell Cable +item.base_items.flame_core.name=Fire Core +item.base_items.icy_core.name=Icy Core +item.base_items.gust_core.name=Gusty Core +item.base_items.earthen_core.name=Earthen Core +item.base_items.cracked_runic_plate.name=Cracked Runic Plate +item.base_items.runic_plate.name=Runic Plate +item.base_items.scribed_runic_plate.name=Imbued Runic Plate +item.base_items.default_core.name=Unattuned Core +item.base_items.offensive_core.name=Offensive Core +item.base_items.defensive_core.name=Defensive Core +item.base_items.environmental_core.name=Environmental Core +item.base_items.power_core.name=Power Core +item.base_items.cost_core.name=Reduction Core +item.base_items.potency_core.name=Potency Core +item.base_items.obsidian_brace.name=Obsidian Brace +item.base_items.ethereal_slate.name=Ethereal Slate +item.base_items.life_shard.name=Life Shard +item.base_items.soul_shard.name=Soul Shard +item.base_items.life_brace.name=Living Brace +item.base_items.soul_runic_plate.name=Soul Runic Plate +item.base_items.ender_shard.name=Ender Shard +item.base_alchemy_items.offensa.name=Offensa +item.base_alchemy_items.praesidium.name=Praesidium +item.base_alchemy_items.orbis_terrae.name=Orbis Terrae +item.base_alchemy_items.strengthened_catalyst.name=Strengthened Catalyst +item.base_alchemy_items.concentrated_catalyst.name=Concentrated Catalyst +item.base_alchemy_items.fractured_bone.name=Fractured Bone +item.base_alchemy_items.virtus.name=Virtus +item.base_alchemy_items.reductus.name=Reductus +item.base_alchemy_items.potentia.name=Potentia +item.sanguine_helmet.name=Sanguine Helmet +item.seer_sigil.name=Sigil of Sight +item.fluid_sigil.name=Sigil of Fluidity +item.multi_tool.name=Dynamic Mace +item.combinational_catalyst.name=Combinational Catalyst +item.sanguine_robe.name=Sanguine Robes +item.sanguine_pants.name=Sanguine Leggings +item.sanguine_boots.name=Sanguine Boots +item.alchemical_router.name=Alchemic Router +item.alchemical_segmenter.name=Alchemic Segmenter +item.alchemical_cleanser.name=Alchemic Cleanser +item.demon_crystal.name=Demon Crystal +item.creative_dagger.name=Creative Sacrificial Knife +item.blood_pack.name=Blood Letter's Pack +item.harvest_sigil.name=Harvest Goddess Sigil +item.compression_sigil.name=Sigil of Compression +item.assassin_sigil.name=Sigil of the Assassin +item.transcendent_blood_orb.name=Transcendent Blood Orb +item.mail_catalogue.name=Mail Order Catalogue +item.input_routing_focus.name=Input Routing Focus +item.output_routing_focus.default.name=Default Output Routing Focus +item.output_routing_focus.modItem.name=Output Routing Focus (ModItem) +item.output_routing_focus.ignMeta.name=Output Routing Focus (Ignore Meta) +item.output_routing_focus.matchNBT.name=Output Routing Focus (MatchNBT) +item.output_routing_focus.global.name=Output Routing Focus (Global) +item.dawn_scribe_tool.name=Elemental Inscription Tool: Dawn +item.bound_helmet_earth.name=Earth Omega Helmet +item.bound_chestplate_earth.name=Earth Omega Chestplate +item.bound_leggings_earth.name=Earth Omega Leggings +item.bound_boots_earth.name=Earth Omega Boots +item.bound_helmet_wind.name=Wind Omega Helmet +item.bound_chestplate_wind.name=Wind Omega Chestplate +item.bound_leggings_wind.name=Wind Omega Leggings +item.bound_boots_wind.name=Wind Omega Boots +item.bound_helmet_fire.name=Fire Omega Helmet +item.bound_chestplate_fire.name=Fire Omega Chestplate +item.bound_leggings_fire.name=Fire Omega Leggings +item.bound_boots_fire.name=Fire Omega Boots +item.bound_helmet_water.name=Water Omega Helmet +item.bound_chestplate_water.name=Water Omega Chestplate +item.bound_leggings_water.name=Water Omega Leggings +item.bound_boots_water.name=Water Omega Boots -item.bloodMagicIncenseItem.Woodash.name=Wood Ash -item.bloodMagicIncenseItem.Byrrus.name=Byrrus -item.bloodMagicIncenseItem.Livens.name=Livens -item.bloodMagicIncenseItem.Viridis.name=Viridis -item.bloodMagicIncenseItem.Purpura.name=Purpura +item.incense.wood_ash.name=Wood Ash +item.incense.byrrus.name=Byrrus +item.incense.livens.name=Livens +item.incense.viridis.name=Viridis +item.incense.purpura.name=Purpura #Creative Tab itemGroup.tabBloodMagic=Blood Magic @@ -400,27 +400,27 @@ tooltip.sacrificialdagger.desc3=finger will suffice... tooltip.sanguinearmor.desc1=A pair of goggles imbued with power tooltip.sanguinearmor.desc2=Robes imbued with forbidden power tooltip.sanguinearmor.visdisc=Vis discount: -tooltip.scribetool.desc=The writing is on the wall... +tooltip._scribe_tool.desc=The writing is on the wall... tooltip.seersigil.desc=When seeing all is not enough -tooltip.sigilofelementalaffinity.desc1=Perfect for a fire-breathing fish -tooltip.sigilofelementalaffinity.desc2=who is afraid of heights! -tooltip.sigilofenderseverance.desc=Put those endermen in a Dire situation! -tooltip.sigilofgrowth.desc1=Who needs a green thumb when -tooltip.sigilofgrowth.desc2=you have a green slate? -tooltip.sigilofhaste.desc=One dose of caffeine later... -tooltip.sigilofholding.desc=Used to hold several Sigils! -tooltip.sigilofmagnetism.desc=I have a very magnetic personality! -tooltip.sigilofsupression.desc=Better than telekinesis -tooltip.sigiloftheassassin.desc=Time to stay stealthy... -tooltip.sigilofthebridge.desc1=Activate to create a bridge -tooltip.sigilofthebridge.desc2=beneath your feet. -tooltip.sigilofthefastminer.desc=Keep going and going and going... -tooltip.sigilofwind.desc=Best not to wear a skirt. +tooltip.sigil_ofelementalaffinity.desc1=Perfect for a fire-breathing fish +tooltip.sigil_ofelementalaffinity.desc2=who is afraid of heights! +tooltip.sigil_ofenderseverance.desc=Put those endermen in a Dire situation! +tooltip.sigil_ofgrowth.desc1=Who needs a green thumb when +tooltip.sigil_ofgrowth.desc2=you have a green slate? +tooltip.sigil_ofhaste.desc=One dose of caffeine later... +tooltip.sigil_ofholding.desc=Used to hold several Sigils! +tooltip.sigil_ofmagnetism.desc=I have a very magnetic personality! +tooltip.sigil_ofsupression.desc=Better than telekinesis +tooltip.sigil_oftheassassin.desc=Time to stay stealthy... +tooltip.sigil_ofthebridge.desc1=Activate to create a bridge +tooltip.sigil_ofthebridge.desc2=beneath your feet. +tooltip.sigil_ofthefastminer.desc=Keep going and going and going... +tooltip.sigil_ofwind.desc=Best not to wear a skirt. tooltip.sigil.state.activated=Activated tooltip.sigil.state.deactivated=Deactivated tooltip.tanksegmenter.desc1=Used to designate which tooltip.tanksegmenter.desc2=reagents can go into a container -tooltip.telepositionfocus.desc=An Enderpearl imbued with blood +tooltip._teleposition_focus.desc=An Enderpearl imbued with blood tooltip.voidsigil.desc=Better than a Swiffer! tooltip.watersigil.desc=Infinite water, anyone? tooltip.routingFocus.limit=Limit: From f009d58f74291296de1ad69da45041ced9f85b57 Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Thu, 30 Jul 2015 17:24:46 -0400 Subject: [PATCH 28/33] Fixes --- .../alchemicalWizardry/client/ClientProxy.java | 11 +++++------ .../common/tileEntity/TEBellJar.java | 12 ++++++------ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java b/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java index 3c5f4b04..927e4e0a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java @@ -42,6 +42,8 @@ import WayofTime.alchemicalWizardry.common.entity.projectile.EntityMeteor; import WayofTime.alchemicalWizardry.common.entity.projectile.EntityParticleBeam; import WayofTime.alchemicalWizardry.common.items.sigil.holding.ScrollHelper; import WayofTime.alchemicalWizardry.common.renderer.block.RenderAlchemicalCalcinator; +import WayofTime.alchemicalWizardry.common.renderer.block.RenderAltar; +import WayofTime.alchemicalWizardry.common.renderer.block.RenderChemistrySet; import WayofTime.alchemicalWizardry.common.renderer.block.RenderConduit; import WayofTime.alchemicalWizardry.common.renderer.block.RenderCrystalBelljar; import WayofTime.alchemicalWizardry.common.renderer.block.RenderMasterStone; @@ -52,8 +54,6 @@ import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellEffectBlock import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellEnhancementBlock; import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellModifierBlock; import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellParadigmBlock; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderChemistrySet; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderAltar; import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEAlchemicalCalcinatorItemRenderer; import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEAltarItemRenderer; import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEBellJarItemRenderer; @@ -90,7 +90,8 @@ import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderMeteor; import WayofTime.alchemicalWizardry.common.thread.GAPIChecker; import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; @@ -100,7 +101,6 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; public class ClientProxy extends CommonProxy { @@ -160,7 +160,7 @@ public class ClientProxy extends CommonProxy ClientRegistry.bindTileEntitySpecialRenderer(TEReagentConduit.class, new RenderReagentConduit()); ClientRegistry.bindTileEntitySpecialRenderer(TEMasterStone.class, new RenderMasterStone()); ClientRegistry.bindTileEntitySpecialRenderer(TEAlchemicalCalcinator.class, new RenderAlchemicalCalcinator()); - ClientRegistry.bindTileEntitySpecialRenderer(TEBelljar.class, new RenderCrystalBelljar()); + ClientRegistry.bindTileEntitySpecialRenderer(TEBellJar.class, new RenderCrystalBelljar()); //Item Renderer stuff MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockConduit), new TEConduitItemRenderer()); @@ -170,7 +170,6 @@ public class ClientProxy extends CommonProxy MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellModifier), new TESpellModifierBlockItemRenderer()); MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockAlchemicalCalcinator), new TEAlchemicalCalcinatorItemRenderer()); MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockCrystalBelljar), new TEBellJarItemRenderer()); - ShaderHelper.initShaders(); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java index 2a04adc1..0a3ca239 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java @@ -1,9 +1,5 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.item.ItemBlock; @@ -13,10 +9,14 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraftforge.common.util.Constants; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; -public class TEBelljar extends TEReagentConduit +public class TEBellJar extends TEReagentConduit { - public TEBelljar() + public TEBellJar() { super(1, 16000); this.maxConnextions = 1; From 1bd90ff01c568f1f4ea7d1bf481d6ad1111b234e Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Thu, 30 Jul 2015 20:50:48 -0400 Subject: [PATCH 29/33] Fixed TEBellJar calls (may need to be changed back again...) --- .../common/block/BlockBelljar.java | 22 +++++++++---------- .../renderer/block/RenderCrystalBelljar.java | 7 +++--- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java index b96d8d4b..8524de83 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java @@ -3,7 +3,6 @@ package WayofTime.alchemicalWizardry.common.block; import java.util.ArrayList; import java.util.List; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -18,12 +17,13 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; public class BlockBelljar extends BlockContainer { @@ -77,12 +77,12 @@ public class BlockBelljar extends BlockContainer { TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TEBelljar) + if (tile instanceof TEBellJar) { NBTTagCompound tag = stack.getTagCompound(); if (tag != null) { - ((TEBelljar) tile).readTankNBTOnPlace(tag); + ((TEBellJar) tile).readTankNBTOnPlace(tag); } } } @@ -90,7 +90,7 @@ public class BlockBelljar extends BlockContainer @Override public TileEntity createNewTileEntity(World world, int meta) { - return new TEBelljar(); + return new TEBellJar(); } @Override @@ -121,9 +121,9 @@ public class BlockBelljar extends BlockContainer public int getComparatorInputOverride(World world, BlockPos blockPos) { TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TEBelljar) + if (tile instanceof TEBellJar) { - return ((TEBelljar) tile).getRSPowerOutput(); + return ((TEBellJar) tile).getRSPowerOutput(); } return 15; } @@ -142,11 +142,11 @@ public class BlockBelljar extends BlockContainer TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TEBelljar) + if (tile instanceof TEBellJar) { ItemStack drop = new ItemStack(this); NBTTagCompound tag = new NBTTagCompound(); - ((TEBelljar) tile).writeTankNBT(tag); + ((TEBellJar) tile).writeTankNBT(tag); drop.setTagCompound(tag); list.add(drop); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java index fbd21044..dd0212ff 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java @@ -1,12 +1,10 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; -import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.client.FMLClientHandler; @@ -16,6 +14,7 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import WayofTime.alchemicalWizardry.common.renderer.model.ModelCrystalBelljar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; public class RenderCrystalBelljar extends TileEntitySpecialRenderer { @@ -26,9 +25,9 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer @Override public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) { - if (tileEntity instanceof TEBelljar) + if (tileEntity instanceof TEBellJar) { - TEBelljar tileAltar = (TEBelljar) tileEntity; + TEBellJar tileAltar = (TEBellJar) tileEntity; GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/CrystalBelljar.png"); From d528bdbbf8bb0969c624be1ccc5c522d3fa90c20 Mon Sep 17 00:00:00 2001 From: Arcaratus <byou64@gmail.com> Date: Fri, 31 Jul 2015 11:35:05 -0400 Subject: [PATCH 30/33] Finished all porting --- .../alchemicalWizardry/ModBlocks.java | 30 ++-- .../alchemicalWizardry/ModItems.java | 14 +- .../client/ClientProxy.java | 4 +- .../common/AlchemicalWizardryEventHooks.java | 9 +- .../common/CommonProxy.java | 3 - .../common/block/BlockBelljar.java | 2 +- .../common/items/BindableItems.java | 1 + .../common/items/sigil/SigilAir.java | 16 +- .../common/items/sigil/SigilBloodLight.java | 72 ++++----- .../{SigilPackRat.java => SigilCompress.java} | 71 ++------- .../common/items/sigil/SigilDivination.java | 31 +--- .../common/items/sigil/SigilFluid.java | 138 +++++++----------- .../common/items/sigil/SigilHarvest.java | 74 ++-------- .../common/items/sigil/SigilLava.java | 65 ++++----- .../items/sigil/SigilOfElementalAffinity.java | 75 ++-------- .../items/sigil/SigilOfEnderSeverance.java | 70 +-------- .../common/items/sigil/SigilOfGrowth.java | 106 ++++---------- .../common/items/sigil/SigilOfHaste.java | 70 ++------- .../common/items/sigil/SigilOfMagnetism.java | 64 +------- .../common/items/sigil/SigilOfSupression.java | 102 ++++--------- .../items/sigil/SigilOfTheAssassin.java | 45 ++---- .../common/items/sigil/SigilOfTheBridge.java | 87 +++-------- .../items/sigil/SigilOfTheFastMiner.java | 73 ++------- .../common/items/sigil/SigilOfWind.java | 8 +- .../common/items/sigil/SigilSeer.java | 19 +-- .../common/items/sigil/SigilVoid.java | 59 +++----- .../common/items/sigil/SigilWater.java | 109 +++++++------- .../items/sigil/holding/SigilOfHolding.java | 13 +- .../itemRender/TEBellJarItemRenderer.java | 4 +- .../common/tileEntity/TEBellJar.java | 4 +- 30 files changed, 393 insertions(+), 1045 deletions(-) rename src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/{SigilPackRat.java => SigilCompress.java} (66%) diff --git a/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java b/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java index eb22bdbc..a3f6e5c6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java @@ -107,13 +107,13 @@ public class ModBlocks public static void init() { - blockAltar = (BlockAltar) registerBlock(new BlockAltar(), "altar"); +/* blockAltar = (BlockAltar) registerBlock(new BlockAltar(), "altar"); bloodRune = (BlockBloodRune) registerBlock(new BlockBloodRune(), ItemBloodRuneBlock.class, "base_rune"); speedRune = (BlockSpeedRune) registerBlock(new BlockSpeedRune(), "speed_rune"); efficiencyRune = (BlockEfficiencyRune) registerBlock(new BlockEfficiencyRune(), "efficiency_rune"); runeOfSacrifice = (BlockRuneOfSacrifice) registerBlock(new BlockRuneOfSacrifice(), "sacrifice_rune"); runeOfSelfSacrifice = (BlockRuneOfSelfSacrifice) registerBlock(new BlockRuneOfSelfSacrifice(), "self_sacrifice_rune"); - blockTeleposer = registerBlock(new BlockTeleposer(), "teleposer"); + */ blockTeleposer = registerBlock(new BlockTeleposer(), "teleposer"); spectralBlock = registerBlock(new BlockSpectral(), "spectral_block"); ritualStone = registerBlock(new BlockRitualStone(), "ritual_stone"); blockMasterStone = registerBlock(new BlockMasterStone(), "master_ritual_stone"); @@ -159,21 +159,22 @@ public class ModBlocks block.setCreativeTab(AlchemicalWizardry.tabBloodMagic); } - blocksNotToBeRegistered.clear(); - for (String unlocName : BloodMagicConfiguration.blocksToBeDisabled) +// blocksNotToBeRegistered.clear(); +// for (String unlocName : BloodMagicConfiguration.blocksToBeDisabled) { - if (unlocName.equals(unlocalizedName)) +// if (unlocName.equals(unlocalizedName)) { - blocksNotToBeRegistered.add(unlocName); +// blocksNotToBeRegistered.add(unlocName); } } - if (!blocksNotToBeRegistered.contains(unlocalizedName)) + // if (!blocksNotToBeRegistered.contains(unlocalizedName)) { - GameRegistry.registerBlock(block, unlocalizedName); +// GameRegistry.registerBlock(block, unlocalizedName); } - BlockRenderer.registerBlock(block); +// BlockRenderer.registerBlock(block); + GameRegistry.registerBlock(block, unlocalizedName); return block; } @@ -181,20 +182,19 @@ public class ModBlocks { block.setCreativeTab(AlchemicalWizardry.tabBloodMagic); - for (String unlocName : BloodMagicConfiguration.blocksToBeDisabled) +// for (String unlocName : BloodMagicConfiguration.blocksToBeDisabled) { - System.out.println(unlocName); - if (unlocName.equals(unlocalizedName)) +// if (unlocName.equals(unlocalizedName)) { - blocksNotToBeRegistered.add(unlocName); +// blocksNotToBeRegistered.add(unlocName); } } - if (!blocksNotToBeRegistered.contains(unlocalizedName)) +// if (!blocksNotToBeRegistered.contains(unlocalizedName)) { GameRegistry.registerBlock(block, itemBlockClass, unlocalizedName); } - BlockRenderer.registerBlock(block); +// BlockRenderer.registerBlock(block); return block; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/ModItems.java b/src/main/java/WayofTime/alchemicalWizardry/ModItems.java index 97f51174..edfcf081 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/ModItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/ModItems.java @@ -88,7 +88,7 @@ import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheAssassin; import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheBridge; import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheFastMiner; import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfWind; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilPackRat; +import WayofTime.alchemicalWizardry.common.items.sigil.SigilCompress; import WayofTime.alchemicalWizardry.common.items.sigil.SigilSeer; import WayofTime.alchemicalWizardry.common.items.sigil.SigilVoid; import WayofTime.alchemicalWizardry.common.items.sigil.SigilWater; @@ -349,7 +349,7 @@ public class ModItems itemBloodPack = registerItem(new ItemBloodLetterPack(), "blood_pack"); itemHarvestSigil = registerItem(new SigilHarvest(), "harvest_sigil"); - itemCompressionSigil = registerItem(new SigilPackRat(), "compression_sigil"); + itemCompressionSigil = registerItem(new SigilCompress(), "compression_sigil"); itemAssassinSigil = registerItem(new SigilOfTheAssassin(), "assassin_sigil"); boundHelmetWater = registerItem(new OmegaArmourWater(0), "bound_helmet_water"); @@ -384,17 +384,17 @@ public class ModItems { item.setUnlocalizedName(unlocalizedName); item.setCreativeTab(AlchemicalWizardry.tabBloodMagic); - itemsNotToBeRegistered.clear(); +// itemsNotToBeRegistered.clear(); - for (String unlocName : BloodMagicConfiguration.itemsToBeDisabled) +// for (String unlocName : BloodMagicConfiguration.itemsToBeDisabled) { - if (unlocName.equals(unlocalizedName)) +// if (unlocName.equals(unlocalizedName)) { - itemsNotToBeRegistered.add(unlocName); +// itemsNotToBeRegistered.add(unlocName); } } - if (!itemsNotToBeRegistered.contains(unlocalizedName)) +// if (!itemsNotToBeRegistered.contains(unlocalizedName)) { GameRegistry.registerItem(item, unlocalizedName); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java b/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java index 927e4e0a..f5450b05 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java @@ -90,7 +90,7 @@ import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderMeteor; import WayofTime.alchemicalWizardry.common.thread.GAPIChecker; import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; @@ -160,7 +160,7 @@ public class ClientProxy extends CommonProxy ClientRegistry.bindTileEntitySpecialRenderer(TEReagentConduit.class, new RenderReagentConduit()); ClientRegistry.bindTileEntitySpecialRenderer(TEMasterStone.class, new RenderMasterStone()); ClientRegistry.bindTileEntitySpecialRenderer(TEAlchemicalCalcinator.class, new RenderAlchemicalCalcinator()); - ClientRegistry.bindTileEntitySpecialRenderer(TEBellJar.class, new RenderCrystalBelljar()); + ClientRegistry.bindTileEntitySpecialRenderer(TEBelljar.class, new RenderCrystalBelljar()); //Item Renderer stuff MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockConduit), new TEConduitItemRenderer()); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java index 12d99c12..beb46388 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java @@ -58,14 +58,13 @@ import WayofTime.alchemicalWizardry.common.omega.ReagentRegenConfiguration; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; - public class AlchemicalWizardryEventHooks { - public static Map<String, Boolean> playerFlightBuff = new HashMap(); - public static List<String> playersWith1Step = new ArrayList(); + public static Map<String, Boolean> playerFlightBuff = new HashMap<String, Boolean>(); + public static List<String> playersWith1Step = new ArrayList<String>(); - public static Map<Integer, List<CoordAndRange>> respawnMap = new HashMap(); - public static Map<Integer, List<CoordAndRange>> forceSpawnMap = new HashMap(); + public static Map<Integer, List<CoordAndRange>> respawnMap = new HashMap<Integer, List<CoordAndRange>>(); + public static Map<Integer, List<CoordAndRange>> forceSpawnMap = new HashMap<Integer, List<CoordAndRange>>(); public static Random rand = new Random(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java b/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java index 5fdf116b..1e9201a8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java @@ -2,7 +2,6 @@ package WayofTime.alchemicalWizardry.common; import net.minecraft.world.World; import net.minecraftforge.fml.common.registry.EntityRegistry; -import net.minecraftforge.fml.common.registry.GameRegistry; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; import WayofTime.alchemicalWizardry.common.entity.mob.BookEntityItem; @@ -22,8 +21,6 @@ import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; import WayofTime.alchemicalWizardry.common.entity.projectile.TeleportProjectile; import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile; import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; public class CommonProxy { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java index b96d8d4b..9fb02482 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java @@ -34,7 +34,7 @@ public class BlockBelljar extends BlockContainer setResistance(5.0F); } - + @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BindableItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BindableItems.java index 2ccd7c81..c0d1bcb8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BindableItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BindableItems.java @@ -20,6 +20,7 @@ public class BindableItems extends Item implements IBindable public BindableItems() { super(); + setMaxStackSize(1); } protected void setEnergyUsed(int par1int) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java index eacefd8b..a654b677 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java @@ -8,23 +8,17 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; import WayofTime.alchemicalWizardry.common.items.BindableItems; -import codechicken.lib.render.TextureUtils.IIconRegister; public class SigilAir extends BindableItems implements ArmourUpgrade, ISigil { public SigilAir() { super(); - this.maxStackSize = 1; - //setMaxDamage(1000); setEnergyUsed(50); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -38,13 +32,6 @@ public class SigilAir extends BindableItems implements ArmourUpgrade, ISigil } } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:AirSigil"); - } - @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -121,8 +108,7 @@ public class SigilAir extends BindableItems implements ArmourUpgrade, ISigil } @Override - public void onArmourUpdate(World world, EntityPlayer player, - ItemStack thisItemStack) + public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) { // TODO Auto-generated method stub player.fallDistance = 0; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilBloodLight.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilBloodLight.java index 767ef64b..1d3e9845 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilBloodLight.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilBloodLight.java @@ -3,113 +3,105 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; import WayofTime.alchemicalWizardry.common.entity.projectile.EntityBloodLightProjectile; import WayofTime.alchemicalWizardry.common.items.BindableItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class SigilBloodLight extends BindableItems implements IHolding, ArmourUpgrade, ISigil { public SigilBloodLight() { super(); - this.maxStackSize = 1; setEnergyUsed(10); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) + public void addInformation(ItemStack itemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { par3List.add(StatCollector.translateToLocal("tooltip.bloodlightsigil.desc")); - if (!(par1ItemStack.getTagCompound() == null)) + if (!(itemStack.getTagCompound() == null)) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); + par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + itemStack.getTagCompound().getString("ownerName")); } } @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) + public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ) { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodLightSigil"); - } - - @Override - public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) - { - if(!BindableItems.checkAndSetItemOwner(par1ItemStack, par2EntityPlayer) || !BindableItems.syphonBatteries(par1ItemStack, par2EntityPlayer, getEnergyUsed())) + if(!BindableItems.checkAndSetItemOwner(itemStack, player) || !BindableItems.syphonBatteries(itemStack, player, getEnergyUsed())) { return true; } - if (par3World.isRemote) + if (world.isRemote) { return true; } - if (par7 == 0 && par3World.isAirBlock(par4, par5 - 1, par6)) + IBlockState light = ModBlocks.blockBloodLight.getBlockState().getBaseState(); + + if (side.getIndex() == 0 && world.isAirBlock(blockPos.add(0, -1, 0))) { - par3World.setBlock(par4, par5 - 1, par6, ModBlocks.blockBloodLight); + world.setBlockState(blockPos.add(0, -1, 0), light); } - if (par7 == 1 && par3World.isAirBlock(par4, par5 + 1, par6)) + if (side.getIndex() == 1 && world.isAirBlock(blockPos.add(0, 1, 0))) { - par3World.setBlock(par4, par5 + 1, par6, ModBlocks.blockBloodLight); + world.setBlockState(blockPos.add(0, 1, 0), light); } - if (par7 == 2 && par3World.isAirBlock(par4, par5, par6 - 1)) + if (side.getIndex() == 2 && world.isAirBlock(blockPos.add(0, 0, -1))) { - par3World.setBlock(par4, par5, par6 - 1, ModBlocks.blockBloodLight); + world.setBlockState(blockPos.add(0, 0, -1), light); } - if (par7 == 3 && par3World.isAirBlock(par4, par5, par6 + 1)) + if (side.getIndex() == 3 && world.isAirBlock(blockPos.add(0, 0, 1))) { - par3World.setBlock(par4, par5, par6 + 1, ModBlocks.blockBloodLight); + world.setBlockState(blockPos.add(0, 0, 1), light); } - if (par7 == 4 && par3World.isAirBlock(par4 - 1, par5, par6)) + if (side.getIndex() == 4 && world.isAirBlock(blockPos.add(-1, 0, 0))) { - par3World.setBlock(par4 - 1, par5, par6, ModBlocks.blockBloodLight); + world.setBlockState(blockPos.add(-1, 0, 0), light); } - if (par7 == 5 && par3World.isAirBlock(par4 + 1, par5, par6)) + if (side.getIndex() == 5 && world.isAirBlock(blockPos.add(1, 0, 0))) { - par3World.setBlock(par4 + 1, par5, par6, ModBlocks.blockBloodLight); + world.setBlockState(blockPos.add(1, 0, 0), light); } return true; } @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + public ItemStack onItemRightClick(ItemStack itemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!BindableItems.checkAndSetItemOwner(itemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { - return par1ItemStack; + return itemStack; } - if (par1ItemStack.getTagCompound() == null) + if (itemStack.getTagCompound() == null) { - par1ItemStack.setTagCompound(new NBTTagCompound()); + itemStack.setTagCompound(new NBTTagCompound()); } - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed() * 5)) + if(!BindableItems.syphonBatteries(itemStack, par3EntityPlayer, getEnergyUsed() * 5)) { - return par1ItemStack; + return itemStack; } if (!par2World.isRemote) @@ -117,13 +109,13 @@ public class SigilBloodLight extends BindableItems implements IHolding, ArmourUp par2World.spawnEntityInWorld(new EntityBloodLightProjectile(par2World, par3EntityPlayer, 10)); } - return par1ItemStack; + return itemStack; } @Override public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) { - player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 400, 9, true)); + player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 400, 9, true, false)); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilPackRat.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilCompress.java similarity index 66% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilPackRat.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilCompress.java index 7303bfd6..49fa6114 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilPackRat.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilCompress.java @@ -3,36 +3,24 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.compress.CompressionRegistry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; import WayofTime.alchemicalWizardry.common.items.BindableItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -public class SigilPackRat extends BindableItems implements IHolding, ArmourUpgrade, ISigil +public class SigilCompress extends SigilToggleable implements IHolding, ArmourUpgrade, ISigil { - @SideOnly(Side.CLIENT) - private IIcon activeIcon; - @SideOnly(Side.CLIENT) - private IIcon passiveIcon; - - public SigilPackRat() + public SigilCompress() { super(); - this.maxStackSize = 1; setEnergyUsed(200); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -42,7 +30,7 @@ public class SigilPackRat extends BindableItems implements IHolding, ArmourUpgra if (!(par1ItemStack.getTagCompound() == null)) { - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -54,47 +42,6 @@ public class SigilPackRat extends BindableItems implements IHolding, ArmourUpgra } } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:CompressionSigil_deactivated"); - this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:CompressionSigil_activated"); - this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:CompressionSigil_deactivated"); - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) - { - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - if (tag.getBoolean("isActive")) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) - { - if (par1 == 1) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -109,9 +56,9 @@ public class SigilPackRat extends BindableItems implements IHolding, ArmourUpgra } NBTTagCompound tag = par1ItemStack.getTagCompound(); - tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); + this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - if (tag.getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); @@ -120,7 +67,7 @@ public class SigilPackRat extends BindableItems implements IHolding, ArmourUpgra { if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - tag.setBoolean("isActive", false); + this.setActivated(par1ItemStack, false); } } } else @@ -146,7 +93,7 @@ public class SigilPackRat extends BindableItems implements IHolding, ArmourUpgra par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { ItemStack stack = CompressionRegistry.compressInventory(par3EntityPlayer.inventory.mainInventory, par2World); if(stack != null) @@ -155,13 +102,13 @@ public class SigilPackRat extends BindableItems implements IHolding, ArmourUpgra par2World.spawnEntityInWorld(entityItem); } } - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) + if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) { if (!par3EntityPlayer.capabilities.isCreativeMode) { if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - par1ItemStack.getTagCompound().setBoolean("isActive", false); + this.setActivated(par1ItemStack, false); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilDivination.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilDivination.java index f713efd9..fdda6857 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilDivination.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilDivination.java @@ -4,18 +4,15 @@ import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumFacing; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; @@ -23,23 +20,12 @@ import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; import WayofTime.alchemicalWizardry.common.items.BindableItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -public class SigilDivination extends Item implements ArmourUpgrade, IReagentManipulator, IBindable, ISigil +public class SigilDivination extends BindableItems implements ArmourUpgrade, IReagentManipulator, IBindable, ISigil { public SigilDivination() { super(); - this.maxStackSize = 1; - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DivinationSigil"); } @Override @@ -89,11 +75,7 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - int x = movingobjectposition.blockX; - int y = movingobjectposition.blockY; - int z = movingobjectposition.blockZ; - - TileEntity tile = par2World.getTileEntity(x, y, z); + TileEntity tile = par2World.getTileEntity(movingobjectposition.func_178782_a()); if (!(tile instanceof IReagentHandler)) { @@ -104,7 +86,7 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani IReagentHandler relay = (IReagentHandler) tile; - ReagentContainerInfo[] infoList = relay.getContainerInfo(ForgeDirection.UNKNOWN); + ReagentContainerInfo[] infoList = relay.getContainerInfo(EnumFacing.DOWN); if (infoList != null) { for (ReagentContainerInfo info : infoList) @@ -122,10 +104,7 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani } @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) - { - } - + public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {} @Override public boolean isUpgrade() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilFluid.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilFluid.java index 8dbc8541..e15a5a4d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilFluid.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilFluid.java @@ -3,28 +3,22 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import WayofTime.alchemicalWizardry.common.items.BindableItems; import net.minecraft.block.Block; import net.minecraft.block.material.MaterialLiquid; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.StatCollector; +import net.minecraft.util.*; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.*; import java.util.ArrayList; import java.util.List; -public class SigilFluid extends Item implements IFluidContainerItem, ISigil +public class SigilFluid extends BindableItems implements IFluidContainerItem, ISigil { private int capacity = 128 * 1000; private static final int STATE_SYPHON = 0; @@ -39,8 +33,6 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil { super(); this.setMaxDamage(0); - this.setMaxStackSize(1); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -86,13 +78,6 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil } } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WaterSigil"); - } - @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -196,7 +181,6 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil } int range = 5; - float f = 1.0F; boolean flag = true; MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, flag); @@ -207,16 +191,12 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - int x = movingobjectposition.blockX; - int y = movingobjectposition.blockY; - int z = movingobjectposition.blockZ; - - if (!world.canMineBlock(player, x, y, z)) + if (!world.canMineBlockBody(player, movingobjectposition.func_178782_a())) { return container; } - if (!player.canPlayerEdit(x, y, z, movingobjectposition.sideHit, container)) + if (!player.func_175151_a(movingobjectposition.func_178782_a(), movingobjectposition.field_178784_b, container)) { return container; } @@ -234,7 +214,11 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil } } - List<Int3> positionList = new ArrayList(); + List<Int3> positionList = new ArrayList<Int3>(); + + int x = movingobjectposition.func_178782_a().getX(); + int y = movingobjectposition.func_178782_a().getY(); + int z = movingobjectposition.func_178782_a().getZ(); boolList[range][range][range] = true; positionList.add(new Int3(range, range, range)); @@ -254,7 +238,7 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil { if (i - 1 >= 0 && !boolList[i - 1][j][k]) { - Block block = world.getBlock(x - range + i - 1, y - range + j, z - range + k); + Block block = world.getBlockState(new BlockPos(x - range + i - 1, y - range + j, z - range + k)).getBlock(); Fluid fluid = FluidRegistry.lookupFluidForBlock(block); if (fluid != null) @@ -267,7 +251,7 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil if (j - 1 >= 0 && !boolList[i][j - 1][k]) { - Block block = world.getBlock(x - range + i, y - range + j - 1, z - range + k); + Block block = world.getBlockState(new BlockPos(x - range + i, y - range + j - 1, z - range + k)).getBlock(); Fluid fluid = FluidRegistry.lookupFluidForBlock(block); if (fluid != null) @@ -280,7 +264,7 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil if (k - 1 >= 0 && !boolList[i][j][k - 1]) { - Block block = world.getBlock(x - range + i, y - range + j, z - range + k - 1); + Block block = world.getBlockState(new BlockPos(x - range + i, y - range + j, z - range + k - 1)).getBlock(); Fluid fluid = FluidRegistry.lookupFluidForBlock(block); if (fluid != null) @@ -293,7 +277,7 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil if (i + 1 <= 2 * range && !boolList[i + 1][j][k]) { - Block block = world.getBlock(x - range + i + 1, y - range + j, z - range + k); + Block block = world.getBlockState(new BlockPos(x - range + i + 1, y - range + j, z - range + k)).getBlock(); Fluid fluid = FluidRegistry.lookupFluidForBlock(block); if (fluid != null) @@ -306,7 +290,7 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil if (j + 1 <= 2 * range && !boolList[i][j + 1][k]) { - Block block = world.getBlock(x - range + i, y - range + j + 1, z - range + k); + Block block = world.getBlockState(new BlockPos(x - range + i, y - range + j + 1, z - range + k)).getBlock(); Fluid fluid = FluidRegistry.lookupFluidForBlock(block); if (fluid != null) @@ -319,7 +303,7 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil if (k + 1 <= 2 * range && !boolList[i][j][k + 1]) { - Block block = world.getBlock(x - range + i, y - range + j, z - range + k + 1); + Block block = world.getBlockState(new BlockPos(x - range + i, y - range + j, z - range + k + 1)).getBlock(); Fluid fluid = FluidRegistry.lookupFluidForBlock(block); if (fluid != null) @@ -345,10 +329,10 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil { continue; } - if (world.getBlock(x + i - range, y + j - range, z + k - range) != null && world.getBlock(x + i - range, y + j - range, z + k - range).getMaterial() instanceof MaterialLiquid) + if (world.getBlockState(new BlockPos(x + i - range, y + j - range, z + k - range)).getBlock() != null && world.getBlockState(new BlockPos(x + i - range, y + j - range, z + k - range)).getBlock().getMaterial() instanceof MaterialLiquid) { //world.setBlockToAir(x+i-range, y+j-range, z+k-range); - Block block = world.getBlock(x + i - range, y + j - range, z + k - range); + Block block = world.getBlockState(new BlockPos(x + i - range, y + j - range, z + k - range)).getBlock(); if (block == null) { continue; @@ -358,7 +342,7 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil AlchemicalWizardry.logger.info("x: " + (i - range) + " y: " + (j - range) + " z: " + (k - range)); - if (fluid == null || world.getBlockMetadata(x + i - range, y + j - range, z + k - range) != 0) + if (fluid == null || world.getBlockState(new BlockPos(x + i - range, y + j - range, z + k - range)).getBlock().getMetaFromState(world.getBlockState(new BlockPos(x + i - range, y + j - range, z + k - range))) != 0) { continue; } @@ -371,8 +355,7 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil if ((amount > 0 && forceFill) || (amount >= 1000 && !forceFill)) { { - world.setBlockToAir(x + i - range, y + j - range, z + k - range); - + world.setBlockToAir(new BlockPos(x + i - range, y + j - range, z + k - range)); } this.fill(container, new FluidStack(fluid, 1000), true); @@ -387,7 +370,6 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil public ItemStack fillItemFromWorld(ItemStack container, World world, EntityPlayer player, boolean forceFill) { - float f = 1.0F; boolean flag = true; MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, flag); @@ -398,23 +380,19 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - int i = movingobjectposition.blockX; - int j = movingobjectposition.blockY; - int k = movingobjectposition.blockZ; - - if (!world.canMineBlock(player, i, j, k)) + if (!world.canMineBlockBody(player, movingobjectposition.func_178782_a())) { return container; } - if (!player.canPlayerEdit(i, j, k, movingobjectposition.sideHit, container)) + if (!player.func_175151_a(movingobjectposition.func_178782_a(), movingobjectposition.field_178784_b, container)) { return container; } - if (world.getBlock(i, j, k) != null && world.getBlock(i, j, k).getMaterial() instanceof MaterialLiquid) + if (world.getBlockState(movingobjectposition.func_178782_a()).getBlock() != null && world.getBlockState(movingobjectposition.func_178782_a()).getBlock().getMaterial() instanceof MaterialLiquid) { - Block block = world.getBlock(i, j, k); + Block block = world.getBlockState(movingobjectposition.func_178782_a()).getBlock(); Fluid fluid = FluidRegistry.lookupFluidForBlock(block); if (fluid == null) @@ -430,7 +408,7 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil { if (!player.capabilities.isCreativeMode) { - world.setBlockToAir(i, j, k); + world.setBlockToAir(movingobjectposition.func_178782_a()); } this.fill(container, new FluidStack(fluid, 1000), true); @@ -455,12 +433,6 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil if (simStack != null && simStack.amount >= 1000) { - Block fluidBlock = simStack.getFluid().getBlock(); - - float f = 1.0F; - double d0 = player.prevPosX + (player.posX - player.prevPosX) * (double) f; - double d1 = player.prevPosY + (player.posY - player.prevPosY) * (double) f + 1.62D - (double) player.yOffset; - double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f; boolean flag = false; MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, flag); @@ -471,57 +443,56 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - int i = movingobjectposition.blockX; - int j = movingobjectposition.blockY; - int k = movingobjectposition.blockZ; - - if (!world.canMineBlock(player, i, j, k)) + if (!world.canMineBlockBody(player, movingobjectposition.func_178782_a())) { return container; } + + int i = movingobjectposition.func_178782_a().getX(); + int j = movingobjectposition.func_178782_a().getY(); + int k = movingobjectposition.func_178782_a().getZ(); - if (movingobjectposition.sideHit == 0) + if (movingobjectposition.field_178784_b.getIndex() == 0) { --j; } - if (movingobjectposition.sideHit == 1) + if (movingobjectposition.field_178784_b.getIndex() == 1) { ++j; } - if (movingobjectposition.sideHit == 2) + if (movingobjectposition.field_178784_b.getIndex() == 2) { --k; } - if (movingobjectposition.sideHit == 3) + if (movingobjectposition.field_178784_b.getIndex() == 3) { ++k; } - if (movingobjectposition.sideHit == 4) + if (movingobjectposition.field_178784_b.getIndex() == 4) { --i; } - if (movingobjectposition.sideHit == 5) + if (movingobjectposition.field_178784_b.getIndex() == 5) { ++i; } - if (!player.canPlayerEdit(i, j, k, movingobjectposition.sideHit, container)) + if (!player.func_175151_a(new BlockPos(i, j, k), movingobjectposition.field_178784_b, container)) { return container; } - if (this.tryPlaceContainedLiquid(world, fluidBlock, d0, d1, d2, i, j, k) && !player.capabilities.isCreativeMode) + if (this.tryPlaceContainedLiquid(world, new BlockPos(i, j, k)) && !player.capabilities.isCreativeMode) { this.drain(container, 1000, true); return container; } - } return container; @@ -531,27 +502,28 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil return container; } - public boolean tryPlaceContainedLiquid(World par1World, Block block, double par2, double par4, double par6, int par8, int par9, int par10) + public boolean tryPlaceContainedLiquid(World world, BlockPos blockPos) { - if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlock(par8, par9, par10).func_149730_j()) + if (!world.isAirBlock(blockPos) && world.getBlockState(blockPos).getBlock().getMaterial().isSolid()) //TODO Was func_149730_j() so check this! { return false; - } else if ((par1World.getBlock(par8, par9, par10).getMaterial() instanceof MaterialLiquid && (par1World.getBlockMetadata(par8, par9, par10) == 0))) + } else if ((world.getBlockState(blockPos).getBlock().getMaterial() instanceof MaterialLiquid && world.getBlockState(blockPos).getBlock().getMetaFromState(world.getBlockState(blockPos)) == 0)) { return false; } else { - if ((block == Blocks.water || block == Blocks.flowing_water) && par1World.provider.isHellWorld) + Block block = world.getBlockState(blockPos).getBlock(); + if ((block == Blocks.water || block == Blocks.flowing_water) && world.provider.func_177500_n()) { - par1World.playSoundEffect(par2 + 0.5D, par4 + 0.5D, par6 + 0.5D, "random.fizz", 0.5F, 2.6F + (par1World.rand.nextFloat() - par1World.rand.nextFloat()) * 0.8F); + world.playSoundEffect(blockPos.getX() + 0.5D, blockPos.getY() + 0.5D, blockPos.getZ() + 0.5D, "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); for (int l = 0; l < 8; ++l) { - par1World.spawnParticle("largesmoke", (double) par8 + Math.random(), (double) par9 + Math.random(), (double) par10 + Math.random(), 0.0D, 0.0D, 0.0D); + world.spawnParticle(EnumParticleTypes.SMOKE_LARGE, (double) blockPos.getX() + Math.random(), (double) blockPos.getY() + Math.random(), (double) blockPos.getZ() + Math.random(), 0.0D, 0.0D, 0.0D); } } else { - par1World.setBlock(par8, par9, par10, block, 0, 3); + world.setBlockState(blockPos, block.getBlockState().getBaseState()); } return true; @@ -578,15 +550,11 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - int i = movingobjectposition.blockX; - int j = movingobjectposition.blockY; - int k = movingobjectposition.blockZ; - - TileEntity tile = world.getTileEntity(i, j, k); + TileEntity tile = world.getTileEntity(movingobjectposition.func_178782_a()); if (tile instanceof IFluidHandler) { - int amount = ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(movingobjectposition.sideHit), fluid, true); + int amount = ((IFluidHandler) tile).fill(movingobjectposition.field_178784_b, fluid, true); this.drain(container, amount, true); } @@ -609,21 +577,17 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - int i = movingobjectposition.blockX; - int j = movingobjectposition.blockY; - int k = movingobjectposition.blockZ; - - TileEntity tile = world.getTileEntity(i, j, k); + TileEntity tile = world.getTileEntity(movingobjectposition.func_178782_a()); if (tile instanceof IFluidHandler) { - FluidStack fluidAmount = ((IFluidHandler) tile).drain(ForgeDirection.getOrientation(movingobjectposition.sideHit), this.getCapacity(container), false); + FluidStack fluidAmount = ((IFluidHandler) tile).drain(movingobjectposition.field_178784_b, this.getCapacity(container), false); int amount = this.fill(container, fluidAmount, false); if (amount > 0) { - ((IFluidHandler) tile).drain(ForgeDirection.getOrientation(movingobjectposition.sideHit), this.getCapacity(container), true); + ((IFluidHandler) tile).drain(movingobjectposition.field_178784_b, this.getCapacity(container), true); this.fill(container, fluidAmount, true); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilHarvest.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilHarvest.java index 535c5ff4..3699f4c0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilHarvest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilHarvest.java @@ -3,35 +3,24 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; import WayofTime.alchemicalWizardry.common.items.BindableItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -public class SigilHarvest extends BindableItems implements IHolding, ArmourUpgrade, ISigil +public class SigilHarvest extends SigilToggleable implements IHolding, ArmourUpgrade, ISigil { - @SideOnly(Side.CLIENT) - private IIcon activeIcon; - @SideOnly(Side.CLIENT) - private IIcon passiveIcon; - public SigilHarvest() { super(); - this.maxStackSize = 1; setEnergyUsed(500); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -41,7 +30,7 @@ public class SigilHarvest extends BindableItems implements IHolding, ArmourUpgra if (!(par1ItemStack.getTagCompound() == null)) { - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -53,47 +42,6 @@ public class SigilHarvest extends BindableItems implements IHolding, ArmourUpgra } } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:HarvestGoddessSigil_deactivated"); - this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:HarvestGoddessSigil_activated"); - this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:HarvestGoddessSigil_deactivated"); - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) - { - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - if (tag.getBoolean("isActive")) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) - { - if (par1 == 1) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -108,9 +56,9 @@ public class SigilHarvest extends BindableItems implements IHolding, ArmourUpgra } NBTTagCompound tag = par1ItemStack.getTagCompound(); - tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); + this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - if (tag.getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); @@ -119,7 +67,7 @@ public class SigilHarvest extends BindableItems implements IHolding, ArmourUpgra { if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - tag.setBoolean("isActive", false); + this.setActivated(par1ItemStack, false); } } } else @@ -145,7 +93,7 @@ public class SigilHarvest extends BindableItems implements IHolding, ArmourUpgra par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { int range = 3; int verticalRange = 1; @@ -159,18 +107,18 @@ public class SigilHarvest extends BindableItems implements IHolding, ArmourUpgra { for (int iy = posY - verticalRange; iy <= posY + verticalRange; iy++) { - HarvestRegistry.harvestBlock(par2World, ix, iy, iz); + HarvestRegistry.harvestBlock(par2World, new BlockPos(ix, iy, iz)); } } } } - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) + if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) { if (!par3EntityPlayer.capabilities.isCreativeMode) { if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - par1ItemStack.getTagCompound().setBoolean("isActive", false); + this.setActivated(par1ItemStack, false); } } } @@ -195,7 +143,7 @@ public class SigilHarvest extends BindableItems implements IHolding, ArmourUpgra { for (int iy = posY - verticalRange; iy <= posY + verticalRange; iy++) { - HarvestRegistry.harvestBlock(world, ix, iy, iz); + HarvestRegistry.harvestBlock(world, new BlockPos(ix, iy, iz)); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilLava.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilLava.java index 0bdcef3a..58638712 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilLava.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilLava.java @@ -5,7 +5,6 @@ import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.inventory.IInventory; @@ -14,18 +13,16 @@ import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.common.items.Orb; import WayofTime.alchemicalWizardry.common.items.BindableItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil { @@ -38,16 +35,7 @@ public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil public SigilLava() { super(Blocks.lava); - this.maxStackSize = 1; setEnergyUsed(1000); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:LavaSigil"); } @Override @@ -80,27 +68,27 @@ public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil } @Override - public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) + public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ) { if (world.isRemote || !BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return false; } - if (!world.canMineBlock(player, x, y, z)) + if (!world.canMineBlockBody(player, blockPos)) { return false; } - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(blockPos); if (tile instanceof IFluidHandler) { FluidStack fluid = new FluidStack(FluidRegistry.LAVA, 1000); - int amount = ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(side), fluid, false); + int amount = ((IFluidHandler) tile).fill(side, fluid, false); if (amount > 0 && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) { - ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(side), fluid, true); + ((IFluidHandler) tile).fill(side, fluid, true); } return false; @@ -111,74 +99,79 @@ public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil } { - if (side == 0) + int x = blockPos.getX(); + int y = blockPos.getY(); + int z = blockPos.getZ(); + + if (side.getIndex() == 0) { --y; } - if (side == 1) + if (side.getIndex() == 1) { ++y; } - if (side == 2) + if (side.getIndex() == 2) { --z; } - if (side == 3) + if (side.getIndex() == 3) { ++z; } - if (side == 4) + if (side.getIndex() == 4) { --x; } - if (side == 5) + if (side.getIndex() == 5) { ++x; } - if (!player.canPlayerEdit(x, y, z, side, stack)) + if (!player.func_175151_a(new BlockPos(x, y, z), side, stack)) { return false; } - if(this.canPlaceContainedLiquid(world, x, y, z, x, y, z) && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) + if(this.canPlaceContainedLiquid(world, new BlockPos(x, y, z)) && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) { - return this.tryPlaceContainedLiquid(world, x, y, z, x, y, z); + return this.func_180616_a(world, new BlockPos(x, y, z)); } } return false; } + @Override /** * Attempts to place the liquid contained inside the bucket. */ - public boolean tryPlaceContainedLiquid(World par1World, double par2, double par4, double par6, int par8, int par9, int par10) + public boolean func_180616_a(World par1World, BlockPos blockPos) { - if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlock(par8, par9, par10).getMaterial().isSolid()) + if (!par1World.isAirBlock(blockPos) && par1World.getBlockState(blockPos).getBlock().getMaterial().isSolid()) { return false; - } else if ((par1World.getBlock(par8, par9, par10) == Blocks.lava || par1World.getBlock(par8, par9, par10) == Blocks.flowing_lava) && par1World.getBlockMetadata(par8, par9, par10) == 0) + } else if ((par1World.getBlockState(blockPos).getBlock() == Blocks.lava || par1World.getBlockState(blockPos).getBlock() == Blocks.flowing_lava) && par1World.getBlockState(blockPos).getBlock().getMetaFromState(par1World.getBlockState(blockPos)) == 0) { return false; } else { - par1World.setBlock(par8, par9, par10, this.isFull, 0, 3); + par1World.setBlockState(blockPos, this.isFull.getBlockState().getBaseState()); return true; } } - public boolean canPlaceContainedLiquid(World par1World, double par2, double par4, double par6, int par8, int par9, int par10) + public boolean canPlaceContainedLiquid(World par1World, BlockPos blockPos) { - if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlock(par8, par9, par10).getMaterial().isSolid()) + if (!par1World.isAirBlock(blockPos) && par1World.getBlockState(blockPos).getBlock().getMaterial().isSolid()) { return false; - } else if ((par1World.getBlock(par8, par9, par10) == Blocks.lava || par1World.getBlock(par8, par9, par10) == Blocks.flowing_lava) && par1World.getBlockMetadata(par8, par9, par10) == 0) + } else if ((par1World.getBlockState(blockPos).getBlock() == Blocks.lava || par1World.getBlockState(blockPos).getBlock() == Blocks.flowing_lava) && par1World.getBlockState(blockPos).getBlock().getMetaFromState(par1World.getBlockState(blockPos)) == 0) { return false; } else @@ -232,7 +225,7 @@ public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil @Override public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) { - player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 9, true)); + player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 9, true, false)); player.extinguish(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java index 770cb4ce..9882d773 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java @@ -1,36 +1,24 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; import WayofTime.alchemicalWizardry.common.items.BindableItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import java.util.List; -public class SigilOfElementalAffinity extends BindableItems implements ISigil +public class SigilOfElementalAffinity extends SigilToggleable implements ISigil { - @SideOnly(Side.CLIENT) - private IIcon activeIcon; - @SideOnly(Side.CLIENT) - private IIcon passiveIcon; - public SigilOfElementalAffinity() { super(); - this.maxStackSize = 1; setEnergyUsed(200); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -41,7 +29,7 @@ public class SigilOfElementalAffinity extends BindableItems implements ISigil if (!(par1ItemStack.getTagCompound() == null)) { - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -53,47 +41,6 @@ public class SigilOfElementalAffinity extends BindableItems implements ISigil } } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfTheFastMiner"); - this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:ElementalSigil_activated"); - this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:ElementalSigil_deactivated"); - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) - { - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - if (tag.getBoolean("isActive")) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) - { - if (par1 == 1) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -108,14 +55,14 @@ public class SigilOfElementalAffinity extends BindableItems implements ISigil } NBTTagCompound tag = par1ItemStack.getTagCompound(); - tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); + this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - if (tag.getBoolean("isActive") && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (this.getActivated(par1ItemStack) && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); - par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 0, true)); - par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 0, true)); + par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 0, true, false)); + par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 0, true, false)); } else { par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); @@ -139,20 +86,20 @@ public class SigilOfElementalAffinity extends BindableItems implements ISigil par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { par3EntityPlayer.fallDistance = 0; - par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 0, true)); - par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 0, true)); + par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 0, true, false)); + par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 0, true, false)); } - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) + if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) { if (!par3EntityPlayer.capabilities.isCreativeMode) { if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - par1ItemStack.getTagCompound().setBoolean("isActive", false); + this.setActivated(par1ItemStack, false); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfEnderSeverance.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfEnderSeverance.java index d8d262a0..ffd3e7a5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfEnderSeverance.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfEnderSeverance.java @@ -5,34 +5,23 @@ import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; import WayofTime.alchemicalWizardry.common.items.BindableItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import java.util.List; -public class SigilOfEnderSeverance extends BindableItems implements IHolding, ISigil +public class SigilOfEnderSeverance extends SigilToggleable implements IHolding, ISigil { - @SideOnly(Side.CLIENT) - private IIcon activeIcon; - @SideOnly(Side.CLIENT) - private IIcon passiveIcon; - public SigilOfEnderSeverance() { super(); - this.maxStackSize = 1; setEnergyUsed(200); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -42,7 +31,7 @@ public class SigilOfEnderSeverance extends BindableItems implements IHolding, IS if (!(par1ItemStack.getTagCompound() == null)) { - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -54,47 +43,6 @@ public class SigilOfEnderSeverance extends BindableItems implements IHolding, IS } } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfSeverance_deactivated"); - this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfSeverance_activated"); - this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfSeverance_deactivated"); - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) - { - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - if (tag.getBoolean("isActive")) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) - { - if (par1 == 1) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -109,9 +57,9 @@ public class SigilOfEnderSeverance extends BindableItems implements IHolding, IS } NBTTagCompound tag = par1ItemStack.getTagCompound(); - tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); + this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - if (tag.getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); @@ -120,7 +68,7 @@ public class SigilOfEnderSeverance extends BindableItems implements IHolding, IS { if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - tag.setBoolean("isActive", false); + this.setActivated(par1ItemStack, false); } } } else @@ -146,7 +94,7 @@ public class SigilOfEnderSeverance extends BindableItems implements IHolding, IS par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { List<Entity> list = SpellHelper.getEntitiesInRange(par2World, par3Entity.posX, par3Entity.posY, par3Entity.posZ, 4.5, 4.5); for (Entity entity : list) @@ -157,17 +105,15 @@ public class SigilOfEnderSeverance extends BindableItems implements IHolding, IS } } } - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) + if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) { if (!par3EntityPlayer.capabilities.isCreativeMode) { if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - par1ItemStack.getTagCompound().setBoolean("isActive", false); + this.setActivated(par1ItemStack, false); } } } - - return; } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java index d5687613..aefe2d9c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java @@ -1,43 +1,33 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; import WayofTime.alchemicalWizardry.common.items.BindableItems; -import cpw.mods.fml.common.eventhandler.Event.Result; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; import net.minecraft.block.IGrowable; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.IPlantable; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.player.BonemealEvent; - +import net.minecraftforge.fml.common.eventhandler.Event; import java.util.List; -public class SigilOfGrowth extends BindableItems implements ArmourUpgrade, ISigil +public class SigilOfGrowth extends SigilToggleable implements ArmourUpgrade, ISigil { - @SideOnly(Side.CLIENT) - private IIcon activeIcon; - @SideOnly(Side.CLIENT) - private IIcon passiveIcon; private int tickDelay = 100; public SigilOfGrowth() { super(); - this.maxStackSize = 1; setEnergyUsed(150); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -48,7 +38,7 @@ public class SigilOfGrowth extends BindableItems implements ArmourUpgrade, ISigi if (!(par1ItemStack.getTagCompound() == null)) { - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -61,58 +51,17 @@ public class SigilOfGrowth extends BindableItems implements ArmourUpgrade, ISigi } @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) + public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:GrowthSigil_deactivated"); - this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:GrowthSigil_activated"); - this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:GrowthSigil_deactivated"); - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) - { - if (stack.getTagCompound() == null) + if (BindableItems.checkAndSetItemOwner(stack, playerIn)) { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - if (tag.getBoolean("isActive")) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) - { - if (par1 == 1) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - - @Override - public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) - { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par2EntityPlayer)) - { - if (applyBonemeal(par1ItemStack, par3World, par4, par5, par6, par2EntityPlayer)) + if (applyBonemeal(stack, worldIn, pos, playerIn)) { - BindableItems.syphonBatteries(par1ItemStack, par2EntityPlayer, getEnergyUsed()); + BindableItems.syphonBatteries(stack, playerIn, getEnergyUsed()); - if (par3World.isRemote) + if (worldIn.isRemote) { - par3World.playAuxSFX(2005, par4, par5, par6, 0); + worldIn.playAuxSFX(2005, pos, 0); return true; } @@ -168,13 +117,13 @@ public class SigilOfGrowth extends BindableItems implements ArmourUpgrade, ISigi par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) { if(!BindableItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed())) { - par1ItemStack.getTagCompound().setBoolean("isActive", false); + this.setActivated(par1ItemStack, false); } } int range = 3; @@ -189,14 +138,13 @@ public class SigilOfGrowth extends BindableItems implements ArmourUpgrade, ISigi { for (int iy = posY - verticalRange; iy <= posY + verticalRange; iy++) { - Block block = par2World.getBlock(ix, iy, iz); - + IBlockState block = par2World.getBlockState(new BlockPos(ix, iy, iz)); if (block instanceof IPlantable || block instanceof IGrowable) { if (par2World.rand.nextInt(50) == 0) { - block.updateTick(par2World, ix, iy, iz, par2World.rand); + block.getBlock().updateTick(par2World, new BlockPos(ix, iy, iz), block, par2World.rand); } } } @@ -205,17 +153,17 @@ public class SigilOfGrowth extends BindableItems implements ArmourUpgrade, ISigi } } - public static boolean applyBonemeal(ItemStack p_150919_0_, World p_150919_1_, int p_150919_2_, int p_150919_3_, int p_150919_4_, EntityPlayer player) + public static boolean applyBonemeal(ItemStack p_179234_0_, World world, BlockPos blockPos, EntityPlayer player) { - Block block = p_150919_1_.getBlock(p_150919_2_, p_150919_3_, p_150919_4_); + IBlockState block = world.getBlockState(blockPos); - BonemealEvent event = new BonemealEvent(player, p_150919_1_, block, p_150919_2_, p_150919_3_, p_150919_4_); + BonemealEvent event = new BonemealEvent(player, world, blockPos, block); if (MinecraftForge.EVENT_BUS.post(event)) { return false; } - if (event.getResult() == Result.ALLOW) + if (event.getResult() == Event.Result.ALLOW) { return true; } @@ -224,16 +172,14 @@ public class SigilOfGrowth extends BindableItems implements ArmourUpgrade, ISigi { IGrowable igrowable = (IGrowable) block; - if (igrowable.func_149851_a(p_150919_1_, p_150919_2_, p_150919_3_, p_150919_4_, p_150919_1_.isRemote)) + if (igrowable.isStillGrowing(world, blockPos, block, world.isRemote)) { - if (!p_150919_1_.isRemote) + if (!world.isRemote) { - if (igrowable.func_149852_a(p_150919_1_, p_150919_1_.rand, p_150919_2_, p_150919_3_, p_150919_4_)) + if (igrowable.canUseBonemeal(world, world.rand, blockPos, block)) { - igrowable.func_149853_b(p_150919_1_, p_150919_1_.rand, p_150919_2_, p_150919_3_, p_150919_4_); + igrowable.grow(world, world.rand, blockPos, block); } - - } return true; @@ -263,13 +209,13 @@ public class SigilOfGrowth extends BindableItems implements ArmourUpgrade, ISigi { for (int iy = posY - verticalRange; iy <= posY + verticalRange; iy++) { - Block block = world.getBlock(ix, iy, iz); + IBlockState block = world.getBlockState(new BlockPos(ix, iy, iz)); if (block instanceof IPlantable) { if (world.rand.nextInt(100) == 0) { - block.updateTick(world, ix, iy, iz, world.rand); + block.getBlock().updateTick(world, new BlockPos(ix, iy, iz), block, world.rand); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java index ed103ecf..8ed6ece0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java @@ -4,33 +4,22 @@ import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; import WayofTime.alchemicalWizardry.common.items.BindableItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import java.util.List; -public class SigilOfHaste extends BindableItems implements ArmourUpgrade, ISigil +public class SigilOfHaste extends SigilToggleable implements ArmourUpgrade, ISigil { - @SideOnly(Side.CLIENT) - private IIcon activeIcon; - @SideOnly(Side.CLIENT) - private IIcon passiveIcon; - public SigilOfHaste() { super(); - this.maxStackSize = 1; setEnergyUsed(250); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -40,7 +29,7 @@ public class SigilOfHaste extends BindableItems implements ArmourUpgrade, ISigil if (!(par1ItemStack.getTagCompound() == null)) { - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -52,47 +41,6 @@ public class SigilOfHaste extends BindableItems implements ArmourUpgrade, ISigil } } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:HasteSigil_deactivated"); - this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:HasteSigil_activated"); - this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:HasteSigil_deactivated"); - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) - { - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - if (tag.getBoolean("isActive")) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) - { - if (par1 == 1) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -107,9 +55,9 @@ public class SigilOfHaste extends BindableItems implements ArmourUpgrade, ISigil } NBTTagCompound tag = par1ItemStack.getTagCompound(); - tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); + this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - if (tag.getBoolean("isActive") && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (this.getActivated(par1ItemStack) && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); @@ -137,18 +85,18 @@ public class SigilOfHaste extends BindableItems implements ArmourUpgrade, ISigil par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { - par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionBoost.id, 3, 1)); + par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionBoost.id, 3, 1, true, false)); } - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) + if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) { if (!par3EntityPlayer.capabilities.isCreativeMode) { if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - par1ItemStack.getTagCompound().setBoolean("isActive", false); + this.setActivated(par1ItemStack, false); } } } @@ -162,7 +110,7 @@ public class SigilOfHaste extends BindableItems implements ArmourUpgrade, ISigil itemStack.setTagCompound(new NBTTagCompound()); } - player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionBoost.id, 3, 1, true)); + player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionBoost.id, 3, 1, true, false)); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java index 1d7346b7..737a6079 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java @@ -3,7 +3,6 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityXPOrb; @@ -11,30 +10,20 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; import WayofTime.alchemicalWizardry.common.items.BindableItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -public class SigilOfMagnetism extends BindableItems implements ArmourUpgrade, IHolding, ISigil +public class SigilOfMagnetism extends SigilToggleable implements ArmourUpgrade, IHolding, ISigil { - @SideOnly(Side.CLIENT) - private IIcon activeIcon; - @SideOnly(Side.CLIENT) - private IIcon passiveIcon; private int tickDelay = 300; public SigilOfMagnetism() { super(); - this.maxStackSize = 1; setEnergyUsed(50); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -44,7 +33,7 @@ public class SigilOfMagnetism extends BindableItems implements ArmourUpgrade, IH if (!(par1ItemStack.getTagCompound() == null)) { - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -56,47 +45,6 @@ public class SigilOfMagnetism extends BindableItems implements ArmourUpgrade, IH } } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfMagnetism_deactivated"); - this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfMagnetism_activated"); - this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfMagnetism_deactivated"); - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) - { - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - if (tag.getBoolean("isActive")) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) - { - if (par1 == 1) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -111,9 +59,9 @@ public class SigilOfMagnetism extends BindableItems implements ArmourUpgrade, IH } NBTTagCompound tag = par1ItemStack.getTagCompound(); - tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); + this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - if (tag.getBoolean("isActive") && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (this.getActivated(par1ItemStack) && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay); @@ -140,13 +88,13 @@ public class SigilOfMagnetism extends BindableItems implements ArmourUpgrade, IH par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) { if(!BindableItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed())) { - par1ItemStack.getTagCompound().setBoolean("isActive", false); + this.setActivated(par1ItemStack, false); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfSupression.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfSupression.java index 8506987a..24865997 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfSupression.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfSupression.java @@ -1,42 +1,32 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; import WayofTime.alchemicalWizardry.common.items.BindableItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; import net.minecraft.util.StatCollector; import net.minecraft.util.Vec3; import net.minecraft.world.World; import java.util.List; -public class SigilOfSupression extends BindableItems implements ArmourUpgrade, ISigil +public class SigilOfSupression extends SigilToggleable implements ArmourUpgrade, ISigil { - @SideOnly(Side.CLIENT) - private IIcon activeIcon; - @SideOnly(Side.CLIENT) - private IIcon passiveIcon; private int radius = 5; private int refresh = 100; public SigilOfSupression() { super(); - this.maxStackSize = 1; setEnergyUsed(400); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -46,7 +36,7 @@ public class SigilOfSupression extends BindableItems implements ArmourUpgrade, I if (!(par1ItemStack.getTagCompound() == null)) { - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -58,47 +48,6 @@ public class SigilOfSupression extends BindableItems implements ArmourUpgrade, I } } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfSupression_deactivated"); - activeIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfSupression_activated"); - passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfSupression_deactivated"); - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) - { - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - if (tag.getBoolean("isActive")) - { - return activeIcon; - } else - { - return passiveIcon; - } - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) - { - if (par1 == 1) - { - return activeIcon; - } else - { - return passiveIcon; - } - } - @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -120,9 +69,9 @@ public class SigilOfSupression extends BindableItems implements ArmourUpgrade, I } NBTTagCompound tag = par1ItemStack.getTagCompound(); - tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); + this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - if (tag.getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay); @@ -131,7 +80,7 @@ public class SigilOfSupression extends BindableItems implements ArmourUpgrade, I { if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - tag.setBoolean("isActive", false); + this.setActivated(par1ItemStack, false); } } } else @@ -162,9 +111,9 @@ public class SigilOfSupression extends BindableItems implements ArmourUpgrade, I par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (par1ItemStack.getTagCompound().getBoolean("isActive") && (!par2World.isRemote)) + if (this.getActivated(par1ItemStack) && (!par2World.isRemote)) { - Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer); + Vec3 blockVec = new Vec3((int) Math.round(par3EntityPlayer.posX - 0.5F), par3EntityPlayer.posY, (int) Math.round(par3EntityPlayer.posZ - 0.5F)); int x = (int) blockVec.xCoord; int y = (int) blockVec.yCoord; int z = (int) blockVec.zCoord; @@ -180,18 +129,19 @@ public class SigilOfSupression extends BindableItems implements ArmourUpgrade, I continue; } - Block block = par2World.getBlock(x + i, y + j, z + k); + BlockPos blockPos = new BlockPos(x + i, y + j, z + k); + IBlockState block = par2World.getBlockState(blockPos); - if (SpellHelper.isBlockFluid(block)) + if (SpellHelper.isBlockFluid(block.getBlock())) { - if (par2World.getTileEntity(x + i, y + j, z + k) != null) + if (par2World.getTileEntity(blockPos) != null) { - par2World.setBlockToAir(x + i, y + j, z + k); + par2World.setBlockToAir(blockPos); } - TESpectralContainer.createSpectralBlockAtLocation(par2World, x + i, y + j, z + k, refresh); + TESpectralContainer.createSpectralBlockAtLocation(par2World, blockPos, refresh); } else { - TileEntity tile = par2World.getTileEntity(x + i, y + j, z + k); + TileEntity tile = par2World.getTileEntity(blockPos); if (tile instanceof TESpectralContainer) { ((TESpectralContainer) tile).resetDuration(refresh); @@ -202,13 +152,13 @@ public class SigilOfSupression extends BindableItems implements ArmourUpgrade, I } } - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) + if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) { if (!par3EntityPlayer.capabilities.isCreativeMode) { if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - par1ItemStack.getTagCompound().setBoolean("isActive", false); + this.setActivated(par1ItemStack, false); } } } @@ -217,7 +167,7 @@ public class SigilOfSupression extends BindableItems implements ArmourUpgrade, I @Override public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) { - Vec3 blockVec = SpellHelper.getEntityBlockVector(player); + Vec3 blockVec = new Vec3((int) Math.round(player.posX - 0.5F), player.posY, (int) Math.round(player.posZ - 0.5F)); int x = (int) blockVec.xCoord; int y = (int) blockVec.yCoord; int z = (int) blockVec.zCoord; @@ -233,19 +183,19 @@ public class SigilOfSupression extends BindableItems implements ArmourUpgrade, I continue; } - Block block = world.getBlock(x + i, y + j, z + k); + BlockPos blockPos = new BlockPos(x + i, y + j, z + k); + IBlockState block = world.getBlockState(blockPos); - - if (SpellHelper.isBlockFluid(block)) + if (SpellHelper.isBlockFluid(block.getBlock())) { - if (world.getTileEntity(x + i, y + j, z + k) != null) + if (world.getTileEntity(blockPos) != null) { - world.setBlockToAir(x + i, y + j, z + k); + world.setBlockToAir(blockPos); } - TESpectralContainer.createSpectralBlockAtLocation(world, x + i, y + j, z + k, refresh); + TESpectralContainer.createSpectralBlockAtLocation(world, blockPos, refresh); } else { - TileEntity tile = world.getTileEntity(x + i, y + j, z + k); + TileEntity tile = world.getTileEntity(blockPos); if (tile instanceof TESpectralContainer) { ((TESpectralContainer) tile).resetDuration(refresh); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheAssassin.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheAssassin.java index c2361c91..7397efec 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheAssassin.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheAssassin.java @@ -3,20 +3,15 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.StatCollector; -import net.minecraft.util.Vec3; +import net.minecraft.util.*; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.EnderTeleportEvent; @@ -25,17 +20,13 @@ import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.common.items.BindableItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, ISigil { public SigilOfTheAssassin() { super(); - this.maxStackSize = 1; setEnergyUsed(100); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -47,13 +38,6 @@ public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, } } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WaterSigil"); - } - @Override public ItemStack getContainerItem(ItemStack itemStack) { @@ -74,6 +58,7 @@ public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, } } + @Override /** * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer */ @@ -83,8 +68,6 @@ public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, { return par1ItemStack; } - - float f = 10.0F; @@ -108,7 +91,6 @@ public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, if(hitEntity instanceof EntityLivingBase) { AlchemicalWizardry.logger.info("It's a living entity!"); - teleportTo(par3EntityPlayer, x, y, z, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ); } @@ -135,17 +117,18 @@ public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, int i = MathHelper.floor_double(entityLiving.posX); int j = MathHelper.floor_double(entityLiving.posY); int k = MathHelper.floor_double(entityLiving.posZ); - Block l; + BlockPos blockPos = new BlockPos(i, j, k); + IBlockState l; - if (entityLiving.worldObj.blockExists(i, j, k)) + if (!entityLiving.worldObj.isAirBlock(blockPos)) { boolean flag1 = false; while (!flag1 && j > 0) { - l = entityLiving.worldObj.getBlock(i, j - 1, k); + l = entityLiving.worldObj.getBlockState(blockPos); - if (l != null && l.getMaterial().blocksMovement()) + if (l != null && l.getBlock().getMaterial().blocksMovement()) { flag1 = true; } else @@ -159,7 +142,7 @@ public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, { SpellTeleport.moveEntityViaTeleport(entityLiving, entityLiving.posX, entityLiving.posY, entityLiving.posZ); - if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.boundingBox)) + if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.getBoundingBox()).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.getBoundingBox())) { flag = true; } @@ -183,7 +166,7 @@ public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, double d7 = d3 + (entityLiving.posX - d3) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; double d8 = d4 + (entityLiving.posY - d4) * d6 + entityLiving.worldObj.rand.nextDouble() * (double) entityLiving.height; double d9 = d5 + (entityLiving.posZ - d5) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; - entityLiving.worldObj.spawnParticle("portal", d7, d8, d9, (double) f, (double) f1, (double) f2); + entityLiving.worldObj.spawnParticle(EnumParticleTypes.PORTAL, d7, d8, d9, (double) f, (double) f1, (double) f2); } return true; } @@ -197,7 +180,7 @@ public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, double d0 = p_77621_2_.prevPosX + (p_77621_2_.posX - p_77621_2_.prevPosX) * (double)f; double d1 = p_77621_2_.prevPosY + (p_77621_2_.posY - p_77621_2_.prevPosY) * (double)f + (double)(p_77621_1_.isRemote ? p_77621_2_.getEyeHeight() - p_77621_2_.getDefaultEyeHeight() : p_77621_2_.getEyeHeight()); // isRemote check to revert changes to ray trace position due to adding the eye height clientside and player yOffset differences double d2 = p_77621_2_.prevPosZ + (p_77621_2_.posZ - p_77621_2_.prevPosZ) * (double)f; - Vec3 vec3 = SpellHelper.createVec3(d0, d1, d2); + Vec3 vec3 = new Vec3(d0, d1, d2); float f3 = MathHelper.cos(-f2 * 0.017453292F - (float)Math.PI); float f4 = MathHelper.sin(-f2 * 0.017453292F - (float)Math.PI); float f5 = -MathHelper.cos(-f1 * 0.017453292F); @@ -205,12 +188,12 @@ public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, float f7 = f4 * f5; float f8 = f3 * f5; double d3 = 500.0D; - if (p_77621_2_ instanceof EntityPlayerMP) +// if (p_77621_2_ instanceof EntityPlayerMP) { // d3 = ((EntityPlayerMP)p_77621_2_).theItemInWorldManager.getBlockReachDistance(); } Vec3 vec31 = vec3.addVector((double)f7 * d3, (double)f6 * d3, (double)f8 * d3); - return p_77621_1_.func_147447_a(vec3, vec31, p_77621_3_, !p_77621_3_, false); + return p_77621_1_.rayTraceBlocks(vec3, vec31, p_77621_3_, !p_77621_3_, false); } // public MovingObjectPosition movingObjectPositiongdsa(WOrld worldObj, int posX, int posY, int posZ) @@ -269,7 +252,7 @@ public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, @Override public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) { - player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 9, true)); + player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 9, true, false)); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java index facb1c68..6b174bcf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java @@ -1,40 +1,30 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; import WayofTime.alchemicalWizardry.common.items.BindableItems; import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import java.util.List; -public class SigilOfTheBridge extends BindableItems implements ArmourUpgrade, ISigil +public class SigilOfTheBridge extends SigilToggleable implements ArmourUpgrade, ISigil { - @SideOnly(Side.CLIENT) - private IIcon activeIcon; - @SideOnly(Side.CLIENT) - private IIcon passiveIcon; private int tickDelay = 200; public SigilOfTheBridge() { super(); - this.maxStackSize = 1; setEnergyUsed(100); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -45,7 +35,7 @@ public class SigilOfTheBridge extends BindableItems implements ArmourUpgrade, IS if (!(par1ItemStack.getTagCompound() == null)) { - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -57,47 +47,6 @@ public class SigilOfTheBridge extends BindableItems implements ArmourUpgrade, IS } } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BridgeSigil_deactivated"); - this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:BridgeSigil_activated"); - this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:BridgeSigil_deactivated"); - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) - { - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - if (tag.getBoolean("isActive")) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) - { - if (par1 == 1) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -112,9 +61,9 @@ public class SigilOfTheBridge extends BindableItems implements ArmourUpgrade, IS } NBTTagCompound tag = par1ItemStack.getTagCompound(); - tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); + this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - if (tag.getBoolean("isActive") && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (this.getActivated(par1ItemStack) && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay); @@ -141,7 +90,7 @@ public class SigilOfTheBridge extends BindableItems implements ArmourUpgrade, IS par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) { @@ -150,7 +99,7 @@ public class SigilOfTheBridge extends BindableItems implements ArmourUpgrade, IS this.setLPUsed(par1ItemStack, 0); }else { - par1ItemStack.getTagCompound().setBoolean("isActive", false); + this.setActivated(par1ItemStack, false); } } if (!par3EntityPlayer.onGround && !par3EntityPlayer.isSneaking()) @@ -181,13 +130,13 @@ public class SigilOfTheBridge extends BindableItems implements ArmourUpgrade, IS for (int iz = posZ - range; iz <= posZ + range; iz++) { { - Block block = par2World.getBlock(ix, posY + verticalOffset, iz); + IBlockState block = par2World.getBlockState(new BlockPos(ix, posY + verticalOffset, iz)); - if (par2World.isAirBlock(ix, posY + verticalOffset, iz)) + if (par2World.isAirBlock(new BlockPos(ix, posY + verticalOffset, iz))) { - par2World.setBlock(ix, posY + verticalOffset, iz, ModBlocks.spectralBlock, 0, 3); + par2World.setBlockState(new BlockPos(ix, posY + verticalOffset, iz), ModBlocks.spectralBlock.getDefaultState(), 3); - TileEntity tile = par2World.getTileEntity(ix, posY + verticalOffset, iz); + TileEntity tile = par2World.getTileEntity(new BlockPos(ix, posY + verticalOffset, iz)); if (tile instanceof TESpectralBlock) { ((TESpectralBlock) tile).setDuration(100); @@ -199,7 +148,7 @@ public class SigilOfTheBridge extends BindableItems implements ArmourUpgrade, IS } } else if (block == ModBlocks.spectralBlock) { - TileEntity tile = par2World.getTileEntity(ix, posY + verticalOffset, iz); + TileEntity tile = par2World.getTileEntity(new BlockPos(ix, posY + verticalOffset, iz)); if (tile instanceof TESpectralBlock) { ((TESpectralBlock) tile).setDuration(100); @@ -266,20 +215,20 @@ public class SigilOfTheBridge extends BindableItems implements ArmourUpgrade, IS { for (int iz = posZ - range; iz <= posZ + range; iz++) { - Block block = world.getBlock(ix, posY + verticalOffset, iz); + IBlockState block = world.getBlockState(new BlockPos(ix, posY + verticalOffset, iz)); - if (world.isAirBlock(ix, posY + verticalOffset, iz)) + if (world.isAirBlock(new BlockPos(ix, posY + verticalOffset, iz))) { - world.setBlock(ix, posY + verticalOffset, iz, ModBlocks.spectralBlock, 0, 3); + world.setBlockState(new BlockPos(ix, posY + verticalOffset, iz), ModBlocks.spectralBlock.getDefaultState(), 3); - TileEntity tile = world.getTileEntity(ix, posY + verticalOffset, iz); + TileEntity tile = world.getTileEntity(new BlockPos(ix, posY + verticalOffset, iz)); if (tile instanceof TESpectralBlock) { ((TESpectralBlock) tile).setDuration(100); } } else if (block == ModBlocks.spectralBlock) { - TileEntity tile = world.getTileEntity(ix, posY + verticalOffset, iz); + TileEntity tile = world.getTileEntity(new BlockPos(ix, posY + verticalOffset, iz)); if (tile instanceof TESpectralBlock) { ((TESpectralBlock) tile).setDuration(100); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java index f4054fbc..bde22ef7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java @@ -1,37 +1,25 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; import WayofTime.alchemicalWizardry.common.items.BindableItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import java.util.List; -public class SigilOfTheFastMiner extends BindableItems implements ArmourUpgrade, ISigil +public class SigilOfTheFastMiner extends SigilToggleable implements ArmourUpgrade, ISigil { - @SideOnly(Side.CLIENT) - private IIcon activeIcon; - @SideOnly(Side.CLIENT) - private IIcon passiveIcon; - public SigilOfTheFastMiner() { super(); - this.maxStackSize = 1; setEnergyUsed(100); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -41,7 +29,7 @@ public class SigilOfTheFastMiner extends BindableItems implements ArmourUpgrade, if (!(par1ItemStack.getTagCompound() == null)) { - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -53,47 +41,6 @@ public class SigilOfTheFastMiner extends BindableItems implements ArmourUpgrade, } } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:MiningSigil_deactivated"); - this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:MiningSigil_activated"); - this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:MiningSigil_deactivated"); - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) - { - if (stack.getTagCompound() == null) - { - stack.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound tag = stack.getTagCompound(); - - if (tag.getBoolean("isActive")) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) - { - if (par1 == 1) - { - return this.activeIcon; - } else - { - return this.passiveIcon; - } - } - @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -108,13 +55,13 @@ public class SigilOfTheFastMiner extends BindableItems implements ArmourUpgrade, } NBTTagCompound tag = par1ItemStack.getTagCompound(); - tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); + this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); - if (tag.getBoolean("isActive") && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (this.getActivated(par1ItemStack) && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); - par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2, 1, true)); + par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2, 1)); } else { par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); @@ -138,18 +85,18 @@ public class SigilOfTheFastMiner extends BindableItems implements ArmourUpgrade, par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { - par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2, 1, true)); + par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2, 1, true, false)); } - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) + if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) { if (!par3EntityPlayer.capabilities.isCreativeMode) { if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - par1ItemStack.getTagCompound().setBoolean("isActive", false); + this.setActivated(par1ItemStack, false); } } } @@ -163,7 +110,7 @@ public class SigilOfTheFastMiner extends BindableItems implements ArmourUpgrade, itemStack.setTagCompound(new NBTTagCompound()); } - player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 3, 1, true)); + player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 3, 1, true, false)); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java index aee7a0ba..84b21315 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java @@ -19,9 +19,7 @@ public class SigilOfWind extends SigilToggleable implements ArmourUpgrade, ISigi public SigilOfWind() { super(); - this.maxStackSize = 1; setEnergyUsed(250); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -87,9 +85,9 @@ public class SigilOfWind extends SigilToggleable implements ArmourUpgrade, ISigi par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (par1ItemStack.getTagCompound().getBoolean("isActive")) + if (this.getActivated(par1ItemStack)) { - par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 2, 1)); + par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 2, 1, true, false)); } if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) @@ -112,7 +110,7 @@ public class SigilOfWind extends SigilToggleable implements ArmourUpgrade, ISigi itemStack.setTagCompound(new NBTTagCompound()); } - player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 3, 1)); + player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 3, 1, true, false)); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilSeer.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilSeer.java index 22261ae0..66dd0fd4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilSeer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilSeer.java @@ -1,13 +1,9 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; import WayofTime.alchemicalWizardry.common.items.BindableItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -22,15 +18,7 @@ public class SigilSeer extends Item implements IHolding, ArmourUpgrade, ISigil public SigilSeer() { super(); - this.maxStackSize = 1; - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SeerSigil"); + setMaxStackSize(1); } @Override @@ -63,10 +51,7 @@ public class SigilSeer extends Item implements IHolding, ArmourUpgrade, ISigil } @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) - { - } - + public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {} @Override public boolean isUpgrade() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilVoid.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilVoid.java index a3238858..2d9aee04 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilVoid.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilVoid.java @@ -3,42 +3,28 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBucket; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.common.items.BindableItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class SigilVoid extends ItemBucket implements ArmourUpgrade, ISigil { - private int isFull; private int energyUsed; public SigilVoid() { super(null); - this.maxStackSize = 1; setEnergyUsed(50); - isFull = 0; - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:VoidSigil"); } @Override @@ -77,72 +63,74 @@ public class SigilVoid extends ItemBucket implements ArmourUpgrade, ISigil } @Override - public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) + public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ) { if (world.isRemote || !BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return false; } - float f = 1.0F; - - if (!world.canMineBlock(player, x, y, z)) + if (!world.canMineBlockBody(player, blockPos)) { return false; } - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(blockPos); if (tile instanceof IFluidHandler) { - FluidStack amount = ((IFluidHandler) tile).drain(ForgeDirection.getOrientation(side), 1000, false); + FluidStack amount = ((IFluidHandler) tile).drain(side, 1000, false); if (amount != null && amount.amount > 0 && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) { - ((IFluidHandler) tile).drain(ForgeDirection.getOrientation(side), 1000, true); + ((IFluidHandler) tile).drain(side, 1000, true); return true; } return false; } - if (side == 0) + int x = blockPos.getX(); + int y = blockPos.getY(); + int z = blockPos.getZ(); + + if (side.getIndex() == 0) { --y; } - if (side == 1) + if (side.getIndex() == 1) { ++y; } - if (side == 2) + if (side.getIndex() == 2) { --z; } - if (side == 3) + if (side.getIndex() == 3) { ++z; } - if (side == 4) + if (side.getIndex() == 4) { --x; } - if (side == 5) + if (side.getIndex() == 5) { ++x; } - if (!player.canPlayerEdit(x, y, z, side, stack)) + if (!player.func_175151_a(new BlockPos(x, y, z), side, stack)) //was canPlayerEdit { return false; } - if (SpellHelper.isBlockFluid(world.getBlock(x, y, z)) && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) + if (SpellHelper.isBlockFluid(world.getBlockState(new BlockPos(x, y, z)).getBlock()) && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) { - world.setBlockToAir(x, y, z); + world.setBlockToAir(new BlockPos(x, y, z)); return true; } @@ -150,18 +138,17 @@ public class SigilVoid extends ItemBucket implements ArmourUpgrade, ISigil return false; } + @Override /** * Attempts to place the liquid contained inside the bucket. */ - public boolean tryPlaceContainedLiquid(World par1World, double par2, double par4, double par6, int par8, int par9, int par10) + public boolean func_180616_a(World world, BlockPos blockPos) //was tryPlaceContainedLiquid { return false; } @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) - { - } + public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {} @Override public boolean isUpgrade() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilWater.java index 02d5db2b..4bf58364 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilWater.java @@ -5,7 +5,7 @@ import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemBucket; @@ -14,17 +14,16 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.common.items.BindableItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil { @@ -34,9 +33,7 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil public SigilWater() { super(Blocks.water); - this.maxStackSize = 1; setEnergyUsed(100); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -48,13 +45,6 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil } } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WaterSigil"); - } - @Override public ItemStack getContainerItem(ItemStack itemStack) { @@ -72,6 +62,7 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil } } + @Override /** * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer */ @@ -81,27 +72,27 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil } @Override - public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) + public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ) { if (world.isRemote || !BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return false; } - if (!world.canMineBlock(player, x, y, z)) + if (!world.canMineBlockBody(player, blockPos)) { return false; } - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(blockPos); if (tile instanceof IFluidHandler) { FluidStack fluid = new FluidStack(FluidRegistry.WATER, 1000); - int amount = ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(side), fluid, false); + int amount = ((IFluidHandler) tile).fill(side, fluid, false); if (amount > 0 && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) { - ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(side), fluid, true); + ((IFluidHandler) tile).fill(side, fluid, true); } return false; @@ -111,48 +102,50 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil return false; } + int x = blockPos.getX(); + int y = blockPos.getY(); + int z = blockPos.getZ(); { - if (side == 0) + if (side.getIndex() == 0) { --y; } - if (side == 1) + if (side.getIndex() == 1) { ++y; } - if (side == 2) + if (side.getIndex() == 2) { --z; } - if (side == 3) + if (side.getIndex() == 3) { ++z; } - if (side == 4) + if (side.getIndex() == 4) { --x; } - if (side == 5) + if (side.getIndex() == 5) { ++x; } - if (!player.canPlayerEdit(x, y, z, side, stack)) + if (!player.func_175151_a(new BlockPos(x, y, z), side, stack)) // was canPlayerEdit { return false; } - if(this.canPlaceContainedLiquid(world, x, y, z, x, y, z) && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) + if(this.canPlaceContainedLiquid(world, new BlockPos(x, y, z)) && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) { - return this.tryPlaceContainedLiquid(world, x, y, z, x, y, z); + return this.func_180616_a(world, new BlockPos(x, y, z)); } } - return false; @@ -161,40 +154,56 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil /** * Attempts to place the liquid contained inside the bucket. */ - public boolean tryPlaceContainedLiquid(World par1World, double par2, double par4, double par6, int par8, int par9, int par10) + public boolean func_180616_a(World world, BlockPos blockPos) //was tryPlaceContainedLiquid { - if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlock(par8, par9, par10).getMaterial().isSolid()) + if (this.isFull == Blocks.air) { return false; - } else if ((par1World.getBlock(par8, par9, par10) == Blocks.water || par1World.getBlock(par8, par9, par10) == Blocks.flowing_water) && par1World.getBlockMetadata(par8, par9, par10) == 0) + } + else { - return false; - } else - { - if (par1World.provider.isHellWorld) - { - par1World.playSoundEffect(par2 + 0.5D, par4 + 0.5D, par6 + 0.5D, "random.fizz", 0.5F, 2.6F + (par1World.rand.nextFloat() - par1World.rand.nextFloat()) * 0.8F); + Material material = world.getBlockState(blockPos).getBlock().getMaterial(); + boolean flag = !material.isSolid(); - for (int l = 0; l < 8; ++l) - { - par1World.spawnParticle("largesmoke", (double) par8 + Math.random(), (double) par9 + Math.random(), (double) par10 + Math.random(), 0.0D, 0.0D, 0.0D); - } - } else + if (!world.isAirBlock(blockPos) && !flag) { - par1World.setBlock(par8, par9, par10, this.isFull, 0, 3); - par1World.markBlockForUpdate(par8, par9, par10); + return false; } + else + { + if (world.provider.func_177500_n() && this.isFull == Blocks.flowing_water) + { + int i = blockPos.getX(); + int j = blockPos.getY(); + int k = blockPos.getZ(); + world.playSoundEffect((double)((float)i + 0.5F), (double)((float)j + 0.5F), (double)((float)k + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - return true; + for (int l = 0; l < 8; ++l) + { + world.spawnParticle(EnumParticleTypes.SMOKE_LARGE, (double)i + Math.random(), (double)j + Math.random(), (double)k + Math.random(), 0.0D, 0.0D, 0.0D, 0); + } + } + else + { + if (!world.isRemote && flag && !material.isLiquid()) + { + world.destroyBlock(blockPos, true); + } + + world.setBlockState(blockPos, this.isFull.getDefaultState(), 3); + } + + return true; + } } } - public boolean canPlaceContainedLiquid(World par1World, double par2, double par4, double par6, int par8, int par9, int par10) + public boolean canPlaceContainedLiquid(World world, BlockPos blockPos) { - if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlock(par8, par9, par10).getMaterial().isSolid()) + if (!world.isAirBlock(blockPos) && world.getBlockState(blockPos).getBlock().getMaterial().isSolid()) { return false; - } else if ((par1World.getBlock(par8, par9, par10) == Blocks.water || par1World.getBlock(par8, par9, par10) == Blocks.flowing_water) && par1World.getBlockMetadata(par8, par9, par10) == 0) + } else if ((world.getBlockState(blockPos).getBlock() == Blocks.water || world.getBlockState(blockPos).getBlock() == Blocks.flowing_water) && world.getBlockState(blockPos).getBlock().getMetaFromState(world.getBlockState(blockPos)) == 0) { return false; } else @@ -216,7 +225,7 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil @Override public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) { - player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 9, true)); + player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 9)); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java index 6f038c94..e0eeaecb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java @@ -17,15 +17,14 @@ import WayofTime.alchemicalWizardry.common.items.BindableItems; public class SigilOfHolding extends BindableItems { - private static int invSize = 4; + private static int invSize = 5; private static final String NBT_CURRENT_SIGIL = "CurrentSigil"; public SigilOfHolding() { super(); - this.maxStackSize = 1; - setCreativeTab(AlchemicalWizardry.tabBloodMagic); + setMaxStackSize(1); } @Override @@ -51,7 +50,7 @@ public class SigilOfHolding extends BindableItems par3List.add(StatCollector.translateToLocal("tooltip.item.currentitem") + " " + item.getDisplayName()); } - for (int i = 0; i <= invSize; i++) + for (int i = 0; i < invSize; i++) { if (inv[i] != null) { @@ -208,7 +207,7 @@ public class SigilOfHolding extends BindableItems NBTTagCompound tag = tagList.getCompoundTagAt(i); int slot = tag.getByte("Slot"); - if (slot >= 0 && slot <= invSize) + if (slot >= 0 && slot < invSize) { inv[slot] = ItemStack.loadItemStackFromNBT(tag); } @@ -228,7 +227,7 @@ public class SigilOfHolding extends BindableItems NBTTagList itemList = new NBTTagList(); - for (int i = 0; i <= invSize; i++) + for (int i = 0; i < invSize; i++) { if (inventory[i] != null) { @@ -269,7 +268,7 @@ public class SigilOfHolding extends BindableItems return; } - for (int i = 0; i <= invSize; i++) + for (int i = 0; i < invSize; i++) { if (inv[i] == null) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java index 5459eb87..4c35bb2c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java @@ -14,7 +14,7 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import WayofTime.alchemicalWizardry.common.renderer.model.ModelCrystalBelljar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; public class TEBellJarItemRenderer implements IItemRenderer { @@ -33,7 +33,7 @@ public class TEBellJarItemRenderer implements IItemRenderer GL11.glPopMatrix(); GL11.glPopMatrix(); - ReagentContainerInfo[] info = TEBellJar.getContainerInfoFromItem(item); + ReagentContainerInfo[] info = TEBelljar.getContainerInfoFromItem(item); if (info.length >= 1 && info[0] != null) { ReagentStack reagentStack = info[0].reagent; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java index 0a3ca239..fe0767a0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java @@ -14,9 +14,9 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; -public class TEBellJar extends TEReagentConduit +public class TEBelljar extends TEReagentConduit { - public TEBellJar() + public TEBelljar() { super(1, 16000); this.maxConnextions = 1; From e242207d505018f4a3ff776ef8e268bfac6e94fa Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Fri, 31 Jul 2015 11:45:50 -0400 Subject: [PATCH 31/33] Re-refixed TEBelljar --- .../common/block/BlockBelljar.java | 16 ++++++++-------- .../renderer/block/RenderCrystalBelljar.java | 6 +++--- .../{TEBellJar.java => TEBelljar.java} | 0 3 files changed, 11 insertions(+), 11 deletions(-) rename src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/{TEBellJar.java => TEBelljar.java} (100%) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java index 97cdc9e3..6ed3c8c0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java @@ -23,7 +23,7 @@ import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; public class BlockBelljar extends BlockContainer { @@ -77,12 +77,12 @@ public class BlockBelljar extends BlockContainer { TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TEBellJar) + if (tile instanceof TEBelljar) { NBTTagCompound tag = stack.getTagCompound(); if (tag != null) { - ((TEBellJar) tile).readTankNBTOnPlace(tag); + ((TEBelljar) tile).readTankNBTOnPlace(tag); } } } @@ -90,7 +90,7 @@ public class BlockBelljar extends BlockContainer @Override public TileEntity createNewTileEntity(World world, int meta) { - return new TEBellJar(); + return new TEBelljar(); } @Override @@ -121,9 +121,9 @@ public class BlockBelljar extends BlockContainer public int getComparatorInputOverride(World world, BlockPos blockPos) { TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TEBellJar) + if (tile instanceof TEBelljar) { - return ((TEBellJar) tile).getRSPowerOutput(); + return ((TEBelljar) tile).getRSPowerOutput(); } return 15; } @@ -142,11 +142,11 @@ public class BlockBelljar extends BlockContainer TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TEBellJar) + if (tile instanceof TEBelljar) { ItemStack drop = new ItemStack(this); NBTTagCompound tag = new NBTTagCompound(); - ((TEBellJar) tile).writeTankNBT(tag); + ((TEBelljar) tile).writeTankNBT(tag); drop.setTagCompound(tag); list.add(drop); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java index dd0212ff..2330212b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java @@ -14,7 +14,7 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import WayofTime.alchemicalWizardry.common.renderer.model.ModelCrystalBelljar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; public class RenderCrystalBelljar extends TileEntitySpecialRenderer { @@ -25,9 +25,9 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer @Override public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) { - if (tileEntity instanceof TEBellJar) + if (tileEntity instanceof TEBelljar) { - TEBellJar tileAltar = (TEBellJar) tileEntity; + TEBelljar tileAltar = (TEBelljar) tileEntity; GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/CrystalBelljar.png"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBelljar.java similarity index 100% rename from src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java rename to src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBelljar.java From 1aac4686dbe315d94516cb98452c3f26eb5025e2 Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Fri, 31 Jul 2015 12:09:09 -0400 Subject: [PATCH 32/33] Attempt to fix repository --- .../forestry/api/apiculture/BeeManager.java | 49 + .../api/apiculture/EnumBeeChromosome.java | 102 + .../forestry/api/apiculture/EnumBeeType.java | 24 + .../api/apiculture/FlowerManager.java | 39 + .../api/apiculture/IAlleleBeeEffect.java | 36 + .../api/apiculture/IAlleleBeeSpecies.java | 69 + .../apiculture/IAlleleBeeSpeciesCustom.java | 40 + .../api/apiculture/IAlvearyComponent.java | 32 + .../api/apiculture/IApiaristTracker.java | 57 + .../api/apiculture/IArmorApiarist.java | 29 + .../java/forestry/api/apiculture/IBee.java | 88 + .../forestry/api/apiculture/IBeeFactory.java | 39 + .../forestry/api/apiculture/IBeeGenome.java | 48 + .../forestry/api/apiculture/IBeeHousing.java | 27 + .../api/apiculture/IBeeIconProvider.java | 14 + .../forestry/api/apiculture/IBeeListener.java | 46 + .../forestry/api/apiculture/IBeeModifier.java | 71 + .../forestry/api/apiculture/IBeeMutation.java | 29 + .../api/apiculture/IBeeMutationCustom.java | 12 + .../api/apiculture/IBeeMutationFactory.java | 23 + .../forestry/api/apiculture/IBeeRoot.java | 128 ++ .../api/apiculture/IBeekeepingLogic.java | 27 + .../api/apiculture/IBeekeepingMode.java | 70 + .../forestry/api/apiculture/IHiveDrop.java | 38 + .../forestry/api/apiculture/IHiveFrame.java | 27 + .../api/apiculture/IJubilanceFactory.java | 16 + .../api/apiculture/IJubilanceProvider.java | 15 + .../api/apiculture/hives/HiveManager.java | 13 + .../apiculture/hives/IHiveDescription.java | 48 + .../api/apiculture/hives/IHiveGen.java | 29 + .../api/apiculture/hives/IHiveGenHelper.java | 23 + .../api/apiculture/hives/IHiveRegistry.java | 33 + .../api/apiculture/hives/package-info.java | 8 + .../forestry/api/apiculture/package-info.java | 8 + .../api/arboriculture/EnumGermlingType.java | 23 + .../arboriculture/EnumGrowthConditions.java | 10 + .../api/arboriculture/EnumTreeChromosome.java | 96 + .../api/arboriculture/IAlleleFruit.java | 17 + .../api/arboriculture/IAlleleGrowth.java | 17 + .../api/arboriculture/IAlleleLeafEffect.java | 20 + .../api/arboriculture/IAlleleTreeSpecies.java | 69 + .../api/arboriculture/IArboristTracker.java | 12 + .../api/arboriculture/IFruitProvider.java | 74 + .../api/arboriculture/IGrowthProvider.java | 38 + .../api/arboriculture/ILeafTickHandler.java | 12 + .../api/arboriculture/IToolGrafter.java | 24 + .../forestry/api/arboriculture/ITree.java | 100 + .../api/arboriculture/ITreeGenome.java | 46 + .../api/arboriculture/ITreeModifier.java | 45 + .../api/arboriculture/ITreeMutation.java | 34 + .../forestry/api/arboriculture/ITreeRoot.java | 113 ++ .../api/arboriculture/ITreekeepingMode.java | 22 + .../api/arboriculture/package-info.java | 8 + .../forestry/api/circuits/ChipsetManager.java | 13 + .../java/forestry/api/circuits/ICircuit.java | 32 + .../forestry/api/circuits/ICircuitBoard.java | 32 + .../forestry/api/circuits/ICircuitLayout.java | 16 + .../api/circuits/ICircuitLibrary.java | 10 + .../api/circuits/ICircuitRegistry.java | 37 + .../forestry/api/circuits/ISolderManager.java | 14 + .../forestry/api/circuits/package-info.java | 8 + .../java/forestry/api/core/BiomeHelper.java | 36 + .../java/forestry/api/core/EnumHumidity.java | 43 + .../forestry/api/core/EnumTemperature.java | 71 + .../forestry/api/core/ErrorStateRegistry.java | 77 + .../java/forestry/api/core/ForestryAPI.java | 52 + .../java/forestry/api/core/ForestryEvent.java | 60 + .../forestry/api/core/IArmorNaturalist.java | 25 + .../java/forestry/api/core/IErrorState.java | 41 + .../forestry/api/core/IForestryConstants.java | 24 + src/api/java/forestry/api/core/IGameMode.java | 41 + .../java/forestry/api/core/IIconProvider.java | 25 + .../java/forestry/api/core/INBTTagable.java | 14 + .../forestry/api/core/IStructureLogic.java | 20 + .../forestry/api/core/ITextureManager.java | 21 + .../forestry/api/core/ITileStructure.java | 63 + .../java/forestry/api/core/IToolPipette.java | 54 + .../java/forestry/api/core/IToolScoop.java | 13 + src/api/java/forestry/api/core/Tabs.java | 19 + .../java/forestry/api/core/package-info.java | 8 + .../java/forestry/api/farming/Farmables.java | 20 + src/api/java/forestry/api/farming/ICrop.java | 21 + .../forestry/api/farming/IFarmComponent.java | 17 + .../forestry/api/farming/IFarmHousing.java | 74 + .../forestry/api/farming/IFarmInterface.java | 20 + .../forestry/api/farming/IFarmListener.java | 77 + .../java/forestry/api/farming/IFarmLogic.java | 43 + .../java/forestry/api/farming/IFarmable.java | 60 + .../forestry/api/farming/package-info.java | 8 + .../forestry/api/food/BeverageManager.java | 13 + .../forestry/api/food/IBeverageEffect.java | 17 + .../forestry/api/food/IInfuserManager.java | 24 + .../forestry/api/food/IIngredientManager.java | 16 + .../java/forestry/api/food/package-info.java | 8 + .../forestry/api/fuels/EngineBronzeFuel.java | 34 + .../forestry/api/fuels/EngineCopperFuel.java | 31 + .../forestry/api/fuels/FermenterFuel.java | 29 + .../java/forestry/api/fuels/FuelManager.java | 40 + .../forestry/api/fuels/GeneratorFuel.java | 31 + .../forestry/api/fuels/MoistenerFuel.java | 34 + .../forestry/api/fuels/RainSubstrate.java | 40 + .../java/forestry/api/fuels/package-info.java | 8 + .../forestry/api/genetics/AlleleManager.java | 36 + .../forestry/api/genetics/EnumTolerance.java | 16 + .../java/forestry/api/genetics/IAllele.java | 39 + .../forestry/api/genetics/IAlleleArea.java | 15 + .../forestry/api/genetics/IAlleleBoolean.java | 16 + .../forestry/api/genetics/IAlleleEffect.java | 26 + .../forestry/api/genetics/IAlleleFactory.java | 80 + .../forestry/api/genetics/IAlleleFloat.java | 15 + .../forestry/api/genetics/IAlleleFlowers.java | 16 + .../forestry/api/genetics/IAlleleHandler.java | 41 + .../forestry/api/genetics/IAlleleInteger.java | 15 + .../api/genetics/IAllelePlantType.java | 16 + .../api/genetics/IAlleleRegistry.java | 218 +++ .../forestry/api/genetics/IAlleleSpecies.java | 115 ++ .../api/genetics/IAlleleSpeciesCustom.java | 23 + .../api/genetics/IAlleleTolerance.java | 15 + .../api/genetics/IBreedingTracker.java | 93 + .../forestry/api/genetics/IChromosome.java | 25 + .../api/genetics/IChromosomeType.java | 24 + .../api/genetics/IClassification.java | 107 ++ .../forestry/api/genetics/IClimateHelper.java | 53 + .../forestry/api/genetics/IEffectData.java | 27 + .../java/forestry/api/genetics/IFlower.java | 20 + .../api/genetics/IFlowerGrowthRule.java | 15 + .../api/genetics/IFlowerProvider.java | 43 + .../api/genetics/IFlowerRegistry.java | 43 + .../forestry/api/genetics/IFruitBearer.java | 50 + .../forestry/api/genetics/IFruitFamily.java | 32 + .../java/forestry/api/genetics/IGenome.java | 30 + .../java/forestry/api/genetics/IHousing.java | 57 + .../forestry/api/genetics/IIndividual.java | 53 + .../api/genetics/IIndividualLiving.java | 45 + .../forestry/api/genetics/ILegacyHandler.java | 17 + .../java/forestry/api/genetics/IMutation.java | 68 + .../api/genetics/IMutationCondition.java | 23 + .../api/genetics/IMutationCustom.java | 47 + .../forestry/api/genetics/IPollinatable.java | 48 + .../forestry/api/genetics/ISpeciesRoot.java | 163 ++ .../forestry/api/genetics/package-info.java | 8 + .../EnumButterflyChromosome.java | 98 + .../api/lepidopterology/EnumFlutterType.java | 15 + .../IAlleleButterflyEffect.java | 21 + .../IAlleleButterflySpecies.java | 59 + .../api/lepidopterology/IButterfly.java | 77 + .../api/lepidopterology/IButterflyGenome.java | 42 + .../lepidopterology/IButterflyMutation.java | 14 + .../lepidopterology/IButterflyNursery.java | 21 + .../api/lepidopterology/IButterflyRoot.java | 74 + .../api/lepidopterology/IEntityButterfly.java | 29 + .../ILepidopteristTracker.java | 14 + .../api/lepidopterology/package-info.java | 8 + .../java/forestry/api/mail/EnumAddressee.java | 26 + .../java/forestry/api/mail/EnumPostage.java | 20 + src/api/java/forestry/api/mail/ILetter.java | 59 + .../forestry/api/mail/ILetterHandler.java | 13 + .../java/forestry/api/mail/IMailAddress.java | 23 + .../java/forestry/api/mail/IPostOffice.java | 30 + .../java/forestry/api/mail/IPostRegistry.java | 58 + .../forestry/api/mail/IPostalCarrier.java | 48 + .../java/forestry/api/mail/IPostalState.java | 14 + src/api/java/forestry/api/mail/IStamps.java | 14 + .../java/forestry/api/mail/ITradeStation.java | 24 + .../java/forestry/api/mail/PostManager.java | 11 + .../forestry/api/mail/TradeStationInfo.java | 29 + .../java/forestry/api/mail/package-info.java | 8 + .../api/recipes/ICarpenterManager.java | 67 + .../api/recipes/ICentrifugeManager.java | 79 + .../api/recipes/ICraftingProvider.java | 17 + .../api/recipes/IFabricatorManager.java | 18 + .../api/recipes/IFermenterManager.java | 53 + .../api/recipes/IMoistenerManager.java | 33 + .../api/recipes/ISqueezerManager.java | 51 + .../forestry/api/recipes/IStillManager.java | 34 + .../api/recipes/IVariableFermentable.java | 21 + .../forestry/api/recipes/RecipeManagers.java | 45 + .../forestry/api/recipes/package-info.java | 8 + .../forestry/api/storage/BackpackEvent.java | 25 + .../forestry/api/storage/BackpackManager.java | 27 + .../api/storage/BackpackResupplyEvent.java | 24 + .../api/storage/BackpackStowEvent.java | 27 + .../api/storage/EnumBackpackType.java | 10 + .../api/storage/IBackpackDefinition.java | 47 + .../api/storage/IBackpackInterface.java | 22 + .../forestry/api/storage/ICrateRegistry.java | 32 + .../forestry/api/storage/StorageManager.java | 12 + .../forestry/api/storage/package-info.java | 8 + .../java/forestry/api/world/ITreeGenData.java | 30 + .../api/world/IWorldGenInterface.java | 22 + .../forestry/api/world/WorldGenManager.java | 10 + .../java/forestry/api/world/package-info.java | 8 + .../api/IHeatExchangerLogic.java | 77 + .../pneumaticCraft/api/PneumaticRegistry.java | 158 ++ .../api/actuator/IActuator.java | 32 + .../api/block/BlockSupplier.java | 77 + .../api/block/IPneumaticWrenchable.java | 14 + .../api/client/GuiAnimatedStatSupplier.java | 49 + .../api/client/GuiElementRenderer.java | 32 + .../api/client/IGuiAnimatedStat.java | 179 ++ .../AssemblyRenderOverriding.java | 55 + .../pneumaticHelmet/IBlockTrackEntry.java | 80 + .../pneumaticHelmet/IEntityTrackEntry.java | 49 + .../client/pneumaticHelmet/IGuiScreen.java | 15 + .../pneumaticHelmet/IHackableBlock.java | 69 + .../pneumaticHelmet/IHackableEntity.java | 59 + .../client/pneumaticHelmet/IOptionPage.java | 46 + .../IUpgradeRenderHandler.java | 92 + .../RenderHandlerRegistry.java | 10 + .../api/drone/DroneConstructingEvent.java | 11 + .../api/drone/IBlockInteractHandler.java | 26 + .../api/drone/ICustomBlockInteract.java | 45 + .../java/pneumaticCraft/api/drone/IDrone.java | 61 + .../api/drone/IPathNavigator.java | 11 + .../api/drone/IPathfindHandler.java | 26 + .../drone/SpecialVariableRetrievalEvent.java | 60 + .../api/item/IInventoryItem.java | 20 + .../api/item/IPressurizable.java | 35 + .../api/item/IProgrammable.java | 34 + .../pneumaticCraft/api/item/ItemSupplier.java | 47 + .../java/pneumaticCraft/api/package-info.java | 5 + .../api/recipe/AssemblyRecipe.java | 49 + .../api/recipe/IPressureChamberRecipe.java | 34 + .../api/recipe/PressureChamberRecipe.java | 24 + .../api/tileentity/AirHandlerSupplier.java | 51 + .../api/tileentity/IAirHandler.java | 114 ++ .../api/tileentity/IHeatExchanger.java | 24 + .../api/tileentity/IManoMeasurable.java | 14 + .../api/tileentity/IPneumaticMachine.java | 30 + .../api/universalSensor/EntityPollSensor.java | 31 + .../IBlockAndCoordinateEventSensor.java | 59 + .../IBlockAndCoordinatePollSensor.java | 63 + .../universalSensor/IEventSensorSetting.java | 23 + .../universalSensor/IPollSensorSetting.java | 27 + .../api/universalSensor/ISensorSetting.java | 59 + .../universalSensor/PlayerEventSensor.java | 33 + .../universalSensor/SensorRegistrator.java | 33 + src/api/java/thaumcraft/api/IGoggles.java | 22 + src/api/java/thaumcraft/api/IRepairable.java | 13 + .../thaumcraft/api/IRepairableExtended.java | 17 + src/api/java/thaumcraft/api/IRunicArmor.java | 22 + src/api/java/thaumcraft/api/IScribeTools.java | 14 + .../java/thaumcraft/api/IVisDiscountGear.java | 20 + src/api/java/thaumcraft/api/ItemApi.java | 70 + src/api/java/thaumcraft/api/ItemRunic.java | 21 + .../java/thaumcraft/api/ThaumcraftApi.java | 507 +++++ .../thaumcraft/api/ThaumcraftApiHelper.java | 269 +++ .../java/thaumcraft/api/TileThaumcraft.java | 63 + .../java/thaumcraft/api/WorldCoordinates.java | 117 ++ .../java/thaumcraft/api/aspects/Aspect.java | 201 ++ .../thaumcraft/api/aspects/AspectList.java | 256 +++ .../api/aspects/AspectSourceHelper.java | 58 + .../api/aspects/IAspectContainer.java | 80 + .../thaumcraft/api/aspects/IAspectSource.java | 16 + .../api/aspects/IEssentiaContainerItem.java | 36 + .../api/aspects/IEssentiaTransport.java | 100 + .../api/crafting/CrucibleRecipe.java | 95 + .../api/crafting/IArcaneRecipe.java | 35 + .../api/crafting/IInfusionStabiliser.java | 19 + .../crafting/InfusionEnchantmentRecipe.java | 156 ++ .../api/crafting/InfusionRecipe.java | 128 ++ .../api/crafting/ShapedArcaneRecipe.java | 261 +++ .../api/crafting/ShapelessArcaneRecipe.java | 157 ++ .../DamageSourceIndirectThaumcraftEntity.java | 32 + .../damagesource/DamageSourceThaumcraft.java | 46 + .../thaumcraft/api/entities/ITaintedMob.java | 5 + src/api/java/thaumcraft/api/nodes/INode.java | 53 + .../java/thaumcraft/api/nodes/IRevealer.java | 22 + .../thaumcraft/api/nodes/NodeModifier.java | 6 + .../java/thaumcraft/api/nodes/NodeType.java | 6 + src/api/java/thaumcraft/api/package-info.java | 4 + .../api/potions/PotionFluxTaint.java | 67 + .../api/research/IScanEventHandler.java | 9 + .../api/research/ResearchCategories.java | 101 + .../api/research/ResearchCategoryList.java | 37 + .../thaumcraft/api/research/ResearchItem.java | 367 ++++ .../thaumcraft/api/research/ResearchPage.java | 193 ++ .../thaumcraft/api/research/ScanResult.java | 39 + .../thaumcraft/api/visnet/TileVisNode.java | 188 ++ .../thaumcraft/api/visnet/VisNetHandler.java | 284 +++ .../java/thaumcraft/api/wands/IWandFocus.java | 64 + .../api/wands/IWandRodOnUpdate.java | 16 + .../api/wands/IWandTriggerManager.java | 12 + .../java/thaumcraft/api/wands/IWandable.java | 25 + .../thaumcraft/api/wands/ItemFocusBasic.java | 166 ++ .../java/thaumcraft/api/wands/StaffRod.java | 48 + .../java/thaumcraft/api/wands/WandCap.java | 129 ++ .../java/thaumcraft/api/wands/WandRod.java | 158 ++ .../api/wands/WandTriggerRegistry.java | 72 + .../java/vazkii/botania/api/BotaniaAPI.java | 363 ++++ .../api/internal/DummyManaNetwork.java | 51 + .../api/internal/DummyMethodHandler.java | 135 ++ .../botania/api/internal/DummyPage.java | 35 + .../botania/api/internal/DummySubTile.java | 18 + .../api/internal/IGuiLexiconEntry.java | 57 + .../api/internal/IInternalMethodHandler.java | 81 + .../botania/api/internal/IManaBurst.java | 62 + .../botania/api/internal/IManaNetwork.java | 68 + .../botania/api/item/IExoflameHeatable.java | 44 + .../api/item/IExtendedPlayerController.java | 29 + .../botania/api/item/IPetalApothecary.java | 30 + .../botania/api/item/IPixieSpawner.java | 30 + .../botania/api/lexicon/IAddonEntry.java | 29 + .../vazkii/botania/api/lexicon/ILexicon.java | 21 + .../botania/api/lexicon/ILexiconable.java | 29 + .../api/lexicon/IRecipeKeyProvider.java | 24 + .../botania/api/lexicon/KnowledgeType.java | 20 + .../botania/api/lexicon/LexiconCategory.java | 32 + .../botania/api/lexicon/LexiconEntry.java | 97 + .../botania/api/lexicon/LexiconPage.java | 67 + .../api/lexicon/LexiconRecipeMappings.java | 66 + .../botania/api/mana/BurstProperties.java | 37 + .../botania/api/mana/IClientManaHandler.java | 21 + .../api/mana/ICreativeManaProvider.java | 26 + .../vazkii/botania/api/mana/IKeyLocked.java | 30 + .../botania/api/mana/ILaputaImmobile.java | 23 + .../java/vazkii/botania/api/mana/ILens.java | 43 + .../vazkii/botania/api/mana/ILensEffect.java | 49 + .../vazkii/botania/api/mana/IManaBlock.java | 26 + .../botania/api/mana/IManaCollector.java | 43 + .../botania/api/mana/IManaCollisionGhost.java | 22 + .../vazkii/botania/api/mana/IManaItem.java | 69 + .../vazkii/botania/api/mana/IManaPool.java | 31 + .../botania/api/mana/IManaReceiver.java | 35 + .../vazkii/botania/api/mana/IManaTrigger.java | 24 + .../botania/api/mana/IManaUsingItem.java | 26 + .../api/mana/IPoolOverlayProvider.java | 26 + .../botania/api/mana/ITinyPlanetExcempt.java | 24 + .../botania/api/mana/ManaItemHandler.java | 201 ++ .../botania/api/mana/ManaNetworkEvent.java | 57 + .../botania/api/mana/TileSignature.java | 15 + .../api/mana/spark/ISparkAttachable.java | 54 + .../botania/api/mana/spark/ISparkEntity.java | 65 + .../botania/api/mana/spark/SparkHelper.java | 33 + .../java/vazkii/botania/api/package-info.java | 4 + .../vazkii/botania/api/recipe/IElvenItem.java | 14 + .../botania/api/recipe/IFlowerComponent.java | 26 + .../botania/api/recipe/RecipeElvenTrade.java | 94 + .../api/recipe/RecipeManaInfusion.java | 81 + .../botania/api/recipe/RecipePetals.java | 97 + .../botania/api/recipe/RecipeRuneAltar.java | 31 + .../botania/api/subtile/ISpecialFlower.java | 21 + .../api/subtile/ISubTileContainer.java | 30 + .../botania/api/subtile/SubTileEntity.java | 126 ++ .../api/subtile/SubTileFunctional.java | 212 +++ .../api/subtile/SubTileGenerating.java | 245 +++ .../botania/api/wand/ICoordBoundItem.java | 18 + .../vazkii/botania/api/wand/ITileBound.java | 31 + .../botania/api/wand/IWandBindable.java | 36 + .../vazkii/botania/api/wand/IWandHUD.java | 26 + .../vazkii/botania/api/wand/IWandable.java | 29 + .../api/wand/IWireframeAABBProvider.java | 25 + .../botania/api/wiki/IWikiProvider.java | 39 + .../botania/api/wiki/SimpleWikiProvider.java | 73 + .../vazkii/botania/api/wiki/WikiHooks.java | 43 + .../AlchemicalWizardry.java | 218 ++- .../BloodMagicConfiguration.java | 105 +- .../alchemicalWizardry/ModBlocks.java | 221 ++- .../alchemicalWizardry/ModItems.java | 445 +++-- .../api/ILimitingLogic.java | 2 +- .../alchemicalWizardry/api/Int3.java | 7 +- .../api/RoutingFocusParadigm.java | 4 +- .../api/RoutingFocusPosAndFacing.java | 6 +- .../AlchemicalPotionCreationHandler.java | 2 +- .../api/alchemy/AlchemyRecipeRegistry.java | 2 +- .../api/alchemy/energy/IReagentHandler.java | 14 +- .../api/alchemy/energy/ReagentRegistry.java | 4 +- .../api/alchemy/energy/ReagentStack.java | 3 +- .../alchemy/energy/TileReagentHandler.java | 14 +- .../energy/TileSegmentedReagentHandler.java | 26 +- .../api/altarRecipeRegistry/AltarRecipe.java | 2 +- .../AltarRecipeRegistry.java | 4 +- .../api/bindingRegistry/BindingRegistry.java | 2 +- .../bindingRegistry/UnbindingRegistry.java | 2 +- .../api/compress/CompressionRegistry.java | 4 +- .../api/event/AddToNetworkEvent.java | 4 +- .../api/event/ItemBindEvent.java | 4 +- .../api/event/ItemDrainInContainerEvent.java | 2 +- .../api/event/ItemDrainNetworkEvent.java | 2 +- .../api/event/PlayerAddToNetworkEvent.java | 2 +- .../api/event/PlayerDrainNetworkEvent.java | 2 +- .../api/event/RitualActivatedEvent.java | 2 +- .../api/event/RitualEvent.java | 2 +- .../api/event/RitualRunEvent.java | 5 +- .../api/event/SacrificeKnifeUsedEvent.java | 4 +- .../api/event/SoulNetworkEvent.java | 3 +- .../api/event/TeleposeEvent.java | 74 +- .../api/guide/OrbRecipeRenderer.java | 270 +-- .../api/guide/PageAltarRecipe.java | 138 +- .../api/guide/PageMultiBlock.java | 290 +-- .../api/guide/PageRitualMultiBlock.java | 175 +- .../api/harvest/HarvestRegistry.java | 18 +- .../api/harvest/IHarvestHandler.java | 8 +- .../api/items/ItemSpellMultiTool.java | 103 +- .../api/items/ShapedBloodOrbRecipe.java | 20 +- .../api/items/ShapelessBloodOrbRecipe.java | 8 +- .../api/items/interfaces/IRitualDiviner.java | 10 +- .../api/renderer/MRSRenderer.java | 12 +- .../api/rituals/IMasterRitualStone.java | 15 +- .../api/rituals/IRitualStone.java | 10 +- .../api/rituals/LocalRitualStorage.java | 26 +- .../api/rituals/RitualEffect.java | 11 +- .../api/rituals/Rituals.java | 31 +- .../api/sacrifice/PlayerSacrificeHandler.java | 17 +- .../soulNetwork/ComplexNetworkHandler.java | 39 +- .../api/soulNetwork/SoulNetworkHandler.java | 34 +- .../api/spell/APISpellHelper.java | 43 +- .../api/spell/EntitySpellProjectile.java | 132 +- .../spell/ExtrapolatedMeleeEntityEffect.java | 2 +- .../api/spell/IOnBreakBlock.java | 6 +- .../spell/MeleeSpellCenteredWorldEffect.java | 13 +- .../api/spell/SpellEffectRegistry.java | 8 +- .../api/spell/SpellParadigm.java | 2 +- .../api/spell/SpellParadigmMelee.java | 9 +- .../api/spell/SpellParadigmProjectile.java | 4 +- .../api/spell/SpellParadigmSelf.java | 7 +- .../api/spell/SpellParadigmTool.java | 43 +- .../summoningRegistry/SummoningRegistry.java | 2 +- .../api/tile/ISpellTile.java | 4 +- .../client/BlockRenderer.java | 14 - .../client/ClientEventHandler.java | 50 +- .../client/ClientProxy.java | 38 +- .../client/ClientUtils.java | 348 ++++ .../client/POVArmourModelWrapper.java | 47 + .../client/gui/ConfigGui.java | 32 +- .../client/gui/ConfigGuiFactory.java | 10 +- .../client/nei/NEIAlchemyRecipeHandler.java | 6 +- .../client/nei/NEIAltarRecipeHandler.java | 40 +- .../client/nei/NEIBloodOrbShapedHandler.java | 2 +- .../nei/NEIBloodOrbShapelessHandler.java | 12 +- .../client/nei/NEIConfig.java | 5 +- .../client/renderer/HUDElement.java | 30 +- .../client/renderer/HUDUtils.java | 36 +- .../client/renderer/RenderFakeBlocks.java | 69 +- .../client/renderer/RenderHelper.java | 38 +- .../client/renderer/RitualDivinerRender.java | 32 +- .../common/AlchemicalWizardryEventHooks.java | 94 +- .../common/AlchemicalWizardryFuelHandler.java | 8 +- .../common/ClientToServerPacketHandler.java | 6 +- .../common/CommonProxy.java | 42 +- .../common/CoordAndRange.java | 12 - .../common/EntityAITargetAggro.java | 2 +- .../alchemicalWizardry/common/ItemType.java | 4 +- .../common/LifeBucketHandler.java | 16 +- .../common/LifeEssence.java | 3 +- .../common/MessageKeyPressed.java | 6 +- .../common/ModLivingDropsEvent.java | 4 +- .../common/NewPacketHandler.java | 406 ++-- .../achievements/AchievementTrigger.java | 27 +- .../common/achievements/AchievementsMod.java | 2 +- .../achievements/AchievementsRegistry.java | 71 +- .../achievements/ICraftAchievement.java | 11 - .../achievements/IPickupAchievement.java | 11 - .../common/achievements/ModAchievements.java | 55 +- .../alchemy/CombinedPotionRegistry.java | 2 +- ...BlockArmourForge.java => ArmourForge.java} | 82 +- ...ator.java => BlockAlchemicCalcinator.java} | 43 +- .../common/block/BlockAltar.java | 95 +- .../common/block/BlockBelljar.java | 56 +- .../common/block/BlockBloodLightSource.java | 29 +- .../common/block/BlockBloodRune.java | 101 - .../common/block/BlockBloodStoneBrick.java | 14 - .../common/block/BlockConduit.java | 53 +- ...ncenseCrucible.java => BlockCrucible.java} | 84 +- .../common/block/BlockCrystal.java | 47 +- .../common/block/BlockDemonPortal.java | 28 +- .../common/block/BlockEfficiencyRune.java | 17 - .../common/block/BlockEmptySocket.java | 20 - .../common/block/BlockEnchantmentGlyph.java | 57 +- .../common/block/BlockHomHeart.java | 98 + .../block/BlockLargeBloodStoneBrick.java | 14 - .../common/block/BlockLifeEssence.java | 29 - .../common/block/BlockMasterStone.java | 36 +- .../common/block/BlockMimic.java | 210 --- .../common/block/BlockOrientable.java | 28 +- .../common/block/BlockPedestal.java | 68 +- .../common/block/BlockPlinth.java | 68 +- .../common/block/BlockReagentConduit.java | 26 +- .../common/block/BlockRitualStone.java | 69 - .../common/block/BlockRuneOfSacrifice.java | 17 - .../block/BlockRuneOfSelfSacrifice.java | 17 - .../common/block/BlockSchematicSaver.java | 12 +- ...lockFilledSocket.java => BlockSocket.java} | 64 +- .../common/block/BlockSpectralContainer.java | 27 +- .../common/block/BlockSpeedRune.java | 17 - .../common/block/BlockSpellEffect.java | 13 +- .../common/block/BlockSpellEnhancement.java | 12 +- .../common/block/BlockSpellModifier.java | 12 +- .../common/block/BlockSpellParadigm.java | 28 +- .../common/block/BlockSpellTable.java | 63 - .../common/block/BlockStabilityGlyph.java | 38 +- .../common/block/BlockTeleposer.java | 145 +- ...emistrySet.java => BlockWritingTable.java} | 84 +- .../common/block/BloodRune.java | 132 ++ .../common/block/BloodStoneBrick.java | 27 + .../common/block/EfficiencyRune.java | 31 + .../common/block/EmptySocket.java | 33 + .../common/block/IOrientable.java | 10 +- ...alStone.java => ImperfectRitualStone.java} | 44 +- .../common/block/LargeBloodStoneBrick.java | 27 + .../common/block/LifeEssenceBlock.java | 49 + .../common/block/MimicBlock.java | 231 +++ .../common/block/RitualStone.java | 133 ++ .../common/block/RuneOfSacrifice.java | 31 + .../common/block/RuneOfSelfSacrifice.java | 31 + ...{BlockSpectral.java => SpectralBlock.java} | 44 +- .../common/block/SpeedRune.java | 31 + .../bloodAltarUpgrade/AltarComponent.java | 6 - .../bloodAltarUpgrade/UpgradedAltars.java | 184 +- .../common/book/BloodMagicGuide.java | 1672 ++++++++--------- .../common/commands/CommandBind.java | 76 + .../common/commands/CommandSN.java | 137 ++ .../common/commands/CommandUnbind.java | 52 + .../compress/StorageBlockCraftingManager.java | 4 +- .../common/demonVillage/BlockSet.java | 26 +- .../demonVillage/BuildingSchematic.java | 20 +- .../common/demonVillage/DemonBuilding.java | 14 +- .../common/demonVillage/DemonVillagePath.java | 96 +- .../common/demonVillage/GridSpaceHolder.java | 20 +- .../common/demonVillage/TileBlockSet.java | 8 + .../ai/EntityAIOccasionalRangedAttack.java | 3 +- .../ai/EntityDemonAIHurtByTarget.java | 10 +- .../demonHoard/DemonHoardPacket.java | 5 +- .../demonHoard/DemonPacketRegistry.java | 2 +- .../demon/EntityMinorDemonGrunt.java | 61 +- .../demonHoard/demon/IHoardDemon.java | 11 +- .../loot/DemonVillageLootRegistry.java | 16 +- .../tileEntity/BlockDemonChest.java | 19 +- .../demonVillage/tileEntity/TEDemonChest.java | 29 +- .../tileEntity/TEDemonPortal.java | 197 +- .../common/entity/mob/BookEntityItem.java | 2 +- .../common/entity/mob/EntityBileDemon.java | 372 +++- .../common/entity/mob/EntityBoulderFist.java | 366 +++- .../common/entity/mob/EntityDemon.java | 396 +--- .../common/entity/mob/EntityElemental.java | 299 +-- .../common/entity/mob/EntityFallenAngel.java | 358 +++- .../entity/mob/EntityFireElemental.java | 1 - .../entity/mob/EntityHolyElemental.java | 1 - .../common/entity/mob/EntityIceDemon.java | 355 +++- .../entity/mob/EntityLowerGuardian.java | 379 +++- .../common/entity/mob/EntityShade.java | 359 +++- .../entity/mob/EntityShadeElemental.java | 1 - .../entity/mob/EntitySmallEarthGolem.java | 354 +++- .../entity/mob/EntityWaterElemental.java | 1 - .../entity/mob/EntityWingedFireDemon.java | 364 +++- .../entity/mob/MailOrderEntityItem.java | 19 +- .../projectile/EnergyBlastProjectile.java | 101 +- .../entity/projectile/EntityBeamParticle.java | 16 + .../EntityBloodLightProjectile.java | 50 +- .../EntityEnergyBazookaMainProjectile.java | 7 +- ...ntityEnergyBazookaSecondaryProjectile.java | 184 +- .../entity/projectile/EntityMeteor.java | 4 +- .../entity/projectile/EntityParticleBeam.java | 54 +- .../projectile/ExplosionProjectile.java | 7 +- .../entity/projectile/FireProjectile.java | 20 +- .../entity/projectile/HolyProjectile.java | 15 +- .../entity/projectile/IceProjectile.java | 18 +- .../projectile/LightningBoltProjectile.java | 7 +- .../entity/projectile/MudProjectile.java | 9 +- .../entity/projectile/TeleportProjectile.java | 11 +- .../entity/projectile/WaterProjectile.java | 11 +- .../entity/projectile/WindGustProjectile.java | 9 +- .../common/guide/RecipeHolder.java | 4 +- .../harvest/AgriCraftCropHarvestHandler.java | 83 + .../harvest/BloodMagicHarvestHandler.java | 22 +- .../harvest/CactusReedHarvestHandler.java | 14 +- .../GenericItemStackHarvestHandler.java | 36 +- ...GenericPamSeedlessFruitHarvestHandler.java | 136 +- .../harvest/GenericSeededHarvestHandler.java | 275 ++- .../common/harvest/GourdHarvestHandler.java | 12 +- .../harvest/PamHarvestCompatRegistry.java | 250 +-- .../common/items/AWBaseItems.java | 45 + .../common/items/ActivationCrystal.java | 45 +- .../common/items/AirScribeTool.java | 11 + .../common/items/ApprenticeBloodOrb.java | 13 +- .../common/items/ArchmageBloodOrb.java | 13 +- .../common/items/ArmourInhibitor.java | 112 +- .../common/items/BaseItems.java | 23 - .../common/items/BlankSpell.java | 75 +- .../common/items/BloodShard.java | 30 +- .../common/items/BoundAxe.java | 137 +- .../common/items/BoundPickaxe.java | 193 +- .../common/items/BoundShovel.java | 164 +- .../{CreativeOrb.java => CheatyItem.java} | 91 +- .../common/items/CreativeDagger.java | 22 +- .../common/items/DaggerOfSacrifice.java | 48 +- .../common/items/DawnScribeTool.java | 11 + .../common/items/DemonCrystal.java | 167 -- .../common/items/DemonPlacer.java | 247 +++ .../items/DemonicTelepositionFocus.java | 14 +- .../common/items/DuskScribeTool.java | 11 + .../common/items/EarthScribeTool.java | 11 + .../items/{Orb.java => EnergyBattery.java} | 54 +- .../common/items/EnergyBazooka.java | 72 +- .../{EnergyBlaster.java => EnergyBlast.java} | 75 +- .../{BindableItems.java => EnergyItems.java} | 43 +- .../{BoundBlade.java => EnergySword.java} | 74 +- .../items/EnhancedTelepositionFocus.java | 14 +- .../common/items/FireScribeTool.java | 11 + .../common/items/ItemAlchemyBase.java | 42 +- .../common/items/ItemBlockCrystalBelljar.java | 19 +- .../common/items/ItemBloodLetterPack.java | 38 +- .../common/items/ItemBloodRuneBlock.java | 7 +- .../common/items/ItemComplexSpellCrystal.java | 29 +- .../common/items/ItemComponents.java | 40 +- .../common/items/ItemCrystalBlock.java | 7 +- .../{KeyOfBinding.java => ItemDiabloKey.java} | 38 +- .../items/ItemEnchantmentGlyphBlock.java | 16 +- .../common/items/ItemIncense.java | 46 +- .../common/items/ItemMailOrderCatalogue.java | 11 + .../common/items/ItemRitualDismantler.java | 81 +- .../common/items/ItemRitualDiviner.java | 69 +- .../common/items/ItemSpellEffectBlock.java | 6 +- .../items/ItemSpellEnhancementBlock.java | 3 +- .../common/items/ItemSpellModifierBlock.java | 7 +- .../common/items/ItemSpellParadigmBlock.java | 4 + .../common/items/ItemStabilityGlyphBlock.java | 10 +- .../common/items/LavaCrystal.java | 52 +- .../common/items/LifeBucket.java | 10 + .../common/items/MagicianBloodOrb.java | 13 +- .../common/items/MasterBloodOrb.java | 13 +- .../common/items/OrbOfTesting.java | 45 + .../items/ReinforcedTelepositionFocus.java | 14 +- .../common/items/SacrificialDagger.java | 42 +- .../common/items/ScribeTool.java | 6 +- .../common/items/TelepositionFocus.java | 26 +- .../common/items/TranscendentBloodOrb.java | 13 +- .../common/items/WaterScribeTool.java | 13 + .../common/items/armour/BoundArmour.java | 350 ++-- .../common/items/armour/OmegaArmour.java | 31 +- .../common/items/armour/OmegaArmourEarth.java | 57 +- .../common/items/armour/OmegaArmourFire.java | 62 +- .../common/items/armour/OmegaArmourWater.java | 62 +- .../common/items/armour/OmegaArmourWind.java | 57 +- ...calRouter.java => ItemAttunedCrystal.java} | 120 +- ...anser.java => ItemDestinationClearer.java} | 33 +- ...lSegmenter.java => ItemTankSegmenter.java} | 98 +- .../common/items/forestry/ItemBloodFrame.java | 290 +-- .../common/items/potion/AlchemyFlask.java | 47 +- .../common/items/potion/AlchemyReagent.java | 69 +- .../potion/AverageLengtheningCatalyst.java | 11 + .../items/potion/AveragePowerCatalyst.java | 11 + .../items/potion/CombinationalCatalyst.java | 14 +- .../items/potion/EnhancedFillingAgent.java | 13 + .../potion/GreaterLengtheningCatalyst.java | 11 + .../items/potion/GreaterPowerCatalyst.java | 11 + .../items/potion/LengtheningCatalyst.java | 2 + .../potion/MundaneLengtheningCatalyst.java | 11 + .../items/potion/MundanePowerCatalyst.java | 11 + .../common/items/potion/PowerCatalyst.java | 2 + .../items/potion/StandardBindingAgent.java | 20 +- .../items/potion/StandardFillingAgent.java | 13 + .../common/items/potion/WeakBindingAgent.java | 11 + .../common/items/potion/WeakFillingAgent.java | 22 +- .../items/routing/InputRoutingFocus.java | 11 + .../items/routing/OutputRoutingFocus.java | 75 +- .../common/items/routing/RoutingFocus.java | 33 +- .../common/items/sigil/SigilAir.java | 26 +- .../common/items/sigil/SigilBloodLight.java | 76 +- .../common/items/sigil/SigilDivination.java | 39 +- .../common/items/sigil/SigilFluid.java | 138 +- .../common/items/sigil/SigilHarvest.java | 82 +- .../common/items/sigil/SigilLava.java | 75 +- .../items/sigil/SigilOfElementalAffinity.java | 81 +- .../items/sigil/SigilOfEnderSeverance.java | 78 +- .../common/items/sigil/SigilOfGrowth.java | 118 +- .../common/items/sigil/SigilOfHaste.java | 76 +- .../common/items/sigil/SigilOfMagnetism.java | 78 +- .../common/items/sigil/SigilOfSupression.java | 110 +- .../items/sigil/SigilOfTheAssassin.java | 51 +- .../common/items/sigil/SigilOfTheBridge.java | 95 +- .../items/sigil/SigilOfTheFastMiner.java | 79 +- .../common/items/sigil/SigilOfWind.java | 86 +- .../{SigilCompress.java => SigilPackRat.java} | 79 +- .../common/items/sigil/SigilSeer.java | 23 +- .../common/items/sigil/SigilToggleable.java | 17 - .../common/items/sigil/SigilVoid.java | 65 +- .../common/items/sigil/SigilWater.java | 117 +- .../items/sigil/holding/ContainerHolding.java | 4 +- .../items/sigil/holding/GuiHolding.java | 5 +- .../sigil/holding/HoldingPacketHandler.java | 6 +- .../sigil/holding/HoldingPacketProcessor.java | 6 +- .../items/sigil/holding/InventoryHolding.java | 45 +- .../items/sigil/holding/ScrollHelper.java | 10 +- .../items/sigil/holding/SigilOfHolding.java | 177 +- .../items/thaumcraft/ItemSanguineArmour.java | 384 ++-- .../common/omega/IEnchantmentGlyph.java | 6 +- .../common/omega/IStabilityGlyph.java | 3 +- .../common/omega/OmegaParadigm.java | 5 +- .../common/omega/OmegaParadigmEarth.java | 12 +- .../common/omega/OmegaParadigmFire.java | 19 +- .../common/omega/OmegaParadigmWater.java | 13 +- .../common/omega/OmegaParadigmWind.java | 9 +- .../common/omega/OmegaRegistry.java | 2 +- .../common/omega/OmegaStructureHandler.java | 152 +- ...onBloodMagic.java => PotionAmphibian.java} | 7 +- .../common/potion/PotionBoost.java | 18 + .../common/potion/PotionDeaf.java | 18 + .../common/potion/PotionDemonCloak.java | 18 + .../common/potion/PotionDrowning.java | 18 + .../common/potion/PotionFeatherFall.java | 18 + .../common/potion/PotionFireFuse.java | 18 + .../common/potion/PotionFlameCloak.java | 18 + .../common/potion/PotionFlight.java | 18 + .../common/potion/PotionHeavyHeart.java | 18 + .../common/potion/PotionIceCloak.java | 18 + .../common/potion/PotionInhibit.java | 18 + .../common/potion/PotionPlanarBinding.java | 18 + .../potion/PotionProjectileProtect.java | 18 + .../common/potion/PotionReciprocation.java | 18 + .../common/potion/PotionSoulFray.java | 34 + .../common/potion/PotionSoulHarden.java | 18 + .../renderer/AlchemyCircleRenderer.java | 22 +- .../common/renderer/BeamRenderer.java | 146 ++ .../block/RenderAlchemicCalcinator.java | 420 +++++ .../block/RenderAlchemicalCalcinator.java | 201 -- .../common/renderer/block/RenderAltar.java | 80 - .../renderer/block/RenderChemistrySet.java | 166 -- .../common/renderer/block/RenderConduit.java | 17 +- .../renderer/block/RenderCrystalBelljar.java | 81 +- .../renderer/block/RenderMasterStone.java | 6 +- .../common/renderer/block/RenderPedestal.java | 174 +- .../common/renderer/block/RenderPlinth.java | 174 +- .../renderer/block/RenderReagentConduit.java | 41 +- .../block/RenderSpellEffectBlock.java | 16 +- .../block/RenderSpellEnhancementBlock.java | 16 +- .../block/RenderSpellModifierBlock.java | 16 +- .../block/RenderSpellParadigmBlock.java | 16 +- .../renderer/block/RenderWritingTable.java | 318 ++++ .../renderer/block/TEAltarRenderer.java | 232 +++ .../TEAlchemicalCalcinatorItemRenderer.java | 15 +- .../block/itemRender/TEAltarItemRenderer.java | 17 +- .../itemRender/TEBellJarItemRenderer.java | 69 +- .../itemRender/TEConduitItemRenderer.java | 18 +- .../TESpellEffectBlockItemRenderer.java | 17 +- .../TESpellEnhancementBlockItemRenderer.java | 17 +- .../TESpellModifierBlockItemRenderer.java | 17 +- .../TESpellParadigmBlockItemRenderer.java | 17 +- ...r.java => TEWritingTableItemRenderer.java} | 14 +- .../common/renderer/mob/RenderBileDemon.java | 3 +- .../renderer/mob/RenderBoulderFist.java | 3 +- .../common/renderer/mob/RenderElemental.java | 3 +- .../renderer/mob/RenderFallenAngel.java | 9 +- .../common/renderer/mob/RenderIceDemon.java | 5 +- .../renderer/mob/RenderLowerGuardian.java | 5 +- .../renderer/mob/RenderMinorDemonGrunt.java | 3 +- .../mob/RenderMinorDemonGruntGuardian.java | 3 +- .../common/renderer/mob/RenderShade.java | 3 +- .../renderer/mob/RenderSmallEarthGolem.java | 3 +- .../renderer/mob/RenderWingedFireDemon.java | 3 +- .../renderer/model/ModelBloodAltar.java | 30 +- .../common/renderer/model/ModelConduit.java | 4 +- .../common/renderer/model/ModelElemental.java | 12 +- .../renderer/model/ModelSpellEffectBlock.java | 4 +- .../model/ModelSpellEnhancementBlock.java | 4 +- .../model/ModelSpellModifierBlock.java | 4 +- .../model/ModelSpellParadigmBlock.java | 4 +- ...emistrySet.java => ModelWritingTable.java} | 4 +- .../RenderEnergyBazookaMainProjectile.java | 14 +- .../RenderEnergyBlastProjectile.java | 39 +- .../projectile/RenderFireProjectile.java | 41 + .../renderer/projectile/RenderMeteor.java | 15 +- .../common/rituals/LocalStorageAlphaPact.java | 50 +- .../common/rituals/RitualEffectAlphaPact.java | 357 ++-- .../rituals/RitualEffectAnimalGrowth.java | 33 +- .../rituals/RitualEffectApiaryOverclock.java | 25 +- .../rituals/RitualEffectAutoAlchemy.java | 81 +- .../common/rituals/RitualEffectBinding.java | 106 +- .../rituals/RitualEffectBiomeChanger.java | 114 +- .../rituals/RitualEffectContainment.java | 38 +- .../common/rituals/RitualEffectCrafting.java | 43 +- .../common/rituals/RitualEffectCrushing.java | 116 +- .../rituals/RitualEffectDemonPortal.java | 28 +- .../common/rituals/RitualEffectEllipsoid.java | 49 +- .../rituals/RitualEffectEvaporation.java | 117 +- .../common/rituals/RitualEffectExpulsion.java | 83 +- .../rituals/RitualEffectFeatheredEarth.java | 34 +- .../rituals/RitualEffectFeatheredKnife.java | 17 +- .../common/rituals/RitualEffectFlight.java | 17 +- .../rituals/RitualEffectFullStomach.java | 19 +- .../common/rituals/RitualEffectGrowth.java | 35 +- .../common/rituals/RitualEffectHarvest.java | 34 +- .../common/rituals/RitualEffectHealing.java | 30 +- .../rituals/RitualEffectInterdiction.java | 25 +- .../rituals/RitualEffectItemRouting.java | 51 +- .../rituals/RitualEffectItemSuction.java | 35 +- .../common/rituals/RitualEffectJumping.java | 15 +- .../common/rituals/RitualEffectLava.java | 59 +- .../common/rituals/RitualEffectLeap.java | 11 +- .../rituals/RitualEffectLifeConduit.java | 22 +- .../common/rituals/RitualEffectMagnetic.java | 35 +- .../rituals/RitualEffectOmegaStalling.java | 15 +- .../common/rituals/RitualEffectOmegaTest.java | 35 +- .../common/rituals/RitualEffectSpawnWard.java | 49 +- .../rituals/RitualEffectSphereCreator.java | 30 +- .../rituals/RitualEffectSummonMeteor.java | 13 +- .../rituals/RitualEffectSupression.java | 42 +- .../common/rituals/RitualEffectUnbinding.java | 25 +- .../rituals/RitualEffectVeilOfEvil.java | 37 +- .../common/rituals/RitualEffectWater.java | 66 +- .../rituals/RitualEffectWellOfSuffering.java | 36 +- .../routing/RoutingFocusLogicIgnMeta.java | 2 +- .../routing/RoutingFocusLogicLimit.java | 1 - .../routing/RoutingFocusLogicModItems.java | 4 +- .../common/spell/complex/SpellModifier.java | 21 - .../spell/complex/SpellModifierDefault.java | 9 - .../spell/complex/SpellModifierDefensive.java | 9 - .../complex/SpellModifierEnvironmental.java | 9 - .../spell/complex/SpellModifierOffensive.java | 9 - .../spell/complex/effect/SpellHelper.java | 229 +-- .../cse/earth/CSEMeleeDefaultEarth.java | 1 - .../cse/earth/CSEMeleeDefensiveEarth.java | 1 - .../cse/earth/CSEMeleeEnvironmentalEarth.java | 1 - .../cse/earth/CSEMeleeOffensiveEarth.java | 1 - .../cse/earth/CSEProjectileDefaultEarth.java | 1 - .../CSEProjectileEnvironmentalEarth.java | 1 - .../earth/CSEProjectileOffensiveEarth.java | 1 - .../effect/cse/earth/CSESelfDefaultEarth.java | 1 - .../cse/earth/CSESelfDefensiveEarth.java | 1 - .../cse/earth/CSESelfOffensiveEarth.java | 1 - .../effect/cse/earth/CSEToolDefaultEarth.java | 4 - .../cse/earth/CSEToolEnvironmentalEarth.java | 1 - .../cse/earth/CSEToolOffensiveEarth.java | 1 - .../cse/ice/CSEMeleeEnvironmentalIce.java | 2 +- .../effect/cse/wind/CSEMeleeDefaultWind.java | 1 - .../cse/wind/CSEProjectileDefensiveWind.java | 2 +- .../earth/MeleeDefaultEarth.java | 17 +- .../earth/MeleeDefensiveEarth.java | 17 +- .../earth/MeleeEnvironmentalEarth.java | 22 +- .../earth/MeleeOffensiveEarth.java | 10 +- .../earth/ProjectileDefaultEarth.java | 28 +- .../earth/ProjectileDefensiveEarth.java | 28 +- .../earth/ProjectileEnvironmentalEarth.java | 38 +- .../earth/ProjectileOffensiveEarth.java | 26 +- .../impactEffects/earth/SelfDefaultEarth.java | 20 +- .../earth/SelfDefensiveEarth.java | 2 +- .../earth/SelfOffensiveEarth.java | 16 +- .../earth/ToolEnvironmentalEarth.java | 30 +- .../earth/ToolOffensiveEarth.java | 7 +- .../fire/MeleeDefensiveFire.java | 27 +- .../fire/MeleeEnvironmentalFire.java | 10 +- .../fire/ProjectileDefaultFire.java | 30 +- .../fire/ProjectileDefensiveFire.java | 21 +- .../fire/ProjectileEnvironmentalFire.java | 18 +- .../fire/ProjectileOffensiveFire.java | 20 +- .../impactEffects/fire/SelfDefensiveFire.java | 21 +- .../fire/SelfEnvironmentalFire.java | 23 +- .../impactEffects/fire/ToolDefaultFire.java | 3 +- .../fire/ToolEnvironmentalFire.java | 18 +- .../impactEffects/ice/MeleeDefaultIce.java | 1 - .../impactEffects/ice/MeleeDefensiveIce.java | 29 +- .../impactEffects/ice/MeleeOffensiveIce.java | 19 +- .../ice/ProjectileDefaultIce.java | 19 +- .../ice/ProjectileDefensiveIce.java | 16 +- .../ice/ProjectileEnvironmentalIce.java | 14 +- .../ice/ProjectileOffensiveIce.java | 2 +- .../impactEffects/ice/SelfDefaultIce.java | 19 +- .../ice/SelfEnvironmentalIce.java | 27 +- .../impactEffects/ice/ToolDefaultIce.java | 5 - .../impactEffects/ice/ToolDefensiveIce.java | 31 +- .../impactEffects/tool/DigAreaEffect.java | 100 +- .../impactEffects/tool/DigAreaTunnel.java | 40 +- .../impactEffects/tool/RightClickTunnel.java | 40 +- .../wind/MeleeEnvironmentalWind.java | 17 +- .../wind/ProjectileDefaultWind.java | 5 +- .../wind/ProjectileEnvironmentalWind.java | 14 +- .../wind/ProjectileOffensiveWind.java | 6 +- .../impactEffects/wind/ToolDefensiveWind.java | 5 +- .../wind/ToolEnvironmentalWind.java | 20 +- .../impactEffects/wind/ToolOffensiveWind.java | 2 +- .../spell/simple/HomSpellComponent.java | 1 - .../common/spell/simple/ISimpleSpell.java | 8 +- .../common/spell/simple/SpellEarthBender.java | 127 +- .../common/spell/simple/SpellExplosions.java | 18 +- .../common/spell/simple/SpellFireBurst.java | 93 +- .../common/spell/simple/SpellFrozenWater.java | 117 +- .../common/spell/simple/SpellHolyBlast.java | 27 +- .../spell/simple/SpellLightningBolt.java | 23 +- .../common/spell/simple/SpellTeleport.java | 129 +- .../common/spell/simple/SpellWateryGrave.java | 45 +- .../common/spell/simple/SpellWindGust.java | 32 +- .../summoning/meteor/MeteorParadigm.java | 30 +- .../summoning/meteor/MeteorRegistry.java | 13 +- .../common/thread/GAPIChecker.java | 28 +- .../common/thread/ThreadDownloadGAPI.java | 2 +- ...cinator.java => TEAlchemicCalcinator.java} | 83 +- .../common/tileEntity/TEAltar.java | 91 +- .../common/tileEntity/TEBelljar.java | 46 +- .../common/tileEntity/TEConduit.java | 9 +- .../common/tileEntity/TECrucible.java | 87 +- .../{TESpellTable.java => TEHomHeart.java} | 83 +- .../common/tileEntity/TEInventory.java | 39 +- .../common/tileEntity/TEMasterStone.java | 92 +- .../common/tileEntity/TEMimicBlock.java | 50 +- .../common/tileEntity/TEOrientable.java | 34 +- .../common/tileEntity/TEPedestal.java | 16 +- .../common/tileEntity/TEPlinth.java | 52 +- .../common/tileEntity/TEReagentConduit.java | 122 +- .../common/tileEntity/TESchematicSaver.java | 43 +- .../common/tileEntity/TESocket.java | 9 +- .../common/tileEntity/TESpectralBlock.java | 29 +- .../tileEntity/TESpectralContainer.java | 30 +- .../common/tileEntity/TESpellBlock.java | 13 +- .../common/tileEntity/TESpellEffectBlock.java | 2 +- .../tileEntity/TESpellEnhancementBlock.java | 6 +- .../tileEntity/TESpellModifierBlock.java | 2 +- .../tileEntity/TESpellParadigmBlock.java | 18 +- .../common/tileEntity/TETeleposer.java | 43 +- ...EChemistrySet.java => TEWritingTable.java} | 82 +- .../container/ContainerWritingTable.java | 6 +- .../common/tileEntity/gui/GuiHandler.java | 25 +- ...ChemistrySet.java => GuiWritingTable.java} | 6 +- .../common/tweaker/Alchemy.java | 257 +-- .../common/tweaker/Binding.java | 260 +-- .../common/tweaker/BloodAltar.java | 266 +-- .../common/tweaker/BloodOrb.java | 294 +-- .../common/tweaker/FallingTower.java | 278 +-- .../common/tweaker/HarvestMoon.java | 180 +- .../common/tweaker/MTHelper.java | 164 +- .../tweaker/MineTweakerIntegration.java | 38 +- .../blockstates/base_rune.json | 44 - .../blockstates/soul_armour_forge.json | 5 - .../assets/alchemicalwizardry/lang/en_US.lang | 548 +++--- .../assets/alchemicalwizardry/lang/zh_CN.lang | 268 ++- .../models/block/soul_armour_forge.json | 6 - .../models/item/soul_armour_forge.json | 10 - .../assets/alchemicalwizardryBooks/books.txt | 259 +++ .../alchemicalwizardryBooks/books/book.txt | 370 ++++ .../alchemicalwizardryBooks/lang/en_US.lang | 414 ++++ .../resources/assets/forge/lang/en_US.lang | 5 + .../resources/assets/forge/lang/es_ES.lang | 212 +++ .../resources/assets/forge/lang/fr_FR.lang | 5 + 932 files changed, 39272 insertions(+), 11544 deletions(-) create mode 100644 src/api/java/forestry/api/apiculture/BeeManager.java create mode 100644 src/api/java/forestry/api/apiculture/EnumBeeChromosome.java create mode 100644 src/api/java/forestry/api/apiculture/EnumBeeType.java create mode 100644 src/api/java/forestry/api/apiculture/FlowerManager.java create mode 100644 src/api/java/forestry/api/apiculture/IAlleleBeeEffect.java create mode 100644 src/api/java/forestry/api/apiculture/IAlleleBeeSpecies.java create mode 100644 src/api/java/forestry/api/apiculture/IAlleleBeeSpeciesCustom.java create mode 100644 src/api/java/forestry/api/apiculture/IAlvearyComponent.java create mode 100644 src/api/java/forestry/api/apiculture/IApiaristTracker.java create mode 100644 src/api/java/forestry/api/apiculture/IArmorApiarist.java create mode 100644 src/api/java/forestry/api/apiculture/IBee.java create mode 100644 src/api/java/forestry/api/apiculture/IBeeFactory.java create mode 100644 src/api/java/forestry/api/apiculture/IBeeGenome.java create mode 100644 src/api/java/forestry/api/apiculture/IBeeHousing.java create mode 100644 src/api/java/forestry/api/apiculture/IBeeIconProvider.java create mode 100644 src/api/java/forestry/api/apiculture/IBeeListener.java create mode 100644 src/api/java/forestry/api/apiculture/IBeeModifier.java create mode 100644 src/api/java/forestry/api/apiculture/IBeeMutation.java create mode 100644 src/api/java/forestry/api/apiculture/IBeeMutationCustom.java create mode 100644 src/api/java/forestry/api/apiculture/IBeeMutationFactory.java create mode 100644 src/api/java/forestry/api/apiculture/IBeeRoot.java create mode 100644 src/api/java/forestry/api/apiculture/IBeekeepingLogic.java create mode 100644 src/api/java/forestry/api/apiculture/IBeekeepingMode.java create mode 100644 src/api/java/forestry/api/apiculture/IHiveDrop.java create mode 100644 src/api/java/forestry/api/apiculture/IHiveFrame.java create mode 100644 src/api/java/forestry/api/apiculture/IJubilanceFactory.java create mode 100644 src/api/java/forestry/api/apiculture/IJubilanceProvider.java create mode 100644 src/api/java/forestry/api/apiculture/hives/HiveManager.java create mode 100644 src/api/java/forestry/api/apiculture/hives/IHiveDescription.java create mode 100644 src/api/java/forestry/api/apiculture/hives/IHiveGen.java create mode 100644 src/api/java/forestry/api/apiculture/hives/IHiveGenHelper.java create mode 100644 src/api/java/forestry/api/apiculture/hives/IHiveRegistry.java create mode 100644 src/api/java/forestry/api/apiculture/hives/package-info.java create mode 100644 src/api/java/forestry/api/apiculture/package-info.java create mode 100644 src/api/java/forestry/api/arboriculture/EnumGermlingType.java create mode 100644 src/api/java/forestry/api/arboriculture/EnumGrowthConditions.java create mode 100644 src/api/java/forestry/api/arboriculture/EnumTreeChromosome.java create mode 100644 src/api/java/forestry/api/arboriculture/IAlleleFruit.java create mode 100644 src/api/java/forestry/api/arboriculture/IAlleleGrowth.java create mode 100644 src/api/java/forestry/api/arboriculture/IAlleleLeafEffect.java create mode 100644 src/api/java/forestry/api/arboriculture/IAlleleTreeSpecies.java create mode 100644 src/api/java/forestry/api/arboriculture/IArboristTracker.java create mode 100644 src/api/java/forestry/api/arboriculture/IFruitProvider.java create mode 100644 src/api/java/forestry/api/arboriculture/IGrowthProvider.java create mode 100644 src/api/java/forestry/api/arboriculture/ILeafTickHandler.java create mode 100644 src/api/java/forestry/api/arboriculture/IToolGrafter.java create mode 100644 src/api/java/forestry/api/arboriculture/ITree.java create mode 100644 src/api/java/forestry/api/arboriculture/ITreeGenome.java create mode 100644 src/api/java/forestry/api/arboriculture/ITreeModifier.java create mode 100644 src/api/java/forestry/api/arboriculture/ITreeMutation.java create mode 100644 src/api/java/forestry/api/arboriculture/ITreeRoot.java create mode 100644 src/api/java/forestry/api/arboriculture/ITreekeepingMode.java create mode 100644 src/api/java/forestry/api/arboriculture/package-info.java create mode 100644 src/api/java/forestry/api/circuits/ChipsetManager.java create mode 100644 src/api/java/forestry/api/circuits/ICircuit.java create mode 100644 src/api/java/forestry/api/circuits/ICircuitBoard.java create mode 100644 src/api/java/forestry/api/circuits/ICircuitLayout.java create mode 100644 src/api/java/forestry/api/circuits/ICircuitLibrary.java create mode 100644 src/api/java/forestry/api/circuits/ICircuitRegistry.java create mode 100644 src/api/java/forestry/api/circuits/ISolderManager.java create mode 100644 src/api/java/forestry/api/circuits/package-info.java create mode 100644 src/api/java/forestry/api/core/BiomeHelper.java create mode 100644 src/api/java/forestry/api/core/EnumHumidity.java create mode 100644 src/api/java/forestry/api/core/EnumTemperature.java create mode 100644 src/api/java/forestry/api/core/ErrorStateRegistry.java create mode 100644 src/api/java/forestry/api/core/ForestryAPI.java create mode 100644 src/api/java/forestry/api/core/ForestryEvent.java create mode 100644 src/api/java/forestry/api/core/IArmorNaturalist.java create mode 100644 src/api/java/forestry/api/core/IErrorState.java create mode 100644 src/api/java/forestry/api/core/IForestryConstants.java create mode 100644 src/api/java/forestry/api/core/IGameMode.java create mode 100644 src/api/java/forestry/api/core/IIconProvider.java create mode 100644 src/api/java/forestry/api/core/INBTTagable.java create mode 100644 src/api/java/forestry/api/core/IStructureLogic.java create mode 100644 src/api/java/forestry/api/core/ITextureManager.java create mode 100644 src/api/java/forestry/api/core/ITileStructure.java create mode 100644 src/api/java/forestry/api/core/IToolPipette.java create mode 100644 src/api/java/forestry/api/core/IToolScoop.java create mode 100644 src/api/java/forestry/api/core/Tabs.java create mode 100644 src/api/java/forestry/api/core/package-info.java create mode 100644 src/api/java/forestry/api/farming/Farmables.java create mode 100644 src/api/java/forestry/api/farming/ICrop.java create mode 100644 src/api/java/forestry/api/farming/IFarmComponent.java create mode 100644 src/api/java/forestry/api/farming/IFarmHousing.java create mode 100644 src/api/java/forestry/api/farming/IFarmInterface.java create mode 100644 src/api/java/forestry/api/farming/IFarmListener.java create mode 100644 src/api/java/forestry/api/farming/IFarmLogic.java create mode 100644 src/api/java/forestry/api/farming/IFarmable.java create mode 100644 src/api/java/forestry/api/farming/package-info.java create mode 100644 src/api/java/forestry/api/food/BeverageManager.java create mode 100644 src/api/java/forestry/api/food/IBeverageEffect.java create mode 100644 src/api/java/forestry/api/food/IInfuserManager.java create mode 100644 src/api/java/forestry/api/food/IIngredientManager.java create mode 100644 src/api/java/forestry/api/food/package-info.java create mode 100644 src/api/java/forestry/api/fuels/EngineBronzeFuel.java create mode 100644 src/api/java/forestry/api/fuels/EngineCopperFuel.java create mode 100644 src/api/java/forestry/api/fuels/FermenterFuel.java create mode 100644 src/api/java/forestry/api/fuels/FuelManager.java create mode 100644 src/api/java/forestry/api/fuels/GeneratorFuel.java create mode 100644 src/api/java/forestry/api/fuels/MoistenerFuel.java create mode 100644 src/api/java/forestry/api/fuels/RainSubstrate.java create mode 100644 src/api/java/forestry/api/fuels/package-info.java create mode 100644 src/api/java/forestry/api/genetics/AlleleManager.java create mode 100644 src/api/java/forestry/api/genetics/EnumTolerance.java create mode 100644 src/api/java/forestry/api/genetics/IAllele.java create mode 100644 src/api/java/forestry/api/genetics/IAlleleArea.java create mode 100644 src/api/java/forestry/api/genetics/IAlleleBoolean.java create mode 100644 src/api/java/forestry/api/genetics/IAlleleEffect.java create mode 100644 src/api/java/forestry/api/genetics/IAlleleFactory.java create mode 100644 src/api/java/forestry/api/genetics/IAlleleFloat.java create mode 100644 src/api/java/forestry/api/genetics/IAlleleFlowers.java create mode 100644 src/api/java/forestry/api/genetics/IAlleleHandler.java create mode 100644 src/api/java/forestry/api/genetics/IAlleleInteger.java create mode 100644 src/api/java/forestry/api/genetics/IAllelePlantType.java create mode 100644 src/api/java/forestry/api/genetics/IAlleleRegistry.java create mode 100644 src/api/java/forestry/api/genetics/IAlleleSpecies.java create mode 100644 src/api/java/forestry/api/genetics/IAlleleSpeciesCustom.java create mode 100644 src/api/java/forestry/api/genetics/IAlleleTolerance.java create mode 100644 src/api/java/forestry/api/genetics/IBreedingTracker.java create mode 100644 src/api/java/forestry/api/genetics/IChromosome.java create mode 100644 src/api/java/forestry/api/genetics/IChromosomeType.java create mode 100644 src/api/java/forestry/api/genetics/IClassification.java create mode 100644 src/api/java/forestry/api/genetics/IClimateHelper.java create mode 100644 src/api/java/forestry/api/genetics/IEffectData.java create mode 100644 src/api/java/forestry/api/genetics/IFlower.java create mode 100644 src/api/java/forestry/api/genetics/IFlowerGrowthRule.java create mode 100644 src/api/java/forestry/api/genetics/IFlowerProvider.java create mode 100644 src/api/java/forestry/api/genetics/IFlowerRegistry.java create mode 100644 src/api/java/forestry/api/genetics/IFruitBearer.java create mode 100644 src/api/java/forestry/api/genetics/IFruitFamily.java create mode 100644 src/api/java/forestry/api/genetics/IGenome.java create mode 100644 src/api/java/forestry/api/genetics/IHousing.java create mode 100644 src/api/java/forestry/api/genetics/IIndividual.java create mode 100644 src/api/java/forestry/api/genetics/IIndividualLiving.java create mode 100644 src/api/java/forestry/api/genetics/ILegacyHandler.java create mode 100644 src/api/java/forestry/api/genetics/IMutation.java create mode 100644 src/api/java/forestry/api/genetics/IMutationCondition.java create mode 100644 src/api/java/forestry/api/genetics/IMutationCustom.java create mode 100644 src/api/java/forestry/api/genetics/IPollinatable.java create mode 100644 src/api/java/forestry/api/genetics/ISpeciesRoot.java create mode 100644 src/api/java/forestry/api/genetics/package-info.java create mode 100644 src/api/java/forestry/api/lepidopterology/EnumButterflyChromosome.java create mode 100644 src/api/java/forestry/api/lepidopterology/EnumFlutterType.java create mode 100644 src/api/java/forestry/api/lepidopterology/IAlleleButterflyEffect.java create mode 100644 src/api/java/forestry/api/lepidopterology/IAlleleButterflySpecies.java create mode 100644 src/api/java/forestry/api/lepidopterology/IButterfly.java create mode 100644 src/api/java/forestry/api/lepidopterology/IButterflyGenome.java create mode 100644 src/api/java/forestry/api/lepidopterology/IButterflyMutation.java create mode 100644 src/api/java/forestry/api/lepidopterology/IButterflyNursery.java create mode 100644 src/api/java/forestry/api/lepidopterology/IButterflyRoot.java create mode 100644 src/api/java/forestry/api/lepidopterology/IEntityButterfly.java create mode 100644 src/api/java/forestry/api/lepidopterology/ILepidopteristTracker.java create mode 100644 src/api/java/forestry/api/lepidopterology/package-info.java create mode 100644 src/api/java/forestry/api/mail/EnumAddressee.java create mode 100644 src/api/java/forestry/api/mail/EnumPostage.java create mode 100644 src/api/java/forestry/api/mail/ILetter.java create mode 100644 src/api/java/forestry/api/mail/ILetterHandler.java create mode 100644 src/api/java/forestry/api/mail/IMailAddress.java create mode 100644 src/api/java/forestry/api/mail/IPostOffice.java create mode 100644 src/api/java/forestry/api/mail/IPostRegistry.java create mode 100644 src/api/java/forestry/api/mail/IPostalCarrier.java create mode 100644 src/api/java/forestry/api/mail/IPostalState.java create mode 100644 src/api/java/forestry/api/mail/IStamps.java create mode 100644 src/api/java/forestry/api/mail/ITradeStation.java create mode 100644 src/api/java/forestry/api/mail/PostManager.java create mode 100644 src/api/java/forestry/api/mail/TradeStationInfo.java create mode 100644 src/api/java/forestry/api/mail/package-info.java create mode 100644 src/api/java/forestry/api/recipes/ICarpenterManager.java create mode 100644 src/api/java/forestry/api/recipes/ICentrifugeManager.java create mode 100644 src/api/java/forestry/api/recipes/ICraftingProvider.java create mode 100644 src/api/java/forestry/api/recipes/IFabricatorManager.java create mode 100644 src/api/java/forestry/api/recipes/IFermenterManager.java create mode 100644 src/api/java/forestry/api/recipes/IMoistenerManager.java create mode 100644 src/api/java/forestry/api/recipes/ISqueezerManager.java create mode 100644 src/api/java/forestry/api/recipes/IStillManager.java create mode 100644 src/api/java/forestry/api/recipes/IVariableFermentable.java create mode 100644 src/api/java/forestry/api/recipes/RecipeManagers.java create mode 100644 src/api/java/forestry/api/recipes/package-info.java create mode 100644 src/api/java/forestry/api/storage/BackpackEvent.java create mode 100644 src/api/java/forestry/api/storage/BackpackManager.java create mode 100644 src/api/java/forestry/api/storage/BackpackResupplyEvent.java create mode 100644 src/api/java/forestry/api/storage/BackpackStowEvent.java create mode 100644 src/api/java/forestry/api/storage/EnumBackpackType.java create mode 100644 src/api/java/forestry/api/storage/IBackpackDefinition.java create mode 100644 src/api/java/forestry/api/storage/IBackpackInterface.java create mode 100644 src/api/java/forestry/api/storage/ICrateRegistry.java create mode 100644 src/api/java/forestry/api/storage/StorageManager.java create mode 100644 src/api/java/forestry/api/storage/package-info.java create mode 100644 src/api/java/forestry/api/world/ITreeGenData.java create mode 100644 src/api/java/forestry/api/world/IWorldGenInterface.java create mode 100644 src/api/java/forestry/api/world/WorldGenManager.java create mode 100644 src/api/java/forestry/api/world/package-info.java create mode 100644 src/api/java/pneumaticCraft/api/IHeatExchangerLogic.java create mode 100644 src/api/java/pneumaticCraft/api/PneumaticRegistry.java create mode 100644 src/api/java/pneumaticCraft/api/actuator/IActuator.java create mode 100644 src/api/java/pneumaticCraft/api/block/BlockSupplier.java create mode 100644 src/api/java/pneumaticCraft/api/block/IPneumaticWrenchable.java create mode 100644 src/api/java/pneumaticCraft/api/client/GuiAnimatedStatSupplier.java create mode 100644 src/api/java/pneumaticCraft/api/client/GuiElementRenderer.java create mode 100644 src/api/java/pneumaticCraft/api/client/IGuiAnimatedStat.java create mode 100644 src/api/java/pneumaticCraft/api/client/assemblymachine/AssemblyRenderOverriding.java create mode 100644 src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IBlockTrackEntry.java create mode 100644 src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IEntityTrackEntry.java create mode 100644 src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IGuiScreen.java create mode 100644 src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableBlock.java create mode 100644 src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableEntity.java create mode 100644 src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IOptionPage.java create mode 100644 src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IUpgradeRenderHandler.java create mode 100644 src/api/java/pneumaticCraft/api/client/pneumaticHelmet/RenderHandlerRegistry.java create mode 100644 src/api/java/pneumaticCraft/api/drone/DroneConstructingEvent.java create mode 100644 src/api/java/pneumaticCraft/api/drone/IBlockInteractHandler.java create mode 100644 src/api/java/pneumaticCraft/api/drone/ICustomBlockInteract.java create mode 100644 src/api/java/pneumaticCraft/api/drone/IDrone.java create mode 100644 src/api/java/pneumaticCraft/api/drone/IPathNavigator.java create mode 100644 src/api/java/pneumaticCraft/api/drone/IPathfindHandler.java create mode 100644 src/api/java/pneumaticCraft/api/drone/SpecialVariableRetrievalEvent.java create mode 100644 src/api/java/pneumaticCraft/api/item/IInventoryItem.java create mode 100644 src/api/java/pneumaticCraft/api/item/IPressurizable.java create mode 100644 src/api/java/pneumaticCraft/api/item/IProgrammable.java create mode 100644 src/api/java/pneumaticCraft/api/item/ItemSupplier.java create mode 100644 src/api/java/pneumaticCraft/api/package-info.java create mode 100644 src/api/java/pneumaticCraft/api/recipe/AssemblyRecipe.java create mode 100644 src/api/java/pneumaticCraft/api/recipe/IPressureChamberRecipe.java create mode 100644 src/api/java/pneumaticCraft/api/recipe/PressureChamberRecipe.java create mode 100644 src/api/java/pneumaticCraft/api/tileentity/AirHandlerSupplier.java create mode 100644 src/api/java/pneumaticCraft/api/tileentity/IAirHandler.java create mode 100644 src/api/java/pneumaticCraft/api/tileentity/IHeatExchanger.java create mode 100644 src/api/java/pneumaticCraft/api/tileentity/IManoMeasurable.java create mode 100644 src/api/java/pneumaticCraft/api/tileentity/IPneumaticMachine.java create mode 100644 src/api/java/pneumaticCraft/api/universalSensor/EntityPollSensor.java create mode 100644 src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinateEventSensor.java create mode 100644 src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinatePollSensor.java create mode 100644 src/api/java/pneumaticCraft/api/universalSensor/IEventSensorSetting.java create mode 100644 src/api/java/pneumaticCraft/api/universalSensor/IPollSensorSetting.java create mode 100644 src/api/java/pneumaticCraft/api/universalSensor/ISensorSetting.java create mode 100644 src/api/java/pneumaticCraft/api/universalSensor/PlayerEventSensor.java create mode 100644 src/api/java/pneumaticCraft/api/universalSensor/SensorRegistrator.java create mode 100644 src/api/java/thaumcraft/api/IGoggles.java create mode 100644 src/api/java/thaumcraft/api/IRepairable.java create mode 100644 src/api/java/thaumcraft/api/IRepairableExtended.java create mode 100644 src/api/java/thaumcraft/api/IRunicArmor.java create mode 100644 src/api/java/thaumcraft/api/IScribeTools.java create mode 100644 src/api/java/thaumcraft/api/IVisDiscountGear.java create mode 100644 src/api/java/thaumcraft/api/ItemApi.java create mode 100644 src/api/java/thaumcraft/api/ItemRunic.java create mode 100644 src/api/java/thaumcraft/api/ThaumcraftApi.java create mode 100644 src/api/java/thaumcraft/api/ThaumcraftApiHelper.java create mode 100644 src/api/java/thaumcraft/api/TileThaumcraft.java create mode 100644 src/api/java/thaumcraft/api/WorldCoordinates.java create mode 100644 src/api/java/thaumcraft/api/aspects/Aspect.java create mode 100644 src/api/java/thaumcraft/api/aspects/AspectList.java create mode 100644 src/api/java/thaumcraft/api/aspects/AspectSourceHelper.java create mode 100644 src/api/java/thaumcraft/api/aspects/IAspectContainer.java create mode 100644 src/api/java/thaumcraft/api/aspects/IAspectSource.java create mode 100644 src/api/java/thaumcraft/api/aspects/IEssentiaContainerItem.java create mode 100644 src/api/java/thaumcraft/api/aspects/IEssentiaTransport.java create mode 100644 src/api/java/thaumcraft/api/crafting/CrucibleRecipe.java create mode 100644 src/api/java/thaumcraft/api/crafting/IArcaneRecipe.java create mode 100644 src/api/java/thaumcraft/api/crafting/IInfusionStabiliser.java create mode 100644 src/api/java/thaumcraft/api/crafting/InfusionEnchantmentRecipe.java create mode 100644 src/api/java/thaumcraft/api/crafting/InfusionRecipe.java create mode 100644 src/api/java/thaumcraft/api/crafting/ShapedArcaneRecipe.java create mode 100644 src/api/java/thaumcraft/api/crafting/ShapelessArcaneRecipe.java create mode 100644 src/api/java/thaumcraft/api/damagesource/DamageSourceIndirectThaumcraftEntity.java create mode 100644 src/api/java/thaumcraft/api/damagesource/DamageSourceThaumcraft.java create mode 100644 src/api/java/thaumcraft/api/entities/ITaintedMob.java create mode 100644 src/api/java/thaumcraft/api/nodes/INode.java create mode 100644 src/api/java/thaumcraft/api/nodes/IRevealer.java create mode 100644 src/api/java/thaumcraft/api/nodes/NodeModifier.java create mode 100644 src/api/java/thaumcraft/api/nodes/NodeType.java create mode 100644 src/api/java/thaumcraft/api/package-info.java create mode 100644 src/api/java/thaumcraft/api/potions/PotionFluxTaint.java create mode 100644 src/api/java/thaumcraft/api/research/IScanEventHandler.java create mode 100644 src/api/java/thaumcraft/api/research/ResearchCategories.java create mode 100644 src/api/java/thaumcraft/api/research/ResearchCategoryList.java create mode 100644 src/api/java/thaumcraft/api/research/ResearchItem.java create mode 100644 src/api/java/thaumcraft/api/research/ResearchPage.java create mode 100644 src/api/java/thaumcraft/api/research/ScanResult.java create mode 100644 src/api/java/thaumcraft/api/visnet/TileVisNode.java create mode 100644 src/api/java/thaumcraft/api/visnet/VisNetHandler.java create mode 100644 src/api/java/thaumcraft/api/wands/IWandFocus.java create mode 100644 src/api/java/thaumcraft/api/wands/IWandRodOnUpdate.java create mode 100644 src/api/java/thaumcraft/api/wands/IWandTriggerManager.java create mode 100644 src/api/java/thaumcraft/api/wands/IWandable.java create mode 100644 src/api/java/thaumcraft/api/wands/ItemFocusBasic.java create mode 100644 src/api/java/thaumcraft/api/wands/StaffRod.java create mode 100644 src/api/java/thaumcraft/api/wands/WandCap.java create mode 100644 src/api/java/thaumcraft/api/wands/WandRod.java create mode 100644 src/api/java/thaumcraft/api/wands/WandTriggerRegistry.java create mode 100644 src/api/java/vazkii/botania/api/BotaniaAPI.java create mode 100644 src/api/java/vazkii/botania/api/internal/DummyManaNetwork.java create mode 100644 src/api/java/vazkii/botania/api/internal/DummyMethodHandler.java create mode 100644 src/api/java/vazkii/botania/api/internal/DummyPage.java create mode 100644 src/api/java/vazkii/botania/api/internal/DummySubTile.java create mode 100644 src/api/java/vazkii/botania/api/internal/IGuiLexiconEntry.java create mode 100644 src/api/java/vazkii/botania/api/internal/IInternalMethodHandler.java create mode 100644 src/api/java/vazkii/botania/api/internal/IManaBurst.java create mode 100644 src/api/java/vazkii/botania/api/internal/IManaNetwork.java create mode 100644 src/api/java/vazkii/botania/api/item/IExoflameHeatable.java create mode 100644 src/api/java/vazkii/botania/api/item/IExtendedPlayerController.java create mode 100644 src/api/java/vazkii/botania/api/item/IPetalApothecary.java create mode 100644 src/api/java/vazkii/botania/api/item/IPixieSpawner.java create mode 100644 src/api/java/vazkii/botania/api/lexicon/IAddonEntry.java create mode 100644 src/api/java/vazkii/botania/api/lexicon/ILexicon.java create mode 100644 src/api/java/vazkii/botania/api/lexicon/ILexiconable.java create mode 100644 src/api/java/vazkii/botania/api/lexicon/IRecipeKeyProvider.java create mode 100644 src/api/java/vazkii/botania/api/lexicon/KnowledgeType.java create mode 100644 src/api/java/vazkii/botania/api/lexicon/LexiconCategory.java create mode 100644 src/api/java/vazkii/botania/api/lexicon/LexiconEntry.java create mode 100644 src/api/java/vazkii/botania/api/lexicon/LexiconPage.java create mode 100644 src/api/java/vazkii/botania/api/lexicon/LexiconRecipeMappings.java create mode 100644 src/api/java/vazkii/botania/api/mana/BurstProperties.java create mode 100644 src/api/java/vazkii/botania/api/mana/IClientManaHandler.java create mode 100644 src/api/java/vazkii/botania/api/mana/ICreativeManaProvider.java create mode 100644 src/api/java/vazkii/botania/api/mana/IKeyLocked.java create mode 100644 src/api/java/vazkii/botania/api/mana/ILaputaImmobile.java create mode 100644 src/api/java/vazkii/botania/api/mana/ILens.java create mode 100644 src/api/java/vazkii/botania/api/mana/ILensEffect.java create mode 100644 src/api/java/vazkii/botania/api/mana/IManaBlock.java create mode 100644 src/api/java/vazkii/botania/api/mana/IManaCollector.java create mode 100644 src/api/java/vazkii/botania/api/mana/IManaCollisionGhost.java create mode 100644 src/api/java/vazkii/botania/api/mana/IManaItem.java create mode 100644 src/api/java/vazkii/botania/api/mana/IManaPool.java create mode 100644 src/api/java/vazkii/botania/api/mana/IManaReceiver.java create mode 100644 src/api/java/vazkii/botania/api/mana/IManaTrigger.java create mode 100644 src/api/java/vazkii/botania/api/mana/IManaUsingItem.java create mode 100644 src/api/java/vazkii/botania/api/mana/IPoolOverlayProvider.java create mode 100644 src/api/java/vazkii/botania/api/mana/ITinyPlanetExcempt.java create mode 100644 src/api/java/vazkii/botania/api/mana/ManaItemHandler.java create mode 100644 src/api/java/vazkii/botania/api/mana/ManaNetworkEvent.java create mode 100644 src/api/java/vazkii/botania/api/mana/TileSignature.java create mode 100644 src/api/java/vazkii/botania/api/mana/spark/ISparkAttachable.java create mode 100644 src/api/java/vazkii/botania/api/mana/spark/ISparkEntity.java create mode 100644 src/api/java/vazkii/botania/api/mana/spark/SparkHelper.java create mode 100644 src/api/java/vazkii/botania/api/package-info.java create mode 100644 src/api/java/vazkii/botania/api/recipe/IElvenItem.java create mode 100644 src/api/java/vazkii/botania/api/recipe/IFlowerComponent.java create mode 100644 src/api/java/vazkii/botania/api/recipe/RecipeElvenTrade.java create mode 100644 src/api/java/vazkii/botania/api/recipe/RecipeManaInfusion.java create mode 100644 src/api/java/vazkii/botania/api/recipe/RecipePetals.java create mode 100644 src/api/java/vazkii/botania/api/recipe/RecipeRuneAltar.java create mode 100644 src/api/java/vazkii/botania/api/subtile/ISpecialFlower.java create mode 100644 src/api/java/vazkii/botania/api/subtile/ISubTileContainer.java create mode 100644 src/api/java/vazkii/botania/api/subtile/SubTileEntity.java create mode 100644 src/api/java/vazkii/botania/api/subtile/SubTileFunctional.java create mode 100644 src/api/java/vazkii/botania/api/subtile/SubTileGenerating.java create mode 100644 src/api/java/vazkii/botania/api/wand/ICoordBoundItem.java create mode 100644 src/api/java/vazkii/botania/api/wand/ITileBound.java create mode 100644 src/api/java/vazkii/botania/api/wand/IWandBindable.java create mode 100644 src/api/java/vazkii/botania/api/wand/IWandHUD.java create mode 100644 src/api/java/vazkii/botania/api/wand/IWandable.java create mode 100644 src/api/java/vazkii/botania/api/wand/IWireframeAABBProvider.java create mode 100644 src/api/java/vazkii/botania/api/wiki/IWikiProvider.java create mode 100644 src/api/java/vazkii/botania/api/wiki/SimpleWikiProvider.java create mode 100644 src/api/java/vazkii/botania/api/wiki/WikiHooks.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/BlockRenderer.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/ClientUtils.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/client/POVArmourModelWrapper.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/achievements/ICraftAchievement.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/achievements/IPickupAchievement.java rename src/main/java/WayofTime/alchemicalWizardry/common/block/{BlockArmourForge.java => ArmourForge.java} (73%) rename src/main/java/WayofTime/alchemicalWizardry/common/block/{BlockAlchemicalCalcinator.java => BlockAlchemicCalcinator.java} (75%) delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodRune.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodStoneBrick.java rename src/main/java/WayofTime/alchemicalWizardry/common/block/{BlockIncenseCrucible.java => BlockCrucible.java} (59%) delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEfficiencyRune.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEmptySocket.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockHomHeart.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLargeBloodStoneBrick.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLifeEssence.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMimic.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRitualStone.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSacrifice.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSelfSacrifice.java rename src/main/java/WayofTime/alchemicalWizardry/common/block/{BlockFilledSocket.java => BlockSocket.java} (60%) delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpeedRune.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java rename src/main/java/WayofTime/alchemicalWizardry/common/block/{BlockChemistrySet.java => BlockWritingTable.java} (50%) create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BloodRune.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/BloodStoneBrick.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/EfficiencyRune.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/EmptySocket.java rename src/main/java/WayofTime/alchemicalWizardry/common/block/{BlockImperfectRitualStone.java => ImperfectRitualStone.java} (70%) create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/LargeBloodStoneBrick.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/LifeEssenceBlock.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/MimicBlock.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/RitualStone.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSacrifice.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSelfSacrifice.java rename src/main/java/WayofTime/alchemicalWizardry/common/block/{BlockSpectral.java => SpectralBlock.java} (54%) create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/block/SpeedRune.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandBind.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandSN.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandUnbind.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/TileBlockSet.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBeamParticle.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/harvest/AgriCraftCropHarvestHandler.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/AWBaseItems.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/BaseItems.java rename src/main/java/WayofTime/alchemicalWizardry/common/items/{CreativeOrb.java => CheatyItem.java} (58%) delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/DemonCrystal.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java rename src/main/java/WayofTime/alchemicalWizardry/common/items/{Orb.java => EnergyBattery.java} (83%) rename src/main/java/WayofTime/alchemicalWizardry/common/items/{EnergyBlaster.java => EnergyBlast.java} (67%) rename src/main/java/WayofTime/alchemicalWizardry/common/items/{BindableItems.java => EnergyItems.java} (87%) rename src/main/java/WayofTime/alchemicalWizardry/common/items/{BoundBlade.java => EnergySword.java} (67%) rename src/main/java/WayofTime/alchemicalWizardry/common/items/{KeyOfBinding.java => ItemDiabloKey.java} (76%) create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/OrbOfTesting.java rename src/main/java/WayofTime/alchemicalWizardry/common/items/energy/{AlchemicalRouter.java => ItemAttunedCrystal.java} (78%) rename src/main/java/WayofTime/alchemicalWizardry/common/items/energy/{AlchemicalCleanser.java => ItemDestinationClearer.java} (69%) rename src/main/java/WayofTime/alchemicalWizardry/common/items/energy/{AlchemicalSegmenter.java => ItemTankSegmenter.java} (74%) rename src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/{SigilCompress.java => SigilPackRat.java} (60%) delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilToggleable.java rename src/main/java/WayofTime/alchemicalWizardry/common/potion/{PotionBloodMagic.java => PotionAmphibian.java} (53%) create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBoost.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDeaf.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDemonCloak.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDrowning.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFeatherFall.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFireFuse.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlameCloak.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlight.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionHeavyHeart.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionIceCloak.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionInhibit.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionPlanarBinding.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionProjectileProtect.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionReciprocation.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulFray.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulHarden.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/BeamRenderer.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicalCalcinator.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAltar.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderChemistrySet.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java rename src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/{TEChemistrySetItemRenderer.java => TEWritingTableItemRenderer.java} (85%) rename src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/{ModelChemistrySet.java => ModelWritingTable.java} (98%) create mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderFireProjectile.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifier.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefault.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefensive.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierEnvironmental.java delete mode 100644 src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierOffensive.java rename src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/{TEAlchemicalCalcinator.java => TEAlchemicCalcinator.java} (86%) rename src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/{TESpellTable.java => TEHomHeart.java} (55%) rename src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/{TEChemistrySet.java => TEWritingTable.java} (88%) rename src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/{GuiChemistrySet.java => GuiWritingTable.java} (87%) delete mode 100644 src/main/resources/assets/alchemicalwizardry/blockstates/base_rune.json delete mode 100644 src/main/resources/assets/alchemicalwizardry/blockstates/soul_armour_forge.json delete mode 100644 src/main/resources/assets/alchemicalwizardry/models/block/soul_armour_forge.json delete mode 100644 src/main/resources/assets/alchemicalwizardry/models/item/soul_armour_forge.json create mode 100644 src/main/resources/assets/alchemicalwizardryBooks/books.txt create mode 100644 src/main/resources/assets/alchemicalwizardryBooks/books/book.txt create mode 100644 src/main/resources/assets/alchemicalwizardryBooks/lang/en_US.lang create mode 100644 src/main/resources/assets/forge/lang/en_US.lang create mode 100644 src/main/resources/assets/forge/lang/es_ES.lang create mode 100644 src/main/resources/assets/forge/lang/fr_FR.lang diff --git a/src/api/java/forestry/api/apiculture/BeeManager.java b/src/api/java/forestry/api/apiculture/BeeManager.java new file mode 100644 index 00000000..80b03a46 --- /dev/null +++ b/src/api/java/forestry/api/apiculture/BeeManager.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import java.util.ArrayList; +import java.util.HashMap; + +import net.minecraft.item.ItemStack; +/** + * + * Some miscellaneous lists and settings for bees. + * + * @author SirSengir + */ +public class BeeManager { + + /** + * 0 - Common Village Bees 1 - Uncommon Village Bees (20 % of spawns) + */ + public static ArrayList<IBeeGenome>[] villageBees; + + /** + * List of items that can induce swarming. Integer denotes x in 1000 chance. + */ + public static HashMap<ItemStack, Integer> inducers = new HashMap<ItemStack, Integer>(); + + /** + * Convenient access to AlleleManager.alleleRegistry.getSpeciesRoot("rootBees") + */ + public static IBeeRoot beeRoot; + + /** + * Used to create new bees. + */ + public static IBeeFactory beeFactory; + + /** + * Used to create new bee mutations. + */ + public static IBeeMutationFactory beeMutationFactory; + + /** + * Used to get Forestry's jubilance implementations. + */ + public static IJubilanceFactory jubilanceFactory; +} diff --git a/src/api/java/forestry/api/apiculture/EnumBeeChromosome.java b/src/api/java/forestry/api/apiculture/EnumBeeChromosome.java new file mode 100644 index 00000000..165247ef --- /dev/null +++ b/src/api/java/forestry/api/apiculture/EnumBeeChromosome.java @@ -0,0 +1,102 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import forestry.api.genetics.IAllele; +import forestry.api.genetics.IAlleleArea; +import forestry.api.genetics.IAlleleBoolean; +import forestry.api.genetics.IAlleleFloat; +import forestry.api.genetics.IAlleleFlowers; +import forestry.api.genetics.IAlleleInteger; +import forestry.api.genetics.IAlleleTolerance; +import forestry.api.genetics.IChromosomeType; +import forestry.api.genetics.ISpeciesRoot; + +/** + * Enum representing the order of chromosomes in a bee's genome and what they control. + * + * @author SirSengir + */ +public enum EnumBeeChromosome implements IChromosomeType { + /** + * Species of the bee. Alleles here must implement {@link IAlleleBeeSpecies}. + */ + SPECIES(IAlleleBeeSpecies.class), + /** + * (Production) Speed of the bee. + */ + SPEED(IAlleleFloat.class), + /** + * Lifespan of the bee. + */ + LIFESPAN(IAlleleInteger.class), + /** + * Fertility of the bee. Determines number of offspring. + */ + FERTILITY(IAlleleInteger.class), + /** + * Temperature difference to its native supported one the bee can tolerate. + */ + TEMPERATURE_TOLERANCE(IAlleleTolerance.class), + /** + * Slightly incorrectly named. If true, a naturally dirunal bee can work during the night. If true, a naturally nocturnal bee can work during the day. + */ + NOCTURNAL(IAlleleBoolean.class), + /** + * Not used / superseded by fixed values for the species. Probably going to be replaced with a boolean for FIRE_RESIST. + */ + @Deprecated + HUMIDITY(IAllele.class), + /** + * Humidity difference to its native supported one the bee can tolerate. + */ + HUMIDITY_TOLERANCE(IAlleleTolerance.class), + /** + * If true the bee can work during rain. + */ + TOLERANT_FLYER(IAlleleBoolean.class), + /** + * If true, the bee can work without a clear view of the sky. + */ + CAVE_DWELLING(IAlleleBoolean.class), + /** + * Contains the supported flower provider. + */ + FLOWER_PROVIDER(IAlleleFlowers.class), + /** + * Determines pollination speed. + */ + FLOWERING(IAlleleInteger.class), + /** + * Determines the size of the bee's territory. + */ + TERRITORY(IAlleleArea.class), + /** + * Determines the bee's effect. + */ + EFFECT(IAlleleBeeEffect.class); + + Class<? extends IAllele> clss; + + EnumBeeChromosome(Class<? extends IAllele> clss) { + this.clss = clss; + } + + @Override + public Class<? extends IAllele> getAlleleClass() { + return clss; + } + + @Override + public String getName() { + return this.toString().toLowerCase(); + } + + @Override + public ISpeciesRoot getSpeciesRoot() { + return BeeManager.beeRoot; + } +} diff --git a/src/api/java/forestry/api/apiculture/EnumBeeType.java b/src/api/java/forestry/api/apiculture/EnumBeeType.java new file mode 100644 index 00000000..e3e45c2b --- /dev/null +++ b/src/api/java/forestry/api/apiculture/EnumBeeType.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import java.util.Locale; + +public enum EnumBeeType { + DRONE, PRINCESS, QUEEN, LARVAE, NONE; + + public static final EnumBeeType[] VALUES = values(); + + String name; + + private EnumBeeType() { + this.name = this.toString().toLowerCase(Locale.ENGLISH); + } + + public String getName() { + return name; + } +} diff --git a/src/api/java/forestry/api/apiculture/FlowerManager.java b/src/api/java/forestry/api/apiculture/FlowerManager.java new file mode 100644 index 00000000..667b4489 --- /dev/null +++ b/src/api/java/forestry/api/apiculture/FlowerManager.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import java.util.ArrayList; + +import net.minecraft.item.ItemStack; + +import forestry.api.genetics.IFlowerProvider; +import forestry.api.genetics.IFlowerRegistry; + +public class FlowerManager { + /** + * ItemStacks representing simple flower blocks. Meta-sensitive, processed by the basic {@link IFlowerProvider}. + * + * @deprecated since Forestry 3.4. Use {@link #IFlowerRegistry.registerPlantableFlower(ItemStack flower, double weight, String... flowerTypes)} instead. + * <blockquote><pre>e.g. FlowerManager.flowerRegister.registerPlantableFlower(new ItemStack(Blocks.red_flower), 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow);</pre></blockquote> + */ + @Deprecated + public static ArrayList<ItemStack> plainFlowers = new ArrayList<ItemStack>(); + + /** + * <blockquote><pre>e.g. FlowerManager.flowerRegister.registerPlantableFlower(new ItemStack(Blocks.red_flower), 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow);</pre></blockquote> + */ + public static IFlowerRegistry flowerRegistry; + + public static final String FlowerTypeVanilla = "flowersVanilla"; + public static final String FlowerTypeNether = "flowersNether"; + public static final String FlowerTypeCacti = "flowersCacti"; + public static final String FlowerTypeMushrooms = "flowersMushrooms"; + public static final String FlowerTypeEnd = "flowersEnd"; + public static final String FlowerTypeJungle = "flowersJungle"; + public static final String FlowerTypeSnow = "flowersSnow"; + public static final String FlowerTypeWheat = "flowersWheat"; + public static final String FlowerTypeGourd = "flowersGourd"; +} diff --git a/src/api/java/forestry/api/apiculture/IAlleleBeeEffect.java b/src/api/java/forestry/api/apiculture/IAlleleBeeEffect.java new file mode 100644 index 00000000..b2dddb31 --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IAlleleBeeEffect.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import forestry.api.genetics.IAlleleEffect; +import forestry.api.genetics.IEffectData; + +public interface IAlleleBeeEffect extends IAlleleEffect { + + /** + * Called by apiaries to cause an effect in the world. + * + * @param genome + * Genome of the bee queen causing this effect + * @param storedData + * Object containing the stored effect data for the apiary/hive the bee is in. + * @param housing {@link IBeeHousing} the bee currently resides in. + * @return storedData, may have been manipulated. + */ + IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing); + + /** + * Is called to produce bee effects. + * + * @param genome + * @param storedData + * Object containing the stored effect data for the apiary/hive the bee is in. + * @param housing {@link IBeeHousing} the bee currently resides in. + * @return storedData, may have been manipulated. + */ + IEffectData doFX(IBeeGenome genome, IEffectData storedData, IBeeHousing housing); + +} diff --git a/src/api/java/forestry/api/apiculture/IAlleleBeeSpecies.java b/src/api/java/forestry/api/apiculture/IAlleleBeeSpecies.java new file mode 100644 index 00000000..86346639 --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IAlleleBeeSpecies.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import java.util.Map; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import forestry.api.genetics.IAlleleSpecies; + +public interface IAlleleBeeSpecies extends IAlleleSpecies { + + /** + * @return the IBeeRoot + */ + IBeeRoot getRoot(); + + /** + * @return true if this species is only active at night. + */ + boolean isNocturnal(); + + /** + * @return Map of possible products with the chance for drop each bee cycle. (0 - 1] + */ + Map<ItemStack, Float> getProductChances(); + + /** + * @return Map of possible specialities with the chance for drop each bee cycle. (0 - 1] + */ + Map<ItemStack, Float> getSpecialtyChances(); + + /** + * Only jubilant bees produce specialities. + * @return true if the bee is jubilant, false otherwise. + */ + boolean isJubilant(IBeeGenome genome, IBeeHousing housing); + + @SideOnly(Side.CLIENT) + IIcon getIcon(EnumBeeType type, int renderPass); + + /** + * @deprecated since Forestry 3.6. + * @return Path of the texture to use for entity rendering. + */ + @Deprecated + String getEntityTexture(); + + /** + * @deprecated Since Forestry 3.6 use getProductChances() + * @return Map of possible products with the chance for drop each bee cycle. (0 - 100) + */ + @Deprecated + Map<ItemStack, Integer> getProducts(); + + /** + * @deprecated Since Forestry 3.6 use getSpecialtyChances() + * @return Map of possible specialities with the chance for drop each bee cycle. (0 - 100) + */ + @Deprecated + Map<ItemStack, Integer> getSpecialty(); +} diff --git a/src/api/java/forestry/api/apiculture/IAlleleBeeSpeciesCustom.java b/src/api/java/forestry/api/apiculture/IAlleleBeeSpeciesCustom.java new file mode 100644 index 00000000..06664b2f --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IAlleleBeeSpeciesCustom.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import net.minecraft.item.ItemStack; + +import forestry.api.genetics.IAlleleSpeciesCustom; + +public interface IAlleleBeeSpeciesCustom extends IAlleleBeeSpecies, IAlleleSpeciesCustom { + + /** + * Add a product for this bee species. + * Chance is between 0 and 1. + */ + IAlleleBeeSpeciesCustom addProduct(ItemStack product, Float chance); + + /** + * Add a specialty product for this bee species. + * Bees only produce their specialty when they are Jubilant (see IJubilanceProvider) + * Chance is between 0 and 1. + */ + IAlleleBeeSpeciesCustom addSpecialty(ItemStack specialty, Float chance); + + /** + * Set the Jubilance Provider for this bee species. + * Bees only produce their specialty when they are Jubilant (see IJubilanceProvider) + */ + IAlleleBeeSpeciesCustom setJubilanceProvider(IJubilanceProvider provider); + + /** + * Make this species only active at night. + */ + IAlleleBeeSpeciesCustom setNocturnal(); + + /** Use this if you have custom icons for bees. */ + IAlleleBeeSpeciesCustom setCustomBeeIconProvider(IBeeIconProvider beeIconProvider); +} diff --git a/src/api/java/forestry/api/apiculture/IAlvearyComponent.java b/src/api/java/forestry/api/apiculture/IAlvearyComponent.java new file mode 100644 index 00000000..80cf98b1 --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IAlvearyComponent.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import forestry.api.core.ITileStructure; + +/** + * Needs to be implemented by TileEntities that want to be part of an alveary. + */ +public interface IAlvearyComponent extends ITileStructure { + + void registerBeeModifier(IBeeModifier modifier); + + void removeBeeModifier(IBeeModifier modifier); + + void registerBeeListener(IBeeListener event); + + void removeBeeListener(IBeeListener event); + + void addTemperatureChange(float change, float boundaryDown, float boundaryUp); + + void addHumidityChange(float change, float boundaryDown, float boundaryUp); + + /** + * @return true if this TE has a function other than a plain alveary block. Returning true prevents the TE from becoming master. + */ + boolean hasFunction(); + +} diff --git a/src/api/java/forestry/api/apiculture/IApiaristTracker.java b/src/api/java/forestry/api/apiculture/IApiaristTracker.java new file mode 100644 index 00000000..0c65f56b --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IApiaristTracker.java @@ -0,0 +1,57 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import forestry.api.genetics.IBreedingTracker; +import forestry.api.genetics.IIndividual; + +/** + * Can be used to garner information on bee breeding. See {@link forestry.api.genetics.ISpeciesRoot} for retrieval functions. + * + * @author SirSengir + */ +public interface IApiaristTracker extends IBreedingTracker { + + /** + * Register the birth of a queen. Will mark species as discovered. + * + * @param queen + * Created queen. + */ + void registerQueen(IIndividual queen); + + /** + * @return Amount of queens bred with this tracker. + */ + int getQueenCount(); + + /** + * Register the birth of a princess. Will mark species as discovered. + * + * @param princess + * Created princess. + */ + void registerPrincess(IIndividual princess); + + /** + * @return Amount of princesses bred with this tracker. + */ + int getPrincessCount(); + + /** + * Register the birth of a drone. Will mark species as discovered. + * + * @param drone + * Created drone. + */ + void registerDrone(IIndividual drone); + + /** + * @return Amount of drones bred with this tracker. + */ + int getDroneCount(); + +} diff --git a/src/api/java/forestry/api/apiculture/IArmorApiarist.java b/src/api/java/forestry/api/apiculture/IArmorApiarist.java new file mode 100644 index 00000000..fef81eb5 --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IArmorApiarist.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + +/** + * When implemented by armor piece items, allows them to act as apiarist's armor. + */ +public interface IArmorApiarist { + /** + * Called when the apiarist's armor acts as protection against an attack. + * + * @param player + * Player being attacked + * @param armor + * Armor item + * @param cause + * Optional cause of attack, such as a bee effect identifier + * @param doProtect + * Whether or not to actually do the side effects of protection + * @return Whether or not the armor should protect the player from that attack + */ + public boolean protectPlayer(EntityPlayer player, ItemStack armor, String cause, boolean doProtect); +} diff --git a/src/api/java/forestry/api/apiculture/IBee.java b/src/api/java/forestry/api/apiculture/IBee.java new file mode 100644 index 00000000..b77b752e --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IBee.java @@ -0,0 +1,88 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import java.util.ArrayList; + +import net.minecraft.item.ItemStack; +import net.minecraft.world.biome.BiomeGenBase; + +import forestry.api.core.IErrorState; +import forestry.api.genetics.IEffectData; +import forestry.api.genetics.IIndividual; +import forestry.api.genetics.IIndividualLiving; + +/** + * Other implementations than Forestry's default one are not supported. + * + * @author SirSengir + */ +public interface IBee extends IIndividualLiving { + + /** + * @return Bee's genetic information. + */ + IBeeGenome getGenome(); + + /** + * @return Genetic information of the bee's mate, null if unmated. + */ + IBeeGenome getMate(); + + /** + * @return true if the individual is originally of natural origin. + */ + boolean isNatural(); + + /** + * @return generation this individual is removed from the original individual. + */ + int getGeneration(); + + /** + * Set the natural flag on this bee. + * @param flag + */ + void setIsNatural(boolean flag); + + IEffectData[] doEffect(IEffectData[] storedData, IBeeHousing housing); + + IEffectData[] doFX(IEffectData[] storedData, IBeeHousing housing); + + /** + * @return true if the bee may spawn offspring + */ + boolean canSpawn(); + + /** + * Determines whether the queen can work. + * + * @param housing the {@link IBeeHousing} the bee currently resides in. + * @return the error code encountered. + */ + IErrorState canWork(IBeeHousing housing); + + boolean hasFlower(IBeeHousing housing); + + ArrayList<BiomeGenBase> getSuitableBiomes(); + + ItemStack[] getProduceList(); + + ItemStack[] getSpecialtyList(); + + ItemStack[] produceStacks(IBeeHousing housing); + + IBee spawnPrincess(IBeeHousing housing); + + IBee[] spawnDrones(IBeeHousing housing); + + void plantFlowerRandom(IBeeHousing housing); + + IIndividual retrievePollen(IBeeHousing housing); + + boolean pollinateRandom(IBeeHousing housing, IIndividual pollen); + +} diff --git a/src/api/java/forestry/api/apiculture/IBeeFactory.java b/src/api/java/forestry/api/apiculture/IBeeFactory.java new file mode 100644 index 00000000..c164731c --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IBeeFactory.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import forestry.api.genetics.IClassification; + +public interface IBeeFactory { + + /** + * Creates a new bee species. + * Automatically registered with AlleleManager.alleleRegistry.registerAllele() + * See IAlleleBeeSpeciesCustom and IAlleleSpeciesCustom for adding additional properties to the returned species. + * + * @param uid Unique Identifier for this species + * @param dominant Whether this species is genetically dominant (false means it is recessive) + * @param authority Authority for the binomial name, e.g. "Sengir" on species of base Forestry. + * @param unlocalizedName Unlocalized name for this species + * @param unlocalizedDescription Unlocalized description for this species + * @param branch Classification of this species + * @param binomial Binomial name of the species sans genus ("Apis"). "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun names or null. + * @param primaryColor The outline color of this species + * @param secondaryColor The body color of this species + * @return a new bee species allele. + */ + IAlleleBeeSpeciesCustom createSpecies(String uid, boolean dominant, String authority, String unlocalizedName, String unlocalizedDescription, IClassification branch, String binomial, int primaryColor, int secondaryColor); + + /** + * Creates a new bee branch. + * Must be registered with AlleleManager.alleleRegistry.getClassification("family.apidae").addMemberGroup(); + * + * @param uid Unique Identifier for this branch + * @param scientific approximates a "genus" in real life. Real life examples: "Micrapis", "Megapis" + * @return a new bee branch + */ + IClassification createBranch(String uid, String scientific); +} diff --git a/src/api/java/forestry/api/apiculture/IBeeGenome.java b/src/api/java/forestry/api/apiculture/IBeeGenome.java new file mode 100644 index 00000000..642eeeb5 --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IBeeGenome.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import forestry.api.genetics.EnumTolerance; +import forestry.api.genetics.IFlowerProvider; +import forestry.api.genetics.IGenome; + +/** + * Only the default implementation is supported. + * + * @author SirSengir + * + */ +public interface IBeeGenome extends IGenome { + + IAlleleBeeSpecies getPrimary(); + + IAlleleBeeSpecies getSecondary(); + + float getSpeed(); + + int getLifespan(); + + int getFertility(); + + EnumTolerance getToleranceTemp(); + + EnumTolerance getToleranceHumid(); + + boolean getNocturnal(); + + boolean getTolerantFlyer(); + + boolean getCaveDwelling(); + + IFlowerProvider getFlowerProvider(); + + int getFlowering(); + + int[] getTerritory(); + + IAlleleBeeEffect getEffect(); + +} diff --git a/src/api/java/forestry/api/apiculture/IBeeHousing.java b/src/api/java/forestry/api/apiculture/IBeeHousing.java new file mode 100644 index 00000000..5d795a3b --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IBeeHousing.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import net.minecraft.item.ItemStack; + +import forestry.api.genetics.IHousing; + +public interface IBeeHousing extends IBeeModifier, IBeeListener, IHousing { + + ItemStack getQueen(); + + ItemStack getDrone(); + + void setQueen(ItemStack itemstack); + + void setDrone(ItemStack itemstack); + + /** + * @return true if princesses and drones can (currently) mate in this housing to generate queens. + */ + boolean canBreed(); + +} diff --git a/src/api/java/forestry/api/apiculture/IBeeIconProvider.java b/src/api/java/forestry/api/apiculture/IBeeIconProvider.java new file mode 100644 index 00000000..d29a722b --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IBeeIconProvider.java @@ -0,0 +1,14 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; + +public interface IBeeIconProvider { + void registerIcons(IIconRegister register); + IIcon getIcon(EnumBeeType type, int renderPass); +} diff --git a/src/api/java/forestry/api/apiculture/IBeeListener.java b/src/api/java/forestry/api/apiculture/IBeeListener.java new file mode 100644 index 00000000..7fd5865c --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IBeeListener.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import net.minecraft.item.ItemStack; + +import forestry.api.genetics.IIndividual; + +public interface IBeeListener { + + /** + * Called on queen update. + * + * @param queen + */ + void onQueenChange(ItemStack queen); + + /** + * Called when the bees wear out the housing's equipment. + * + * @param amount + * Integer indicating the amount worn out. + */ + void wearOutEquipment(int amount); + + /** + * Called just before the children are generated, and the queen removed. + * + * @param queen + */ + void onQueenDeath(IBee queen); + + /** + * Called after the children have been spawned, but before the queen appears + * + * @param queen + */ + void onPostQueenDeath(IBee queen); + + boolean onPollenRetrieved(IBee queen, IIndividual pollen, boolean isHandled); + + boolean onEggLaid(IBee queen); +} diff --git a/src/api/java/forestry/api/apiculture/IBeeModifier.java b/src/api/java/forestry/api/apiculture/IBeeModifier.java new file mode 100644 index 00000000..4f9f7bbe --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IBeeModifier.java @@ -0,0 +1,71 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +public interface IBeeModifier { + + /** + * @param genome Genome of the bee this modifier is called for. + * @param currentModifier Current modifier. + * @return Float used to modify the base territory. + */ + float getTerritoryModifier(IBeeGenome genome, float currentModifier); + + /** + * @param genome Genome of the bee this modifier is called for. + * @param mate + * @param currentModifier Current modifier. + * @return Float used to modify the base mutation chance. + */ + float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier); + + /** + * @param genome Genome of the bee this modifier is called for. + * @param currentModifier Current modifier. + * @return Float used to modify the life span of queens. + */ + float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier); + + /** + * @param genome Genome of the bee this modifier is called for. + * @param currentModifier Current modifier. + * @return Float modifying the production speed of queens. + */ + float getProductionModifier(IBeeGenome genome, float currentModifier); + + /** + * @param genome Genome of the bee this modifier is called for. + * @return Float modifying the flowering of queens. + */ + float getFloweringModifier(IBeeGenome genome, float currentModifier); + + /** + * @param genome Genome of the bee this modifier is called for. + * @return Float modifying the chance for a swarmer queen to die off. + */ + float getGeneticDecay(IBeeGenome genome, float currentModifier); + + /** + * @return Boolean indicating if housing can ignore rain + */ + boolean isSealed(); + + /** + * @return Boolean indicating if housing can ignore darkness/night + */ + boolean isSelfLighted(); + + /** + * @return Boolean indicating if housing can ignore not seeing the sky + */ + boolean isSunlightSimulated(); + + /** + * @return Boolean indicating whether this housing simulates the nether + */ + boolean isHellish(); + +} diff --git a/src/api/java/forestry/api/apiculture/IBeeMutation.java b/src/api/java/forestry/api/apiculture/IBeeMutation.java new file mode 100644 index 00000000..6421c8f6 --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IBeeMutation.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import forestry.api.genetics.IAllele; +import forestry.api.genetics.IGenome; +import forestry.api.genetics.IMutation; + +public interface IBeeMutation extends IMutation { + + IBeeRoot getRoot(); + + /** + * @param housing + * @param allele0 + * @param allele1 + * @param genome0 + * @param genome1 + * @return float representing the chance for mutation to occur. note that this is 0 - 100 based, since it was an integer previously! + * @deprecated since Forestry 3.6, use the IAlleleBeeSpecies / IBeeGenome version + */ + @Deprecated + float getChance(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1); + + float getChance(IBeeHousing housing, IAlleleBeeSpecies allele0, IAlleleBeeSpecies allele1, IBeeGenome genome0, IBeeGenome genome1); +} diff --git a/src/api/java/forestry/api/apiculture/IBeeMutationCustom.java b/src/api/java/forestry/api/apiculture/IBeeMutationCustom.java new file mode 100644 index 00000000..d97a839a --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IBeeMutationCustom.java @@ -0,0 +1,12 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import forestry.api.genetics.IMutationCustom; + +public interface IBeeMutationCustom extends IBeeMutation, IMutationCustom { + +} diff --git a/src/api/java/forestry/api/apiculture/IBeeMutationFactory.java b/src/api/java/forestry/api/apiculture/IBeeMutationFactory.java new file mode 100644 index 00000000..315a4c6f --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IBeeMutationFactory.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import forestry.api.genetics.IAllele; + +public interface IBeeMutationFactory { + /** + * Creates a new bee mutation. + * Automatically registered with BeeManager.beeRoot.registerMutation() + * See IBeeMutationCustom and IMutationCustom for adding additional properties to the returned mutation. + * + * @param parentBee0 A parent bee for this mutation + * @param parentBee1 A parent bee for this mutation + * @param result The resulting alleles for this mutation + * @param chance The chance that breeding the two parent bees will result in this mutation + * @return a new bee mutation. + */ + IBeeMutationCustom createMutation(IAlleleBeeSpecies parentBee0, IAlleleBeeSpecies parentBee1, IAllele[] result, int chance); +} diff --git a/src/api/java/forestry/api/apiculture/IBeeRoot.java b/src/api/java/forestry/api/apiculture/IBeeRoot.java new file mode 100644 index 00000000..b4bbb291 --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IBeeRoot.java @@ -0,0 +1,128 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import java.util.ArrayList; +import java.util.Collection; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +import com.mojang.authlib.GameProfile; + +import forestry.api.core.IStructureLogic; +import forestry.api.genetics.IAllele; +import forestry.api.genetics.ISpeciesRoot; + +public interface IBeeRoot extends ISpeciesRoot { + + /** + * @return true if passed item is a Forestry bee. Equal to getType(ItemStack stack) != EnumBeeType.NONE + */ + @Override + boolean isMember(ItemStack stack); + + /** + * @return {@link IBee} pattern parsed from the passed stack's nbt data. + */ + @Override + IBee getMember(ItemStack stack); + + @Override + IBee getMember(NBTTagCompound compound); + + /* GENOME CONVERSION */ + @Override + IBee templateAsIndividual(IAllele[] template); + + @Override + IBee templateAsIndividual(IAllele[] templateActive, IAllele[] templateInactive); + + @Override + IBeeGenome templateAsGenome(IAllele[] template); + + @Override + IBeeGenome templateAsGenome(IAllele[] templateActive, IAllele[] templateInactive); + + /* BREEDING TRACKER */ + /** + * @param world + * @return {@link IApiaristTracker} associated with the passed world. + */ + IApiaristTracker getBreedingTracker(World world, GameProfile player); + + /* BEE SPECIFIC */ + /** + * @return type of bee encoded on the itemstack. EnumBeeType.NONE if it isn't a bee. + */ + EnumBeeType getType(ItemStack stack); + + /** + * @return true if passed item is a drone. Equal to getType(ItemStack stack) == EnumBeeType.DRONE + */ + boolean isDrone(ItemStack stack); + + /** + * @return true if passed item is mated (i.e. a queen) + */ + boolean isMated(ItemStack stack); + + /** + * @param genome + * Valid {@link IBeeGenome} + * @return {@link IBee} from the passed genome + */ + IBee getBee(World world, IBeeGenome genome); + + /** + * Creates an IBee suitable for a queen containing the necessary second genome for the mate. + * + * @param genome + * Valid {@link IBeeGenome} + * @param mate + * Valid {@link IBee} representing the mate. + * @return Mated {@link IBee} from the passed genomes. + */ + IBee getBee(World world, IBeeGenome genome, IBee mate); + + /* TEMPLATES */ + @Override + ArrayList<IBee> getIndividualTemplates(); + + /* MUTATIONS */ + @Override + Collection<IBeeMutation> getMutations(boolean shuffle); + + /* GAME MODE */ + void resetBeekeepingMode(); + + ArrayList<IBeekeepingMode> getBeekeepingModes(); + + IBeekeepingMode getBeekeepingMode(World world); + + IBeekeepingMode getBeekeepingMode(String name); + + void registerBeekeepingMode(IBeekeepingMode mode); + + void setBeekeepingMode(World world, String name); + + /* MISC */ + /** + * @param housing + * Object implementing IBeeHousing. + * @return IBeekeepingLogic + */ + IBeekeepingLogic createBeekeepingLogic(IBeeHousing housing); + + /** + * TileEntities wanting to function as alveary components need to implement structure logic for validation. + * + * @return IStructureLogic for alvearies. + */ + IStructureLogic createAlvearyStructureLogic(IAlvearyComponent structure); + +} diff --git a/src/api/java/forestry/api/apiculture/IBeekeepingLogic.java b/src/api/java/forestry/api/apiculture/IBeekeepingLogic.java new file mode 100644 index 00000000..0a4da7b3 --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IBeekeepingLogic.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import forestry.api.core.INBTTagable; +import forestry.api.genetics.IEffectData; + +public interface IBeekeepingLogic extends INBTTagable { + + /* STATE INFORMATION */ + int getBreedingTime(); + + int getTotalBreedingTime(); + + IBee getQueen(); + + IBeeHousing getHousing(); + + IEffectData[] getEffectData(); + + /* UPDATING */ + void update(); + +} diff --git a/src/api/java/forestry/api/apiculture/IBeekeepingMode.java b/src/api/java/forestry/api/apiculture/IBeekeepingMode.java new file mode 100644 index 00000000..80d30981 --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IBeekeepingMode.java @@ -0,0 +1,70 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import java.util.ArrayList; + +import net.minecraft.world.World; + +public interface IBeekeepingMode extends IBeeModifier { + + /** + * @return Localized name of this beekeeping mode. + */ + String getName(); + + /** + * @return Localized list of strings outlining the behaviour of this beekeeping mode. + */ + ArrayList<String> getDescription(); + + /** + * @return Float used to modify the wear on comb frames. + */ + float getWearModifier(); + + /** + * @param queen + * @return fertility taking into account the birthing queen and surroundings. + */ + int getFinalFertility(IBee queen, World world, int x, int y, int z); + + /** + * @param queen + * @return true if the queen is genetically "fatigued" and should not be reproduced anymore. + */ + boolean isFatigued(IBee queen, IBeeHousing housing); + + /** + * @param queen + * @param housing + * @return true if the queen is being overworked in the bee housing (with chance). will trigger a negative effect. + */ + boolean isOverworked(IBee queen, IBeeHousing housing); + + /** + * + * @param queen + * @param offspring + * @param housing + * @return true if the genetic structure of the queen is breaking down during spawning of the offspring (with chance). will trigger a negative effect. + */ + boolean isDegenerating(IBee queen, IBee offspring, IBeeHousing housing); + + /** + * @param queen + * @return true if an offspring of this queen is considered a natural + */ + boolean isNaturalOffspring(IBee queen); + + /** + * @param queen + * @return true if this mode allows the passed queen or princess to be multiplied + */ + boolean mayMultiplyPrincess(IBee queen); + + +} diff --git a/src/api/java/forestry/api/apiculture/IHiveDrop.java b/src/api/java/forestry/api/apiculture/IHiveDrop.java new file mode 100644 index 00000000..ea175f8b --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IHiveDrop.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import java.util.Collection; + +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +/** + * Bees can be seeded either as hive drops or as mutation results. + * + * Add IHiveDrops with HiveManager.get___Hive.addDrop + * + * @author SirSengir + */ +public interface IHiveDrop { + + ItemStack getPrincess(World world, int x, int y, int z, int fortune); + + Collection<ItemStack> getDrones(World world, int x, int y, int z, int fortune); + + Collection<ItemStack> getAdditional(World world, int x, int y, int z, int fortune); + + /** + * Chance to drop. Default drops have 80 (= 80 %). + * + * @param world Minecraft world this is called for. + * @param x x-Coordinate of the broken hive. + * @param y y-Coordinate of the broken hive. + * @param z z-Coordinate of the broken hive. + * @return Chance for drop as an integer of 0 - 100. + */ + int getChance(World world, int x, int y, int z); +} diff --git a/src/api/java/forestry/api/apiculture/IHiveFrame.java b/src/api/java/forestry/api/apiculture/IHiveFrame.java new file mode 100644 index 00000000..dabc9e01 --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IHiveFrame.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import net.minecraft.item.ItemStack; + +public interface IHiveFrame extends IBeeModifier { + + /** + * Wears out a frame. + * + * @param housing + * IBeeHousing the frame is contained in. + * @param frame + * ItemStack containing the actual frame. + * @param queen + * Current queen in the caller. + * @param wear + * Integer denoting the amount worn out. The wear modifier of the current beekeeping mode has already been taken into account. + * @return ItemStack containing the actual frame with adjusted damage. + */ + ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear); + +} diff --git a/src/api/java/forestry/api/apiculture/IJubilanceFactory.java b/src/api/java/forestry/api/apiculture/IJubilanceFactory.java new file mode 100644 index 00000000..1b81a9d0 --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IJubilanceFactory.java @@ -0,0 +1,16 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +import net.minecraft.block.Block; + +public interface IJubilanceFactory { + /** The default Jubilance Provider is satisfied when the humidity and temperature are ideal for the bee. */ + IJubilanceProvider getDefault(); + + /** The Requires Resource Jubilance Provider is satisfied when a specific block is under the hive. */ + IJubilanceProvider getRequiresResource(Block block, int meta); +} diff --git a/src/api/java/forestry/api/apiculture/IJubilanceProvider.java b/src/api/java/forestry/api/apiculture/IJubilanceProvider.java new file mode 100644 index 00000000..faf34d05 --- /dev/null +++ b/src/api/java/forestry/api/apiculture/IJubilanceProvider.java @@ -0,0 +1,15 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture; + +public interface IJubilanceProvider { + + /** + * Returns true when conditions are right to make this species Jubilant. + * Jubilant bees can produce their Specialty products. + */ + boolean isJubilant(IAlleleBeeSpecies species, IBeeGenome genome, IBeeHousing housing); +} diff --git a/src/api/java/forestry/api/apiculture/hives/HiveManager.java b/src/api/java/forestry/api/apiculture/hives/HiveManager.java new file mode 100644 index 00000000..17ca7d20 --- /dev/null +++ b/src/api/java/forestry/api/apiculture/hives/HiveManager.java @@ -0,0 +1,13 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture.hives; + +public class HiveManager { + + public static IHiveRegistry hiveRegistry; + public static IHiveGenHelper genHelper; + +} diff --git a/src/api/java/forestry/api/apiculture/hives/IHiveDescription.java b/src/api/java/forestry/api/apiculture/hives/IHiveDescription.java new file mode 100644 index 00000000..82d761db --- /dev/null +++ b/src/api/java/forestry/api/apiculture/hives/IHiveDescription.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture.hives; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; + +import forestry.api.core.EnumHumidity; +import forestry.api.core.EnumTemperature; + +public interface IHiveDescription { + + /** + * The hive generator for this hive. + */ + IHiveGen getHiveGen(); + + /** + * The hive block to be placed in the world. + */ + Block getBlock(); + int getMeta(); + + /** + * returns true if the hive can be generated in these conditions. + * Used as a fast early-elimination check for hives that have no hope of spawning in the area. + */ + boolean isGoodBiome(BiomeGenBase biome); + boolean isGoodHumidity(EnumHumidity humidity); + boolean isGoodTemperature(EnumTemperature temperature); + + /** + * float representing the relative chance a hive will generate in a chunk. + * Default is 1.0, higher numbers result in more hives, smaller will result in fewer. + * Tree hives want around 3.0 to 4.0 since there are less locations to generate on. + */ + float getGenChance(); + + /** + * Called after successful hive generation. + * world, x, y, z give the location of the new hive. + **/ + void postGen(World world, int x, int y, int z); +} diff --git a/src/api/java/forestry/api/apiculture/hives/IHiveGen.java b/src/api/java/forestry/api/apiculture/hives/IHiveGen.java new file mode 100644 index 00000000..57569d26 --- /dev/null +++ b/src/api/java/forestry/api/apiculture/hives/IHiveGen.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture.hives; + +import net.minecraft.world.World; + +public interface IHiveGen { + + /** + * return a Y value that the hive should try to generate at. + * returns negative if the hive can't be placed anywhere. + */ + int getYForHive(World world, int x, int z); + + /** + * returns true if the hive can be generated at this location. + * Used for advanced conditions, like checking that the ground below the hive is a certain type. + */ + boolean isValidLocation(World world, int x, int y, int z); + + /** + * returns true if the hive can safely replace the block at this location. + */ + boolean canReplace(World world, int x, int y, int z); + +} diff --git a/src/api/java/forestry/api/apiculture/hives/IHiveGenHelper.java b/src/api/java/forestry/api/apiculture/hives/IHiveGenHelper.java new file mode 100644 index 00000000..0eb6400c --- /dev/null +++ b/src/api/java/forestry/api/apiculture/hives/IHiveGenHelper.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture.hives; + +import net.minecraft.block.Block; + +public interface IHiveGenHelper { + + /** + * Returns a hiveGen for a hive that spawns on the ground. + * validGroundBlocks specifies which block materials it can spawn on. + */ + IHiveGen ground(Block... validGroundBlocks); + + /** + * Returns a hiveGen for a hive that spawns in trees. + */ + IHiveGen tree(); + +} diff --git a/src/api/java/forestry/api/apiculture/hives/IHiveRegistry.java b/src/api/java/forestry/api/apiculture/hives/IHiveRegistry.java new file mode 100644 index 00000000..73f3524c --- /dev/null +++ b/src/api/java/forestry/api/apiculture/hives/IHiveRegistry.java @@ -0,0 +1,33 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.apiculture.hives; + +import java.util.List; + +import forestry.api.apiculture.IHiveDrop; + +public interface IHiveRegistry { + + /* Forestry Hive Names */ + public static final String forest = "Forestry:forest"; + public static final String meadows = "Forestry:meadows"; + public static final String desert = "Forestry:desert"; + public static final String jungle = "Forestry:jungle"; + public static final String end = "Forestry:end"; + public static final String snow = "Forestry:snow"; + public static final String swamp = "Forestry:swamp"; + + /** + * Adds a new hive to be generated in the world. + */ + void registerHive(String hiveName, IHiveDescription hiveDescription); + + /** + * Add drops to a registered hive. + */ + void addDrops(String hiveName, IHiveDrop... drops); + void addDrops(String hiveName, List<IHiveDrop> drop); +} diff --git a/src/api/java/forestry/api/apiculture/hives/package-info.java b/src/api/java/forestry/api/apiculture/hives/package-info.java new file mode 100644 index 00000000..a045530c --- /dev/null +++ b/src/api/java/forestry/api/apiculture/hives/package-info.java @@ -0,0 +1,8 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +@API(apiVersion="4.1.0", owner="ForestryAPI|apiculture", provides="ForestryAPI|hives") +package forestry.api.apiculture.hives; +import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/apiculture/package-info.java b/src/api/java/forestry/api/apiculture/package-info.java new file mode 100644 index 00000000..3114e3eb --- /dev/null +++ b/src/api/java/forestry/api/apiculture/package-info.java @@ -0,0 +1,8 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +@API(apiVersion="3.3.0", owner="ForestryAPI|core", provides="ForestryAPI|apiculture") +package forestry.api.apiculture; +import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/arboriculture/EnumGermlingType.java b/src/api/java/forestry/api/arboriculture/EnumGermlingType.java new file mode 100644 index 00000000..a564be0d --- /dev/null +++ b/src/api/java/forestry/api/arboriculture/EnumGermlingType.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.arboriculture; + +public enum EnumGermlingType { + SAPLING("sapling"), BLOSSOM("blossom"), POLLEN("pollen"), GERMLING("germling"), NONE("none"); + + public static final EnumGermlingType[] VALUES = values(); + + private final String name; + + private EnumGermlingType(String name) { + this.name = name; + } + + public String getName() { + return name; + } + +} diff --git a/src/api/java/forestry/api/arboriculture/EnumGrowthConditions.java b/src/api/java/forestry/api/arboriculture/EnumGrowthConditions.java new file mode 100644 index 00000000..8b28601c --- /dev/null +++ b/src/api/java/forestry/api/arboriculture/EnumGrowthConditions.java @@ -0,0 +1,10 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.arboriculture; + +public enum EnumGrowthConditions { + HOSTILE, PALTRY, NORMAL, GOOD, EXCELLENT +} diff --git a/src/api/java/forestry/api/arboriculture/EnumTreeChromosome.java b/src/api/java/forestry/api/arboriculture/EnumTreeChromosome.java new file mode 100644 index 00000000..8f74d0c2 --- /dev/null +++ b/src/api/java/forestry/api/arboriculture/EnumTreeChromosome.java @@ -0,0 +1,96 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.arboriculture; + +import forestry.api.genetics.AlleleManager; +import forestry.api.genetics.IAllele; +import forestry.api.genetics.IAlleleArea; +import forestry.api.genetics.IAlleleBoolean; +import forestry.api.genetics.IAlleleFloat; +import forestry.api.genetics.IAlleleInteger; +import forestry.api.genetics.IAllelePlantType; +import forestry.api.genetics.IChromosomeType; +import forestry.api.genetics.IFruitFamily; +import forestry.api.genetics.ISpeciesRoot; +import net.minecraftforge.common.EnumPlantType; + +public enum EnumTreeChromosome implements IChromosomeType { + + /** + * Determines the following: - WorldGen, including the used wood blocks - {@link IFruitFamily}s supported. Limits which {@link IFruitProvider} + * will actually yield fruit with this species. - Native {@link EnumPlantType} for this tree. Combines with the PLANT chromosome. + */ + SPECIES(IAlleleTreeSpecies.class), + /** + * {@link IGrowthProvider}, determines conditions required by the tree to grow. + */ + GROWTH(IAlleleGrowth.class), + /** + * A float modifying the height of the tree. Taken into account at worldgen. + */ + HEIGHT(IAlleleFloat.class), + /** + * Chance for saplings. + */ + FERTILITY(IAlleleFloat.class), + /** + * {@link IFruitProvider}, determines if and what fruits are grown on the tree. Limited by the {@link IFruitFamily}s the species supports. + */ + FRUITS(IAlleleFruit.class), + /** + * Chance for fruit leaves and/or drops. + */ + YIELD(IAlleleFloat.class), + /** + * May add additional tolerances for {@link EnumPlantTypes}. + */ + PLANT(IAllelePlantType.class), + /** + * Determines the speed at which fruit will ripen on this tree. + */ + SAPPINESS(IAlleleFloat.class), + /** + * Territory for leaf effects. Unused. + */ + TERRITORY(IAlleleArea.class), + /** + * Leaf effect. Unused. + */ + EFFECT(IAlleleLeafEffect.class), + /** + * Amount of random ticks which need to elapse before a sapling will grow into a tree. + */ + MATURATION(IAlleleInteger.class), + + GIRTH(IAlleleInteger.class), + /** + * Determines if the tree can burn. + */ + FIREPROOF(IAlleleBoolean.class), + ; + + Class<? extends IAllele> clss; + + EnumTreeChromosome(Class<? extends IAllele> clss) { + this.clss = clss; + } + + @Override + public Class<? extends IAllele> getAlleleClass() { + return clss; + } + + @Override + public String getName() { + return this.toString().toLowerCase(); + } + + @Override + public ISpeciesRoot getSpeciesRoot() { + return AlleleManager.alleleRegistry.getSpeciesRoot("rootTrees"); + } + +} diff --git a/src/api/java/forestry/api/arboriculture/IAlleleFruit.java b/src/api/java/forestry/api/arboriculture/IAlleleFruit.java new file mode 100644 index 00000000..0f54db51 --- /dev/null +++ b/src/api/java/forestry/api/arboriculture/IAlleleFruit.java @@ -0,0 +1,17 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.arboriculture; + +import forestry.api.genetics.IAllele; + +/** + * Simple allele encapsulating an {@link IFruitProvider}. + */ +public interface IAlleleFruit extends IAllele { + + IFruitProvider getProvider(); + +} diff --git a/src/api/java/forestry/api/arboriculture/IAlleleGrowth.java b/src/api/java/forestry/api/arboriculture/IAlleleGrowth.java new file mode 100644 index 00000000..6cb4b438 --- /dev/null +++ b/src/api/java/forestry/api/arboriculture/IAlleleGrowth.java @@ -0,0 +1,17 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.arboriculture; + +import forestry.api.genetics.IAllele; + +/** + * Simple allele encapsulating an {@link IGrowthProvider}. + */ +public interface IAlleleGrowth extends IAllele { + + IGrowthProvider getProvider(); + +} diff --git a/src/api/java/forestry/api/arboriculture/IAlleleLeafEffect.java b/src/api/java/forestry/api/arboriculture/IAlleleLeafEffect.java new file mode 100644 index 00000000..d52d963a --- /dev/null +++ b/src/api/java/forestry/api/arboriculture/IAlleleLeafEffect.java @@ -0,0 +1,20 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.arboriculture; + +import net.minecraft.world.World; + +import forestry.api.genetics.IAlleleEffect; +import forestry.api.genetics.IEffectData; + +/** + * Simple allele encapsulating a leaf effect. (Not implemented) + */ +public interface IAlleleLeafEffect extends IAlleleEffect { + + IEffectData doEffect(ITreeGenome genome, IEffectData storedData, World world, int x, int y, int z); + +} diff --git a/src/api/java/forestry/api/arboriculture/IAlleleTreeSpecies.java b/src/api/java/forestry/api/arboriculture/IAlleleTreeSpecies.java new file mode 100644 index 00000000..be057254 --- /dev/null +++ b/src/api/java/forestry/api/arboriculture/IAlleleTreeSpecies.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.arboriculture; + +import java.util.Collection; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenerator; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraftforge.common.EnumPlantType; + +import forestry.api.genetics.IAlleleSpecies; +import forestry.api.genetics.IFruitFamily; + +public interface IAlleleTreeSpecies extends IAlleleSpecies { + + ITreeRoot getRoot(); + + /** + * @return Native plant type of this species. + */ + EnumPlantType getPlantType(); + + /** + * @return List of all {@link IFruitFamily}s which can grow on leaves generated by this species. + */ + Collection<IFruitFamily> getSuitableFruit(); + + /** + * @param tree + * @param world + * @param x + * @param y + * @param z + * @return Tree generator for the tree at the given location. + */ + WorldGenerator getGenerator(ITree tree, World world, int x, int y, int z); + + /** + * @return All available generator classes for this species. + */ + Class<? extends WorldGenerator>[] getGeneratorClasses(); + + /* TEXTURES AND OVERRIDES */ + int getLeafColour(ITree tree); + + short getLeafIconIndex(ITree tree, boolean fancy); + + @SideOnly(Side.CLIENT) + IIcon getGermlingIcon(EnumGermlingType type, int renderPass); + + @SideOnly(Side.CLIENT) + int getGermlingColour(EnumGermlingType type, int renderPass); + + /** + * + * @return Array of ItemStacks representing logs that these tree produces, the first one being the primary one + */ + ItemStack[] getLogStacks(); + +} diff --git a/src/api/java/forestry/api/arboriculture/IArboristTracker.java b/src/api/java/forestry/api/arboriculture/IArboristTracker.java new file mode 100644 index 00000000..9777e876 --- /dev/null +++ b/src/api/java/forestry/api/arboriculture/IArboristTracker.java @@ -0,0 +1,12 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.arboriculture; + +import forestry.api.genetics.IBreedingTracker; + +public interface IArboristTracker extends IBreedingTracker { + +} diff --git a/src/api/java/forestry/api/arboriculture/IFruitProvider.java b/src/api/java/forestry/api/arboriculture/IFruitProvider.java new file mode 100644 index 00000000..ef54fc99 --- /dev/null +++ b/src/api/java/forestry/api/arboriculture/IFruitProvider.java @@ -0,0 +1,74 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.arboriculture; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.ItemStack; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import forestry.api.genetics.IFruitFamily; + +public interface IFruitProvider { + + IFruitFamily getFamily(); + + int getColour(ITreeGenome genome, IBlockAccess world, int x, int y, int z, int ripeningTime); + + boolean markAsFruitLeaf(ITreeGenome genome, World world, int x, int y, int z); + + int getRipeningPeriod(); + + // / Products, Chance + ItemStack[] getProducts(); + + // / Specialty, Chance + ItemStack[] getSpecialty(); + + ItemStack[] getFruits(ITreeGenome genome, World world, int x, int y, int z, int ripeningTime); + + /** + * @return Short, human-readable identifier used in the treealyzer. + */ + String getDescription(); + + /* TEXTURE OVERLAY */ + /** + * @param genome + * @param world + * @param x + * @param y + * @param z + * @param ripeningTime + * Elapsed ripening time for the fruit. + * @param fancy + * @return IIcon index of the texture to overlay on the leaf block. + */ + short getIconIndex(ITreeGenome genome, IBlockAccess world, int x, int y, int z, int ripeningTime, boolean fancy); + + /** + * @return true if this fruit provider requires fruit blocks to spawn, false otherwise. + */ + boolean requiresFruitBlocks(); + + /** + * Tries to spawn a fruit block at the potential position when the tree generates. + * + * @param genome + * @param world + * @param x + * @param y + * @param z + * @return true if a fruit block was spawned, false otherwise. + */ + boolean trySpawnFruitBlock(ITreeGenome genome, World world, int x, int y, int z); + + @SideOnly(Side.CLIENT) + void registerIcons(IIconRegister register); +} diff --git a/src/api/java/forestry/api/arboriculture/IGrowthProvider.java b/src/api/java/forestry/api/arboriculture/IGrowthProvider.java new file mode 100644 index 00000000..92e553e0 --- /dev/null +++ b/src/api/java/forestry/api/arboriculture/IGrowthProvider.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.arboriculture; + +import net.minecraft.world.World; + +public interface IGrowthProvider { + + /** + * Check to see whether a sapling at the given location with the given genome can grow into a tree. + * + * @param genome Genome of the tree this is called for. + * @param world Minecraft world the tree will inhabit. + * @param xPos x-Coordinate to attempt growth at. + * @param yPos y-Coordinate to attempt growth at. + * @param zPos z-Coordinate to attempt growth at. + * @param expectedGirth Trunk size of the tree to generate. + * @param expectedHeight Height of the tree to generate. + * @return true if the tree can grow at the given coordinates, false otherwise. + */ + boolean canGrow(ITreeGenome genome, World world, int xPos, int yPos, int zPos, int expectedGirth, int expectedHeight); + + EnumGrowthConditions getGrowthConditions(ITreeGenome genome, World world, int xPos, int yPos, int zPos); + + /** + * @return Short, human-readable identifier used in the treealyzer. + */ + String getDescription(); + + /** + * @return Detailed description of growth behaviour used in the treealyzer. + */ + String[] getInfo(); + +} diff --git a/src/api/java/forestry/api/arboriculture/ILeafTickHandler.java b/src/api/java/forestry/api/arboriculture/ILeafTickHandler.java new file mode 100644 index 00000000..4d7fba44 --- /dev/null +++ b/src/api/java/forestry/api/arboriculture/ILeafTickHandler.java @@ -0,0 +1,12 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.arboriculture; + +import net.minecraft.world.World; + +public interface ILeafTickHandler { + boolean onRandomLeafTick(ITree tree, World world, int biomeId, int x, int y, int z, boolean isDestroyed); +} diff --git a/src/api/java/forestry/api/arboriculture/IToolGrafter.java b/src/api/java/forestry/api/arboriculture/IToolGrafter.java new file mode 100644 index 00000000..339725e6 --- /dev/null +++ b/src/api/java/forestry/api/arboriculture/IToolGrafter.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.arboriculture; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public interface IToolGrafter { + /** + * Called by leaves to determine the increase in sapling droprate. + * + * @param stack ItemStack containing the grafter. + * @param world Minecraft world the player and the target block inhabit. + * @param x x-Coordinate of the broken leaf block. + * @param y y-Coordinate of the broken leaf block. + * @param z z-Coordinate of the broken leaf block. + * @return Float representing the factor the usual drop chance is to be multiplied by. + */ + float getSaplingModifier(ItemStack stack, World world, EntityPlayer player, int x, int y, int z); +} diff --git a/src/api/java/forestry/api/arboriculture/ITree.java b/src/api/java/forestry/api/arboriculture/ITree.java new file mode 100644 index 00000000..5cbd736f --- /dev/null +++ b/src/api/java/forestry/api/arboriculture/ITree.java @@ -0,0 +1,100 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.arboriculture; + +import java.util.EnumSet; + +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenerator; + +import net.minecraftforge.common.EnumPlantType; + +import forestry.api.genetics.IEffectData; +import forestry.api.genetics.IIndividual; +import forestry.api.world.ITreeGenData; + +public interface ITree extends IIndividual, ITreeGenData { + + void mate(ITree other); + + IEffectData[] doEffect(IEffectData[] storedData, World world, int biomeid, int x, int y, int z); + + IEffectData[] doFX(IEffectData[] storedData, World world, int biomeid, int x, int y, int z); + + ITreeGenome getGenome(); + + ITreeGenome getMate(); + + EnumSet<EnumPlantType> getPlantTypes(); + + ITree[] getSaplings(World world, int x, int y, int z, float modifier); + + ItemStack[] getProduceList(); + + ItemStack[] getSpecialtyList(); + + ItemStack[] produceStacks(World world, int x, int y, int z, int ripeningTime); + + /** + * + * @param world + * @param x + * @param y + * @param z + * @return Boolean indicating whether a sapling can stay planted at the given position. + */ + boolean canStay(World world, int x, int y, int z); + + /** + * + * @param world + * @param x + * @param y + * @param z + * @return Boolean indicating whether a sapling at the given position can grow into a tree. + */ + boolean canGrow(World world, int x, int y, int z, int expectedGirth, int expectedHeight); + + /** + * @return Integer denoting the maturity (block ticks) required for a sapling to attempt to grow into a tree. + */ + int getRequiredMaturity(); + + /** + * @return Integer denoting how resilient leaf blocks are against adverse influences (i.e. caterpillars). + */ + int getResilience(); + + /** + * @param world + * @param x + * @param y + * @param z + * @return Integer denoting the size of the tree trunk. + */ + int getGirth(World world, int x, int y, int z); + + + + /** + * + * @param world + * @param x + * @param y + * @param z + * @return Growth conditions at the given position. + */ + EnumGrowthConditions getGrowthCondition(World world, int x, int y, int z); + + WorldGenerator getTreeGenerator(World world, int x, int y, int z, boolean wasBonemealed); + + ITree copy(); + + boolean isPureBred(EnumTreeChromosome chromosome); + + boolean canBearFruit(); +} diff --git a/src/api/java/forestry/api/arboriculture/ITreeGenome.java b/src/api/java/forestry/api/arboriculture/ITreeGenome.java new file mode 100644 index 00000000..ee5a1f02 --- /dev/null +++ b/src/api/java/forestry/api/arboriculture/ITreeGenome.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.arboriculture; + +import java.util.EnumSet; + +import net.minecraftforge.common.EnumPlantType; + +import forestry.api.genetics.IGenome; + +public interface ITreeGenome extends IGenome { + + IAlleleTreeSpecies getPrimary(); + + IAlleleTreeSpecies getSecondary(); + + IFruitProvider getFruitProvider(); + + IGrowthProvider getGrowthProvider(); + + float getHeight(); + + float getFertility(); + + /** + * @return Determines either a) how many fruit leaves there are or b) the chance for any fruit leave to drop a sapling. Exact usage determined by the + * IFruitProvider + */ + float getYield(); + + float getSappiness(); + + EnumSet<EnumPlantType> getPlantTypes(); + + /** + * @return Amount of random block ticks required for a sapling to mature into a fully grown tree. + */ + int getMaturationTime(); + + int getGirth(); + + IAlleleLeafEffect getEffect(); +} diff --git a/src/api/java/forestry/api/arboriculture/ITreeModifier.java b/src/api/java/forestry/api/arboriculture/ITreeModifier.java new file mode 100644 index 00000000..775f91eb --- /dev/null +++ b/src/api/java/forestry/api/arboriculture/ITreeModifier.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.arboriculture; + +public interface ITreeModifier { + + /** + * + * @param genome + * @return Float used to modify the height. + */ + float getHeightModifier(ITreeGenome genome, float currentModifier); + + /** + * + * @param genome + * @return Float used to modify the yield. + */ + float getYieldModifier(ITreeGenome genome, float currentModifier); + + /** + * + * @param genome + * @return Float used to modify the sappiness. + */ + float getSappinessModifier(ITreeGenome genome, float currentModifier); + + /** + * + * @param genome + * @return Float used to modify the maturation. + */ + float getMaturationModifier(ITreeGenome genome, float currentModifier); + + /** + * @param genome0 + * @param genome1 + * @return Float used to modify the base mutation chance. + */ + float getMutationModifier(ITreeGenome genome0, ITreeGenome genome1, float currentModifier); + +} diff --git a/src/api/java/forestry/api/arboriculture/ITreeMutation.java b/src/api/java/forestry/api/arboriculture/ITreeMutation.java new file mode 100644 index 00000000..65804969 --- /dev/null +++ b/src/api/java/forestry/api/arboriculture/ITreeMutation.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.arboriculture; + +import net.minecraft.world.World; + +import forestry.api.genetics.IAllele; +import forestry.api.genetics.IGenome; +import forestry.api.genetics.IMutation; +import forestry.api.genetics.ISpeciesRoot; + +public interface ITreeMutation extends IMutation { + + /** + * @return {@link ISpeciesRoot} this mutation is associated with. + */ + ITreeRoot getRoot(); + + /** + * @param world + * @param x + * @param y + * @param z + * @param allele0 + * @param allele1 + * @param genome0 + * @param genome1 + * @return float representing the chance for mutation to occur. note that this is 0 - 100 based, since it was an integer previously! + */ + float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1); +} diff --git a/src/api/java/forestry/api/arboriculture/ITreeRoot.java b/src/api/java/forestry/api/arboriculture/ITreeRoot.java new file mode 100644 index 00000000..e966ca04 --- /dev/null +++ b/src/api/java/forestry/api/arboriculture/ITreeRoot.java @@ -0,0 +1,113 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.arboriculture; + +import java.util.ArrayList; +import java.util.Collection; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +import com.mojang.authlib.GameProfile; + +import forestry.api.genetics.IAllele; +import forestry.api.genetics.IChromosome; +import forestry.api.genetics.IIndividual; +import forestry.api.genetics.ISpeciesRoot; + +public interface ITreeRoot extends ISpeciesRoot { + + @Override + boolean isMember(ItemStack itemstack); + + @Override + ITree getMember(ItemStack itemstack); + + @Override + ITree getMember(NBTTagCompound compound); + + @Override + ITree templateAsIndividual(IAllele[] template); + + @Override + ITree templateAsIndividual(IAllele[] templateActive, IAllele[] templateInactive); + + @Override + ITreeGenome templateAsGenome(IAllele[] template); + + @Override + ITreeGenome templateAsGenome(IAllele[] templateActive, IAllele[] templateInactive); + + /** + * @param world + * @return {@link IArboristTracker} associated with the passed world. + */ + @Override + IArboristTracker getBreedingTracker(World world, GameProfile player); + + /* TREE SPECIFIC */ + /** + * Register a leaf tick handler. + * @param handler the {@link ILeafTickHandler} to register. + */ + void registerLeafTickHandler(ILeafTickHandler handler); + + Collection<ILeafTickHandler> getLeafTickHandlers(); + + /** + * @return type of tree encoded on the itemstack. EnumBeeType.NONE if it isn't a tree. + */ + EnumGermlingType getType(ItemStack stack); + + ITree getTree(World world, int x, int y, int z); + + ITree getTree(World world, ITreeGenome genome); + + boolean plantSapling(World world, ITree tree, GameProfile owner, int x, int y, int z); + + /** + * @deprecated since Forestry 3.5.0. Use ITreeGenData setLeavesDecorative. + */ + @Deprecated + // decorative=true for creative and player-placed leaves. No decay, pollination, or drops. + boolean setLeaves(World world, IIndividual tree, GameProfile owner, int x, int y, int z, boolean decorative); + + /** + * @deprecated since Forestry 3.5.0. Use ITreeGenData setLeaves. + */ + @Deprecated + // set normal leaves created as worldgen + boolean setLeaves(World world, IIndividual tree, GameProfile owner, int x, int y, int z); + + @Override + IChromosome[] templateAsChromosomes(IAllele[] template); + + @Override + IChromosome[] templateAsChromosomes(IAllele[] templateActive, IAllele[] templateInactive); + + boolean setFruitBlock(World world, IAlleleFruit allele, float sappiness, short[] indices, int x, int y, int z); + + /* GAME MODE */ + ArrayList<ITreekeepingMode> getTreekeepingModes(); + + ITreekeepingMode getTreekeepingMode(World world); + + ITreekeepingMode getTreekeepingMode(String name); + + void registerTreekeepingMode(ITreekeepingMode mode); + + void setTreekeepingMode(World world, String name); + + /* TEMPLATES */ + @Override + ArrayList<ITree> getIndividualTemplates(); + + /* MUTATIONS */ + @Override + Collection<ITreeMutation> getMutations(boolean shuffle); + +} diff --git a/src/api/java/forestry/api/arboriculture/ITreekeepingMode.java b/src/api/java/forestry/api/arboriculture/ITreekeepingMode.java new file mode 100644 index 00000000..cc5224d8 --- /dev/null +++ b/src/api/java/forestry/api/arboriculture/ITreekeepingMode.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.arboriculture; + +import java.util.ArrayList; + +public interface ITreekeepingMode extends ITreeModifier { + + /** + * @return Localized name of this treekeeping mode. + */ + String getName(); + + /** + * @return Localized list of strings outlining the behaviour of this treekeeping mode. + */ + ArrayList<String> getDescription(); + +} diff --git a/src/api/java/forestry/api/arboriculture/package-info.java b/src/api/java/forestry/api/arboriculture/package-info.java new file mode 100644 index 00000000..de961141 --- /dev/null +++ b/src/api/java/forestry/api/arboriculture/package-info.java @@ -0,0 +1,8 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +@API(apiVersion="2.3.0", owner="ForestryAPI|core", provides="ForestryAPI|arboriculture") +package forestry.api.arboriculture; +import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/circuits/ChipsetManager.java b/src/api/java/forestry/api/circuits/ChipsetManager.java new file mode 100644 index 00000000..c5f0db5c --- /dev/null +++ b/src/api/java/forestry/api/circuits/ChipsetManager.java @@ -0,0 +1,13 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.circuits; + +public class ChipsetManager { + + public static ISolderManager solderManager; + public static ICircuitRegistry circuitRegistry; + +} diff --git a/src/api/java/forestry/api/circuits/ICircuit.java b/src/api/java/forestry/api/circuits/ICircuit.java new file mode 100644 index 00000000..01b7e79d --- /dev/null +++ b/src/api/java/forestry/api/circuits/ICircuit.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.circuits; + +import java.util.List; + +import net.minecraft.tileentity.TileEntity; + +public interface ICircuit { + String getUID(); + + boolean requiresDiscovery(); + + int getLimit(); + + String getName(); + + boolean isCircuitable(TileEntity tile); + + void onInsertion(int slot, TileEntity tile); + + void onLoad(int slot, TileEntity tile); + + void onRemoval(int slot, TileEntity tile); + + void onTick(int slot, TileEntity tile); + + void addTooltip(List<String> list); +} diff --git a/src/api/java/forestry/api/circuits/ICircuitBoard.java b/src/api/java/forestry/api/circuits/ICircuitBoard.java new file mode 100644 index 00000000..3b424d75 --- /dev/null +++ b/src/api/java/forestry/api/circuits/ICircuitBoard.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.circuits; + +import java.util.List; + +import net.minecraft.tileentity.TileEntity; + +import forestry.api.core.INBTTagable; + +public interface ICircuitBoard extends INBTTagable { + + int getPrimaryColor(); + + int getSecondaryColor(); + + void addTooltip(List<String> list); + + void onInsertion(TileEntity tile); + + void onLoad(TileEntity tile); + + void onRemoval(TileEntity tile); + + void onTick(TileEntity tile); + + ICircuit[] getCircuits(); + +} diff --git a/src/api/java/forestry/api/circuits/ICircuitLayout.java b/src/api/java/forestry/api/circuits/ICircuitLayout.java new file mode 100644 index 00000000..e90853b9 --- /dev/null +++ b/src/api/java/forestry/api/circuits/ICircuitLayout.java @@ -0,0 +1,16 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.circuits; + +public interface ICircuitLayout { + + String getUID(); + + String getName(); + + String getUsage(); + +} diff --git a/src/api/java/forestry/api/circuits/ICircuitLibrary.java b/src/api/java/forestry/api/circuits/ICircuitLibrary.java new file mode 100644 index 00000000..0d65ba45 --- /dev/null +++ b/src/api/java/forestry/api/circuits/ICircuitLibrary.java @@ -0,0 +1,10 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.circuits; + +public interface ICircuitLibrary { + +} diff --git a/src/api/java/forestry/api/circuits/ICircuitRegistry.java b/src/api/java/forestry/api/circuits/ICircuitRegistry.java new file mode 100644 index 00000000..9fb2b94d --- /dev/null +++ b/src/api/java/forestry/api/circuits/ICircuitRegistry.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.circuits; + +import java.util.Map; + +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public interface ICircuitRegistry { + + /* CIRCUITS */ + Map<String, ICircuit> getRegisteredCircuits(); + + void registerCircuit(ICircuit circuit); + + ICircuit getCircuit(String uid); + + ICircuitLibrary getCircuitLibrary(World world, String playername); + + /* LAYOUTS */ + Map<String, ICircuitLayout> getRegisteredLayouts(); + + void registerLayout(ICircuitLayout layout); + + ICircuitLayout getLayout(String uid); + + ICircuitLayout getDefaultLayout(); + + ICircuitBoard getCircuitboard(ItemStack itemstack); + + boolean isChipset(ItemStack itemstack); + +} diff --git a/src/api/java/forestry/api/circuits/ISolderManager.java b/src/api/java/forestry/api/circuits/ISolderManager.java new file mode 100644 index 00000000..af9b41f1 --- /dev/null +++ b/src/api/java/forestry/api/circuits/ISolderManager.java @@ -0,0 +1,14 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.circuits; + +import net.minecraft.item.ItemStack; + +public interface ISolderManager { + + void addRecipe(ICircuitLayout layout, ItemStack resource, ICircuit circuit); + +} diff --git a/src/api/java/forestry/api/circuits/package-info.java b/src/api/java/forestry/api/circuits/package-info.java new file mode 100644 index 00000000..88612198 --- /dev/null +++ b/src/api/java/forestry/api/circuits/package-info.java @@ -0,0 +1,8 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +@API(apiVersion="2.0.0", owner="ForestryAPI|core", provides="ForestryAPI|circuits") +package forestry.api.circuits; +import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/core/BiomeHelper.java b/src/api/java/forestry/api/core/BiomeHelper.java new file mode 100644 index 00000000..bc20cd66 --- /dev/null +++ b/src/api/java/forestry/api/core/BiomeHelper.java @@ -0,0 +1,36 @@ +package forestry.api.core; + +import java.util.HashMap; +import java.util.Map; + +import net.minecraft.world.biome.BiomeGenBase; + +import net.minecraftforge.common.BiomeDictionary; + +public class BiomeHelper { + + private static final Map<BiomeGenBase, Boolean> isBiomeHellishCache = new HashMap<BiomeGenBase, Boolean>(); + + /** + * Determines if it can rain or snow in the given biome. + */ + public static boolean canRainOrSnow(BiomeGenBase biomeGenBase) { + return biomeGenBase.getEnableSnow() || biomeGenBase.canSpawnLightningBolt(); + } + + /** + * Determines if a given BiomeGenBase is of HELLISH temperature, since it is treated separately from actual temperature values. + * Uses the BiomeDictionary. + * @param biomeGen BiomeGenBase of the biome in question + * @return true, if the BiomeGenBase is a Nether-type biome; false otherwise. + */ + public static boolean isBiomeHellish(BiomeGenBase biomeGen) { + if (isBiomeHellishCache.containsKey(biomeGen)) { + return isBiomeHellishCache.get(biomeGen); + } + + boolean isBiomeHellish = BiomeDictionary.isBiomeOfType(biomeGen, BiomeDictionary.Type.NETHER); + isBiomeHellishCache.put(biomeGen, isBiomeHellish); + return isBiomeHellish; + } +} diff --git a/src/api/java/forestry/api/core/EnumHumidity.java b/src/api/java/forestry/api/core/EnumHumidity.java new file mode 100644 index 00000000..a8743169 --- /dev/null +++ b/src/api/java/forestry/api/core/EnumHumidity.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.core; + +/** + * Many things Forestry use temperature and humidity of a biome to determine whether they can or how they can work or spawn at a given location. + * + * This enum concerns humidity. + */ +public enum EnumHumidity { + ARID("Arid"), NORMAL("Normal"), DAMP("Damp"); + + public final String name; + + private EnumHumidity(String name) { + this.name = name; + } + + public String getName() { + return this.name; + } + + /** + * Determines the EnumHumidity given a floating point representation of Minecraft Rainfall. + * To check if rainfall is possible in a biome, use BiomeHelper.canRainOrSnow(). + * @param rawHumidity raw rainfall value + * @return EnumHumidity corresponding to rainfall value + */ + public static EnumHumidity getFromValue(float rawHumidity) { + if (rawHumidity > 0.85f) { // matches BiomeGenBase.isHighHumidity() + return DAMP; + } + else if (rawHumidity >= 0.3f) { + return NORMAL; + } + else { + return ARID; + } + } +} diff --git a/src/api/java/forestry/api/core/EnumTemperature.java b/src/api/java/forestry/api/core/EnumTemperature.java new file mode 100644 index 00000000..b0c4c889 --- /dev/null +++ b/src/api/java/forestry/api/core/EnumTemperature.java @@ -0,0 +1,71 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.core; + +import net.minecraft.util.IIcon; +import net.minecraft.world.biome.BiomeGenBase; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +/** + * Many things Forestry use temperature and humidity of a biome to determine whether they can or how they can work or spawn at a given location. + * + * This enum concerns temperature. + */ +public enum EnumTemperature { + NONE("None", "habitats/ocean"), ICY("Icy", "habitats/snow"), COLD("Cold", "habitats/taiga"), + NORMAL("Normal", "habitats/plains"), WARM("Warm", "habitats/jungle"), HOT("Hot", "habitats/desert"), HELLISH("Hellish", "habitats/nether"); + + public final String name; + public final String iconIndex; + + private EnumTemperature(String name, String iconIndex) { + this.name = name; + this.iconIndex = iconIndex; + } + + public String getName() { + return this.name; + } + + @SideOnly(Side.CLIENT) + public IIcon getIcon() { + return ForestryAPI.textureManager.getDefault(iconIndex); + } + + /** + * Determines the EnumTemperature given a floating point representation of + * Minecraft temperature. Hellish biomes are handled based on their biome + * type - check BiomeHelper.isBiomeHellish. + * @param rawTemp raw temperature value + * @return EnumTemperature corresponding to value of rawTemp + */ + public static EnumTemperature getFromValue(float rawTemp) { + if (rawTemp > 1.00f) { + return HOT; + } + else if (rawTemp > 0.80f) { + return WARM; + } + else if (rawTemp > 0.30f) { + return NORMAL; + } + else if (rawTemp > 0.0f) { + return COLD; + } + else { + return ICY; + } + } + + public static EnumTemperature getFromBiome(BiomeGenBase biomeGenBase) { + if (BiomeHelper.isBiomeHellish(biomeGenBase)) { + return HELLISH; + } + return getFromValue(biomeGenBase.temperature); + } +} diff --git a/src/api/java/forestry/api/core/ErrorStateRegistry.java b/src/api/java/forestry/api/core/ErrorStateRegistry.java new file mode 100644 index 00000000..67e5c466 --- /dev/null +++ b/src/api/java/forestry/api/core/ErrorStateRegistry.java @@ -0,0 +1,77 @@ +/* + ******************************************************************************* + * Copyright (c) 2011-2014 SirSengir. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the GNU Lesser Public License v3 + * which accompanies this distribution, and is available at + * http://www.gnu.org/licenses/lgpl-3.0.txt + * + * Various Contributors including, but not limited to: + * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges + ******************************************************************************* + */ +package forestry.api.core; + +import com.google.common.collect.BiMap; +import com.google.common.collect.HashBiMap; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; + +import net.minecraft.client.renderer.texture.IIconRegister; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +/** + * + * @author CovertJaguar <http://www.railcraft.info/> + */ +public class ErrorStateRegistry { + + private static final BiMap<Short, IErrorState> states = HashBiMap.create(); + private static final Map<String, IErrorState> stateNames = new HashMap<String, IErrorState>(); + private static final Set<IErrorState> stateView = Collections.unmodifiableSet(states.inverse().keySet()); + + public static void registerErrorState(IErrorState state) { + if (states.containsKey(state.getID())) + throw new RuntimeException("Forestry Error State does not possess a unique id."); + states.put(state.getID(), state); + addStateName(state, state.getUniqueName()); + } + + public static void addAlias(IErrorState state, String name) { + if (!states.values().contains(state)) + throw new RuntimeException("Forestry Error State did not exist while trying to register alias."); + addStateName(state, name); + } + + private static void addStateName(IErrorState state, String name) { + if (!name.contains(":")) + throw new RuntimeException("Forestry Error State name must be in the format <modid>:<name>."); + if (stateNames.containsKey(name)) + throw new RuntimeException("Forestry Error State does not possess a unique name."); + stateNames.put(name, state); + } + + public static IErrorState getErrorState(short id) { + return states.get(id); + } + + public static IErrorState getErrorState(String name) { + return stateNames.get(name); + } + + public static Set<IErrorState> getErrorStates() { + return stateView; + } + + @SideOnly(Side.CLIENT) + public static void initIcons(IIconRegister register) { + for (IErrorState code : states.values()) { + code.registerIcons(register); + } + } +} diff --git a/src/api/java/forestry/api/core/ForestryAPI.java b/src/api/java/forestry/api/core/ForestryAPI.java new file mode 100644 index 00000000..24c5b7eb --- /dev/null +++ b/src/api/java/forestry/api/core/ForestryAPI.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.core; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +/** + * Forestry's API is divided into several subcategories to make it easier to understand. + * + * If you need to distribute API files, try to only include the parts you are actually + * using to minimize conflicts due to API changes. + * + * .core - Miscallenous base classes and interfaces as well as some basics for tools, armor, game modes and stuff needed by biome mods. + * .fuels - Managers and classes to facilitate adding fuels to various engines and machines. + * .recipes - Managers and helpers to facilitate adding new recipes to various machines. + * .storage - Managers, events and interfaces for defining new backpacks and handling backpack behaviour. + * .mail - Anything related to handling letters and adding new mail carrier systems. + * .genetics - Shared code for all genetic subclasses. + * \ .apiculture - Bees. + * \ .arboriculture - Trees. + * \ .lepidopterology - Butterflies. + * + * Note that if Forestry is not present, all these references will be null. + */ +public class ForestryAPI { + + /** + * The main mod instance for Forestry. + */ + public static Object instance; + + /** + * A {@link ITextureManager} needed for some things in the API. + */ + @SideOnly(Side.CLIENT) + public static ITextureManager textureManager; + + /** + * The currently active {@link IGameMode}. + */ + public static IGameMode activeMode; + + /** + * Provides information on certain Forestry constants (Villager IDs, Chest gen keys, etc) + */ + public static IForestryConstants forestryConstants; + +} diff --git a/src/api/java/forestry/api/core/ForestryEvent.java b/src/api/java/forestry/api/core/ForestryEvent.java new file mode 100644 index 00000000..86aac9bc --- /dev/null +++ b/src/api/java/forestry/api/core/ForestryEvent.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.core; + +import net.minecraft.entity.player.EntityPlayer; + +import com.mojang.authlib.GameProfile; + +import cpw.mods.fml.common.eventhandler.Event; + +import forestry.api.genetics.IAlleleSpecies; +import forestry.api.genetics.IBreedingTracker; +import forestry.api.genetics.IMutation; +import forestry.api.genetics.ISpeciesRoot; + +public abstract class ForestryEvent extends Event { + + private static abstract class BreedingEvent extends ForestryEvent { + public final ISpeciesRoot root; + public final IBreedingTracker tracker; + public final GameProfile username; + + private BreedingEvent(ISpeciesRoot root, GameProfile username, IBreedingTracker tracker) { + super(); + this.root = root; + this.username = username; + this.tracker = tracker; + } + } + + public static class SpeciesDiscovered extends BreedingEvent { + public final IAlleleSpecies species; + public SpeciesDiscovered(ISpeciesRoot root, GameProfile username, IAlleleSpecies species, IBreedingTracker tracker) { + super(root, username, tracker); + this.species = species; + } + } + + public static class MutationDiscovered extends BreedingEvent { + public final IMutation allele; + public MutationDiscovered(ISpeciesRoot root, GameProfile username, IMutation allele, IBreedingTracker tracker) { + super(root, username, tracker); + this.allele = allele; + } + } + + public static class SyncedBreedingTracker extends ForestryEvent { + public final IBreedingTracker tracker; + public final EntityPlayer player; + public SyncedBreedingTracker(IBreedingTracker tracker, EntityPlayer player) { + super(); + this.tracker = tracker; + this.player = player; + } + + } +} diff --git a/src/api/java/forestry/api/core/IArmorNaturalist.java b/src/api/java/forestry/api/core/IArmorNaturalist.java new file mode 100644 index 00000000..87400e27 --- /dev/null +++ b/src/api/java/forestry/api/core/IArmorNaturalist.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.core; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + +public interface IArmorNaturalist { + + /** + * Called when the naturalist's armor acts as spectacles for seeing pollinated tree leaves/flowers. + * + * @param player + * Player doing the viewing + * @param armor + * Armor item + * @param doSee + * Whether or not to actually do the side effects of viewing + * @return true if the armor actually allows the player to see pollination. + */ + public boolean canSeePollination(EntityPlayer player, ItemStack armor, boolean doSee); +} diff --git a/src/api/java/forestry/api/core/IErrorState.java b/src/api/java/forestry/api/core/IErrorState.java new file mode 100644 index 00000000..b17305fb --- /dev/null +++ b/src/api/java/forestry/api/core/IErrorState.java @@ -0,0 +1,41 @@ +/* + ******************************************************************************* + * Copyright (c) 2011-2014 SirSengir. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the GNU Lesser Public License v3 + * which accompanies this distribution, and is available at + * http://www.gnu.org/licenses/lgpl-3.0.txt + * + * Various Contributors including, but not limited to: + * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges + ******************************************************************************* + */ +package forestry.api.core; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +/** + * + * @author CovertJaguar <http://www.railcraft.info/> + */ +public interface IErrorState { + + short getID(); + + String getUniqueName(); + + String getDescription(); + + String getHelp(); + + @SideOnly(Side.CLIENT) + void registerIcons(IIconRegister register); + + @SideOnly(value = Side.CLIENT) + IIcon getIcon(); + +} diff --git a/src/api/java/forestry/api/core/IForestryConstants.java b/src/api/java/forestry/api/core/IForestryConstants.java new file mode 100644 index 00000000..4cf876f6 --- /dev/null +++ b/src/api/java/forestry/api/core/IForestryConstants.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.core; + +public interface IForestryConstants { + + /** + * @return The villager ID for the Apiarist Villager. + */ + public int getApicultureVillagerID(); + + /** + * @return The villager ID for the Arborist Villager. + */ + public int getArboricultureVillagerID(); + + /** + * @return The ChestGenHooks key for adding items to the Forestry Villager chest. + */ + public String getVillagerChestGenKey(); +} diff --git a/src/api/java/forestry/api/core/IGameMode.java b/src/api/java/forestry/api/core/IGameMode.java new file mode 100644 index 00000000..0b2b0c55 --- /dev/null +++ b/src/api/java/forestry/api/core/IGameMode.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.core; + +import net.minecraft.item.ItemStack; + +public interface IGameMode { + + /** + * @return Human-readable identifier for the game mode. (i.e. 'EASY', 'NORMAL', 'HARD') + */ + String getIdentifier(); + + /** + * @param ident Identifier for the setting. (See the gamemode config.) + * @return Value of the requested setting, false if unknown setting. + */ + boolean getBooleanSetting(String ident); + + /** + * @param ident Identifier for the setting. (See the gamemode config.) + * @return Value of the requested setting, 0 if unknown setting. + */ + int getIntegerSetting(String ident); + + /** + * @param ident Identifier for the setting. (See the gamemode config.) + * @return Value of the requested setting, 0 if unknown setting. + */ + float getFloatSetting(String ident); + + /** + * @param ident Identifier for the setting. (See the gamemode config.) + * @return Value of the requested setting, an itemstack containing an apple if unknown setting. + */ + ItemStack getStackSetting(String ident); + +} diff --git a/src/api/java/forestry/api/core/IIconProvider.java b/src/api/java/forestry/api/core/IIconProvider.java new file mode 100644 index 00000000..308e3ce5 --- /dev/null +++ b/src/api/java/forestry/api/core/IIconProvider.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.core; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +/** + * Provides icons, needed in some interfaces, most notably for bees and trees. + */ +public interface IIconProvider { + + @SideOnly(Side.CLIENT) + IIcon getIcon(short texUID); + + @SideOnly(Side.CLIENT) + void registerIcons(IIconRegister register); + +} diff --git a/src/api/java/forestry/api/core/INBTTagable.java b/src/api/java/forestry/api/core/INBTTagable.java new file mode 100644 index 00000000..1d3f8580 --- /dev/null +++ b/src/api/java/forestry/api/core/INBTTagable.java @@ -0,0 +1,14 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.core; + +import net.minecraft.nbt.NBTTagCompound; + +public interface INBTTagable { + void readFromNBT(NBTTagCompound nbttagcompound); + + void writeToNBT(NBTTagCompound nbttagcompound); +} diff --git a/src/api/java/forestry/api/core/IStructureLogic.java b/src/api/java/forestry/api/core/IStructureLogic.java new file mode 100644 index 00000000..aa93d171 --- /dev/null +++ b/src/api/java/forestry/api/core/IStructureLogic.java @@ -0,0 +1,20 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.core; + +public interface IStructureLogic extends INBTTagable { + + /** + * @return String unique to the type of structure controlled by this structure logic. + */ + String getTypeUID(); + + /** + * Called by {@link ITileStructure}'s validateStructure(). + */ + void validateStructure(); + +} diff --git a/src/api/java/forestry/api/core/ITextureManager.java b/src/api/java/forestry/api/core/ITextureManager.java new file mode 100644 index 00000000..a259fcae --- /dev/null +++ b/src/api/java/forestry/api/core/ITextureManager.java @@ -0,0 +1,21 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.core; + +import net.minecraft.util.IIcon; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +@SideOnly(Side.CLIENT) +public interface ITextureManager { + + void registerIconProvider(IIconProvider provider); + + IIcon getIcon(short texUID); + + IIcon getDefault(String ident); +} diff --git a/src/api/java/forestry/api/core/ITileStructure.java b/src/api/java/forestry/api/core/ITileStructure.java new file mode 100644 index 00000000..c8c29cad --- /dev/null +++ b/src/api/java/forestry/api/core/ITileStructure.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.core; + +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.tileentity.TileEntity; + +/** + * The basis for multiblock components. + */ +public interface ITileStructure { + + /** + * @return String unique to the type of structure controlled by this structure logic. Should map to {@link IStructureLogic} + */ + String getTypeUID(); + + /** + * Should map to {@link IStructureLogic} + */ + void validateStructure(); + + /** + * Called when the structure resets. + */ + void onStructureReset(); + + /** + * @return TileEntity that is the master in this structure, null if no structure exists. + */ + ITileStructure getCentralTE(); + + /** + * Called to set the master TileEntity. Implementing TileEntity should keep track of the master's coordinates, not refer to the TE object itself. + * + * @param tile + */ + void setCentralTE(TileEntity tile); + + /** + * @return ISidedInventory representing the inventory accessed from this block. + */ + ISidedInventory getStructureInventory(); + + /** + * Only called on Forestry's own blocks. + */ + void makeMaster(); + + /** + * @return true if this TE is the master in a structure, false otherwise. + */ + boolean isMaster(); + + /** + * @return true if the TE is master or has a master. + */ + boolean isIntegratedIntoStructure(); + +} diff --git a/src/api/java/forestry/api/core/IToolPipette.java b/src/api/java/forestry/api/core/IToolPipette.java new file mode 100644 index 00000000..f5f1a633 --- /dev/null +++ b/src/api/java/forestry/api/core/IToolPipette.java @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright (c) 2011-2014 SirSengir. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the GNU Lesser Public License v3 + * which accompanies this distribution, and is available at + * http://www.gnu.org/licenses/lgpl-3.0.txt + * + * Various Contributors including, but not limited to: + * SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges + ******************************************************************************/ +package forestry.api.core; + +import net.minecraft.item.ItemStack; + +import net.minecraftforge.fluids.FluidStack; + +/** + * Taken from BuildCraft 5.0.x + */ +public interface IToolPipette { + + /** + * @param pipette + * ItemStack of the pipette. + * @return Capacity of the pipette. + */ + int getCapacity(ItemStack pipette); + + /** + * @param pipette + * @return true if the pipette can pipette. + */ + boolean canPipette(ItemStack pipette); + + /** + * Fills the pipette with the given liquid stack. + * + * @param pipette + * @param liquid + * @param doFill + * @return Amount of liquid used in filling the pipette. + */ + int fill(ItemStack pipette, FluidStack liquid, boolean doFill); + + /** + * Drains liquid from the pipette + * + * @param pipette + * @param maxDrain + * @param doDrain + * @return Fluid stack representing the liquid and amount drained from the pipette. + */ + FluidStack drain(ItemStack pipette, int maxDrain, boolean doDrain); +} diff --git a/src/api/java/forestry/api/core/IToolScoop.java b/src/api/java/forestry/api/core/IToolScoop.java new file mode 100644 index 00000000..583b6c7e --- /dev/null +++ b/src/api/java/forestry/api/core/IToolScoop.java @@ -0,0 +1,13 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.core; + +/** + * Marks a tool as a scoop. + */ +public interface IToolScoop { + +} diff --git a/src/api/java/forestry/api/core/Tabs.java b/src/api/java/forestry/api/core/Tabs.java new file mode 100644 index 00000000..4ce85838 --- /dev/null +++ b/src/api/java/forestry/api/core/Tabs.java @@ -0,0 +1,19 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.core; + +import net.minecraft.creativetab.CreativeTabs; + +/** + * References to the specialised tabs added by Forestry to creative inventory. + */ +public class Tabs { + + public static CreativeTabs tabApiculture; + public static CreativeTabs tabArboriculture; + public static CreativeTabs tabLepidopterology; + +} diff --git a/src/api/java/forestry/api/core/package-info.java b/src/api/java/forestry/api/core/package-info.java new file mode 100644 index 00000000..3db8ba25 --- /dev/null +++ b/src/api/java/forestry/api/core/package-info.java @@ -0,0 +1,8 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +@API(apiVersion="3.0.0", owner="Forestry", provides="ForestryAPI|core") +package forestry.api.core; +import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/farming/Farmables.java b/src/api/java/forestry/api/farming/Farmables.java new file mode 100644 index 00000000..bc4c159c --- /dev/null +++ b/src/api/java/forestry/api/farming/Farmables.java @@ -0,0 +1,20 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.farming; + +import java.util.Collection; +import java.util.HashMap; + +public class Farmables { + /** + * Can be used to add IFarmables to some of the vanilla farm logics. + * + * Identifiers: farmArboreal farmWheat farmGourd farmInfernal farmPoales farmSucculentes farmVegetables farmShroom + */ + public static HashMap<String, Collection<IFarmable>> farmables = new HashMap<String, Collection<IFarmable>>(); + + public static IFarmInterface farmInterface; +} diff --git a/src/api/java/forestry/api/farming/ICrop.java b/src/api/java/forestry/api/farming/ICrop.java new file mode 100644 index 00000000..22575477 --- /dev/null +++ b/src/api/java/forestry/api/farming/ICrop.java @@ -0,0 +1,21 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.farming; + +import java.util.Collection; + +import net.minecraft.item.ItemStack; + +public interface ICrop { + + /** + * Harvests this crop. Performs the necessary manipulations to set the crop into a "harvested" state. + * + * @return Products harvested. + */ + Collection<ItemStack> harvest(); + +} diff --git a/src/api/java/forestry/api/farming/IFarmComponent.java b/src/api/java/forestry/api/farming/IFarmComponent.java new file mode 100644 index 00000000..3387f7a3 --- /dev/null +++ b/src/api/java/forestry/api/farming/IFarmComponent.java @@ -0,0 +1,17 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.farming; + +import forestry.api.core.ITileStructure; + +public interface IFarmComponent extends ITileStructure { + + boolean hasFunction(); + + void registerListener(IFarmListener listener); + + void removeListener(IFarmListener listener); +} diff --git a/src/api/java/forestry/api/farming/IFarmHousing.java b/src/api/java/forestry/api/farming/IFarmHousing.java new file mode 100644 index 00000000..acdd982d --- /dev/null +++ b/src/api/java/forestry/api/farming/IFarmHousing.java @@ -0,0 +1,74 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.farming; + +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; + +public interface IFarmHousing { + + int[] getCoords(); + + int[] getArea(); + + int[] getOffset(); + + World getWorld(); + + /** + * Will run the work cycle on a master TE. Will do nothing on any other farm component. + * + * @return true if any work was done, false otherwise. + */ + boolean doWork(); + + boolean hasLiquid(FluidStack liquid); + + void removeLiquid(FluidStack liquid); + + boolean hasResources(ItemStack[] resources); + + void removeResources(ItemStack[] resources); + + /** + * Callback for {@link IFarmLogic}s to plant a sapling, seed, germling, stem. Will remove the appropriate germling from the farm's inventory. It's up to the + * logic to only call this on a valid location. + * + * @param farmable + * @param world + * @param x + * @param y + * @param z + * @return true if planting was successful, false otherwise. + */ + boolean plantGermling(IFarmable farmable, World world, int x, int y, int z); + + /* INTERACTION WITH HATCHES */ + boolean acceptsAsGermling(ItemStack itemstack); + + boolean acceptsAsResource(ItemStack itemstack); + + boolean acceptsAsFertilizer(ItemStack itemstack); + + /* LOGIC */ + /** + * Set a farm logic for the given direction. UP/DOWN/UNKNOWN are invalid! + * + * @param direction + * @param logic + */ + void setFarmLogic(ForgeDirection direction, IFarmLogic logic); + + /** + * Reset the farm logic for the given direction to default. UP/DOWN/UNKNOWN are invalid! + * + * @param direction + */ + void resetFarmLogic(ForgeDirection direction); +} diff --git a/src/api/java/forestry/api/farming/IFarmInterface.java b/src/api/java/forestry/api/farming/IFarmInterface.java new file mode 100644 index 00000000..08968747 --- /dev/null +++ b/src/api/java/forestry/api/farming/IFarmInterface.java @@ -0,0 +1,20 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.farming; + +import forestry.api.core.IStructureLogic; + +public interface IFarmInterface { + + /** + * Creates {@link IStructureLogic} for use in farm components. + * + * @param structure + * {@link IFarmComponent} to create the logic for. + * @return {@link IStructureLogic} for use in farm components + */ + IStructureLogic createFarmStructureLogic(IFarmComponent structure); +} diff --git a/src/api/java/forestry/api/farming/IFarmListener.java b/src/api/java/forestry/api/farming/IFarmListener.java new file mode 100644 index 00000000..461525ff --- /dev/null +++ b/src/api/java/forestry/api/farming/IFarmListener.java @@ -0,0 +1,77 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.farming; + +import java.util.Collection; + +import net.minecraft.item.ItemStack; + +import net.minecraftforge.common.util.ForgeDirection; + +public interface IFarmListener { + + /** + * Called before a crop is harvested. + * + * @param crop + * ICrop about to be harvested. + * @return true to cancel further processing of this crop. + */ + boolean beforeCropHarvest(ICrop crop); + + /** + * Called after a crop has been harvested, but before harvested items are stowed in the farms inventory. + * + * @param harvested + * Collection of harvested stacks. May be manipulated. Ensure removal of stacks with 0 or less items! + * @param crop + * Harvested {@link ICrop} + */ + void afterCropHarvest(Collection<ItemStack> harvested, ICrop crop); + + /** + * Called after the stack of collected items has been returned by the farm logic, but before it is added to the farm's pending queue. + * + * @param collected + * Collection of collected stacks. May be manipulated. Ensure removal of stacks with 0 or less items! + * @param logic + */ + void hasCollected(Collection<ItemStack> collected, IFarmLogic logic); + + /** + * Called after farmland has successfully been cultivated by a farm logic. + * + * @param logic + * @param x + * @param y + * @param z + * @param direction + * @param extent + */ + void hasCultivated(IFarmLogic logic, int x, int y, int z, ForgeDirection direction, int extent); + + /** + * Called after the stack of harvested crops has been returned by the farm logic, but before it is added to the farm's pending queue. + * + * @param harvested + * @param logic + * @param x + * @param y + * @param z + * @param direction + * @param extent + */ + void hasScheduledHarvest(Collection<ICrop> harvested, IFarmLogic logic, int x, int y, int z, ForgeDirection direction, int extent); + + /** + * Can be used to cancel farm task on a per side/{@link IFarmLogic} basis. + * + * @param logic + * @param direction + * @return true to skip any work action on the given logic and direction for this work cycle. + */ + boolean cancelTask(IFarmLogic logic, ForgeDirection direction); +} diff --git a/src/api/java/forestry/api/farming/IFarmLogic.java b/src/api/java/forestry/api/farming/IFarmLogic.java new file mode 100644 index 00000000..1c2482c0 --- /dev/null +++ b/src/api/java/forestry/api/farming/IFarmLogic.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.farming; + +import java.util.Collection; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraftforge.common.util.ForgeDirection; + +public interface IFarmLogic { + + int getFertilizerConsumption(); + + int getWaterConsumption(float hydrationModifier); + + boolean isAcceptedResource(ItemStack itemstack); + + boolean isAcceptedGermling(ItemStack itemstack); + + Collection<ItemStack> collect(); + + boolean cultivate(int x, int y, int z, ForgeDirection direction, int extent); + + Collection<ICrop> harvest(int x, int y, int z, ForgeDirection direction, int extent); + + IFarmLogic setManual(boolean manual); + + @SideOnly(Side.CLIENT) + IIcon getIcon(); + + ResourceLocation getSpriteSheet(); + + String getName(); +} diff --git a/src/api/java/forestry/api/farming/IFarmable.java b/src/api/java/forestry/api/farming/IFarmable.java new file mode 100644 index 00000000..440ae599 --- /dev/null +++ b/src/api/java/forestry/api/farming/IFarmable.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.farming; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +/** + * IGermling describes a crop or other harvestable object and can be used to inspect item stacks and blocks for matches. + */ +public interface IFarmable { + + /** + * @param world + * @param x + * @param y + * @param z + * @return true if the block at the given location is a "sapling" for this type, i.e. a non-harvestable immature version of the crop. + */ + boolean isSaplingAt(World world, int x, int y, int z); + + /** + * @param world + * @param x + * @param y + * @param z + * @return {@link ICrop} if the block at the given location is a harvestable and mature crop, null otherwise. + */ + ICrop getCropAt(World world, int x, int y, int z); + + /** + * @param itemstack + * @return true if the item is a valid germling (plantable sapling, seed, etc.) for this type. + */ + boolean isGermling(ItemStack itemstack); + + /** + * @param itemstack + * @return true if the item is something that can drop from this type without actually being harvested as a crop. (Apples or sapling from decaying leaves.) + */ + boolean isWindfall(ItemStack itemstack); + + /** + * Plants a sapling by manipulating the world. The {@link IFarmLogic} should have verified the given location as valid. Called by the {@link IFarmHousing} + * which handles resources. + * + * @param germling + * @param world + * @param x + * @param y + * @param z + * @return true on success, false otherwise. + */ + boolean plantSaplingAt(EntityPlayer player, ItemStack germling, World world, int x, int y, int z); + +} diff --git a/src/api/java/forestry/api/farming/package-info.java b/src/api/java/forestry/api/farming/package-info.java new file mode 100644 index 00000000..4460886c --- /dev/null +++ b/src/api/java/forestry/api/farming/package-info.java @@ -0,0 +1,8 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +@API(apiVersion="1.1.0", owner="ForestryAPI|core", provides="ForestryAPI|farming") +package forestry.api.farming; +import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/food/BeverageManager.java b/src/api/java/forestry/api/food/BeverageManager.java new file mode 100644 index 00000000..2b0143ab --- /dev/null +++ b/src/api/java/forestry/api/food/BeverageManager.java @@ -0,0 +1,13 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.food; + +public class BeverageManager { + public static IBeverageEffect[] effectList = new IBeverageEffect[128]; + + public static IInfuserManager infuserManager; + public static IIngredientManager ingredientManager; +} diff --git a/src/api/java/forestry/api/food/IBeverageEffect.java b/src/api/java/forestry/api/food/IBeverageEffect.java new file mode 100644 index 00000000..6a787411 --- /dev/null +++ b/src/api/java/forestry/api/food/IBeverageEffect.java @@ -0,0 +1,17 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.food; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.World; + +public interface IBeverageEffect { + int getId(); + + void doEffect(World world, EntityPlayer player); + + String getDescription(); +} diff --git a/src/api/java/forestry/api/food/IInfuserManager.java b/src/api/java/forestry/api/food/IInfuserManager.java new file mode 100644 index 00000000..d778ffa4 --- /dev/null +++ b/src/api/java/forestry/api/food/IInfuserManager.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.food; + +import net.minecraft.item.ItemStack; + +public interface IInfuserManager { + + void addMixture(int meta, ItemStack ingredient, IBeverageEffect effect); + + void addMixture(int meta, ItemStack[] ingredients, IBeverageEffect effect); + + ItemStack getSeasoned(ItemStack base, ItemStack[] ingredients); + + boolean hasMixtures(ItemStack[] ingredients); + + boolean isIngredient(ItemStack itemstack); + + ItemStack[] getRequired(ItemStack[] ingredients); + +} diff --git a/src/api/java/forestry/api/food/IIngredientManager.java b/src/api/java/forestry/api/food/IIngredientManager.java new file mode 100644 index 00000000..fab0e012 --- /dev/null +++ b/src/api/java/forestry/api/food/IIngredientManager.java @@ -0,0 +1,16 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.food; + +import net.minecraft.item.ItemStack; + +public interface IIngredientManager { + + String getDescription(ItemStack itemstack); + + void addIngredient(ItemStack ingredient, String description); + +} diff --git a/src/api/java/forestry/api/food/package-info.java b/src/api/java/forestry/api/food/package-info.java new file mode 100644 index 00000000..372c3016 --- /dev/null +++ b/src/api/java/forestry/api/food/package-info.java @@ -0,0 +1,8 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +@API(apiVersion="1.1.0", owner="ForestryAPI|core", provides="ForestryAPI|food") +package forestry.api.food; +import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/fuels/EngineBronzeFuel.java b/src/api/java/forestry/api/fuels/EngineBronzeFuel.java new file mode 100644 index 00000000..cbab0caf --- /dev/null +++ b/src/api/java/forestry/api/fuels/EngineBronzeFuel.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.fuels; + +import net.minecraftforge.fluids.Fluid; + +public class EngineBronzeFuel { + /** + * Item that is valid fuel for a biogas engine. + */ + public final Fluid liquid; + /** + * Power produced by this fuel per work cycle of the engine. + */ + public final int powerPerCycle; + /** + * How many work cycles a single "stack" of this type lasts. + */ + public final int burnDuration; + /** + * By how much the normal heat dissipation rate of 1 is multiplied when using this fuel type. + */ + public final int dissipationMultiplier; + + public EngineBronzeFuel(Fluid liquid, int powerPerCycle, int burnDuration, int dissipationMultiplier) { + this.liquid = liquid; + this.powerPerCycle = powerPerCycle; + this.burnDuration = burnDuration; + this.dissipationMultiplier = dissipationMultiplier; + } +} diff --git a/src/api/java/forestry/api/fuels/EngineCopperFuel.java b/src/api/java/forestry/api/fuels/EngineCopperFuel.java new file mode 100644 index 00000000..af568dd4 --- /dev/null +++ b/src/api/java/forestry/api/fuels/EngineCopperFuel.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.fuels; + +import net.minecraft.item.ItemStack; + +public class EngineCopperFuel { + + /** + * Item that is valid fuel for a peat-fired engine. + */ + public final ItemStack fuel; + /** + * Power produced by this fuel per work cycle. + */ + public final int powerPerCycle; + /** + * Amount of work cycles this item lasts before being consumed. + */ + public final int burnDuration; + + public EngineCopperFuel(ItemStack fuel, int powerPerCycle, int burnDuration) { + this.fuel = fuel; + this.powerPerCycle = powerPerCycle; + this.burnDuration = burnDuration; + } + +} diff --git a/src/api/java/forestry/api/fuels/FermenterFuel.java b/src/api/java/forestry/api/fuels/FermenterFuel.java new file mode 100644 index 00000000..32989a80 --- /dev/null +++ b/src/api/java/forestry/api/fuels/FermenterFuel.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.fuels; + +import net.minecraft.item.ItemStack; + +public class FermenterFuel { + /** + * Item that is a valid fuel for the fermenter (i.e. fertilizer). + */ + public final ItemStack item; + /** + * How much is fermeted per work cycle, i.e. how much biomass is produced per cycle. + */ + public final int fermentPerCycle; + /** + * Amount of work cycles a single item of this fuel lasts before expiring. + */ + public final int burnDuration; + + public FermenterFuel(ItemStack item, int fermentPerCycle, int burnDuration) { + this.item = item; + this.fermentPerCycle = fermentPerCycle; + this.burnDuration = burnDuration; + } +} diff --git a/src/api/java/forestry/api/fuels/FuelManager.java b/src/api/java/forestry/api/fuels/FuelManager.java new file mode 100644 index 00000000..f53d6fb7 --- /dev/null +++ b/src/api/java/forestry/api/fuels/FuelManager.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.fuels; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; + +import java.util.HashMap; + + +public class FuelManager { + /** + * Add new fuels for the fermenter here (i.e. fertilizer). + */ + public static HashMap<ItemStack, FermenterFuel> fermenterFuel; + /** + * Add new resources for the moistener here (i.e. wheat) + */ + public static HashMap<ItemStack, MoistenerFuel> moistenerResource; + /** + * Add new substrates for the rainmaker here + */ + public static HashMap<ItemStack, RainSubstrate> rainSubstrate; + /** + * Add new fuels for EngineBronze (= biogas engine) here + */ + public static HashMap<Fluid, EngineBronzeFuel> bronzeEngineFuel; + /** + * Add new fuels for EngineCopper (= peat-fired engine) here + */ + public static HashMap<ItemStack, EngineCopperFuel> copperEngineFuel; + /** + * Add new fuels for Generator here + */ + public static HashMap<Fluid, GeneratorFuel> generatorFuel; + +} diff --git a/src/api/java/forestry/api/fuels/GeneratorFuel.java b/src/api/java/forestry/api/fuels/GeneratorFuel.java new file mode 100644 index 00000000..16e2ee4d --- /dev/null +++ b/src/api/java/forestry/api/fuels/GeneratorFuel.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.fuels; + +import net.minecraftforge.fluids.FluidStack; + +public class GeneratorFuel { + + /** + * LiquidStack representing the fuel type and amount consumed per triggered cycle. + */ + public final FluidStack fuelConsumed; + /** + * EU emitted per tick while this fuel is being consumed in the generator (i.e. biofuel = 32, biomass = 8). + */ + public final int eu; + /** + * Rate at which the fuel is consumed. 1 - Every tick 2 - Every second tick 3 - Every third tick etc. + */ + public final int rate; + + public GeneratorFuel(FluidStack fuelConsumed, int eu, int rate) { + this.fuelConsumed = fuelConsumed; + this.eu = eu; + this.rate = rate; + } + +} diff --git a/src/api/java/forestry/api/fuels/MoistenerFuel.java b/src/api/java/forestry/api/fuels/MoistenerFuel.java new file mode 100644 index 00000000..4c4c7a0b --- /dev/null +++ b/src/api/java/forestry/api/fuels/MoistenerFuel.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.fuels; + +import net.minecraft.item.ItemStack; + +public class MoistenerFuel { + /** + * The item to use + */ + public final ItemStack item; + /** + * The item that leaves the moistener's working slot (i.e. mouldy wheat, decayed wheat, mulch) + */ + public final ItemStack product; + /** + * How much this item contributes to the final product of the moistener (i.e. mycelium) + */ + public final int moistenerValue; + /** + * What stage this product represents. Resources with lower stage value will be consumed first. + */ + public final int stage; + + public MoistenerFuel(ItemStack item, ItemStack product, int stage, int moistenerValue) { + this.item = item; + this.product = product; + this.stage = stage; + this.moistenerValue = moistenerValue; + } +} diff --git a/src/api/java/forestry/api/fuels/RainSubstrate.java b/src/api/java/forestry/api/fuels/RainSubstrate.java new file mode 100644 index 00000000..ab0deb5a --- /dev/null +++ b/src/api/java/forestry/api/fuels/RainSubstrate.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.fuels; + +import net.minecraft.item.ItemStack; + +public class RainSubstrate { + /** + * Rain substrate capable of activating the rainmaker. + */ + public ItemStack item; + /** + * Duration of the rain shower triggered by this substrate in Minecraft ticks. + */ + public int duration; + /** + * Speed of activation sequence triggered. + */ + public float speed; + + public boolean reverse; + + public RainSubstrate(ItemStack item, int duration, float speed) { + this(item, duration, speed, false); + } + + public RainSubstrate(ItemStack item, float speed) { + this(item, 0, speed, true); + } + + public RainSubstrate(ItemStack item, int duration, float speed, boolean reverse) { + this.item = item; + this.duration = duration; + this.speed = speed; + this.reverse = reverse; + } +} diff --git a/src/api/java/forestry/api/fuels/package-info.java b/src/api/java/forestry/api/fuels/package-info.java new file mode 100644 index 00000000..748fa228 --- /dev/null +++ b/src/api/java/forestry/api/fuels/package-info.java @@ -0,0 +1,8 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +@API(apiVersion="2.0.1", owner="ForestryAPI|core", provides="ForestryAPI|fuels") +package forestry.api.fuels; +import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/genetics/AlleleManager.java b/src/api/java/forestry/api/genetics/AlleleManager.java new file mode 100644 index 00000000..6e351162 --- /dev/null +++ b/src/api/java/forestry/api/genetics/AlleleManager.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import java.util.HashMap; + +import net.minecraft.item.ItemStack; + +/** + * Holds a static reference to the {@link IAlleleRegistry}. + */ +public class AlleleManager { + /** + * Main access point for all things related to genetics. See {@link IAlleleRegistry} for details. + */ + public static IAlleleRegistry alleleRegistry; + /** + * Translates plain leaf blocks into genetic data. Used by bees and butterflies to convert and pollinate foreign leaf blocks. + */ + public static HashMap<ItemStack, IIndividual> ersatzSpecimen = new HashMap<ItemStack, IIndividual>(); + /** + * Translates plain saplings into genetic data. Used by the treealyzer and the farm to convert foreign saplings. + */ + public static HashMap<ItemStack, IIndividual> ersatzSaplings = new HashMap<ItemStack, IIndividual>(); + /** + * Queryable instance of an {@link IClimateHelper} for easier implementation. + */ + public static IClimateHelper climateHelper; + /** + * Creates Forestry alleles. + */ + public static IAlleleFactory alleleFactory; +} diff --git a/src/api/java/forestry/api/genetics/EnumTolerance.java b/src/api/java/forestry/api/genetics/EnumTolerance.java new file mode 100644 index 00000000..6ff0085e --- /dev/null +++ b/src/api/java/forestry/api/genetics/EnumTolerance.java @@ -0,0 +1,16 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +public enum EnumTolerance { + NONE, + + BOTH_1, BOTH_2, BOTH_3, BOTH_4, BOTH_5, + + UP_1, UP_2, UP_3, UP_4, UP_5, + + DOWN_1, DOWN_2, DOWN_3, DOWN_4, DOWN_5 +} diff --git a/src/api/java/forestry/api/genetics/IAllele.java b/src/api/java/forestry/api/genetics/IAllele.java new file mode 100644 index 00000000..52747410 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IAllele.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +/** + * An {@link IIndividual}'s {@link IGenome} is composed of {@link IChromosome}s consisting each of a primary and secondary {@link IAllele}. + * + * {@link IAllele}s hold all information regarding an {@link IIndividual}'s traits, from species to size, temperature tolerances, etc. + * + * Should be extended for different types of alleles. ISpeciesAllele, IBiomeAllele, etc. + * + * @author SirSengir + */ +public interface IAllele { + + /** + * @return A unique string identifier for this allele. + */ + String getUID(); + + /** + * @return true if the allele is dominant, false otherwise. + */ + boolean isDominant(); + + /** + * @return Localized short, human-readable identifier used in tooltips and beealyzer. + */ + String getName(); + + /** + * @return The unlocalized identifier + */ + String getUnlocalizedName(); + +} diff --git a/src/api/java/forestry/api/genetics/IAlleleArea.java b/src/api/java/forestry/api/genetics/IAlleleArea.java new file mode 100644 index 00000000..7277ff0a --- /dev/null +++ b/src/api/java/forestry/api/genetics/IAlleleArea.java @@ -0,0 +1,15 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +/** + * Simple interface to allow adding additional alleles containing float values. + */ +public interface IAlleleArea extends IAllele { + + int[] getValue(); + +} diff --git a/src/api/java/forestry/api/genetics/IAlleleBoolean.java b/src/api/java/forestry/api/genetics/IAlleleBoolean.java new file mode 100644 index 00000000..887da3b9 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IAlleleBoolean.java @@ -0,0 +1,16 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +/** + * Simple interface to allow adding additional alleles containing float values. + */ +public interface IAlleleBoolean extends IAllele { + + boolean getValue(); + + +} diff --git a/src/api/java/forestry/api/genetics/IAlleleEffect.java b/src/api/java/forestry/api/genetics/IAlleleEffect.java new file mode 100644 index 00000000..7b94e6b1 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IAlleleEffect.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +/** + * Basic effect allele. + */ +public interface IAlleleEffect extends IAllele { + /** + * @return true if this effect can combine with the effect on other allele (i.e. run before or after). combination can only occur if both effects are + * combinable. + */ + boolean isCombinable(); + + /** + * Returns the passed data storage if it is valid for this effect or a new one if the passed storage object was invalid for this effect. + * + * @param storedData + * @return {@link IEffectData} for the next cycle. + */ + IEffectData validateStorage(IEffectData storedData); + +} diff --git a/src/api/java/forestry/api/genetics/IAlleleFactory.java b/src/api/java/forestry/api/genetics/IAlleleFactory.java new file mode 100644 index 00000000..2b390069 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IAlleleFactory.java @@ -0,0 +1,80 @@ +package forestry.api.genetics; + +/** + * Creates new alleles with smart localization. + * + * + * UID is created like this: + * modId + '.' + category + WordUtils.capitalize(valueName); + * For Example: + * modId:forestry, category:height, valueName:smallest => forestry.heightSmallest + * This is mainly for legacy compatibility and may change in future major versions. + * + * + * The default localization uses: + * [modId].allele.[valueName] + * + * Languages that need category-specific names can override it by defining: + * [modId].allele.[category].[valueName] + * + * For example: + * en_US + * forestry.allele.smallest=Smallest + * ru_RU + * forestry.allele.smallest=????? ????????? + * forestry.allele.height.smallest=????? ?????? + */ +public interface IAlleleFactory { + /** + * @param modId mod prefix for uid and localization (i.e. "forestry") + * @param category allele category for uid and localization (i.e. "height") + * @param valueName allele value name for uid and localization (i.e. "smallest") + * @param value allele float value + * @param isDominant allele dominance + * @return a new IAlleleFloat + */ + IAlleleFloat createFloat(String modId, String category, String valueName, float value, boolean isDominant); + + /** + * @param modId mod prefix for uid and localization (i.e. "forestry") + * @param category allele category for uid and localization (i.e. "territory") + * @param valueName allele value name for uid and localization (i.e. "large") + * @param xDimValue allele area X Size + * @param yDimValue allele area Y Size + * @param zDimValue allele area Z Size + * @param isDominant allele dominance + * @return a new IAlleleArea + */ + IAlleleArea createArea(String modId, String category, String valueName, int xDimValue, int yDimValue, int zDimValue, boolean isDominant); + + /** + * @param modId mod prefix for uid and localization (i.e. "forestry") + * @param category allele category for uid and localization (i.e. "fertility") + * @param valueName allele value name for uid and localization (i.e. "low") + * @param value allele int value + * @param isDominant allele dominance + * @return a new IAlleleInteger + */ + IAlleleInteger createInteger(String modId, String category, String valueName, int value, boolean isDominant); + + /** + * @param modId mod prefix for uid and localization (i.e. "forestry") + * @param category allele category for uid and localization (i.e. "fireproof") + * @param value allele boolean value + * @param isDominant allele dominance + * @return a new IAlleleBoolean + * Note that valueName will always be "true" or "false" + */ + IAlleleBoolean createBoolean(String modId, String category, boolean value, boolean isDominant); + + /** + * @param modId mod prefix for uid (i.e. "forestry") + * @param category allele category for uid (i.e. "flowers") + * @param valueName allele value name for uid (i.e. "vanilla") + * @param value allele IFlowerProvider value + * @param isDominant allele dominance + * @return a new IAlleleFlowers + * IAlleleFlowers localization is handled by the IFlowerProvider.getDescription(), unlike the other alleles. + */ + IAlleleFlowers createFlowers(String modId, String category, String valueName, IFlowerProvider value, boolean isDominant); +} diff --git a/src/api/java/forestry/api/genetics/IAlleleFloat.java b/src/api/java/forestry/api/genetics/IAlleleFloat.java new file mode 100644 index 00000000..6ca28776 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IAlleleFloat.java @@ -0,0 +1,15 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +/** + * Simple interface to allow adding additional alleles containing float values. + */ +public interface IAlleleFloat extends IAllele { + + float getValue(); + +} diff --git a/src/api/java/forestry/api/genetics/IAlleleFlowers.java b/src/api/java/forestry/api/genetics/IAlleleFlowers.java new file mode 100644 index 00000000..0368ca41 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IAlleleFlowers.java @@ -0,0 +1,16 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + + +public interface IAlleleFlowers extends IAllele { + + /** + * @return FlowerProvider + */ + IFlowerProvider getProvider(); + +} diff --git a/src/api/java/forestry/api/genetics/IAlleleHandler.java b/src/api/java/forestry/api/genetics/IAlleleHandler.java new file mode 100644 index 00000000..3d052afe --- /dev/null +++ b/src/api/java/forestry/api/genetics/IAlleleHandler.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +/** + * @author Alex Binnie + * + * Handler for events that occur in IAlleleRegistry, such as registering alleles, branches etc. Useful for handling plugin specific behavior (i.e. + * creating a list of all bee species etc.) + * + */ +public interface IAlleleHandler { + + /** + * Called when an allele is registered with {@link IAlleleRegistry}. + * + * @param allele + * Allele which was registered. + */ + public void onRegisterAllele(IAllele allele); + + /** + * Called when a classification is registered with {@link IAlleleRegistry}. + * + * @param classification + * Classification which was registered. + */ + public void onRegisterClassification(IClassification classification); + + /** + * Called when a fruit family is registered with {@link IAlleleRegistry}. + * + * @param family + * Fruit family which was registered. + */ + public void onRegisterFruitFamily(IFruitFamily family); + +} diff --git a/src/api/java/forestry/api/genetics/IAlleleInteger.java b/src/api/java/forestry/api/genetics/IAlleleInteger.java new file mode 100644 index 00000000..6991efe5 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IAlleleInteger.java @@ -0,0 +1,15 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +/** + * Simple interface to allow adding additional alleles containing integer values. + */ +public interface IAlleleInteger extends IAllele { + + int getValue(); + +} diff --git a/src/api/java/forestry/api/genetics/IAllelePlantType.java b/src/api/java/forestry/api/genetics/IAllelePlantType.java new file mode 100644 index 00000000..211237f2 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IAllelePlantType.java @@ -0,0 +1,16 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import java.util.EnumSet; + +import net.minecraftforge.common.EnumPlantType; + +public interface IAllelePlantType extends IAllele { + + public EnumSet<EnumPlantType> getPlantTypes(); + +} diff --git a/src/api/java/forestry/api/genetics/IAlleleRegistry.java b/src/api/java/forestry/api/genetics/IAlleleRegistry.java new file mode 100644 index 00000000..9b0907b0 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IAlleleRegistry.java @@ -0,0 +1,218 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import java.util.Collection; +import java.util.Map; + +import net.minecraft.item.ItemStack; + +import com.mojang.authlib.GameProfile; + +import forestry.api.genetics.IClassification.EnumClassLevel; + +/** + * Manages {@link ISpeciesRoot}, {@link IAllele}s, {@link IFruitFamily}s, {@link IClassification}, the blacklist and allows creation of research notes. + * + * @author SirSengir + */ +public interface IAlleleRegistry { + + /* SPECIES ROOT CLASSES */ + /** + * Register a {@link ISpeciesRoot}. + * @param root {@link ISpeciesRoot} to register. + */ + void registerSpeciesRoot(ISpeciesRoot root); + + /** + * @return Map of all registered {@link ISpeciesRoot}. + */ + Map<String, ISpeciesRoot> getSpeciesRoot(); + + /** + * Retrieve the {@link ISpeciesRoot} with the given uid. + * @param uid Unique id for the species class, i.e. "rootBees", "rootTrees", "rootButterflies". + * @return {@link ISpeciesRoot} if it exists, null otherwise. + */ + ISpeciesRoot getSpeciesRoot(String uid); + + /** + * Retrieve a matching {@link ISpeciesRoot} for the given itemstack. + * @param stack An itemstack possibly containing NBT data which can be converted by a species root. + * @return {@link ISpeciesRoot} if found, null otherwise. + */ + ISpeciesRoot getSpeciesRoot(ItemStack stack); + + /** + * Retrieve a matching {@link ISpeciesRoot} for the given {@link IIndividual}-class. + * @param clz Class extending {@link IIndividual}. + * @return {@link ISpeciesRoot} if found, null otherwise. + */ + ISpeciesRoot getSpeciesRoot(Class<? extends IIndividual> clz); + + /* INDIVIDUAL */ + /** + * Tests the itemstack for genetic information. + * + * @param stack + * @return true if the itemstack is an individual. + */ + boolean isIndividual(ItemStack stack); + + /** + * Retrieve genetic information from an itemstack. + * + * @param stack + * Stack to retrieve genetic information for. + * @return IIndividual containing genetic information, null if none could be extracted. + */ + IIndividual getIndividual(ItemStack stack); + + /* ALLELES */ + + /** + * @return HashMap of all currently registered alleles. + */ + Map<String, IAllele> getRegisteredAlleles(); + + /** + * Registers an allele. + * + * @param allele + * IAllele to register. + */ + void registerAllele(IAllele allele); + + /** + * @return HashMap of all registered deprecated alleles and their corresponding replacements + */ + Map<String, IAllele> getDeprecatedAlleleReplacements(); + + /** + * Registers an old allele UID and the new IAllele to replace instances of it with. + * + * @param deprecatedAlleleUID + * the old allele's UID + * @param replacement + * the IAllele that the deprecated Allele will be replaced with. + */ + void registerDeprecatedAlleleReplacement(String deprecatedAlleleUID, IAllele replacement); + + /** + * Gets an allele + * + * @param uid + * String based unique identifier of the allele to retrieve. + * @return IAllele if found or a replacement is found in the Deprecated Allele map, null otherwise. + */ + IAllele getAllele(String uid); + + /* CLASSIFICATIONS */ + /** + * @return HashMap of all currently registered classifications. + */ + Map<String, IClassification> getRegisteredClassifications(); + + /** + * Registers a classification. + * + * @param classification + * IClassification to register. + */ + void registerClassification(IClassification classification); + + /** + * Creates and returns a classification. + * + * @param level + * EnumClassLevel of the classification to create. + * @param uid + * String based unique identifier. Implementation will throw an exception if the key is already taken. + * @param scientific + * Binomial for the given classification. + * @return Created {@link IClassification} for easier chaining. + */ + IClassification createAndRegisterClassification(EnumClassLevel level, String uid, String scientific); + + /** + * Gets a classification. + * + * @param uid + * String based unique identifier of the classification to retrieve. + * @return {@link IClassification} if found, null otherwise. + */ + IClassification getClassification(String uid); + + /* FRUIT FAMILIES */ + /** + * Get all registered fruit families. + * + * @return A map of registered fruit families and their UIDs. + */ + Map<String, IFruitFamily> getRegisteredFruitFamilies(); + + /** + * Registers a new fruit family. + * + * @param family + */ + void registerFruitFamily(IFruitFamily family); + + /** + * Retrieves a fruit family identified by uid. + * + * @param uid + * @return {IFruitFamily} if found, false otherwise. + */ + IFruitFamily getFruitFamily(String uid); + + /* ALLELE HANDLERS */ + /** + * Registers a new IAlleleHandler + * + * @param handler + * IAlleleHandler to register. + */ + void registerAlleleHandler(IAlleleHandler handler); + + /* BLACKLIST */ + /** + * Blacklist an allele identified by its UID from mutation. + * + * @param uid + * UID of the allele to blacklist. + */ + void blacklistAllele(String uid); + + /** + * @return Current blacklisted alleles. + */ + Collection<String> getAlleleBlacklist(); + + /** + * @param uid + * UID of the species to vet. + * @return true if the allele is blacklisted. + */ + boolean isBlacklisted(String uid); + + /* RESEARCH */ + /** + * @param researcher Username of the player who researched this note. + * @param species {@link IAlleleSpecies} to encode on the research note. + * @return An itemstack containing a research note with the given species encoded onto it. + */ + ItemStack getSpeciesNoteStack(GameProfile researcher, IAlleleSpecies species); + + /** + * @param researcher Username of the player who researched this note. + * @param mutation {@link IMutation} to encode on the research note. + * @return An itemstack containing a research note with the given mutation encoded onto it. + */ + ItemStack getMutationNoteStack(GameProfile researcher, IMutation mutation); + +} diff --git a/src/api/java/forestry/api/genetics/IAlleleSpecies.java b/src/api/java/forestry/api/genetics/IAlleleSpecies.java new file mode 100644 index 00000000..5a75adef --- /dev/null +++ b/src/api/java/forestry/api/genetics/IAlleleSpecies.java @@ -0,0 +1,115 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import com.mojang.authlib.GameProfile; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import forestry.api.core.EnumHumidity; +import forestry.api.core.EnumTemperature; +import forestry.api.core.IIconProvider; + +/** + * Basic species allele. + */ +public interface IAlleleSpecies extends IAllele { + + /** + * @return the {@link ISpeciesRoot} associated with this species. + */ + ISpeciesRoot getRoot(); + + /** + * @return Localized short description of this species. (May be null.) + */ + String getDescription(); + + /** + * Binomial name of the species sans genus ("Apis"). Returning "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun + * names or return null. + * + * @return flavour text (may be null) + */ + String getBinomial(); + + /** + * Authority for the binomial name, e.g. "Sengir" on species of base Forestry. + * + * @return flavour text (may be null) + */ + String getAuthority(); + + /** + * @return Branch this species is associated with. + */ + IClassification getBranch(); + + /* RESEARCH */ + /** + * Complexity determines the difficulty researching a species. The values of primary and secondary are + * added together (and rounded) to determine the amount of pairs needed for successful research. + * @return Values between 3 - 11 are useful. + */ + int getComplexity(); + + /** + * @param itemstack + * @return A float signifying the chance for the passed itemstack to yield a research success. + */ + float getResearchSuitability(ItemStack itemstack); + + /** + * @param world + * @param gameProfile + * @param individual + * @param bountyLevel + * @return Array of itemstacks representing the bounty for this research success. + */ + ItemStack[] getResearchBounty(World world, GameProfile gameProfile, IIndividual individual, int bountyLevel); + + /* CLIMATE */ + /** + * @return Preferred temperature + */ + EnumTemperature getTemperature(); + + /** + * @return Preferred humidity + */ + EnumHumidity getHumidity(); + + /* MISC */ + /** + * @return true if the species icon should have a glowing effect. + */ + boolean hasEffect(); + + /** + * @return true if the species should not be displayed in NEI or creative inventory. + */ + boolean isSecret(); + + /** + * @return true to have the species count against the species total. + */ + boolean isCounted(); + + /* APPEARANCE */ + /** + * @param renderPass Render pass to get the colour for. + * @return Colour to use for the render pass. + */ + int getIconColour(int renderPass); + + @SideOnly(Side.CLIENT) + IIconProvider getIconProvider(); + +} diff --git a/src/api/java/forestry/api/genetics/IAlleleSpeciesCustom.java b/src/api/java/forestry/api/genetics/IAlleleSpeciesCustom.java new file mode 100644 index 00000000..ff138162 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IAlleleSpeciesCustom.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import forestry.api.core.EnumHumidity; +import forestry.api.core.EnumTemperature; + +public interface IAlleleSpeciesCustom extends IAlleleSpecies { + + IAlleleSpeciesCustom setTemperature(EnumTemperature temperature); + IAlleleSpeciesCustom setHumidity(EnumHumidity humidity); + + IAlleleSpeciesCustom setHasEffect(); + + /** Secret species are not shown in creative mode. */ + IAlleleSpeciesCustom setIsSecret(); + + /** Uncounted species do not count toward total species discovered. */ + IAlleleSpeciesCustom setIsNotCounted(); +} diff --git a/src/api/java/forestry/api/genetics/IAlleleTolerance.java b/src/api/java/forestry/api/genetics/IAlleleTolerance.java new file mode 100644 index 00000000..f5ba9e67 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IAlleleTolerance.java @@ -0,0 +1,15 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +/** + * Simple interface to allow adding additional alleles containing float values. + */ +public interface IAlleleTolerance extends IAllele { + + EnumTolerance getValue(); + +} diff --git a/src/api/java/forestry/api/genetics/IBreedingTracker.java b/src/api/java/forestry/api/genetics/IBreedingTracker.java new file mode 100644 index 00000000..e3614481 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IBreedingTracker.java @@ -0,0 +1,93 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; + +import forestry.api.apiculture.IBeekeepingMode; + +/** + * Keeps track of who bred and/or discovered which species in a world. + * + * @author SirSengir + */ +public interface IBreedingTracker { + + /** + * @return Name of the current {@link IBeekeepingMode}. + */ + String getModeName(); + + /** + * Set the current {@link IBeekeepingMode}. + */ + void setModeName(String name); + + /** + * @return Amount of species discovered. + */ + int getSpeciesBred(); + + /** + * Register the birth of an individual. Will mark it as discovered. + * + * @param individual + */ + void registerBirth(IIndividual individual); + + /** + * Register the pickup of an individual. + * + * @param individual + */ + void registerPickup(IIndividual individual); + + /** + * Marks a species as discovered. Should only be called from registerIndividual normally. + * + * @param species + */ + void registerSpecies(IAlleleSpecies species); + + /** + * Register a successful mutation. Will mark it as discovered. + * + * @param mutation + */ + void registerMutation(IMutation mutation); + + /** + * Queries the tracker for discovered species. + * + * @param mutation + * Mutation to query for. + * @return true if the mutation has been discovered. + */ + boolean isDiscovered(IMutation mutation); + + /** + * Queries the tracker for discovered species. + * + * @param species + * Species to check. + * @return true if the species has been bred. + */ + boolean isDiscovered(IAlleleSpecies species); + + /** + * Synchronizes the tracker to the client side. Should be called before opening any gui needing that information. + * + * @param player + */ + void synchToPlayer(EntityPlayer player); + + /* LOADING & SAVING */ + void decodeFromNBT(NBTTagCompound nbttagcompound); + + void encodeToNBT(NBTTagCompound nbttagcompound); + +} diff --git a/src/api/java/forestry/api/genetics/IChromosome.java b/src/api/java/forestry/api/genetics/IChromosome.java new file mode 100644 index 00000000..d501efba --- /dev/null +++ b/src/api/java/forestry/api/genetics/IChromosome.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import forestry.api.core.INBTTagable; + +/** + * Implementations other than Forestry's default one are not supported! + * + * @author SirSengir + */ +public interface IChromosome extends INBTTagable { + + IAllele getPrimaryAllele(); + + IAllele getSecondaryAllele(); + + IAllele getInactiveAllele(); + + IAllele getActiveAllele(); + +} diff --git a/src/api/java/forestry/api/genetics/IChromosomeType.java b/src/api/java/forestry/api/genetics/IChromosomeType.java new file mode 100644 index 00000000..a3b1f8e0 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IChromosomeType.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +/* + * Interface to be implemented by the enums representing the various chromosomes + */ +public interface IChromosomeType { + + /* + * Get class which all alleles on this chromosome must interface + */ + Class<? extends IAllele> getAlleleClass(); + + String getName(); + + ISpeciesRoot getSpeciesRoot(); + + int ordinal(); + +} diff --git a/src/api/java/forestry/api/genetics/IClassification.java b/src/api/java/forestry/api/genetics/IClassification.java new file mode 100644 index 00000000..f365b915 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IClassification.java @@ -0,0 +1,107 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +/** + * Biological classifications from domain down to genus. + * + * Used by the *alyzers to display hierarchies. + */ +public interface IClassification { + + public enum EnumClassLevel { + + DOMAIN(0x777fff, true), KINGDOM(0x77c3ff), PHYLUM(0x77ffb6, true), DIVISION(0x77ffb6, true), CLASS(0x7bff77), ORDER(0xbeff77), FAMILY(0xfffd77), + SUBFAMILY(0xfffd77), TRIBE(0xfffd77), GENUS(0xffba77); + + private int colour; + private boolean isDroppable; + + private EnumClassLevel(int colour) { + this(colour, false); + } + + private EnumClassLevel(int colour, boolean isDroppable) { + this.colour = colour; + this.isDroppable = isDroppable; + } + + /** + * @return Colour to use for displaying this classification. + */ + public int getColour() { + return colour; + } + + /** + * @return Indicates whether display of this classification level can be ommitted in case of space constraints. + */ + public boolean isDroppable() { + return isDroppable; + } + } + + /** + * @return Level inside the full hierarchy this particular classification is located at. + */ + EnumClassLevel getLevel(); + + /** + * @return Unique String identifier. + */ + String getUID(); + + /** + * @return Localized branch name for user display. + */ + String getName(); + + /** + * A branch approximates a "genus" in real life. Real life examples: "Micrapis", "Megapis" + * + * @return flavour text (may be null) + */ + String getScientific(); + + /** + * @return Localized description of this branch. (May be null.) + */ + String getDescription(); + + /** + * @return Member groups of this one. + */ + IClassification[] getMemberGroups(); + + /** + * Adds subgroups to this group. + */ + void addMemberGroup(IClassification group); + + /** + * @return Member species of this group. + */ + IAlleleSpecies[] getMemberSpecies(); + + /** + * Used by the allele registry to populate internal collection of branch members on the fly. + * + * @param species + */ + void addMemberSpecies(IAlleleSpecies species); + + /** + * @return Parent classification, null if this is root. + */ + IClassification getParent(); + + /** + * Only used internally by the AlleleRegistry if this classification has been added to another one. + * + * @param parent + */ + void setParent(IClassification parent); +} diff --git a/src/api/java/forestry/api/genetics/IClimateHelper.java b/src/api/java/forestry/api/genetics/IClimateHelper.java new file mode 100644 index 00000000..48146042 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IClimateHelper.java @@ -0,0 +1,53 @@ +package forestry.api.genetics; + +import java.util.Collection; + +import forestry.api.core.EnumHumidity; +import forestry.api.core.EnumTemperature; + +public interface IClimateHelper { + /** + * Determines whether the given temperature and humidity are within the given constraints. + * @param temperature The temperature to test. + * @param humidity The humidity to test. + * @param baseTemp Base temperature for the test. + * @param tolTemp Temperature tolerance to apply. + * @param baseHumid Base humidity for the test. + * @param tolHumid Humidity tolerance to apply. + * @return true if both temperature and humidity fit the given constraints. + */ + boolean isWithinLimits(EnumTemperature temperature, EnumHumidity humidity, + EnumTemperature baseTemp, EnumTolerance tolTemp, + EnumHumidity baseHumid, EnumTolerance tolHumid); + + boolean isWithinLimits(EnumTemperature temperature, EnumTemperature baseTemp, EnumTolerance tolTemp); + boolean isWithinLimits(EnumHumidity humidity, EnumHumidity baseHumid, EnumTolerance tolHumid); + + /** + * Gets a collection of humidities which fit the given parameters. + * @param prefered Base humidity from which to measure. + * @param tolerance Tolerance to apply to the base humidity. + * @return A collection of humidities which fall within the given parameters. + */ + Collection<EnumHumidity> getToleratedHumidity(EnumHumidity prefered, EnumTolerance tolerance); + /** + * Gets a collection of temperatures which fit the given parameters. + * @param prefered Base temperature from which to measure. + * @param tolerance Tolerance to apply to the base temperatures. + * @return A collection of temperatures which fall within the given parameters. + */ + Collection<EnumTemperature> getToleratedTemperature(EnumTemperature prefered, EnumTolerance tolerance); + + /** + * Gets a localized, human readable string for the given temperature. + * @param temperature Temperature to generate the string for. + * @return A localized, human readable string for the given temperature. + */ + String toDisplay(EnumTemperature temperature); + /** + * Gets a localized, human readable string for the given humidity. + * @param humidity Humidity to generate the string for. + * @return A localized, human readable string for the given humidity. + */ + String toDisplay(EnumHumidity humidity); +} \ No newline at end of file diff --git a/src/api/java/forestry/api/genetics/IEffectData.java b/src/api/java/forestry/api/genetics/IEffectData.java new file mode 100644 index 00000000..909ab78d --- /dev/null +++ b/src/api/java/forestry/api/genetics/IEffectData.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import forestry.api.core.INBTTagable; + +/** + * Container to hold some temporary data for bee, tree and butterfly effects. + * + * @author SirSengir + */ +public interface IEffectData extends INBTTagable { + void setInteger(int index, int val); + + void setFloat(int index, float val); + + void setBoolean(int index, boolean val); + + int getInteger(int index); + + float getFloat(int index); + + boolean getBoolean(int index); +} diff --git a/src/api/java/forestry/api/genetics/IFlower.java b/src/api/java/forestry/api/genetics/IFlower.java new file mode 100644 index 00000000..79ef8115 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IFlower.java @@ -0,0 +1,20 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import net.minecraft.block.Block; + +public interface IFlower extends Comparable<IFlower> { + + Block getBlock(); + int getMeta(); + + double getWeight(); + void setWeight(double weight); + + boolean isPlantable(); + +} diff --git a/src/api/java/forestry/api/genetics/IFlowerGrowthRule.java b/src/api/java/forestry/api/genetics/IFlowerGrowthRule.java new file mode 100644 index 00000000..55237399 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IFlowerGrowthRule.java @@ -0,0 +1,15 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import net.minecraft.world.World; + +/** + * Basic condition for flower growing + */ +public interface IFlowerGrowthRule { + boolean growFlower(IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y, int z); +} diff --git a/src/api/java/forestry/api/genetics/IFlowerProvider.java b/src/api/java/forestry/api/genetics/IFlowerProvider.java new file mode 100644 index 00000000..9849da03 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IFlowerProvider.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import java.util.List; + +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public interface IFlowerProvider { + /** + * @return True if the block at the passed coordinates is a valid flower for the species. + */ + boolean isAcceptedFlower(World world, IIndividual individual, int x, int y, int z); + + boolean isAcceptedPollinatable(World world, IPollinatable pollinatable); + + /** + * @return True if a flower was planted. + */ + boolean growFlower(World world, IIndividual individual, int x, int y, int z); + + /** + * @return Short, human-readable identifier used in the beealyzer. + */ + String getDescription(); + + /** + * Allows the flower provider to affect the produce at the given location. + * + * @return Array of itemstacks being the (modified or unmodified) produce. + */ + ItemStack[] affectProducts(World world, IIndividual individual, int x, int y, int z, ItemStack[] products); + + /** + * @return List of valid flowers for the flower provider. The first in the array is for use as an icon. + * Returns an empty list if the flower provider does not have any valid flowers. + */ + List<IFlower> getFlowers(); +} diff --git a/src/api/java/forestry/api/genetics/IFlowerRegistry.java b/src/api/java/forestry/api/genetics/IFlowerRegistry.java new file mode 100644 index 00000000..ce6cb42c --- /dev/null +++ b/src/api/java/forestry/api/genetics/IFlowerRegistry.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import java.util.List; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.world.World; + +public interface IFlowerRegistry { + + List<IFlower> getAcceptableFlowers(String flowerType); + + boolean growFlower(String flowerType, World world, IIndividual individual, int x, int y, int z); + + boolean isAcceptedFlower(String flowerType, World world, IIndividual individual, int x, int y, int z); + + /** + * Registers a non-plantable flower, but bees accept them. + * + * @param flowerTypes See {@link forestry.api.apiculture.FlowerManager}.FlowerTypeXXX + */ + void registerAcceptableFlower(Block flowerBlock, String... flowerTypes); + void registerAcceptableFlower(Block flowerBlock, int flowerMeta, String... flowerTypes); + + void registerGrowthRule(IFlowerGrowthRule rule, String... flowerTypes); + + /** + * Registers a plantable flower. + * The distribution is based on its own weight and the total number of plants for this flowerType. + * + * @param weight Weight for the Flower (Vanilla = 1.0, Modded flowers < 1.0) + * @param flowerTypes See {@link forestry.api.apiculture.FlowerManager}.FlowerTypeXXX + */ + void registerPlantableFlower(Block flowerBlock, int flowerMeta, double weight, String... flowerTypes); + + IFlower getRandomPlantableFlower(String flowerType, Random rand); + +} diff --git a/src/api/java/forestry/api/genetics/IFruitBearer.java b/src/api/java/forestry/api/genetics/IFruitBearer.java new file mode 100644 index 00000000..5316f9eb --- /dev/null +++ b/src/api/java/forestry/api/genetics/IFruitBearer.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import java.util.Collection; + +import net.minecraft.item.ItemStack; + +/** + * Can be implemented by tile entities which can bear fruit. + * + * @author SirSengir + */ +public interface IFruitBearer { + + /** + * @return true if the actual tile can bear fruits. + */ + boolean hasFruit(); + + /** + * @return Family of the potential fruits on this tile. + */ + IFruitFamily getFruitFamily(); + + /** + * Picks the fruits of this tile, resetting it to unripe fruits. + * + * @param tool + * Tool used in picking the fruits. May be null. + * @return Picked fruits. + */ + Collection<ItemStack> pickFruit(ItemStack tool); + + /** + * @return float indicating the ripeness of the fruit with >= 1.0f indicating full ripeness. + */ + float getRipeness(); + + /** + * Increases the ripeness of the fruit. + * + * @param add + * Float to add to the ripeness. Will truncate to valid values. + */ + void addRipeness(float add); +} diff --git a/src/api/java/forestry/api/genetics/IFruitFamily.java b/src/api/java/forestry/api/genetics/IFruitFamily.java new file mode 100644 index 00000000..d48a4d8a --- /dev/null +++ b/src/api/java/forestry/api/genetics/IFruitFamily.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +public interface IFruitFamily { + + /** + * @return Unique String identifier. + */ + String getUID(); + + /** + * @return Localized family name for user display. + */ + String getName(); + + /** + * A scientific-y name for this fruit family + * + * @return flavour text (may be null) + */ + String getScientific(); + + /** + * @return Localized description of this fruit family. (May be null.) + */ + String getDescription(); + +} diff --git a/src/api/java/forestry/api/genetics/IGenome.java b/src/api/java/forestry/api/genetics/IGenome.java new file mode 100644 index 00000000..0d3ad231 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IGenome.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import forestry.api.core.INBTTagable; + +/** + * Holds the {@link IChromosome}s which comprise the traits of a given individual. + * + * Only the default implementation is supported. + */ +public interface IGenome extends INBTTagable { + + IAlleleSpecies getPrimary(); + + IAlleleSpecies getSecondary(); + + IChromosome[] getChromosomes(); + + IAllele getActiveAllele(IChromosomeType chromosomeType); + + IAllele getInactiveAllele(IChromosomeType chromosomeType); + + boolean isGeneticEqual(IGenome other); + + ISpeciesRoot getSpeciesRoot(); +} diff --git a/src/api/java/forestry/api/genetics/IHousing.java b/src/api/java/forestry/api/genetics/IHousing.java new file mode 100644 index 00000000..5a510311 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IHousing.java @@ -0,0 +1,57 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; + +import com.mojang.authlib.GameProfile; + +import forestry.api.core.EnumHumidity; +import forestry.api.core.EnumTemperature; +import forestry.api.core.IErrorState; + +/** + * Any housing, hatchery or nest which is a fixed location in the world. + */ +public interface IHousing { + + /** + * @return String containing the login of this housing's owner. + */ + GameProfile getOwnerName(); + + World getWorld(); + + int getXCoord(); + + int getYCoord(); + + int getZCoord(); + + BiomeGenBase getBiome(); + + EnumTemperature getTemperature(); + + EnumHumidity getHumidity(); + + void setErrorState(IErrorState state); + + IErrorState getErrorState(); + + /** + * Adds products to the housing's inventory. + * + * @param product + * ItemStack with the product to add. + * @param all + * if true, success requires that all products are added + * @return Boolean indicating success or failure. + */ + boolean addProduct(ItemStack product, boolean all); + +} diff --git a/src/api/java/forestry/api/genetics/IIndividual.java b/src/api/java/forestry/api/genetics/IIndividual.java new file mode 100644 index 00000000..f86aa582 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IIndividual.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import java.util.List; + +import forestry.api.core.INBTTagable; + +/** + * An actual individual with genetic information. + * + * Only the default implementation is supported. + */ +public interface IIndividual extends INBTTagable { + + String getIdent(); + + String getDisplayName(); + + void addTooltip(List<String> list); + + /** + * Call to mark the IIndividual as analyzed. + * @return true if the IIndividual has not been analyzed previously. + */ + boolean analyze(); + + boolean isAnalyzed(); + + boolean hasEffect(); + + boolean isSecret(); + + IGenome getGenome(); + + /** + * Check whether the genetic makeup of two IIndividuals is identical. Ignores additional data like generations, irregular mating, etc.. + * @param other + * @return true if the given other IIndividual has the amount of chromosomes and their alleles are identical. + */ + boolean isGeneticEqual(IIndividual other); + + /** + * @return A deep copy of this individual. + */ + IIndividual copy(); + + boolean isPureBred(IChromosomeType chromosomeType); + +} diff --git a/src/api/java/forestry/api/genetics/IIndividualLiving.java b/src/api/java/forestry/api/genetics/IIndividualLiving.java new file mode 100644 index 00000000..67ce0a97 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IIndividualLiving.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import net.minecraft.world.World; + +public interface IIndividualLiving extends IIndividual { + + /** + * @return Genetic information of the mate, null if unmated. + */ + IGenome getMate(); + + /** + * @return Current health of the individual. + */ + int getHealth(); + + /** + * @return Maximum health of the individual. + */ + int getMaxHealth(); + + /** + * Age the individual. + * @param world + * @param ageModifier + */ + void age(World world, float ageModifier); + + /** + * Mate with the given individual. + * @param individual the {@link IIndividual} to mate this one with. + */ + void mate(IIndividual individual); + + /** + * @return true if the individual is among the living. + */ + boolean isAlive(); + +} diff --git a/src/api/java/forestry/api/genetics/ILegacyHandler.java b/src/api/java/forestry/api/genetics/ILegacyHandler.java new file mode 100644 index 00000000..901afa7f --- /dev/null +++ b/src/api/java/forestry/api/genetics/ILegacyHandler.java @@ -0,0 +1,17 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +/** + * AlleleManager.alleleRegistry can be cast to this type. + * @deprecated Since Forestry 3.6. Use IAlleleRegistry. + */ +@Deprecated +public interface ILegacyHandler { + void registerLegacyMapping(int id, String uid); + + IAllele getFromLegacyMap(int id); +} diff --git a/src/api/java/forestry/api/genetics/IMutation.java b/src/api/java/forestry/api/genetics/IMutation.java new file mode 100644 index 00000000..8c15ca58 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IMutation.java @@ -0,0 +1,68 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import java.util.Collection; + +/** + * Individuals can be seeded either as hive drops or as mutation results. + * + * {@link IAlleleRegistry} manages these. + * + * @author SirSengir + */ +public interface IMutation { + + /** + * @return {@link ISpeciesRoot} this mutation is associated with. + */ + ISpeciesRoot getRoot(); + + /** + * @return first of the alleles implementing IAlleleSpecies required for this mutation. + */ + IAllele getAllele0(); + + /** + * @return second of the alleles implementing IAlleleSpecies required for this mutation. + */ + IAllele getAllele1(); + + /** + * @return Array of {@link IAllele} representing the full default genome of the mutated side. + * + * Make sure to return a proper array for the species class. Returning an allele of the wrong type will cause cast errors on runtime. + */ + IAllele[] getTemplate(); + + /** + * @return Unmodified base chance for mutation to fire. + */ + float getBaseChance(); + + /** + * @return Collection of localized, human-readable strings describing special mutation conditions, if any. + */ + Collection<String> getSpecialConditions(); + + /** + * @param allele + * @return true if the passed allele is one of the alleles participating in this mutation. + */ + boolean isPartner(IAllele allele); + + /** + * @param allele + * @return the other allele which was not passed as argument. + */ + IAllele getPartner(IAllele allele); + + /** + * @return true if the mutation should not be displayed in the beealyzer. + */ + boolean isSecret(); + +} diff --git a/src/api/java/forestry/api/genetics/IMutationCondition.java b/src/api/java/forestry/api/genetics/IMutationCondition.java new file mode 100644 index 00000000..ac8de0a2 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IMutationCondition.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import net.minecraft.world.World; + +public interface IMutationCondition { + + /** + * Returns a float from 0 to 1 representing the chance for mutation to occur. + * Most will return 1 if the condition is met and 0 otherwise, + * but the float offers flexibility for more advanced conditions. + */ + float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1); + + /** + * A localized description of the mutation condition. (i.e. "A temperature of HOT is required.") + */ + String getDescription(); +} diff --git a/src/api/java/forestry/api/genetics/IMutationCustom.java b/src/api/java/forestry/api/genetics/IMutationCustom.java new file mode 100644 index 00000000..f6d366cd --- /dev/null +++ b/src/api/java/forestry/api/genetics/IMutationCustom.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import net.minecraft.block.Block; + +import net.minecraftforge.common.BiomeDictionary; + +import forestry.api.core.EnumHumidity; +import forestry.api.core.EnumTemperature; + +/** Set custom mutation requirements */ +public interface IMutationCustom extends IMutation { + + /** Prevent this mutation from being shown in the analyzers */ + IMutationCustom setIsSecret(); + + /** Require a specific temperature for this mutation to occur */ + IMutationCustom restrictTemperature(EnumTemperature temperature); + IMutationCustom restrictTemperature(EnumTemperature minTemperature, EnumTemperature maxTemperature); + + /** Require a specific humidity for this mutation to occur */ + IMutationCustom restrictHumidity(EnumHumidity humidity); + IMutationCustom restrictHumidity(EnumHumidity minHumidity, EnumHumidity maxHumidity); + + /** + * Restrict this mutation to certain types of biomes. + * @param types The types of biomes this mutation can occur. + */ + IMutationCustom restrictBiomeType(BiomeDictionary.Type... types); + + /** Restrict the days of the year that this mutation can occur */ + IMutationCustom restrictDateRange(int startMonth, int startDay, int endMonth, int endDay); + + /** Restrict the time of day that this mutation can occur */ + IMutationCustom requireDay(); + IMutationCustom requireNight(); + + /** Require a specific resource to be under the location of the mutation */ + IMutationCustom requireResource(Block block, int meta); + + /** Require some other custom mutation condition */ + IMutationCustom addMutationCondition(IMutationCondition mutationCondition); +} diff --git a/src/api/java/forestry/api/genetics/IPollinatable.java b/src/api/java/forestry/api/genetics/IPollinatable.java new file mode 100644 index 00000000..5b0694d7 --- /dev/null +++ b/src/api/java/forestry/api/genetics/IPollinatable.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import java.util.EnumSet; + +import net.minecraftforge.common.EnumPlantType; + +/** + * Can be implemented by tile entities, if they wish to be pollinatable. + * + * @author SirSengir + */ +public interface IPollinatable { + + /** + * @return plant types this pollinatable is classified as. (Can be used by bees to determine whether to interact or not. + */ + EnumSet<EnumPlantType> getPlantType(); + + /** + * @return IIndividual containing the genetic information of this IPollinatable + */ + IIndividual getPollen(); + + /** + * Checks whether this {@link IPollinatable} can mate with the given pollen. + * + * Must be the one to check genetic equivalency. + * + * @param pollen + * IIndividual representing the pollen. + * @return true if mating is possible, false otherwise. + */ + boolean canMateWith(IIndividual pollen); + + /** + * Pollinates this entity. + * + * @param pollen + * IIndividual representing the pollen. + */ + void mateWith(IIndividual pollen); + +} diff --git a/src/api/java/forestry/api/genetics/ISpeciesRoot.java b/src/api/java/forestry/api/genetics/ISpeciesRoot.java new file mode 100644 index 00000000..7424405d --- /dev/null +++ b/src/api/java/forestry/api/genetics/ISpeciesRoot.java @@ -0,0 +1,163 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.genetics; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Map; +import java.util.Random; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +import com.mojang.authlib.GameProfile; + +/** + * Describes a class of species (i.e. bees, trees, butterflies), provides helper functions and access to common functionality. + */ +public interface ISpeciesRoot { + + /** + * @return A unique identifier for the species class. Should consist of "root" + a common name for the species class in camel-case, i.e. "rootBees", "rootTrees", "rootButterflies". + */ + String getUID(); + + /** + * @return Class of the sub-interface inheriting from {@link IIndividual}. + */ + Class<? extends IIndividual> getMemberClass(); + + /** + * @return Integer denoting the number of (counted) species of this type in the world. + */ + int getSpeciesCount(); + + /** + * Used to check whether a given itemstack contains genetic data corresponding to an {@link IIndividual} of this class. + * @param stack itemstack to check. + * @return true if the itemstack contains an {@link IIndividual} of this class, false otherwise. + */ + boolean isMember(ItemStack stack); + + /** + * Used to check whether a given itemstack contains genetic data corresponding to an {@link IIndividual} of this class and matches the given type. + * @param stack itemstack to check. + * @param type Integer denoting the type needed to match. (i.e. butterfly vs. butterfly serum; bee queens, princesses, drones; etc.) + * @return true if the itemstack contains an {@link IIndividual} of this class, false otherwise. + */ + boolean isMember(ItemStack stack, int type); + + /** + * Used to check whether the given {@link IIndividual} is member of this class. + * @param individual {@link IIndividual} to check. + * @return true if the individual is member of this class, false otherwise. + */ + boolean isMember(IIndividual individual); + + IIndividual getMember(ItemStack stack); + + IIndividual getMember(NBTTagCompound compound); + + ItemStack getMemberStack(IIndividual individual, int type); + + /* BREEDING TRACKER */ + IBreedingTracker getBreedingTracker(World world, GameProfile player); + + /* GENOME MANIPULATION */ + IIndividual templateAsIndividual(IAllele[] template); + + IIndividual templateAsIndividual(IAllele[] templateActive, IAllele[] templateInactive); + + IChromosome[] templateAsChromosomes(IAllele[] template); + + IChromosome[] templateAsChromosomes(IAllele[] templateActive, IAllele[] templateInactive); + + IGenome templateAsGenome(IAllele[] template); + + IGenome templateAsGenome(IAllele[] templateActive, IAllele[] templateInactive); + + /* TEMPLATES */ + /** + * Registers a bee template using the UID of the first allele as identifier. + * + * @param template + */ + void registerTemplate(IAllele[] template); + + /** + * Registers a bee template using the passed identifier. + * + * @param template + */ + void registerTemplate(String identifier, IAllele[] template); + + /** + * Retrieves a registered template using the passed identifier. + * + * @param identifier + * @return Array of {@link IAllele} representing a genome. + */ + IAllele[] getTemplate(String identifier); + + /** + * @return Default individual template for use when stuff breaks. + */ + IAllele[] getDefaultTemplate(); + + /** + * @param rand Random to use. + * @return A random template from the pool of registered species templates. + */ + IAllele[] getRandomTemplate(Random rand); + + Map<String, IAllele[]> getGenomeTemplates(); + ArrayList<? extends IIndividual> getIndividualTemplates(); + + /* MUTATIONS */ + /** + * Use to register mutations. + * + * @param mutation + */ + void registerMutation(IMutation mutation); + + /** + * @return All registered mutations. + */ + Collection<? extends IMutation> getMutations(boolean shuffle); + + /** + * @param other Allele to match mutations against. + * @return All registered mutations the given allele is part of. + */ + Collection<? extends IMutation> getCombinations(IAllele other); + + Collection<? extends IMutation> getPaths(IAllele result, IChromosomeType chromosomeType); + + /* RESEARCH */ + /** + * @return List of generic catalysts which should be accepted for research by species of this class. + */ + Map<ItemStack, Float> getResearchCatalysts(); + + /** + * Sets an item stack as a valid (generic) research catalyst for this class. + * @param itemstack ItemStack to set as suitable. + * @param suitability Float between 0 and 1 to indicate suitability. + */ + void setResearchSuitability(ItemStack itemstack, float suitability); + + /** + * @return Array of {@link IChromosomeType} which are in this species genome + */ + IChromosomeType[] getKaryotype(); + + /** + * @return {@link IChromosomeType} which is the "key" for this species class, usually the species chromosome. + */ + IChromosomeType getKaryotypeKey(); +} diff --git a/src/api/java/forestry/api/genetics/package-info.java b/src/api/java/forestry/api/genetics/package-info.java new file mode 100644 index 00000000..fdd093bb --- /dev/null +++ b/src/api/java/forestry/api/genetics/package-info.java @@ -0,0 +1,8 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +@API(apiVersion="3.2.0", owner="ForestryAPI|core", provides="ForestryAPI|genetics") +package forestry.api.genetics; +import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/lepidopterology/EnumButterflyChromosome.java b/src/api/java/forestry/api/lepidopterology/EnumButterflyChromosome.java new file mode 100644 index 00000000..9f89f7f8 --- /dev/null +++ b/src/api/java/forestry/api/lepidopterology/EnumButterflyChromosome.java @@ -0,0 +1,98 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.lepidopterology; + +import forestry.api.genetics.AlleleManager; +import forestry.api.genetics.IAllele; +import forestry.api.genetics.IAlleleArea; +import forestry.api.genetics.IAlleleBoolean; +import forestry.api.genetics.IAlleleFloat; +import forestry.api.genetics.IAlleleFlowers; +import forestry.api.genetics.IAlleleInteger; +import forestry.api.genetics.IAlleleTolerance; +import forestry.api.genetics.IChromosomeType; +import forestry.api.genetics.ISpeciesRoot; + +public enum EnumButterflyChromosome implements IChromosomeType { + /** + * Species of the bee. Alleles here must implement {@link IAlleleButterflySpecies}. + */ + SPECIES(IAlleleButterflySpecies.class), + /** + * Physical size. + */ + SIZE(IAlleleFloat.class), + /** + * Flight speed. + */ + SPEED(IAlleleFloat.class), + /** + * How long the butterfly can last without access to matching pollinatables. + */ + LIFESPAN(IAlleleInteger.class), + /** + * Species with a higher metabolism have a higher appetite and may cause more damage to their environment. + */ + METABOLISM(IAlleleInteger.class), + /** + * Determines likelyhood of caterpillars and length of caterpillar/pupation phase. Also: Number of max caterpillars after mating? + */ + FERTILITY(IAlleleInteger.class), + /** + * Not sure yet. + */ + TEMPERATURE_TOLERANCE(IAlleleTolerance.class), + /** + * Not sure yet. + */ + HUMIDITY_TOLERANCE(IAlleleTolerance.class), + /** + * Only nocturnal butterflys/moths will fly at night. Allows daylight activity for naturally nocturnal species. + */ + NOCTURNAL(IAlleleBoolean.class), + /** + * Only tolerant flyers will fly in the rain. + */ + TOLERANT_FLYER(IAlleleBoolean.class), + /** + * Fire resistance. + */ + FIRE_RESIST(IAlleleBoolean.class), + /** + * Required flowers/leaves. + */ + FLOWER_PROVIDER(IAlleleFlowers.class), + /** + * Extra effect to surroundings. (?) + */ + EFFECT(IAlleleButterflyEffect.class), + /** + * Not used yet + */ + TERRITORY(IAlleleArea.class), + ; + + Class<? extends IAllele> clss; + + EnumButterflyChromosome(Class<? extends IAllele> clss) { + this.clss = clss; + } + + @Override + public Class<? extends IAllele> getAlleleClass() { + return clss; + } + + @Override + public String getName() { + return this.toString().toLowerCase(); + } + + @Override + public ISpeciesRoot getSpeciesRoot() { + return AlleleManager.alleleRegistry.getSpeciesRoot("rootButterflies"); + } +} diff --git a/src/api/java/forestry/api/lepidopterology/EnumFlutterType.java b/src/api/java/forestry/api/lepidopterology/EnumFlutterType.java new file mode 100644 index 00000000..f197d7b7 --- /dev/null +++ b/src/api/java/forestry/api/lepidopterology/EnumFlutterType.java @@ -0,0 +1,15 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.lepidopterology; + +public enum EnumFlutterType { + BUTTERFLY, + SERUM, + CATERPILLAR, + NONE; + + public static final EnumFlutterType[] VALUES = values(); +} diff --git a/src/api/java/forestry/api/lepidopterology/IAlleleButterflyEffect.java b/src/api/java/forestry/api/lepidopterology/IAlleleButterflyEffect.java new file mode 100644 index 00000000..6457dbe8 --- /dev/null +++ b/src/api/java/forestry/api/lepidopterology/IAlleleButterflyEffect.java @@ -0,0 +1,21 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.lepidopterology; + +import forestry.api.genetics.IAlleleEffect; +import forestry.api.genetics.IEffectData; + +public interface IAlleleButterflyEffect extends IAlleleEffect { + + /** + * Used by butterflies to trigger effects in the world. + * @param butterfly {@link IEntityButterfly} + * @param storedData + * @return {@link forestry.api.genetics.IEffectData} for the next cycle. + */ + IEffectData doEffect(IEntityButterfly butterfly, IEffectData storedData); + +} diff --git a/src/api/java/forestry/api/lepidopterology/IAlleleButterflySpecies.java b/src/api/java/forestry/api/lepidopterology/IAlleleButterflySpecies.java new file mode 100644 index 00000000..c1536118 --- /dev/null +++ b/src/api/java/forestry/api/lepidopterology/IAlleleButterflySpecies.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.lepidopterology; + +import java.util.EnumSet; +import java.util.Map; + +import net.minecraft.item.ItemStack; + +import net.minecraftforge.common.BiomeDictionary; + +import forestry.api.genetics.IAlleleSpecies; + +public interface IAlleleButterflySpecies extends IAlleleSpecies { + + /** + * @return the IBeeRoot + */ + IButterflyRoot getRoot(); + + /** + * @return Path of the texture to use for entity rendering. + */ + String getEntityTexture(); + + /** + * Allows butterflies to restrict random spawns beyond the restrictions set by getTemperature() and getHumidity(). + * + * @return EnumSet of biome tags this butterfly species can be spawned in. + */ + EnumSet<BiomeDictionary.Type> getSpawnBiomes(); + + /** + * @return true if a prospective spawn biome must not match a biome tag outside of getSpawnBiomes. + */ + boolean strictSpawnMatch(); + + /** + * @return Float between 0 and 1 representing the rarity of the species, will affect spawn rate. + */ + float getRarity(); + + /** + * @return Float representing the distance below which this butterfly will take flight if it detects a player which is not sneaking. + */ + float getFlightDistance(); + + /** + * @return true if this species is only active at night. + */ + boolean isNocturnal(); + + Map<ItemStack, Float> getButterflyLoot(); + + Map<ItemStack, Float> getCaterpillarLoot(); +} diff --git a/src/api/java/forestry/api/lepidopterology/IButterfly.java b/src/api/java/forestry/api/lepidopterology/IButterfly.java new file mode 100644 index 00000000..c3013247 --- /dev/null +++ b/src/api/java/forestry/api/lepidopterology/IButterfly.java @@ -0,0 +1,77 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.lepidopterology; + +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import forestry.api.genetics.IIndividualLiving; + +public interface IButterfly extends IIndividualLiving { + + IButterflyGenome getGenome(); + + /** + * @return Genetic information of the mate, null if unmated. + */ + IButterflyGenome getMate(); + + /** + * @return Physical size of the butterfly. + */ + float getSize(); + + /** + * @param world + * @param x + * @param y + * @param z + * @return true if the butterfly can naturally spawn at the given location at this time. (Used to auto-spawn butterflies from tree leaves.) + */ + boolean canSpawn(World world, double x, double y, double z); + + /** + * @param world + * @param x + * @param y + * @param z + * @return true if the butterfly can take flight at the given location at this time. (Used to auto-spawn butterflies from dropped items.) + */ + boolean canTakeFlight(World world, double x, double y, double z); + + /** + * @param world + * @param x + * @param y + * @param z + * @return true if the environment (temperature, humidity) is valid for the butterfly at the given location. + */ + boolean isAcceptedEnvironment(World world, double x, double y, double z); + + IButterfly spawnCaterpillar(IButterflyNursery nursery); + + /** + * @param entity + * @param playerKill Whether or not the butterfly was killed by a player. + * @param lootLevel Loot level according to the weapon used to kill the butterfly. + * @return Array of itemstacks to drop on death of the given entity. + */ + ItemStack[] getLootDrop(IEntityButterfly entity, boolean playerKill, int lootLevel); + + /** + * @param nursery + * @param playerKill Whether or not the nursery was broken by a player. + * @param lootLevel Fortune level. + * @return Array of itemstacks to drop on breaking of the nursery. + */ + ItemStack[] getCaterpillarDrop(IButterflyNursery nursery, boolean playerKill, int lootLevel); + + /** + * Create an exact copy of this butterfly. + */ + IButterfly copy(); + +} diff --git a/src/api/java/forestry/api/lepidopterology/IButterflyGenome.java b/src/api/java/forestry/api/lepidopterology/IButterflyGenome.java new file mode 100644 index 00000000..93816600 --- /dev/null +++ b/src/api/java/forestry/api/lepidopterology/IButterflyGenome.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.lepidopterology; + +import forestry.api.genetics.EnumTolerance; +import forestry.api.genetics.IFlowerProvider; +import forestry.api.genetics.IGenome; + +public interface IButterflyGenome extends IGenome { + + IAlleleButterflySpecies getPrimary(); + + IAlleleButterflySpecies getSecondary(); + + float getSize(); + + int getLifespan(); + + int getMetabolism(); + + int getFertility(); + + float getSpeed(); + + EnumTolerance getToleranceTemp(); + + EnumTolerance getToleranceHumid(); + + boolean getNocturnal(); + + boolean getTolerantFlyer(); + + boolean getFireResist(); + + IFlowerProvider getFlowerProvider(); + + IAlleleButterflyEffect getEffect(); + +} diff --git a/src/api/java/forestry/api/lepidopterology/IButterflyMutation.java b/src/api/java/forestry/api/lepidopterology/IButterflyMutation.java new file mode 100644 index 00000000..027e96eb --- /dev/null +++ b/src/api/java/forestry/api/lepidopterology/IButterflyMutation.java @@ -0,0 +1,14 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.lepidopterology; + +import forestry.api.genetics.IAllele; +import forestry.api.genetics.IGenome; +import forestry.api.genetics.IMutation; + +public interface IButterflyMutation extends IMutation { + float getChance(IButterflyNursery housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1); +} diff --git a/src/api/java/forestry/api/lepidopterology/IButterflyNursery.java b/src/api/java/forestry/api/lepidopterology/IButterflyNursery.java new file mode 100644 index 00000000..56e42f2e --- /dev/null +++ b/src/api/java/forestry/api/lepidopterology/IButterflyNursery.java @@ -0,0 +1,21 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.lepidopterology; + +import forestry.api.genetics.IHousing; +import forestry.api.genetics.IIndividual; + +public interface IButterflyNursery extends IHousing { + + IButterfly getCaterpillar(); + + IIndividual getNanny(); + + void setCaterpillar(IButterfly butterfly); + + boolean canNurse(IButterfly butterfly); + +} diff --git a/src/api/java/forestry/api/lepidopterology/IButterflyRoot.java b/src/api/java/forestry/api/lepidopterology/IButterflyRoot.java new file mode 100644 index 00000000..7028df15 --- /dev/null +++ b/src/api/java/forestry/api/lepidopterology/IButterflyRoot.java @@ -0,0 +1,74 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.lepidopterology; + +import java.util.ArrayList; +import java.util.Collection; + +import net.minecraft.entity.EntityLiving; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +import com.mojang.authlib.GameProfile; + +import forestry.api.genetics.IAllele; +import forestry.api.genetics.IIndividual; +import forestry.api.genetics.ISpeciesRoot; + +public interface IButterflyRoot extends ISpeciesRoot { + + @Override + boolean isMember(ItemStack stack); + + @Override + IButterfly getMember(ItemStack stack); + + @Override + IButterfly getMember(NBTTagCompound compound); + + @Override + ItemStack getMemberStack(IIndividual butterfly, int type); + + /* GENOME CONVERSION */ + @Override + IButterfly templateAsIndividual(IAllele[] template); + + @Override + IButterfly templateAsIndividual(IAllele[] templateActive, IAllele[] templateInactive); + + @Override + IButterflyGenome templateAsGenome(IAllele[] template); + + @Override + IButterflyGenome templateAsGenome(IAllele[] templateActive, IAllele[] templateInactive); + + /* BUTTERFLY SPECIFIC */ + ILepidopteristTracker getBreedingTracker(World world, GameProfile player); + + /** + * Spawns the given butterfly in the world. + * @param butterfly + * @return butterfly entity on success, null otherwise. + */ + EntityLiving spawnButterflyInWorld(World world, IButterfly butterfly, double x, double y, double z); + + /** + * @return true if passed item is mated. + */ + boolean isMated(ItemStack stack); + + /* TEMPLATES */ + @Override + ArrayList<IButterfly> getIndividualTemplates(); + + /* MUTATIONS */ + @Override + Collection<IButterflyMutation> getMutations(boolean shuffle); + + EnumFlutterType getType(ItemStack stack); + +} diff --git a/src/api/java/forestry/api/lepidopterology/IEntityButterfly.java b/src/api/java/forestry/api/lepidopterology/IEntityButterfly.java new file mode 100644 index 00000000..963c7210 --- /dev/null +++ b/src/api/java/forestry/api/lepidopterology/IEntityButterfly.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.lepidopterology; + +import net.minecraft.entity.EntityCreature; +import net.minecraft.entity.passive.IAnimals; + +import forestry.api.genetics.IIndividual; + +public interface IEntityButterfly extends IAnimals { + + void changeExhaustion(int change); + + int getExhaustion(); + + IButterfly getButterfly(); + + /** + * @return The entity as an EntityCreature to save casting. + */ + EntityCreature getEntity(); + + IIndividual getPollen(); + + void setPollen(IIndividual pollen); +} diff --git a/src/api/java/forestry/api/lepidopterology/ILepidopteristTracker.java b/src/api/java/forestry/api/lepidopterology/ILepidopteristTracker.java new file mode 100644 index 00000000..79926975 --- /dev/null +++ b/src/api/java/forestry/api/lepidopterology/ILepidopteristTracker.java @@ -0,0 +1,14 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.lepidopterology; + +import forestry.api.genetics.IBreedingTracker; + +public interface ILepidopteristTracker extends IBreedingTracker { + + void registerCatch(IButterfly butterfly); + +} diff --git a/src/api/java/forestry/api/lepidopterology/package-info.java b/src/api/java/forestry/api/lepidopterology/package-info.java new file mode 100644 index 00000000..070b4322 --- /dev/null +++ b/src/api/java/forestry/api/lepidopterology/package-info.java @@ -0,0 +1,8 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +@API(apiVersion="1.1", owner="ForestryAPI|core", provides="ForestryAPI|lepidopterology") +package forestry.api.lepidopterology; +import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/mail/EnumAddressee.java b/src/api/java/forestry/api/mail/EnumAddressee.java new file mode 100644 index 00000000..28c73847 --- /dev/null +++ b/src/api/java/forestry/api/mail/EnumAddressee.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.mail; + +import java.util.Locale; + +public enum EnumAddressee { + PLAYER, TRADER; + + public static EnumAddressee fromString(String ident) { + ident = ident.toLowerCase(Locale.ENGLISH); + for(EnumAddressee addr : values()) { + if(addr.toString().equals(ident)) + return addr; + } + + return null; + } + + public String toString() { + return super.toString().toLowerCase(Locale.ENGLISH); + } +} diff --git a/src/api/java/forestry/api/mail/EnumPostage.java b/src/api/java/forestry/api/mail/EnumPostage.java new file mode 100644 index 00000000..772114fb --- /dev/null +++ b/src/api/java/forestry/api/mail/EnumPostage.java @@ -0,0 +1,20 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.mail; + +public enum EnumPostage { + P_0(0), P_1(1), P_2(2), P_5(5), P_10(10), P_20(20), P_50(50), P_100(100), P_200(200); + + private final int value; + + private EnumPostage(int value) { + this.value = value; + } + + public int getValue() { + return this.value; + } +} diff --git a/src/api/java/forestry/api/mail/ILetter.java b/src/api/java/forestry/api/mail/ILetter.java new file mode 100644 index 00000000..42df8acb --- /dev/null +++ b/src/api/java/forestry/api/mail/ILetter.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.mail; + +import java.util.List; + +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; + +import forestry.api.core.INBTTagable; + +public interface ILetter extends IInventory, INBTTagable { + + ItemStack[] getPostage(); + + void setProcessed(boolean flag); + + boolean isProcessed(); + + boolean isMailable(); + + void setSender(IMailAddress address); + + IMailAddress getSender(); + + boolean hasRecipient(); + + void setRecipient(IMailAddress address); + + IMailAddress[] getRecipients(); + + String getRecipientString(); + + void setText(String text); + + String getText(); + + void addTooltip(List<String> list); + + boolean isPostPaid(); + + int requiredPostage(); + + void invalidatePostage(); + + ItemStack[] getAttachments(); + + void addAttachment(ItemStack itemstack); + + void addAttachments(ItemStack[] itemstacks); + + int countAttachments(); + + void addStamps(ItemStack stamps); + +} diff --git a/src/api/java/forestry/api/mail/ILetterHandler.java b/src/api/java/forestry/api/mail/ILetterHandler.java new file mode 100644 index 00000000..576a0d7d --- /dev/null +++ b/src/api/java/forestry/api/mail/ILetterHandler.java @@ -0,0 +1,13 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.mail; + +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public interface ILetterHandler { + IPostalState handleLetter(World world, IMailAddress recipient, ItemStack letterStack, boolean doLodge); +} diff --git a/src/api/java/forestry/api/mail/IMailAddress.java b/src/api/java/forestry/api/mail/IMailAddress.java new file mode 100644 index 00000000..8441b09a --- /dev/null +++ b/src/api/java/forestry/api/mail/IMailAddress.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.mail; + +import com.mojang.authlib.GameProfile; + +import forestry.api.core.INBTTagable; + +public interface IMailAddress extends INBTTagable { + + EnumAddressee getType(); + String getName(); + + boolean isValid(); + + boolean isPlayer(); + boolean isTrader(); + + GameProfile getPlayerProfile(); +} diff --git a/src/api/java/forestry/api/mail/IPostOffice.java b/src/api/java/forestry/api/mail/IPostOffice.java new file mode 100644 index 00000000..a8a14eac --- /dev/null +++ b/src/api/java/forestry/api/mail/IPostOffice.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.mail; + +import java.util.Map; + +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public interface IPostOffice { + + void collectPostage(ItemStack[] stamps); + + IPostalState lodgeLetter(World world, ItemStack itemstack, boolean doLodge); + + ItemStack getAnyStamp(int max); + + ItemStack getAnyStamp(EnumPostage postage, int max); + + ItemStack getAnyStamp(EnumPostage[] postages, int max); + + void registerTradeStation(ITradeStation trade); + + void deregisterTradeStation(ITradeStation trade); + + Map<IMailAddress, ITradeStation> getActiveTradeStations(World world); +} diff --git a/src/api/java/forestry/api/mail/IPostRegistry.java b/src/api/java/forestry/api/mail/IPostRegistry.java new file mode 100644 index 00000000..f20352d9 --- /dev/null +++ b/src/api/java/forestry/api/mail/IPostRegistry.java @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.mail; + +import java.util.Map; + +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import com.mojang.authlib.GameProfile; + +public interface IPostRegistry { + + /* POST OFFICE */ + IPostOffice getPostOffice(World world); + + /* MAIL ADDRESSES */ + IMailAddress getMailAddress(GameProfile gameProfile); + IMailAddress getMailAddress(String traderName); + + /* LETTERS */ + boolean isLetter(ItemStack itemstack); + + ILetter createLetter(IMailAddress sender, IMailAddress recipient); + + ILetter getLetter(ItemStack itemstack); + + ItemStack createLetterStack(ILetter letter); + + /* CARRIERS */ + /** + * Registers a new {@link IPostalCarrier}. See {@link IPostalCarrier} for details. + * @param carrier {@link IPostalCarrier} to register. + */ + void registerCarrier(IPostalCarrier carrier); + + IPostalCarrier getCarrier(EnumAddressee uid); + + Map<EnumAddressee, IPostalCarrier> getRegisteredCarriers(); + + /* TRADE STATIONS */ + void deleteTradeStation(World world, IMailAddress address); + + ITradeStation getOrCreateTradeStation(World world, GameProfile owner, IMailAddress address); + + ITradeStation getTradeStation(World world, IMailAddress address); + + boolean isAvailableTradeAddress(World world, IMailAddress address); + + boolean isValidTradeAddress(World world, IMailAddress address); + + /* PO BOXES */ + boolean isValidPOBox(World world, IMailAddress address); + +} diff --git a/src/api/java/forestry/api/mail/IPostalCarrier.java b/src/api/java/forestry/api/mail/IPostalCarrier.java new file mode 100644 index 00000000..28db78ae --- /dev/null +++ b/src/api/java/forestry/api/mail/IPostalCarrier.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.mail; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +/** + * Postal Carriers are systems which can be hooked into Forestry's mail system to handle mail delivery. + * + * The two available carriers in vanilla Forestry are + * "player" - Delivers mail to individual players. + * "trader" - Handles mail addressed to trade stations. + */ +public interface IPostalCarrier { + + /** + * @return An EnumAddressee identifying the type of carrier + */ + EnumAddressee getType(); + + /** + * @return A human-readable name for this carrier. + */ + String getName(); + + @SideOnly(Side.CLIENT) + IIcon getIcon(); + + /** + * Handle delivery of a letter addressed to this carrier. + * @param world The world the {@link IPostOffice} handles. + * @param office {link @IPostOffice} which received this letter and handed it to the carrier. + * @param recipient An identifier for the recipient as typed by the player into the address field. + * @param letterstack ItemStack representing the letter. See {@link IPostRegistry} for helper functions to validate and extract it. + * @param doDeliver Whether or not the letter is supposed to actually be delivered or if delivery is only to be simulated. + * @return {link IPostalState} holding information on success or failure for delivery. + */ + IPostalState deliverLetter(World world, IPostOffice office, IMailAddress recipient, ItemStack letterstack, boolean doDeliver); + +} diff --git a/src/api/java/forestry/api/mail/IPostalState.java b/src/api/java/forestry/api/mail/IPostalState.java new file mode 100644 index 00000000..bc843621 --- /dev/null +++ b/src/api/java/forestry/api/mail/IPostalState.java @@ -0,0 +1,14 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.mail; + +public interface IPostalState { + boolean isOk(); + + String getIdentifier(); + + int ordinal(); +} diff --git a/src/api/java/forestry/api/mail/IStamps.java b/src/api/java/forestry/api/mail/IStamps.java new file mode 100644 index 00000000..4332a811 --- /dev/null +++ b/src/api/java/forestry/api/mail/IStamps.java @@ -0,0 +1,14 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.mail; + +import net.minecraft.item.ItemStack; + +public interface IStamps { + + EnumPostage getPostage(ItemStack itemstack); + +} diff --git a/src/api/java/forestry/api/mail/ITradeStation.java b/src/api/java/forestry/api/mail/ITradeStation.java new file mode 100644 index 00000000..78a498a0 --- /dev/null +++ b/src/api/java/forestry/api/mail/ITradeStation.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.mail; + +import net.minecraft.inventory.IInventory; + +public interface ITradeStation extends ILetterHandler, IInventory { + + IMailAddress getAddress(); + + boolean isValid(); + + void invalidate(); + + void setVirtual(boolean isVirtual); + + boolean isVirtual(); + + TradeStationInfo getTradeInfo(); + +} diff --git a/src/api/java/forestry/api/mail/PostManager.java b/src/api/java/forestry/api/mail/PostManager.java new file mode 100644 index 00000000..c3f0e45b --- /dev/null +++ b/src/api/java/forestry/api/mail/PostManager.java @@ -0,0 +1,11 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.mail; + + +public class PostManager { + public static IPostRegistry postRegistry; +} diff --git a/src/api/java/forestry/api/mail/TradeStationInfo.java b/src/api/java/forestry/api/mail/TradeStationInfo.java new file mode 100644 index 00000000..14424bed --- /dev/null +++ b/src/api/java/forestry/api/mail/TradeStationInfo.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.mail; + +import java.lang.IllegalArgumentException; +import net.minecraft.item.ItemStack; +import com.mojang.authlib.GameProfile; + +public class TradeStationInfo { + public final IMailAddress address; + public final GameProfile owner; + public final ItemStack tradegood; + public final ItemStack[] required; + public final IPostalState state; + + public TradeStationInfo(IMailAddress address, GameProfile owner, ItemStack tradegood, ItemStack[] required, IPostalState state) { + if (!address.isTrader()) { + throw new IllegalArgumentException("TradeStation address must be a trader"); + } + this.address = address; + this.owner = owner; + this.tradegood = tradegood; + this.required = required; + this.state = state; + } +} diff --git a/src/api/java/forestry/api/mail/package-info.java b/src/api/java/forestry/api/mail/package-info.java new file mode 100644 index 00000000..a1050727 --- /dev/null +++ b/src/api/java/forestry/api/mail/package-info.java @@ -0,0 +1,8 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +@API(apiVersion="3.0.0", owner="ForestryAPI|core", provides="ForestryAPI|mail") +package forestry.api.mail; +import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/recipes/ICarpenterManager.java b/src/api/java/forestry/api/recipes/ICarpenterManager.java new file mode 100644 index 00000000..8e3eabbe --- /dev/null +++ b/src/api/java/forestry/api/recipes/ICarpenterManager.java @@ -0,0 +1,67 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.recipes; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.ShapedRecipes; + +import net.minecraftforge.fluids.FluidStack; + +/** + * Provides an interface to the recipe manager of the carpenter. + * + * The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even + * if your mod loads before Forestry. + * + * Accessible via {@link RecipeManagers} + * + * Only shaped recipes can be added currently. + * + * @author SirSengir + */ +public interface ICarpenterManager extends ICraftingProvider { + /** + * Add a shaped recipe to the carpenter. + * + * @param box + * ItemStack of one item representing the required box (carton, crate) for this recipe. May be null. + * @param product + * Crafting result. + * @param materials + * Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}. Notation is the same. + */ + public void addRecipe(ItemStack box, ItemStack product, Object... materials); + + /** + * Add a shaped recipe to the carpenter. + * + * @param packagingTime + * Number of work cycles required to craft the recipe once. + * @param box + * ItemStack of one item representing the required box (carton, crate) for this recipe. May be null. + * @param product + * Crafting result. + * @param materials + * Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}. Notation is the same. + */ + public void addRecipe(int packagingTime, ItemStack box, ItemStack product, Object... materials); + + /** + * Add a shaped recipe to the carpenter. + * + * @param packagingTime + * Number of work cycles required to craft the recipe once. + * @param liquid + * Liquid required in carpenter's tank. + * @param box + * ItemStack of one item representing the required box (carton, crate) for this recipe. May be null. + * @param product + * Crafting result. + * @param materials + * Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}. Notation is the same. + */ + public void addRecipe(int packagingTime, FluidStack liquid, ItemStack box, ItemStack product, Object... materials); +} diff --git a/src/api/java/forestry/api/recipes/ICentrifugeManager.java b/src/api/java/forestry/api/recipes/ICentrifugeManager.java new file mode 100644 index 00000000..910bd32c --- /dev/null +++ b/src/api/java/forestry/api/recipes/ICentrifugeManager.java @@ -0,0 +1,79 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.recipes; + +import java.util.HashMap; + +import net.minecraft.item.ItemStack; + +/** + * Provides an interface to the recipe manager of the centrifuge. + * + * The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even + * if your mod loads before Forestry. + * + * Accessible via {@link RecipeManagers} + * + * @author SirSengir + */ +public interface ICentrifugeManager extends ICraftingProvider { + + /** + * Add a recipe to the centrifuge + * + * @param timePerItem + * Time to centrifugate one item of the given type + * @param resource + * ItemStack containing information on item id and damage. Stack size will be ignored. + * @param products + * HashMap<ItemStack, Integer> specifying the possible products and the chances of them resulting from centrifugation. + */ + public void addRecipe(int timePerItem, ItemStack resource, HashMap<ItemStack, Integer> products); + + /** + * Add a recipe to the centrifuge + * + * @param timePerItem + * Time to centrifugate one item of the given type + * @param resource + * ItemStack containing information on item id and damage. Stack size will be ignored. + * @param produce + * Array of ItemStacks that can be the result of this recipe. + * @param chances + * Array of integers corresponding and matching to produce providing the chance (0-100) for the ItemStack at the given index to be + * produced. + */ + public void addRecipe(int timePerItem, ItemStack resource, ItemStack[] produce, int[] chances); + + /** + * Add a recipe to the centrifuge + * + * @param timePerItem + * Time to centrifugate one item of the given type + * @param resource + * ItemStack containing information on item id and damage. Stack size will be ignored. + * @param primary + * Primary product produced by centrifugating one item. Yield 100 %. + * @param secondary + * Secondary product that may be produced when centrifugating the given item. May be null. + * @param chance + * Chance (1 - 100) for centrifugation to yield the secondary product. + */ + public void addRecipe(int timePerItem, ItemStack resource, ItemStack primary, ItemStack secondary, int chance); + + /** + * Add a recipe to the centrifuge + * + * @param timePerItem + * Time to centrifugate one item of the given type + * @param resource + * ItemStack containing information on item id and damage. Stack size will be ignored. + * @param primary + * Primary product produced by centrifugating one item. Yield 100 %. + */ + public void addRecipe(int timePerItem, ItemStack resource, ItemStack primary); + +} diff --git a/src/api/java/forestry/api/recipes/ICraftingProvider.java b/src/api/java/forestry/api/recipes/ICraftingProvider.java new file mode 100644 index 00000000..502dffb4 --- /dev/null +++ b/src/api/java/forestry/api/recipes/ICraftingProvider.java @@ -0,0 +1,17 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.recipes; + +import java.util.Map; + +public interface ICraftingProvider { + /** + * Access to the full list of recipes contained in the crafting provider. + * + * @return List of the given format where the first array represents inputs and the second outputs. Objects can be either ItemStack or LiquidStack. + */ + public Map<Object[], Object[]> getRecipes(); +} diff --git a/src/api/java/forestry/api/recipes/IFabricatorManager.java b/src/api/java/forestry/api/recipes/IFabricatorManager.java new file mode 100644 index 00000000..a01f0da4 --- /dev/null +++ b/src/api/java/forestry/api/recipes/IFabricatorManager.java @@ -0,0 +1,18 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.recipes; + +import net.minecraft.item.ItemStack; + +import net.minecraftforge.fluids.FluidStack; + +public interface IFabricatorManager extends ICraftingProvider { + + void addRecipe(ItemStack plan, FluidStack molten, ItemStack result, Object[] pattern); + + void addSmelting(ItemStack resource, FluidStack molten, int meltingPoint); + +} diff --git a/src/api/java/forestry/api/recipes/IFermenterManager.java b/src/api/java/forestry/api/recipes/IFermenterManager.java new file mode 100644 index 00000000..92c903bb --- /dev/null +++ b/src/api/java/forestry/api/recipes/IFermenterManager.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.recipes; + +import net.minecraft.item.ItemStack; + +import net.minecraftforge.fluids.FluidStack; + +/** + * Provides an interface to the recipe manager of the fermenter. + * + * The manager is initialized at the beginning of Forestry's BaseMod.load() + * cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be + * null even if your mod loads before Forestry. + * + * Accessible via {@link RecipeManagers} + * + * @author SirSengir + */ +public interface IFermenterManager extends ICraftingProvider { + + /** + * Add a recipe to the fermenter + * + * @param resource ItemStack representing the resource. + * @param fermentationValue Value of the given resource, i.e. how much needs + * to be fermented for the output to be deposited into the product tank. + * @param modifier Modifies the amount of liquid output per work cycle. + * (water = 1.0f, honey = 1.5f) + * @param output LiquidStack representing output liquid. Amount is + * determined by fermentationValue*modifier. + * @param liquid LiquidStack representing resource liquid and amount. + * @throws NullPointerException if resource, output or liquid is null + */ + public void addRecipe(ItemStack resource, int fermentationValue, float modifier, FluidStack output, FluidStack liquid); + + /** + * Add a recipe to the fermenter. Defaults to water as input liquid. + * + * @param resource ItemStack representing the resource. + * @param modifier Modifies the amount of liquid output per work cycle. + * (water = 1.0f, honey = 1.5f) + * @param fermentationValue Value of the given resource, i.e. how much needs + * to be fermented for the output to be deposited into the product tank. + * @param output LiquidStack representing output liquid. Amount is + * determined by fermentationValue*modifier. + * @throws NullPointerException if resource, output or liquid is null + */ + public void addRecipe(ItemStack resource, int fermentationValue, float modifier, FluidStack output); +} diff --git a/src/api/java/forestry/api/recipes/IMoistenerManager.java b/src/api/java/forestry/api/recipes/IMoistenerManager.java new file mode 100644 index 00000000..711264b4 --- /dev/null +++ b/src/api/java/forestry/api/recipes/IMoistenerManager.java @@ -0,0 +1,33 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.recipes; + +import net.minecraft.item.ItemStack; + +/** + * Provides an interface to the recipe manager of the moistener. + * + * The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even + * if your mod loads before Forestry. + * + * Accessible via {@link RecipeManagers} + * + * @author SirSengir + */ +public interface IMoistenerManager extends ICraftingProvider { + + /** + * Add a recipe to the moistener + * + * @param resource + * Item required in resource stack. Will be reduced by one per produced item. + * @param product + * Item to produce per resource processed. + * @param timePerItem + * Moistener runs at 1 - 4 time ticks per ingame tick depending on light level. For mycelium this value is currently 5000. + */ + public void addRecipe(ItemStack resource, ItemStack product, int timePerItem); +} diff --git a/src/api/java/forestry/api/recipes/ISqueezerManager.java b/src/api/java/forestry/api/recipes/ISqueezerManager.java new file mode 100644 index 00000000..0a63b731 --- /dev/null +++ b/src/api/java/forestry/api/recipes/ISqueezerManager.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.recipes; + +import net.minecraft.item.ItemStack; + +import net.minecraftforge.fluids.FluidStack; + +/** + * Provides an interface to the recipe manager of the suqeezer. + * + * The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even + * if your mod loads before Forestry. + * + * Accessible via {@link RecipeManagers} + * + * @author SirSengir + */ +public interface ISqueezerManager extends ICraftingProvider { + + /** + * Add a recipe to the squeezer. + * + * @param timePerItem + * Number of work cycles required to squeeze one set of resources. + * @param resources + * Array of item stacks representing the required resources for one process. Stack size will be taken into account. + * @param liquid + * {@link FluidStack} representing the output of this recipe. + * @param remnants + * Item stack representing the possible remnants from this recipe. + * @param chance + * Chance remnants will be produced by a single recipe cycle. + */ + public void addRecipe(int timePerItem, ItemStack[] resources, FluidStack liquid, ItemStack remnants, int chance); + + /** + * Add a recipe to the squeezer. + * + * @param timePerItem + * Number of work cycles required to squeeze one set of resources. + * @param resources + * Array of item stacks representing the required resources for one process. Stack size will be taken into account. + * @param liquid + * {@link FluidStack} representing the output of this recipe. + */ + public void addRecipe(int timePerItem, ItemStack[] resources, FluidStack liquid); +} diff --git a/src/api/java/forestry/api/recipes/IStillManager.java b/src/api/java/forestry/api/recipes/IStillManager.java new file mode 100644 index 00000000..47fd4215 --- /dev/null +++ b/src/api/java/forestry/api/recipes/IStillManager.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.recipes; + +import net.minecraftforge.fluids.FluidStack; + +/** + * Provides an interface to the recipe manager of the still. + * + * The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even + * if your mod loads before Forestry. + * + * Accessible via {@link RecipeManagers} + * + * Note that this is untested with anything other than biomass->biofuel conversion. + * + * @author SirSengir + */ +public interface IStillManager extends ICraftingProvider { + /** + * Add a recipe to the still + * + * @param cyclesPerUnit + * Amount of work cycles required to run through the conversion once. + * @param input + * ItemStack representing the input liquid. + * @param output + * ItemStack representing the output liquid + */ + public void addRecipe(int cyclesPerUnit, FluidStack input, FluidStack output); +} diff --git a/src/api/java/forestry/api/recipes/IVariableFermentable.java b/src/api/java/forestry/api/recipes/IVariableFermentable.java new file mode 100644 index 00000000..f0997f53 --- /dev/null +++ b/src/api/java/forestry/api/recipes/IVariableFermentable.java @@ -0,0 +1,21 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.recipes; + +import net.minecraft.item.ItemStack; + +/** + * Fermenter checks any valid fermentation item for an implementation of this interface. + * This does not supersede adding a proper recipe to the fermenter! + */ +public interface IVariableFermentable { + + /** + * @param itemstack + * @return Float representing the modification to be applied to the matching recipe's biomass output. + */ + float getFermentationModifier(ItemStack itemstack); +} diff --git a/src/api/java/forestry/api/recipes/RecipeManagers.java b/src/api/java/forestry/api/recipes/RecipeManagers.java new file mode 100644 index 00000000..403bd5b5 --- /dev/null +++ b/src/api/java/forestry/api/recipes/RecipeManagers.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.recipes; + +import java.util.Collection; + +/** + * Contains all available recipe managers for Forestry machines and items. + * + * @author SirSengir + */ +public class RecipeManagers { + + public static Collection<ICraftingProvider> craftingProviders; + + /** + * Allows you to add recipes to the carpenter. See {@link ICarpenterManager} for details. + */ + public static ICarpenterManager carpenterManager; + /** + * Allows you to add recipes to the centrifuge. See {@link ICentrifugeManager} for details. + */ + public static ICentrifugeManager centrifugeManager; + /** + * Allows you to add recipes to the fermenter. See {@link IFermenterManager} for details. + */ + public static IFermenterManager fermenterManager; + /** + * Allows you to add recipes to the moistener. See {@link IMoistenerManager} for details. + */ + public static IMoistenerManager moistenerManager; + /** + * Allows you to add recipes to the squeezer. See {@link ISqueezerManager} for details. + */ + public static ISqueezerManager squeezerManager; + /** + * Allows you to add recipes to the still. See {@link IStillManager} for details. + */ + public static IStillManager stillManager; + + public static IFabricatorManager fabricatorManager; +} diff --git a/src/api/java/forestry/api/recipes/package-info.java b/src/api/java/forestry/api/recipes/package-info.java new file mode 100644 index 00000000..c76d83b9 --- /dev/null +++ b/src/api/java/forestry/api/recipes/package-info.java @@ -0,0 +1,8 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +@API(apiVersion="3.0.0", owner="ForestryAPI|core", provides="ForestryAPI|recipes") +package forestry.api.recipes; +import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/storage/BackpackEvent.java b/src/api/java/forestry/api/storage/BackpackEvent.java new file mode 100644 index 00000000..37427788 --- /dev/null +++ b/src/api/java/forestry/api/storage/BackpackEvent.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.storage; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; + +import cpw.mods.fml.common.eventhandler.Event; + + +public abstract class BackpackEvent extends Event { + + public final EntityPlayer player; + public final IBackpackDefinition backpackDefinition; + public final IInventory backpackInventory; + + public BackpackEvent(EntityPlayer player, IBackpackDefinition backpackDefinition, IInventory backpackInventory) { + this.player = player; + this.backpackDefinition = backpackDefinition; + this.backpackInventory = backpackInventory; + } +} diff --git a/src/api/java/forestry/api/storage/BackpackManager.java b/src/api/java/forestry/api/storage/BackpackManager.java new file mode 100644 index 00000000..8805904d --- /dev/null +++ b/src/api/java/forestry/api/storage/BackpackManager.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.storage; + +import java.util.ArrayList; +import java.util.HashMap; + +import net.minecraft.item.ItemStack; + +public class BackpackManager { + /** + * 0 - Miner's Backpack 1 - Digger's Backpack 2 - Forester's Backpack 3 - Hunter's Backpack 4 - Adventurer's Backpack + * + * Use IMC messages to achieve the same effect! + */ + public static ArrayList<ItemStack>[] backpackItems; + + public static IBackpackInterface backpackInterface; + + /** + * Only use this if you know what you are doing. Prefer backpackInterface. + */ + public static HashMap<String, IBackpackDefinition> definitions = new HashMap<String, IBackpackDefinition>(); +} diff --git a/src/api/java/forestry/api/storage/BackpackResupplyEvent.java b/src/api/java/forestry/api/storage/BackpackResupplyEvent.java new file mode 100644 index 00000000..e6e5e119 --- /dev/null +++ b/src/api/java/forestry/api/storage/BackpackResupplyEvent.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.storage; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; + +import cpw.mods.fml.common.eventhandler.Cancelable; + +/** + * Use @SubscribeEvent on a method taking this event as an argument. Will fire whenever a backpack tries to resupply to a player inventory. Processing will stop + * if the event is canceled. + */ +@Cancelable +public class BackpackResupplyEvent extends BackpackEvent { + + public BackpackResupplyEvent(EntityPlayer player, IBackpackDefinition backpackDefinition, IInventory backpackInventory) { + super(player, backpackDefinition, backpackInventory); + } + +} diff --git a/src/api/java/forestry/api/storage/BackpackStowEvent.java b/src/api/java/forestry/api/storage/BackpackStowEvent.java new file mode 100644 index 00000000..3afbf7a1 --- /dev/null +++ b/src/api/java/forestry/api/storage/BackpackStowEvent.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.storage; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; + +import cpw.mods.fml.common.eventhandler.Cancelable; + +/** + * Use @SubscribeEvent on a method taking this event as an argument. Will fire whenever a backpack tries to store an item. Processing will stop if the stacksize + * of stackToStow drops to 0 or less or the event is canceled. + */ +@Cancelable +public class BackpackStowEvent extends BackpackEvent { + + public final ItemStack stackToStow; + + public BackpackStowEvent(EntityPlayer player, IBackpackDefinition backpackDefinition, IInventory backpackInventory, ItemStack stackToStow) { + super(player, backpackDefinition, backpackInventory); + this.stackToStow = stackToStow; + } +} diff --git a/src/api/java/forestry/api/storage/EnumBackpackType.java b/src/api/java/forestry/api/storage/EnumBackpackType.java new file mode 100644 index 00000000..48ad7ee0 --- /dev/null +++ b/src/api/java/forestry/api/storage/EnumBackpackType.java @@ -0,0 +1,10 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.storage; + +public enum EnumBackpackType { + APIARIST, T1, T2 +} diff --git a/src/api/java/forestry/api/storage/IBackpackDefinition.java b/src/api/java/forestry/api/storage/IBackpackDefinition.java new file mode 100644 index 00000000..31c66631 --- /dev/null +++ b/src/api/java/forestry/api/storage/IBackpackDefinition.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.storage; + +import java.util.List; + +import net.minecraft.item.ItemStack; + +public interface IBackpackDefinition { + + /** + * @return A unique string identifier + */ + String getKey(); + + /** + * @return Human-readable name of the backpack. + */ + String getName(ItemStack backpack); + + /** + * @return Primary colour for the backpack icon. + */ + int getPrimaryColour(); + + /** + * @return Secondary colour for backpack icon. + */ + int getSecondaryColour(); + + /** + * Adds an item as valid for this backpack. + * + * @param validItem + */ + void addValidItem(ItemStack validItem); + void addValidItems(List<ItemStack> validItems); + + /** + * Returns true if the itemstack is a valid item for this backpack type. + */ + boolean isValidItem(ItemStack itemstack); + +} diff --git a/src/api/java/forestry/api/storage/IBackpackInterface.java b/src/api/java/forestry/api/storage/IBackpackInterface.java new file mode 100644 index 00000000..27a2eba5 --- /dev/null +++ b/src/api/java/forestry/api/storage/IBackpackInterface.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.storage; + +import net.minecraft.item.Item; + +public interface IBackpackInterface { + + /** + * Adds a backpack with the given definition and type, returning the item. + * + * @param definition + * Definition of backpack behaviour. + * @param type + * Type of backpack. (T1 or T2 (= Woven) + * @return Created backpack item. + */ + Item addBackpack(IBackpackDefinition definition, EnumBackpackType type); +} diff --git a/src/api/java/forestry/api/storage/ICrateRegistry.java b/src/api/java/forestry/api/storage/ICrateRegistry.java new file mode 100644 index 00000000..868511e3 --- /dev/null +++ b/src/api/java/forestry/api/storage/ICrateRegistry.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.storage; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public interface ICrateRegistry { + + /** + * Makes a new crate, registers it with the game registry with uid, + * and creates crating and uncrating recipes for the Carpenter. + * The icon is rendered automatically from the contained item. + * + * Can only be called during the Init stage. + */ + void registerCrate(Item item, String uid); + void registerCrate(Block block, String uid); + void registerCrate(ItemStack stack, String uid); + + /** + * Same as the above, but uses the ore dictionary for the Carpenter crating recipe. + */ + void registerCrateUsingOreDict(Item item, String uid); + void registerCrateUsingOreDict(Block block, String uid); + void registerCrateUsingOreDict(ItemStack stack, String uid); + +} diff --git a/src/api/java/forestry/api/storage/StorageManager.java b/src/api/java/forestry/api/storage/StorageManager.java new file mode 100644 index 00000000..ef4ec4cf --- /dev/null +++ b/src/api/java/forestry/api/storage/StorageManager.java @@ -0,0 +1,12 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.storage; + +public class StorageManager { + + public static ICrateRegistry crateRegistry; + +} diff --git a/src/api/java/forestry/api/storage/package-info.java b/src/api/java/forestry/api/storage/package-info.java new file mode 100644 index 00000000..3d0c1e9d --- /dev/null +++ b/src/api/java/forestry/api/storage/package-info.java @@ -0,0 +1,8 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +@API(apiVersion="3.0.0", owner="ForestryAPI|core", provides="ForestryAPI|storage") +package forestry.api.storage; +import cpw.mods.fml.common.API; diff --git a/src/api/java/forestry/api/world/ITreeGenData.java b/src/api/java/forestry/api/world/ITreeGenData.java new file mode 100644 index 00000000..bf59c5e5 --- /dev/null +++ b/src/api/java/forestry/api/world/ITreeGenData.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.world; + +import net.minecraft.world.World; + +import com.mojang.authlib.GameProfile; + +import forestry.api.arboriculture.ITreeGenome; + +public interface ITreeGenData { + + int getGirth(World world, int x, int y, int z); + + float getHeightModifier(); + + boolean canGrow(World world, int x, int y, int z, int expectedGirth, int expectedHeight); + + void setLeaves(World world, GameProfile owner, int x, int y, int z); + void setLeavesDecorative(World world, GameProfile owner, int x, int y, int z); + + boolean allowsFruitBlocks(); + + boolean trySpawnFruitBlock(World world, int x, int y, int z); + + ITreeGenome getGenome(); +} diff --git a/src/api/java/forestry/api/world/IWorldGenInterface.java b/src/api/java/forestry/api/world/IWorldGenInterface.java new file mode 100644 index 00000000..b7b5555f --- /dev/null +++ b/src/api/java/forestry/api/world/IWorldGenInterface.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.world; + +import net.minecraft.world.gen.feature.WorldGenerator; + +public interface IWorldGenInterface { + + /** + * Retrieves generators for trees identified by a given string. + * + * Returned generator classes take an {@link ITreeGenData} in the constructor. + * + * @param ident + * Unique identifier for tree type. Forestry's convention is 'treeSpecies', i.e. 'treeBaobab', 'treeSequoia'. + * @return All generators matching the given ident. + */ + Class<? extends WorldGenerator>[] getTreeGenerators(String ident); +} diff --git a/src/api/java/forestry/api/world/WorldGenManager.java b/src/api/java/forestry/api/world/WorldGenManager.java new file mode 100644 index 00000000..a2a5b4f8 --- /dev/null +++ b/src/api/java/forestry/api/world/WorldGenManager.java @@ -0,0 +1,10 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +package forestry.api.world; + +public class WorldGenManager { + public static IWorldGenInterface worldgenInterface; +} diff --git a/src/api/java/forestry/api/world/package-info.java b/src/api/java/forestry/api/world/package-info.java new file mode 100644 index 00000000..c7e60f4e --- /dev/null +++ b/src/api/java/forestry/api/world/package-info.java @@ -0,0 +1,8 @@ +/******************************************************************************* + * Copyright 2011-2014 SirSengir + * + * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. + ******************************************************************************/ +@API(apiVersion="1.1.0", owner="ForestryAPI|core", provides="ForestryAPI|world") +package forestry.api.world; +import cpw.mods.fml.common.API; diff --git a/src/api/java/pneumaticCraft/api/IHeatExchangerLogic.java b/src/api/java/pneumaticCraft/api/IHeatExchangerLogic.java new file mode 100644 index 00000000..78f8dbec --- /dev/null +++ b/src/api/java/pneumaticCraft/api/IHeatExchangerLogic.java @@ -0,0 +1,77 @@ +package pneumaticCraft.api; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +/** + * DO NOT IMPLEMENT THIS CLASS YOURSELF! Use PneumaticRegistry.getInstance().getHeatExchangerLogic() ! + * @author MineMaarten + * www.minemaarten.com + */ +public interface IHeatExchangerLogic{ + + /** + * Call this to tick this logic, and make the heat disperse itself. + */ + public void update(); + + /** + * When called (preferably on tile entity load and neighbor block/tile entity change) this will add all IHeatExchanger neighbor TileEntities as connected heat exchangers. + * It will also take care of blocks like Lava. + * + * You don't _have_ to call this method, if this heat exchanger is not connected to the outside world (for example the heat of the liquid + * plastic in the Plastic Mixer). + * @param world + * @param x + * @param y + * @param z + * @param validSides Can be left out as vararg, meaning every side can be connected. When one or more sides are specified this will constrain + * this heat exchanger to only connect to other heat exchangers on these sides. + */ + public void initializeAsHull(World world, int x, int y, int z, ForgeDirection... validSides); + + /** + * When called, this will connect these two heat exchangers. You should only call this on one of the two heat exchangers. + * @param exchanger + */ + public void addConnectedExchanger(IHeatExchangerLogic exchanger); + + public void removeConnectedExchanger(IHeatExchangerLogic exchanger); + + /** + * A heat exchanger starts with 295 degrees Kelvin (20 degrees Celcius) by default. + * @param temperature in degrees Kelvin + */ + public void setTemperature(double temperature); + + public double getTemperature(); + + /** + * The higher the thermal resistance, the slower the heat disperses. + * @param thermalResistance By default it's 1. + */ + public void setThermalResistance(double thermalResistance); + + public double getThermalResistance(); + + /** + * The higher the capacity, the more heat can be 'stored'. This means that an object with a high capacity can heat up an object with a lower + * capacity without losing any significant amount of temperature. + * @param capacity + */ + public void setThermalCapacity(double capacity); + + public double getThermalCapacity(); + + public void writeToNBT(NBTTagCompound tag); + + public void readFromNBT(NBTTagCompound tag); + + /** + * Adds heat (= deltaT * Thermal Capacity) to this exchanger. negative values will remove heat. + * @param amount + */ + public void addHeat(double amount); + +} diff --git a/src/api/java/pneumaticCraft/api/PneumaticRegistry.java b/src/api/java/pneumaticCraft/api/PneumaticRegistry.java new file mode 100644 index 00000000..f3254829 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/PneumaticRegistry.java @@ -0,0 +1,158 @@ +package pneumaticCraft.api; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityCreature; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.fluids.Fluid; +import pneumaticCraft.api.client.pneumaticHelmet.IBlockTrackEntry; +import pneumaticCraft.api.client.pneumaticHelmet.IEntityTrackEntry; +import pneumaticCraft.api.client.pneumaticHelmet.IHackableBlock; +import pneumaticCraft.api.client.pneumaticHelmet.IHackableEntity; +import pneumaticCraft.api.drone.ICustomBlockInteract; +import pneumaticCraft.api.drone.IPathfindHandler; +import pneumaticCraft.api.item.IInventoryItem; + +/** + * This class can be used to register and access various things to and from the mod. + */ +public class PneumaticRegistry{ + /** + * This field, which is initialized in PneumaticCraft's preInit, will give you access to various registration and access options. + * @deprecated This field isn't going to be removed, but it'll be marked private. use getInstance(). + */ + @Deprecated + public static IPneumaticCraftInterface instance; + + public static IPneumaticCraftInterface getInstance(){ + return instance; + } + + public static void init(IPneumaticCraftInterface inter){ + if(instance == null) instance = inter;//only allow initialization once; by PneumaticCraft + } + + public static interface IPneumaticCraftInterface{ + + /* + * ------------- Pneumatic Helmet -------------- + */ + + public void registerEntityTrackEntry(Class<? extends IEntityTrackEntry> entry); + + public void registerBlockTrackEntry(IBlockTrackEntry entry); + + public void addHackable(Class<? extends Entity> entityClazz, Class<? extends IHackableEntity> iHackable); + + public void addHackable(Block block, Class<? extends IHackableBlock> iHackable); + + /** + * Returns a list of all current successful hacks of a given entity. This is used for example in Enderman hacking, so the user + * can only hack an enderman once (more times wouldn't have any effect). This is mostly used for display purposes. + * @param entity + * @return empty list if no hacks. + */ + public List<IHackableEntity> getCurrentEntityHacks(Entity entity); + + /* + * ------------- Drones -------------- + */ + + /** + * Normally drones will pathfind through any block that doesn't have any collisions (Block#getBlocksMovement returns true). + * With this method you can register custom blocks to allow the drone to pathfind through them. If the block requires any special + * handling, like allow pathfinding on certain conditions, you can pass a IPathFindHandler with the registry. + * @param block + * @param handler can be null, to always allow pathfinding through this block. + */ + public void addPathfindableBlock(Block block, IPathfindHandler handler); + + /** + * This will add a puzzle piece that has only a Area white- and blacklist parameter (similar to a GoTo piece). + * It will do the specified behaviour. This can be used to create energy import/export widgets. + * @param interactor + */ + public void registerCustomBlockInteractor(ICustomBlockInteract interactor); + + /** + * Will spawn in a Drone a distance away from the given coordinate. The drone is programmed to travel to go to 5 blocks above the specified + * y level, and drop the deliveredStacks. When there isn't a clear path for the items to fall these 5 blocks the Drone will deliver at a + * y level above the specified y that _is_ clear. If no clear blocks can be found (when there are only solid blocks), the Drone will + * drop the items very high up in the air instead, and drop them there. + * + * When the Drone is tried to be catched by a player (by wrenching it), the drone will only the drop the items that it was delivering (or + * none if it dropped those items already). The Drone itself never will be dropped. + * + * @param x + * @param y + * @param z + * @param deliveredStacks stacks that are delivered by the drone. When no stacks, or more than 65 stacks are given, this will generate a IllegalArgumentException. + * @return the drone. You can use this to set a custom name for example (defaults to "Amazon Delivery Drone"). + */ + public EntityCreature deliverItemsAmazonStyle(World world, int x, int y, int z, ItemStack... deliveredStacks); + + /* + * --------------- Items ------------------- + */ + /** + * See {@link pneumaticCraft.api.item.IInventoryItem} + * @param handler + */ + public void registerInventoryItem(IInventoryItem handler); + + /* + * ----------------- Heat System -------------- + */ + public IHeatExchangerLogic getHeatExchangerLogic(); + + public void registerBlockExchanger(Block block, double temperature, double thermalResistance); + + /* + * ---------------- Power Generation ----------- + */ + + /** + * Adds a burnable liquid to the Liquid Compressor's available burnable fuels. + * @param fluid + * @param mLPerBucket the amount of mL generated for 1000mB of the fuel. As comparison, one piece of coal generates 16000mL in an Air Compressor. + */ + public void registerFuel(Fluid fluid, int mLPerBucket); + + /* + * --------------- Misc ------------------- + */ + + /** + * Returns the amount of Security Stations that disallow interaction with the given coordinate for the given player. + * Usually you'd disallow interaction when this returns > 0. + * @param world + * @param x + * @param y + * @param z + * @param player + * @param showRangeLines When true, any Security Station that prevents interaction will show the line grid (server --> client update is handled internally). + * @return The amount of Security Stations that disallow interaction for the given player. + * This method throws an IllegalArgumentException when tried to be called from the client side! + */ + public int getProtectingSecurityStations(World world, int x, int y, int z, EntityPlayer player, boolean showRangeLines); + + /** + * Use this to register ISimpleBlockRenderHandler render id's of full blocks, those of which should be able to be used for the Pneumatic Door Base camouflage. + * @param id + */ + public void registerConcealableRenderId(int id); + + /** + * Used to register a liquid that represents liquid XP (like MFR mob essence, OpenBlocks liquid XP). + * This is used in the Aerial Interface to pump XP in/out of the player. + * @param fluid + * @param liquidToPointRatio The amount of liquid (in mB) used to get one XP point. In OpenBlocks this is 20 (mB/point). + */ + public void registerXPLiquid(Fluid fluid, int liquidToPointRatio); + + } +} diff --git a/src/api/java/pneumaticCraft/api/actuator/IActuator.java b/src/api/java/pneumaticCraft/api/actuator/IActuator.java new file mode 100644 index 00000000..93ea61a2 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/actuator/IActuator.java @@ -0,0 +1,32 @@ +package pneumaticCraft.api.actuator; + +import java.util.List; + +import net.minecraft.tileentity.TileEntity; + +public interface IActuator{ + /** + * Same as {@link pneumaticCraft.api.universalSensor.ISensorSetting#getSensorPath()} + * @return + */ + public String getSensorPath(); + + /** + * When returned true, the GUI will enable the textbox writing, otherwise not. + * @return + */ + public boolean needsTextBox(); + + /** + * Should return the description of this sensor displayed in the GUI stat. Information should at least include + * when this sensor emits redstone and how (analog (1 through 15), or digital). + * @return + */ + public List<String> getDescription(); + + /** + * + * @param universalActuator + */ + public void actuate(TileEntity universalActuator); +} diff --git a/src/api/java/pneumaticCraft/api/block/BlockSupplier.java b/src/api/java/pneumaticCraft/api/block/BlockSupplier.java new file mode 100644 index 00000000..0e35540d --- /dev/null +++ b/src/api/java/pneumaticCraft/api/block/BlockSupplier.java @@ -0,0 +1,77 @@ +package pneumaticCraft.api.block; + +import net.minecraft.block.Block; +import cpw.mods.fml.common.registry.GameRegistry; + +public class BlockSupplier{ + // private static Class blockClass; + + /** + * @param blockName + * @return + */ + public static Block getBlock(String blockName){ + return GameRegistry.findBlock("PneumaticCraft", blockName); + /*try { + if(blockClass == null) blockClass = Class.forName("pneumaticCraft.common.block.Blockss"); + return (Block)blockClass.getField(blockName).get(null); + } catch(Exception e) { + System.err.println("[PneumaticCraft API] Block supply failed for block: " + blockName); + return null; + }*/ + } + + /* + The following is a list of all the block names that can be passed as argument in getBlock(String) to get a PneumaticCraft block. + + + pressureTube meta = tube type + airCompressor + airCannon + pressureChamberWall meta < 6 ? wall : window + pressureChamberValve + pressureChamberInterface + squidPlant + fireFlower + creeperPlant + slimePlant + rainPlant + enderPlant + lightningPlant + adrenalinePlant + burstPlant + potionPlant + repulsionPlant + heliumPlant + flyingFlower + musicPlant + propulsionPlant + chopperPlant + chargingStation + elevatorBase + elevatorFrame + vacuumPump + pneumaticDoorBase + pneumaticDoor + assemblyPlatform + assemblyIOUnit + assemblyDrill + assemblyLaser + assemblyController + advancedPressureTube meta = tube type (like 'pressureTube') + compressedIron + uvLightBox + etchingAcid + securityStation + universalSensor + pneumaticGenerator + electricCompressor + pneumaticEngine + kineticCompressor + aerialInterface + electrostaticCompressor + aphorismTile + omnidirectionalHopper + + */ +} diff --git a/src/api/java/pneumaticCraft/api/block/IPneumaticWrenchable.java b/src/api/java/pneumaticCraft/api/block/IPneumaticWrenchable.java new file mode 100644 index 00000000..5b666d49 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/block/IPneumaticWrenchable.java @@ -0,0 +1,14 @@ +package pneumaticCraft.api.block; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +/** + * Should be implemented by any block that allows to be rotated by a Pneumatic Wrench. It uses almost the same + * rotate method as the Vanilla (Forge) method. However it uses energy to rotate (when rotateBlock() return true). + */ +public interface IPneumaticWrenchable{ + + public boolean rotateBlock(World world, EntityPlayer player, int x, int y, int z, ForgeDirection side); +} diff --git a/src/api/java/pneumaticCraft/api/client/GuiAnimatedStatSupplier.java b/src/api/java/pneumaticCraft/api/client/GuiAnimatedStatSupplier.java new file mode 100644 index 00000000..4f88f0f2 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/client/GuiAnimatedStatSupplier.java @@ -0,0 +1,49 @@ +package pneumaticCraft.api.client; + +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.item.ItemStack; + +/** + * With this class you can retrieve new instances of the PneumaticCraft's IGuiAnimatedStat implementation. You can use these in Gui's as + * well as anywhere you like. When you use these in Gui's you need to pass a valid GuiScreen instance, if you don't you can just pass + * null. + */ +public class GuiAnimatedStatSupplier{ + private static Class animatedStatClass; + + public static IGuiAnimatedStat getAnimatedStat(GuiScreen gui, int backgroundColor){ + return getAnimatedStat(new Class[]{GuiScreen.class, int.class}, gui, backgroundColor); + } + + /** + * Returns a GuiAnimatedStat which uses an itemstack as static icon. + * @param gui + * @param iconStack + * @param backgroundColor + * @return + */ + public static IGuiAnimatedStat getAnimatedStat(GuiScreen gui, ItemStack iconStack, int backgroundColor){ + return getAnimatedStat(new Class[]{GuiScreen.class, int.class, ItemStack.class}, gui, backgroundColor, iconStack); + } + + /** + * Returns a GuiAnimatedStat which uses a texture location as static icon. + * @param gui + * @param iconTexture / text + * @param backgroundColor + * @return + */ + public static IGuiAnimatedStat getAnimatedStat(GuiScreen gui, String iconTexture, int backgroundColor){ + return getAnimatedStat(new Class[]{GuiScreen.class, int.class, String.class}, gui, backgroundColor, iconTexture); + } + + private static IGuiAnimatedStat getAnimatedStat(Class[] constructorClasses, Object... constructorParameters){ + try { + if(animatedStatClass == null) animatedStatClass = Class.forName("pneumaticCraft.client.gui.widget.GuiAnimatedStat"); + return (IGuiAnimatedStat)animatedStatClass.getConstructor(constructorClasses).newInstance(constructorParameters); + } catch(Exception e) { + System.err.println("Failed to retrieve an GuiAnimatedStat instance from PneumaticCraft."); + } + return null; + } +} diff --git a/src/api/java/pneumaticCraft/api/client/GuiElementRenderer.java b/src/api/java/pneumaticCraft/api/client/GuiElementRenderer.java new file mode 100644 index 00000000..ff590de2 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/client/GuiElementRenderer.java @@ -0,0 +1,32 @@ +package pneumaticCraft.api.client; + +import java.lang.reflect.Method; + +import net.minecraft.client.gui.FontRenderer; + +public class GuiElementRenderer{ + private static Method drawGaugeMethod; + + /** + * Draws a Pressure Gauge, the same which is also used in many PneumaticCraft applications. + * @param fontRenderer fontrenderer used to draw the numbers of the pressure gauge. + * @param minPressure The minimal pressure that needs to be displayed (this is -1 in most applications). + * @param maxPressure The maximal pressure that needs to be rendererd (this is 7 for tier one machines, and 25 for tier two). + * @param dangerPressure The transition pressure from green to red (this is 5 for tier one, and 29 for tier two machines). + * @param minWorkingPressure The transition pressure from yellow to green (variates per machine). + * @param currentPressure The pressure that the needle should point to. + * @param xPos x position of the gauge. + * @param yPos y position of the gauge. + * @param zLevel z position of the gauge (Gui#zLevel, -90, for in normal GUI's). + */ + public static void drawPressureGauge(FontRenderer fontRenderer, float minPressure, float maxPressure, float dangerPressure, float minWorkingPressure, float currentPressure, int xPos, int yPos, float zLevel){ + try { + if(drawGaugeMethod == null) { + drawGaugeMethod = Class.forName("pneumaticCraft.client.gui.GuiUtils").getMethod("drawPressureGauge", FontRenderer.class, float.class, float.class, float.class, float.class, float.class, int.class, int.class, float.class); + } + drawGaugeMethod.invoke(null, fontRenderer, minPressure, maxPressure, dangerPressure, minWorkingPressure, currentPressure, xPos, yPos, zLevel); + } catch(Exception e) { + System.err.println("Failed to render a Pressure Gauge from PneumaticCraft."); + } + } +} diff --git a/src/api/java/pneumaticCraft/api/client/IGuiAnimatedStat.java b/src/api/java/pneumaticCraft/api/client/IGuiAnimatedStat.java new file mode 100644 index 00000000..15d55c71 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/client/IGuiAnimatedStat.java @@ -0,0 +1,179 @@ +package pneumaticCraft.api.client; + +import java.awt.Rectangle; +import java.util.List; + +/** + * This interface doesn't have to be implemented. In PneumaticCraft there already is one class which implements this interface + * which is used many times in PneumaticCraft (GUI stats, Pneumatic Helmet 2D and 3D stats). You can get an instance of this + * class as well. Information about this you can find in GuiAnimatedStatSupplier.java. Implementing your own version of + * animated stats can be implemented as well via this interface, and they will interact with the PneumaticCraft GuiAnimatedStats + * if you implement it correctly. + */ + +public interface IGuiAnimatedStat{ + + /** + * When you call this method with a set of coordinates representing the button location and dimensions, you'll get + * these parameters back scaled to the GuiAnimatedStat's scale. + * @param origX Button start X. + * @param origY Button start Y. + * @param width Button width. + * @param height Button height. + * @return rectangle containing the new location and dimensions. + */ + public Rectangle getButtonScaledRectangle(int origX, int origY, int width, int height); + + /** + * When passed 0.5F for example, the text of the stat will be half as big (so more text can fit into a certain area). + * @param scale + */ + public void scaleTextSize(float scale); + + /** + * Returns true if the statistic expands to the left. + * @return + */ + public boolean isLeftSided(); + + /** + * Returns true if the statistic is done with expanding (when text will be displayed). + * @return + */ + public boolean isDoneExpanding(); + + /** + * Pass true if the statistic should expand to the left, otherwise false. + * @param leftSided + */ + public void setLeftSided(boolean leftSided); + + /** + * Sets the main text of this stat. Every line should be stored in a seperate list element. Upon rendering, + * EnumChatFormattings will be respected. When you call this method, Too long lines will be divided into multiple shorter ones + * to fit in the GUI. + * @param text + * @return this, so you can chain calls. + */ + public IGuiAnimatedStat setText(List<String> text); + + /** + * Sets the line to a single line. Upon rendering, + * EnumChatFormattings will be respected. When you call this method, Too long lines will be divided into multiple shorter ones + * to fit in the GUI. + * @param text + * @return this, so you can chain calls. + */ + public IGuiAnimatedStat setText(String text); + + /** + * Sets the main text of this stat. Every line should be stored in a seperate list element. Upon rendering, + * EnumChatFormattings will be respected. This version of the text setting doesn't handle too long lines. + * @param text + */ + public void setTextWithoutCuttingString(List<String> text); + + /** + * Sets the title of this stat. It will automatically get the yellow color assigned. + * @param title + */ + public void setTitle(String title); + + /** + * Returns the title of this stat (obviously without color prefix). + * @return + */ + public String getTitle(); + + /** + * Defines what dimensions the stat should have when it is not expanded (default 17x17) and resets the stat to these dimensions. + * Used in PneumaticCraft by the block/entity tracker stats, they are 0x0 when not expanded so it looks like they expand + * (and appear) from nothing. + * @param minWidth + * @param minHeight + */ + public void setMinDimensionsAndReset(int minWidth, int minHeight); + + /** + * When this stat gets a parent stat assigned, the y of this stat will be the same as the parent's plus this stat's + * baseY. This will cause this stat to move up and down when the parent's stat expands/moves. + * @param stat + */ + public void setParentStat(IGuiAnimatedStat stat); + + /** + * Sets the x location of this stat. + * @param x + */ + public void setBaseX(int x); + + /** + * Sets the base Y of this stat. + * @param y + */ + public void setBaseY(int y); + + /** + * Returns the real Y of this stat. This is the same as getBaseY when there is no parent stat, but if there is this method + * returns the value described in setParentStat(IGuiAnimatedStat stat). + * @return + */ + public int getAffectedY(); + + public int getBaseX(); + + public int getBaseY(); + + /** + * Returns the Y size of this stat. + * @return + */ + public int getHeight(); + + /** + * Returns the X size of this stat. + * @return + */ + public int getWidth(); + + public Rectangle getBounds(); + + /** + * This method should be called every game tick to update the logic of the stat (expanding of the stat). + */ + public void update(); + + /** + * Should be called every render tick when and where you want to render the stat. + * @param mouseX + * @param mouseY + * @param partialTicks + */ + public void render(int mouseX, int mouseY, float partialTicks); + + /** + * This method will handle mouse clicks. This will handle open/closing of the stat when the mouse clicks it. + * @param x + * @param y + * @param button + * @return + */ + public void onMouseClicked(int x, int y, int button); + + /** + * Forces the stat to close. + */ + public void closeWindow(); + + /** + * Forces the stat to expand. + */ + public void openWindow(); + + /** + * Returns true if the stat is expanding. + * @return + */ + public boolean isClicked(); + +} diff --git a/src/api/java/pneumaticCraft/api/client/assemblymachine/AssemblyRenderOverriding.java b/src/api/java/pneumaticCraft/api/client/assemblymachine/AssemblyRenderOverriding.java new file mode 100644 index 00000000..1816dc5b --- /dev/null +++ b/src/api/java/pneumaticCraft/api/client/assemblymachine/AssemblyRenderOverriding.java @@ -0,0 +1,55 @@ +package pneumaticCraft.api.client.assemblymachine; + +import java.util.HashMap; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class AssemblyRenderOverriding{ + public static final HashMap<Integer, IAssemblyRenderOverriding> renderOverrides = new HashMap<Integer, IAssemblyRenderOverriding>(); + + public static void addRenderOverride(Block block, IAssemblyRenderOverriding renderOverride){ + renderOverrides.put(Block.getIdFromBlock(block), renderOverride); + } + + public static void addRenderOverride(Item item, IAssemblyRenderOverriding renderOverride){ + renderOverrides.put(Item.getIdFromItem(item), renderOverride); + } + + public static interface IAssemblyRenderOverriding{ + /** + * This method will be called just before the IO Unit's held stack is being rendered. You can insert GL11 calls here to + * rotate the model for example. push and pop matrices are not needed, this is done for you. + * You can also choose to do the whole rendering yourself, you'll need to return false then to indicate that + * PneumaticCraft shouldn't render the item. + * @param renderedStack itemStack that is being rendered + * @return true if PneumaticCraft should render the item (after your changes), or false to cancel rendering. + */ + public boolean applyRenderChangeIOUnit(ItemStack renderedStack); + + /** + * Same deal as with the applyRenderChangeIOUnit(), but now for the Assembly Platform. + * @param renderedStack itemStack that is being rendered + * @return true if PneumaticCraft should render the item (after your changes), or false to cancel rendering. + */ + public boolean applyRenderChangePlatform(ItemStack renderedStack); + + /** + * Should return the distance the claw travels before it is gripped to the stack. + * By default it's 0.0875F for items and 0.00625F for blocks, 0.09375 when the claw is completely closed. + * @param renderedStack + * @return + */ + public float getIOUnitClawShift(ItemStack renderedStack); + + /** + * Should return the distance the claw travels before it is gripped to the stack. + * By default it's 0.0875F for items and 0.00625F for blocks, 0.09375 when the claw is completely closed. + * @param renderedStack + * @return + */ + public float getPlatformClawShift(ItemStack renderedStack); + + } +} diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IBlockTrackEntry.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IBlockTrackEntry.java new file mode 100644 index 00000000..6d9e1fe0 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IBlockTrackEntry.java @@ -0,0 +1,80 @@ +package pneumaticCraft.api.client.pneumaticHelmet; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public interface IBlockTrackEntry{ + /** + * This method should return true if the coordinate checked is one that + * should be tracked. Most entries will just return true when the blockID is + * the one that they track. + * + * @param world + * The world that is examined. + * @param x + * The x coordinate of the block examined. + * @param y + * The y coordinate of the block examined. + * @param z + * The z coordinate of the block examined. + * @param block + * The block of the current coordinate. This will save you a + * call to World.getBlock(). + * @param te The TileEntity at this x,y,z. + * @return true if the coordinate should be tracked by this BlockTrackEntry. + */ + public boolean shouldTrackWithThisEntry(IBlockAccess world, int x, int y, int z, Block block, TileEntity te); + + /** + * This method defines if the block should be updated by the server (each 5 + * seconds). This is specifically aimed at Tile Entities, as the server will + * send an NBT packet. This method returns true at for instance Chests and + * Mob Spawners, to get the inventory at the client side and the time to the + * next spawn respectively. + * @param te The TileEntity at the currently checked location. + * + * @return true if the Tile Entity should be updated, or false when it + * doesn't have to. + */ + public boolean shouldBeUpdatedFromServer(TileEntity te); + + /** + * The return of this method defines at how many tracked blocks of this type + * the HUD should stop displaying text at the tracked blocks of this type. + * + * @return amount of blocks the HUD should stop displaying the block info. + */ + public int spamThreshold(); + + /** + * This method is called each render tick to retrieve the blocks additional + * information. The method behaves the same as the addInformation method in + * the Item class. This method only will be called if + * shouldTrackWithThisEntry() returned true and the player hovers over the + * coordinate. + * + * @param world + * The world the block is in. + * @param x + * The x coordinate the block is at. + * @param y + * The y coordinate the block is at. + * @param z + * The z coordinate the block is at. + * @param te The TileEntity at the x,y,z. + * @param infoList + * The list of lines to display. + */ + public void addInformation(World world, int x, int y, int z, TileEntity te, List<String> infoList); + + /** + * This method is called when displaying the currently tracked blocks. + * Will be tried to be mapped to the localization file first. + * @return the name of the group of this entry. + */ + public String getEntryName(); +} diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IEntityTrackEntry.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IEntityTrackEntry.java new file mode 100644 index 00000000..65c2b79e --- /dev/null +++ b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IEntityTrackEntry.java @@ -0,0 +1,49 @@ +package pneumaticCraft.api.client.pneumaticHelmet; + +import java.util.List; + +import net.minecraft.entity.Entity; + +/** + * Implement this class and register it by adding it to the entityTrackEntries class. + * There needs to be a parameterless constructor. For every entity that's applicable for this definition, an instance is created. + */ +public interface IEntityTrackEntry{ + /** + * Return true if you want to add a tooltip for the given entity. + * @param entity + * @return + */ + public boolean isApplicable(Entity entity); + + /** + * Add info to the tab. This is only called when isApplicable returned true. + * @param entity + * @param curInfo + */ + public void addInfo(Entity entity, List<String> curInfo); + + /** + * Update is called every (client) tick, and can be used to update something like a timer (used for the Creeper countdown). + * @param entity + */ + public void update(Entity entity); + + /** + * Called every render tick, this method can be used to render additional info. Used for Drone AI visualisation. + * @param entity + * @param partialTicks TODO + */ + public void render(Entity entity, float partialTicks); + + /** + * Just a basic implementation class that can be used if an update and render method isn't needed. + */ + public static abstract class EntityTrackEntry implements IEntityTrackEntry{ + @Override + public void update(Entity entity){} + + @Override + public void render(Entity entity, float partialTicks){} + } +} diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IGuiScreen.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IGuiScreen.java new file mode 100644 index 00000000..8f98938d --- /dev/null +++ b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IGuiScreen.java @@ -0,0 +1,15 @@ +package pneumaticCraft.api.client.pneumaticHelmet; + +import java.util.List; + +import net.minecraft.client.gui.FontRenderer; + +/** + * Just an interface to give access to GuiSreen#buttonList and GuiScreen#fontRenderer. An instance of this class can + * safely be casted to GuiSreen if needed. + */ +public interface IGuiScreen{ + public List getButtonList(); + + public FontRenderer getFontRenderer(); +} diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableBlock.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableBlock.java new file mode 100644 index 00000000..9dc7863d --- /dev/null +++ b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableBlock.java @@ -0,0 +1,69 @@ +package pneumaticCraft.api.client.pneumaticHelmet; + +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +/** +Use this interface to specify any hackable block. When it's your block, you can simply implement this interface in the +block's class. If you don't have access to the class (vanilla blocks), you can implement this interface in a separate class +and register it using PneumaticRegistry.registry.addHackable(blockClass, IHackableBlockClass). With the former way there will be one instance only per type. In the latter, there will +be an IHackableBlock instance for every block. +*/ +public interface IHackableBlock{ + /** + * Should return a unique id to represent this hackable. Used in NBT saving to be able to trigger the afterHackTime after a server restart. + * Null is a valid return: afterHackTick will not be triggered at all in that case. + * + * CURRENTLY THIS ISN'T IMPLEMENTED. + * @return + */ + public String getId(); + + /** + Returning true will allow the player to hack this block. This can be used to only allow hacking on certain conditions. + */ + public boolean canHack(IBlockAccess world, int x, int y, int z, EntityPlayer player); + + /** + Add info that is displayed on the tracker tooltip here. Text like "Hack to explode" can be added. + This method is only called when canHack(World, int, int, int) returned true. + The added lines automatically will be tried to get localized. + */ + public void addInfo(World world, int x, int y, int z, List<String> curInfo, EntityPlayer player); + + /** + * Add info that is being displayed after hacking, as long as 'afterHackTick' is returning true. + * Things like "Neutralized". + * The added lines automatically will be tried to get localized. + * @param entity + * @param curInfo + * @param player + */ + public void addPostHackInfo(World world, int x, int y, int z, List<String> curInfo, EntityPlayer player); + + /** + Return the time it takes to hack this block in ticks. For more powerful hacks, a longer required hacking time is adviced. + */ + public int getHackTime(IBlockAccess world, int x, int y, int z, EntityPlayer player); + + /** + When the player hacked the block for getHackTime(World, int, int, int) ticks this will be called on both server and client side. + */ + public void onHackFinished(World world, int x, int y, int z, EntityPlayer player); + + /** + * Called every tick after the hacking finished (on both server and client side). Returning true will keep this going (for mob spawners, to keep them neutralized), + * or false to stop ticking (for door/lever hacking). + * + * CURRENTLY THIS METHOD WILL STOP GETTING INVOKED AFTER A SERVER RESTART! + * @param world + * @param x + * @param y + * @param z + * @return + */ + public boolean afterHackTick(World world, int x, int y, int z); +} diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableEntity.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableEntity.java new file mode 100644 index 00000000..e8aa236c --- /dev/null +++ b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IHackableEntity.java @@ -0,0 +1,59 @@ +package pneumaticCraft.api.client.pneumaticHelmet; + +import java.util.List; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; + +/** +Use this interface to specify any hackable entity. When it's your entity, you can simply implement this interface in the +entity's class. If you don't have access to the class (vanilla entities), you can implement this interface in a separate class +and register it using PneumaticRegistry.registry.addHackable(entityClass, IHackableEntityClass). In both ways there will be an IHackableEntity instance for every entity. +*/ +public interface IHackableEntity{ + + /** + * Should return a unique id to represent this hackable. Used in NBT saving to be able to trigger the afterHackTime after a server restart. + * Null is a valid return: afterHackTick will not be triggered at all in that case. + * @return + */ + public String getId(); + + /** + Returning true will allow the player to hack this entity. This can be used to only allow hacking on certain conditions. + */ + public boolean canHack(Entity entity, EntityPlayer player); + + /** + Add info that is displayed on the tracker tooltip here. Text like "Hack to explode" can be added. + This method is only called when canHack(Entity) returned true. + The added lines automatically will be tried to get localized. + */ + public void addInfo(Entity entity, List<String> curInfo, EntityPlayer player); + + /** + * Add info that is being displayed after hacking, as long as 'afterHackTick' is returning true. + * Things like "Neutralized". + * The added lines automatically will be tried to get localized. + * @param entity + * @param curInfo + * @param player + */ + public void addPostHackInfo(Entity entity, List<String> curInfo, EntityPlayer player); + + /** + Return the time it takes to hack this entity in ticks. For more powerful hacks, a longer required hacking time is adviced. + */ + public int getHackTime(Entity entity, EntityPlayer player); + + /** + When the player hacked the entity for getHackTime(Entity) ticks this will be called on both client and server side. + */ + public void onHackFinished(Entity entity, EntityPlayer player); + + /** + * Called every tick after the hacking finished. Returning true will keep this going (for mob spawners, to keep them neutralized), + * or false to stop ticking (for door/lever hacking). + */ + public boolean afterHackTick(Entity entity); +} diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IOptionPage.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IOptionPage.java new file mode 100644 index 00000000..2212749e --- /dev/null +++ b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IOptionPage.java @@ -0,0 +1,46 @@ +package pneumaticCraft.api.client.pneumaticHelmet; + +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; + +/** + * The Option Page is the page you see when you press 'F' (by default) with a Pneumatic Helmet equipped. You can register this class + * by returning a new instance of this class at {@link IUpgradeRenderHandler#getGuiOptionsPage()} + */ +public interface IOptionPage{ + + /** + * This string is used in the text of the button of this page. + * @return + */ + public String getPageName(); + + /** + * Here you can initialize your buttons and stuff like with a GuiScreen. For buttons, don't use button id 100 and up, as they + * will be used as selection buttons for other option pages in the main GuiScreen. + * @param gui + */ + public void initGui(IGuiScreen gui); + + /** + * Same as GuiScreen#actionPerformed(GuiButton). + * @param button + */ + public void actionPerformed(GuiButton button); + + /** + * Same as {@link GuiScreen#drawScreen(int, int, float)} + * Here you can render additional things like text. + * @param x + * @param y + * @param partialTicks + */ + public void drawScreen(int x, int y, float partialTicks); + + /** + * Same as GuiScreen#keyTyped(char, int). + * @param ch + * @param key + */ + public void keyTyped(char ch, int key); +} diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IUpgradeRenderHandler.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IUpgradeRenderHandler.java new file mode 100644 index 00000000..d273baf3 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/IUpgradeRenderHandler.java @@ -0,0 +1,92 @@ +package pneumaticCraft.api.client.pneumaticHelmet; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.config.Configuration; +import pneumaticCraft.api.client.IGuiAnimatedStat; + +/** + * To add upgrades for in the Pneumatic Helmet implement this interface. You can add members to this class, however these can only + * be client sided members as this class will be used as singleton. Therefore, only one of these instances exist at the server side + * so any member that is used server side will affect every player. + * + */ +public interface IUpgradeRenderHandler{ + + /** + * Return here the name of the upgrade. This is displayed in the formatting [upgradeName] + " " + "found"/"not found" on + * initialization of the helmet. + * @return + */ + public String getUpgradeName(); + + /** + * Being called from PneumaticCraft's config handler, you can use this method to read settings like stat positions + * @param config PneumaticCraft's config file. + */ + public void initConfig(Configuration config); + + /** + * When called this should save the settings to the config file. Called when changed a setting. When you want to use + * PneumaticCraft's config file, save a reference of it somewhere in this class when the config gets passed in the + * initConfig() method (this always will be called first). + */ + public void saveToConfig(); + + /** + * This method will be called every client tick, and should be used to update logic like the tracking and velocities of stuff. + * @param player + * @param rangeUpgrades amount of range upgrades installed in the helmet. + */ + public void update(EntityPlayer player, int rangeUpgrades); + + /** + * Called in the 3D render stage (renderWorldLastEvent) + * @param partialTicks + */ + public void render3D(float partialTicks); + + /** + * Called in the 2D render stage (Render Tick Handler) + * @param partialTicks + * @param helmetEnabled is true when isEnabled() returned true earlier. Can be used to close AnimatedStats for instance. + * However this is already handled if you return an AnimatedStat in getAnimatedStat(). + */ + public void render2D(float partialTicks, boolean helmetEnabled); + + /** + * You can return a GuiAnimatedStat here, that the HUDHandler will pick up and render. It also automatically opens and closes + * the stat when needed. The GuiMoveStat uses this method to retrieve the to be moved stat. + * @return null if no stat used. + */ + public IGuiAnimatedStat getAnimatedStat(); + + /** + * Should return true if this upgrade handler is enabled for the given stacks placed in the helmet. + * @param upgradeStacks + * @return + */ + public boolean isEnabled(ItemStack[] upgradeStacks); + + /** + * Returns the usage in mL/tick when this upgrade handler is enabled. + * @param rangeUpgrades amount of range upgrades installed in the helmet. + * @param player + * @return usage in mL/tick + */ + public float getEnergyUsage(int rangeUpgrades, EntityPlayer player); + + /** + * Called when (re-)equipped the helmet this method should be used to clear information like current tracked entities. + * So clearing lists and other references as this handler should re-acquire when reinstalled. + */ + public void reset(); + + /** + * When you have some options for your upgrade handler you could return a new instance of an IOptionsPage. + * When you do so, it will automatically get picked up by the options handler, and it will be added to the + * options GUI when this upgrade returns true when calling isEnabled(). Returning null is valid. + * @return + */ + public IOptionPage getGuiOptionsPage(); +} diff --git a/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/RenderHandlerRegistry.java b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/RenderHandlerRegistry.java new file mode 100644 index 00000000..acb1cdc5 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/client/pneumaticHelmet/RenderHandlerRegistry.java @@ -0,0 +1,10 @@ +package pneumaticCraft.api.client.pneumaticHelmet; + +import java.util.List; + +public class RenderHandlerRegistry{ + /** + * With this field you can register your render handlers. This field is initialized in the PreInit phase of PneumaticCraft's loading phase. + */ + public static List<IUpgradeRenderHandler> renderHandlers; +} diff --git a/src/api/java/pneumaticCraft/api/drone/DroneConstructingEvent.java b/src/api/java/pneumaticCraft/api/drone/DroneConstructingEvent.java new file mode 100644 index 00000000..801c55a4 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/drone/DroneConstructingEvent.java @@ -0,0 +1,11 @@ +package pneumaticCraft.api.drone; + +import cpw.mods.fml.common.eventhandler.Event; + +public class DroneConstructingEvent extends Event{ + public IDrone drone; + + public DroneConstructingEvent(IDrone drone){ + this.drone = drone; + } +} diff --git a/src/api/java/pneumaticCraft/api/drone/IBlockInteractHandler.java b/src/api/java/pneumaticCraft/api/drone/IBlockInteractHandler.java new file mode 100644 index 00000000..5e4eb245 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/drone/IBlockInteractHandler.java @@ -0,0 +1,26 @@ +package pneumaticCraft.api.drone; + +/** + * DON'T IMPLEMENT, just use + */ +public interface IBlockInteractHandler{ + + /** + * Returns a boolean[6] of all sides. when true, this side is accessible + * @return + */ + public boolean[] getSides(); + + public boolean useCount(); + + public void decreaseCount(int count); + + public int getRemainingCount(); + + /** + * When invoked, the drone will abort searching the area. Could be used to abort early when full of RF energy for example, when importing RF. + * (It's useless to search any further) + */ + public void abort(); + +} diff --git a/src/api/java/pneumaticCraft/api/drone/ICustomBlockInteract.java b/src/api/java/pneumaticCraft/api/drone/ICustomBlockInteract.java new file mode 100644 index 00000000..2960425e --- /dev/null +++ b/src/api/java/pneumaticCraft/api/drone/ICustomBlockInteract.java @@ -0,0 +1,45 @@ +package pneumaticCraft.api.drone; + +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.ChunkPosition; + +/** + * Implement this and register it to PneumaticRegistry.registerCustomBlockInteractor(). + * This will add a puzzle piece that has only a Area white- and blacklist parameter (similar to a GoTo piece). + * It will do the specified behaviour. This can be used to create energy import/export widgets. + */ +public interface ICustomBlockInteract{ + + /** + * Should return a unique Id, used in NBT saving and localization. + */ + public String getName(); + + /** + * Should return the puzzle piece texture. Should be a multiple of 80x64 (width x height). I'd recommend starting out with copying the Go To widget texture. + * @return + */ + public ResourceLocation getTexture(); + + /** + * The actual interaction. + * + * For every position in the selected area the drone will visit every block (ordered from closest to furthest). It will call this method with 'simulate = true'. If this method returns true, the drone will navigate to this location, and call this method again with 'simulate = false' It will keep doing this until this method returns false. + * + * When interactHandler.useCount() returns true: + * In the interface of the puzzle piece users can specify a 'use count' and fill in the maximum count they want to use. When not simulating, you should only import/export up to interactHandler.getRemainingCount(), and you should notify the removed/added count by doing interactHandler.decreaseCount(int count). + * + * @param pos current visited location + * @param drone + * @param interactHandler object you can use to use to get accessible sides and give feedback about counts. + * @param simulate will be true when trying to figure out whether or not the drone should navigate to this block, false when next to this block. + * @return + */ + public boolean doInteract(ChunkPosition pos, IDrone drone, IBlockInteractHandler interactHandler, boolean simulate); + + /** + * Used for crafting, categorizes the puzzle piece. + * @return + */ + public int getCraftingColorIndex(); +} diff --git a/src/api/java/pneumaticCraft/api/drone/IDrone.java b/src/api/java/pneumaticCraft/api/drone/IDrone.java new file mode 100644 index 00000000..306bc6c0 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/drone/IDrone.java @@ -0,0 +1,61 @@ +package pneumaticCraft.api.drone; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.ai.EntityAITasks; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; +import net.minecraftforge.common.IExtendedEntityProperties; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.IFluidTank; +import pneumaticCraft.api.item.IPressurizable; + +public interface IDrone extends IPressurizable{ + /** + * + * @param upgradeIndex metadata value of the upgrade item + * @return amount of inserted upgrades in the drone + */ + public int getUpgrades(int upgradeIndex); + + public World getWorld(); + + public IFluidTank getTank(); + + public IInventory getInventory(); + + public Vec3 getPosition(); + + public IPathNavigator getPathNavigator(); + + public void sendWireframeToClient(int x, int y, int z); + + public EntityPlayerMP getFakePlayer(); + + public boolean isBlockValidPathfindBlock(int x, int y, int z); + + public void dropItem(ItemStack stack); + + public void setDugBlock(int x, int y, int z); + + public EntityAITasks getTargetAI(); + + public IExtendedEntityProperties getProperty(String key); + + public void setProperty(String key, IExtendedEntityProperties property); + + public void setEmittingRedstone(ForgeDirection orientation, int emittingRedstone); + + public void setName(String string); + + public void setCarryingEntity(Entity entity); + + public Entity getCarryingEntity(); + + public boolean isAIOverriden(); + + public void onItemPickupEvent(EntityItem curPickingUpEntity, int stackSize); +} diff --git a/src/api/java/pneumaticCraft/api/drone/IPathNavigator.java b/src/api/java/pneumaticCraft/api/drone/IPathNavigator.java new file mode 100644 index 00000000..f089bae5 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/drone/IPathNavigator.java @@ -0,0 +1,11 @@ +package pneumaticCraft.api.drone; + +import net.minecraft.entity.Entity; + +public interface IPathNavigator{ + public boolean moveToXYZ(double x, double y, double z); + + public boolean moveToEntity(Entity entity); + + public boolean hasNoPath(); +} diff --git a/src/api/java/pneumaticCraft/api/drone/IPathfindHandler.java b/src/api/java/pneumaticCraft/api/drone/IPathfindHandler.java new file mode 100644 index 00000000..a5bcfabb --- /dev/null +++ b/src/api/java/pneumaticCraft/api/drone/IPathfindHandler.java @@ -0,0 +1,26 @@ +package pneumaticCraft.api.drone; + +import net.minecraft.world.World; + +public interface IPathfindHandler{ + /** + * When returned true, the drone can pathfind through this block. When false it can't. + * @param world + * @param x + * @param y + * @param z + * @return + */ + public boolean canPathfindThrough(World world, int x, int y, int z); + + /** + * CURRENTLY NOT IMPLEMENTED! + * Will be called every tick as long as the drone is < 1 block away from the given coordinate. + * can be used to open a door for a drone for example. + * @param world + * @param x + * @param y + * @param z + */ + public void onPathingThrough(World world, int x, int y, int z); +} diff --git a/src/api/java/pneumaticCraft/api/drone/SpecialVariableRetrievalEvent.java b/src/api/java/pneumaticCraft/api/drone/SpecialVariableRetrievalEvent.java new file mode 100644 index 00000000..83581c81 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/drone/SpecialVariableRetrievalEvent.java @@ -0,0 +1,60 @@ +package pneumaticCraft.api.drone; + +import net.minecraft.item.ItemStack; +import net.minecraft.world.ChunkPosition; +import cpw.mods.fml.common.eventhandler.Event; + +/** + * Fired when a Drone is trying to get a special coordinate, by accessing a variable with '$' prefix. + * These event are posted on the MinecraftForge.EVENT_BUS. + */ +public abstract class SpecialVariableRetrievalEvent extends Event{ + + /** + * The special variable name, with the '$' stripped away. + */ + public final String specialVarName; + + /** + * The returning coordinate + */ + + public SpecialVariableRetrievalEvent(String specialVarName){ + + this.specialVarName = specialVarName; + } + + public static abstract class CoordinateVariable extends SpecialVariableRetrievalEvent{ + public ChunkPosition coordinate; + + public CoordinateVariable(String specialVarName){ + super(specialVarName); + } + + public static class Drone extends CoordinateVariable{ + public final IDrone drone; + + public Drone(IDrone drone, String specialVarName){ + super(specialVarName); + this.drone = drone; + } + } + } + + public static abstract class ItemVariable extends SpecialVariableRetrievalEvent{ + public ItemStack item; + + public ItemVariable(String specialVarName){ + super(specialVarName); + } + + public static class Drone extends ItemVariable{ + public final IDrone drone; + + public Drone(IDrone drone, String specialVarName){ + super(specialVarName); + this.drone = drone; + } + } + } +} diff --git a/src/api/java/pneumaticCraft/api/item/IInventoryItem.java b/src/api/java/pneumaticCraft/api/item/IInventoryItem.java new file mode 100644 index 00000000..b153e022 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/item/IInventoryItem.java @@ -0,0 +1,20 @@ +package pneumaticCraft.api.item; + +import java.util.List; + +import net.minecraft.item.ItemStack; + +/** + * Implement this interface for your items that have an inventory. When you don't have access to the item, just create any old class + * that implements this interface and register an instance of it in PneumaticRegistry. + * This will then will be used in the Pneumatic Helmet's item search. + * + */ +public interface IInventoryItem{ + + /** + * @parm stack: Item that potentially has an inventory. + * @parm curStacks: List of all currently added stacks for this item. Add more stacks in here in your implementation when found the right item. + */ + public void getStacksInItem(ItemStack stack, List<ItemStack> curStacks); +} diff --git a/src/api/java/pneumaticCraft/api/item/IPressurizable.java b/src/api/java/pneumaticCraft/api/item/IPressurizable.java new file mode 100644 index 00000000..027aaad1 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/item/IPressurizable.java @@ -0,0 +1,35 @@ +package pneumaticCraft.api.item; + +import net.minecraft.item.ItemStack; + +/** + * Any item implementing this interface will be able to (dis)charge in a Charging Station. + */ +public interface IPressurizable{ + /** + * This method should return the current pressure of the ItemStack given. + * + * @param iStack Stack the pressure is asked from. + * @return Pressure in bar. + */ + public float getPressure(ItemStack iStack); + + /** + * this method is used to charge or discharge a pneumatic item. when the + * value is negative the item should be discharging + * + * @param iStack the ItemStack which has to be (dis)charged. + * @param amount amount in mL that the item is (dis)charging. + */ + public void addAir(ItemStack iStack, int amount); + + /** + * This method should return the maximum pressure of a pneumatic item. If it + * has reached this maximum, it won't explode, but it wouldn't (try to) + * charge either. + * + * @param iStack the stack from which the maximum pressure is asked. + * @return maximum pressure in bar. + */ + public float maxPressure(ItemStack iStack); +} diff --git a/src/api/java/pneumaticCraft/api/item/IProgrammable.java b/src/api/java/pneumaticCraft/api/item/IProgrammable.java new file mode 100644 index 00000000..d00d94c3 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/item/IProgrammable.java @@ -0,0 +1,34 @@ +package pneumaticCraft.api.item; + +import net.minecraft.item.ItemStack; + +/** + * Implement this for items that can get programmed in a Programmer. + * For now the only thing you can do with this is make program storages, later more interaction with programming puzzles is planned. + * Puzzle pieces will be written onto the implementer's itemstack NBT, using the "progWidget" tag. + */ +public interface IProgrammable{ + + /** + * When returned true, this stack is allowed to be programmed. + * Used to allow certain damage values to be programmed while others can't. + * @param stack + * @return + */ + public boolean canProgram(ItemStack stack); + + /** + * When returned true, Programming Puzzles are needed to program this item. When returned false, it's free to program. + * Drones and Network API's return true in PneumaticCraft, Network Storages return false. + * @param stack + * @return + */ + public boolean usesPieces(ItemStack stack); + + /** + * When returned true, the implementing item will get a tooltip added of the summary of puzzles used in the stored program. + * @return + */ + public boolean showProgramTooltip(); + +} diff --git a/src/api/java/pneumaticCraft/api/item/ItemSupplier.java b/src/api/java/pneumaticCraft/api/item/ItemSupplier.java new file mode 100644 index 00000000..93c13fb5 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/item/ItemSupplier.java @@ -0,0 +1,47 @@ +package pneumaticCraft.api.item; + +import net.minecraft.item.Item; +import cpw.mods.fml.common.registry.GameRegistry; + +public class ItemSupplier{ + public static Item getItem(String itemName){ + return GameRegistry.findItem("PneumaticCraft", itemName); + } + + /* + The following is a list of all the item names that can be passed as argument in getItem(String) to get a PneumaticCraft item. + + GPSTool Currently tracked coordinated is stored in NBT, with 'x', 'y', 'z' being the tag names for the x,y and z positions respectively. + machineUpgrade damage value = upgrade type. + ingotIronCompressed + pressureGauge + stoneBase + cannonBarrel + turbineBlade + plasticPlant damage value = plant type. Mapped the same as Vanilla dye in terms of color. + plastic damage value = plastic type. Mapped the same as Vanilla dye in terms of color. + airCanister implements IPressurizable + vortexCannon implements IPressurizable + pneumaticCylinder + pneumaticHelmet implements IPressurizable + manometer implements IPressurizable + turbineRotor + assemblyProgram damage value = program type. + emptyPCB + unassembledPCB + PCBBlueprint + bucketEtchingAcid + transistor + capacitor + printedCircuitBoard + failedPCB + networkComponent damage value = network component type. + stopWorm + nukeVirus + compressedIronGear + pneumaticWrench implements IPressurizable + + + + */ +} diff --git a/src/api/java/pneumaticCraft/api/package-info.java b/src/api/java/pneumaticCraft/api/package-info.java new file mode 100644 index 00000000..55919456 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/package-info.java @@ -0,0 +1,5 @@ +@API(apiVersion = "1.0", owner = "PneumaticCraft", provides = "PneumaticCraftApi") +package pneumaticCraft.api; + +import cpw.mods.fml.common.API; + diff --git a/src/api/java/pneumaticCraft/api/recipe/AssemblyRecipe.java b/src/api/java/pneumaticCraft/api/recipe/AssemblyRecipe.java new file mode 100644 index 00000000..8c74b4bb --- /dev/null +++ b/src/api/java/pneumaticCraft/api/recipe/AssemblyRecipe.java @@ -0,0 +1,49 @@ +package pneumaticCraft.api.recipe; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class AssemblyRecipe{ + public static List<AssemblyRecipe> drillRecipes = new ArrayList<AssemblyRecipe>(); + public static List<AssemblyRecipe> laserRecipes = new ArrayList<AssemblyRecipe>(); + public static List<AssemblyRecipe> drillLaserRecipes = new ArrayList<AssemblyRecipe>(); + + private final ItemStack input; + private final ItemStack output; + + public AssemblyRecipe(ItemStack input, ItemStack output){ + this.input = input; + this.output = output; + } + + public ItemStack getInput(){ + return input; + } + + public ItemStack getOutput(){ + return output; + } + + public static void addDrillRecipe(Object input, Object output){ + drillRecipes.add(new AssemblyRecipe(getStackFromObject(input), getStackFromObject(output))); + } + + public static void addLaserRecipe(Object input, Object output){ + laserRecipes.add(new AssemblyRecipe(getStackFromObject(input), getStackFromObject(output))); + } + + private static ItemStack getStackFromObject(Object object){ + if(object instanceof Block) { + return new ItemStack((Block)object); + } else if(object instanceof Item) { + return new ItemStack((Item)object); + } else { + return (ItemStack)object; + } + } + +} diff --git a/src/api/java/pneumaticCraft/api/recipe/IPressureChamberRecipe.java b/src/api/java/pneumaticCraft/api/recipe/IPressureChamberRecipe.java new file mode 100644 index 00000000..93eba67c --- /dev/null +++ b/src/api/java/pneumaticCraft/api/recipe/IPressureChamberRecipe.java @@ -0,0 +1,34 @@ +package pneumaticCraft.api.recipe; + +import net.minecraft.item.ItemStack; + +public interface IPressureChamberRecipe{ + + /** + * Returns the threshold which is minimal to craft the recipe. Negative pressures also work. + * @return threshold pressure + */ + public float getCraftingPressure(); + + /** + * This method should return the used items in the recipe when the right items are provided to craft this recipe. + * @param inputStacks + * @return usedStacks, return null when the inputStacks aren't valid for this recipe. + */ + public ItemStack[] isValidRecipe(ItemStack[] inputStacks); + + /** + * When returned true, only the exact same references of the stacks returned by isValidRecipe() will be removed. This is useful + * to remove stacks with a certain NBT value (like Enchanted Books). Return false for normal behaviour. + * @return true if exact stacks should be removed only. + */ + public boolean shouldRemoveExactStacks(); + + /** + * This method will be called when the recipe should output its items. the stacks the recipe output, may be dependent on the input stacks. + * @param removedStacks same reference to the stacks returned by isValidRecipe. + * @param inputStacks. These stacks can be modified (like adding/removing NBT data eg.) + * @return outputStacks. Stacks that will pop 'out of the chamber' + */ + public ItemStack[] craftRecipe(ItemStack[] inputStacks, ItemStack[] removedStacks); +} diff --git a/src/api/java/pneumaticCraft/api/recipe/PressureChamberRecipe.java b/src/api/java/pneumaticCraft/api/recipe/PressureChamberRecipe.java new file mode 100644 index 00000000..5d6b29e5 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/recipe/PressureChamberRecipe.java @@ -0,0 +1,24 @@ +package pneumaticCraft.api.recipe; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.item.ItemStack; + +public class PressureChamberRecipe{ + public static List<PressureChamberRecipe> chamberRecipes = new ArrayList<PressureChamberRecipe>(); + public static List<IPressureChamberRecipe> specialRecipes = new ArrayList<IPressureChamberRecipe>(); + + public final ItemStack[] input; + public final ItemStack[] output; + public final float pressure; + public final boolean outputAsBlock; + + public PressureChamberRecipe(ItemStack[] input, float pressureRequired, ItemStack[] output, boolean outputAsBlock){ + this.input = input; + this.output = output; + pressure = pressureRequired; + this.outputAsBlock = outputAsBlock; + } + +} diff --git a/src/api/java/pneumaticCraft/api/tileentity/AirHandlerSupplier.java b/src/api/java/pneumaticCraft/api/tileentity/AirHandlerSupplier.java new file mode 100644 index 00000000..1bf1be74 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/tileentity/AirHandlerSupplier.java @@ -0,0 +1,51 @@ +package pneumaticCraft.api.tileentity; + +import java.lang.reflect.Constructor; + +public class AirHandlerSupplier{ + private static Constructor airHandlerConstructor; + + public static IAirHandler getTierOneAirHandler(int volume){ + return getAirHandler(5F, 7F, volume); + } + + public static IAirHandler getTierTwoAirHandler(int volume){ + return getAirHandler(20F, 25F, volume); + } + + /** + * Returns a new instance of an IAirHandler. This handler handles everything pressurized air related: Air dispersion, + * blowing up when the pressure gets too high, providing a method for releasing air into the atmosphere... + * PROVIDED THAT THE FOLLOWING METHODS ARE FORWARDED TO THIS INSTANCE: + * {@link net.minecraft.tileentity.TileEntity#updateEntity()}, + * {@link net.minecraft.tileentity.TileEntity#writeToNBT(net.minecraft.nbt.NBTTagCompound)} + * {@link net.minecraft.tileentity.TileEntity#readFromNBT(net.minecraft.nbt.NBTTagCompound)} + * {@link net.minecraft.tileentity.TileEntity#validate()} + * @param dangerPressure minimal pressure on which this machine can explode (the yellow to red transition) + * @param criticalPressure the absolute maximum pressure the machine can take 7 bar in tier 1 machines. + * @param maxFlow maximum mL/tick that this machine can disperse. Tier one machines do 50mL/tick while Tier two have 200mL/tick. + * @param volume Volume of the machine's internal storage. These vary from 1000mL for small machines to 10,000mL for the big ones. + * The higher the volume the slower the machine will charge/discharge. + * @return + */ + public static IAirHandler getAirHandler(float dangerPressure, float criticalPressure, int volume){ + IAirHandler airHandler = null; + try { + if(airHandlerConstructor == null) airHandlerConstructor = Class.forName("pneumaticCraft.common.tileentity.TileEntityPneumaticBase").getConstructor(float.class, float.class, int.class); + airHandler = (IAirHandler)airHandlerConstructor.newInstance(dangerPressure, criticalPressure, volume); + } catch(Exception e) { + System.err.println("[PneumaticCraft API] An error has occured whilst trying to get an AirHandler. Here's a stacktrace:"); + e.printStackTrace(); + } + return airHandler; + } + + /** + * Use the version with integer parameters + */ + @Deprecated + public static IAirHandler getAirHandler(float dangerPressure, float criticalPressure, float maxFlow, float volume){ + return getAirHandler(dangerPressure, criticalPressure, (int)volume); + } + +} diff --git a/src/api/java/pneumaticCraft/api/tileentity/IAirHandler.java b/src/api/java/pneumaticCraft/api/tileentity/IAirHandler.java new file mode 100644 index 00000000..72929e90 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/tileentity/IAirHandler.java @@ -0,0 +1,114 @@ +package pneumaticCraft.api.tileentity; + +import java.util.List; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; + +import org.apache.commons.lang3.tuple.Pair; + +/** + * A way for you to access about everything you need from a pneumatic machine. + * DO NOT IMPLEMENT THIS YOURSELF! Use AirHandlerSupplier to get an instance for your TileEntity, and implement IPneumaticMachine instead. + */ + +public interface IAirHandler extends IManoMeasurable{ + + /** + * -----------Needs to be forwarded by the implementing TileEntity's updateEntity() method. + * Updates the pneumatic machine's logic like air dispersion and checking if it needs to explode. + */ + public void updateEntityI(); + + /** + * -----------Needs to be forwarded by the implementing TileEntity. + * @param nbt + */ + public void readFromNBTI(NBTTagCompound nbt); + + /** + * -----------Needs to be forwarded by the implementing TileEntity. + * @param nbt + */ + public void writeToNBTI(NBTTagCompound nbt); + + /** + * -----------Needs to be forwarded by the implementing TileEntity with itself as parameter. + * @param parent TileEntity that is referencing this air handler. + */ + public void validateI(TileEntity parent); + + /** + * Method to release air in the air. It takes air from a specific side, plays a sound effect, and spawns smoke particles. + * It automatically detects if it needs to release air (when under pressure), suck air (when in vacuum) or do nothing. + * @param side + */ + public void airLeak(ForgeDirection side); + + /** + * Returns a list of all the connecting pneumatics. It takes sides in account. + */ + public List<Pair<ForgeDirection, IPneumaticMachine>> getConnectedPneumatics(); + + /** + * Adds air to the tank of the given side of this TE. It also updates clients where needed (when they have a GUI opened). + * Deprecated: use the version with the integer parameter now. + * @param amount + * @param side + */ + @Deprecated + public void addAir(float amount, ForgeDirection side); + + public void addAir(int amount, ForgeDirection side); + + /** + * Sets the volume of this TE's air tank. When the volume decreases the pressure will remain the same, meaning air will + * be lost. When the volume increases, the air remains the same, meaning the pressure will drop. + * Used in the Volume Upgrade calculations. + * Deprecated: use the version with the integer parameter now. + * @param newVolume + */ + @Deprecated + public void setVolume(float newVolume); + + public void setVolume(int newVolume); + + public int getVolume(); + + /** + * Returns the pressure at which this TE will explode. + * @return + */ + public float getMaxPressure(); + + public float getPressure(ForgeDirection sideRequested); + + /** + * Returns the amount of air (that has a relation to the pressure: air = pressure * volume) + * @param sideRequested + * @return + */ + public int getCurrentAir(ForgeDirection sideRequested); + + /** + * When your TileEntity is implementing IInventory and has slots that accept PneumaticCraft upgrades, register these slots + * to the air handler by calling this method once on initialization of the TileEntity. Then they'll automatically be used to get Volume/Security upgrades. + * @param upgradeSlots all upgrade slots stored in an array. + */ + public void setUpgradeSlots(int... upgradeSlots); + + public int[] getUpgradeSlots(); + + public int getXCoord(); + + public int getYCoord(); + + public int getZCoord(); + + /** + * Needs to be forwarded from the implementing _Block_! Forward the Block's "onNeighborChange" method to this handler. + */ + public void onNeighborChange(); + +} diff --git a/src/api/java/pneumaticCraft/api/tileentity/IHeatExchanger.java b/src/api/java/pneumaticCraft/api/tileentity/IHeatExchanger.java new file mode 100644 index 00000000..60df395c --- /dev/null +++ b/src/api/java/pneumaticCraft/api/tileentity/IHeatExchanger.java @@ -0,0 +1,24 @@ +package pneumaticCraft.api.tileentity; + +import net.minecraftforge.common.util.ForgeDirection; +import pneumaticCraft.api.IHeatExchangerLogic; + +/** + * Implemented by TileEntities or Blocks which transport heat. Keep in mind that when a Block is implementing it you only can give off a constant + * resistance/temperature (like Lava and Ice). + * @author MineMaarten + * www.minemaarten.com + */ +public interface IHeatExchanger{ + + /** + * Get an instance of IHeatExchangerLogic from PneumaticRegistry.getInstance().getHeatExchangerLogic() and keep a global reference. + * Then return it in this method. You can return different exchanger logics for different sides. Keep in mind that when you change + * a returned logic, you need to create a neighbor block change to notify the differences. You can return null to indicate no heat can + * be exchanged on that side. + * @param side + * @return + */ + public IHeatExchangerLogic getHeatExchangerLogic(ForgeDirection side); + +} diff --git a/src/api/java/pneumaticCraft/api/tileentity/IManoMeasurable.java b/src/api/java/pneumaticCraft/api/tileentity/IManoMeasurable.java new file mode 100644 index 00000000..c5178abe --- /dev/null +++ b/src/api/java/pneumaticCraft/api/tileentity/IManoMeasurable.java @@ -0,0 +1,14 @@ +package pneumaticCraft.api.tileentity; + +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; + +public interface IManoMeasurable{ + /** + * This method is invoked by the Manometer when a player right-clicks a TE or Entity with this interface implemented. + * @param player that rightclicks the measurable TE, and therefore needs to get the message + * @param curInfo list you can append info to. If you don't append any info no air will be used. + */ + public void printManometerMessage(EntityPlayer player, List<String> curInfo); +} diff --git a/src/api/java/pneumaticCraft/api/tileentity/IPneumaticMachine.java b/src/api/java/pneumaticCraft/api/tileentity/IPneumaticMachine.java new file mode 100644 index 00000000..0e283115 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/tileentity/IPneumaticMachine.java @@ -0,0 +1,30 @@ +package pneumaticCraft.api.tileentity; + +import net.minecraftforge.common.util.ForgeDirection; + +public interface IPneumaticMachine{ + + /** + * In your TileEntity class which is implementing this interface you should keep a reference of an IAirHandler. + * You can retrieve one by calling {@link AirHandlerSupplier#getAirHandler(net.minecraft.tileentity.TileEntity, float, float, float, float)}. + * Do this when your TileEntity is initialized, i.e. xCoord,yCoord,zCoord and worldObj have a value. + * In this method you need to return this reference. + * + * IMPORTANT: You need to forward the {@link net.minecraft.tileentity.TileEntity#updateEntity()}, + * {@link net.minecraft.tileentity.TileEntity#writeToNBT(net.minecraft.nbt.NBTTagCompound)} , + * {@link net.minecraft.tileentity.TileEntity#readFromNBT(net.minecraft.nbt.NBTTagCompound)} and + * {@link net.minecraft.tileentity.TileEntity#validate()} (with the implementing TileEntity as additional parameter) + * to the IAirHandler. + * Apart from that you'll need to forward {@link net.minecraft.block.Block#onNeighborChange(net.minecraft.world.IBlockAccess, int, int, int, int, int, int)} + * from the implementing block to the IAirHandler. + * @return + */ + public IAirHandler getAirHandler(); + + /** + * Returns true if the pneumatic logic is connected to the given side. + * @param side + * @return + */ + public boolean isConnectedTo(ForgeDirection side); +} diff --git a/src/api/java/pneumaticCraft/api/universalSensor/EntityPollSensor.java b/src/api/java/pneumaticCraft/api/universalSensor/EntityPollSensor.java new file mode 100644 index 00000000..0419911f --- /dev/null +++ b/src/api/java/pneumaticCraft/api/universalSensor/EntityPollSensor.java @@ -0,0 +1,31 @@ +package pneumaticCraft.api.universalSensor; + +import java.util.List; + +import net.minecraft.entity.Entity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; + +public abstract class EntityPollSensor implements IPollSensorSetting{ + + @Override + public String getSensorPath(){ + return "entityTracker"; + } + + @Override + public int getPollFrequency(){ + return 1; + } + + @Override + public int getRedstoneValue(World world, int x, int y, int z, int sensorRange, String textBoxText){ + AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(x - sensorRange, y - sensorRange, z - sensorRange, x + 1 + sensorRange, y + 1 + sensorRange, z + 1 + sensorRange); + return getRedstoneValue(world.getEntitiesWithinAABB(getEntityTracked(), aabb), textBoxText); + } + + public abstract Class getEntityTracked(); + + public abstract int getRedstoneValue(List<Entity> entities, String textBoxText); + +} diff --git a/src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinateEventSensor.java b/src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinateEventSensor.java new file mode 100644 index 00000000..2f225c5a --- /dev/null +++ b/src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinateEventSensor.java @@ -0,0 +1,59 @@ +package pneumaticCraft.api.universalSensor; + +import java.util.List; + +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.tileentity.TileEntity; + +import org.lwjgl.util.Rectangle; + +import cpw.mods.fml.common.eventhandler.Event; + +public interface IBlockAndCoordinateEventSensor{ + /** + * See {@link ISensorSetting#getSensorPath()} + * @return + */ + public String getSensorPath(); + + /** + * Extended version of the normal emitRedstoneOnEvent. This method will only invoke with a valid GPS tool, and when the coordinate is within range. + * @param event + * @param sensor + * @param range + * @param toolX + * @param toolY + * @param toolZ + * @return + */ + public int emitRedstoneOnEvent(Event event, TileEntity sensor, int range, int toolX, int toolY, int toolZ); + + /** + * See {@link IEventSensorSetting#getRedstonePulseLength()} + * @return + */ + public int getRedstonePulseLength(); + + /** + * See {@link ISensorSetting#needsTextBox()} + * @return + */ + public boolean needsTextBox(); + + /** + * See {@link ISensorSetting#needsSlot()} + */ + public Rectangle needsSlot(); + + /** + * See {@link ISensorSetting#getDescription()} + * @return + */ + public List<String> getDescription(); + + /** + * Called by GuiScreen#drawScreen this method can be used to render additional things like status/info text. + * @param fontRenderer + */ + public void drawAdditionalInfo(FontRenderer fontRenderer); +} diff --git a/src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinatePollSensor.java b/src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinatePollSensor.java new file mode 100644 index 00000000..e7bc329e --- /dev/null +++ b/src/api/java/pneumaticCraft/api/universalSensor/IBlockAndCoordinatePollSensor.java @@ -0,0 +1,63 @@ +package pneumaticCraft.api.universalSensor; + +import java.util.List; + +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.world.World; + +import org.lwjgl.util.Rectangle; + +public interface IBlockAndCoordinatePollSensor{ + /** + * See {@link ISensorSetting#getSensorPath()} + * @return + */ + public String getSensorPath(); + + /** + * See {@link ISensorSetting#needsTextBox()} + * @return + */ + public boolean needsTextBox(); + + /** + * See {@link ISensorSetting#needsSlot()} + * @return + */ + public Rectangle needsSlot(); + + /** + * See {@link ISensorSetting#getDescription()} + * @return + */ + public List<String> getDescription(); + + /** + * See {@link IPollSensorSetting#getRedstoneValue(World, int, int, int, int, String)} , but this has the GPS tracked coordinates + * as extra parameters. This method will only be called when the coordinate is within the Universal Sensor's range. + * @param world + * @param x + * @param y + * @param z + * @param sensorRange + * @param textBoxText + * @param toolX + * @param toolY + * @param toolZ + * @return + */ + public int getRedstoneValue(World world, int x, int y, int z, int sensorRange, String textBoxText, int toolX, int toolY, int toolZ); + + /** + * See {@link IPollSensorSetting#getPollFrequency()} + * @return + */ + public int getPollFrequency(); + + /** + * Called by GuiScreen#drawScreen this method can be used to render additional things like status/info text. + * @param fontRenderer + */ + public void drawAdditionalInfo(FontRenderer fontRenderer); + +} diff --git a/src/api/java/pneumaticCraft/api/universalSensor/IEventSensorSetting.java b/src/api/java/pneumaticCraft/api/universalSensor/IEventSensorSetting.java new file mode 100644 index 00000000..bce3017a --- /dev/null +++ b/src/api/java/pneumaticCraft/api/universalSensor/IEventSensorSetting.java @@ -0,0 +1,23 @@ +package pneumaticCraft.api.universalSensor; + +import net.minecraft.tileentity.TileEntity; +import cpw.mods.fml.common.eventhandler.Event; + +public interface IEventSensorSetting extends ISensorSetting{ + + /** + * This method is only invoked when a subscribed event is triggered. + * @param event + * @param sensor + * @param range + * @param textboxText + * @return Redstone strength for the given event. + */ + public int emitRedstoneOnEvent(Event event, TileEntity sensor, int range, String textboxText); + + /** + * Should return how long a pulse should hold in ticks. By default this is 5 ticks (1/4 second). + * @return + */ + public int getRedstonePulseLength(); +} diff --git a/src/api/java/pneumaticCraft/api/universalSensor/IPollSensorSetting.java b/src/api/java/pneumaticCraft/api/universalSensor/IPollSensorSetting.java new file mode 100644 index 00000000..50cf8305 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/universalSensor/IPollSensorSetting.java @@ -0,0 +1,27 @@ +package pneumaticCraft.api.universalSensor; + +import net.minecraft.world.World; + +public interface IPollSensorSetting extends ISensorSetting{ + + /** + * The value returned here is the interval between every check in ticks (the interval of calling getRedstoneValue()). + * Consider increasing the interval when your sensor method is resource intensive. + * @return + */ + public int getPollFrequency(); + + /** + * The base method. This method should return the outputted redstone value 0-15 of this sensor. When this sensor is + * digital, just return 0 or 15. + * @param world + * @param x + * @param y + * @param z + * @param sensorRange Range of the sensor, based on the amount of Range Upgrades inserted in the Universal Sensor. + * @param textBoxText The text typed in the textbox of the Universal Sensor. + * @return + */ + public int getRedstoneValue(World world, int x, int y, int z, int sensorRange, String textBoxText); + +} diff --git a/src/api/java/pneumaticCraft/api/universalSensor/ISensorSetting.java b/src/api/java/pneumaticCraft/api/universalSensor/ISensorSetting.java new file mode 100644 index 00000000..bfbf3468 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/universalSensor/ISensorSetting.java @@ -0,0 +1,59 @@ +package pneumaticCraft.api.universalSensor; + +import java.util.List; + +import net.minecraft.client.gui.FontRenderer; + +import org.lwjgl.util.Rectangle; + +public interface ISensorSetting{ + /** + * Should return the button path the player has to follow in which this setting is stored. + * For instance, when the sensor should be located in player and is called speed, you should return "entityTracker/player/speed". + * "entityTracker" indicates that this sensor needs an Entity Tracker upgrade to run. You can choose from the following upgrades: + * + * -entityTracker + * -blockTracker + * -gpsTool (so you can use a certain coordinate (within range) to measure on) + * -volume + * -dispenser + * -speed + * -itemLife + * -itemSearch + * -coordinateTracker + * -range + * -security + * + * You can allow only sensors to work by more than one upgrade, by seperating the upgrades with a '_'. For example, + * "entityTracker_speed" will only let the sensor be chosen when both an Entity Tracker and a Speed Upgrade are inserted. + * @return + */ + public String getSensorPath(); + + /** + * When returned true, the GUI will enable the textbox writing, otherwise not. + * @return + */ + public boolean needsTextBox(); + + /** + * Called by GuiScreen#drawScreen this method can be used to render additional things like status/info text. + * @param fontRenderer + */ + public void drawAdditionalInfo(FontRenderer fontRenderer); + + /** + * Should return the description of this sensor displayed in the GUI stat. Information should at least include + * when this sensor emits redstone and how (analog (1 through 15), or digital). + * @return + */ + public List<String> getDescription(); + + /** + * Not being used at the moment, I recommend returning null for now. It is going to be used to allow sensors to decide their + * status on a item which can be inserted in a slot in the GUI if this method returns a rectangle with the coordinates of + * the slot. + * @return + */ + public Rectangle needsSlot(); +} diff --git a/src/api/java/pneumaticCraft/api/universalSensor/PlayerEventSensor.java b/src/api/java/pneumaticCraft/api/universalSensor/PlayerEventSensor.java new file mode 100644 index 00000000..19bda915 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/universalSensor/PlayerEventSensor.java @@ -0,0 +1,33 @@ +package pneumaticCraft.api.universalSensor; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.event.entity.player.PlayerEvent; +import cpw.mods.fml.common.eventhandler.Event; + +public abstract class PlayerEventSensor implements IEventSensorSetting{ + + @Override + public String getSensorPath(){ + return "entityTracker/Player"; + } + + @Override + public int emitRedstoneOnEvent(Event event, TileEntity sensor, int range, String textboxText){ + if(event instanceof PlayerEvent) { + EntityPlayer player = ((PlayerEvent)event).entityPlayer; + if(Math.abs(player.posX - sensor.xCoord + 0.5D) < range + 0.5D && Math.abs(player.posY - sensor.yCoord + 0.5D) < range + 0.5D && Math.abs(player.posZ - sensor.zCoord + 0.5D) < range + 0.5D) { + return emitRedstoneOnEvent((PlayerEvent)event, sensor, range); + } + } + return 0; + } + + public abstract int emitRedstoneOnEvent(PlayerEvent event, TileEntity sensor, int range); + + @Override + public int getRedstonePulseLength(){ + return 5; + } + +} diff --git a/src/api/java/pneumaticCraft/api/universalSensor/SensorRegistrator.java b/src/api/java/pneumaticCraft/api/universalSensor/SensorRegistrator.java new file mode 100644 index 00000000..f76c0732 --- /dev/null +++ b/src/api/java/pneumaticCraft/api/universalSensor/SensorRegistrator.java @@ -0,0 +1,33 @@ +package pneumaticCraft.api.universalSensor; + +/** + * With this class you can register your own sensors. + */ +public class SensorRegistrator{ + /** + * This field will be initialized in the PreInit phase of PneumaticCraft's loading phase. + * With this field you can register every Universal Sensor sensor you want. Just pass a new instance + * to one of the registerSensor methods. Sensors are singletons. + */ + public static ISensorRegistrator sensorRegistrator; + + public static interface ISensorRegistrator{ + /** + * Registry for IPollSensorSetting, EntityPollSensor and IEventSensorSetting, and any other instance of ISensorSetting. + * @param sensor + */ + public void registerSensor(ISensorSetting sensor); + + /** + * Registry for IBlockAndCoordinateEventSensor + * @param sensor + */ + public void registerSensor(IBlockAndCoordinateEventSensor sensor); + + /** + * Registry for IBlockAndCoordinatePollSensor + * @param sensor + */ + public void registerSensor(IBlockAndCoordinatePollSensor sensor); + } +} diff --git a/src/api/java/thaumcraft/api/IGoggles.java b/src/api/java/thaumcraft/api/IGoggles.java new file mode 100644 index 00000000..2f53d816 --- /dev/null +++ b/src/api/java/thaumcraft/api/IGoggles.java @@ -0,0 +1,22 @@ +package thaumcraft.api; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; + +/** + * + * @author Azanor + * + * Equipped head slot items that extend this class will be able to perform most functions that + * goggles of revealing can apart from view nodes which is handled by IRevealer. + * + */ + +public interface IGoggles { + + /* + * If this method returns true things like block essentia contents will be shown. + */ + public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player); + +} diff --git a/src/api/java/thaumcraft/api/IRepairable.java b/src/api/java/thaumcraft/api/IRepairable.java new file mode 100644 index 00000000..48c6dff9 --- /dev/null +++ b/src/api/java/thaumcraft/api/IRepairable.java @@ -0,0 +1,13 @@ +package thaumcraft.api; + + + +/** + * @author Azanor + * Items, armor and tools with this interface can receive the Repair enchantment. + * Repairs 1 point of durability every 10 seconds (2 for repair II) + */ +public interface IRepairable { + + +} diff --git a/src/api/java/thaumcraft/api/IRepairableExtended.java b/src/api/java/thaumcraft/api/IRepairableExtended.java new file mode 100644 index 00000000..33827124 --- /dev/null +++ b/src/api/java/thaumcraft/api/IRepairableExtended.java @@ -0,0 +1,17 @@ +package thaumcraft.api; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + + + +/** + * @author Azanor + * Items, armor and tools with this interface can receive the Repair enchantment. + * Repairs 1 point of durability every 10 seconds (2 for repair II) + */ +public interface IRepairableExtended extends IRepairable { + + public boolean doRepair(ItemStack stack, EntityPlayer player, int enchantlevel); + +} diff --git a/src/api/java/thaumcraft/api/IRunicArmor.java b/src/api/java/thaumcraft/api/IRunicArmor.java new file mode 100644 index 00000000..5dd31100 --- /dev/null +++ b/src/api/java/thaumcraft/api/IRunicArmor.java @@ -0,0 +1,22 @@ +package thaumcraft.api; + +import net.minecraft.item.ItemStack; + +/** + * + * @author Azanor + * + * Armor or bauble slot items that implement this interface can provide runic shielding. + * Recharging, hardening, etc. is handled internally by thaumcraft. + * + */ + +public interface IRunicArmor { + + /** + * returns how much charge this item can provide. This is the base shielding value - any hardening is stored and calculated internally. + */ + public int getRunicCharge(ItemStack itemstack); + + +} diff --git a/src/api/java/thaumcraft/api/IScribeTools.java b/src/api/java/thaumcraft/api/IScribeTools.java new file mode 100644 index 00000000..8800fa57 --- /dev/null +++ b/src/api/java/thaumcraft/api/IScribeTools.java @@ -0,0 +1,14 @@ +package thaumcraft.api; + + +/** + * + * @author Azanor + * + * Interface used to identify scribing tool items used in research table + * + */ + +public interface IScribeTools { + +} diff --git a/src/api/java/thaumcraft/api/IVisDiscountGear.java b/src/api/java/thaumcraft/api/IVisDiscountGear.java new file mode 100644 index 00000000..3793ea3e --- /dev/null +++ b/src/api/java/thaumcraft/api/IVisDiscountGear.java @@ -0,0 +1,20 @@ +package thaumcraft.api; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import thaumcraft.api.aspects.Aspect; + + + + +/** + * @author Azanor + * ItemArmor with this interface will grant a discount to the vis cost of actions the wearer performs with casting wands. + * The amount returned is the percentage by which the cost is discounted. There is a built-int max discount of 50%, but + * individual items really shouldn't have a discount more than 5% + */ +public interface IVisDiscountGear { + + int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect); + +} diff --git a/src/api/java/thaumcraft/api/ItemApi.java b/src/api/java/thaumcraft/api/ItemApi.java new file mode 100644 index 00000000..25dda282 --- /dev/null +++ b/src/api/java/thaumcraft/api/ItemApi.java @@ -0,0 +1,70 @@ +package thaumcraft.api; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import cpw.mods.fml.common.FMLLog; + +/** + * @author Azanor + * + * This is used to gain access to the items in my mod. + * I only give some examples and it will probably still + * require a bit of work for you to get hold of everything you need. + * + */ +public class ItemApi { + + public static ItemStack getItem(String itemString, int meta) { + ItemStack item = null; + + try { + String itemClass = "thaumcraft.common.config.ConfigItems"; + Object obj = Class.forName(itemClass).getField(itemString).get(null); + if (obj instanceof Item) { + item = new ItemStack((Item) obj,1,meta); + } else if (obj instanceof ItemStack) { + item = (ItemStack) obj; + } + } catch (Exception ex) { + FMLLog.warning("[Thaumcraft] Could not retrieve item identified by: " + itemString); + } + + return item; + } + + public static ItemStack getBlock(String itemString, int meta) { + ItemStack item = null; + + try { + String itemClass = "thaumcraft.common.config.ConfigBlocks"; + Object obj = Class.forName(itemClass).getField(itemString).get(null); + if (obj instanceof Block) { + item = new ItemStack((Block) obj,1,meta); + } else if (obj instanceof ItemStack) { + item = (ItemStack) obj; + } + } catch (Exception ex) { + FMLLog.warning("[Thaumcraft] Could not retrieve block identified by: " + itemString); + } + + return item; + } + + /** + * + * Some examples + * + * Casting Wands: + * itemWandCasting + * + * Resources: + * itemEssence, itemWispEssence, itemResource, itemShard, itemNugget, + * itemNuggetChicken, itemNuggetBeef, itemNuggetPork, itemTripleMeatTreat + * + * Research: + * itemResearchNotes, itemInkwell, itemThaumonomicon + * + */ + +} diff --git a/src/api/java/thaumcraft/api/ItemRunic.java b/src/api/java/thaumcraft/api/ItemRunic.java new file mode 100644 index 00000000..80251f59 --- /dev/null +++ b/src/api/java/thaumcraft/api/ItemRunic.java @@ -0,0 +1,21 @@ +package thaumcraft.api; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class ItemRunic extends Item implements IRunicArmor { + + int charge; + + public ItemRunic (int charge) + { + super(); + this.charge = charge; + } + + @Override + public int getRunicCharge(ItemStack itemstack) { + return charge; + } + +} diff --git a/src/api/java/thaumcraft/api/ThaumcraftApi.java b/src/api/java/thaumcraft/api/ThaumcraftApi.java new file mode 100644 index 00000000..0b135d31 --- /dev/null +++ b/src/api/java/thaumcraft/api/ThaumcraftApi.java @@ -0,0 +1,507 @@ +package thaumcraft.api; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ConcurrentHashMap; + +import net.minecraft.block.Block; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.Item.ToolMaterial; +import net.minecraft.item.ItemArmor.ArmorMaterial; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.EnumHelper; +import net.minecraftforge.oredict.OreDictionary; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; +import thaumcraft.api.crafting.CrucibleRecipe; +import thaumcraft.api.crafting.InfusionEnchantmentRecipe; +import thaumcraft.api.crafting.InfusionRecipe; +import thaumcraft.api.crafting.ShapedArcaneRecipe; +import thaumcraft.api.crafting.ShapelessArcaneRecipe; +import thaumcraft.api.research.IScanEventHandler; +import thaumcraft.api.research.ResearchCategories; +import thaumcraft.api.research.ResearchCategoryList; +import thaumcraft.api.research.ResearchItem; +import thaumcraft.api.research.ResearchPage; + + +/** + * @author Azanor + * + * + * IMPORTANT: If you are adding your own aspects to items it is a good idea to do it AFTER Thaumcraft adds its aspects, otherwise odd things may happen. + * + */ +public class ThaumcraftApi { + + //Materials + public static ToolMaterial toolMatThaumium = EnumHelper.addToolMaterial("THAUMIUM", 3, 400, 7F, 2, 22); + public static ToolMaterial toolMatElemental = EnumHelper.addToolMaterial("THAUMIUM_ELEMENTAL", 3, 1500, 10F, 3, 18); + public static ArmorMaterial armorMatThaumium = EnumHelper.addArmorMaterial("THAUMIUM", 25, new int[] { 2, 6, 5, 2 }, 25); + public static ArmorMaterial armorMatSpecial = EnumHelper.addArmorMaterial("SPECIAL", 25, new int[] { 1, 3, 2, 1 }, 25); + + //Enchantment references + public static int enchantFrugal; + public static int enchantPotency; + public static int enchantWandFortune; + public static int enchantHaste; + public static int enchantRepair; + + //Miscellaneous + /** + * Portable Hole Block-id Blacklist. + * Simply add the block-id's of blocks you don't want the portable hole to go through. + */ + public static ArrayList<Block> portableHoleBlackList = new ArrayList<Block>(); + + + //RESEARCH///////////////////////////////////////// + public static ArrayList<IScanEventHandler> scanEventhandlers = new ArrayList<IScanEventHandler>(); + public static ArrayList<EntityTags> scanEntities = new ArrayList<EntityTags>(); + public static class EntityTagsNBT { + public EntityTagsNBT(String name, Object value) { + this.name = name; + this.value = value; + } + public String name; + public Object value; + } + public static class EntityTags { + public EntityTags(String entityName, AspectList aspects, EntityTagsNBT... nbts) { + this.entityName = entityName; + this.nbts = nbts; + this.aspects = aspects; + } + public String entityName; + public EntityTagsNBT[] nbts; + public AspectList aspects; + } + + /** + * not really working atm, so ignore it for now + * @param scanEventHandler + */ + public static void registerScanEventhandler(IScanEventHandler scanEventHandler) { + scanEventhandlers.add(scanEventHandler); + } + + /** + * This is used to add aspects to entities which you can then scan using a thaumometer. + * Also used to calculate vis drops from mobs. + * @param entityName + * @param aspects + * @param nbt you can specify certain nbt keys and their values + * to differentiate between mobs. <br>For example the normal and wither skeleton: + * <br>ThaumcraftApi.registerEntityTag("Skeleton", (new AspectList()).add(Aspect.DEATH, 5)); + * <br>ThaumcraftApi.registerEntityTag("Skeleton", (new AspectList()).add(Aspect.DEATH, 8), new NBTTagByte("SkeletonType",(byte) 1)); + */ + public static void registerEntityTag(String entityName, AspectList aspects, EntityTagsNBT... nbt ) { + scanEntities.add(new EntityTags(entityName,aspects,nbt)); + } + + //RECIPES///////////////////////////////////////// + private static ArrayList craftingRecipes = new ArrayList(); + private static HashMap<Object,ItemStack> smeltingBonus = new HashMap<Object,ItemStack>(); + + /** + * This method is used to determine what bonus items are generated when the infernal furnace smelts items + * @param in The input of the smelting operation. e.g. new ItemStack(Block.oreGold) + * @param out The bonus item that can be produced from the smelting operation e.g. new ItemStack(nuggetGold,0,0). + * Stacksize should be 0 unless you want to guarantee that at least 1 item is always produced. + */ + public static void addSmeltingBonus(ItemStack in, ItemStack out) { + smeltingBonus.put( + Arrays.asList(in.getItem(),in.getItemDamage()), + new ItemStack(out.getItem(),0,out.getItemDamage())); + } + + /** + * This method is used to determine what bonus items are generated when the infernal furnace smelts items + * @param in The ore dictionary input of the smelting operation. e.g. "oreGold" + * @param out The bonus item that can be produced from the smelting operation e.g. new ItemStack(nuggetGold,0,0). + * Stacksize should be 0 unless you want to guarantee that at least 1 item is always produced. + */ + public static void addSmeltingBonus(String in, ItemStack out) { + smeltingBonus.put( in, new ItemStack(out.getItem(),0,out.getItemDamage())); + } + + /** + * Returns the bonus item produced from a smelting operation in the infernal furnace + * @param in The input of the smelting operation. e.g. new ItemStack(oreGold) + * @return the The bonus item that can be produced + */ + public static ItemStack getSmeltingBonus(ItemStack in) { + ItemStack out = smeltingBonus.get(Arrays.asList(in.getItem(),in.getItemDamage())); + if (out==null) { + out = smeltingBonus.get(Arrays.asList(in.getItem(),OreDictionary.WILDCARD_VALUE)); + } + if (out==null) { + String od = OreDictionary.getOreName( OreDictionary.getOreID(in)); + out = smeltingBonus.get(od); + } + return out; + } + + public static List getCraftingRecipes() { + return craftingRecipes; + } + + /** + * @param research the research key required for this recipe to work. Leave blank if it will work without research + * @param result the recipe output + * @param aspects the vis cost per aspect. + * @param recipe The recipe. Format is exactly the same as vanilla recipes. Input itemstacks are NBT sensitive. + */ + public static ShapedArcaneRecipe addArcaneCraftingRecipe(String research, ItemStack result, AspectList aspects, Object ... recipe) + { + ShapedArcaneRecipe r= new ShapedArcaneRecipe(research, result, aspects, recipe); + craftingRecipes.add(r); + return r; + } + + /** + * @param research the research key required for this recipe to work. Leave blank if it will work without research + * @param result the recipe output + * @param aspects the vis cost per aspect + * @param recipe The recipe. Format is exactly the same as vanilla shapeless recipes. Input itemstacks are NBT sensitive. + */ + public static ShapelessArcaneRecipe addShapelessArcaneCraftingRecipe(String research, ItemStack result, AspectList aspects, Object ... recipe) + { + ShapelessArcaneRecipe r = new ShapelessArcaneRecipe(research, result, aspects, recipe); + craftingRecipes.add(r); + return r; + } + + /** + * @param research the research key required for this recipe to work. Leave blank if it will work without research + * @param result the recipe output. It can either be an itemstack or an nbt compound tag that will be added to the central item + * @param instability a number that represents the N in 1000 chance for the infusion altar to spawn an + * instability effect each second while the crafting is in progress + * @param aspects the essentia cost per aspect. + * @param aspects input the central item to be infused + * @param recipe An array of items required to craft this. Input itemstacks are NBT sensitive. + * Infusion crafting components are automatically "fuzzy" and the oredict will be checked for possible matches. + * + */ + public static InfusionRecipe addInfusionCraftingRecipe(String research, Object result, int instability, AspectList aspects, ItemStack input,ItemStack[] recipe) + { + if (!(result instanceof ItemStack || result instanceof Object[])) return null; + InfusionRecipe r= new InfusionRecipe(research, result, instability, aspects, input, recipe); + craftingRecipes.add(r); + return r; + } + + /** + * @param research the research key required for this recipe to work. Leave blank if it will work without research + * @param enchantment the enchantment that will be applied to the item + * @param instability a number that represents the N in 1000 chance for the infusion altar to spawn an + * instability effect each second while the crafting is in progress + * @param aspects the essentia cost per aspect. + * @param recipe An array of items required to craft this. Input itemstacks are NBT sensitive. + * Infusion crafting components are automatically "fuzzy" and the oredict will be checked for possible matches. + * + */ + public static InfusionEnchantmentRecipe addInfusionEnchantmentRecipe(String research, Enchantment enchantment, int instability, AspectList aspects, ItemStack[] recipe) + { + InfusionEnchantmentRecipe r= new InfusionEnchantmentRecipe(research, enchantment, instability, aspects, recipe); + craftingRecipes.add(r); + return r; + } + + /** + * @param stack the recipe result + * @return the recipe + */ + public static InfusionRecipe getInfusionRecipe(ItemStack res) { + for (Object r:getCraftingRecipes()) { + if (r instanceof InfusionRecipe) { + if (((InfusionRecipe)r).getRecipeOutput() instanceof ItemStack) { + if (((ItemStack) ((InfusionRecipe)r).getRecipeOutput()).isItemEqual(res)) + return (InfusionRecipe)r; + } + } + } + return null; + } + + + /** + * @param key the research key required for this recipe to work. + * @param result the output result + * @param catalyst an itemstack of the catalyst or a string if it is an ore dictionary item + * @param cost the vis cost + * @param tags the aspects required to craft this + */ + public static CrucibleRecipe addCrucibleRecipe(String key, ItemStack result, Object catalyst, AspectList tags) { + CrucibleRecipe rc = new CrucibleRecipe(key, result, catalyst, tags); + getCraftingRecipes().add(rc); + return rc; + } + + + /** + * @param stack the recipe result + * @return the recipe + */ + public static CrucibleRecipe getCrucibleRecipe(ItemStack stack) { + for (Object r:getCraftingRecipes()) { + if (r instanceof CrucibleRecipe) { + if (((CrucibleRecipe)r).getRecipeOutput().isItemEqual(stack)) + return (CrucibleRecipe)r; + } + } + return null; + } + + /** + * Used by the thaumonomicon drilldown feature. + * @param stack the item + * @return the thaumcraft recipe key that produces that item. + */ + private static HashMap<int[],Object[]> keyCache = new HashMap<int[],Object[]>(); + + public static Object[] getCraftingRecipeKey(EntityPlayer player, ItemStack stack) { + int[] key = new int[] {Item.getIdFromItem(stack.getItem()),stack.getItemDamage()}; + if (keyCache.containsKey(key)) { + if (keyCache.get(key)==null) return null; + if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), (String)(keyCache.get(key))[0])) + return keyCache.get(key); + else + return null; + } + for (ResearchCategoryList rcl:ResearchCategories.researchCategories.values()) { + for (ResearchItem ri:rcl.research.values()) { + if (ri.getPages()==null) continue; + for (int a=0;a<ri.getPages().length;a++) { + ResearchPage page = ri.getPages()[a]; + if (page.recipeOutput!=null && stack !=null && page.recipeOutput.isItemEqual(stack)) { + keyCache.put(key,new Object[] {ri.key,a}); + if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), ri.key)) + return new Object[] {ri.key,a}; + else + return null; + } + } + } + } + keyCache.put(key,null); + return null; + } + + //ASPECTS//////////////////////////////////////// + + public static ConcurrentHashMap<List,AspectList> objectTags = new ConcurrentHashMap<List,AspectList>(); + + /** + * Checks to see if the passed item/block already has aspects associated with it. + * @param id + * @param meta + * @return + */ + public static boolean exists(Item item, int meta) { + AspectList tmp = ThaumcraftApi.objectTags.get(Arrays.asList(item,meta)); + if (tmp==null) { + tmp = ThaumcraftApi.objectTags.get(Arrays.asList(item,OreDictionary.WILDCARD_VALUE)); + if (meta==OreDictionary.WILDCARD_VALUE && tmp==null) { + int index=0; + do { + tmp = ThaumcraftApi.objectTags.get(Arrays.asList(item,index)); + index++; + } while (index<16 && tmp==null); + } + if (tmp==null) return false; + } + + return true; + } + + /** + * Used to assign apsects to the given item/block. Here is an example of the declaration for cobblestone:<p> + * <i>ThaumcraftApi.registerObjectTag(new ItemStack(Blocks.cobblestone), (new AspectList()).add(Aspect.ENTROPY, 1).add(Aspect.EARTH, 1));</i> + * @param item the item passed. Pass OreDictionary.WILDCARD_VALUE if all damage values of this item/block should have the same aspects + * @param aspects A ObjectTags object of the associated aspects + */ + public static void registerObjectTag(ItemStack item, AspectList aspects) { + if (aspects==null) aspects=new AspectList(); + try { + objectTags.put(Arrays.asList(item.getItem(),item.getItemDamage()), aspects); + } catch (Exception e) {} + } + + + /** + * Used to assign apsects to the given item/block. Here is an example of the declaration for cobblestone:<p> + * <i>ThaumcraftApi.registerObjectTag(new ItemStack(Blocks.cobblestone), new int[]{0,1}, (new AspectList()).add(Aspect.ENTROPY, 1).add(Aspect.EARTH, 1));</i> + * @param item + * @param meta A range of meta values if you wish to lump several item meta's together as being the "same" item (i.e. stair orientations) + * @param aspects A ObjectTags object of the associated aspects + */ + public static void registerObjectTag(ItemStack item, int[] meta, AspectList aspects) { + if (aspects==null) aspects=new AspectList(); + try { + objectTags.put(Arrays.asList(item.getItem(),meta), aspects); + } catch (Exception e) {} + } + + /** + * Used to assign apsects to the given ore dictionary item. + * @param oreDict the ore dictionary name + * @param aspects A ObjectTags object of the associated aspects + */ + public static void registerObjectTag(String oreDict, AspectList aspects) { + if (aspects==null) aspects=new AspectList(); + ArrayList<ItemStack> ores = OreDictionary.getOres(oreDict); + if (ores!=null && ores.size()>0) { + for (ItemStack ore:ores) { + try { + objectTags.put(Arrays.asList(ore.getItem(), ore.getItemDamage()), aspects); + } catch (Exception e) {} + } + } + } + + /** + * Used to assign aspects to the given item/block. + * Attempts to automatically generate aspect tags by checking registered recipes. + * Here is an example of the declaration for pistons:<p> + * <i>ThaumcraftApi.registerComplexObjectTag(new ItemStack(Blocks.cobblestone), (new AspectList()).add(Aspect.MECHANISM, 2).add(Aspect.MOTION, 4));</i> + * @param item, pass OreDictionary.WILDCARD_VALUE to meta if all damage values of this item/block should have the same aspects + * @param aspects A ObjectTags object of the associated aspects + */ + public static void registerComplexObjectTag(ItemStack item, AspectList aspects ) { + if (!exists(item.getItem(),item.getItemDamage())) { + AspectList tmp = ThaumcraftApiHelper.generateTags(item.getItem(), item.getItemDamage()); + if (tmp != null && tmp.size()>0) { + for(Aspect tag:tmp.getAspects()) { + aspects.add(tag, tmp.getAmount(tag)); + } + } + registerObjectTag(item,aspects); + } else { + AspectList tmp = ThaumcraftApiHelper.getObjectAspects(item); + for(Aspect tag:aspects.getAspects()) { + tmp.merge(tag, tmp.getAmount(tag)); + } + registerObjectTag(item,tmp); + } + } + + //WARP /////////////////////////////////////////////////////////////////////////////////////// + private static HashMap<Object,Integer> warpMap = new HashMap<Object,Integer>(); + + /** + * This method is used to determine how much warp is gained if the item is crafted + * @param craftresult The item crafted + * @param amount how much warp is gained + */ + public static void addWarpToItem(ItemStack craftresult, int amount) { + warpMap.put(Arrays.asList(craftresult.getItem(),craftresult.getItemDamage()),amount); + } + + /** + * This method is used to determine how much warp is gained if the sent item is crafted + * @param in The item crafted + * @param amount how much warp is gained + */ + public static void addWarpToResearch(String research, int amount) { + warpMap.put(research, amount); + } + + /** + * Returns how much warp is gained from the item or research passed in + * @param in itemstack or string + * @return how much warp it will give + */ + public static int getWarp(Object in) { + if (in==null) return 0; + if (in instanceof ItemStack && warpMap.containsKey(Arrays.asList(((ItemStack)in).getItem(),((ItemStack)in).getItemDamage()))) { + return warpMap.get(Arrays.asList(((ItemStack)in).getItem(),((ItemStack)in).getItemDamage())); + } else + if (in instanceof String && warpMap.containsKey((String)in)) { + return warpMap.get((String)in); + } + return 0; + } + + //CROPS ////////////////////////////////////////////////////////////////////////////////////////// + + /** + * To define mod crops you need to use FMLInterModComms in your @Mod.Init method. + * There are two 'types' of crops you can add. Standard crops and clickable crops. + * + * Standard crops work like normal vanilla crops - they grow until a certain metadata + * value is reached and you harvest them by destroying the block and collecting the blocks. + * You need to create and ItemStack that tells the golem what block id and metadata represents + * the crop when fully grown. Sending a metadata of [OreDictionary.WILDCARD_VALUE] will mean the metadata won't get + * checked. + * Example for vanilla wheat: + * FMLInterModComms.sendMessage("Thaumcraft", "harvestStandardCrop", new ItemStack(Block.crops,1,7)); + * + * Clickable crops are crops that you right click to gather their bounty instead of destroying them. + * As for standard crops, you need to create and ItemStack that tells the golem what block id + * and metadata represents the crop when fully grown. The golem will trigger the blocks onBlockActivated method. + * Sending a metadata of [OreDictionary.WILDCARD_VALUE] will mean the metadata won't get checked. + * Example (this will technically do nothing since clicking wheat does nothing, but you get the idea): + * FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(Block.crops,1,7)); + * + * Stacked crops (like reeds) are crops that you wish the bottom block should remain after harvesting. + * As for standard crops, you need to create and ItemStack that tells the golem what block id + * and metadata represents the crop when fully grown. Sending a metadata of [OreDictionary.WILDCARD_VALUE] will mean the actualy md won't get + * checked. If it has the order upgrade it will only harvest if the crop is more than one block high. + * Example: + * FMLInterModComms.sendMessage("Thaumcraft", "harvestStackedCrop", new ItemStack(Block.reed,1,7)); + */ + + //NATIVE CLUSTERS ////////////////////////////////////////////////////////////////////////////////// + + /** + * You can define certain ores that will have a chance to produce native clusters via FMLInterModComms + * in your @Mod.Init method using the "nativeCluster" string message. + * The format should be: + * "[ore item/block id],[ore item/block metadata],[cluster item/block id],[cluster item/block metadata],[chance modifier float]" + * + * NOTE: The chance modifier is a multiplier applied to the default chance for that cluster to be produced (default 27.5% for a pickaxe of the core) + * + * Example for vanilla iron ore to produce one of my own native iron clusters (assuming default id's) at double the default chance: + * FMLInterModComms.sendMessage("Thaumcraft", "nativeCluster","15,0,25016,16,2.0"); + */ + + //LAMP OF GROWTH BLACKLIST /////////////////////////////////////////////////////////////////////////// + /** + * You can blacklist crops that should not be effected by the Lamp of Growth via FMLInterModComms + * in your @Mod.Init method using the "lampBlacklist" itemstack message. + * Sending a metadata of [OreDictionary.WILDCARD_VALUE] will mean the metadata won't get checked. + * Example for vanilla wheat: + * FMLInterModComms.sendMessage("Thaumcraft", "lampBlacklist", new ItemStack(Block.crops,1,OreDictionary.WILDCARD_VALUE)); + */ + + //DIMENSION BLACKLIST /////////////////////////////////////////////////////////////////////////// + /** + * You can blacklist a dimension to not spawn certain thaumcraft features + * in your @Mod.Init method using the "dimensionBlacklist" string message in the format "[dimension]:[level]" + * The level values are as follows: + * [0] stop all tc spawning and generation + * [1] allow ore and node generation + * [2] allow mob spawning + * [3] allow ore and node gen + mob spawning + * Example: + * FMLInterModComms.sendMessage("Thaumcraft", "dimensionBlacklist", "15:1"); + */ + + //BIOME BLACKLIST /////////////////////////////////////////////////////////////////////////// + /** + * You can blacklist a biome to not spawn certain thaumcraft features + * in your @Mod.Init method using the "biomeBlacklist" string message in the format "[biome id]:[level]" + * The level values are as follows: + * [0] stop all tc spawning and generation + * [1] allow ore and node generation + * [2] allow mob spawning + * [3] allow ore and node gen + mob spawning + * Example: + * FMLInterModComms.sendMessage("Thaumcraft", "biomeBlacklist", "180:2"); + */ +} diff --git a/src/api/java/thaumcraft/api/ThaumcraftApiHelper.java b/src/api/java/thaumcraft/api/ThaumcraftApiHelper.java new file mode 100644 index 00000000..a4b6d42a --- /dev/null +++ b/src/api/java/thaumcraft/api/ThaumcraftApiHelper.java @@ -0,0 +1,269 @@ +package thaumcraft.api; + +import java.lang.reflect.Method; +import java.util.HashMap; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.oredict.OreDictionary; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; +import thaumcraft.api.aspects.IEssentiaTransport; +import cpw.mods.fml.common.FMLLog; + +public class ThaumcraftApiHelper { + + public static AspectList cullTags(AspectList temp) { + AspectList temp2 = new AspectList(); + for (Aspect tag:temp.getAspects()) { + if (tag!=null) + temp2.add(tag, temp.getAmount(tag)); + } + while (temp2!=null && temp2.size()>10) { + Aspect lowest = null; + int low = Integer.MAX_VALUE; + for (Aspect tag:temp2.getAspects()) { + if (tag==null) continue; + if (temp2.getAmount(tag)<low) { + low = temp2.getAmount(tag); + lowest = tag; + } + } + temp2.aspects.remove(lowest); + } + return temp2; + } + + public static boolean areItemsEqual(ItemStack s1,ItemStack s2) + { + if (s1.isItemStackDamageable() && s2.isItemStackDamageable()) + { + return s1.getItem() == s2.getItem(); + } else + return s1.getItem() == s2.getItem() && s1.getItemDamage() == s2.getItemDamage(); + } + + static Method isResearchComplete; + static Method getObjectTags; + static Method getBonusTags; + static Method generateTags; + public static boolean isResearchComplete(String username, String researchkey) { + boolean ot = false; + try { + if(isResearchComplete == null) { + Class fake = Class.forName("thaumcraft.common.lib.research.ResearchManager"); + isResearchComplete = fake.getMethod("isResearchComplete", String.class, String.class); + } + ot = (Boolean) isResearchComplete.invoke(null, username, researchkey); + } catch(Exception ex) { + FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.research.ResearchManager method isResearchComplete"); + } + return ot; + } + + public static ItemStack getStackInRowAndColumn(Object instance, int row, int column) { + ItemStack ot = null; + try { + Class fake = Class.forName("thaumcraft.common.tiles.TileMagicWorkbench"); + Method getStackInRowAndColumn = fake.getMethod("getStackInRowAndColumn", int.class, int.class); + ot = (ItemStack) getStackInRowAndColumn.invoke(instance, row, column); + } catch(Exception ex) { + FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.tiles.TileMagicWorkbench method getStackInRowAndColumn"); + } + return ot; + } + + public static AspectList getObjectAspects(ItemStack is) { + AspectList ot = null; + try { + if(getObjectTags == null) { + Class fake = Class.forName("thaumcraft.common.lib.crafting.ThaumcraftCraftingManager"); + getObjectTags = fake.getMethod("getObjectTags", ItemStack.class); + } + ot = (AspectList) getObjectTags.invoke(null, is); + } catch(Exception ex) { + FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.crafting.ThaumcraftCraftingManager method getObjectTags"); + } + return ot; + } + + public static AspectList getBonusObjectTags(ItemStack is,AspectList ot) { + + try { + if(getBonusTags == null) { + Class fake = Class.forName("thaumcraft.common.lib.crafting.ThaumcraftCraftingManager"); + getBonusTags = fake.getMethod("getBonusTags", ItemStack.class, AspectList.class); + } + ot = (AspectList) getBonusTags.invoke(null, is, ot); + } catch(Exception ex) { + FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.crafting.ThaumcraftCraftingManager method getBonusTags"); + } + return ot; + } + + public static AspectList generateTags(Item item, int meta) { + try { + if(generateTags == null) { + Class fake = Class.forName("thaumcraft.common.lib.crafting.ThaumcraftCraftingManager"); + generateTags = fake.getMethod("generateTags", Item.class, int.class); + } + return (AspectList) generateTags.invoke(null, item, meta); + } catch(Exception ex) { + FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.crafting.ThaumcraftCraftingManager method generateTags"); + } + return null; + } + + public static boolean containsMatch(boolean strict, ItemStack[] inputs, ItemStack... targets) + { + for (ItemStack input : inputs) + { + for (ItemStack target : targets) + { + if (itemMatches(target, input, strict)) + { + return true; + } + } + } + return false; + } + + public static boolean itemMatches(ItemStack target, ItemStack input, boolean strict) + { + if (input == null && target != null || input != null && target == null) + { + return false; + } + return (target.getItem() == input.getItem() && + ((target.getItemDamage() == OreDictionary.WILDCARD_VALUE && !strict) || target.getItemDamage() == input.getItemDamage())); + } + + + public static TileEntity getConnectableTile(World world, int x, int y, int z, ForgeDirection face) { + TileEntity te = world.getTileEntity(x+face.offsetX, y+face.offsetY, z+face.offsetZ); + if (te instanceof IEssentiaTransport && ((IEssentiaTransport)te).isConnectable(face.getOpposite())) + return te; + else + return null; + } + + public static TileEntity getConnectableTile(IBlockAccess world, int x, int y, int z, ForgeDirection face) { + TileEntity te = world.getTileEntity(x+face.offsetX, y+face.offsetY, z+face.offsetZ); + if (te instanceof IEssentiaTransport && ((IEssentiaTransport)te).isConnectable(face.getOpposite())) + return te; + else + return null; + } + + private static HashMap<Integer, AspectList> allAspects= new HashMap<Integer, AspectList>(); + private static HashMap<Integer, AspectList> allCompoundAspects= new HashMap<Integer, AspectList>(); + + public static AspectList getAllAspects(int amount) { + if (allAspects.get(amount)==null) { + AspectList al = new AspectList(); + for (Aspect aspect:Aspect.aspects.values()) { + al.add(aspect, amount); + } + allAspects.put(amount, al); + } + return allAspects.get(amount); + } + + public static AspectList getAllCompoundAspects(int amount) { + if (allCompoundAspects.get(amount)==null) { + AspectList al = new AspectList(); + for (Aspect aspect:Aspect.getCompoundAspects()) { + al.add(aspect, amount); + } + allCompoundAspects.put(amount, al); + } + return allCompoundAspects.get(amount); + } + + static Method consumeVisFromWand; + /** + * Use to subtract vis from a wand for most operations + * Wands store vis differently so "real" vis costs need to be multiplied by 100 before calling this method + * @param wand the wand itemstack + * @param player the player using the wand + * @param cost the cost of the operation. + * @param doit actually subtract the vis from the wand if true - if false just simulate the result + * @param crafting is this a crafting operation or not - if + * false then things like frugal and potency will apply to the costs + * @return was the vis successfully subtracted + */ + public static boolean consumeVisFromWand(ItemStack wand, EntityPlayer player, + AspectList cost, boolean doit, boolean crafting) { + boolean ot = false; + try { + if(consumeVisFromWand == null) { + Class fake = Class.forName("thaumcraft.common.items.wands.ItemWandCasting"); + consumeVisFromWand = fake.getMethod("consumeAllVis", + ItemStack.class, EntityPlayer.class, AspectList.class, boolean.class, boolean.class); + } + ot = (Boolean) consumeVisFromWand.invoke( + consumeVisFromWand.getDeclaringClass().cast(wand.getItem()), wand, player, cost, doit, crafting); + } catch(Exception ex) { + FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.items.wands.ItemWandCasting method consumeAllVis"); + } + return ot; + } + + static Method consumeVisFromWandCrafting; + /** + * Subtract vis for use by a crafting mechanic. Costs are calculated slightly + * differently and things like the frugal enchant is ignored + * Must NOT be multiplied by 100 - send the actual vis cost + * @param wand the wand itemstack + * @param player the player using the wand + * @param cost the cost of the operation. + * @param doit actually subtract the vis from the wand if true - if false just simulate the result + * @return was the vis successfully subtracted + */ + public static boolean consumeVisFromWandCrafting(ItemStack wand, EntityPlayer player, + AspectList cost, boolean doit) { + boolean ot = false; + try { + if(consumeVisFromWandCrafting == null) { + Class fake = Class.forName("thaumcraft.common.items.wands.ItemWandCasting"); + consumeVisFromWandCrafting = fake.getMethod("consumeAllVisCrafting", + ItemStack.class, EntityPlayer.class, AspectList.class, boolean.class); + } + ot = (Boolean) consumeVisFromWandCrafting.invoke( + consumeVisFromWandCrafting.getDeclaringClass().cast(wand.getItem()), wand, player, cost, doit); + } catch(Exception ex) { + FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.items.wands.ItemWandCasting method consumeAllVisCrafting"); + } + return ot; + } + + static Method consumeVisFromInventory; + /** + * Subtract vis from a wand the player is carrying. Works like consumeVisFromWand in that actual vis + * costs should be multiplied by 100. The costs are handled like crafting however and things like + * frugal don't effect them + * @param player the player using the wand + * @param cost the cost of the operation. + * @return was the vis successfully subtracted + */ + public static boolean consumeVisFromInventory(EntityPlayer player, AspectList cost) { + boolean ot = false; + try { + if(consumeVisFromInventory == null) { + Class fake = Class.forName("thaumcraft.common.items.wands.WandManager"); + consumeVisFromInventory = fake.getMethod("consumeVisFromInventory", + EntityPlayer.class, AspectList.class); + } + ot = (Boolean) consumeVisFromInventory.invoke(null, player, cost); + } catch(Exception ex) { + FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.items.wands.WandManager method consumeVisFromInventory"); + } + return ot; + } +} diff --git a/src/api/java/thaumcraft/api/TileThaumcraft.java b/src/api/java/thaumcraft/api/TileThaumcraft.java new file mode 100644 index 00000000..56ccae87 --- /dev/null +++ b/src/api/java/thaumcraft/api/TileThaumcraft.java @@ -0,0 +1,63 @@ +package thaumcraft.api; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntity; + +/** + * + * @author azanor + * + * Custom tile entity class I use for most of my tile entities. Setup in such a way that only + * the nbt data within readCustomNBT / writeCustomNBT will be sent to the client when the tile + * updates. Apart from all the normal TE data that gets sent that is. + * + */ +public class TileThaumcraft extends TileEntity { + + //NBT stuff + + @Override + public void readFromNBT(NBTTagCompound nbttagcompound) + { + super.readFromNBT(nbttagcompound); + readCustomNBT(nbttagcompound); + } + + public void readCustomNBT(NBTTagCompound nbttagcompound) + { + //TODO + } + + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) + { + super.writeToNBT(nbttagcompound); + writeCustomNBT(nbttagcompound); + } + + public void writeCustomNBT(NBTTagCompound nbttagcompound) + { + //TODO + } + + //Client Packet stuff + @Override + public Packet getDescriptionPacket() { + NBTTagCompound nbttagcompound = new NBTTagCompound(); + this.writeCustomNBT(nbttagcompound); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, -999, nbttagcompound); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + super.onDataPacket(net, pkt); + this.readCustomNBT(pkt.func_148857_g()); + } + + + + +} diff --git a/src/api/java/thaumcraft/api/WorldCoordinates.java b/src/api/java/thaumcraft/api/WorldCoordinates.java new file mode 100644 index 00000000..6c620af5 --- /dev/null +++ b/src/api/java/thaumcraft/api/WorldCoordinates.java @@ -0,0 +1,117 @@ +package thaumcraft.api; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + +public class WorldCoordinates implements Comparable +{ + public int x; + + /** the y coordinate */ + public int y; + + /** the z coordinate */ + public int z; + + public int dim; + + public WorldCoordinates() {} + + public WorldCoordinates(int par1, int par2, int par3, int d) + { + this.x = par1; + this.y = par2; + this.z = par3; + this.dim = d; + } + + public WorldCoordinates(TileEntity tile) + { + this.x = tile.xCoord; + this.y = tile.yCoord; + this.z = tile.zCoord; + this.dim = tile.getWorldObj().provider.dimensionId; + } + + public WorldCoordinates(WorldCoordinates par1ChunkCoordinates) + { + this.x = par1ChunkCoordinates.x; + this.y = par1ChunkCoordinates.y; + this.z = par1ChunkCoordinates.z; + this.dim = par1ChunkCoordinates.dim; + } + + public boolean equals(Object par1Obj) + { + if (!(par1Obj instanceof WorldCoordinates)) + { + return false; + } + else + { + WorldCoordinates coordinates = (WorldCoordinates)par1Obj; + return this.x == coordinates.x && this.y == coordinates.y && this.z == coordinates.z && this.dim == coordinates.dim ; + } + } + + public int hashCode() + { + return this.x + this.y << 8 + this.z << 16 + this.dim << 24; + } + + /** + * Compare the coordinate with another coordinate + */ + public int compareWorldCoordinate(WorldCoordinates par1) + { + return this.dim == par1.dim ? ( + this.y == par1.y ? (this.z == par1.z ? this.x - par1.x : this.z - par1.z) : this.y - par1.y) : -1; + } + + public void set(int par1, int par2, int par3, int d) + { + this.x = par1; + this.y = par2; + this.z = par3; + this.dim = d; + } + + /** + * Returns the squared distance between this coordinates and the coordinates given as argument. + */ + public float getDistanceSquared(int par1, int par2, int par3) + { + float f = (float)(this.x - par1); + float f1 = (float)(this.y - par2); + float f2 = (float)(this.z - par3); + return f * f + f1 * f1 + f2 * f2; + } + + /** + * Return the squared distance between this coordinates and the ChunkCoordinates given as argument. + */ + public float getDistanceSquaredToWorldCoordinates(WorldCoordinates par1ChunkCoordinates) + { + return this.getDistanceSquared(par1ChunkCoordinates.x, par1ChunkCoordinates.y, par1ChunkCoordinates.z); + } + + public int compareTo(Object par1Obj) + { + return this.compareWorldCoordinate((WorldCoordinates)par1Obj); + } + + public void readNBT(NBTTagCompound nbt) { + this.x = nbt.getInteger("w_x"); + this.y = nbt.getInteger("w_y"); + this.z = nbt.getInteger("w_z"); + this.dim = nbt.getInteger("w_d"); + } + + public void writeNBT(NBTTagCompound nbt) { + nbt.setInteger("w_x",x); + nbt.setInteger("w_y",y); + nbt.setInteger("w_z",z); + nbt.setInteger("w_d",dim); + } + +} diff --git a/src/api/java/thaumcraft/api/aspects/Aspect.java b/src/api/java/thaumcraft/api/aspects/Aspect.java new file mode 100644 index 00000000..3c33a4a7 --- /dev/null +++ b/src/api/java/thaumcraft/api/aspects/Aspect.java @@ -0,0 +1,201 @@ +package thaumcraft.api.aspects; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.LinkedHashMap; + +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; + +import org.apache.commons.lang3.text.WordUtils; + +public class Aspect { + + String tag; + Aspect[] components; + int color; + private String chatcolor; + ResourceLocation image; + int blend; + + /** + * Use this constructor to register your own aspects. + * @param tag the key that will be used to reference this aspect, as well as its latin display name + * @param color color to display the tag in + * @param components the aspects this one is formed from + * @param image ResourceLocation pointing to a 32x32 icon of the aspect + * @param blend GL11 blendmode (1 or 771). Used for rendering nodes. Default is 1 + */ + public Aspect(String tag, int color, Aspect[] components, ResourceLocation image, int blend) { + if (aspects.containsKey(tag)) throw new IllegalArgumentException(tag+" already registered!"); + this.tag = tag; + this.components = components; + this.color = color; + this.image = image; + this.blend = blend; + aspects.put(tag, this); + } + + /** + * Shortcut constructor I use for the default aspects - you shouldn't be using this. + */ + public Aspect(String tag, int color, Aspect[] components) { + this(tag,color,components,new ResourceLocation("thaumcraft","textures/aspects/"+tag.toLowerCase()+".png"),1); + } + + /** + * Shortcut constructor I use for the default aspects - you shouldn't be using this. + */ + public Aspect(String tag, int color, Aspect[] components, int blend) { + this(tag,color,components,new ResourceLocation("thaumcraft","textures/aspects/"+tag.toLowerCase()+".png"),blend); + } + + /** + * Shortcut constructor I use for the primal aspects - + * you shouldn't use this as making your own primal aspects will break all the things. + */ + public Aspect(String tag, int color, String chatcolor, int blend) { + this(tag,color,(Aspect[])null, blend); + this.setChatcolor(chatcolor); + } + + public int getColor() { + return color; + } + + public String getName() { + return WordUtils.capitalizeFully(tag); + } + + public String getLocalizedDescription() { + return StatCollector.translateToLocal("tc.aspect."+tag); + } + + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public Aspect[] getComponents() { + return components; + } + + public void setComponents(Aspect[] components) { + this.components = components; + } + + public ResourceLocation getImage() { + return image; + } + + public static Aspect getAspect(String tag) { + return aspects.get(tag); + } + + public int getBlend() { + return blend; + } + + public void setBlend(int blend) { + this.blend = blend; + } + + public boolean isPrimal() { + return getComponents()==null || getComponents().length!=2; + } + + /////////////////////////////// + public static ArrayList<Aspect> getPrimalAspects() { + ArrayList<Aspect> primals = new ArrayList<Aspect>(); + Collection<Aspect> pa = aspects.values(); + for (Aspect aspect:pa) { + if (aspect.isPrimal()) primals.add(aspect); + } + return primals; + } + + public static ArrayList<Aspect> getCompoundAspects() { + ArrayList<Aspect> compounds = new ArrayList<Aspect>(); + Collection<Aspect> pa = aspects.values(); + for (Aspect aspect:pa) { + if (!aspect.isPrimal()) compounds.add(aspect); + } + return compounds; + } + + public String getChatcolor() { + return chatcolor; + } + + public void setChatcolor(String chatcolor) { + this.chatcolor = chatcolor; + } + + + /////////////////////////////// + public static LinkedHashMap<String,Aspect> aspects = new LinkedHashMap<String,Aspect>(); + + //PRIMAL + public static final Aspect AIR = new Aspect("aer",0xffff7e,"e",1); + public static final Aspect EARTH = new Aspect("terra",0x56c000,"2",1); + public static final Aspect FIRE = new Aspect("ignis",0xff5a01,"c",1); + public static final Aspect WATER = new Aspect("aqua",0x3cd4fc,"3",1); + public static final Aspect ORDER = new Aspect("ordo",0xd5d4ec,"7",1); + public static final Aspect ENTROPY = new Aspect("perditio",0x404040,"8",771); + + //SECONDARY + public static final Aspect VOID = new Aspect("vacuos",0x888888, new Aspect[] {AIR, ENTROPY},771); + public static final Aspect LIGHT = new Aspect("lux",0xfff663, new Aspect[] {AIR, FIRE}); + public static final Aspect WEATHER = new Aspect("tempestas",0xFFFFFF, new Aspect[] {AIR, WATER}); + public static final Aspect MOTION = new Aspect("motus",0xcdccf4, new Aspect[] {AIR, ORDER}); + public static final Aspect COLD = new Aspect("gelum",0xe1ffff, new Aspect[] {FIRE, ENTROPY}); + public static final Aspect CRYSTAL = new Aspect("vitreus",0x80ffff, new Aspect[] {EARTH, ORDER}); + public static final Aspect LIFE = new Aspect("victus",0xde0005, new Aspect[] {WATER, EARTH}); + public static final Aspect POISON = new Aspect("venenum",0x89f000, new Aspect[] {WATER, ENTROPY}); + public static final Aspect ENERGY = new Aspect("potentia",0xc0ffff, new Aspect[] {ORDER, FIRE}); + public static final Aspect EXCHANGE = new Aspect("permutatio",0x578357, new Aspect[] {ENTROPY, ORDER}); +// public static final Aspect ?? = new Aspect("??",0xcdccf4, new Aspect[] {AIR, EARTH}); +// public static final Aspect ?? = new Aspect("??",0xcdccf4, new Aspect[] {FIRE, EARTH}); +// public static final Aspect ?? = new Aspect("??",0xcdccf4, new Aspect[] {FIRE, WATER}); +// public static final Aspect ?? = new Aspect("??",0xcdccf4, new Aspect[] {ORDER, WATER}); +// public static final Aspect ?? = new Aspect("??",0xcdccf4, new Aspect[] {EARTH, ENTROPY}); + + //TERTIARY + public static final Aspect METAL = new Aspect("metallum",0xb5b5cd, new Aspect[] {EARTH, CRYSTAL}); + public static final Aspect DEATH = new Aspect("mortuus",0x887788, new Aspect[] {LIFE, ENTROPY}); + public static final Aspect FLIGHT = new Aspect("volatus",0xe7e7d7, new Aspect[] {AIR, MOTION}); + public static final Aspect DARKNESS = new Aspect("tenebrae",0x222222, new Aspect[] {VOID, LIGHT}); + public static final Aspect SOUL = new Aspect("spiritus",0xebebfb, new Aspect[] {LIFE, DEATH}); + public static final Aspect HEAL = new Aspect("sano",0xff2f34, new Aspect[] {LIFE, ORDER}); + public static final Aspect TRAVEL = new Aspect("iter",0xe0585b, new Aspect[] {MOTION, EARTH}); + public static final Aspect ELDRITCH = new Aspect("alienis",0x805080, new Aspect[] {VOID, DARKNESS}); + public static final Aspect MAGIC = new Aspect("praecantatio",0x9700c0, new Aspect[] {VOID, ENERGY}); + public static final Aspect AURA = new Aspect("auram",0xffc0ff, new Aspect[] {MAGIC, AIR}); + public static final Aspect TAINT = new Aspect("vitium",0x800080, new Aspect[] {MAGIC, ENTROPY}); + public static final Aspect SLIME = new Aspect("limus",0x01f800, new Aspect[] {LIFE, WATER}); + public static final Aspect PLANT = new Aspect("herba",0x01ac00, new Aspect[] {LIFE, EARTH}); + public static final Aspect TREE = new Aspect("arbor",0x876531, new Aspect[] {AIR, PLANT}); + public static final Aspect BEAST = new Aspect("bestia",0x9f6409, new Aspect[] {MOTION, LIFE}); + public static final Aspect FLESH = new Aspect("corpus",0xee478d, new Aspect[] {DEATH, BEAST}); + public static final Aspect UNDEAD = new Aspect("exanimis",0x3a4000, new Aspect[] {MOTION, DEATH}); + public static final Aspect MIND = new Aspect("cognitio",0xffc2b3, new Aspect[] {EARTH, SOUL}); + public static final Aspect SENSES = new Aspect("sensus",0x0fd9ff, new Aspect[] {AIR, SOUL}); + public static final Aspect MAN = new Aspect("humanus",0xffd7c0, new Aspect[] {BEAST, MIND}); + public static final Aspect CROP = new Aspect("messis",0xe1b371, new Aspect[] {PLANT, MAN}); + public static final Aspect MINE = new Aspect("perfodio",0xdcd2d8, new Aspect[] {MAN, EARTH}); + public static final Aspect TOOL = new Aspect("instrumentum",0x4040ee, new Aspect[] {MAN, ORDER}); + public static final Aspect HARVEST = new Aspect("meto",0xeead82, new Aspect[] {CROP, TOOL}); + public static final Aspect WEAPON = new Aspect("telum",0xc05050, new Aspect[] {TOOL, ENTROPY}); + public static final Aspect ARMOR = new Aspect("tutamen",0x00c0c0, new Aspect[] {TOOL, EARTH}); + public static final Aspect HUNGER = new Aspect("fames",0x9a0305, new Aspect[] {LIFE, VOID}); + public static final Aspect GREED = new Aspect("lucrum",0xe6be44, new Aspect[] {MAN, HUNGER}); + public static final Aspect CRAFT = new Aspect("fabrico",0x809d80, new Aspect[] {MAN, TOOL}); + public static final Aspect CLOTH = new Aspect("pannus",0xeaeac2, new Aspect[] {TOOL, BEAST}); + public static final Aspect MECHANISM = new Aspect("machina",0x8080a0, new Aspect[] {MOTION, TOOL}); + public static final Aspect TRAP = new Aspect("vinculum",0x9a8080, new Aspect[] {MOTION, ENTROPY}); + + +} diff --git a/src/api/java/thaumcraft/api/aspects/AspectList.java b/src/api/java/thaumcraft/api/aspects/AspectList.java new file mode 100644 index 00000000..6b9dfcef --- /dev/null +++ b/src/api/java/thaumcraft/api/aspects/AspectList.java @@ -0,0 +1,256 @@ +package thaumcraft.api.aspects; + +import java.io.Serializable; +import java.util.LinkedHashMap; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import thaumcraft.api.ThaumcraftApiHelper; + +public class AspectList implements Serializable { + + public LinkedHashMap<Aspect,Integer> aspects = new LinkedHashMap<Aspect,Integer>();//aspects associated with this object + + + /** + * this creates a new aspect list with preloaded values based off the aspects of the given item. + * @param the itemstack of the given item + */ + public AspectList(ItemStack stack) { + try { + AspectList temp = ThaumcraftApiHelper.getObjectAspects(stack); + if (temp!=null) + for (Aspect tag:temp.getAspects()) { + add(tag,temp.getAmount(tag)); + } + } catch (Exception e) {} + } + + public AspectList() { + } + + public AspectList copy() { + AspectList out = new AspectList(); + for (Aspect a:this.getAspects()) + out.add(a, this.getAmount(a)); + return out; + } + + /** + * @return the amount of different aspects in this collection + */ + public int size() { + return aspects.size(); + } + + /** + * @return the amount of total vis in this collection + */ + public int visSize() { + int q = 0; + + for (Aspect as:aspects.keySet()) { + q+=this.getAmount(as); + } + + return q; + } + + /** + * @return an array of all the aspects in this collection + */ + public Aspect[] getAspects() { + Aspect[] q = new Aspect[1]; + return aspects.keySet().toArray(q); + } + + /** + * @return an array of all the aspects in this collection + */ + public Aspect[] getPrimalAspects() { + AspectList t = new AspectList(); + for (Aspect as:aspects.keySet()) { + if (as.isPrimal()) { + t.add(as,1); + } + } + Aspect[] q = new Aspect[1]; + return t.aspects.keySet().toArray(q); + } + + /** + * @return an array of all the aspects in this collection sorted by name + */ + public Aspect[] getAspectsSorted() { + try { + Aspect[] out = aspects.keySet().toArray(new Aspect[1]); + boolean change=false; + do { + change=false; + for(int a=0;a<out.length-1;a++) { + Aspect e1 = out[a]; + Aspect e2 = out[a+1]; + if (e1!=null && e2!=null && e1.getTag().compareTo(e2.getTag())>0) { + out[a] = e2; + out[a+1] = e1; + change = true; + break; + } + } + } while (change==true); + return out; + } catch (Exception e) { + return this.getAspects(); + } + } + + /** + * @return an array of all the aspects in this collection sorted by amount + */ + public Aspect[] getAspectsSortedAmount() { + try { + Aspect[] out = aspects.keySet().toArray(new Aspect[1]); + boolean change=false; + do { + change=false; + for(int a=0;a<out.length-1;a++) { + int e1 = getAmount(out[a]); + int e2 = getAmount(out[a+1]); + if (e1>0 && e2>0 && e2>e1) { + Aspect ea = out[a]; + Aspect eb = out[a+1]; + out[a] = eb; + out[a+1] = ea; + change = true; + break; + } + } + } while (change==true); + return out; + } catch (Exception e) { + return this.getAspects(); + } + } + + /** + * @param key + * @return the amount associated with the given aspect in this collection + */ + public int getAmount(Aspect key) { + return aspects.get(key)==null?0:aspects.get(key); + } + + /** + * Reduces the amount of an aspect in this collection by the given amount. + * @param key + * @param amount + * @return + */ + public boolean reduce(Aspect key, int amount) { + if (getAmount(key)>=amount) { + int am = getAmount(key)-amount; + aspects.put(key, am); + return true; + } + return false; + } + + /** + * Reduces the amount of an aspect in this collection by the given amount. + * If reduced to 0 or less the aspect will be removed completely. + * @param key + * @param amount + * @return + */ + public AspectList remove(Aspect key, int amount) { + int am = getAmount(key)-amount; + if (am<=0) aspects.remove(key); else + this.aspects.put(key, am); + return this; + } + + /** + * Simply removes the aspect from the list + * @param key + * @param amount + * @return + */ + public AspectList remove(Aspect key) { + aspects.remove(key); + return this; + } + + /** + * Adds this aspect and amount to the collection. + * If the aspect exists then its value will be increased by the given amount. + * @param aspect + * @param amount + * @return + */ + public AspectList add(Aspect aspect, int amount) { + if (this.aspects.containsKey(aspect)) { + int oldamount = this.aspects.get(aspect); + amount+=oldamount; + } + this.aspects.put( aspect, amount ); + return this; + } + + + /** + * Adds this aspect and amount to the collection. + * If the aspect exists then only the highest of the old or new amount will be used. + * @param aspect + * @param amount + * @return + */ + public AspectList merge(Aspect aspect, int amount) { + if (this.aspects.containsKey(aspect)) { + int oldamount = this.aspects.get(aspect); + if (amount<oldamount) amount=oldamount; + + } + this.aspects.put( aspect, amount ); + return this; + } + + /** + * Reads the list of aspects from nbt + * @param nbttagcompound + * @return + */ + public void readFromNBT(NBTTagCompound nbttagcompound) + { + aspects.clear(); + NBTTagList tlist = nbttagcompound.getTagList("Aspects",(byte)10); + for (int j = 0; j < tlist.tagCount(); j++) { + NBTTagCompound rs = (NBTTagCompound) tlist.getCompoundTagAt(j); + if (rs.hasKey("key")) { + add( Aspect.getAspect(rs.getString("key")), + rs.getInteger("amount")); + } + } + } + + /** + * Writes the list of aspects to nbt + * @param nbttagcompound + * @return + */ + public void writeToNBT(NBTTagCompound nbttagcompound) + { + NBTTagList tlist = new NBTTagList(); + nbttagcompound.setTag("Aspects", tlist); + for (Aspect aspect : getAspects()) + if (aspect != null) { + NBTTagCompound f = new NBTTagCompound(); + f.setString("key", aspect.getTag()); + f.setInteger("amount", getAmount(aspect)); + tlist.appendTag(f); + } + } + + + +} diff --git a/src/api/java/thaumcraft/api/aspects/AspectSourceHelper.java b/src/api/java/thaumcraft/api/aspects/AspectSourceHelper.java new file mode 100644 index 00000000..f22d8ce5 --- /dev/null +++ b/src/api/java/thaumcraft/api/aspects/AspectSourceHelper.java @@ -0,0 +1,58 @@ +package thaumcraft.api.aspects; + +import java.lang.reflect.Method; + +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import cpw.mods.fml.common.FMLLog; + +public class AspectSourceHelper { + + static Method drainEssentia; + static Method findEssentia; + /** + * This method is what is used to drain essentia from jars and other sources for things like + * infusion crafting or powering the arcane furnace. A record of possible sources are kept track of + * and refreshed as needed around the calling tile entity. This also renders the essentia trail particles. + * Only 1 essentia is drained at a time + * @param tile the tile entity that is draining the essentia + * @param aspect the aspect that you are looking for + * @param direction the direction from which you wish to drain. Forgedirection.Unknown simply seeks in all directions. + * @param range how many blocks you wish to search for essentia sources. + * @return boolean returns true if essentia was found and removed from a source. + */ + public static boolean drainEssentia(TileEntity tile, Aspect aspect, ForgeDirection direction, int range) { + try { + if(drainEssentia == null) { + Class fake = Class.forName("thaumcraft.common.lib.events.EssentiaHandler"); + drainEssentia = fake.getMethod("drainEssentia", TileEntity.class, Aspect.class, ForgeDirection.class, int.class); + } + return (Boolean) drainEssentia.invoke(null, tile, aspect, direction, range); + } catch(Exception ex) { + FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.events.EssentiaHandler method drainEssentia"); + } + return false; + } + + /** + * This method returns if there is any essentia of the passed type that can be drained. It in no way checks how + * much there is, only if an essentia container nearby contains at least 1 point worth. + * @param tile the tile entity that is checking the essentia + * @param aspect the aspect that you are looking for + * @param direction the direction from which you wish to drain. Forgedirection.Unknown simply seeks in all directions. + * @param range how many blocks you wish to search for essentia sources. + * @return boolean returns true if essentia was found and removed from a source. + */ + public static boolean findEssentia(TileEntity tile, Aspect aspect, ForgeDirection direction, int range) { + try { + if(findEssentia == null) { + Class fake = Class.forName("thaumcraft.common.lib.events.EssentiaHandler"); + findEssentia = fake.getMethod("findEssentia", TileEntity.class, Aspect.class, ForgeDirection.class, int.class); + } + return (Boolean) findEssentia.invoke(null, tile, aspect, direction, range); + } catch(Exception ex) { + FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.events.EssentiaHandler method findEssentia"); + } + return false; + } +} diff --git a/src/api/java/thaumcraft/api/aspects/IAspectContainer.java b/src/api/java/thaumcraft/api/aspects/IAspectContainer.java new file mode 100644 index 00000000..bb34ae81 --- /dev/null +++ b/src/api/java/thaumcraft/api/aspects/IAspectContainer.java @@ -0,0 +1,80 @@ +package thaumcraft.api.aspects; + + +/** + * + * @author azanor + * + * Used by blocks like the crucible and alembic to hold their aspects. + * Tiles extending this interface will have their aspects show up when viewed by goggles of revealing + * + */ +public interface IAspectContainer { + public AspectList getAspects(); + + + public void setAspects(AspectList aspects); + + + /** + * This method is used to determine of a specific aspect can be added to this container. + * @param tag + * @return true or false + */ + public boolean doesContainerAccept(Aspect tag); + + /** + * This method is used to add a certain amount of an aspect to the tile entity. + * @param tag + * @param amount + * @return the amount of aspect left over that could not be added. + */ + public int addToContainer(Aspect tag, int amount); + + /** + * Removes a certain amount of a specific aspect from the tile entity + * @param tag + * @param amount + * @return true if that amount of aspect was available and was removed + */ + public boolean takeFromContainer(Aspect tag, int amount); + + /** + * removes a bunch of different aspects and amounts from the tile entity. + * @param ot the ObjectTags object that contains the aspects and their amounts. + * @return true if all the aspects and their amounts were available and successfully removed + * + * Going away in the next major patch + */ + @Deprecated + public boolean takeFromContainer(AspectList ot); + + /** + * Checks if the tile entity contains the listed amount (or more) of the aspect + * @param tag + * @param amount + * @return + */ + public boolean doesContainerContainAmount(Aspect tag,int amount); + + /** + * Checks if the tile entity contains all the listed aspects and their amounts + * @param ot the ObjectTags object that contains the aspects and their amounts. + * @return + * + * Going away in the next major patch + */ + @Deprecated + public boolean doesContainerContain(AspectList ot); + + /** + * Returns how much of the aspect this tile entity contains + * @param tag + * @return the amount of that aspect found + */ + public int containerContains(Aspect tag); + +} + + + diff --git a/src/api/java/thaumcraft/api/aspects/IAspectSource.java b/src/api/java/thaumcraft/api/aspects/IAspectSource.java new file mode 100644 index 00000000..c01f569d --- /dev/null +++ b/src/api/java/thaumcraft/api/aspects/IAspectSource.java @@ -0,0 +1,16 @@ +package thaumcraft.api.aspects; + + + +/** + * @author Azanor + * + * This interface is implemented by tile entites (or possibly anything else) like jars + * so that they can act as an essentia source for blocks like the infusion altar. + * + */ +public interface IAspectSource extends IAspectContainer { + + + +} diff --git a/src/api/java/thaumcraft/api/aspects/IEssentiaContainerItem.java b/src/api/java/thaumcraft/api/aspects/IEssentiaContainerItem.java new file mode 100644 index 00000000..f92a7de4 --- /dev/null +++ b/src/api/java/thaumcraft/api/aspects/IEssentiaContainerItem.java @@ -0,0 +1,36 @@ +package thaumcraft.api.aspects; + +import net.minecraft.item.ItemStack; + +/** + * + * @author azanor + * + * Used by wispy essences and essentia phials to hold their aspects. + * Useful for similar item containers that store their aspect information in nbt form so TC + * automatically picks up the aspects they contain + * + */ +public interface IEssentiaContainerItem { + public AspectList getAspects(ItemStack itemstack); + public void setAspects(ItemStack itemstack, AspectList aspects); +} + +//Example implementation +/* + @Override + public AspectList getAspects(ItemStack itemstack) { + if (itemstack.hasTagCompound()) { + AspectList aspects = new AspectList(); + aspects.readFromNBT(itemstack.getTagCompound()); + return aspects.size()>0?aspects:null; + } + return null; + } + + @Override + public void setAspects(ItemStack itemstack, AspectList aspects) { + if (!itemstack.hasTagCompound()) itemstack.setTagCompound(new NBTTagCompound()); + aspects.writeToNBT(itemstack.getTagCompound()); + } +*/ \ No newline at end of file diff --git a/src/api/java/thaumcraft/api/aspects/IEssentiaTransport.java b/src/api/java/thaumcraft/api/aspects/IEssentiaTransport.java new file mode 100644 index 00000000..fecbc160 --- /dev/null +++ b/src/api/java/thaumcraft/api/aspects/IEssentiaTransport.java @@ -0,0 +1,100 @@ +package thaumcraft.api.aspects; + +import net.minecraftforge.common.util.ForgeDirection; + + +/** + * @author Azanor + * This interface is used by tiles that use or transport vis. + * Only tiles that implement this interface will be able to connect to vis conduits or other thaumic devices + */ +public interface IEssentiaTransport { + /** + * Is this tile able to connect to other vis users/sources on the specified side? + * @param face + * @return + */ + public boolean isConnectable(ForgeDirection face); + + /** + * Is this side used to input essentia? + * @param face + * @return + */ + boolean canInputFrom(ForgeDirection face); + + /** + * Is this side used to output essentia? + * @param face + * @return + */ + boolean canOutputTo(ForgeDirection face); + + /** + * Sets the amount of suction this block will apply + * @param suction + */ + public void setSuction(Aspect aspect, int amount); + + /** + * Returns the type of suction this block is applying. + * @param loc + * the location from where the suction is being checked + * @return + * a return type of null indicates the suction is untyped and the first thing available will be drawn + */ + public Aspect getSuctionType(ForgeDirection face); + + /** + * Returns the strength of suction this block is applying. + * @param loc + * the location from where the suction is being checked + * @return + */ + public int getSuctionAmount(ForgeDirection face); + + /** + * remove the specified amount of essentia from this transport tile + * @return how much was actually taken + */ + public int takeEssentia(Aspect aspect, int amount, ForgeDirection face); + + /** + * add the specified amount of essentia to this transport tile + * @return how much was actually added + */ + public int addEssentia(Aspect aspect, int amount, ForgeDirection face); + + /** + * What type of essentia this contains + * @param face + * @return + */ + public Aspect getEssentiaType(ForgeDirection face); + + /** + * How much essentia this block contains + * @param face + * @return + */ + public int getEssentiaAmount(ForgeDirection face); + + + + /** + * Essentia will not be drawn from this container unless the suction exceeds this amount. + * @return the amount + */ + public int getMinimumSuction(); + + /** + * Return true if you want the conduit to extend a little further into the block. + * Used by jars and alembics that have smaller than normal hitboxes + * @return + */ + boolean renderExtendedTube(); + + + +} + diff --git a/src/api/java/thaumcraft/api/crafting/CrucibleRecipe.java b/src/api/java/thaumcraft/api/crafting/CrucibleRecipe.java new file mode 100644 index 00000000..9c1e8a62 --- /dev/null +++ b/src/api/java/thaumcraft/api/crafting/CrucibleRecipe.java @@ -0,0 +1,95 @@ +package thaumcraft.api.crafting; + +import java.util.ArrayList; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; +import thaumcraft.api.ThaumcraftApiHelper; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; + +public class CrucibleRecipe { + + private ItemStack recipeOutput; + + + public Object catalyst; + public AspectList aspects; + public String key; + + public CrucibleRecipe(String researchKey, ItemStack result, Object cat, AspectList tags) { + recipeOutput = result; + this.aspects = tags; + this.key = researchKey; + this.catalyst = cat; + if (cat instanceof String) { + this.catalyst = OreDictionary.getOres((String) cat); + } + } + + + public boolean matches(AspectList itags, ItemStack cat) { + if (catalyst instanceof ItemStack && + !ThaumcraftApiHelper.itemMatches((ItemStack) catalyst,cat,false)) { + return false; + } else + if (catalyst instanceof ArrayList && ((ArrayList<ItemStack>)catalyst).size()>0) { + ItemStack[] ores = ((ArrayList<ItemStack>)catalyst).toArray(new ItemStack[]{}); + if (!ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{cat},ores)) return false; + } + if (itags==null) return false; + for (Aspect tag:aspects.getAspects()) { + if (itags.getAmount(tag)<aspects.getAmount(tag)) return false; + } + return true; + } + + public boolean catalystMatches(ItemStack cat) { + if (catalyst instanceof ItemStack && ThaumcraftApiHelper.itemMatches((ItemStack) catalyst,cat,false)) { + return true; + } else + if (catalyst instanceof ArrayList && ((ArrayList<ItemStack>)catalyst).size()>0) { + ItemStack[] ores = ((ArrayList<ItemStack>)catalyst).toArray(new ItemStack[]{}); + if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{cat},ores)) return true; + } + return false; + } + + public AspectList removeMatching(AspectList itags) { + AspectList temptags = new AspectList(); + temptags.aspects.putAll(itags.aspects); + + for (Aspect tag:aspects.getAspects()) { + temptags.remove(tag, aspects.getAmount(tag)); +// if (!temptags.remove(tag, aspects.getAmount(tag))) return null; + } + + itags = temptags; + return itags; + } + + public ItemStack getRecipeOutput() { + return recipeOutput; + } + + +// @Override +// public int hashCode() { +// String hash = ""; +// if (catalyst instanceof ItemStack) { +// hash += ((ItemStack)catalyst).toString(); +// } else if (catalyst instanceof ArrayList && ((ArrayList<ItemStack>)catalyst).size()>0) { +// for (ItemStack s:(ArrayList<ItemStack>)catalyst) { +// hash += s.toString(); +// } +// } else { +// hash += catalyst.hashCode(); +// } +// hash += getRecipeOutput().toString(); +// for (Aspect a:aspects.getAspectsSorted()) { +// hash += a.getTag() + aspects.getAmount(a); +// } +// return hash.hashCode(); +// } + +} diff --git a/src/api/java/thaumcraft/api/crafting/IArcaneRecipe.java b/src/api/java/thaumcraft/api/crafting/IArcaneRecipe.java new file mode 100644 index 00000000..bb5036d2 --- /dev/null +++ b/src/api/java/thaumcraft/api/crafting/IArcaneRecipe.java @@ -0,0 +1,35 @@ +package thaumcraft.api.crafting; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import thaumcraft.api.aspects.AspectList; + +public interface IArcaneRecipe +{ + + + /** + * Used to check if a recipe matches current crafting inventory + * @param player + */ + boolean matches(IInventory var1, World world, EntityPlayer player); + + /** + * Returns an Item that is the result of this recipe + */ + ItemStack getCraftingResult(IInventory var1); + + /** + * Returns the size of the recipe area + */ + int getRecipeSize(); + + ItemStack getRecipeOutput(); + AspectList getAspects(); + AspectList getAspects(IInventory var1); + String getResearch(); + + +} diff --git a/src/api/java/thaumcraft/api/crafting/IInfusionStabiliser.java b/src/api/java/thaumcraft/api/crafting/IInfusionStabiliser.java new file mode 100644 index 00000000..d137ff24 --- /dev/null +++ b/src/api/java/thaumcraft/api/crafting/IInfusionStabiliser.java @@ -0,0 +1,19 @@ +package thaumcraft.api.crafting; + +import net.minecraft.world.World; + +/** + * + * @author Azanor + * + * Blocks that implement this interface act as infusion crafting stabilisers like candles and skulls + * + */ +public interface IInfusionStabiliser { + + /** + * returns true if the block can stabilise things + */ + public boolean canStabaliseInfusion(World world, int x, int y, int z); + +} diff --git a/src/api/java/thaumcraft/api/crafting/InfusionEnchantmentRecipe.java b/src/api/java/thaumcraft/api/crafting/InfusionEnchantmentRecipe.java new file mode 100644 index 00000000..6fb4d63d --- /dev/null +++ b/src/api/java/thaumcraft/api/crafting/InfusionEnchantmentRecipe.java @@ -0,0 +1,156 @@ +package thaumcraft.api.crafting; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.Map; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.oredict.OreDictionary; +import thaumcraft.api.ThaumcraftApiHelper; +import thaumcraft.api.aspects.AspectList; + +public class InfusionEnchantmentRecipe +{ + + public AspectList aspects; + public String research; + public ItemStack[] components; + public Enchantment enchantment; + public int recipeXP; + public int instability; + + public InfusionEnchantmentRecipe(String research, Enchantment input, int inst, + AspectList aspects2, ItemStack[] recipe) { + this.research = research; + this.enchantment = input; + this.aspects = aspects2; + this.components = recipe; + this.instability = inst; + this.recipeXP = Math.max(1, input.getMinEnchantability(1)/3); + } + + /** + * Used to check if a recipe matches current crafting inventory + * @param player + */ + public boolean matches(ArrayList<ItemStack> input, ItemStack central, World world, EntityPlayer player) { + if (research.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), research)) { + return false; + } + + if (!enchantment.canApply(central) || !central.getItem().isItemTool(central)) { + return false; + } + + Map map1 = EnchantmentHelper.getEnchantments(central); + Iterator iterator = map1.keySet().iterator(); + while (iterator.hasNext()) + { + int j1 = ((Integer)iterator.next()).intValue(); + Enchantment ench = Enchantment.enchantmentsList[j1]; + if (j1 == enchantment.effectId && + EnchantmentHelper.getEnchantmentLevel(j1, central)>=ench.getMaxLevel()) + return false; + if (enchantment.effectId != ench.effectId && + (!enchantment.canApplyTogether(ench) || + !ench.canApplyTogether(enchantment))) { + return false; + } + } + + ItemStack i2 = null; + + ArrayList<ItemStack> ii = new ArrayList<ItemStack>(); + for (ItemStack is:input) { + ii.add(is.copy()); + } + + for (ItemStack comp:components) { + boolean b=false; + for (int a=0;a<ii.size();a++) { + i2 = ii.get(a).copy(); + if (comp.getItemDamage()==OreDictionary.WILDCARD_VALUE) { + i2.setItemDamage(OreDictionary.WILDCARD_VALUE); + } + if (areItemStacksEqual(i2, comp,true)) { + ii.remove(a); + b=true; + break; + } + } + if (!b) return false; + } +// System.out.println(ii.size()); + return ii.size()==0?true:false; + } + + private boolean areItemStacksEqual(ItemStack stack0, ItemStack stack1, boolean fuzzy) + { + if (stack0==null && stack1!=null) return false; + if (stack0!=null && stack1==null) return false; + if (stack0==null && stack1==null) return true; + boolean t1=false; + if (fuzzy) { + t1=true; + int od = OreDictionary.getOreID(stack0); + if (od!=-1) { + ItemStack[] ores = OreDictionary.getOres(od).toArray(new ItemStack[]{}); + if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{stack1}, ores)) + return true; + } + } + else + t1=ItemStack.areItemStackTagsEqual(stack0, stack1); + return stack0.getItem() != stack1.getItem() ? false : (stack0.getItemDamage() != stack1.getItemDamage() ? false : (stack0.stackSize > stack0.getMaxStackSize() ? false : t1)); + } + + + public Enchantment getEnchantment() { + return enchantment; + + } + + public AspectList getAspects() { + return aspects; + + } + + public String getResearch() { + return research; + + } + + public int calcInstability(ItemStack recipeInput) { + int i = 0; + Map map1 = EnchantmentHelper.getEnchantments(recipeInput); + Iterator iterator = map1.keySet().iterator(); + while (iterator.hasNext()) + { + int j1 = ((Integer)iterator.next()).intValue(); + i += EnchantmentHelper.getEnchantmentLevel(j1, recipeInput); + } + return (i/2) + instability; + } + + public int calcXP(ItemStack recipeInput) { + return recipeXP * (1+EnchantmentHelper.getEnchantmentLevel(enchantment.effectId, recipeInput)); + } + + public float getEssentiaMod(ItemStack recipeInput) { + float mod = EnchantmentHelper.getEnchantmentLevel(enchantment.effectId, recipeInput); + Map map1 = EnchantmentHelper.getEnchantments(recipeInput); + Iterator iterator = map1.keySet().iterator(); + while (iterator.hasNext()) + { + int j1 = ((Integer)iterator.next()).intValue(); + if (j1 != enchantment.effectId) + mod += EnchantmentHelper.getEnchantmentLevel(j1, recipeInput) * .1f; + } + return mod; + } + +} diff --git a/src/api/java/thaumcraft/api/crafting/InfusionRecipe.java b/src/api/java/thaumcraft/api/crafting/InfusionRecipe.java new file mode 100644 index 00000000..fef0a347 --- /dev/null +++ b/src/api/java/thaumcraft/api/crafting/InfusionRecipe.java @@ -0,0 +1,128 @@ +package thaumcraft.api.crafting; + +import java.util.ArrayList; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.oredict.OreDictionary; +import thaumcraft.api.ThaumcraftApiHelper; +import thaumcraft.api.aspects.AspectList; + +public class InfusionRecipe +{ + protected AspectList aspects; + protected String research; + private ItemStack[] components; + private ItemStack recipeInput; + protected Object recipeOutput; + protected int instability; + + public InfusionRecipe(String research, Object output, int inst, + AspectList aspects2, ItemStack input, ItemStack[] recipe) { + this.research = research; + this.recipeOutput = output; + this.recipeInput = input; + this.aspects = aspects2; + this.components = recipe; + this.instability = inst; + } + + /** + * Used to check if a recipe matches current crafting inventory + * @param player + */ + public boolean matches(ArrayList<ItemStack> input, ItemStack central, World world, EntityPlayer player) { + if (getRecipeInput()==null) return false; + + if (research.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), research)) { + return false; + } + + ItemStack i2 = central.copy(); + if (getRecipeInput().getItemDamage()==OreDictionary.WILDCARD_VALUE) { + i2.setItemDamage(OreDictionary.WILDCARD_VALUE); + } + + if (!areItemStacksEqual(i2, getRecipeInput(), true)) return false; + + ArrayList<ItemStack> ii = new ArrayList<ItemStack>(); + for (ItemStack is:input) { + ii.add(is.copy()); + } + + for (ItemStack comp:getComponents()) { + boolean b=false; + for (int a=0;a<ii.size();a++) { + i2 = ii.get(a).copy(); + if (comp.getItemDamage()==OreDictionary.WILDCARD_VALUE) { + i2.setItemDamage(OreDictionary.WILDCARD_VALUE); + } + if (areItemStacksEqual(i2, comp,true)) { + ii.remove(a); + b=true; + break; + } + } + if (!b) return false; + } + return ii.size()==0?true:false; + } + + protected boolean areItemStacksEqual(ItemStack stack0, ItemStack stack1, boolean fuzzy) + { + if (stack0==null && stack1!=null) return false; + if (stack0!=null && stack1==null) return false; + if (stack0==null && stack1==null) return true; + boolean t1=false; + if (fuzzy) { + t1=true; + int od = OreDictionary.getOreID(stack0); + if (od!=-1) { + ItemStack[] ores = OreDictionary.getOres(od).toArray(new ItemStack[]{}); + if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{stack1}, ores)) + return true; + } + } + else + t1=ItemStack.areItemStackTagsEqual(stack0, stack1); + return stack0.getItem() != stack1.getItem() ? false : (stack0.getItemDamage() != stack1.getItemDamage() ? false : (stack0.stackSize > stack0.getMaxStackSize() ? false : t1)); + } + + + public Object getRecipeOutput() { + return getRecipeOutput(this.getRecipeInput()); + } + + public AspectList getAspects() { + return getAspects(this.getRecipeInput()); + } + + public int getInstability() { + return getInstability(this.getRecipeInput()); + } + + public String getResearch() { + return research; + } + + public ItemStack getRecipeInput() { + return recipeInput; + } + + public ItemStack[] getComponents() { + return components; + } + + public Object getRecipeOutput(ItemStack input) { + return recipeOutput; + } + + public AspectList getAspects(ItemStack input) { + return aspects; + } + + public int getInstability(ItemStack input) { + return instability; + } +} diff --git a/src/api/java/thaumcraft/api/crafting/ShapedArcaneRecipe.java b/src/api/java/thaumcraft/api/crafting/ShapedArcaneRecipe.java new file mode 100644 index 00000000..40c7bc27 --- /dev/null +++ b/src/api/java/thaumcraft/api/crafting/ShapedArcaneRecipe.java @@ -0,0 +1,261 @@ +package thaumcraft.api.crafting; + +import java.util.ArrayList; +import java.util.HashMap; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.oredict.OreDictionary; +import thaumcraft.api.ThaumcraftApiHelper; +import thaumcraft.api.aspects.AspectList; + +public class ShapedArcaneRecipe implements IArcaneRecipe +{ + //Added in for future ease of change, but hard coded for now. + private static final int MAX_CRAFT_GRID_WIDTH = 3; + private static final int MAX_CRAFT_GRID_HEIGHT = 3; + + public ItemStack output = null; + public Object[] input = null; + public AspectList aspects = null; + public String research; + public int width = 0; + public int height = 0; + private boolean mirrored = true; + + public ShapedArcaneRecipe(String research, Block result, AspectList aspects, Object... recipe){ this(research, new ItemStack(result), aspects, recipe); } + public ShapedArcaneRecipe(String research, Item result, AspectList aspects, Object... recipe){ this(research, new ItemStack(result), aspects, recipe); } + public ShapedArcaneRecipe(String research, ItemStack result, AspectList aspects, Object... recipe) + { + output = result.copy(); + this.research = research; + this.aspects = aspects; + String shape = ""; + + int idx = 0; + + if (recipe[idx] instanceof Boolean) + { + mirrored = (Boolean)recipe[idx]; + if (recipe[idx+1] instanceof Object[]) + { + recipe = (Object[])recipe[idx+1]; + } + else + { + idx = 1; + } + } + + if (recipe[idx] instanceof String[]) + { + String[] parts = ((String[])recipe[idx++]); + + for (String s : parts) + { + width = s.length(); + shape += s; + } + + height = parts.length; + } + else + { + while (recipe[idx] instanceof String) + { + String s = (String)recipe[idx++]; + shape += s; + width = s.length(); + height++; + } + } + + if (width * height != shape.length()) + { + String ret = "Invalid shaped ore recipe: "; + for (Object tmp : recipe) + { + ret += tmp + ", "; + } + ret += output; + throw new RuntimeException(ret); + } + + HashMap<Character, Object> itemMap = new HashMap<Character, Object>(); + + for (; idx < recipe.length; idx += 2) + { + Character chr = (Character)recipe[idx]; + Object in = recipe[idx + 1]; + + if (in instanceof ItemStack) + { + itemMap.put(chr, ((ItemStack)in).copy()); + } + else if (in instanceof Item) + { + itemMap.put(chr, new ItemStack((Item)in)); + } + else if (in instanceof Block) + { + itemMap.put(chr, new ItemStack((Block)in, 1, OreDictionary.WILDCARD_VALUE)); + } + else if (in instanceof String) + { + itemMap.put(chr, OreDictionary.getOres((String)in)); + } + else + { + String ret = "Invalid shaped ore recipe: "; + for (Object tmp : recipe) + { + ret += tmp + ", "; + } + ret += output; + throw new RuntimeException(ret); + } + } + + input = new Object[width * height]; + int x = 0; + for (char chr : shape.toCharArray()) + { + input[x++] = itemMap.get(chr); + } + } + + @Override + public ItemStack getCraftingResult(IInventory var1){ return output.copy(); } + + @Override + public int getRecipeSize(){ return input.length; } + + @Override + public ItemStack getRecipeOutput(){ return output; } + + @Override + public boolean matches(IInventory inv, World world, EntityPlayer player) + { + if (research.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), research)) { + return false; + } + for (int x = 0; x <= MAX_CRAFT_GRID_WIDTH - width; x++) + { + for (int y = 0; y <= MAX_CRAFT_GRID_HEIGHT - height; ++y) + { + if (checkMatch(inv, x, y, false)) + { + return true; + } + + if (mirrored && checkMatch(inv, x, y, true)) + { + return true; + } + } + } + + return false; + } + + private boolean checkMatch(IInventory inv, int startX, int startY, boolean mirror) + { + for (int x = 0; x < MAX_CRAFT_GRID_WIDTH; x++) + { + for (int y = 0; y < MAX_CRAFT_GRID_HEIGHT; y++) + { + int subX = x - startX; + int subY = y - startY; + Object target = null; + + if (subX >= 0 && subY >= 0 && subX < width && subY < height) + { + if (mirror) + { + target = input[width - subX - 1 + subY * width]; + } + else + { + target = input[subX + subY * width]; + } + } + + ItemStack slot = ThaumcraftApiHelper.getStackInRowAndColumn(inv, x, y); + + if (target instanceof ItemStack) + { + if (!checkItemEquals((ItemStack)target, slot)) + { + return false; + } + } + else if (target instanceof ArrayList) + { + boolean matched = false; + + for (ItemStack item : (ArrayList<ItemStack>)target) + { + matched = matched || checkItemEquals(item, slot); + } + + if (!matched) + { + return false; + } + } + else if (target == null && slot != null) + { + return false; + } + } + } + + return true; + } + + private boolean checkItemEquals(ItemStack target, ItemStack input) + { + if (input == null && target != null || input != null && target == null) + { + return false; + } + return (target.getItem() == input.getItem() && + (!target.hasTagCompound() || ItemStack.areItemStackTagsEqual(target, input)) && + (target.getItemDamage() == OreDictionary.WILDCARD_VALUE|| target.getItemDamage() == input.getItemDamage())); + } + + public ShapedArcaneRecipe setMirrored(boolean mirror) + { + mirrored = mirror; + return this; + } + + /** + * Returns the input for this recipe, any mod accessing this value should never + * manipulate the values in this array as it will effect the recipe itself. + * @return The recipes input vales. + */ + public Object[] getInput() + { + return this.input; + } + + @Override + public AspectList getAspects() { + return aspects; + } + + @Override + public AspectList getAspects(IInventory inv) { + return aspects; + } + + @Override + public String getResearch() { + return research; + } +} diff --git a/src/api/java/thaumcraft/api/crafting/ShapelessArcaneRecipe.java b/src/api/java/thaumcraft/api/crafting/ShapelessArcaneRecipe.java new file mode 100644 index 00000000..3d4ed508 --- /dev/null +++ b/src/api/java/thaumcraft/api/crafting/ShapelessArcaneRecipe.java @@ -0,0 +1,157 @@ +package thaumcraft.api.crafting; + +import java.util.ArrayList; +import java.util.Iterator; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.oredict.OreDictionary; +import thaumcraft.api.ThaumcraftApiHelper; +import thaumcraft.api.aspects.AspectList; + +public class ShapelessArcaneRecipe implements IArcaneRecipe +{ + private ItemStack output = null; + private ArrayList input = new ArrayList(); + + public AspectList aspects = null; + public String research; + + public ShapelessArcaneRecipe(String research, Block result, AspectList aspects, Object... recipe){ this(research,new ItemStack(result),aspects, recipe); } + public ShapelessArcaneRecipe(String research, Item result, AspectList aspects, Object... recipe){ this(research,new ItemStack(result),aspects, recipe); } + + public ShapelessArcaneRecipe(String research, ItemStack result, AspectList aspects, Object... recipe) + { + output = result.copy(); + this.research = research; + this.aspects = aspects; + for (Object in : recipe) + { + if (in instanceof ItemStack) + { + input.add(((ItemStack)in).copy()); + } + else if (in instanceof Item) + { + input.add(new ItemStack((Item)in)); + } + else if (in instanceof Block) + { + input.add(new ItemStack((Block)in)); + } + else if (in instanceof String) + { + input.add(OreDictionary.getOres((String)in)); + } + else + { + String ret = "Invalid shapeless ore recipe: "; + for (Object tmp : recipe) + { + ret += tmp + ", "; + } + ret += output; + throw new RuntimeException(ret); + } + } + } + + @Override + public int getRecipeSize(){ return input.size(); } + + @Override + public ItemStack getRecipeOutput(){ return output; } + + @Override + public ItemStack getCraftingResult(IInventory var1){ return output.copy(); } + + @Override + public boolean matches(IInventory var1, World world, EntityPlayer player) + { + if (research.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), research)) { + return false; + } + + ArrayList required = new ArrayList(input); + + for (int x = 0; x < 9; x++) + { + ItemStack slot = var1.getStackInSlot(x); + + if (slot != null) + { + boolean inRecipe = false; + Iterator req = required.iterator(); + + while (req.hasNext()) + { + boolean match = false; + + Object next = req.next(); + + if (next instanceof ItemStack) + { + match = checkItemEquals((ItemStack)next, slot); + } + else if (next instanceof ArrayList) + { + for (ItemStack item : (ArrayList<ItemStack>)next) + { + match = match || checkItemEquals(item, slot); + } + } + + if (match) + { + inRecipe = true; + required.remove(next); + break; + } + } + + if (!inRecipe) + { + return false; + } + } + } + + return required.isEmpty(); + } + + private boolean checkItemEquals(ItemStack target, ItemStack input) + { + return (target.getItem() == input.getItem() && + (!target.hasTagCompound() || ItemStack.areItemStackTagsEqual(target, input)) && + (target.getItemDamage() == OreDictionary.WILDCARD_VALUE || target.getItemDamage() == input.getItemDamage())); + } + + /** + * Returns the input for this recipe, any mod accessing this value should never + * manipulate the values in this array as it will effect the recipe itself. + * @return The recipes input vales. + */ + public ArrayList getInput() + { + return this.input; + } + + @Override + public AspectList getAspects() { + return aspects; + } + + @Override + public AspectList getAspects(IInventory inv) { + return aspects; + } + + @Override + public String getResearch() { + return research; + } +} diff --git a/src/api/java/thaumcraft/api/damagesource/DamageSourceIndirectThaumcraftEntity.java b/src/api/java/thaumcraft/api/damagesource/DamageSourceIndirectThaumcraftEntity.java new file mode 100644 index 00000000..1562d052 --- /dev/null +++ b/src/api/java/thaumcraft/api/damagesource/DamageSourceIndirectThaumcraftEntity.java @@ -0,0 +1,32 @@ +package thaumcraft.api.damagesource; + +import net.minecraft.entity.Entity; +import net.minecraft.util.DamageSource; +import net.minecraft.util.EntityDamageSourceIndirect; + +public class DamageSourceIndirectThaumcraftEntity extends EntityDamageSourceIndirect { + + private boolean fireDamage; + private float hungerDamage; + private boolean isUnblockable; + + + public DamageSourceIndirectThaumcraftEntity(String par1Str, + Entity par2Entity, Entity par3Entity) { + super(par1Str, par2Entity, par3Entity); + } + + + public DamageSource setFireDamage() + { + this.fireDamage = true; + return this; + } + + public DamageSource setDamageBypassesArmor() + { + this.isUnblockable = true; + this.hungerDamage = 0.0F; + return this; + } +} diff --git a/src/api/java/thaumcraft/api/damagesource/DamageSourceThaumcraft.java b/src/api/java/thaumcraft/api/damagesource/DamageSourceThaumcraft.java new file mode 100644 index 00000000..7c277f28 --- /dev/null +++ b/src/api/java/thaumcraft/api/damagesource/DamageSourceThaumcraft.java @@ -0,0 +1,46 @@ +package thaumcraft.api.damagesource; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.DamageSource; +import net.minecraft.util.EntityDamageSource; + +public class DamageSourceThaumcraft extends DamageSource +{ + + public static DamageSource taint = new DamageSourceThaumcraft("taint").setDamageBypassesArmor().setMagicDamage(); + public static DamageSource tentacle = new DamageSourceThaumcraft("tentacle"); + public static DamageSource swarm = new DamageSourceThaumcraft("swarm"); + + protected DamageSourceThaumcraft(String par1Str) { + super(par1Str); + } + + /** This kind of damage can be blocked or not. */ + private boolean isUnblockable = false; + private boolean isDamageAllowedInCreativeMode = false; + private float hungerDamage = 0.3F; + + /** This kind of damage is based on fire or not. */ + private boolean fireDamage; + + /** This kind of damage is based on a projectile or not. */ + private boolean projectile; + + /** + * Whether this damage source will have its damage amount scaled based on the current difficulty. + */ + private boolean difficultyScaled; + private boolean magicDamage = false; + private boolean explosion = false; + + public static DamageSource causeSwarmDamage(EntityLivingBase par0EntityLiving) + { + return new EntityDamageSource("swarm", par0EntityLiving); + } + + public static DamageSource causeTentacleDamage(EntityLivingBase par0EntityLiving) + { + return new EntityDamageSource("tentacle", par0EntityLiving); + } + +} diff --git a/src/api/java/thaumcraft/api/entities/ITaintedMob.java b/src/api/java/thaumcraft/api/entities/ITaintedMob.java new file mode 100644 index 00000000..83fb1fcb --- /dev/null +++ b/src/api/java/thaumcraft/api/entities/ITaintedMob.java @@ -0,0 +1,5 @@ +package thaumcraft.api.entities; + +public interface ITaintedMob { + +} diff --git a/src/api/java/thaumcraft/api/nodes/INode.java b/src/api/java/thaumcraft/api/nodes/INode.java new file mode 100644 index 00000000..8c71414d --- /dev/null +++ b/src/api/java/thaumcraft/api/nodes/INode.java @@ -0,0 +1,53 @@ +package thaumcraft.api.nodes; + +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; +import thaumcraft.api.aspects.IAspectContainer; + +public interface INode extends IAspectContainer { + + /** + * Unique identifier to distinguish nodes. Normal node id's are based on world id and coordinates + * @return + */ + public String getId(); + + public AspectList getAspectsBase(); + + /** + * Return the type of node + * @return + */ + public NodeType getNodeType(); + + /** + * Set the type of node + * @return + */ + public void setNodeType(NodeType nodeType); + + /** + * Return the node modifier + * @return + */ + public void setNodeModifier(NodeModifier nodeModifier); + + /** + * Set the node modifier + * @return + */ + public NodeModifier getNodeModifier(); + + /** + * Return the maximum capacity of each aspect the node can hold + * @return + */ + public int getNodeVisBase(Aspect aspect); + + /** + * Set the maximum capacity of each aspect the node can hold + * @return + */ + public void setNodeVisBase(Aspect aspect, short nodeVisBase); + +} diff --git a/src/api/java/thaumcraft/api/nodes/IRevealer.java b/src/api/java/thaumcraft/api/nodes/IRevealer.java new file mode 100644 index 00000000..14a19b54 --- /dev/null +++ b/src/api/java/thaumcraft/api/nodes/IRevealer.java @@ -0,0 +1,22 @@ +package thaumcraft.api.nodes; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; + +/** + * + * @author Azanor + * + * Equipped head slot items that extend this class will make nodes visible in world. + * + */ + +public interface IRevealer { + + /* + * If this method returns true the nodes will be visible. + */ + public boolean showNodes(ItemStack itemstack, EntityLivingBase player); + + +} diff --git a/src/api/java/thaumcraft/api/nodes/NodeModifier.java b/src/api/java/thaumcraft/api/nodes/NodeModifier.java new file mode 100644 index 00000000..885b8678 --- /dev/null +++ b/src/api/java/thaumcraft/api/nodes/NodeModifier.java @@ -0,0 +1,6 @@ +package thaumcraft.api.nodes; + +public enum NodeModifier +{ + BRIGHT, PALE, FADING +} \ No newline at end of file diff --git a/src/api/java/thaumcraft/api/nodes/NodeType.java b/src/api/java/thaumcraft/api/nodes/NodeType.java new file mode 100644 index 00000000..355324b5 --- /dev/null +++ b/src/api/java/thaumcraft/api/nodes/NodeType.java @@ -0,0 +1,6 @@ +package thaumcraft.api.nodes; + +public enum NodeType +{ + NORMAL, UNSTABLE, DARK, TAINTED, HUNGRY, PURE +} \ No newline at end of file diff --git a/src/api/java/thaumcraft/api/package-info.java b/src/api/java/thaumcraft/api/package-info.java new file mode 100644 index 00000000..0de39267 --- /dev/null +++ b/src/api/java/thaumcraft/api/package-info.java @@ -0,0 +1,4 @@ +@API(owner = "Thaumcraft", apiVersion = "4.2.0.0", provides = "Thaumcraft|API") +package thaumcraft.api; + +import cpw.mods.fml.common.API; diff --git a/src/api/java/thaumcraft/api/potions/PotionFluxTaint.java b/src/api/java/thaumcraft/api/potions/PotionFluxTaint.java new file mode 100644 index 00000000..b718de4b --- /dev/null +++ b/src/api/java/thaumcraft/api/potions/PotionFluxTaint.java @@ -0,0 +1,67 @@ +package thaumcraft.api.potions; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; +import thaumcraft.api.damagesource.DamageSourceThaumcraft; +import thaumcraft.api.entities.ITaintedMob; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class PotionFluxTaint extends Potion +{ + public static PotionFluxTaint instance = null; // will be instantiated at runtime + private int statusIconIndex = -1; + + public PotionFluxTaint(int par1, boolean par2, int par3) + { + super(par1,par2,par3); + setIconIndex(0, 0); + } + + public static void init() + { + instance.setPotionName("potion.fluxtaint"); + instance.setIconIndex(3, 1); + instance.setEffectiveness(0.25D); + } + + @Override + public boolean isBadEffect() { + return true; + } + + @Override + @SideOnly(Side.CLIENT) + public int getStatusIconIndex() { + Minecraft.getMinecraft().renderEngine.bindTexture(rl); + return super.getStatusIconIndex(); + } + + ResourceLocation rl = new ResourceLocation("thaumcraft","textures/misc/potions.png"); + + @Override + public void performEffect(EntityLivingBase target, int par2) { + if (target instanceof ITaintedMob) { + target.heal(1); + } else + if (!target.isEntityUndead() && !(target instanceof EntityPlayer)) + { + target.attackEntityFrom(DamageSourceThaumcraft.taint, 1); + } + else + if (!target.isEntityUndead() && (target.getMaxHealth() > 1 || (target instanceof EntityPlayer))) + { + target.attackEntityFrom(DamageSourceThaumcraft.taint, 1); + } + } + + public boolean isReady(int par1, int par2) + { + int k = 40 >> par2; + return k > 0 ? par1 % k == 0 : true; + } + +} diff --git a/src/api/java/thaumcraft/api/research/IScanEventHandler.java b/src/api/java/thaumcraft/api/research/IScanEventHandler.java new file mode 100644 index 00000000..d0efac5f --- /dev/null +++ b/src/api/java/thaumcraft/api/research/IScanEventHandler.java @@ -0,0 +1,9 @@ +package thaumcraft.api.research; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public interface IScanEventHandler { + ScanResult scanPhenomena(ItemStack stack, World world, EntityPlayer player); +} diff --git a/src/api/java/thaumcraft/api/research/ResearchCategories.java b/src/api/java/thaumcraft/api/research/ResearchCategories.java new file mode 100644 index 00000000..82309b36 --- /dev/null +++ b/src/api/java/thaumcraft/api/research/ResearchCategories.java @@ -0,0 +1,101 @@ +package thaumcraft.api.research; + +import java.util.Collection; +import java.util.LinkedHashMap; + +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; + +import org.apache.logging.log4j.Level; + +import cpw.mods.fml.common.FMLLog; + +public class ResearchCategories { + + //Research + public static LinkedHashMap <String, ResearchCategoryList> researchCategories = new LinkedHashMap <String,ResearchCategoryList>(); + + /** + * @param key + * @return the research item linked to this key + */ + public static ResearchCategoryList getResearchList(String key) { + return researchCategories.get(key); + } + + /** + * @param key + * @return the name of the research category linked to this key. + * Must be stored as localization information in the LanguageRegistry. + */ + public static String getCategoryName(String key) { + return StatCollector.translateToLocal("tc.research_category."+key); + } + + /** + * @param key the research key + * @return the ResearchItem object. + */ + public static ResearchItem getResearch(String key) { + Collection rc = researchCategories.values(); + for (Object cat:rc) { + Collection rl = ((ResearchCategoryList)cat).research.values(); + for (Object ri:rl) { + if ((((ResearchItem)ri).key).equals(key)) return (ResearchItem)ri; + } + } + return null; + } + + /** + * This should only be done at the PostInit stage + * @param key the key used for this category + * @param icon the icon to be used for the research category tab + * @param background the resource location of the background image to use for this category + * @return the name of the research linked to this key + */ + public static void registerCategory(String key, ResourceLocation icon, ResourceLocation background) { + if (getResearchList(key)==null) { + ResearchCategoryList rl = new ResearchCategoryList(icon, background); + researchCategories.put(key, rl); + } + } + + public static void addResearch(ResearchItem ri) { + ResearchCategoryList rl = getResearchList(ri.category); + if (rl!=null && !rl.research.containsKey(ri.key)) { + + if (!ri.isVirtual()) { + for (ResearchItem rr:rl.research.values()) { + if (rr.displayColumn == ri.displayColumn && rr.displayRow == ri.displayRow) { + FMLLog.log(Level.FATAL, "[Thaumcraft] Research ["+ri.getName()+"] not added as it overlaps with existing research ["+rr.getName()+"]"); + return; + } + } + } + + + rl.research.put(ri.key, ri); + + if (ri.displayColumn < rl.minDisplayColumn) + { + rl.minDisplayColumn = ri.displayColumn; + } + + if (ri.displayRow < rl.minDisplayRow) + { + rl.minDisplayRow = ri.displayRow; + } + + if (ri.displayColumn > rl.maxDisplayColumn) + { + rl.maxDisplayColumn = ri.displayColumn; + } + + if (ri.displayRow > rl.maxDisplayRow) + { + rl.maxDisplayRow = ri.displayRow; + } + } + } +} diff --git a/src/api/java/thaumcraft/api/research/ResearchCategoryList.java b/src/api/java/thaumcraft/api/research/ResearchCategoryList.java new file mode 100644 index 00000000..7eed0101 --- /dev/null +++ b/src/api/java/thaumcraft/api/research/ResearchCategoryList.java @@ -0,0 +1,37 @@ +package thaumcraft.api.research; + +import java.util.HashMap; +import java.util.Map; + +import net.minecraft.util.ResourceLocation; + +public class ResearchCategoryList { + + /** Is the smallest column used on the GUI. */ + public int minDisplayColumn; + + /** Is the smallest row used on the GUI. */ + public int minDisplayRow; + + /** Is the biggest column used on the GUI. */ + public int maxDisplayColumn; + + /** Is the biggest row used on the GUI. */ + public int maxDisplayRow; + + /** display variables **/ + public ResourceLocation icon; + public ResourceLocation background; + + public ResearchCategoryList(ResourceLocation icon, ResourceLocation background) { + this.icon = icon; + this.background = background; + } + + //Research + public Map<String, ResearchItem> research = new HashMap<String,ResearchItem>(); + + + + +} diff --git a/src/api/java/thaumcraft/api/research/ResearchItem.java b/src/api/java/thaumcraft/api/research/ResearchItem.java new file mode 100644 index 00000000..55b3820c --- /dev/null +++ b/src/api/java/thaumcraft/api/research/ResearchItem.java @@ -0,0 +1,367 @@ +package thaumcraft.api.research; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; + +public class ResearchItem +{ + /** + * A short string used as a key for this research. Must be unique + */ + public final String key; + + /** + * A short string used as a reference to the research category to which this must be added. + */ + public final String category; + + /** + * The aspect tags and their values required to complete this research + */ + public final AspectList tags; + + /** + * This links to any research that needs to be completed before this research can be discovered or learnt. + */ + public String[] parents = null; + + /** + * Like parent above, but a line will not be displayed in the thaumonomicon linking them. Just used to prevent clutter. + */ + public String[] parentsHidden = null; + /** + * any research linked to this that will be unlocked automatically when this research is complete + */ + public String[] siblings = null; + + /** + * the horizontal position of the research icon + */ + public final int displayColumn; + + /** + * the vertical position of the research icon + */ + public final int displayRow; + + /** + * the icon to be used for this research + */ + public final ItemStack icon_item; + + /** + * the icon to be used for this research + */ + public final ResourceLocation icon_resource; + + /** + * How large the research grid is. Valid values are 1 to 3. + */ + private int complexity; + + /** + * Special research has a spiky border. Used for important research milestones. + */ + private boolean isSpecial; + + /** + * Research that can be directly purchased with RP in normal research difficulty. + */ + private boolean isSecondary; + + /** + * This indicates if the research should use a circular icon border. Usually used for "passive" research + * that doesn't have recipes and grants passive effects, or that unlock automatically. + */ + private boolean isRound; + + /** + * Stub research cannot be discovered by normal means, but can be unlocked via the sibling system. + */ + private boolean isStub; + + /** + * This indicated that the research is completely hidden and cannot be discovered by any + * player-controlled means. The recipes will never show up in the thaumonomicon. + * Usually used to unlock "hidden" recipes via sibling unlocking, like + * the various cap and rod combos for wands. + */ + private boolean isVirtual; + + @Deprecated + private boolean isLost; + + /** + * Concealed research does not display in the thaumonomicon until parent researches are discovered. + */ + private boolean isConcealed; + + /** + * Hidden research can only be discovered via scanning or knowledge fragments + */ + private boolean isHidden; + + /** + * These research items will automatically unlock for all players on game start + */ + private boolean isAutoUnlock; + + /** + * Scanning these items will have a chance of revealing hidden knowledge in the thaumonomicon + */ + private ItemStack[] itemTriggers; + + /** + * Scanning these entities will have a chance of revealing hidden knowledge in the thaumonomicon + */ + private String[] entityTriggers; + + /** + * Scanning things with these aspects will have a chance of revealing hidden knowledge in the thaumonomicon + */ + private Aspect[] aspectTriggers; + + private ResearchPage[] pages = null; + + public ResearchItem(String key, String category) + { + this.key = key; + this.category = category; + this.tags = new AspectList(); + this.icon_resource = null; + this.icon_item = null; + this.displayColumn = 0; + this.displayRow = 0; + this.setVirtual(); + + } + + public ResearchItem(String key, String category, AspectList tags, int col, int row, int complex, ResourceLocation icon) + { + this.key = key; + this.category = category; + this.tags = tags; + this.icon_resource = icon; + this.icon_item = null; + this.displayColumn = col; + this.displayRow = row; + this.complexity = complex; + if (complexity < 1) this.complexity = 1; + if (complexity > 3) this.complexity = 3; + } + + public ResearchItem(String key, String category, AspectList tags, int col, int row, int complex, ItemStack icon) + { + this.key = key; + this.category = category; + this.tags = tags; + this.icon_item = icon; + this.icon_resource = null; + this.displayColumn = col; + this.displayRow = row; + this.complexity = complex; + if (complexity < 1) this.complexity = 1; + if (complexity > 3) this.complexity = 3; + } + + public ResearchItem setSpecial() + { + this.isSpecial = true; + return this; + } + + public ResearchItem setStub() + { + this.isStub = true; + return this; + } + + @Deprecated + public ResearchItem setLost() + { + this.isLost = true; + return this; + } + + public ResearchItem setConcealed() + { + this.isConcealed = true; + return this; + } + + public ResearchItem setHidden() + { + this.isHidden = true; + return this; + } + + public ResearchItem setVirtual() + { + this.isVirtual = true; + return this; + } + + public ResearchItem setParents(String... par) + { + this.parents = par; + return this; + } + + + + public ResearchItem setParentsHidden(String... par) + { + this.parentsHidden = par; + return this; + } + + public ResearchItem setSiblings(String... sib) + { + this.siblings = sib; + return this; + } + + public ResearchItem setPages(ResearchPage... par) + { + this.pages = par; + return this; + } + + public ResearchPage[] getPages() { + return pages; + } + + public ResearchItem setItemTriggers(ItemStack... par) + { + this.itemTriggers = par; + return this; + } + + public ResearchItem setEntityTriggers(String... par) + { + this.entityTriggers = par; + return this; + } + + public ResearchItem setAspectTriggers(Aspect... par) + { + this.aspectTriggers = par; + return this; + } + + public ItemStack[] getItemTriggers() { + return itemTriggers; + } + + public String[] getEntityTriggers() { + return entityTriggers; + } + + public Aspect[] getAspectTriggers() { + return aspectTriggers; + } + + public ResearchItem registerResearchItem() + { + ResearchCategories.addResearch(this); + return this; + } + + public String getName() + { + return StatCollector.translateToLocal("tc.research_name."+key); + } + + public String getText() + { + return StatCollector.translateToLocal("tc.research_text."+key); + } + + public boolean isSpecial() + { + return this.isSpecial; + } + + public boolean isStub() + { + return this.isStub; + } + + @Deprecated + public boolean isLost() + { + return this.isLost; + } + + public boolean isConcealed() + { + return this.isConcealed; + } + + public boolean isHidden() + { + return this.isHidden; + } + + public boolean isVirtual() + { + return this.isVirtual; + } + + public boolean isAutoUnlock() { + return isAutoUnlock; + } + + public ResearchItem setAutoUnlock() + { + this.isAutoUnlock = true; + return this; + } + + public boolean isRound() { + return isRound; + } + + public ResearchItem setRound() { + this.isRound = true; + return this; + } + + public boolean isSecondary() { + return isSecondary; + } + + public ResearchItem setSecondary() { + this.isSecondary = true; + return this; + } + + public int getComplexity() { + return complexity; + } + + public ResearchItem setComplexity(int complexity) { + this.complexity = complexity; + return this; + } + + /** + * @return the aspect aspects ordinal with the highest value. Used to determine scroll color and similar things + */ + public Aspect getResearchPrimaryTag() { + Aspect aspect=null; + int highest=0; + if (tags!=null) + for (Aspect tag:tags.getAspects()) { + if (tags.getAmount(tag)>highest) { + aspect=tag; + highest=tags.getAmount(tag); + }; + } + return aspect; + } + +} diff --git a/src/api/java/thaumcraft/api/research/ResearchPage.java b/src/api/java/thaumcraft/api/research/ResearchPage.java new file mode 100644 index 00000000..fdada843 --- /dev/null +++ b/src/api/java/thaumcraft/api/research/ResearchPage.java @@ -0,0 +1,193 @@ +package thaumcraft.api.research; + +import java.util.List; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipes; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; +import thaumcraft.api.aspects.AspectList; +import thaumcraft.api.crafting.CrucibleRecipe; +import thaumcraft.api.crafting.IArcaneRecipe; +import thaumcraft.api.crafting.InfusionEnchantmentRecipe; +import thaumcraft.api.crafting.InfusionRecipe; + +public class ResearchPage { + public static enum PageType + { + TEXT, + TEXT_CONCEALED, + IMAGE, + CRUCIBLE_CRAFTING, + ARCANE_CRAFTING, + ASPECTS, + NORMAL_CRAFTING, + INFUSION_CRAFTING, + COMPOUND_CRAFTING, + INFUSION_ENCHANTMENT, + SMELTING + } + + public PageType type = PageType.TEXT; + + public String text=null; + public String research=null; + public ResourceLocation image=null; + public AspectList aspects=null; + public Object recipe=null; + public ItemStack recipeOutput=null; + + /** + * @param text this can (but does not have to) be a reference to a localization variable, not the actual text. + */ + public ResearchPage(String text) { + this.type = PageType.TEXT; + this.text = text; + } + + /** + * @param research this page will only be displayed if the player has discovered this research + * @param text this can (but does not have to) be a reference to a localization variable, not the actual text. + */ + public ResearchPage(String research, String text) { + this.type = PageType.TEXT_CONCEALED; + this.research = research; + this.text = text; + } + + /** + * @param recipe a vanilla crafting recipe. + */ + public ResearchPage(IRecipe recipe) { + this.type = PageType.NORMAL_CRAFTING; + this.recipe = recipe; + this.recipeOutput = recipe.getRecipeOutput(); + } + + /** + * @param recipe a collection of vanilla crafting recipes. + */ + public ResearchPage(IRecipe[] recipe) { + this.type = PageType.NORMAL_CRAFTING; + this.recipe = recipe; + } + + /** + * @param recipe a collection of arcane crafting recipes. + */ + public ResearchPage(IArcaneRecipe[] recipe) { + this.type = PageType.ARCANE_CRAFTING; + this.recipe = recipe; + } + + /** + * @param recipe a collection of arcane crafting recipes. + */ + public ResearchPage(CrucibleRecipe[] recipe) { + this.type = PageType.CRUCIBLE_CRAFTING; + this.recipe = recipe; + } + + /** + * @param recipe a collection of infusion crafting recipes. + */ + public ResearchPage(InfusionRecipe[] recipe) { + this.type = PageType.INFUSION_CRAFTING; + this.recipe = recipe; + } + + /** + * @param recipe a compound crafting recipe. + */ + public ResearchPage(List recipe) { + this.type = PageType.COMPOUND_CRAFTING; + this.recipe = recipe; + } + + /** + * @param recipe an arcane worktable crafting recipe. + */ + public ResearchPage(IArcaneRecipe recipe) { + this.type = PageType.ARCANE_CRAFTING; + this.recipe = recipe; + this.recipeOutput = recipe.getRecipeOutput(); + } + + /** + * @param recipe an alchemy crafting recipe. + */ + public ResearchPage(CrucibleRecipe recipe) { + this.type = PageType.CRUCIBLE_CRAFTING; + this.recipe = recipe; + this.recipeOutput = recipe.getRecipeOutput(); + } + + /** + * @param recipe a furnace smelting crafting recipe. + */ + public ResearchPage(ItemStack input) { + this.type = PageType.SMELTING; + this.recipe = input; + this.recipeOutput = FurnaceRecipes.smelting().getSmeltingResult(input); + } + + /** + * @param recipe an infusion crafting recipe. + */ + public ResearchPage(InfusionRecipe recipe) { + this.type = PageType.INFUSION_CRAFTING; + this.recipe = recipe; + if (recipe.getRecipeOutput() instanceof ItemStack) { + this.recipeOutput = (ItemStack) recipe.getRecipeOutput(); + } else { + this.recipeOutput = recipe.getRecipeInput(); + } + } + + /** + * @param recipe an infusion crafting recipe. + */ + public ResearchPage(InfusionEnchantmentRecipe recipe) { + this.type = PageType.INFUSION_ENCHANTMENT; + this.recipe = recipe; +// if (recipe.recipeOutput instanceof ItemStack) { +// this.recipeOutput = (ItemStack) recipe.recipeOutput; +// } else { +// this.recipeOutput = recipe.recipeInput; +// } + } + + /** + * @param image + * @param caption this can (but does not have to) be a reference to a localization variable, not the actual text. + */ + public ResearchPage(ResourceLocation image, String caption) { + this.type = PageType.IMAGE; + this.image = image; + this.text = caption; + } + + /** + * This function should really not be called directly - used internally + */ + public ResearchPage(AspectList as) { + this.type = PageType.ASPECTS; + this.aspects = as; + } + + /** + * returns a localized text of the text field (if one exists). Returns the text field itself otherwise. + * @return + */ + public String getTranslatedText() { + String ret=""; + if (text != null) { + ret = StatCollector.translateToLocal(text); + if (ret.isEmpty()) ret = text; + } + return ret; + } + + +} diff --git a/src/api/java/thaumcraft/api/research/ScanResult.java b/src/api/java/thaumcraft/api/research/ScanResult.java new file mode 100644 index 00000000..e1498f31 --- /dev/null +++ b/src/api/java/thaumcraft/api/research/ScanResult.java @@ -0,0 +1,39 @@ +package thaumcraft.api.research; + +import net.minecraft.entity.Entity; + +public class ScanResult { + public byte type = 0; //1=blocks,2=entities,3=phenomena + public int id; + public int meta; + public Entity entity; + public String phenomena; + + public ScanResult(byte type, int blockId, int blockMeta, Entity entity, + String phenomena) { + super(); + this.type = type; + this.id = blockId; + this.meta = blockMeta; + this.entity = entity; + this.phenomena = phenomena; + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof ScanResult) { + ScanResult sr = (ScanResult) obj; + if (type != sr.type) + return false; + if (type == 1 + && (id != sr.id || meta != sr.meta)) + return false; + if (type == 2 && entity.getEntityId() != sr.entity.getEntityId()) + return false; + if (type == 3 && !phenomena.equals(sr.phenomena)) + return false; + } + return true; + } + +} diff --git a/src/api/java/thaumcraft/api/visnet/TileVisNode.java b/src/api/java/thaumcraft/api/visnet/TileVisNode.java new file mode 100644 index 00000000..84b1400d --- /dev/null +++ b/src/api/java/thaumcraft/api/visnet/TileVisNode.java @@ -0,0 +1,188 @@ +package thaumcraft.api.visnet; + +import java.lang.ref.WeakReference; +import java.util.ArrayList; +import java.util.HashMap; + +import thaumcraft.api.TileThaumcraft; +import thaumcraft.api.WorldCoordinates; +import thaumcraft.api.aspects.Aspect; + +/** + * @author Azanor + * + * The tile entity used by nodes in the vis energy network. A node is either a source (like an aura node), + * a transport relay or vis receiver (like the infernal furnace). + * + */ +public abstract class TileVisNode extends TileThaumcraft { + + WeakReference<TileVisNode> parent = null; + ArrayList<WeakReference<TileVisNode>> children = new ArrayList<WeakReference<TileVisNode>>(); + + /** + * @return the WorldCoordinates location of where this node is located + */ + public WorldCoordinates getLocation() { + return new WorldCoordinates(this); + } + + /** + * @return the number of blocks away this node will check for parent nodes to connect to. + */ + public abstract int getRange(); + + /** + * @return true if this is the source or root node of the vis network. + */ + public abstract boolean isSource(); + + /** + * This method should never be called directly. Use VisNetHandler.drainVis() instead + * @param aspect what aspect to drain + * @param vis how much to drain + * @return how much was actually drained + */ + public int consumeVis(Aspect aspect, int vis) { + if (VisNetHandler.isNodeValid(getParent())) { + int out = getParent().get().consumeVis(aspect, vis); + if (out>0) { + triggerConsumeEffect(aspect); + } + return out; + } + return 0; + } + + public void removeThisNode() { + for (WeakReference<TileVisNode> n:getChildren()) { + if (n!=null && n.get()!=null) { + n.get().removeThisNode(); + } + } + + children = new ArrayList<WeakReference<TileVisNode>>(); + if (VisNetHandler.isNodeValid(this.getParent())) { + this.getParent().get().nodeRefresh=true; + } + this.setParent(null); + this.parentChanged(); + + if (this.isSource()) { + HashMap<WorldCoordinates, WeakReference<TileVisNode>> sourcelist = VisNetHandler.sources.get(worldObj.provider.dimensionId); + if (sourcelist==null) { + sourcelist = new HashMap<WorldCoordinates, WeakReference<TileVisNode>>(); + } + sourcelist.remove(getLocation()); + VisNetHandler.sources.put( worldObj.provider.dimensionId, sourcelist ); + } + + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + + + @Override + public void invalidate() { + removeThisNode(); + super.invalidate(); + } + + public void triggerConsumeEffect(Aspect aspect) { } + + /** + * @return + */ + public WeakReference<TileVisNode> getParent() { + return parent; + } + + /** + * @return + */ + public WeakReference<TileVisNode> getRootSource() { + return VisNetHandler.isNodeValid(getParent()) ? + getParent().get().getRootSource() : this.isSource() ? + new WeakReference(this) : null; + } + + /** + * @param parent + */ + public void setParent(WeakReference<TileVisNode> parent) { + this.parent = parent; + } + + /** + * @return + */ + public ArrayList<WeakReference<TileVisNode>> getChildren() { + return children; + } + + @Override + public boolean canUpdate() { + return true; + } + + protected int nodeCounter = 0; + private boolean nodeRegged = false; + public boolean nodeRefresh = false; + + @Override + public void updateEntity() { + + if (!worldObj.isRemote && ((nodeCounter++) % 40==0 || nodeRefresh)) { + //check for changes + if (!nodeRefresh && children.size()>0) { + for (WeakReference<TileVisNode> n:children) { + if (n==null || n.get()==null) { + nodeRefresh=true; + break; + } + } + } + + //refresh linked nodes + if (nodeRefresh) { + for (WeakReference<TileVisNode> n:children) { + if (n.get()!=null) { + n.get().nodeRefresh=true; + } + } + children.clear(); + parent=null; + } + + //redo stuff + if (isSource() && !nodeRegged) { + VisNetHandler.addSource(getWorldObj(), this); + nodeRegged = true; + } else + if (!isSource() && !VisNetHandler.isNodeValid(getParent())) { + setParent(VisNetHandler.addNode(getWorldObj(), this)); + nodeRefresh=true; + } + + if (nodeRefresh) { + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + parentChanged(); + } + nodeRefresh=false; + } + + } + + public void parentChanged() { } + + /** + * @return the type of shard this is attuned to: + * none -1, air 0, fire 1, water 2, earth 3, order 4, entropy 5 + * Should return -1 for most implementations + */ + public byte getAttunement() { + return -1; + } + + +} diff --git a/src/api/java/thaumcraft/api/visnet/VisNetHandler.java b/src/api/java/thaumcraft/api/visnet/VisNetHandler.java new file mode 100644 index 00000000..23e01ccf --- /dev/null +++ b/src/api/java/thaumcraft/api/visnet/VisNetHandler.java @@ -0,0 +1,284 @@ +package thaumcraft.api.visnet; + +import java.lang.ref.WeakReference; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.HashMap; + +import net.minecraft.world.World; +import thaumcraft.api.WorldCoordinates; +import thaumcraft.api.aspects.Aspect; +import cpw.mods.fml.common.FMLLog; + +public class VisNetHandler { + + // / NODE DRAINING + /** + * This method drains vis from a relay or source near the passed in + * location. The amount received can be less than the amount requested so + * take that into account. + * + * @param world + * @param x the x position of the draining block or entity + * @param y the y position of the draining block or entity + * @param z the z position of the draining block or entity + * @param aspect what aspect to drain + * @param vis how much to drain + * @return how much was actually drained + */ + public static int drainVis(World world, int x, int y, int z, Aspect aspect, int amount) { + + int drainedAmount = 0; + + WorldCoordinates drainer = new WorldCoordinates(x, y, z, + world.provider.dimensionId); + if (!nearbyNodes.containsKey(drainer)) { + calculateNearbyNodes(world, x, y, z); + } + + ArrayList<WeakReference<TileVisNode>> nodes = nearbyNodes.get(drainer); + if (nodes!=null && nodes.size()>0) + for (WeakReference<TileVisNode> noderef : nodes) { + + TileVisNode node = noderef.get(); + + if (node == null) continue; + + int a = node.consumeVis(aspect, amount); + drainedAmount += a; + amount -= a; + if (a>0) { + int color = Aspect.getPrimalAspects().indexOf(aspect); + generateVisEffect(world.provider.dimensionId, x, y, z, node.xCoord, node.yCoord, node.zCoord, color); + } + if (amount <= 0) { + break; + } + } + + return drainedAmount; + } + + static Method generateVisEffect; + public static void generateVisEffect(int dim, int x, int y, int z, int x2, int y2, int z2, int color) { + try { + if(generateVisEffect == null) { + Class fake = Class.forName("thaumcraft.common.lib.Utils"); + generateVisEffect = fake.getMethod("generateVisEffect", int.class, int.class, int.class, int.class, int.class, int.class, int.class, int.class); + } + generateVisEffect.invoke(null, dim, x,y,z,x2,y2,z2,color); + } catch(Exception ex) { + FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.Utils method generateVisEffect"); + } + } + + public static HashMap<Integer, HashMap<WorldCoordinates, WeakReference<TileVisNode>>> sources = new HashMap<Integer, HashMap<WorldCoordinates, WeakReference<TileVisNode>>>(); + + public static void addSource(World world, TileVisNode vs) { + HashMap<WorldCoordinates, WeakReference<TileVisNode>> sourcelist = sources + .get(world.provider.dimensionId); + if (sourcelist == null) { + sourcelist = new HashMap<WorldCoordinates, WeakReference<TileVisNode>>(); + } + sourcelist.put(vs.getLocation(), new WeakReference(vs)); + sources.put(world.provider.dimensionId, sourcelist); + nearbyNodes.clear(); + } + + public static boolean isNodeValid(WeakReference<TileVisNode> node) { + if (node == null || node.get() == null || node.get().isInvalid()) + return false; + return true; + } + + public static WeakReference<TileVisNode> addNode(World world, TileVisNode vn) { + WeakReference ref = new WeakReference(vn); + + HashMap<WorldCoordinates, WeakReference<TileVisNode>> sourcelist = sources + .get(world.provider.dimensionId); + if (sourcelist == null) { + sourcelist = new HashMap<WorldCoordinates, WeakReference<TileVisNode>>(); + return null; + } + + ArrayList<Object[]> nearby = new ArrayList<Object[]>(); + + for (WeakReference<TileVisNode> root : sourcelist.values()) { + if (!isNodeValid(root)) + continue; + + TileVisNode source = root.get(); + + float r = inRange(world, vn.getLocation(), source.getLocation(), + vn.getRange()); + if (r > 0) { + nearby.add(new Object[] { source, r - vn.getRange() * 2 }); + } + nearby = findClosestNodes(vn, source, nearby); + } + + float dist = Float.MAX_VALUE; + TileVisNode closest = null; + if (nearby.size() > 0) { + for (Object[] o : nearby) { + if ((Float) o[1] < dist) {// && canNodeBeSeen(vn,(TileVisNode) + // o[0])) { + dist = (Float) o[1]; + closest = (TileVisNode) o[0]; + } + } + } + if (closest != null) { + closest.getChildren().add(ref); + nearbyNodes.clear(); + return new WeakReference(closest); + } + + return null; + } + + public static ArrayList<Object[]> findClosestNodes(TileVisNode target, + TileVisNode root, ArrayList<Object[]> in) { + TileVisNode closestChild = null; + + for (WeakReference<TileVisNode> child : root.getChildren()) { + TileVisNode n = child.get(); + + if (n != null + && !n.equals(target) + && !n.equals(root) + && (target.getAttunement() == -1 || n.getAttunement() == -1 || n + .getAttunement() == target.getAttunement())) { + + float r2 = inRange(n.getWorldObj(), n.getLocation(), + target.getLocation(), target.getRange()); + if (r2 > 0) { + in.add(new Object[] { n, r2 }); + } + + in = findClosestNodes(target, n, in); + } + } + return in; + } + + private static float inRange(World world, WorldCoordinates cc1, + WorldCoordinates cc2, int range) { + float distance = cc1.getDistanceSquaredToWorldCoordinates(cc2); + return distance > range * range ? -1 : distance; + } + + private static HashMap<WorldCoordinates, ArrayList<WeakReference<TileVisNode>>> nearbyNodes = new HashMap<WorldCoordinates, ArrayList<WeakReference<TileVisNode>>>(); + + private static void calculateNearbyNodes(World world, int x, int y, int z) { + + HashMap<WorldCoordinates, WeakReference<TileVisNode>> sourcelist = sources + .get(world.provider.dimensionId); + if (sourcelist == null) { + sourcelist = new HashMap<WorldCoordinates, WeakReference<TileVisNode>>(); + return; + } + + ArrayList<WeakReference<TileVisNode>> cn = new ArrayList<WeakReference<TileVisNode>>(); + WorldCoordinates drainer = new WorldCoordinates(x, y, z, + world.provider.dimensionId); + + ArrayList<Object[]> nearby = new ArrayList<Object[]>(); + + for (WeakReference<TileVisNode> root : sourcelist.values()) { + + if (!isNodeValid(root)) + continue; + + TileVisNode source = root.get(); + + TileVisNode closest = null; + float range = Float.MAX_VALUE; + + float r = inRange(world, drainer, source.getLocation(), + source.getRange()); + if (r > 0) { + range = r; + closest = source; + } + + ArrayList<WeakReference<TileVisNode>> children = new ArrayList<WeakReference<TileVisNode>>(); + children = getAllChildren(source,children); + + for (WeakReference<TileVisNode> child : children) { + TileVisNode n = child.get(); + if (n != null && !n.equals(root)) { + + float r2 = inRange(n.getWorldObj(), n.getLocation(), + drainer, n.getRange()); + if (r2 > 0 && r2 < range) { + range = r2; + closest = n; + } + } + } + + if (closest != null) { + + cn.add(new WeakReference(closest)); + } + } + + nearbyNodes.put(drainer, cn); + } + + private static ArrayList<WeakReference<TileVisNode>> getAllChildren(TileVisNode source, ArrayList<WeakReference<TileVisNode>> list) { + for (WeakReference<TileVisNode> child : source.getChildren()) { + TileVisNode n = child.get(); + if (n != null) { + list.add(child); + list = getAllChildren(n,list); + } + } + return list; + } + + // public static boolean canNodeBeSeen(TileVisNode source,TileVisNode + // target) + // { + // double d = Math.sqrt(source.getDistanceFrom(target.xCoord, target.yCoord, + // target.zCoord)); + // double xd = (source.xCoord-target.xCoord) / d; + // double yd = (source.yCoord-target.yCoord) / d; + // double zd = (source.zCoord-target.zCoord) / d; + // return source.getWorldObj().rayTraceBlocks( + // SpellHelper.createVec3(source.xCoord-xd+.5+.5, source.yCoord-yd, + // source.zCoord-zd), + // SpellHelper.createVec3(target.xCoord+.5, target.yCoord+.5, + // target.zCoord+.5)) == null; + // } + + // public static HashMap<WorldCoordinates,WeakReference<TileVisNode>> + // noderef = new HashMap<WorldCoordinates,WeakReference<TileVisNode>>(); + // + // public static TileVisNode getClosestNodeWithinRadius(World world, int x, + // int y, int z, int radius) { + // TileVisNode out = null; + // WorldCoordinates wc = null; + // float cd = Float.MAX_VALUE; + // for (int sx = x - radius; sx <= x + radius; sx++) { + // for (int sy = y - radius; sy <= y + radius; sy++) { + // for (int sz = z - radius; sz <= z + radius; sz++) { + // wc = new WorldCoordinates(sx,sy,sz,world.provider.dimensionId); + // if (noderef.containsKey(wc)) { + // float d = wc.getDistanceSquared(x, y, z); + // if (d<radius*radius && noderef.get(wc).get()!=null && + // !noderef.get(wc).get().isReceiver() && + // isNodeValid(noderef.get(wc).get().getParent()) + // ) { + // out = noderef.get(wc).get(); + // cd = d; + // } + // } + // } + // } + // } + // return out; + // } + +} diff --git a/src/api/java/thaumcraft/api/wands/IWandFocus.java b/src/api/java/thaumcraft/api/wands/IWandFocus.java new file mode 100644 index 00000000..da4b9ae9 --- /dev/null +++ b/src/api/java/thaumcraft/api/wands/IWandFocus.java @@ -0,0 +1,64 @@ +package thaumcraft.api.wands; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; +import thaumcraft.api.aspects.AspectList; + + +public interface IWandFocus { + + public enum WandFocusAnimation { + WAVE, CHARGE; + } + + /** + * @return The color the focus should be changed to. + */ + public int getFocusColor(); + + /** + * @return An icon that will be drawn as a block inside the focus "block". + */ + IIcon getFocusDepthLayerIcon(); + + public IIcon getOrnament(); + + public WandFocusAnimation getAnimation(); + + /** + * Gets the amount of vis used per aspect per click or tick. This cost is actually listed as + * a hundredth of a single point of vis, so a cost of 100 will equal one vis per tick/click. + * It is returned as an AspectList to allow for multiple vis types in different ratios. + */ + public AspectList getVisCost(); + + public boolean isVisCostPerTick(); + + public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition); + + public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count); + + public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, EntityPlayer player, int count); + + /** + * Helper method to determine in what order foci should be iterated through when + * the user presses the 'change focus' keybinding. + * @return a string of characters that foci will be sorted against. + * For example AA00 will be placed before FG12 + * <br>As a guide build the sort string from two alphanumeric characters followed by + * two numeric characters based on... whatever. + */ + public String getSortingHelper(ItemStack itemstack); + + boolean onFocusBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player); + + public boolean acceptsEnchant(int id); + + + + + +} diff --git a/src/api/java/thaumcraft/api/wands/IWandRodOnUpdate.java b/src/api/java/thaumcraft/api/wands/IWandRodOnUpdate.java new file mode 100644 index 00000000..4ef8c849 --- /dev/null +++ b/src/api/java/thaumcraft/api/wands/IWandRodOnUpdate.java @@ -0,0 +1,16 @@ +package thaumcraft.api.wands; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + +/** + * + * @author azanor + * + * Implemented by a class that you wish to be called whenever a wand with this rod performs its + * update tick. + * + */ +public interface IWandRodOnUpdate { + void onUpdate(ItemStack itemstack, EntityPlayer player); +} diff --git a/src/api/java/thaumcraft/api/wands/IWandTriggerManager.java b/src/api/java/thaumcraft/api/wands/IWandTriggerManager.java new file mode 100644 index 00000000..47465552 --- /dev/null +++ b/src/api/java/thaumcraft/api/wands/IWandTriggerManager.java @@ -0,0 +1,12 @@ +package thaumcraft.api.wands; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public interface IWandTriggerManager { + + public boolean performTrigger(World world, ItemStack wand, EntityPlayer player, + int x, int y, int z, int side, int event); + +} diff --git a/src/api/java/thaumcraft/api/wands/IWandable.java b/src/api/java/thaumcraft/api/wands/IWandable.java new file mode 100644 index 00000000..aeb9bac7 --- /dev/null +++ b/src/api/java/thaumcraft/api/wands/IWandable.java @@ -0,0 +1,25 @@ +package thaumcraft.api.wands; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +/** + * + * @author azanor + * + * Add this to a tile entity that you wish wands to interact with in some way. + * + */ + +public interface IWandable { + + public int onWandRightClick(World world, ItemStack wandstack, EntityPlayer player, int x, int y, int z, int side, int md); + + public ItemStack onWandRightClick(World world, ItemStack wandstack, EntityPlayer player); + + public void onUsingWandTick(ItemStack wandstack, EntityPlayer player, int count); + + public void onWandStoppedUsing(ItemStack wandstack, World world, EntityPlayer player, int count); + +} diff --git a/src/api/java/thaumcraft/api/wands/ItemFocusBasic.java b/src/api/java/thaumcraft/api/wands/ItemFocusBasic.java new file mode 100644 index 00000000..35900520 --- /dev/null +++ b/src/api/java/thaumcraft/api/wands/ItemFocusBasic.java @@ -0,0 +1,166 @@ +package thaumcraft.api.wands; + +import java.text.DecimalFormat; +import java.util.List; +import java.util.Map; + +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import thaumcraft.api.ThaumcraftApi; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemFocusBasic extends Item implements IWandFocus { + + public ItemFocusBasic () + { + super(); + maxStackSize = 1; + canRepair=false; + this.setMaxDamage(0); + } + + public IIcon icon; + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIconFromDamage(int par1) { + return icon; + } + + @Override + public boolean isItemTool(ItemStack par1ItemStack) + { + return true; + } + + @Override + public boolean isDamageable() { + return true; + } + + @Override + public void addInformation(ItemStack stack,EntityPlayer player, List list, boolean par4) { + AspectList al = this.getVisCost(); + if (al!=null && al.size()>0) { + list.add(StatCollector.translateToLocal(isVisCostPerTick()?"item.Focus.cost2":"item.Focus.cost1")); + for (Aspect aspect:al.getAspectsSorted()) { + DecimalFormat myFormatter = new DecimalFormat("#####.##"); + String amount = myFormatter.format(al.getAmount(aspect)/100f); + list.add(" \u00A7"+aspect.getChatcolor()+aspect.getName()+"\u00A7r x "+ amount); + + } + } + } + + @Override + public int getItemEnchantability() { + return 5; + } + + @Override + public EnumRarity getRarity(ItemStack itemstack) + { + return EnumRarity.rare; + } + + + @Override + public int getFocusColor() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public AspectList getVisCost() { + // TODO Auto-generated method stub + return null; + } + + @Override + public ItemStack onFocusRightClick(ItemStack itemstack, World world, + EntityPlayer player, MovingObjectPosition movingobjectposition) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, + int count) { + // TODO Auto-generated method stub + } + + @Override + public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, + EntityPlayer player, int count) { + // TODO Auto-generated method stub + + } + + /** + * Just insert two alphanumeric characters before this string in your focus item class + */ + @Override + public String getSortingHelper(ItemStack itemstack) { + Map<Integer,Integer> ench = EnchantmentHelper.getEnchantments(itemstack); + String out=""; + for (Integer lvl:ench.values()) { + out = out + lvl + ""; + } + return out; + } + + @Override + public boolean isVisCostPerTick() { + return false; + } + + @Override + public IIcon getOrnament() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean onFocusBlockStartBreak(ItemStack itemstack, int x, int y, + int z, EntityPlayer player) { + // TODO Auto-generated method stub + return false; + } + + @Override + public WandFocusAnimation getAnimation() { + return WandFocusAnimation.WAVE; + } + + @Override + public IIcon getFocusDepthLayerIcon() { + // TODO Auto-generated method stub + return null; + } + + /** + * @see thaumcraft.api.wands.IWandFocus#acceptsEnchant(int) + * By default fortune is off for all wands + **/ + @Override + public boolean acceptsEnchant(int id) { + if (id==ThaumcraftApi.enchantFrugal|| + id==ThaumcraftApi.enchantPotency) return true; + return false; + } + + + + + +} diff --git a/src/api/java/thaumcraft/api/wands/StaffRod.java b/src/api/java/thaumcraft/api/wands/StaffRod.java new file mode 100644 index 00000000..e7ae90f0 --- /dev/null +++ b/src/api/java/thaumcraft/api/wands/StaffRod.java @@ -0,0 +1,48 @@ +package thaumcraft.api.wands; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; + +/** + * + * @author Azanor + * + * This class is used to keep the material information for the various rods. + * It is also used to generate the wand recipes ingame. + * + */ +public class StaffRod extends WandRod { + + boolean runes=false; + + public StaffRod(String tag, int capacity, ItemStack item, int craftCost) { + super(tag+"_staff", capacity, item, craftCost); + this.texture = new ResourceLocation("thaumcraft","textures/models/wand_rod_"+tag+".png"); + } + + public StaffRod(String tag, int capacity, ItemStack item, int craftCost, + IWandRodOnUpdate onUpdate, ResourceLocation texture) { + super(tag+"_staff", capacity, item, craftCost, onUpdate, texture); + } + + public StaffRod(String tag, int capacity, ItemStack item, int craftCost, + IWandRodOnUpdate onUpdate) { + super(tag+"_staff", capacity, item, craftCost, onUpdate); + this.texture = new ResourceLocation("thaumcraft","textures/models/wand_rod_"+tag+".png"); + } + + public StaffRod(String tag, int capacity, ItemStack item, int craftCost, + ResourceLocation texture) { + super(tag+"_staff", capacity, item, craftCost, texture); + } + + public boolean hasRunes() { + return runes; + } + + public void setRunes(boolean hasRunes) { + this.runes = hasRunes; + } + + +} diff --git a/src/api/java/thaumcraft/api/wands/WandCap.java b/src/api/java/thaumcraft/api/wands/WandCap.java new file mode 100644 index 00000000..17b4581c --- /dev/null +++ b/src/api/java/thaumcraft/api/wands/WandCap.java @@ -0,0 +1,129 @@ +package thaumcraft.api.wands; + +import java.util.LinkedHashMap; +import java.util.List; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import thaumcraft.api.aspects.Aspect; + +/** + * This class is used to keep the material information for the various caps. + * It is also used to generate the wand recipes ingame. + * @author Azanor + * + */ +public class WandCap { + + private String tag; + + /** + * Cost to craft this wand. Combined with the rod cost. + */ + private int craftCost; + + /** + * the amount by which all aspect costs are multiplied + */ + float baseCostModifier; + + /** + * specifies a list of primal aspects that use the special discount figure instead of the normal discount. + */ + List<Aspect> specialCostModifierAspects; + + /** + * the amount by which the specified aspect costs are multiplied + */ + float specialCostModifier; + + /** + * The texture that will be used for the ingame wand cap + */ + ResourceLocation texture; + + /** + * the actual item that makes up this cap and will be used to generate the wand recipes + */ + ItemStack item; + + public static LinkedHashMap<String,WandCap> caps = new LinkedHashMap<String,WandCap>(); + + public WandCap (String tag, float discount, ItemStack item, int craftCost) { + this.setTag(tag); + this.baseCostModifier = discount; + this.specialCostModifierAspects = null; + texture = new ResourceLocation("thaumcraft","textures/models/wand_cap_"+getTag()+".png"); + this.item=item; + this.setCraftCost(craftCost); + caps.put(tag, this); + } + + public WandCap (String tag, float discount, List<Aspect> specialAspects, float discountSpecial, ItemStack item, int craftCost) { + this.setTag(tag); + this.baseCostModifier = discount; + this.specialCostModifierAspects = specialAspects; + this.specialCostModifier = discountSpecial; + texture = new ResourceLocation("thaumcraft","textures/models/wand_cap_"+getTag()+".png"); + this.item=item; + this.setCraftCost(craftCost); + caps.put(tag, this); + } + + public float getBaseCostModifier() { + return baseCostModifier; + } + + public List<Aspect> getSpecialCostModifierAspects() { + return specialCostModifierAspects; + } + + public float getSpecialCostModifier() { + return specialCostModifier; + } + + public ResourceLocation getTexture() { + return texture; + } + + public void setTexture(ResourceLocation texture) { + this.texture = texture; + } + + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + + public ItemStack getItem() { + return item; + } + + public void setItem(ItemStack item) { + this.item = item; + } + + public int getCraftCost() { + return craftCost; + } + + public void setCraftCost(int craftCost) { + this.craftCost = craftCost; + } + + /** + * The research a player needs to have finished to be able to craft a wand with this cap. + */ + public String getResearch() { + return "CAP_"+getTag(); + } + + // Some examples: + // WandCap WAND_CAP_IRON = new WandCap("iron", 1.1f, Arrays.asList(Aspect.ORDER),1, new ItemStack(ConfigItems.itemWandCap,1,0),1); + // WandCap WAND_CAP_GOLD = new WandCap("gold", 1f, new ItemStack(ConfigItems.itemWandCap,1,1),3); + +} diff --git a/src/api/java/thaumcraft/api/wands/WandRod.java b/src/api/java/thaumcraft/api/wands/WandRod.java new file mode 100644 index 00000000..85954e46 --- /dev/null +++ b/src/api/java/thaumcraft/api/wands/WandRod.java @@ -0,0 +1,158 @@ +package thaumcraft.api.wands; + +import java.util.LinkedHashMap; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; + +/** + * + * @author Azanor + * + * This class is used to keep the material information for the various rods. + * It is also used to generate the wand recipes ingame. + * + */ +public class WandRod { + + + private String tag; + + /** + * Cost to craft this wand. Combined with the rod cost. + */ + private int craftCost; + + /** + * The amount of vis that can be stored - this number is actually multiplied + * by 100 for use by the wands internals + */ + int capacity; + + /** + * The texture that will be used for the ingame wand rod + */ + protected ResourceLocation texture; + + /** + * the actual item that makes up this rod and will be used to generate the wand recipes + */ + ItemStack item; + + /** + * A class that will be called whenever the wand onUpdate tick is run + */ + IWandRodOnUpdate onUpdate; + + /** + * Does the rod glow in the dark? + */ + boolean glow; + + public static LinkedHashMap<String,WandRod> rods = new LinkedHashMap<String,WandRod>(); + + public WandRod (String tag, int capacity, ItemStack item, int craftCost, ResourceLocation texture) { + this.setTag(tag); + this.capacity = capacity; + this.texture = texture; + this.item=item; + this.setCraftCost(craftCost); + rods.put(tag, this); + } + + public WandRod (String tag, int capacity, ItemStack item, int craftCost, IWandRodOnUpdate onUpdate, ResourceLocation texture) { + this.setTag(tag); + this.capacity = capacity; + this.texture = texture; + this.item=item; + this.setCraftCost(craftCost); + rods.put(tag, this); + this.onUpdate = onUpdate; + } + + public WandRod (String tag, int capacity, ItemStack item, int craftCost) { + this.setTag(tag); + this.capacity = capacity; + this.texture = new ResourceLocation("thaumcraft","textures/models/wand_rod_"+getTag()+".png"); + this.item=item; + this.setCraftCost(craftCost); + rods.put(tag, this); + } + + public WandRod (String tag, int capacity, ItemStack item, int craftCost, IWandRodOnUpdate onUpdate) { + this.setTag(tag); + this.capacity = capacity; + this.texture = new ResourceLocation("thaumcraft","textures/models/wand_rod_"+getTag()+".png"); + this.item=item; + this.setCraftCost(craftCost); + rods.put(tag, this); + this.onUpdate = onUpdate; + } + + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public int getCapacity() { + return capacity; + } + + public void setCapacity(int capacity) { + this.capacity = capacity; + } + + public ResourceLocation getTexture() { + return texture; + } + + public void setTexture(ResourceLocation texture) { + this.texture = texture; + } + + public ItemStack getItem() { + return item; + } + + public void setItem(ItemStack item) { + this.item = item; + } + + public int getCraftCost() { + return craftCost; + } + + public void setCraftCost(int craftCost) { + this.craftCost = craftCost; + } + + public IWandRodOnUpdate getOnUpdate() { + return onUpdate; + } + + public void setOnUpdate(IWandRodOnUpdate onUpdate) { + this.onUpdate = onUpdate; + } + + public boolean isGlowing() { + return glow; + } + + public void setGlowing(boolean hasGlow) { + this.glow = hasGlow; + } + + /** + * The research a player needs to have finished to be able to craft a wand with this rod. + */ + public String getResearch() { + return "ROD_"+getTag(); + } + + // Some examples: + // WandRod WAND_ROD_WOOD = new WandRod("wood",25,new ItemStack(Item.stick),1); + // WandRod WAND_ROD_BLAZE = new WandRod("blaze",100,new ItemStack(Item.blazeRod),7,new WandRodBlazeOnUpdate()); +} diff --git a/src/api/java/thaumcraft/api/wands/WandTriggerRegistry.java b/src/api/java/thaumcraft/api/wands/WandTriggerRegistry.java new file mode 100644 index 00000000..68655cb7 --- /dev/null +++ b/src/api/java/thaumcraft/api/wands/WandTriggerRegistry.java @@ -0,0 +1,72 @@ +package thaumcraft.api.wands; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +/** + * This class serves a similar function to IWandable in that it allows wands to interact + * with object in the world. In this case it is most useful for adding interaction with non-mod + * blocks where you can't control what happens in their code. + * Example where it is used is in crafting the thaumonomicon from a bookshelf and the + * crucible from a cauldron + * + * @author azanor + * + */ +public class WandTriggerRegistry { + + /** + * Registers an action to perform when a casting wand right clicks on a specific block. + * A manager class needs to be created that implements IWandTriggerManager. + * @param manager + * @param event a logical number that you can use to differentiate different events or actions + * @param block + * @param meta send -1 as a wildcard value for all possible meta values + */ + public static void registerWandBlockTrigger(IWandTriggerManager manager, int event, Block block, int meta) { + triggers.put(Arrays.asList(block,meta), + Arrays.asList(manager,event)); + + } + + private static HashMap<List,List> triggers = new HashMap<List,List>(); + + public static boolean hasTrigger(Block block, int meta) { + if (triggers.containsKey(Arrays.asList(block,meta)) || + triggers.containsKey(Arrays.asList(block,-1))) return true; + return false; + } + + /** + * This is called by the onItemUseFirst function in wands. + * Parameters and return value functions like you would expect for that function. + * @param world + * @param wand + * @param player + * @param x + * @param y + * @param z + * @param side + * @param block + * @param meta + * @return + */ + public static boolean performTrigger(World world, ItemStack wand, EntityPlayer player, + int x, int y, int z, int side, Block block, int meta) { + + List l = triggers.get(Arrays.asList(block,meta)); + if (l==null) l = triggers.get(Arrays.asList(block,-1)); + if (l==null) return false; + + IWandTriggerManager manager = (IWandTriggerManager) l.get(0); + int event = (Integer) l.get(1); + return manager.performTrigger(world, wand, player, x, y, z, side, event); + } + +} diff --git a/src/api/java/vazkii/botania/api/BotaniaAPI.java b/src/api/java/vazkii/botania/api/BotaniaAPI.java new file mode 100644 index 00000000..36f5aa5a --- /dev/null +++ b/src/api/java/vazkii/botania/api/BotaniaAPI.java @@ -0,0 +1,363 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 14, 2014, 6:15:28 PM (GMT)] + */ +package vazkii.botania.api; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.Item.ToolMaterial; +import net.minecraft.item.ItemArmor.ArmorMaterial; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.common.util.EnumHelper; +import vazkii.botania.api.internal.DummyMethodHandler; +import vazkii.botania.api.internal.DummySubTile; +import vazkii.botania.api.internal.IInternalMethodHandler; +import vazkii.botania.api.lexicon.KnowledgeType; +import vazkii.botania.api.lexicon.LexiconCategory; +import vazkii.botania.api.lexicon.LexiconEntry; +import vazkii.botania.api.recipe.RecipeElvenTrade; +import vazkii.botania.api.recipe.RecipeManaInfusion; +import vazkii.botania.api.recipe.RecipePetals; +import vazkii.botania.api.recipe.RecipeRuneAltar; +import vazkii.botania.api.subtile.SubTileEntity; +import vazkii.botania.api.wiki.IWikiProvider; +import vazkii.botania.api.wiki.SimpleWikiProvider; +import vazkii.botania.api.wiki.WikiHooks; + +import com.google.common.collect.BiMap; +import com.google.common.collect.HashBiMap; + +public final class BotaniaAPI { + + private static List<LexiconCategory> categories = new ArrayList<LexiconCategory>(); + private static List<LexiconEntry> allEntries = new ArrayList<LexiconEntry>(); + + public static Map<String, KnowledgeType> knowledgeTypes = new HashMap<String, KnowledgeType>(); + + public static List<RecipePetals> petalRecipes = new ArrayList<RecipePetals>(); + public static List<RecipeRuneAltar> runeAltarRecipes = new ArrayList<RecipeRuneAltar>(); + public static List<RecipeManaInfusion> manaInfusionRecipes = new ArrayList<RecipeManaInfusion>(); + public static List<RecipeElvenTrade> elvenTradeRecipes = new ArrayList<RecipeElvenTrade>(); + + private static BiMap<String, Class<? extends SubTileEntity>> subTiles = HashBiMap.<String, Class<? extends SubTileEntity>> create(); + public static Set<String> subtilesForCreativeMenu = new LinkedHashSet(); + + public static Map<String, Integer> oreWeights = new HashMap<String, Integer>(); + + public static Map<Item, Block> seeds = new HashMap(); + + public static ArmorMaterial manasteelArmorMaterial = EnumHelper.addArmorMaterial("MANASTEEL", 16, new int[] { 2, 6, 5, 2 }, 18); + public static ToolMaterial manasteelToolMaterial = EnumHelper.addToolMaterial("MANASTEEL", 3, 300, 6.2F, 2F, 20); + + public static ArmorMaterial elementiumArmorMaterial = EnumHelper.addArmorMaterial("B_ELEMENTIUM", 18, new int[] { 2, 6, 5, 2 }, 18); + public static ToolMaterial elementiumToolMaterial = EnumHelper.addToolMaterial("B_ELEMENTIUM", 3, 720, 6.2F, 2F, 20); + + public static ArmorMaterial terrasteelArmorMaterial = EnumHelper.addArmorMaterial("TERRASTEEL", 34, new int[] {3, 8, 6, 3}, 26); + public static ToolMaterial terrasteelToolMaterial = EnumHelper.addToolMaterial("TERRASTEEL", 3, 2300, 9F, 3F, 26); + + public static KnowledgeType basicKnowledge, elvenKnowledge; + + static { + registerSubTile("", DummySubTile.class); + + basicKnowledge = registerKnowledgeType("minecraft", EnumChatFormatting.RESET, true); + elvenKnowledge = registerKnowledgeType("alfheim", EnumChatFormatting.DARK_GREEN, false); + + addOreWeight("oreAluminum", 3940); // Tinkers' Construct + addOreWeight("oreAmber", 2075); // Thaumcraft + addOreWeight("oreApatite", 1595); // Forestry + addOreWeight("oreBlueTopaz", 3195); // Ars Magica + addOreWeight("oreCassiterite", 1634); // GregTech + addOreWeight("oreCertusQuartz", 3975); // Applied Energistics + addOreWeight("oreChimerite", 3970); // Ars Magica + addOreWeight("oreCinnabar", 2585); // Thaumcraft + addOreWeight("oreCoal", 46525); // Vanilla + addOreWeight("oreCooperite", 5); // GregTech + addOreWeight("oreCopper", 8325); // IC2, Thermal Expansion, Tinkers' Construct, etc. + addOreWeight("oreDarkIron", 1700); // Factorization + addOreWeight("oreDiamond", 1265); // Vanilla + addOreWeight("oreEmerald", 780); // Vanilla + addOreWeight("oreEmery", 415); // GregTech + addOreWeight("oreGalena", 1000); // Factorization + addOreWeight("oreGold", 2970); // Vanilla + addOreWeight("oreInfusedAir", 925); // Thaumcraft + addOreWeight("oreInfusedEarth", 925); // Thaumcraft + addOreWeight("oreInfusedEntropy", 925); // Thaumcraft + addOreWeight("oreInfusedFire", 925); // Thaumcraft + addOreWeight("oreInfusedOrder", 925); // Thaumcraft + addOreWeight("oreInfusedWater", 925); // Thaumcraft + addOreWeight("oreIridium", 30); // GregTech + addOreWeight("oreIron", 20665); // Vanilla + addOreWeight("oreLapis", 1285); // Vanilla + addOreWeight("oreLead", 7985); // IC2, Thermal Expansion, Factorization, etc. + addOreWeight("oreMCropsEssence", 3085); // Magical Crops + addOreWeight("oreNickel", 2275); // Thermal Expansion + addOreWeight("oreOlivine", 1100); // Project RED + addOreWeight("oreRedstone", 6885); // Vanilla + addOreWeight("oreRuby", 1100); // Project RED + addOreWeight("oreSapphire", 1100); // Project RED + addOreWeight("oreSilver", 6300); // Thermal Expansion, Factorization, etc. + addOreWeight("oreSphalerite", 25); // GregTech + addOreWeight("oreSulfur", 1105); // Railcraft + addOreWeight("oreTetrahedrite", 4040); // GregTech + addOreWeight("oreTin", 9450); // IC2, Thermal Expansion, etc. + addOreWeight("oreTungstate", 20); // GregTech + addOreWeight("oreUranium", 1337); // IC2 + addOreWeight("oreVinteum", 5925); // Ars Magica + addOreWeight("oreYellorite", 3520); // Big Reactors + addOreWeight("oreZinc", 6485); // Flaxbeard's Steam Power + + addSeed(Items.wheat_seeds, Blocks.wheat); + addSeed(Items.potato, Blocks.potatoes); + addSeed(Items.carrot, Blocks.carrots); + addSeed(Items.nether_wart, Blocks.nether_wart); + addSeed(Items.pumpkin_seeds, Blocks.pumpkin_stem); + addSeed(Items.melon_seeds, Blocks.melon_stem); + + registerModWiki("Minecraft", new SimpleWikiProvider("Minecraft Wiki", "http://minecraft.gamepedia.com/%s")); + + IWikiProvider technicWiki = new SimpleWikiProvider("Technic Wiki", "http://wiki.technicpack.net/%s"); + IWikiProvider mekanismWiki = new SimpleWikiProvider("Mekanism Wiki", "http://wiki.aidancbrady.com/wiki/%s"); + IWikiProvider buildcraftWiki = new SimpleWikiProvider("BuildCraft Wiki", "http://www.mod-buildcraft.com/wiki/doku.php?id=%s"); + + registerModWiki("Mekanism", mekanismWiki); + registerModWiki("MekanismGenerators", mekanismWiki); + registerModWiki("MekanismTools", mekanismWiki); + registerModWiki("EnderIO", new SimpleWikiProvider("EnderIO Wiki", "http://wiki.enderio.com/%s")); + registerModWiki("TropiCraft", new SimpleWikiProvider("Tropicraft Wiki", "http://wiki.tropicraft.net/wiki/%s")); + registerModWiki("RandomThings", new SimpleWikiProvider("Random Things Wiki", "http://randomthingsminecraftmod.wikispaces.com/%s")); + registerModWiki("Witchery", new SimpleWikiProvider("Witchery Wiki", "https://sites.google.com/site/witcherymod/%s", "-")); + registerModWiki("AppliedEnergistics2", new SimpleWikiProvider("AE2 Wiki", "http://ae-mod.info/%s")); + registerModWiki("BigReactors", technicWiki); + registerModWiki("BuildCraft|Core", buildcraftWiki); + registerModWiki("BuildCraft|Builders", buildcraftWiki); + registerModWiki("BuildCraft|Energy", buildcraftWiki); + registerModWiki("BuildCraft|Factory", buildcraftWiki); + registerModWiki("BuildCraft|Silicon", buildcraftWiki); + registerModWiki("BuildCraft|Transport", buildcraftWiki); + registerModWiki("ArsMagica2", new SimpleWikiProvider("ArsMagica2 Wiki", "http://wiki.arsmagicamod.com/wiki/%s")); + registerModWiki("PneumaticCraft", new SimpleWikiProvider("PneumaticCraft Wiki", "http://www.minemaarten.com/wikis/pneumaticcraft-wiki/pneumaticcraft-wiki-%s")); + registerModWiki("StevesCarts2", new SimpleWikiProvider("Steve's Carts Wiki", "http://stevescarts2.wikispaces.com/%s")); + registerModWiki("GanysSurface", new SimpleWikiProvider("Gany's Surface Wiki", "http://ganys-surface.wikia.com/wiki/%s")); + registerModWiki("GanysNether", new SimpleWikiProvider("Gany's Nether Wiki", "http://ganys-nether.wikia.com/wiki/%s")); + registerModWiki("GanysEnd", new SimpleWikiProvider("Gany's End Wiki", "http://ganys-end.wikia.com/wiki/%s")); + } + + /** + * The internal method handler in use. Do not overwrite. + * @see IInternalMethodHandler + */ + public static IInternalMethodHandler internalHandler = new DummyMethodHandler(); + + + /** + * Registers a new Knowledge Type. + * @param id The ID for this knowledge type. + * @param color The color to display this knowledge type as. + */ + public static KnowledgeType registerKnowledgeType(String id, EnumChatFormatting color, boolean autoUnlock) { + KnowledgeType type = new KnowledgeType(id, color, autoUnlock); + knowledgeTypes.put(id, type); + return type; + } + + /** + * Registers a Petal Recipe. + * @param output The ItemStack to craft. + * @param inputs The objects for crafting. Can be ItemStack, MappableStackWrapper + * or String (case for Ore Dictionary). The array can't be larger than 16. + * @return The recipe created. + */ + public static RecipePetals registerPetalRecipe(ItemStack output, Object... inputs) { + RecipePetals recipe = new RecipePetals(output, inputs); + petalRecipes.add(recipe); + return recipe; + } + + /** + * Registers a Rune Altar + * @param output The ItemStack to craft. + * @param mana The amount of mana required. Don't go over 100000! + * @param inputs The objects for crafting. Can be ItemStack, MappableStackWrapper + * or String (case for Ore Dictionary). The array can't be larger than 16. + * @return The recipe created. + */ + public static RecipeRuneAltar registerRuneAltarRecipe(ItemStack output, int mana, Object... inputs) { + RecipeRuneAltar recipe = new RecipeRuneAltar(output, mana, inputs); + runeAltarRecipes.add(recipe); + return recipe; + } + + /** + * Registers a Mana Infusion Recipe (throw an item in a mana pool) + * @param output The ItemStack to craft + * @param input The input item, be it an ItemStack or an ore dictionary entry String. + * @param mana The amount of mana required. Don't go over 100000! + * @return The recipe created. + */ + public static RecipeManaInfusion registerManaInfusionRecipe(ItemStack output, Object input, int mana) { + RecipeManaInfusion recipe = new RecipeManaInfusion(output, input, mana); + manaInfusionRecipes.add(recipe); + return recipe; + } + + /** + * Register a Mana Infusion Recipe and flags it as an Alchemy recipe (requires an + * Alchemy Catalyst below the pool). + * @see BotaniaAPI#registerManaInfusionRecipe + */ + public static RecipeManaInfusion registerManaAlchemyRecipe(ItemStack output, Object input, int mana) { + RecipeManaInfusion recipe = registerManaInfusionRecipe(output, input, mana); + recipe.setAlchemy(true); + return recipe; + } + + /** + * Register a Mana Infusion Recipe and flags it as an Conjuration recipe (requires a + * Conjuration Catalyst below the pool). + * @see BotaniaAPI#registerManaInfusionRecipe + */ + public static RecipeManaInfusion registerManaConjurationRecipe(ItemStack output, Object input, int mana) { + RecipeManaInfusion recipe = registerManaInfusionRecipe(output, input, mana); + recipe.setConjuration(true); + return recipe; + } + + /** + * Registers a Elven Trade recipe (throw an item in an Alfheim Portal). + * @param output The ItemStack to return. + * @param inputs The items required, can be ItemStack or ore dictionary entry string. + * @return The recipe created. + */ + public static RecipeElvenTrade registerElvenTradeRecipe(ItemStack output, Object... inputs) { + RecipeElvenTrade recipe = new RecipeElvenTrade(output, inputs); + elvenTradeRecipes.add(recipe); + return recipe; + } + + /** + * Registers a SubTileEntity, a new special flower. Look in the subtile package of the API. + */ + public static void registerSubTile(String key, Class<? extends SubTileEntity> subtileClass) { + subTiles.put(key, subtileClass); + } + + /** + * Adds the key for a SubTileEntity into the creative menu. This goes into the + * subtilesForCreativeMenu Set. + */ + public static void addSubTileToCreativeMenu(String key) { + subtilesForCreativeMenu.add(key); + } + + /** + * Adds a category to the list of registered categories to appear in the Lexicon. + */ + public static void addCategory(LexiconCategory category) { + categories.add(category); + } + + /** + * Gets all registered categories. + */ + public static List<LexiconCategory> getAllCategories() { + return categories; + } + + /** + * Gets all registered entries. + */ + public static List<LexiconEntry> getAllEntries() { + return allEntries; + } + + /** + * Registers a Lexicon Entry and adds it to the category passed in. + */ + public static void addEntry(LexiconEntry entry, LexiconCategory category) { + allEntries.add(entry); + category.entries.add(entry); + } + + /** + * Maps an ore (ore dictionary key) to it's weight on the world generation. This + * is used for the Orechid flower. Check the static block in the BotaniaAPI class + * to get the weights for the vanilla blocks.<br> + * Alternatively get the values with the OreDetector mod:<br> + * https://gist.github.com/Vazkii/9493322 + */ + public static void addOreWeight(String ore, int weight) { + oreWeights.put(ore, weight); + } + + public static int getOreWeight(String ore) { + return oreWeights.get(ore); + } + + /** + * Allows an item to be counted as a seed. Any item in this list can be + * dispensed by a dispenser, the block is the block to be placed. + */ + public static void addSeed(Item item, Block block) { + seeds.put(item, block); + } + + /** + * Gets the last recipe to have been added to the recipe list. + */ + public static IRecipe getLatestAddedRecipe() { + List<IRecipe> list = CraftingManager.getInstance().getRecipeList(); + return list.get(list.size() - 1); + } + + /** + * Gets the last x recipes added to the recipe list. + */ + public static List<IRecipe> getLatestAddedRecipes(int x) { + List<IRecipe> list = CraftingManager.getInstance().getRecipeList(); + List<IRecipe> newList = new ArrayList(); + for(int i = x - 1; i >= 0; i--) + newList.add(list.get(list.size() - 1 - i)); + + return newList; + } + + /** + * Registers a Wiki provider for a mod so it uses that instead of the fallback + * FTB wiki. Make sure to call this on PostInit only! + */ + public static void registerModWiki(String mod, IWikiProvider provider) { + WikiHooks.registerModWiki(mod, provider); + } + + public static Class<? extends SubTileEntity> getSubTileMapping(String key) { + if(!subTiles.containsKey(key)) + key = ""; + + return subTiles.get(key); + } + + public static String getSubTileStringMapping(Class<? extends SubTileEntity> clazz) { + return subTiles.inverse().get(clazz); + } +} diff --git a/src/api/java/vazkii/botania/api/internal/DummyManaNetwork.java b/src/api/java/vazkii/botania/api/internal/DummyManaNetwork.java new file mode 100644 index 00000000..53a8e421 --- /dev/null +++ b/src/api/java/vazkii/botania/api/internal/DummyManaNetwork.java @@ -0,0 +1,51 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Mar 7, 2014, 3:47:43 PM (GMT)] + */ +package vazkii.botania.api.internal; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; +import vazkii.botania.api.mana.TileSignature; + +public class DummyManaNetwork implements IManaNetwork { + + public static final DummyManaNetwork instance = new DummyManaNetwork(); + + @Override + public void clear() { + // NO-OP + } + + @Override + public TileEntity getClosestPool(ChunkCoordinates pos, World world, int limit) { + return null; + } + + @Override + public TileEntity getClosestCollector(ChunkCoordinates pos, World world, int limit) { + return null; + } + + @Override + public List<TileSignature> getAllCollectorsInWorld(World world) { + return new ArrayList(); + } + + @Override + public List<TileSignature> getAllPoolsInWorld(World world) { + return new ArrayList(); + } + +} diff --git a/src/api/java/vazkii/botania/api/internal/DummyMethodHandler.java b/src/api/java/vazkii/botania/api/internal/DummyMethodHandler.java new file mode 100644 index 00000000..549bd197 --- /dev/null +++ b/src/api/java/vazkii/botania/api/internal/DummyMethodHandler.java @@ -0,0 +1,135 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 14, 2014, 6:43:03 PM (GMT)] + */ +package vazkii.botania.api.internal; + +import java.util.List; + +import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import vazkii.botania.api.lexicon.LexiconPage; +import vazkii.botania.api.recipe.RecipeElvenTrade; +import vazkii.botania.api.recipe.RecipeManaInfusion; +import vazkii.botania.api.recipe.RecipePetals; +import vazkii.botania.api.recipe.RecipeRuneAltar; + +public class DummyMethodHandler implements IInternalMethodHandler { + + @Override + public LexiconPage textPage(String key) { + return dummyPage(key); + } + + @Override + public LexiconPage imagePage(String key, String resource) { + return dummyPage(key); + } + + @Override + public LexiconPage craftingRecipesPage(String key, List<IRecipe> recipes) { + return dummyPage(key); + } + + @Override + public LexiconPage craftingRecipePage(String key, IRecipe recipe) { + return dummyPage(key); + } + + @Override + public LexiconPage petalRecipesPage(String key, List<RecipePetals> recipes) { + return dummyPage(key); + } + + @Override + public LexiconPage petalRecipePage(String key, RecipePetals recipe) { + return dummyPage(key); + } + + @Override + public LexiconPage runeRecipesPage(String key, List<RecipeRuneAltar> recipes) { + return dummyPage(key); + } + + @Override + public LexiconPage runeRecipePage(String key, RecipeRuneAltar recipe) { + return dummyPage(key); + } + + @Override + public LexiconPage manaInfusionRecipesPage(String key, List<RecipeManaInfusion> recipes) { + return dummyPage(key); + } + + @Override + public LexiconPage manaInfusionRecipePage(String key, RecipeManaInfusion recipe) { + return dummyPage(key); + } + + @Override + public LexiconPage elvenTradePage(String key, List<RecipeElvenTrade> recipes) { + return dummyPage(key); + } + + @Override + public LexiconPage elvenTradesPage(String key, RecipeElvenTrade recipe) { + return dummyPage(key); + } + + private LexiconPage dummyPage(String key) { + return new DummyPage(key); + } + + @Override + public ItemStack getSubTileAsStack(String subTile) { + return new ItemStack(Blocks.stone, 0, 0); + } + + @Override + public IIcon getSubTileIconForName(String name) { + return Blocks.red_flower.getIcon(0, 0); + } + + @Override + public IManaNetwork getManaNetworkInstance() { + return DummyManaNetwork.instance; + } + + @Override + public void drawSimpleManaHUD(int color, int mana, int maxMana, String name, ScaledResolution res) { + // NO-OP + } + + @Override + public void sparkleFX(World world, double x, double y, double z, float r, float g, float b, float size, int m) { + // NO-OP + } + + @Override + public IInventory getBaublesInventory(EntityPlayer player) { + return null; + } + + @Override + public boolean shouldForceCheck() { + return true; + } + + @Override + public int getPassiveFlowerDecay() { + return 0; + } +} diff --git a/src/api/java/vazkii/botania/api/internal/DummyPage.java b/src/api/java/vazkii/botania/api/internal/DummyPage.java new file mode 100644 index 00000000..33cbcf84 --- /dev/null +++ b/src/api/java/vazkii/botania/api/internal/DummyPage.java @@ -0,0 +1,35 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 14, 2014, 6:41:23 PM (GMT)] + */ +package vazkii.botania.api.internal; + +import vazkii.botania.api.lexicon.LexiconPage; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +/** + * A dummy page. It does absolutely nothing and is only + * existant to make sure everything goes right even if + * Botania isn't loaded. + */ +public class DummyPage extends LexiconPage { + + public DummyPage(String unlocalizedName) { + super(unlocalizedName); + } + + @Override + @SideOnly(Side.CLIENT) + public void renderScreen(IGuiLexiconEntry gui, int x, int y) { + // NO-OP + } + +} diff --git a/src/api/java/vazkii/botania/api/internal/DummySubTile.java b/src/api/java/vazkii/botania/api/internal/DummySubTile.java new file mode 100644 index 00000000..d23adced --- /dev/null +++ b/src/api/java/vazkii/botania/api/internal/DummySubTile.java @@ -0,0 +1,18 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 24, 2014, 4:17:33 PM (GMT)] + */ +package vazkii.botania.api.internal; + +import vazkii.botania.api.subtile.SubTileEntity; + +public class DummySubTile extends SubTileEntity { + +} diff --git a/src/api/java/vazkii/botania/api/internal/IGuiLexiconEntry.java b/src/api/java/vazkii/botania/api/internal/IGuiLexiconEntry.java new file mode 100644 index 00000000..c8bf6da1 --- /dev/null +++ b/src/api/java/vazkii/botania/api/internal/IGuiLexiconEntry.java @@ -0,0 +1,57 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 14, 2014, 6:48:41 PM (GMT)] + */ +package vazkii.botania.api.internal; + +import vazkii.botania.api.lexicon.LexiconEntry; + +/** + * Internal interface for the Lexicon Entry GUI. This contains + * everything that can be accessed from it. It's safe to cast + * this type to GuiScreen. + */ +public interface IGuiLexiconEntry { + + /** + * Gets the entry currently portrayed in this gui. + */ + public LexiconEntry getEntry(); + + /** + * Gets the current page the lexicon GUI is browsing. + */ + public int getPageOn(); + + /** + * Gets the leftmost part of the GUI. + */ + public int getLeft(); + + /** + * Gets the topmost part of the GUI. + */ + public int getTop(); + + /** + * Gets the GUI's width. + */ + public int getWidth(); + + /** + * Gets the GUI's height + */ + public int getHeight(); + + /** + * Gets the GUI's Z level for rendering. + */ + public float getZLevel(); +} diff --git a/src/api/java/vazkii/botania/api/internal/IInternalMethodHandler.java b/src/api/java/vazkii/botania/api/internal/IInternalMethodHandler.java new file mode 100644 index 00000000..00a16a29 --- /dev/null +++ b/src/api/java/vazkii/botania/api/internal/IInternalMethodHandler.java @@ -0,0 +1,81 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 14, 2014, 6:34:34 PM (GMT)] + */ +package vazkii.botania.api.internal; + +import java.util.List; + +import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import vazkii.botania.api.lexicon.LexiconPage; +import vazkii.botania.api.recipe.RecipeElvenTrade; +import vazkii.botania.api.recipe.RecipeManaInfusion; +import vazkii.botania.api.recipe.RecipePetals; +import vazkii.botania.api.recipe.RecipeRuneAltar; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +/** + * Any methods that refer to internal methods in Botania are here. + * This is defaulted to a dummy handler, whose methods do nothing. + * This handler is set to a proper one on PreInit. Make sure to + * make your mod load after Botania if you have any intention of + * doing anythign with this on PreInit. + */ +public interface IInternalMethodHandler { + + public LexiconPage textPage(String key); + + public LexiconPage imagePage(String key, String resource); + + public LexiconPage craftingRecipesPage(String key, List<IRecipe> recipes); + + public LexiconPage craftingRecipePage(String key, IRecipe recipe); + + public LexiconPage petalRecipesPage(String key, List<RecipePetals> recipes); + + public LexiconPage petalRecipePage(String key, RecipePetals recipe); + + public LexiconPage runeRecipesPage(String key, List<RecipeRuneAltar> recipes); + + public LexiconPage runeRecipePage(String key, RecipeRuneAltar recipe); + + public LexiconPage manaInfusionRecipesPage(String key, List<RecipeManaInfusion> recipes); + + public LexiconPage manaInfusionRecipePage(String key, RecipeManaInfusion recipe); + + public LexiconPage elvenTradePage(String key, List<RecipeElvenTrade> recipes); + + public LexiconPage elvenTradesPage(String key, RecipeElvenTrade recipe); + + public IManaNetwork getManaNetworkInstance(); + + public ItemStack getSubTileAsStack(String subTile); + + public IIcon getSubTileIconForName(String name); + + public boolean shouldForceCheck(); + + public int getPassiveFlowerDecay(); + + public IInventory getBaublesInventory(EntityPlayer player); + + @SideOnly(Side.CLIENT) + public void drawSimpleManaHUD(int color, int mana, int maxMana, String name, ScaledResolution res); + + public void sparkleFX(World world, double x, double y, double z, float r, float g, float b, float size, int m); + +} diff --git a/src/api/java/vazkii/botania/api/internal/IManaBurst.java b/src/api/java/vazkii/botania/api/internal/IManaBurst.java new file mode 100644 index 00000000..38c5fd8c --- /dev/null +++ b/src/api/java/vazkii/botania/api/internal/IManaBurst.java @@ -0,0 +1,62 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 31, 2014, 4:36:13 PM (GMT)] + */ +package vazkii.botania.api.internal; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChunkCoordinates; + +/** + * Interface for the Mana Burst entity. This can safely be casted to EntityThrowable. + */ +public interface IManaBurst { + + public boolean isFake(); + + public void setMotion(double x, double y, double z); + + public int getColor(); + + public void setColor(int color); + + public int getMana(); + + public void setMana(int mana); + + public int getStartingMana(); + + public void setStartingMana(int mana); + + public int getMinManaLoss(); + + public void setMinManaLoss(int minManaLoss); + + public float getManaLossPerTick(); + + public void setManaLossPerTick(float mana); + + public float getGravity(); + + public void setGravity(float gravity); + + public ChunkCoordinates getBurstSourceChunkCoordinates(); + + public void setBurstSourceCoords(int x, int y, int z); + + public ItemStack getSourceLens(); + + public void setSourceLens(ItemStack lens); + + public boolean hasAlreadyCollidedAt(int x, int y, int z); + + public int getTicksExisted(); + +} diff --git a/src/api/java/vazkii/botania/api/internal/IManaNetwork.java b/src/api/java/vazkii/botania/api/internal/IManaNetwork.java new file mode 100644 index 00000000..38e94197 --- /dev/null +++ b/src/api/java/vazkii/botania/api/internal/IManaNetwork.java @@ -0,0 +1,68 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Mar 7, 2014, 3:39:48 PM (GMT)] + */ +package vazkii.botania.api.internal; + +import java.util.List; + +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; +import vazkii.botania.api.mana.TileSignature; + +/** + * A basic interface for a world's Mana Network. + * @see IInternalMethodHandler#getManaNetworkInstance() + */ +public interface IManaNetwork { + + /** + * Clears the entire Mana Network of all it's contents, you probably + * don't want to call this unless you have a very good reason. + */ + public void clear(); + + /** + * Gets the closest Mana Collector (eg. Mana Spreader) in the network to the Chunk + * Coordinates passed in, in the given dimension.<br> + * A way of getting the dimension is via worldObj.provider.dimensionId<br> + * Note that this function *can* get performance intensive, it's reccomended you + * call it sparingly and take cache of the value returned. + * @param limit The maximum distance the closest block can be, if the closest block + * is farther away than that, null will be returned instead. + */ + public TileEntity getClosestCollector(ChunkCoordinates pos, World world, int limit); + + /** + * Gets the closest Mana Pool in the network to the Chunk Coordinates passed in, + * in the given dimension.<br> + * A way of getting the dimension is via worldObj.provider.dimensionId<br> + * Note that this function *can* get performance intensive, it's reccomended you + * call it sparingly and take cache of the value returned. + * @param limit The maximum distance the closest block can be, if the closest block + * is farther away than that, null will be returned instead. + */ + public TileEntity getClosestPool(ChunkCoordinates pos, World world, int limit); + + /** + * Gets the list of all Mana Collectors (eg. Mana Spreader) in the dimension + * passed in. Note that this is the actual list and not a copy, make sure to + * clone the list if you intend to change it in any way. + */ + public List<TileSignature> getAllCollectorsInWorld(World world); + + /** + * Gets the list of all Mana Pools in the dimension passed in. Note that this + * is the actual list and not a copy, make sure to clone the list if you intend + * to change it in any way. + */ + public List<TileSignature> getAllPoolsInWorld(World world); +} diff --git a/src/api/java/vazkii/botania/api/item/IExoflameHeatable.java b/src/api/java/vazkii/botania/api/item/IExoflameHeatable.java new file mode 100644 index 00000000..eb4815c6 --- /dev/null +++ b/src/api/java/vazkii/botania/api/item/IExoflameHeatable.java @@ -0,0 +1,44 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Aug 30, 2014, 4:28:29 PM (GMT)] + */ +package vazkii.botania.api.item; + +/** + * A TileEntity that implements this can be heated by an Exoflame flower. + */ +public interface IExoflameHeatable { + + /** + * Can this TileEntity smelt its contents. If true, the Exoflame is allowed + * to fuel it. + */ + public boolean canSmelt(); + + /** + * Gets the amount of ticks left for the fuel. If below 2, the exoflame + * will call boostBurnTime. + */ + public int getBurnTime(); + + /** + * Called to increase the amount of time this furnace should be burning + * the fuel for. Even if it doesn't have any fuel. + */ + public void boostBurnTime(); + + /** + * Called once every two ticks to increase the speed of the furnace. Feel + * free to not do anything if all you want is to allow the exoflame to feed + * it, not make it faster. + */ + public void boostCookTime(); + +} diff --git a/src/api/java/vazkii/botania/api/item/IExtendedPlayerController.java b/src/api/java/vazkii/botania/api/item/IExtendedPlayerController.java new file mode 100644 index 00000000..67db3e64 --- /dev/null +++ b/src/api/java/vazkii/botania/api/item/IExtendedPlayerController.java @@ -0,0 +1,29 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Aug 6, 2014, 6:02:29 PM (GMT)] + */ +package vazkii.botania.api.item; + +/** + * An interface that defines an instance of PlayerControllerMP with + * the ability to modify reach. See vazkii.botania.client.core.handler.BotaniaPlayerController + */ +public interface IExtendedPlayerController { + + /** + * Sets the extra reach the player should have. + */ + public void setReachDistanceExtension(float f); + + /** + * Gets the current reach extension. + */ + public float getReachDistanceExtension(); +} diff --git a/src/api/java/vazkii/botania/api/item/IPetalApothecary.java b/src/api/java/vazkii/botania/api/item/IPetalApothecary.java new file mode 100644 index 00000000..d96f73f1 --- /dev/null +++ b/src/api/java/vazkii/botania/api/item/IPetalApothecary.java @@ -0,0 +1,30 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Aug 30, 2014, 4:22:15 PM (GMT)] + */ +package vazkii.botania.api.item; + +/** + * Base Interface for the Petal Apothecary block. Can + * be safely casted to TileEntity. + */ +public interface IPetalApothecary { + + /** + * Sets if the the apothecary has water or not. + */ + public void setWater(boolean water); + + /** + * Does the apothecary have water in it? + */ + public boolean hasWater(); + +} diff --git a/src/api/java/vazkii/botania/api/item/IPixieSpawner.java b/src/api/java/vazkii/botania/api/item/IPixieSpawner.java new file mode 100644 index 00000000..c0d47f87 --- /dev/null +++ b/src/api/java/vazkii/botania/api/item/IPixieSpawner.java @@ -0,0 +1,30 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Aug 6, 2014, 6:06:27 PM (GMT)] + */ +package vazkii.botania.api.item; + +import net.minecraft.item.ItemStack; + +/** + * Any item that implements this allows for pixies to be spawned when the player takes damage when...<br> + * - Case the item is armor, having it equipped.<br> + * - Case the item is a bauble, having it worn.<br> + * - On any other case, having the item being the current held item. + */ +public interface IPixieSpawner { + + /** + * The chance this item adds for pixies to be spawned. From 0.0 to 1.0. All values + * are put together when calculating. + */ + public float getPixieChance(ItemStack stack); + +} \ No newline at end of file diff --git a/src/api/java/vazkii/botania/api/lexicon/IAddonEntry.java b/src/api/java/vazkii/botania/api/lexicon/IAddonEntry.java new file mode 100644 index 00000000..fe2167b1 --- /dev/null +++ b/src/api/java/vazkii/botania/api/lexicon/IAddonEntry.java @@ -0,0 +1,29 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jun 8, 2014, 7:02:48 PM (GMT)] + */ +package vazkii.botania.api.lexicon; + +/** + * Have a LexiconEntry implement this to signify it's an "Addon entry", as + * in, one provided by an Addon. This allows it to draw a subtitle of + * sorts, to prevent the [Mod tag here] nonsense that happened with thaumcraft + * addons. It can also be used for other purposes, such as stating an + * entry is WIP. + */ +public interface IAddonEntry { + + /** + * Returns the <b>unlocalized</b> subtitle to show below the title. Here you'd + * return something like "(This Entry is provided by the Botanic Tinkerer addon)". + */ + public String getSubtitle(); + +} diff --git a/src/api/java/vazkii/botania/api/lexicon/ILexicon.java b/src/api/java/vazkii/botania/api/lexicon/ILexicon.java new file mode 100644 index 00000000..ee07e17f --- /dev/null +++ b/src/api/java/vazkii/botania/api/lexicon/ILexicon.java @@ -0,0 +1,21 @@ +package vazkii.botania.api.lexicon; + +import net.minecraft.item.ItemStack; + +/** + * Basic interface for the Lexica Botania. + */ +public interface ILexicon { + + /** + * Gets if a specific knowledge is unlocked. Check the knowledge types in + * BotaniaAPI. + */ + public boolean isKnowledgeUnlocked(ItemStack stack, KnowledgeType knowledge); + + /** + * Unlocks a specfic type of knowledge. + */ + public void unlockKnowledge(ItemStack stack, KnowledgeType knowledge); + +} diff --git a/src/api/java/vazkii/botania/api/lexicon/ILexiconable.java b/src/api/java/vazkii/botania/api/lexicon/ILexiconable.java new file mode 100644 index 00000000..e8777db2 --- /dev/null +++ b/src/api/java/vazkii/botania/api/lexicon/ILexiconable.java @@ -0,0 +1,29 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 20, 2014, 7:05:44 PM (GMT)] + */ +package vazkii.botania.api.lexicon; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +/** + * Any block that implements this can be right clicked with + * a Lexica Botania to open a entry page. + */ +public interface ILexiconable { + + /** + * Gets the lexicon entry to open at this location. null works too. + */ + public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon); + +} diff --git a/src/api/java/vazkii/botania/api/lexicon/IRecipeKeyProvider.java b/src/api/java/vazkii/botania/api/lexicon/IRecipeKeyProvider.java new file mode 100644 index 00000000..d07c0325 --- /dev/null +++ b/src/api/java/vazkii/botania/api/lexicon/IRecipeKeyProvider.java @@ -0,0 +1,24 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Mar 20, 2014, 6:08:48 PM (GMT)] + */ +package vazkii.botania.api.lexicon; + +import net.minecraft.item.ItemStack; + +/** + * Have an Item implement this so that the method used for mapping it into + * the lexicon recipe mappings isn't the typical id:meta key. + */ +public interface IRecipeKeyProvider { + + public String getKey(ItemStack stack); + +} diff --git a/src/api/java/vazkii/botania/api/lexicon/KnowledgeType.java b/src/api/java/vazkii/botania/api/lexicon/KnowledgeType.java new file mode 100644 index 00000000..5a08c9ce --- /dev/null +++ b/src/api/java/vazkii/botania/api/lexicon/KnowledgeType.java @@ -0,0 +1,20 @@ +package vazkii.botania.api.lexicon; + +import net.minecraft.util.EnumChatFormatting; + +public class KnowledgeType { + + public final String id; + public final EnumChatFormatting color; + public final boolean autoUnlock; + + public KnowledgeType(String id, EnumChatFormatting color, boolean autoUnlock) { + this.id = id; + this.color = color; + this.autoUnlock = autoUnlock; + } + + public String getUnlocalizedName() { + return "botania.knowledge." + id; + } +} diff --git a/src/api/java/vazkii/botania/api/lexicon/LexiconCategory.java b/src/api/java/vazkii/botania/api/lexicon/LexiconCategory.java new file mode 100644 index 00000000..76273419 --- /dev/null +++ b/src/api/java/vazkii/botania/api/lexicon/LexiconCategory.java @@ -0,0 +1,32 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 14, 2014, 6:23:47 PM (GMT)] + */ +package vazkii.botania.api.lexicon; + +import java.util.ArrayList; +import java.util.List; + +public final class LexiconCategory { + + public final String unlocalizedName; + public final List<LexiconEntry> entries = new ArrayList<LexiconEntry>(); + + /** + * @param unlocalizedName The unlocalized name of this category. This will be localized by the client display. + */ + public LexiconCategory(String unlocalizedName) { + this.unlocalizedName = unlocalizedName; + } + + public String getUnlocalizedName() { + return unlocalizedName; + } +} diff --git a/src/api/java/vazkii/botania/api/lexicon/LexiconEntry.java b/src/api/java/vazkii/botania/api/lexicon/LexiconEntry.java new file mode 100644 index 00000000..bbc475c4 --- /dev/null +++ b/src/api/java/vazkii/botania/api/lexicon/LexiconEntry.java @@ -0,0 +1,97 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 14, 2014, 6:17:06 PM (GMT)] + */ +package vazkii.botania.api.lexicon; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import net.minecraft.util.StatCollector; +import vazkii.botania.api.BotaniaAPI; + +public class LexiconEntry implements Comparable<LexiconEntry> { + + public final String unlocalizedName; + public final LexiconCategory category; + + private KnowledgeType type = BotaniaAPI.basicKnowledge; + + public List<LexiconPage> pages = new ArrayList<LexiconPage>(); + private boolean priority = false; + + /** + * @param unlocalizedName The unlocalized name of this entry. This will be localized by the client display. + */ + public LexiconEntry(String unlocalizedName, LexiconCategory category) { + this.unlocalizedName = unlocalizedName; + this.category = category; + } + + /** + * Sets this page as prioritized, as in, will appear before others in the lexicon. + */ + public LexiconEntry setPriority() { + priority = true; + return this; + } + + /** + * Sets the Knowledge type of this entry. + */ + public LexiconEntry setKnowledgeType(KnowledgeType type) { + this.type = type; + return this; + } + + public KnowledgeType getKnowledgeType() { + return type; + } + + public boolean isPriority() { + return priority; + } + + public String getUnlocalizedName() { + return unlocalizedName; + } + + /** + * Sets what pages you want this entry to have. + */ + public LexiconEntry setLexiconPages(LexiconPage... pages) { + this.pages.addAll(Arrays.asList(pages)); + + for(int i = 0; i < this.pages.size(); i++) { + LexiconPage page = this.pages.get(i); + if(!page.skipRegistry) + page.onPageAdded(this, i); + } + + return this; + } + + /** + * Adds a page to the list of pages. + */ + public void addPage(LexiconPage page) { + pages.add(page); + } + + public final String getNameForSorting() { + return (priority ? 0 : 1) + StatCollector.translateToLocal(getUnlocalizedName()); + } + + @Override + public int compareTo(LexiconEntry o) { + return getNameForSorting().compareTo(o.getNameForSorting()); + } +} \ No newline at end of file diff --git a/src/api/java/vazkii/botania/api/lexicon/LexiconPage.java b/src/api/java/vazkii/botania/api/lexicon/LexiconPage.java new file mode 100644 index 00000000..f17f0c5e --- /dev/null +++ b/src/api/java/vazkii/botania/api/lexicon/LexiconPage.java @@ -0,0 +1,67 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 14, 2014, 6:17:24 PM (GMT)] + */ +package vazkii.botania.api.lexicon; + +import vazkii.botania.api.internal.IGuiLexiconEntry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public abstract class LexiconPage { + + public String unlocalizedName; + public boolean skipRegistry; + + public LexiconPage(String unlocalizedName) { + this.unlocalizedName = unlocalizedName; + } + + /** + * Does the rendering for this page. + * @param gui The active GuiScreen + * @param mx The mouse's relative X position. + * @param my The mouse's relative Y position. + */ + @SideOnly(Side.CLIENT) + public abstract void renderScreen(IGuiLexiconEntry gui, int mx, int my); + + /** + * Called per update tick. + */ + @SideOnly(Side.CLIENT) + public void updateScreen() { + // NO-OP + } + + /** + * Called when a key is pressed. + */ + @SideOnly(Side.CLIENT) + public void onKeyPressed(char c, int key) { + // NO-OP + } + + /** + * Called when {@link LexiconEntry#setLexiconPages(LexiconPage...)} is called. + */ + public void onPageAdded(LexiconEntry entry, int index) { + // NO-OP + } + + public String getUnlocalizedName() { + return unlocalizedName; + } + + public LexiconPage setSkipRegistry() { + skipRegistry = true; + return this; + } +} diff --git a/src/api/java/vazkii/botania/api/lexicon/LexiconRecipeMappings.java b/src/api/java/vazkii/botania/api/lexicon/LexiconRecipeMappings.java new file mode 100644 index 00000000..49b2a133 --- /dev/null +++ b/src/api/java/vazkii/botania/api/lexicon/LexiconRecipeMappings.java @@ -0,0 +1,66 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Mar 6, 2014, 3:54:12 PM (GMT)] + */ +package vazkii.botania.api.lexicon; + +import java.util.HashMap; +import java.util.Map; + +import net.minecraft.item.ItemStack; + +/** + * This class contains mappings for which entry and page correspond to each + * craftable ItemStack. Use the map method to map an ItemStack to a page in + * an entry in the lexicon. + */ +public final class LexiconRecipeMappings { + + private static Map<String, EntryData> mappings = new HashMap(); + + /** + * Maps the given stack to the given page of the entry. + */ + public static void map(ItemStack stack, LexiconEntry entry, int page, boolean force) { + EntryData data = new EntryData(entry, page); + String str = stackToString(stack); + + if(force || !mappings.containsKey(str)) + mappings.put(str, data); + } + + public static void map(ItemStack stack, LexiconEntry entry, int page) { + map(stack, entry, page, false); + } + + + public static EntryData getDataForStack(ItemStack stack) { + return mappings.get(stackToString(stack)); + } + + public static String stackToString(ItemStack stack) { + if(stack.hasTagCompound() && stack.getItem() instanceof IRecipeKeyProvider) + return ((IRecipeKeyProvider) stack.getItem()).getKey(stack); + + return stack.getUnlocalizedName() + "~" + stack.getItemDamage(); + } + + public static class EntryData { + + public final LexiconEntry entry; + public final int page; + + public EntryData(LexiconEntry entry, int page) { + this.entry = entry; + this.page = page; + } + + } +} diff --git a/src/api/java/vazkii/botania/api/mana/BurstProperties.java b/src/api/java/vazkii/botania/api/mana/BurstProperties.java new file mode 100644 index 00000000..eed74809 --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/BurstProperties.java @@ -0,0 +1,37 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 31, 2014, 3:49:30 PM (GMT)] + */ +package vazkii.botania.api.mana; + +/** + * The properties of a mana burst, when shot. This is passed to the lens + * currently on the mana spreader to apply changes. + */ +public final class BurstProperties { + + public int maxMana; + public int ticksBeforeManaLoss; + public float manaLossPerTick; + public float gravity; + public float motionModifier; + + public int color; + + public BurstProperties(int maxMana, int ticksBeforeManaLoss, float manaLossPerTick, float gravity, float motionModifier, int color) { + this.maxMana = maxMana; + this.ticksBeforeManaLoss = ticksBeforeManaLoss; + this.manaLossPerTick = manaLossPerTick; + this.gravity = gravity; + this.motionModifier = motionModifier; + this.color = color; + } + +} diff --git a/src/api/java/vazkii/botania/api/mana/IClientManaHandler.java b/src/api/java/vazkii/botania/api/mana/IClientManaHandler.java new file mode 100644 index 00000000..889cfb51 --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/IClientManaHandler.java @@ -0,0 +1,21 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jul 2, 2014, 5:26:02 PM (GMT)] + */ +package vazkii.botania.api.mana; + +/** + * A TileEntity that implements this will get it's recieveMana call + * called on both client and server. If this is not implemented + * the call will only occur on the server. + */ +public interface IClientManaHandler extends IManaReceiver { + +} diff --git a/src/api/java/vazkii/botania/api/mana/ICreativeManaProvider.java b/src/api/java/vazkii/botania/api/mana/ICreativeManaProvider.java new file mode 100644 index 00000000..51f3cce9 --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/ICreativeManaProvider.java @@ -0,0 +1,26 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [May 25, 2014, 7:34:00 PM (GMT)] + */ +package vazkii.botania.api.mana; + +import net.minecraft.item.ItemStack; + +/** + * Have an item implement this to flag it as an infinite + * mana source for the purposes of the HUD rendered when + * an IManaUserItem implementing item is present. + */ +public interface ICreativeManaProvider { + + public boolean isCreative(ItemStack stack); + +} + diff --git a/src/api/java/vazkii/botania/api/mana/IKeyLocked.java b/src/api/java/vazkii/botania/api/mana/IKeyLocked.java new file mode 100644 index 00000000..a7870e6b --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/IKeyLocked.java @@ -0,0 +1,30 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jul 11, 2014, 4:29:32 PM (GMT)] + */ +package vazkii.botania.api.mana; + +/** + * A TileEntity that implements this interface has an IO key lock. This + * interface defines an input and output key.<br><br> + * + * A Spreader can only shoot mana into a IKeyLocked interfaced TE if the Input + * key of the TE is equal to the Output key of the Spreader.<br><br> + * + * A Spreader can only pull mana from a IKeyLocked interfaced IManaPool TE if the + * Output key of the IManaPool is equal to the Input key of the Spreader. + */ +public interface IKeyLocked { + + public String getInputKey(); + + public String getOutputKey(); + +} diff --git a/src/api/java/vazkii/botania/api/mana/ILaputaImmobile.java b/src/api/java/vazkii/botania/api/mana/ILaputaImmobile.java new file mode 100644 index 00000000..91cb0b93 --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/ILaputaImmobile.java @@ -0,0 +1,23 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jul 26, 2014, 9:51:58 PM (GMT)] + */ +package vazkii.botania.api.mana; + +import net.minecraft.world.World; + +/** + * A block that implements this has a flag for whether it can be moved by the Shard of Laputa. + */ +public interface ILaputaImmobile { + + public boolean canMove(World world, int x, int y, int z); + +} diff --git a/src/api/java/vazkii/botania/api/mana/ILens.java b/src/api/java/vazkii/botania/api/mana/ILens.java new file mode 100644 index 00000000..628d102b --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/ILens.java @@ -0,0 +1,43 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 31, 2014, 3:03:04 PM (GMT)] + */ +package vazkii.botania.api.mana; + +import net.minecraft.item.ItemStack; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +/** + * Have an Item implement this to be counted as a lens for the mana spreader. + */ +public interface ILens extends ILensEffect { + + @SideOnly(Side.CLIENT) + public int getLensColor(ItemStack stack); + + /** + * Can the source lens be combined with the composite lens? This is called + * for both the ILens instance of ItemStack.getItem() of sourceLens and compositeLens. + */ + public boolean canCombineLenses(ItemStack sourceLens, ItemStack compositeLens); + + /** + * Gets the composite lens in the stack passed in, return null for none. + */ + public ItemStack getCompositeLens(ItemStack stack); + + /** + * Sets the composite lens for the sourceLens as the compositeLens, returns + * the ItemStack with the combination. + */ + public ItemStack setCompositeLens(ItemStack sourceLens, ItemStack compositeLens); + +} diff --git a/src/api/java/vazkii/botania/api/mana/ILensEffect.java b/src/api/java/vazkii/botania/api/mana/ILensEffect.java new file mode 100644 index 00000000..d97095b2 --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/ILensEffect.java @@ -0,0 +1,49 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Apr 14, 2014, 7:30:00 PM (GMT)] + */ +package vazkii.botania.api.mana; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.MovingObjectPosition; +import vazkii.botania.api.internal.IManaBurst; + +/** + * Have an item implement this for it to count as a lens effect and + * be able to change the properties of Mana Bursts. + */ +public interface ILensEffect { + + /** + * Called when a mana spreader that has this focus shoots a burst. This is where + * you change the properties of the burst. + */ + public void apply(ItemStack stack, BurstProperties props); + + /** + * Called when a mana burst fired from a mana spreader with this focus collides against + * any block. This is called after the collision is handled. + * @return True to kill the burst. False to keep it alive. + */ + public boolean collideBurst(IManaBurst burst, MovingObjectPosition pos, boolean isManaBlock, boolean dead, ItemStack stack); + + /** + * Called when a mana burst fired from a mana spreader with this focus is updated. + * This is called before the update is handled. + */ + public void updateBurst(IManaBurst burst, ItemStack stack); + + /** + * Called when the mana burst should do it's particles. Return false to not + * do any particles. + */ + public boolean doParticles(IManaBurst burst, ItemStack stack); + +} diff --git a/src/api/java/vazkii/botania/api/mana/IManaBlock.java b/src/api/java/vazkii/botania/api/mana/IManaBlock.java new file mode 100644 index 00000000..6896f059 --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/IManaBlock.java @@ -0,0 +1,26 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 22, 2014, 4:59:05 PM (GMT)] + */ +package vazkii.botania.api.mana; + +/** + * A TileEntity that implements this is considered a Mana Block. + * Just being a Mana Block doesn't mean much, look at the other IMana + * interfaces. + */ +public interface IManaBlock { + + /** + * Gets the amount of mana currently in this block. + */ + public int getCurrentMana(); + +} diff --git a/src/api/java/vazkii/botania/api/mana/IManaCollector.java b/src/api/java/vazkii/botania/api/mana/IManaCollector.java new file mode 100644 index 00000000..a54d8c93 --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/IManaCollector.java @@ -0,0 +1,43 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 22, 2014, 5:01:19 PM (GMT)] + */ +package vazkii.botania.api.mana; + +import vazkii.botania.api.internal.IManaBurst; + +/** + * Any TileEntity that implements this is considered a mana collector, by + * which nearby generating flowers will pump mana into it.<br><br> + * + * <b>Implementation Instructions:</b><br> + * - Override invalidate() and onChunkUnload(), calling <i>ManaNetworkEvent.removeCollector(this);</i> on both.<br> + * - On the first tick of onUpdate(), call </i>ManaNetworkEvent.addCollector(this);<i> + */ +public interface IManaCollector extends IManaReceiver { + + /** + * Called every tick on the client case the player is holding a Wand of the Forest. + */ + public void onClientDisplayTick(); + + /** + * Get the multiplier of mana to input into the block, 1.0 is the original amount of mana + * in the burst. 0.9, for example, is 90%, so 10% of the mana in the burst will get + * dissipated. + */ + public float getManaYieldMultiplier(IManaBurst burst); + + /** + * Gets the maximum amount of mana this collector can have. + */ + public int getMaxMana(); + +} diff --git a/src/api/java/vazkii/botania/api/mana/IManaCollisionGhost.java b/src/api/java/vazkii/botania/api/mana/IManaCollisionGhost.java new file mode 100644 index 00000000..420f683c --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/IManaCollisionGhost.java @@ -0,0 +1,22 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Mar 10, 2014, 7:49:19 PM (GMT)] + */ +package vazkii.botania.api.mana; + +/** + * Any TileEntity that implements this can be counted as a "ghost" block of + * sorts, that won't call the collision code for the mana bursts. + */ +public interface IManaCollisionGhost { + + public boolean isGhost(); + +} diff --git a/src/api/java/vazkii/botania/api/mana/IManaItem.java b/src/api/java/vazkii/botania/api/mana/IManaItem.java new file mode 100644 index 00000000..42dfef15 --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/IManaItem.java @@ -0,0 +1,69 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Mar 6, 2014, 9:07:40 AM (GMT)] + */ +package vazkii.botania.api.mana; + +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; + +/** + * An item that implements this can be counted as an item that can + * contain mana. + */ +public interface IManaItem { + + /** + * Gets the amount of mana this item contains + */ + public int getMana(ItemStack stack); + + /** + * Gets the max amount of mana this item can hold. + */ + public int getMaxMana(ItemStack stack); + + /** + * Adds mana to this item. + */ + public void addMana(ItemStack stack, int mana); + + /** + * Can this item receive mana from a mana Pool? + * @param pool The pool it's receiving mana from, can be casted to IManaPool. + * @see IManaPool#isOutputtingPower() + */ + public boolean canReceiveManaFromPool(ItemStack stack, TileEntity pool); + + /** + * Can this item recieve mana from another item? + */ + public boolean canReceiveManaFromItem(ItemStack stack, ItemStack otherStack); + + /** + * Can this item export mana to a mana Pool? + * @param pool The pool it's exporting mana to, can be casted to IManaPool. + * @see IManaPool#isOutputtingPower() + */ + public boolean canExportManaToPool(ItemStack stack,TileEntity pool); + + /** + * Can this item export mana to another item? + */ + public boolean canExportManaToItem(ItemStack stack, ItemStack otherStack); + + /** + * If this item simply does not export mana at all, set this to true. This is + * used to skip items that contain mana but can't export it when drawing the + * mana bar above the XP bar. + */ + public boolean isNoExport(ItemStack stack); + +} diff --git a/src/api/java/vazkii/botania/api/mana/IManaPool.java b/src/api/java/vazkii/botania/api/mana/IManaPool.java new file mode 100644 index 00000000..b93bf6e8 --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/IManaPool.java @@ -0,0 +1,31 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 22, 2014, 5:03:09 PM (GMT)] + */ +package vazkii.botania.api.mana; + +/** + * Any TileEntity that implements this is considered a Mana Pool, + * by which nearby functional flowers will pull mana from it.<br> + * Mana Distributors will also accept it as valid output.<br><br> + * + * <b>Implementation Instructions:</b><br> + * - Override invalidate() and onChunkUnload(), calling <i>ManaNetworkEvent.removePool(this);</i> on both.<br> + * - On the first tick of onUpdate(), call <i>ManaNetworkEvent.addPool(this);</i> + */ +public interface IManaPool extends IManaReceiver { + + /** + * Returns false if the mana pool is accepting power from other power items, + * true if it's sending power into them. + */ + public boolean isOutputtingPower(); + +} diff --git a/src/api/java/vazkii/botania/api/mana/IManaReceiver.java b/src/api/java/vazkii/botania/api/mana/IManaReceiver.java new file mode 100644 index 00000000..2838c7b7 --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/IManaReceiver.java @@ -0,0 +1,35 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 22, 2014, 4:55:00 PM (GMT)] + */ +package vazkii.botania.api.mana; + +/** + * Any TileEntity that implements this can receive mana from mana bursts. + */ +public interface IManaReceiver extends IManaBlock { + + /** + * Is this Mana Receiver is full? Being full means no mana bursts will be sent. + */ + public boolean isFull(); + + /** + * Called when this receiver receives mana. + */ + public void recieveMana(int mana); + + /** + * Can this tile receive mana from bursts? Generally set to false for + * implementations of IManaCollector. + */ + public boolean canRecieveManaFromBursts(); + +} diff --git a/src/api/java/vazkii/botania/api/mana/IManaTrigger.java b/src/api/java/vazkii/botania/api/mana/IManaTrigger.java new file mode 100644 index 00000000..684a2c1d --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/IManaTrigger.java @@ -0,0 +1,24 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [May 16, 2014, 7:52:53 PM (GMT)] + */ +package vazkii.botania.api.mana; + +import net.minecraft.world.World; +import vazkii.botania.api.internal.IManaBurst; + +/** + * Have a block implement this class to make it do something when a mana burst collides with it. + */ +public interface IManaTrigger { + + public void onBurstCollision(IManaBurst burst, World world, int x, int y, int z); + +} diff --git a/src/api/java/vazkii/botania/api/mana/IManaUsingItem.java b/src/api/java/vazkii/botania/api/mana/IManaUsingItem.java new file mode 100644 index 00000000..d06cf744 --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/IManaUsingItem.java @@ -0,0 +1,26 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [May 25, 2014, 7:32:10 PM (GMT)] + */ +package vazkii.botania.api.mana; + +import net.minecraft.item.ItemStack; + +/** + * Any item that implements this interface is an item that would use mana + * from the player's inventory. If there's any items in the inventory or + * equipped in either the baubles or armor inventories that implement + * this interface, a mana bar will be rendered. + */ +public interface IManaUsingItem { + + public boolean usesMana(ItemStack stack); + +} diff --git a/src/api/java/vazkii/botania/api/mana/IPoolOverlayProvider.java b/src/api/java/vazkii/botania/api/mana/IPoolOverlayProvider.java new file mode 100644 index 00000000..f677c3ee --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/IPoolOverlayProvider.java @@ -0,0 +1,26 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jul 2, 2014, 6:36:54 PM (GMT)] + */ +package vazkii.botania.api.mana; + +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +/** + * A block that implements this can provide an IIcon (block icons only) + * to be used as an overlay for the mana pool, similarly to the mana void + * and catalysts. + */ +public interface IPoolOverlayProvider { + + public IIcon getIcon(World world, int x, int y, int z); + +} diff --git a/src/api/java/vazkii/botania/api/mana/ITinyPlanetExcempt.java b/src/api/java/vazkii/botania/api/mana/ITinyPlanetExcempt.java new file mode 100644 index 00000000..004c52ed --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/ITinyPlanetExcempt.java @@ -0,0 +1,24 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jul 22, 2014, 2:26:14 PM (GMT)] + */ +package vazkii.botania.api.mana; + +import net.minecraft.item.ItemStack; + +/** + * Any Item that implements ILensEffect and this will have + * a check before being pulled by the Tiny Planet. + */ +public interface ITinyPlanetExcempt { + + public boolean shouldPull(ItemStack stack); + +} diff --git a/src/api/java/vazkii/botania/api/mana/ManaItemHandler.java b/src/api/java/vazkii/botania/api/mana/ManaItemHandler.java new file mode 100644 index 00000000..74fb0053 --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/ManaItemHandler.java @@ -0,0 +1,201 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Mar 13, 2014, 5:32:24 PM (GMT)] + */ +package vazkii.botania.api.mana; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import vazkii.botania.api.BotaniaAPI; + +public final class ManaItemHandler { + + /** + * Requests mana from items in a given player's inventory. + * @param manaToGet How much mana is to be requested, if less mana exists than this amount, + * the amount of mana existent will be returned instead, if you want exact values use requestManaExact. + * @param remove If true, the mana will be removed from the target item. Set to false to just check. + * @return The amount of mana received from the request. + */ + public static int requestMana(ItemStack stack, EntityPlayer player, int manaToGet, boolean remove) { + if(stack == null) + return 0; + + IInventory mainInv = player.inventory; + IInventory baublesInv = BotaniaAPI.internalHandler.getBaublesInventory(player); + + int invSize = mainInv.getSizeInventory(); + int size = invSize; + if(baublesInv != null) + size += baublesInv.getSizeInventory(); + + for(int i = 0; i < size; i++) { + boolean useBaubles = i >= invSize; + IInventory inv = useBaubles ? baublesInv : mainInv; + ItemStack stackInSlot = inv.getStackInSlot(i - (useBaubles ? invSize : 0)); + if(stackInSlot == stack) + continue; + + if(stackInSlot != null && stackInSlot.getItem() instanceof IManaItem) { + IManaItem manaItem = (IManaItem) stackInSlot.getItem(); + if(manaItem.canExportManaToItem(stackInSlot, stack) && manaItem.getMana(stackInSlot) > 0) { + if(stack.getItem() instanceof IManaItem && !((IManaItem) stack.getItem()).canReceiveManaFromItem(stack, stackInSlot)) + continue; + + int mana = Math.min(manaToGet, manaItem.getMana(stackInSlot)); + + if(remove) + manaItem.addMana(stackInSlot, -mana); + + return mana; + } + } + } + + return 0; + } + + /** + * Requests an exact amount of mana from items in a given player's inventory. + * @param manaToGet How much mana is to be requested, if less mana exists than this amount, + * false will be returned instead, and nothing will happen. + * @param remove If true, the mana will be removed from the target item. Set to false to just check. + * @return If the request was succesful. + */ + public static boolean requestManaExact(ItemStack stack, EntityPlayer player, int manaToGet, boolean remove) { + if(stack == null) + return false; + + IInventory mainInv = player.inventory; + IInventory baublesInv = BotaniaAPI.internalHandler.getBaublesInventory(player); + + int invSize = mainInv.getSizeInventory(); + int size = invSize; + if(baublesInv != null) + size += baublesInv.getSizeInventory(); + + for(int i = 0; i < size; i++) { + boolean useBaubles = i >= invSize; + IInventory inv = useBaubles ? baublesInv : mainInv; + ItemStack stackInSlot = inv.getStackInSlot(i - (useBaubles ? invSize : 0)); + if(stackInSlot == stack) + continue; + + if(stackInSlot != null && stackInSlot.getItem() instanceof IManaItem) { + IManaItem manaItemSlot = (IManaItem) stackInSlot.getItem(); + if(manaItemSlot.canExportManaToItem(stackInSlot, stack) && manaItemSlot.getMana(stackInSlot) > manaToGet) { + if(stack.getItem() instanceof IManaItem && !((IManaItem) stack.getItem()).canReceiveManaFromItem(stack, stackInSlot)) + continue; + + if(remove) + manaItemSlot.addMana(stackInSlot, -manaToGet); + + return true; + } + } + } + + return false; + } + + /** + * Dispatches mana to items in a given player's inventory. Note that this method + * does not automatically remove mana from the item which is exporting. + * @param manaToSend How much mana is to be sent. + * @param remove If true, the mana will be added from the target item. Set to false to just check. + * @return The amount of mana actually sent. + */ + public static int dispatchMana(ItemStack stack, EntityPlayer player, int manaToSend, boolean add) { + if(stack == null) + return 0; + + IInventory mainInv = player.inventory; + IInventory baublesInv = BotaniaAPI.internalHandler.getBaublesInventory(player); + + int invSize = mainInv.getSizeInventory(); + int size = invSize; + if(baublesInv != null) + size += baublesInv.getSizeInventory(); + + for(int i = 0; i < size; i++) { + boolean useBaubles = i >= invSize; + IInventory inv = useBaubles ? baublesInv : mainInv; + ItemStack stackInSlot = inv.getStackInSlot(i - (useBaubles ? invSize : 0)); + if(stackInSlot == stack) + continue; + + if(stackInSlot != null && stackInSlot.getItem() instanceof IManaItem) { + IManaItem manaItemSlot = (IManaItem) stackInSlot.getItem(); + + if(manaItemSlot.canReceiveManaFromItem(stackInSlot, stack)) { + if(stack.getItem() instanceof IManaItem && !((IManaItem) stack.getItem()).canExportManaToItem(stack, stackInSlot)) + continue; + + int received = 0; + if(manaItemSlot.getMana(stackInSlot) + manaToSend <= manaItemSlot.getMaxMana(stackInSlot)) + received = manaToSend; + else received = manaToSend - (manaItemSlot.getMana(stackInSlot) + manaToSend - manaItemSlot.getMaxMana(stackInSlot)); + + + if(add) + manaItemSlot.addMana(stackInSlot, manaToSend); + + return received; + } + } + } + + return 0; + } + + /** + * Dispatches an exact amount of mana to items in a given player's inventory. Note that this method + * does not automatically remove mana from the item which is exporting. + * @param manaToSend How much mana is to be sent. + * @param remove If true, the mana will be added from the target item. Set to false to just check. + * @return If an item received the mana sent. + */ + public static boolean dispatchManaExact(ItemStack stack, EntityPlayer player, int manaToSend, boolean add) { + if(stack == null) + return false; + + IInventory mainInv = player.inventory; + IInventory baublesInv = BotaniaAPI.internalHandler.getBaublesInventory(player); + + int invSize = mainInv.getSizeInventory(); + int size = invSize; + if(baublesInv != null) + size += baublesInv.getSizeInventory(); + + for(int i = 0; i < size; i++) { + boolean useBaubles = i >= invSize; + IInventory inv = useBaubles ? baublesInv : mainInv; + ItemStack stackInSlot = inv.getStackInSlot(i - (useBaubles ? invSize : 0)); + if(stackInSlot == stack) + continue; + + if(stackInSlot != null && stackInSlot.getItem() instanceof IManaItem) { + IManaItem manaItemSlot = (IManaItem) stackInSlot.getItem(); + if(manaItemSlot.getMana(stackInSlot) + manaToSend <= manaItemSlot.getMaxMana(stackInSlot) && manaItemSlot.canReceiveManaFromItem(stackInSlot, stack)) { + if(stack.getItem() instanceof IManaItem && !((IManaItem) stack.getItem()).canExportManaToItem(stack, stackInSlot)) + continue; + + if(add) + manaItemSlot.addMana(stackInSlot, manaToSend); + + return true; + } + } + } + + return false; + } +} diff --git a/src/api/java/vazkii/botania/api/mana/ManaNetworkEvent.java b/src/api/java/vazkii/botania/api/mana/ManaNetworkEvent.java new file mode 100644 index 00000000..e04253a7 --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/ManaNetworkEvent.java @@ -0,0 +1,57 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 22, 2014, 5:04:30 PM (GMT)] + */ +package vazkii.botania.api.mana; + +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.MinecraftForge; +import cpw.mods.fml.common.eventhandler.Event; + +public class ManaNetworkEvent extends Event { + + public final TileEntity tile; + public final ManaBlockType type; + public final Action action; + + public ManaNetworkEvent(TileEntity tile, ManaBlockType type, Action action) { + this.tile = tile; + this.type = type; + this.action = action; + } + + public static void addCollector(TileEntity tile) { + ManaNetworkEvent event = new ManaNetworkEvent(tile, ManaBlockType.COLLECTOR, Action.ADD); + MinecraftForge.EVENT_BUS.post(event); + } + + public static void removeCollector(TileEntity tile) { + ManaNetworkEvent event = new ManaNetworkEvent(tile, ManaBlockType.COLLECTOR, Action.REMOVE); + MinecraftForge.EVENT_BUS.post(event); + } + + public static void addPool(TileEntity tile) { + ManaNetworkEvent event = new ManaNetworkEvent(tile, ManaBlockType.POOL, Action.ADD); + MinecraftForge.EVENT_BUS.post(event); + } + + public static void removePool(TileEntity tile) { + ManaNetworkEvent event = new ManaNetworkEvent(tile, ManaBlockType.POOL, Action.REMOVE); + MinecraftForge.EVENT_BUS.post(event); + } + + public enum ManaBlockType { + POOL, COLLECTOR + } + + public enum Action { + REMOVE, ADD + } +} diff --git a/src/api/java/vazkii/botania/api/mana/TileSignature.java b/src/api/java/vazkii/botania/api/mana/TileSignature.java new file mode 100644 index 00000000..5573670d --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/TileSignature.java @@ -0,0 +1,15 @@ +package vazkii.botania.api.mana; + +import net.minecraft.tileentity.TileEntity; + +public class TileSignature { + + public final TileEntity tile; + public final boolean remoteWorld; + + public TileSignature(TileEntity tile, boolean remoteWorld) { + this.tile = tile; + this.remoteWorld = remoteWorld; + } + +} diff --git a/src/api/java/vazkii/botania/api/mana/spark/ISparkAttachable.java b/src/api/java/vazkii/botania/api/mana/spark/ISparkAttachable.java new file mode 100644 index 00000000..4353f01c --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/spark/ISparkAttachable.java @@ -0,0 +1,54 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Aug 21, 2014, 5:44:13 PM (GMT)] + */ +package vazkii.botania.api.mana.spark; + +import net.minecraft.item.ItemStack; +import vazkii.botania.api.mana.IManaReceiver; + +/** + * A TileEntity that implements this can have a Spark attached to it. + * For the Spark to be allowed to have upgrades, it needs to be an IManaPool. + */ +public interface ISparkAttachable extends IManaReceiver { + + /** + * Can this block have a Spark attached to it. Note that this will not + * unattach the Spark if it's changed later. + */ + public boolean canAttachSpark(ItemStack stack); + + /** + * Called when the Spark is attached. + */ + public void attachSpark(ISparkEntity entity); + + /** + * Gets the Spark that is attached to this block. A common implementation is + * to check for Spark entities above: + * + List<ISparkEntity> sparks = worldObj.getEntitiesWithinAABB(ISparkEntity.class, AxisAlignedBB.getBoundingBox(xCoord, yCoord + 1, zCoord, xCoord + 1, yCoord + 2, zCoord + 1)); + if(sparks.size() == 1) { + Entity e = (Entity) sparks.get(0); + return (ISparkEntity) e; + } + + return null; + */ + public ISparkEntity getAttachedSpark(); + + /** + * Return true if this Tile no longer requires mana and all Sparks + * transferring mana to it should cancel their transfer. + */ + public boolean areIncomingTranfersDone(); + +} diff --git a/src/api/java/vazkii/botania/api/mana/spark/ISparkEntity.java b/src/api/java/vazkii/botania/api/mana/spark/ISparkEntity.java new file mode 100644 index 00000000..084b827c --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/spark/ISparkEntity.java @@ -0,0 +1,65 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Aug 21, 2014, 5:44:07 PM (GMT)] + */ +package vazkii.botania.api.mana.spark; + +import java.util.Collection; + +/** + * An Entity that implements this is considered a Spark. + */ +public interface ISparkEntity { + + /** + * Which TileEntity is this Spark attached to? A common implementation is checking the block below. + * + int x = MathHelper.floor_double(posX); + int y = MathHelper.floor_double(posY) - 1; + int z = MathHelper.floor_double(posZ); + TileEntity tile = worldObj.getTileEntity(x, y, z); + if(tile != null && tile instanceof ISparkAttachable) + return (ISparkAttachable) tile; + + return null; + */ + public ISparkAttachable getAttachedTile(); + + /** + * Gets a collection of all Sparks this is tranfering to. + */ + public Collection<ISparkEntity> getTransfers(); + + /** + * Registers the Spark passed in as a Spark meant for mana to be transfered towards. + */ + public void registerTransfer(ISparkEntity entity); + + /** + * Gets which upgrade is in this Spark.<br> + * 0: None<br> + * 1: Dispersive<br> + * 2: Dominant<br> + * 3: Recessive<br> + * 4: Isolated + */ + public int getUpgrade(); + + /** + * Sets the upgrade on this Spark. See {@link ISparkEntity#getUpgrade} + */ + public void setUpgrade(int upgrade); + + /** + * See {@link ISparkAttachable#areIncomingTranfersDone()} + */ + public boolean areIncomingTransfersDone(); + +} diff --git a/src/api/java/vazkii/botania/api/mana/spark/SparkHelper.java b/src/api/java/vazkii/botania/api/mana/spark/SparkHelper.java new file mode 100644 index 00000000..6bb3196a --- /dev/null +++ b/src/api/java/vazkii/botania/api/mana/spark/SparkHelper.java @@ -0,0 +1,33 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Aug 21, 2014, 7:16:11 PM (GMT)] + */ +package vazkii.botania.api.mana.spark; + +import java.util.List; + +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; + +public final class SparkHelper { + + public static final int SPARK_SCAN_RANGE = 12; + + public static List<ISparkEntity> getSparksAround(World world, double x, double y, double z) { + return SparkHelper.getEntitiesAround(ISparkEntity.class, world, x, y, z); + } + + public static <T> List<T> getEntitiesAround(Class<? extends T> clazz, World world, double x, double y, double z) { + int r = SPARK_SCAN_RANGE; + List<T> entities = world.getEntitiesWithinAABB(clazz, AxisAlignedBB.getBoundingBox(x - r, y - r, z - r, x + r, y + r, z + r)); + return entities; + } + +} diff --git a/src/api/java/vazkii/botania/api/package-info.java b/src/api/java/vazkii/botania/api/package-info.java new file mode 100644 index 00000000..82da263c --- /dev/null +++ b/src/api/java/vazkii/botania/api/package-info.java @@ -0,0 +1,4 @@ +@API(owner = "Botania", apiVersion = "18", provides = "BotaniaAPI") +package vazkii.botania.api; +import cpw.mods.fml.common.API; + diff --git a/src/api/java/vazkii/botania/api/recipe/IElvenItem.java b/src/api/java/vazkii/botania/api/recipe/IElvenItem.java new file mode 100644 index 00000000..e614014d --- /dev/null +++ b/src/api/java/vazkii/botania/api/recipe/IElvenItem.java @@ -0,0 +1,14 @@ +package vazkii.botania.api.recipe; + +import net.minecraft.item.ItemStack; + +/** + * Any Item that implements this is classified as an "Elven Item", by which, + * it'll not go through the alfheim portal. Any item that comes out of it + * must implement this or it'll just go back in. + */ +public interface IElvenItem { + + public boolean isElvenItem(ItemStack stack); + +} diff --git a/src/api/java/vazkii/botania/api/recipe/IFlowerComponent.java b/src/api/java/vazkii/botania/api/recipe/IFlowerComponent.java new file mode 100644 index 00000000..fe5bf3cd --- /dev/null +++ b/src/api/java/vazkii/botania/api/recipe/IFlowerComponent.java @@ -0,0 +1,26 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Feb 15, 2014, 2:36:35 PM (GMT)] + */ +package vazkii.botania.api.recipe; + +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; + +/** + * Have an Item implement this to allow it to be used in the Petal Apothecary. + */ +public interface IFlowerComponent { + + public boolean canFit(ItemStack stack, IInventory apothecary); + + public int getParticleColor(ItemStack stack); + +} diff --git a/src/api/java/vazkii/botania/api/recipe/RecipeElvenTrade.java b/src/api/java/vazkii/botania/api/recipe/RecipeElvenTrade.java new file mode 100644 index 00000000..dbea13e8 --- /dev/null +++ b/src/api/java/vazkii/botania/api/recipe/RecipeElvenTrade.java @@ -0,0 +1,94 @@ +package vazkii.botania.api.recipe; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public class RecipeElvenTrade { + + ItemStack output; + List<Object> inputs; + + public RecipeElvenTrade(ItemStack output, Object... inputs) { + this.output = output; + + List<Object> inputsToSet = new ArrayList(); + for(Object obj : inputs) { + if(obj instanceof String || obj instanceof ItemStack) + inputsToSet.add(obj); + else throw new IllegalArgumentException("Invalid input"); + } + + this.inputs = inputsToSet; + } + + public boolean matches(List<ItemStack> stacks, boolean remove) { + List<Object> inputsMissing = new ArrayList(inputs); + List<ItemStack> stacksToRemove = new ArrayList(); + + for(ItemStack stack : stacks) { + if(stack == null) { + continue; + } + if(inputsMissing.isEmpty()) + break; + + int stackIndex = -1, oredictIndex = -1; + + for(int j = 0; j < inputsMissing.size(); j++) { + Object input = inputsMissing.get(j); + if(input instanceof String) { + List<ItemStack> validStacks = OreDictionary.getOres((String) input); + boolean found = false; + for(ItemStack ostack : validStacks) { + ItemStack cstack = ostack.copy(); + if(cstack.getItemDamage() == Short.MAX_VALUE) + cstack.setItemDamage(stack.getItemDamage()); + + if(stack.isItemEqual(cstack)) { + if(!stacksToRemove.contains(stack)) + stacksToRemove.add(stack); + oredictIndex = j; + found = true; + break; + } + } + + if(found) + break; + } else if(input instanceof ItemStack && simpleAreStacksEqual((ItemStack) input, stack)) { + if(!stacksToRemove.contains(stack)) + stacksToRemove.add(stack); + stackIndex = j; + break; + } + } + + if(stackIndex != -1) + inputsMissing.remove(stackIndex); + else if(oredictIndex != -1) + inputsMissing.remove(oredictIndex); + } + + if(remove) + for(ItemStack r : stacksToRemove) + stacks.remove(r); + + return inputsMissing.isEmpty(); + } + + boolean simpleAreStacksEqual(ItemStack stack, ItemStack stack2) { + return stack.getItem() == stack2.getItem() && stack.getItemDamage() == stack2.getItemDamage(); + } + + public List<Object> getInputs() { + return new ArrayList(inputs); + } + + public ItemStack getOutput() { + return output; + } + +} diff --git a/src/api/java/vazkii/botania/api/recipe/RecipeManaInfusion.java b/src/api/java/vazkii/botania/api/recipe/RecipeManaInfusion.java new file mode 100644 index 00000000..e87b002d --- /dev/null +++ b/src/api/java/vazkii/botania/api/recipe/RecipeManaInfusion.java @@ -0,0 +1,81 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 30, 2014, 5:57:07 PM (GMT)] + */ +package vazkii.botania.api.recipe; + +import java.util.List; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public class RecipeManaInfusion { + + ItemStack output; + Object input; + int mana; + boolean isAlchemy = false; + boolean isConjuration = false; + + public RecipeManaInfusion(ItemStack output, Object input, int mana) { + this.output = output; + this.input = input; + this.mana = mana; + } + + public boolean matches(ItemStack stack) { + if(input instanceof ItemStack) + return stack.isItemEqual((ItemStack) input); + + if(input instanceof String) { + List<ItemStack> validStacks = OreDictionary.getOres((String) input); + + for(ItemStack ostack : validStacks) { + ItemStack cstack = ostack.copy(); + if(cstack.getItemDamage() == Short.MAX_VALUE) + cstack.setItemDamage(stack.getItemDamage()); + + if(stack.isItemEqual(cstack)) + return true; + } + } + + return false; + } + + public void setAlchemy(boolean alchemy) { + isAlchemy = alchemy; + } + + public boolean isAlchemy() { + return isAlchemy; + } + + public void setConjuration(boolean conjuration) { + isConjuration = conjuration; + } + + public boolean isConjuration() { + return isConjuration; + } + + public Object getInput() { + return input; + } + + public ItemStack getOutput() { + return output; + } + + public int getManaToConsume() { + return mana; + } +} + diff --git a/src/api/java/vazkii/botania/api/recipe/RecipePetals.java b/src/api/java/vazkii/botania/api/recipe/RecipePetals.java new file mode 100644 index 00000000..0dba51ac --- /dev/null +++ b/src/api/java/vazkii/botania/api/recipe/RecipePetals.java @@ -0,0 +1,97 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 22, 2014, 2:02:44 PM (GMT)] + */ +package vazkii.botania.api.recipe; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public class RecipePetals { + + ItemStack output; + List<Object> inputs; + + public RecipePetals(ItemStack output, Object... inputs) { + this.output = output; + + List<Object> inputsToSet = new ArrayList(); + for(Object obj : inputs) { + if(obj instanceof String || obj instanceof ItemStack) + inputsToSet.add(obj); + else throw new IllegalArgumentException("Invalid input"); + } + + this.inputs = inputsToSet; + } + + public boolean matches(IInventory inv) { + List<Object> inputsMissing = new ArrayList(inputs); + + for(int i = 0; i < inv.getSizeInventory(); i++) { + ItemStack stack = inv.getStackInSlot(i); + if(stack == null) + break; + + int stackIndex = -1, oredictIndex = -1; + + for(int j = 0; j < inputsMissing.size(); j++) { + Object input = inputsMissing.get(j); + if(input instanceof String) { + List<ItemStack> validStacks = OreDictionary.getOres((String) input); + boolean found = false; + for(ItemStack ostack : validStacks) { + ItemStack cstack = ostack.copy(); + if(cstack.getItemDamage() == Short.MAX_VALUE) + cstack.setItemDamage(stack.getItemDamage()); + + if(stack.isItemEqual(cstack)) { + oredictIndex = j; + found = true; + break; + } + } + + + if(found) + break; + } else if(input instanceof ItemStack && simpleAreStacksEqual((ItemStack) input, stack)) { + stackIndex = j; + break; + } + } + + if(stackIndex != -1) + inputsMissing.remove(stackIndex); + else if(oredictIndex != -1) + inputsMissing.remove(oredictIndex); + else return false; + } + + return inputsMissing.isEmpty(); + } + + boolean simpleAreStacksEqual(ItemStack stack, ItemStack stack2) { + return stack.getItem() == stack2.getItem() && stack.getItemDamage() == stack2.getItemDamage(); + } + + public List<Object> getInputs() { + return new ArrayList(inputs); + } + + public ItemStack getOutput() { + return output; + } + +} diff --git a/src/api/java/vazkii/botania/api/recipe/RecipeRuneAltar.java b/src/api/java/vazkii/botania/api/recipe/RecipeRuneAltar.java new file mode 100644 index 00000000..745c9573 --- /dev/null +++ b/src/api/java/vazkii/botania/api/recipe/RecipeRuneAltar.java @@ -0,0 +1,31 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Feb 5, 2014, 1:41:14 PM (GMT)] + */ +package vazkii.botania.api.recipe; + +import net.minecraft.item.ItemStack; + +public class RecipeRuneAltar extends RecipePetals { + + ItemStack output; + int mana; + + public RecipeRuneAltar(ItemStack output, int mana, Object... inputs) { + super(output, inputs); + this.output = output; + this.mana = mana; + } + + public int getManaUsage() { + return mana; + } + +} diff --git a/src/api/java/vazkii/botania/api/subtile/ISpecialFlower.java b/src/api/java/vazkii/botania/api/subtile/ISpecialFlower.java new file mode 100644 index 00000000..0ef31493 --- /dev/null +++ b/src/api/java/vazkii/botania/api/subtile/ISpecialFlower.java @@ -0,0 +1,21 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 22, 2014, 7:12:28 PM (GMT)] + */ +package vazkii.botania.api.subtile; + +/** + * The special flowers in botania implement this. Used for cases where + * BlockFlower would be checked against, but isn't convenient for + * the special flowers with effects. For Azanor and Lycaon. + */ +public interface ISpecialFlower { + +} diff --git a/src/api/java/vazkii/botania/api/subtile/ISubTileContainer.java b/src/api/java/vazkii/botania/api/subtile/ISubTileContainer.java new file mode 100644 index 00000000..ddfaee7f --- /dev/null +++ b/src/api/java/vazkii/botania/api/subtile/ISubTileContainer.java @@ -0,0 +1,30 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Aug 26, 2014, 5:42:16 PM (GMT)] + */ +package vazkii.botania.api.subtile; + +/** + * A TileEntity that implements this contains a SubTileEntity. + */ +public interface ISubTileContainer { + + /** + * Gets the SubTile in this block. Generally shouldn't return null, but in that + * case use the fallback DummySubTile. + */ + public SubTileEntity getSubTile(); + + /** + * Sets the SubTile on this block from it's name. + */ + public void setSubTile(String name); + +} diff --git a/src/api/java/vazkii/botania/api/subtile/SubTileEntity.java b/src/api/java/vazkii/botania/api/subtile/SubTileEntity.java new file mode 100644 index 00000000..619d00f3 --- /dev/null +++ b/src/api/java/vazkii/botania/api/subtile/SubTileEntity.java @@ -0,0 +1,126 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 24, 2014, 3:59:06 PM (GMT)] + */ +package vazkii.botania.api.subtile; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.util.IIcon; +import vazkii.botania.api.BotaniaAPI; +import vazkii.botania.api.lexicon.LexiconEntry; +import vazkii.botania.api.wand.IWandBindable; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +/** + * A Sub-TileEntity, this is used for the flower system. Make sure to map subclasses + * of this using BotaniaAPI.mapSubTile(String, Class). Any subclass of this must have + * a no parameter constructor. + */ +public class SubTileEntity { + + protected TileEntity supertile; + + /** The Tag items should use to store which sub tile they are. **/ + public static final String TAG_TYPE = "type"; + + public void setSupertile(TileEntity tile) { + supertile = tile; + } + + public boolean canUpdate() { + return false; + } + + public void onUpdate() { } + + /** + * Writes some extra data to a network packet. This data is read + * by readFromPacketNBT on the client that receives the packet. + * Note: This method is also used to write to the world NBT. + */ + public void writeToPacketNBT(NBTTagCompound cmp) { } + + /** + * Reads data from a network packet. This data is written by + * writeToPacketNBT in the server. Note: This method is also used + * to read from the world NBT. + */ + public void readFromPacketNBT(NBTTagCompound cmp) { } + + public void sync() { + supertile.getWorldObj().markBlockForUpdate(supertile.xCoord, supertile.yCoord, supertile.zCoord); + } + + public String getUnlocalizedName() { + return BotaniaAPI.getSubTileStringMapping(getClass()); + } + + /** + * Gets the icon for this SubTileEntity, this is a block icon. + */ + @SideOnly(Side.CLIENT) + public IIcon getIcon() { + return BotaniaAPI.internalHandler.getSubTileIconForName(getUnlocalizedName()); + } + + /** + * Called when a Wand of the Forest is used on this sub tile. Note that the + * player parameter can be null if this is called from a dispenser. + */ + public boolean onWanded(EntityPlayer player, ItemStack wand) { + return false; + } + + /** + * Gets which Lexicon Entry to open when this sub tile is right clicked with a lexicon. + */ + public LexiconEntry getEntry() { + return null; + } + + /** + * Gets the block coordinates this is bound to, for use with the wireframe render + * when the sub tile is being hovered with a wand of the forest. + */ + @SideOnly(Side.CLIENT) + public ChunkCoordinates getBinding() { + return null; + } + + /** + * @see IWandBindable#canSelect(EntityPlayer, ItemStack, int, int, int, int) + */ + public boolean canSelect(EntityPlayer player, ItemStack wand, int x, int y, int z, int side) { + return false; + } + + /** + * @see IWandBindable#bindTo(EntityPlayer, ItemStack, int, int, int, int) + */ + public boolean bindTo(EntityPlayer player, ItemStack wand, int x, int y, int z, int side) { + return false; + } + + /** + * Called on the client when the block being pointed at is the one with this sub tile. + * Used to render a HUD portraying some data from this sub tile. + */ + @SideOnly(Side.CLIENT) + public void renderHUD(Minecraft mc, ScaledResolution res) { + // NO-OP + } +} diff --git a/src/api/java/vazkii/botania/api/subtile/SubTileFunctional.java b/src/api/java/vazkii/botania/api/subtile/SubTileFunctional.java new file mode 100644 index 00000000..7d95afe7 --- /dev/null +++ b/src/api/java/vazkii/botania/api/subtile/SubTileFunctional.java @@ -0,0 +1,212 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 24, 2014, 8:03:44 PM (GMT)] + */ +package vazkii.botania.api.subtile; + +import java.awt.Color; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.util.StatCollector; +import net.minecraftforge.common.util.ForgeDirection; +import vazkii.botania.api.BotaniaAPI; +import vazkii.botania.api.internal.IManaNetwork; +import vazkii.botania.api.mana.IManaPool; + +/** + * The basic class for a Functional Flower. + */ +public class SubTileFunctional extends SubTileEntity { + + private static final String TAG_MANA = "mana"; + + private static final String TAG_POOL_X = "poolX"; + private static final String TAG_POOL_Y = "poolY"; + private static final String TAG_POOL_Z = "poolZ"; + + public int mana; + + public int redstoneSignal = 0; + + int sizeLastCheck = -1; + TileEntity linkedPool = null; + public int knownMana = -1; + + ChunkCoordinates cachedPoolCoordinates = null; + + @Override + public boolean canUpdate() { + return true; + } + + /** + * If set to true, redstoneSignal will be updated every tick. + */ + public boolean acceptsRedstone() { + return false; + } + + @Override + public void onUpdate() { + super.onUpdate(); + + linkPool(); + + if(linkedPool != null) { + IManaPool pool = (IManaPool) linkedPool; + int manaInPool = pool.getCurrentMana(); + int manaMissing = getMaxMana() - mana; + int manaToRemove = Math.min(manaMissing, manaInPool); + pool.recieveMana(-manaToRemove); + addMana(manaToRemove); + } + + if(acceptsRedstone()) { + redstoneSignal = 0; + for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) { + int redstoneSide = supertile.getWorldObj().getIndirectPowerLevelTo(supertile.xCoord + dir.offsetX, supertile.yCoord + dir.offsetY, supertile.zCoord + dir.offsetZ, dir.ordinal()); + redstoneSignal = Math.max(redstoneSignal, redstoneSide); + } + } + + if(supertile.getWorldObj().isRemote) { + double particleChance = 1F - (double) mana / (double) getMaxMana() / 3.5F; + Color color = new Color(getColor()); + if(Math.random() > particleChance) + BotaniaAPI.internalHandler.sparkleFX(supertile.getWorldObj(), supertile.xCoord + 0.3 + Math.random() * 0.5, supertile.yCoord + 0.5 + Math.random() * 0.5, supertile.zCoord + 0.3 + Math.random() * 0.5, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, (float) Math.random(), 5); + } + } + + public void linkPool() { + final int range = 10; + + boolean needsNew = false; + if(linkedPool == null) { + needsNew = true; + + if(cachedPoolCoordinates != null && supertile.getWorldObj().blockExists(cachedPoolCoordinates.posX, cachedPoolCoordinates.posY, cachedPoolCoordinates.posZ)) { + TileEntity tileAt = supertile.getWorldObj().getTileEntity(cachedPoolCoordinates.posX, cachedPoolCoordinates.posY, cachedPoolCoordinates.posZ); + if(tileAt != null && tileAt instanceof IManaPool) { + linkedPool = tileAt; + needsNew = false; + } + cachedPoolCoordinates = null; + } + } + + if(!needsNew) { + TileEntity tileAt = supertile.getWorldObj().getTileEntity(linkedPool.xCoord, linkedPool.yCoord, linkedPool.zCoord); + if(!(tileAt instanceof IManaPool)) { + linkedPool = null; + needsNew = true; + } else linkedPool = tileAt; + } + + if(needsNew) { + IManaNetwork network = BotaniaAPI.internalHandler.getManaNetworkInstance(); + int size = network.getAllPoolsInWorld(supertile.getWorldObj()).size(); + if(BotaniaAPI.internalHandler.shouldForceCheck() || size != sizeLastCheck) { + ChunkCoordinates coords = new ChunkCoordinates(supertile.xCoord, supertile.yCoord, supertile.zCoord); + linkedPool = network.getClosestPool(coords, supertile.getWorldObj(), range); + sizeLastCheck = size; + } + } + } + + public void addMana(int mana) { + this.mana = Math.min(getMaxMana(), this.mana + mana); + } + + @Override + public boolean onWanded(EntityPlayer player, ItemStack wand) { + if(player == null) + return false; + + knownMana = mana; + player.worldObj.playSoundAtEntity(player, "botania:ding", 0.1F, 1F); + + return super.onWanded(player, wand); + } + + public int getMaxMana() { + return 20; + } + + public int getColor() { + return 0xFFFFFF; + } + + @Override + public void readFromPacketNBT(NBTTagCompound cmp) { + mana = cmp.getInteger(TAG_MANA); + + int x = cmp.getInteger(TAG_POOL_X); + int y = cmp.getInteger(TAG_POOL_Y); + int z = cmp.getInteger(TAG_POOL_Z); + + cachedPoolCoordinates = new ChunkCoordinates(x, y, z); + } + + @Override + public void writeToPacketNBT(NBTTagCompound cmp) { + cmp.setInteger(TAG_MANA, mana); + + int x = linkedPool == null ? 0 : linkedPool.xCoord; + int y = linkedPool == null ? -1 : linkedPool.yCoord; + int z = linkedPool == null ? 0 : linkedPool.zCoord; + + cmp.setInteger(TAG_POOL_X, x); + cmp.setInteger(TAG_POOL_Y, y); + cmp.setInteger(TAG_POOL_Z, z); + } + + @Override + public ChunkCoordinates getBinding() { + if(linkedPool == null) + return null; + return new ChunkCoordinates(linkedPool.xCoord, linkedPool.yCoord, linkedPool.zCoord); + } + + @Override + public boolean canSelect(EntityPlayer player, ItemStack wand, int x, int y, int z, int side) { + return true; + } + + @Override + public boolean bindTo(EntityPlayer player, ItemStack wand, int x, int y, int z, int side) { + int range = 10; + range *= range; + + double dist = (x - supertile.xCoord) * (x - supertile.xCoord) + (y - supertile.yCoord) * (y - supertile.yCoord) + (z - supertile.zCoord) * (z - supertile.zCoord); + if(range >= dist) { + TileEntity tile = player.worldObj.getTileEntity(x, y, z); + if(tile instanceof IManaPool) { + linkedPool = tile; + return true; + } + } + + return false; + } + + @Override + public void renderHUD(Minecraft mc, ScaledResolution res) { + String name = StatCollector.translateToLocal("tile.botania:flower." + getUnlocalizedName() + ".name"); + int color = 0x66000000 | getColor(); + BotaniaAPI.internalHandler.drawSimpleManaHUD(color, knownMana, getMaxMana(), name, res); + } + +} diff --git a/src/api/java/vazkii/botania/api/subtile/SubTileGenerating.java b/src/api/java/vazkii/botania/api/subtile/SubTileGenerating.java new file mode 100644 index 00000000..9c44868d --- /dev/null +++ b/src/api/java/vazkii/botania/api/subtile/SubTileGenerating.java @@ -0,0 +1,245 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 24, 2014, 8:03:36 PM (GMT)] + */ +package vazkii.botania.api.subtile; + +import java.awt.Color; + +import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.util.StatCollector; +import vazkii.botania.api.BotaniaAPI; +import vazkii.botania.api.internal.IManaNetwork; +import vazkii.botania.api.mana.IManaCollector; + +/** + * The basic class for a Generating Flower. + */ +public class SubTileGenerating extends SubTileEntity { + + private static final String TAG_MANA = "mana"; + private static final String TAG_TICKS_EXISTED = "ticksExisted"; + + private static final String TAG_COLLECTOR_X = "collectorX"; + private static final String TAG_COLLECTOR_Y = "collectorY"; + private static final String TAG_COLLECTOR_Z = "collectorZ"; + + protected int mana; + + int ticksExisted = 0; + int sizeLastCheck = -1; + protected TileEntity linkedCollector = null; + public int knownMana = -1; + + ChunkCoordinates cachedCollectorCoordinates = null; + + @Override + public boolean canUpdate() { + return true; + } + + @Override + public void onUpdate() { + super.onUpdate(); + + linkCollector(); + + if(canGeneratePassively()) { + int delay = getDelayBetweenPassiveGeneration(); + if(delay > 0 && supertile.getWorldObj().getWorldTime() % delay == 0) { + if(shouldSyncPassiveGeneration()) + sync(); + addMana(getValueForPassiveGeneration()); + } + } + emptyManaIntoCollector(); + + if(supertile.getWorldObj().isRemote) { + double particleChance = 1F - (double) mana / (double) getMaxMana() / 3.5F; + Color color = new Color(getColor()); + if(Math.random() > particleChance) + BotaniaAPI.internalHandler.sparkleFX(supertile.getWorldObj(), supertile.xCoord + 0.3 + Math.random() * 0.5, supertile.yCoord + 0.5 + Math.random() * 0.5, supertile.zCoord + 0.3 + Math.random() * 0.5, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, (float) Math.random(), 5); + } + + if(!supertile.getWorldObj().isRemote) { + ++ticksExisted; + int muhBalance = BotaniaAPI.internalHandler.getPassiveFlowerDecay(); + + if(isPassiveFlower() && muhBalance > 0 && ticksExisted > muhBalance) { + supertile.getWorldObj().playAuxSFX(2001, supertile.xCoord, supertile.yCoord, supertile.zCoord, Block.getIdFromBlock(supertile.getBlockType())); + supertile.getWorldObj().setBlockToAir(supertile.xCoord, supertile.yCoord, supertile.zCoord); + } + } + } + + public void linkCollector() { + final int range = 6; + + boolean needsNew = false; + if(linkedCollector == null) { + needsNew = true; + + if(cachedCollectorCoordinates != null && supertile.getWorldObj().blockExists(cachedCollectorCoordinates.posX, cachedCollectorCoordinates.posY, cachedCollectorCoordinates.posZ)) { + TileEntity tileAt = supertile.getWorldObj().getTileEntity(cachedCollectorCoordinates.posX, cachedCollectorCoordinates.posY, cachedCollectorCoordinates.posZ); + if(tileAt != null && tileAt instanceof IManaCollector) { + linkedCollector = tileAt; + needsNew = false; + } + cachedCollectorCoordinates = null; + } + } + + if(!needsNew) { + TileEntity tileAt = supertile.getWorldObj().getTileEntity(linkedCollector.xCoord, linkedCollector.yCoord, linkedCollector.zCoord); + if(!(tileAt instanceof IManaCollector)) { + linkedCollector = null; + needsNew = true; + } else linkedCollector = tileAt; + } + + if(needsNew) { + IManaNetwork network = BotaniaAPI.internalHandler.getManaNetworkInstance(); + int size = network.getAllCollectorsInWorld(supertile.getWorldObj()).size(); + if(BotaniaAPI.internalHandler.shouldForceCheck() || size != sizeLastCheck) { + ChunkCoordinates coords = new ChunkCoordinates(supertile.xCoord, supertile.yCoord, supertile.zCoord); + linkedCollector = network.getClosestCollector(coords, supertile.getWorldObj(), range); + sizeLastCheck = size; + } + } + } + + public void addMana(int mana) { + this.mana = Math.min(getMaxMana(), this.mana + mana); + } + + public void emptyManaIntoCollector() { + if(linkedCollector != null) { + IManaCollector collector = (IManaCollector) linkedCollector; + if(!collector.isFull() && mana > 0) { + int manaval = Math.min(mana, collector.getMaxMana() - collector.getCurrentMana()); + mana -= manaval; + collector.recieveMana(manaval); + } + } + } + + public boolean isPassiveFlower() { + return false; + } + + public boolean shouldSyncPassiveGeneration() { + return false; + } + + public boolean canGeneratePassively() { + return false; + } + + public int getDelayBetweenPassiveGeneration() { + return 20; + } + + public int getValueForPassiveGeneration() { + return 1; + } + + @Override + public boolean onWanded(EntityPlayer player, ItemStack wand) { + if(player == null) + return false; + + if(!player.worldObj.isRemote) + sync(); + + knownMana = mana; + player.worldObj.playSoundAtEntity(player, "botania:ding", 0.1F, 1F); + + return super.onWanded(player, wand); + } + + public int getMaxMana() { + return 20; + } + + public int getColor() { + return 0xFFFFFF; + } + + @Override + public void readFromPacketNBT(NBTTagCompound cmp) { + mana = cmp.getInteger(TAG_MANA); + if(!cmp.hasKey(TAG_TICKS_EXISTED)) + ticksExisted = cmp.getInteger(TAG_TICKS_EXISTED); + + int x = cmp.getInteger(TAG_COLLECTOR_X); + int y = cmp.getInteger(TAG_COLLECTOR_Y); + int z = cmp.getInteger(TAG_COLLECTOR_Z); + + cachedCollectorCoordinates = new ChunkCoordinates(x, y, z); + } + + @Override + public void writeToPacketNBT(NBTTagCompound cmp) { + cmp.setInteger(TAG_MANA, mana); + cmp.setInteger(TAG_TICKS_EXISTED, ticksExisted); + + int x = linkedCollector == null ? 0 : linkedCollector.xCoord; + int y = linkedCollector == null ? -1 : linkedCollector.yCoord; + int z = linkedCollector == null ? 0 : linkedCollector.zCoord; + + cmp.setInteger(TAG_COLLECTOR_X, x); + cmp.setInteger(TAG_COLLECTOR_Y, y); + cmp.setInteger(TAG_COLLECTOR_Z, z); + } + + @Override + public ChunkCoordinates getBinding() { + if(linkedCollector == null) + return null; + return new ChunkCoordinates(linkedCollector.xCoord, linkedCollector.yCoord, linkedCollector.zCoord); + } + + @Override + public boolean canSelect(EntityPlayer player, ItemStack wand, int x, int y, int z, int side) { + return true; + } + + @Override + public boolean bindTo(EntityPlayer player, ItemStack wand, int x, int y, int z, int side) { + int range = 6; + range *= range; + + double dist = (x - supertile.xCoord) * (x - supertile.xCoord) + (y - supertile.yCoord) * (y - supertile.yCoord) + (z - supertile.zCoord) * (z - supertile.zCoord); + if(range >= dist) { + TileEntity tile = player.worldObj.getTileEntity(x, y, z); + if(tile instanceof IManaCollector) { + linkedCollector = tile; + return true; + } + } + + return false; + } + + @Override + public void renderHUD(Minecraft mc, ScaledResolution res) { + String name = StatCollector.translateToLocal("tile.botania:flower." + getUnlocalizedName() + ".name"); + int color = 0x66000000 | getColor(); + BotaniaAPI.internalHandler.drawSimpleManaHUD(color, knownMana, getMaxMana(), name, res); + } + +} diff --git a/src/api/java/vazkii/botania/api/wand/ICoordBoundItem.java b/src/api/java/vazkii/botania/api/wand/ICoordBoundItem.java new file mode 100644 index 00000000..f7c8036d --- /dev/null +++ b/src/api/java/vazkii/botania/api/wand/ICoordBoundItem.java @@ -0,0 +1,18 @@ +package vazkii.botania.api.wand; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChunkCoordinates; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +/** + * The item equivalent of ITileBound, renders when the + * item is in hand. + * @see ITileBound + */ +public interface ICoordBoundItem { + + @SideOnly(Side.CLIENT) + public ChunkCoordinates getBinding(ItemStack stack); + +} diff --git a/src/api/java/vazkii/botania/api/wand/ITileBound.java b/src/api/java/vazkii/botania/api/wand/ITileBound.java new file mode 100644 index 00000000..25a8683c --- /dev/null +++ b/src/api/java/vazkii/botania/api/wand/ITileBound.java @@ -0,0 +1,31 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Mar 24, 2014, 6:47:53 PM (GMT)] + */ +package vazkii.botania.api.wand; + +import net.minecraft.util.ChunkCoordinates; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +/** + * Any TileEntity that implements this is technically bound + * to something, and the binding will be shown when hovering + * over with a Wand of the Forest. + */ +public interface ITileBound { + + /** + * Gets where this block is bound to, can return null. + */ + @SideOnly(Side.CLIENT) + public ChunkCoordinates getBinding(); + +} diff --git a/src/api/java/vazkii/botania/api/wand/IWandBindable.java b/src/api/java/vazkii/botania/api/wand/IWandBindable.java new file mode 100644 index 00000000..02d0771c --- /dev/null +++ b/src/api/java/vazkii/botania/api/wand/IWandBindable.java @@ -0,0 +1,36 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Oct 9, 2014, 3:01:58 PM (GMT)] + */ +package vazkii.botania.api.wand; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MovingObjectPosition; + +/** + * A TileEntity that implements this can be bound to another block + * via the Wand of the Forest. Also see IWireframeAABBProvider to change + * the displayed bounding box. + */ +public interface IWandBindable extends ITileBound { + + /** + * Return true if the Wand can select this tile. + */ + public boolean canSelect(EntityPlayer player, ItemStack wand, int x, int y, int z, int side); + + /** + * Call to bind the TileEntity to where the player clicked. Return true to deselect + * the TileEntity for another bind or false case the TileEntity should stay selected. + */ + public boolean bindTo(EntityPlayer player, ItemStack wand, int x, int y, int z, int side); + +} diff --git a/src/api/java/vazkii/botania/api/wand/IWandHUD.java b/src/api/java/vazkii/botania/api/wand/IWandHUD.java new file mode 100644 index 00000000..57c7e313 --- /dev/null +++ b/src/api/java/vazkii/botania/api/wand/IWandHUD.java @@ -0,0 +1,26 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Feb 5, 2014, 1:34:44 PM (GMT)] + */ +package vazkii.botania.api.wand; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.world.World; + +/** + * Any block that implements this has a HUD rendered when being hovered + * with a Wand of the Forest. + */ +public interface IWandHUD { + + public void renderHUD(Minecraft mc, ScaledResolution res, World world, int x, int y, int z); + +} diff --git a/src/api/java/vazkii/botania/api/wand/IWandable.java b/src/api/java/vazkii/botania/api/wand/IWandable.java new file mode 100644 index 00000000..0cdcf1f1 --- /dev/null +++ b/src/api/java/vazkii/botania/api/wand/IWandable.java @@ -0,0 +1,29 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jan 22, 2014, 5:12:53 PM (GMT)] + */ +package vazkii.botania.api.wand; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +/** + * Any block that implements this can be used with the Wand for the Forest for some purpose. + */ +public interface IWandable { + + /** + * Called when the block is used by a wand. Note that the player parameter can be null + * if this function is called from a dispenser. + */ + public boolean onUsedByWand(EntityPlayer player, ItemStack stack, World world, int x, int y, int z, int side); + +} diff --git a/src/api/java/vazkii/botania/api/wand/IWireframeAABBProvider.java b/src/api/java/vazkii/botania/api/wand/IWireframeAABBProvider.java new file mode 100644 index 00000000..d20b6660 --- /dev/null +++ b/src/api/java/vazkii/botania/api/wand/IWireframeAABBProvider.java @@ -0,0 +1,25 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Apr 19, 2014, 7:23:59 PM (GMT)] + */ +package vazkii.botania.api.wand; + +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; + +/** + * A block that implements this can provide a custom AABB + * for rendering the wireframe with ITileBound. + */ +public interface IWireframeAABBProvider { + + public AxisAlignedBB getWireframeAABB(World world, int x, int y, int z); + +} diff --git a/src/api/java/vazkii/botania/api/wiki/IWikiProvider.java b/src/api/java/vazkii/botania/api/wiki/IWikiProvider.java new file mode 100644 index 00000000..42e61147 --- /dev/null +++ b/src/api/java/vazkii/botania/api/wiki/IWikiProvider.java @@ -0,0 +1,39 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Sep 2, 2014, 5:57:35 PM (GMT)] + */ +package vazkii.botania.api.wiki; + +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; + +/** + * An interface for a Wiki Provider, these are registered to allow a mod to provide a wiki + * for all the blocks in them, used for the world interaction with the Lexica Botania. + * A simple, mostly all-inclusive implementation can be found on SimpleWikiProvider. + */ +public interface IWikiProvider { + + /** + * Gets the name of the block being looked at for display. + */ + public String getBlockName(World world, MovingObjectPosition pos); + + /** + * Gets the URL to open when the block is clicked. + */ + public String getWikiURL(World world, MovingObjectPosition pos); + + /** + * Gets the name of the wiki for display. + */ + public String getWikiName(World world, MovingObjectPosition pos); + +} diff --git a/src/api/java/vazkii/botania/api/wiki/SimpleWikiProvider.java b/src/api/java/vazkii/botania/api/wiki/SimpleWikiProvider.java new file mode 100644 index 00000000..6105c718 --- /dev/null +++ b/src/api/java/vazkii/botania/api/wiki/SimpleWikiProvider.java @@ -0,0 +1,73 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Sep 2, 2014, 5:58:39 PM (GMT)] + */ +package vazkii.botania.api.wiki; + +import org.apache.commons.lang3.text.WordUtils; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; + +public class SimpleWikiProvider implements IWikiProvider { + + final String name, urlBase, replacement; + + public SimpleWikiProvider(String name, String urlBase) { + this(name, urlBase, "%20"); + } + + public SimpleWikiProvider(String name, String urlBase, String replacement) { + this.name = name; + this.urlBase = urlBase; + this.replacement = replacement; + } + + @Override + public String getBlockName(World world, MovingObjectPosition pos) { + int x = pos.blockX; + int y = pos.blockY; + int z = pos.blockZ; + + Block block = world.getBlock(x, y, z); + if(block == null) + return null; + + ItemStack stack = block.getPickBlock(pos, world, x, y, z); + + if(stack == null || stack.getItem() == null) + stack = new ItemStack(block, 1, world.getBlockMetadata(x, y, z)); + + if(stack.getItem() == null) + return null; + + String name = stack.getDisplayName(); + if(name == null || name.isEmpty()) + return null; + + return name; + } + + @Override + public String getWikiURL(World world, MovingObjectPosition pos) { + String name = getBlockName(world, pos); + if(name == null) + return null; + return String.format(urlBase, WordUtils.capitalizeFully(name).replaceAll(" ", replacement)); + } + + @Override + public String getWikiName(World world, MovingObjectPosition pos) { + return name; + } + +} diff --git a/src/api/java/vazkii/botania/api/wiki/WikiHooks.java b/src/api/java/vazkii/botania/api/wiki/WikiHooks.java new file mode 100644 index 00000000..40f586e6 --- /dev/null +++ b/src/api/java/vazkii/botania/api/wiki/WikiHooks.java @@ -0,0 +1,43 @@ +/** + * This class was created by <Vazkii>. It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Sep 2, 2014, 6:05:03 PM (GMT)] + */ +package vazkii.botania.api.wiki; + +import java.util.HashMap; +import java.util.Map; + +import net.minecraft.block.Block; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier; + +public class WikiHooks { + + private static final IWikiProvider FALLBACK_PROVIDER = new SimpleWikiProvider("FTB Wiki", "http://wiki.feed-the-beast.com/%s"); + + private static final Map<String, IWikiProvider> modWikis = new HashMap(); + + public static IWikiProvider getWikiFor(Block block) { + UniqueIdentifier mod = GameRegistry.findUniqueIdentifierFor(block); + return getWikiFor(mod.modId.toLowerCase()); + } + + public static IWikiProvider getWikiFor(String mod) { + if(!modWikis.containsKey(mod)) + modWikis.put(mod, FALLBACK_PROVIDER); + + return modWikis.get(mod); + } + + public static void registerModWiki(String mod, IWikiProvider provider) { + modWikis.put(mod.toLowerCase(), provider); + } + +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index a76b1bad..f43059b2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -11,7 +11,7 @@ import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; -import WayofTime.alchemicalWizardry.common.potion.*; +import WayofTime.alchemicalWizardry.common.thread.CommandDownloadGAPI; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -28,20 +28,6 @@ import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.common.Loader; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.Mod.EventHandler; -import net.minecraftforge.fml.common.Mod.Instance; -import net.minecraftforge.fml.common.ModContainer; -import net.minecraftforge.fml.common.SidedProxy; -import net.minecraftforge.fml.common.event.FMLInitializationEvent; -import net.minecraftforge.fml.common.event.FMLInterModComms; -import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; -import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; -import net.minecraftforge.fml.common.network.NetworkRegistry; -import net.minecraftforge.fml.common.registry.EntityRegistry; -import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.RecipeSorter; import net.minecraftforge.oredict.RecipeSorter.Category; @@ -50,10 +36,10 @@ import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -//import thaumcraft.api.ItemApi; -//import thaumcraft.api.ThaumcraftApi; -//import thaumcraft.api.aspects.Aspect; -//import thaumcraft.api.aspects.AspectList; +import thaumcraft.api.ItemApi; +import thaumcraft.api.ThaumcraftApi; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; @@ -66,6 +52,7 @@ import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; import WayofTime.alchemicalWizardry.api.rituals.Rituals; +import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; import WayofTime.alchemicalWizardry.api.soulNetwork.ComplexNetworkHandler; import WayofTime.alchemicalWizardry.api.spell.SpellEffectRegistry; import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; @@ -83,8 +70,12 @@ import WayofTime.alchemicalWizardry.common.ModLivingDropsEvent; import WayofTime.alchemicalWizardry.common.NewPacketHandler; import WayofTime.alchemicalWizardry.common.achievements.ModAchievements; import WayofTime.alchemicalWizardry.common.alchemy.CombinedPotionRegistry; -import WayofTime.alchemicalWizardry.common.block.BlockArmourForge; +import WayofTime.alchemicalWizardry.common.block.ArmourForge; import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars; +import WayofTime.alchemicalWizardry.common.book.BloodMagicGuide; +import WayofTime.alchemicalWizardry.common.commands.CommandBind; +import WayofTime.alchemicalWizardry.common.commands.CommandSN; +import WayofTime.alchemicalWizardry.common.commands.CommandUnbind; import WayofTime.alchemicalWizardry.common.compress.AdvancedCompressionHandler; import WayofTime.alchemicalWizardry.common.compress.BaseCompressionHandler; import WayofTime.alchemicalWizardry.common.compress.StorageBlockCraftingManager; @@ -117,19 +108,41 @@ import WayofTime.alchemicalWizardry.common.entity.mob.EntityShadeElemental; import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem; import WayofTime.alchemicalWizardry.common.entity.mob.EntityWaterElemental; import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon; +import WayofTime.alchemicalWizardry.common.guide.RecipeHolder; +import WayofTime.alchemicalWizardry.common.harvest.AgriCraftCropHarvestHandler; import WayofTime.alchemicalWizardry.common.harvest.BloodMagicHarvestHandler; import WayofTime.alchemicalWizardry.common.harvest.CactusReedHarvestHandler; import WayofTime.alchemicalWizardry.common.harvest.GourdHarvestHandler; +import WayofTime.alchemicalWizardry.common.harvest.PamHarvestCompatRegistry; import WayofTime.alchemicalWizardry.common.items.ItemIncense; +import WayofTime.alchemicalWizardry.common.items.ItemMailOrderCatalogue; import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; -//import WayofTime.alchemicalWizardry.common.items.forestry.ItemBloodFrame; +import WayofTime.alchemicalWizardry.common.items.forestry.ItemBloodFrame; import WayofTime.alchemicalWizardry.common.items.sigil.holding.HoldingPacketHandler; +import WayofTime.alchemicalWizardry.common.items.thaumcraft.ItemSanguineArmour; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmEarth; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmFire; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmWater; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmWind; import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; +import WayofTime.alchemicalWizardry.common.potion.PotionAmphibian; +import WayofTime.alchemicalWizardry.common.potion.PotionBoost; +import WayofTime.alchemicalWizardry.common.potion.PotionDeaf; +import WayofTime.alchemicalWizardry.common.potion.PotionDemonCloak; +import WayofTime.alchemicalWizardry.common.potion.PotionDrowning; +import WayofTime.alchemicalWizardry.common.potion.PotionFeatherFall; +import WayofTime.alchemicalWizardry.common.potion.PotionFireFuse; +import WayofTime.alchemicalWizardry.common.potion.PotionFlameCloak; +import WayofTime.alchemicalWizardry.common.potion.PotionFlight; +import WayofTime.alchemicalWizardry.common.potion.PotionHeavyHeart; +import WayofTime.alchemicalWizardry.common.potion.PotionIceCloak; +import WayofTime.alchemicalWizardry.common.potion.PotionInhibit; +import WayofTime.alchemicalWizardry.common.potion.PotionPlanarBinding; +import WayofTime.alchemicalWizardry.common.potion.PotionProjectileProtect; +import WayofTime.alchemicalWizardry.common.potion.PotionReciprocation; +import WayofTime.alchemicalWizardry.common.potion.PotionSoulFray; +import WayofTime.alchemicalWizardry.common.potion.PotionSoulHarden; import WayofTime.alchemicalWizardry.common.renderer.AlchemyCircleRenderer; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectAnimalGrowth; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectAutoAlchemy; @@ -243,12 +256,12 @@ import WayofTime.alchemicalWizardry.common.spell.simple.SpellWateryGrave; import WayofTime.alchemicalWizardry.common.spell.simple.SpellWindGust; import WayofTime.alchemicalWizardry.common.summoning.SummoningHelperAW; import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; import WayofTime.alchemicalWizardry.common.tileEntity.TECrucible; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; import WayofTime.alchemicalWizardry.common.tileEntity.TEMimicBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TEOrientable; @@ -264,16 +277,29 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; -import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; +import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiHandler; -//import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration; - +import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.Mod.Instance; +import cpw.mods.fml.common.ModContainer; +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.SidedProxy; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLInterModComms; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.event.FMLServerStartingEvent; +import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.common.registry.EntityRegistry; +import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v1.3.3", guiFactory = "WayofTime.alchemicalWizardry.client.gui.ConfigGuiFactory") public class AlchemicalWizardry { - public static String MODID = "AWWayofTime"; //Temporary - public static boolean parseTextFiles = false; public static boolean doMeteorsDestroyBlocks = true; @@ -361,6 +387,8 @@ public class AlchemicalWizardry public static boolean ritualDisabledPhantomHands; public static boolean ritualDisabledSphereIsland; + public static boolean displayRitualAnimation; + public static boolean potionDisableRegen; public static boolean potionDisableNightVision; public static boolean potionDisableFireResistance; @@ -399,6 +427,7 @@ public class AlchemicalWizardry public static boolean lockdownAltar; public static boolean causeHungerWithRegen; public static boolean causeHungerChatMessage = true; + public static boolean disableBoundToolsRightClick; public static List<Class> wellBlacklist; @@ -419,7 +448,7 @@ public class AlchemicalWizardry }; public static ToolMaterial bloodBoundToolMaterial = EnumHelper.addToolMaterial("BoundBlood", 4, 1000, 12.0f, 8.0f, 50); - public static ArmorMaterial sanguineArmourArmourMaterial = EnumHelper.addArmorMaterial("SanguineArmour", "test", 33, new int[]{3, 8, 6, 3}, 30); + public static ArmorMaterial sanguineArmourArmourMaterial = EnumHelper.addArmorMaterial("SanguineArmour", 33, new int[]{3, 8, 6, 3}, 30); //Dungeon loot chances public static int standardBindingAgentDungeonChance; @@ -546,7 +575,9 @@ public class AlchemicalWizardry FluidRegistry.registerFluid(lifeEssenceFluid); ModBlocks.init(); + ModBlocks.registerBlocksInPre(); ModItems.init(); + ModItems.registerItems(); RecipeSorter.register("AWWayofTime:shapedorb", ShapedBloodOrbRecipe.class, Category.SHAPED, "before:minecraft:shapeless"); RecipeSorter.register("AWWayofTime:shapelessorb", ShapelessBloodOrbRecipe.class, Category.SHAPELESS, "after:minecraft:shapeless"); @@ -565,7 +596,7 @@ public class AlchemicalWizardry { int craftingConstant = OreDictionary.WILDCARD_VALUE; - ModBlocks.init(); + ModBlocks.registerBlocksInInit(); //blocks proxy.registerRenderers(); @@ -640,7 +671,7 @@ public class AlchemicalWizardry ItemStack largeBloodStoneBrickStack = new ItemStack(ModBlocks.largeBloodStoneBrick); ItemStack bloodStoneBrickStackCrafted = new ItemStack(ModBlocks.bloodStoneBrick, 4); ItemStack growthSigilStack = new ItemStack(ModItems.growthSigil); - ItemStack blockHomHeartStack = new ItemStack(ModBlocks.blockSpellTable); + ItemStack blockHomHeartStack = new ItemStack(ModBlocks.blockHomHeart); ItemStack redWoolStack = new ItemStack(Blocks.wool, 1, 14); ItemStack simpleCatalystStack = new ItemStack(ModItems.simpleCatalyst); ItemStack duskRitualDivinerStack = new ItemStack(ModItems.itemRitualDiviner); @@ -715,23 +746,24 @@ public class AlchemicalWizardry GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModItems.itemBloodLightSigil), "btb", "sss", "bob", 'o', magicianBloodOrbStack, 'b', glowstoneBlockStack, 't', new ItemStack(Blocks.torch), 's', imbuedSlateStack)); GameRegistry.addRecipe(new ItemStack(ModItems.itemKeyOfDiablo), " gw", "gdg", "wg ", 'w', weakBloodShardStack, 'g', goldIngotStack, 'd', diamondStack); GameRegistry.addRecipe(new ItemStack(ModItems.itemBloodPack), "gbg","flf","gsg",'s', blankSlateStack,'g', glassStack,'f',new ItemStack(Items.flint,1,craftingConstant),'b', emptyBucketStack, 'l', new ItemStack(Items.leather_chestplate)); - customPotionDrowning = (new PotionBloodMagic(customPotionDrowningID, true, 0)).setIconIndex(0, 0).setPotionName("Drowning"); - customPotionBoost = (new PotionBloodMagic(customPotionBoostID, false, 0)).setIconIndex(0, 0).setPotionName("Boost"); - customPotionProjProt = (new PotionBloodMagic(customPotionProjProtID, false, 0)).setIconIndex(0, 0).setPotionName("Whirlwind"); - customPotionInhibit = (new PotionBloodMagic(customPotionInhibitID, false, 0)).setIconIndex(0, 0).setPotionName("Inhibit"); - customPotionFlight = (new PotionBloodMagic(customPotionFlightID, false, 0)).setIconIndex(0, 0).setPotionName("Flight"); - customPotionReciprocation = (new PotionBloodMagic(customPotionReciprocationID, false, 0xFFFFFF)).setIconIndex(0, 0).setPotionName("Reciprocation"); - customPotionFlameCloak = (new PotionBloodMagic(customPotionFlameCloakID, false, 0).setIconIndex(0, 0).setPotionName("Flame Cloak")); - customPotionIceCloak = (new PotionBloodMagic(customPotionIceCloakID, false, 0).setIconIndex(0, 0).setPotionName("Ice Cloak")); - customPotionHeavyHeart = (new PotionBloodMagic(customPotionHeavyHeartID, true, 0).setIconIndex(0, 0).setPotionName("Heavy Heart")); - customPotionFireFuse = (new PotionBloodMagic(customPotionFireFuseID, true, 0).setIconIndex(0, 0).setPotionName("Fire Fuse")); - customPotionPlanarBinding = (new PotionBloodMagic(customPotionPlanarBindingID, true, 0).setIconIndex(0, 0).setPotionName("Planar Binding")); - customPotionSoulFray = (new PotionBloodMagic(customPotionSoulFrayID, true, 0).setIconIndex(0, 0).setPotionName("Soul Fray")); - customPotionSoulHarden = (new PotionBloodMagic(customPotionSoulHardenID, false, 0).setIconIndex(0, 0).setPotionName("Soul Harden")); - customPotionDeaf = (new PotionBloodMagic(customPotionDeafID, true, 0).setIconIndex(0, 0).setPotionName("Deafness")); - customPotionFeatherFall = (new PotionBloodMagic(customPotionFeatherFallID, false, 0).setIconIndex(0, 0).setPotionName("Feather Fall")); - customPotionDemonCloak = (new PotionBloodMagic(customPotionDemonCloakID, false, 0).setIconIndex(0, 0).setPotionName("Demon Cloaking")); - customPotionAmphibian = (new PotionBloodMagic(customPotionAmphibianID, false, 0).setIconIndex(0, 0).setPotionName("Amphibian")); + customPotionDrowning = (new PotionDrowning(customPotionDrowningID, true, 0)).setIconIndex(0, 0).setPotionName("Drowning"); + customPotionBoost = (new PotionBoost(customPotionBoostID, false, 0)).setIconIndex(0, 0).setPotionName("Boost"); + customPotionProjProt = (new PotionProjectileProtect(customPotionProjProtID, false, 0)).setIconIndex(0, 0).setPotionName("Whirlwind"); + customPotionInhibit = (new PotionInhibit(customPotionInhibitID, false, 0)).setIconIndex(0, 0).setPotionName("Inhibit"); + customPotionFlight = (new PotionFlight(customPotionFlightID, false, 0)).setIconIndex(0, 0).setPotionName("Flight"); + customPotionReciprocation = (new PotionReciprocation(customPotionReciprocationID, false, 0xFFFFFF)).setIconIndex(0, 0).setPotionName("Reciprocation"); + customPotionFlameCloak = (new PotionFlameCloak(customPotionFlameCloakID, false, 0).setIconIndex(0, 0).setPotionName("Flame Cloak")); + customPotionIceCloak = (new PotionIceCloak(customPotionIceCloakID, false, 0).setIconIndex(0, 0).setPotionName("Ice Cloak")); + customPotionHeavyHeart = (new PotionHeavyHeart(customPotionHeavyHeartID, true, 0).setIconIndex(0, 0).setPotionName("Heavy Heart")); + customPotionFireFuse = (new PotionFireFuse(customPotionFireFuseID, true, 0).setIconIndex(0, 0).setPotionName("Fire Fuse")); + customPotionPlanarBinding = (new PotionPlanarBinding(customPotionPlanarBindingID, true, 0).setIconIndex(0, 0).setPotionName("Planar Binding")); + customPotionSoulFray = (new PotionSoulFray(customPotionSoulFrayID, true, 0).setIconIndex(0, 0).setPotionName("Soul Fray")); + PlayerSacrificeHandler.soulFrayId = customPotionSoulFray; + customPotionSoulHarden = (new PotionSoulHarden(customPotionSoulHardenID, false, 0).setIconIndex(0, 0).setPotionName("Soul Harden")); + customPotionDeaf = (new PotionDeaf(customPotionDeafID, true, 0).setIconIndex(0, 0).setPotionName("Deafness")); + customPotionFeatherFall = (new PotionFeatherFall(customPotionFeatherFallID, false, 0).setIconIndex(0, 0).setPotionName("Feather Fall")); + customPotionDemonCloak = (new PotionDemonCloak(customPotionDemonCloakID, false, 0).setIconIndex(0, 0).setPotionName("Demon Cloaking")); + customPotionAmphibian = (new PotionAmphibian(customPotionAmphibianID, false, 0).setIconIndex(0, 0).setPotionName("Amphibian")); ItemStack masterBloodOrbStack = new ItemStack(ModItems.masterBloodOrb); ItemStack transcendentBloodOrbStack = new ItemStack(ModItems.transcendentBloodOrb); @@ -744,8 +776,8 @@ public class AlchemicalWizardry GameRegistry.registerTileEntity(TEAltar.class, "containerAltar"); GameRegistry.registerTileEntity(TEMasterStone.class, "containerMasterStone"); GameRegistry.registerTileEntity(TESocket.class, "containerSocket"); - GameRegistry.registerTileEntity(TEChemistrySet.class, "containerWritingTable"); - GameRegistry.registerTileEntity(TESpellTable.class, "containerHomHeart"); + GameRegistry.registerTileEntity(TEWritingTable.class, "containerWritingTable"); + GameRegistry.registerTileEntity(TEHomHeart.class, "containerHomHeart"); GameRegistry.registerTileEntity(TEPedestal.class, "containerPedestal"); GameRegistry.registerTileEntity(TEPlinth.class, "containerPlinth"); GameRegistry.registerTileEntity(TETeleposer.class, "containerTeleposer"); @@ -760,8 +792,8 @@ public class AlchemicalWizardry GameRegistry.registerTileEntity(TESchematicSaver.class, "containerSchematicSaver"); GameRegistry.registerTileEntity(TESpectralBlock.class, "containerSpectralBlock"); GameRegistry.registerTileEntity(TEReagentConduit.class, "containerReagentConduit"); - GameRegistry.registerTileEntity(TEBelljar.class, "containerBellJar"); - GameRegistry.registerTileEntity(TEAlchemicalCalcinator.class, "containerAlchemicCalcinator"); + GameRegistry.registerTileEntity(TEBellJar.class, "containerBellJar"); + GameRegistry.registerTileEntity(TEAlchemicCalcinator.class, "containerAlchemicCalcinator"); GameRegistry.registerTileEntity(TEDemonChest.class, "containerDemonChest"); GameRegistry.registerTileEntity(TEMimicBlock.class, "containerMimic"); GameRegistry.registerTileEntity(TECrucible.class, "containerCrucible"); @@ -779,7 +811,7 @@ public class AlchemicalWizardry ModBlocks.bloodStoneBrick.setHarvestLevel("pickaxe", 0); ModBlocks.largeBloodStoneBrick.setHarvestLevel("pickaxe", 0); ModBlocks.blockWritingTable.setHarvestLevel("pickaxe", 1); - ModBlocks.blockSpellTable.setHarvestLevel("pickaxe", 1); + ModBlocks.blockHomHeart.setHarvestLevel("pickaxe", 1); ModBlocks.blockPedestal.setHarvestLevel("pickaxe", 2); ModBlocks.blockPlinth.setHarvestLevel("pickaxe", 2); ModBlocks.blockTeleposer.setHarvestLevel("pickaxe", 2); @@ -789,7 +821,7 @@ public class AlchemicalWizardry //Gui registration UpgradedAltars.loadAltars(); - BlockArmourForge.initializeRecipes(); + ArmourForge.initializeRecipes(); TEPlinth.initialize(); initAlchemyPotionRecipes(); @@ -811,7 +843,7 @@ public class AlchemicalWizardry blacklistAccelerators(); MinecraftForge.EVENT_BUS.register(new ModLivingDropsEvent()); - proxy.initRendering(); + proxy.InitRendering(); NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler()); ItemStack gunpowderStack = new ItemStack(Items.gunpowder); @@ -827,6 +859,7 @@ public class AlchemicalWizardry ItemStack strengthenedCatalystStackCrafted = new ItemStack(ModItems.baseAlchemyItems, 2, 3); ItemStack fracturedBoneStackCrafted = new ItemStack(ModItems.baseAlchemyItems, 4, 5); + //TODO NEW RECIPES! AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.weakBindingAgent), 10, new ItemStack[]{simpleCatalystStack, simpleCatalystStack, new ItemStack(Items.clay_ball)}, 2); AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.standardBindingAgent), 15, new ItemStack[]{new ItemStack(ModItems.weakBindingAgent), sanctusStack, new ItemStack(ModItems.crystallos)}, 3); @@ -865,6 +898,7 @@ public class AlchemicalWizardry AlchemyRecipeRegistry.registerRecipe(reductusStack, 20, new ItemStack[]{redstoneStack, goldIngotStack, strengthenedCatalystStack, new ItemStack(Blocks.soul_sand), new ItemStack(Items.carrot)}, 3); AlchemyRecipeRegistry.registerRecipe(potentiaStack, 20, new ItemStack[]{glowstoneDustStack, strengthenedCatalystStack, lapisStack, lapisStack, new ItemStack(Items.quartz)}, 3); + HomSpellRegistry.registerBasicSpell(new ItemStack(Items.flint_and_steel), new SpellFireBurst()); HomSpellRegistry.registerBasicSpell(new ItemStack(Blocks.ice), new SpellFrozenWater()); HomSpellRegistry.registerBasicSpell(new ItemStack(Blocks.tnt), new SpellExplosions()); @@ -916,6 +950,8 @@ public class AlchemicalWizardry EntityRegistry.registerModEntity(EntityMinorDemonGruntGuardianIce.class, "MinorDemonGruntGuardianIce", 42, this, 80, 3, true); EntityRegistry.registerModEntity(EntityMinorDemonGruntGuardianEarth.class, "MinorDemonGruntGuardianEarth", 43, this, 80, 3, true); + + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.standardBindingAgent), 1, 3, this.standardBindingAgentDungeonChance / 5)); ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.mundanePowerCatalyst), 1, 1, this.mundanePowerCatalystDungeonChance / 5)); ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.mundaneLengtheningCatalyst), 1, 1, this.mundaneLengtheningCatalystDungeonChance / 5)); @@ -1052,7 +1088,7 @@ public class AlchemicalWizardry GameRegistry.addRecipe(new ItemStack(ModItems.itemTankSegmenter), "gqi", " rq", "q g", 'q', quartzRodStack, 'i', ironIngotStack, 'r', strengthenedCatalystStack, 'g', goldIngotStack); GameRegistry.addRecipe(new ItemStack(ModItems.itemDestinationClearer), "qcq", "c c", "qcq", 'q', quartzRodStack, 'c', simpleCatalystStack); - GameRegistry.addRecipe(new ItemStack(ModBlocks.blockAlchemicalCalcinator), "pgp", "gsg", "ccc", 'p', crackedRunicPlateStack, 'g', glassStack, 's', strengthenedCatalystStack, 'c', cobblestoneStack); + GameRegistry.addRecipe(new ItemStack(ModBlocks.blockAlchemicCalcinator), "pgp", "gsg", "ccc", 'p', crackedRunicPlateStack, 'g', glassStack, 's', strengthenedCatalystStack, 'c', cobblestoneStack); GameRegistry.addRecipe(new ItemStack(ModBlocks.blockCrystalBelljar), "GGG", "GcG", "www", 'G', glassStack, 'c', concentratedCatalystStack, 'w', new ItemStack(Blocks.wooden_slab, 1, craftingConstant)); GameRegistry.addRecipe(new ItemStack(ModBlocks.blockReagentConduit), "isi", "scs", "isi", 'c', concentratedCatalystStack, 's', stringStack, 'i', ironIngotStack); @@ -1108,7 +1144,7 @@ public class AlchemicalWizardry { proxy.registerPostSideObjects(); //TODO Thaumcraft Integration -/* if (Loader.isModLoaded("Thaumcraft")) + if (Loader.isModLoaded("Thaumcraft")) { isThaumcraftLoaded = true; @@ -1137,6 +1173,7 @@ public class AlchemicalWizardry ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguinePants), aspectList); ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguineBoots), aspectList); + if (itemGoggles != null) { BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineHelmet), itemGoggles); @@ -1188,11 +1225,11 @@ public class AlchemicalWizardry ModItems.itemBloodFrame = new ItemBloodFrame().setUnlocalizedName("bloodFrame"); - Item provenFrame = GameRegistry.findItem("Forestry", "frameImpregnated"); + ItemStack provenFrame = GameRegistry.findItemStack("Forestry", "frameImpregnated", 1); if(provenFrame !=null) { - AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.itemBloodFrame), new ItemStack(provenFrame, 1), 3, 30000, 20, 20, false); + AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.itemBloodFrame), provenFrame, 3, 30000, 20, 20, false); } } else { @@ -1211,13 +1248,12 @@ public class AlchemicalWizardry AlchemicalWizardry.logger.info("Loaded MineTweaker 3 Integration"); } -// if(Loader.isModLoaded("AgriCraft")) -// { -// HarvestRegistry.registerHarvestHandler(new AgriCraftCropHarvestHandler()); -// AlchemicalWizardry.logger.info("Loaded AgriCraft Handlers!"); -// } -*/ - isThaumcraftLoaded = Loader.isModLoaded("Thaumcraft"); //this is temp. + if(Loader.isModLoaded("AgriCraft")) + { + HarvestRegistry.registerHarvestHandler(new AgriCraftCropHarvestHandler()); + AlchemicalWizardry.logger.info("Loaded AgriCraft Handlers!"); + } + isBotaniaLoaded = Loader.isModLoaded("Botania"); isPneumaticCraftLoaded = Loader.isModLoaded("PneumaticCraft"); isFMPLoaded = Loader.isModLoaded("ForgeMultipart"); @@ -1236,12 +1272,12 @@ public class AlchemicalWizardry // this.createItemTextureFiles(); } -/* @Optional.Method(modid = "guideapi") + @Optional.Method(modid = "guideapi") public static void registerBMBook() { BloodMagicGuide.registerGuide(); } -*/ + public static void blacklistAccelerators() { if (Loader.isModLoaded("Torcherino")) @@ -1365,13 +1401,13 @@ public class AlchemicalWizardry AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.diamond), Potion.resistance.id, 2 * 60 * 20); if(!AlchemicalWizardry.potionDisableSaturation) - AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.poisonous_potato), Potion.saturation.id, 2); //saturation + AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.poisonous_potato), Potion.field_76443_y.id, 2); //saturation if(!AlchemicalWizardry.potionDisableHealthBoost) - AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.demonBloodShard), Potion.field_180152_w.id, 4 * 60 * 20); //health boost + AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.demonBloodShard), Potion.field_76434_w.id, 4 * 60 * 20); //health boost if(!AlchemicalWizardry.potionDisableAbsorption) - AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.weakBloodShard), Potion.absorption.id, 4 * 60 * 20); //Absorption + AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.weakBloodShard), Potion.field_76444_x.id, 4 * 60 * 20); //Absorption if(!AlchemicalWizardry.potionDisableBoost) AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.terrae), AlchemicalWizardry.customPotionBoost.id, 60 * 20); @@ -1518,10 +1554,10 @@ public class AlchemicalWizardry ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems, 1, 7), new ReagentStack(ReagentRegistry.reductusReagent, 1000)); ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems, 1, 8), new ReagentStack(ReagentRegistry.potentiaReagent, 1000)); - OmegaRegistry.registerParadigm(ReagentRegistry.aquasalusReagent, new OmegaParadigmWater((OmegaArmour)ModItems.boundHelmetWater, (OmegaArmour)ModItems.boundChestplateWater, (OmegaArmour)ModItems.boundLeggingsWater, (OmegaArmour)ModItems.boundBootsWater)); - OmegaRegistry.registerParadigm(ReagentRegistry.terraeReagent, new OmegaParadigmEarth((OmegaArmour)ModItems.boundHelmetEarth, (OmegaArmour)ModItems.boundChestplateEarth, (OmegaArmour)ModItems.boundLeggingsEarth, (OmegaArmour)ModItems.boundBootsEarth)); - OmegaRegistry.registerParadigm(ReagentRegistry.aetherReagent, new OmegaParadigmWind((OmegaArmour)ModItems.boundHelmetWind, (OmegaArmour)ModItems.boundChestplateWind, (OmegaArmour)ModItems.boundLeggingsWind, (OmegaArmour)ModItems.boundBootsWind)); - OmegaRegistry.registerParadigm(ReagentRegistry.incendiumReagent, new OmegaParadigmFire((OmegaArmour)ModItems.boundHelmetFire, (OmegaArmour)ModItems.boundChestplateFire, (OmegaArmour)ModItems.boundLeggingsFire, (OmegaArmour)ModItems.boundBootsFire)); + OmegaRegistry.registerParadigm(ReagentRegistry.aquasalusReagent, new OmegaParadigmWater((OmegaArmour)ModItems.boundHelmetWater, (OmegaArmour)ModItems.boundPlateWater, (OmegaArmour)ModItems.boundLeggingsWater, (OmegaArmour)ModItems.boundBootsWater)); + OmegaRegistry.registerParadigm(ReagentRegistry.terraeReagent, new OmegaParadigmEarth((OmegaArmour)ModItems.boundHelmetEarth, (OmegaArmour)ModItems.boundPlateEarth, (OmegaArmour)ModItems.boundLeggingsEarth, (OmegaArmour)ModItems.boundBootsEarth)); + OmegaRegistry.registerParadigm(ReagentRegistry.aetherReagent, new OmegaParadigmWind((OmegaArmour)ModItems.boundHelmetWind, (OmegaArmour)ModItems.boundPlateWind, (OmegaArmour)ModItems.boundLeggingsWind, (OmegaArmour)ModItems.boundBootsWind)); + OmegaRegistry.registerParadigm(ReagentRegistry.incendiumReagent, new OmegaParadigmFire((OmegaArmour)ModItems.boundHelmetFire, (OmegaArmour)ModItems.boundPlateFire, (OmegaArmour)ModItems.boundLeggingsFire, (OmegaArmour)ModItems.boundBootsFire)); } @@ -1694,7 +1730,7 @@ public class AlchemicalWizardry // // InputStream input = AlchemicalWizardry.class.getResourceAsStream("/assets/alchemicalwizardryBooks/books/book.txt"); // -// Minecraft.getMinecraft().fontRendererObj.setUnicodeFlag(true); +// Minecraft.getMinecraft().fontRenderer.setUnicodeFlag(true); // // if(input != null) // { @@ -1770,9 +1806,9 @@ public class AlchemicalWizardry // // strLine = strLine.replace('', '"').replace('','"').replace(" ", "...").replace('', '\'').replace('', '-'); // -// if(Minecraft.getMinecraft() != null && Minecraft.getMinecraft().fontRendererObj != null) +// if(Minecraft.getMinecraft() != null && Minecraft.getMinecraft().fontRenderer != null) // { -// List list = Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(strLine, 110); +// List list = Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(strLine, 110); // if(list != null) // { // System.out.println("Number of lines: " + list.size()); @@ -1786,7 +1822,7 @@ public class AlchemicalWizardry // boolean changePage = false; // int length = word.length(); // word = word.replace('\t', ' '); -// List list = Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(strings[currentPage] + " " + word, 110); +// List list = Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(strings[currentPage] + " " + word, 110); // // if(list.size() > maxLines) // { @@ -1817,8 +1853,8 @@ public class AlchemicalWizardry // } // } // -// int currentLines = Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(strings[currentPage], 110).size(); -// while(Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(strings[currentPage] + " ", 110).size() <= currentLines) +// int currentLines = Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(strings[currentPage], 110).size(); +// while(Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(strings[currentPage] + " ", 110).size() <= currentLines) // { // { // strings[currentPage] = strings[currentPage] + " "; @@ -1853,7 +1889,7 @@ public class AlchemicalWizardry //// // } // -// Minecraft.getMinecraft().fontRendererObj.setUnicodeFlag(false); +// Minecraft.getMinecraft().fontRenderer.setUnicodeFlag(false); // // } catch (FileNotFoundException e) { // // TODO Auto-generated catch block @@ -1865,12 +1901,12 @@ public class AlchemicalWizardry // } // } -// @Mod.EventHandler -// public void initCommands(FMLServerStartingEvent event) -// { -// event.registerServerCommand(new CommandBind()); -// event.registerServerCommand(new CommandUnbind()); -// event.registerServerCommand(new CommandSN()); -// event.registerServerCommand(new CommandDownloadGAPI()); -// } + @Mod.EventHandler + public void initCommands(FMLServerStartingEvent event) + { + event.registerServerCommand(new CommandBind()); + event.registerServerCommand(new CommandUnbind()); + event.registerServerCommand(new CommandSN()); + event.registerServerCommand(new CommandDownloadGAPI()); + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java b/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java index 3eed0062..b76359ff 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java +++ b/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java @@ -9,8 +9,6 @@ import java.util.Map.Entry; import net.minecraft.entity.EntityList; import net.minecraft.entity.EntityLivingBase; import net.minecraftforge.common.config.Configuration; -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.relauncher.Side; import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.client.renderer.ColourThreshold; import WayofTime.alchemicalWizardry.client.renderer.RenderHelper; @@ -18,6 +16,8 @@ import WayofTime.alchemicalWizardry.common.demonVillage.DemonVillagePath; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.relauncher.Side; /** * Created with IntelliJ IDEA. @@ -32,8 +32,6 @@ public class BloodMagicConfiguration public static Configuration config; - public static String[] blocksToBeDisabled; - public static String[] itemsToBeDisabled; public static String[] teleposerBlacklist; public static String[] blacklist = {}; @@ -108,6 +106,7 @@ public class BloodMagicConfiguration AlchemicalWizardry.causeHungerChatMessage = config.get("WimpySettings", "causeHungerChatMessage", true).getBoolean(); // AlchemicalWizardry.lockdownAltar = config.get("WimpySettings", "LockdownAltarWithRegen", true).getBoolean(); AlchemicalWizardry.lockdownAltar = false; + AlchemicalWizardry.disableBoundToolsRightClick = config.get("WimpySettings", "disableBoundToolsRightClick", false).getBoolean(false); AlchemicalWizardry.ritualDisabledWater = config.get("Ritual Blacklist", "Ritual of the Full Spring", false).getBoolean(false); AlchemicalWizardry.ritualDisabledLava = config.get("Ritual Blacklist", "Serenade of the Nether", false).getBoolean(false); @@ -145,7 +144,7 @@ public class BloodMagicConfiguration AlchemicalWizardry.ritualDisabledCrafting = config.get("Ritual Blacklist", "Rhythm of the Beating Anvil", false).getBoolean(false); AlchemicalWizardry.ritualDisabledPhantomHands = config.get("Ritual Blacklist", "Orchestra of the Phantom Hands", false).getBoolean(false); AlchemicalWizardry.ritualDisabledSphereIsland = config.get("Ritual Blacklist", "Birth of the Bastion", false).getBoolean(false); - + AlchemicalWizardry.potionDisableRegen = config.get("Alchemy Potion Blacklist", "Regeneration", false).getBoolean(false); AlchemicalWizardry.potionDisableNightVision = config.get("Alchemy Potion Blacklist", "Night Vision", false).getBoolean(false); AlchemicalWizardry.potionDisableFireResistance = config.get("Alchemy Potion Blacklist", "Fire Resistance", false).getBoolean(false); @@ -195,9 +194,6 @@ public class BloodMagicConfiguration AlchemicalWizardry.isDemonRitualCreativeOnly = config.get(tempDemonConfigs, "IsDemonRitualCreativeOnly", false).getBoolean(); BoundArmour.tryComplexRendering = config.get("WimpySettings", "UseFancyBoundArmour", true).getBoolean(true); - - blocksToBeDisabled = config.getStringList("Disable blocks here", "WimpySettings", new String[]{""}, "Type in the unlocalized name of the block you want disabled here (separate them using ENTER)"); - itemsToBeDisabled = config.getStringList("Disable items here", "WimpySettings", new String[]{""}, "Type in the unlocalized name of the item you want disabled (separate them using ENTER)"); // ItemIncense.itemDuration = config.get("TestIncenseSettings", "ItemDuration", 100).getInt(); // ItemIncense.minValue = config.get("TestIncenseSettings", "MinValue", 0).getInt(); @@ -205,7 +201,6 @@ public class BloodMagicConfiguration // PlayerSacrificeHandler.scalingOfSacrifice = (float) config.get("TestIncenseSettings", "ScalingFactor", 0.0025f).getDouble(); // PlayerSacrificeHandler.soulFrayDuration = config.get("TestIncenseSettings", "SoulFrayDuration", 400).getInt(); - Side side = FMLCommonHandler.instance().getSide(); if (side == Side.CLIENT) { @@ -213,6 +208,7 @@ public class BloodMagicConfiguration RenderHelper.yOffset = config.get("ClientSettings", "AlchemyHUDyOffset", 2).getInt(); RenderHelper.lpBarX = config.get("ClientSettings", "LPHUDxOffset", 12).getInt(); RenderHelper.lpBarY = config.get("ClientSettings", "LPHUDyOffset", 75).getInt(); + AlchemicalWizardry.displayRitualAnimation = config.get("ClientSettings", "Display Ritual Animation", true).getBoolean(true); } config.save(); @@ -220,7 +216,6 @@ public class BloodMagicConfiguration public static void set(String categoryName, String propertyName, String newValue) { - config.load(); if (config.getCategoryNames().contains(categoryName)) { @@ -230,8 +225,6 @@ public class BloodMagicConfiguration } } config.save(); - - } public static void loadBlacklist() @@ -253,49 +246,49 @@ public class BloodMagicConfiguration config.save(); } - public static void blacklistRituals() - { - if (AlchemicalWizardry.ritualDisabledWater) r("AW001Water"); - if (AlchemicalWizardry.ritualDisabledLava) r("AW002Lava"); - if (AlchemicalWizardry.ritualDisabledGreenGrove) r("AW003GreenGrove"); - if (AlchemicalWizardry.ritualDisabledInterdiction) r("AW004Interdiction"); - if (AlchemicalWizardry.ritualDisabledContainment) r("AW005Containment"); - if (AlchemicalWizardry.ritualDisabledBinding) r("AW006Binding"); - if (AlchemicalWizardry.ritualDisabledUnbinding) r("AW007Unbinding"); // "A medium dry martini, lemon peel. Shaken, not stirred." - if (AlchemicalWizardry.ritualDisabledHighJump) r("AW008HighJump"); - if (AlchemicalWizardry.ritualDisabledMagnetism) r("AW009Magnetism"); - if (AlchemicalWizardry.ritualDisabledCrusher) r("AW010Crusher"); - if (AlchemicalWizardry.ritualDisabledSpeed) r("AW011Speed"); - if (AlchemicalWizardry.ritualDisabledAnimalGrowth) r("AW012AnimalGrowth"); - if (AlchemicalWizardry.ritualDisabledSuffering) r("AW013Suffering"); - if (AlchemicalWizardry.ritualDisabledRegen) r("AW014Regen"); - if (AlchemicalWizardry.ritualDisabledFeatheredKnife) r("AW015FeatheredKnife"); - if (AlchemicalWizardry.ritualDisabledFeatheredEarth) r("AW016FeatheredEarth"); - if (AlchemicalWizardry.ritualDisabledGaia) r("AW017Gaia"); - if (AlchemicalWizardry.ritualDisabledCondor) r("AW018Condor"); - if (AlchemicalWizardry.ritualDisabledFallingTower) r("AW019FallingTower"); - if (AlchemicalWizardry.ritualDisabledBalladOfAlchemy) r("AW020BalladOfAlchemy"); - if (AlchemicalWizardry.ritualDisabledExpulsion) r("AW021Expulsion"); - if (AlchemicalWizardry.ritualDisabledSuppression) r("AW022Suppression"); - if (AlchemicalWizardry.ritualDisabledZephyr) r("AW023Zephyr"); - if (AlchemicalWizardry.ritualDisabledHarvest) r("AW024Harvest"); - if (AlchemicalWizardry.ritualDisabledConduit) r("AW025Conduit"); - if (AlchemicalWizardry.ritualDisabledEllipsoid) r("AW026Ellipsoid"); - if (AlchemicalWizardry.ritualDisabledEvaporation) r("AW027Evaporation"); - if (AlchemicalWizardry.ritualDisabledSpawnWard) r("AW028SpawnWard"); - if (AlchemicalWizardry.ritualDisabledVeilOfEvil) r("AW029VeilOfEvil"); - if (AlchemicalWizardry.ritualDisabledFullStomach) r("AW030FullStomach"); - if (AlchemicalWizardry.ritualDisabledConvocation) r("AW031Convocation"); - if (AlchemicalWizardry.ritualDisabledSymmetry) r("AW032Symmetry"); - if (AlchemicalWizardry.ritualDisabledStalling) r("AW033Stalling"); - if (AlchemicalWizardry.ritualDisabledCrafting) r("AW034Crafting"); - if (AlchemicalWizardry.ritualDisabledPhantomHands) r("AW035PhantomHands"); - if (AlchemicalWizardry.ritualDisabledSphereIsland) r("AW036SphereIsland"); - } + public static void blacklistRituals() + { + if (AlchemicalWizardry.ritualDisabledWater) r("AW001Water"); + if (AlchemicalWizardry.ritualDisabledLava) r("AW002Lava"); + if (AlchemicalWizardry.ritualDisabledGreenGrove) r("AW003GreenGrove"); + if (AlchemicalWizardry.ritualDisabledInterdiction) r("AW004Interdiction"); + if (AlchemicalWizardry.ritualDisabledContainment) r("AW005Containment"); + if (AlchemicalWizardry.ritualDisabledBinding) r("AW006Binding"); + if (AlchemicalWizardry.ritualDisabledUnbinding) r("AW007Unbinding"); // "A medium dry martini, lemon peel. Shaken, not stirred." + if (AlchemicalWizardry.ritualDisabledHighJump) r("AW008HighJump"); + if (AlchemicalWizardry.ritualDisabledMagnetism) r("AW009Magnetism"); + if (AlchemicalWizardry.ritualDisabledCrusher) r("AW010Crusher"); + if (AlchemicalWizardry.ritualDisabledSpeed) r("AW011Speed"); + if (AlchemicalWizardry.ritualDisabledAnimalGrowth) r("AW012AnimalGrowth"); + if (AlchemicalWizardry.ritualDisabledSuffering) r("AW013Suffering"); + if (AlchemicalWizardry.ritualDisabledRegen) r("AW014Regen"); + if (AlchemicalWizardry.ritualDisabledFeatheredKnife) r("AW015FeatheredKnife"); + if (AlchemicalWizardry.ritualDisabledFeatheredEarth) r("AW016FeatheredEarth"); + if (AlchemicalWizardry.ritualDisabledGaia) r("AW017Gaia"); + if (AlchemicalWizardry.ritualDisabledCondor) r("AW018Condor"); + if (AlchemicalWizardry.ritualDisabledFallingTower) r("AW019FallingTower"); + if (AlchemicalWizardry.ritualDisabledBalladOfAlchemy) r("AW020BalladOfAlchemy"); + if (AlchemicalWizardry.ritualDisabledExpulsion) r("AW021Expulsion"); + if (AlchemicalWizardry.ritualDisabledSuppression) r("AW022Suppression"); + if (AlchemicalWizardry.ritualDisabledZephyr) r("AW023Zephyr"); + if (AlchemicalWizardry.ritualDisabledHarvest) r("AW024Harvest"); + if (AlchemicalWizardry.ritualDisabledConduit) r("AW025Conduit"); + if (AlchemicalWizardry.ritualDisabledEllipsoid) r("AW026Ellipsoid"); + if (AlchemicalWizardry.ritualDisabledEvaporation) r("AW027Evaporation"); + if (AlchemicalWizardry.ritualDisabledSpawnWard) r("AW028SpawnWard"); + if (AlchemicalWizardry.ritualDisabledVeilOfEvil) r("AW029VeilOfEvil"); + if (AlchemicalWizardry.ritualDisabledFullStomach) r("AW030FullStomach"); + if (AlchemicalWizardry.ritualDisabledConvocation) r("AW031Convocation"); + if (AlchemicalWizardry.ritualDisabledSymmetry) r("AW032Symmetry"); + if (AlchemicalWizardry.ritualDisabledStalling) r("AW033Stalling"); + if (AlchemicalWizardry.ritualDisabledCrafting) r("AW034Crafting"); + if (AlchemicalWizardry.ritualDisabledPhantomHands) r("AW035PhantomHands"); + if (AlchemicalWizardry.ritualDisabledSphereIsland) r("AW036SphereIsland"); + } - private static void r(String ritualID) - { - Rituals.ritualMap.remove(ritualID); - Rituals.keyList.remove(ritualID); - } + private static void r(String ritualID) + { + Rituals.ritualMap.remove(ritualID); + Rituals.keyList.remove(ritualID); + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java b/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java index a3f6e5c6..7cf58421 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/ModBlocks.java @@ -1,26 +1,23 @@ package WayofTime.alchemicalWizardry; -import WayofTime.alchemicalWizardry.client.BlockRenderer; import net.minecraft.block.Block; -import net.minecraft.item.ItemBlock; -import net.minecraftforge.fml.common.registry.GameRegistry; -import WayofTime.alchemicalWizardry.common.block.BlockArmourForge; -import WayofTime.alchemicalWizardry.common.block.BlockAlchemicalCalcinator; +import WayofTime.alchemicalWizardry.common.block.ArmourForge; +import WayofTime.alchemicalWizardry.common.block.BlockAlchemicCalcinator; import WayofTime.alchemicalWizardry.common.block.BlockAltar; import WayofTime.alchemicalWizardry.common.block.BlockBelljar; import WayofTime.alchemicalWizardry.common.block.BlockBloodLightSource; import WayofTime.alchemicalWizardry.common.block.BlockConduit; -import WayofTime.alchemicalWizardry.common.block.BlockIncenseCrucible; +import WayofTime.alchemicalWizardry.common.block.BlockCrucible; import WayofTime.alchemicalWizardry.common.block.BlockCrystal; import WayofTime.alchemicalWizardry.common.block.BlockDemonPortal; import WayofTime.alchemicalWizardry.common.block.BlockEnchantmentGlyph; -import WayofTime.alchemicalWizardry.common.block.BlockSpellTable; +import WayofTime.alchemicalWizardry.common.block.BlockHomHeart; import WayofTime.alchemicalWizardry.common.block.BlockMasterStone; import WayofTime.alchemicalWizardry.common.block.BlockPedestal; import WayofTime.alchemicalWizardry.common.block.BlockPlinth; import WayofTime.alchemicalWizardry.common.block.BlockReagentConduit; import WayofTime.alchemicalWizardry.common.block.BlockSchematicSaver; -import WayofTime.alchemicalWizardry.common.block.BlockFilledSocket; +import WayofTime.alchemicalWizardry.common.block.BlockSocket; import WayofTime.alchemicalWizardry.common.block.BlockSpectralContainer; import WayofTime.alchemicalWizardry.common.block.BlockSpellEffect; import WayofTime.alchemicalWizardry.common.block.BlockSpellEnhancement; @@ -28,20 +25,20 @@ import WayofTime.alchemicalWizardry.common.block.BlockSpellModifier; import WayofTime.alchemicalWizardry.common.block.BlockSpellParadigm; import WayofTime.alchemicalWizardry.common.block.BlockStabilityGlyph; import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; -import WayofTime.alchemicalWizardry.common.block.BlockChemistrySet; -import WayofTime.alchemicalWizardry.common.block.BlockBloodRune; -import WayofTime.alchemicalWizardry.common.block.BlockBloodStoneBrick; -import WayofTime.alchemicalWizardry.common.block.BlockEfficiencyRune; -import WayofTime.alchemicalWizardry.common.block.BlockEmptySocket; -import WayofTime.alchemicalWizardry.common.block.BlockImperfectRitualStone; -import WayofTime.alchemicalWizardry.common.block.BlockLargeBloodStoneBrick; -import WayofTime.alchemicalWizardry.common.block.BlockLifeEssence; -import WayofTime.alchemicalWizardry.common.block.BlockMimic; -import WayofTime.alchemicalWizardry.common.block.BlockRitualStone; -import WayofTime.alchemicalWizardry.common.block.BlockRuneOfSacrifice; -import WayofTime.alchemicalWizardry.common.block.BlockRuneOfSelfSacrifice; -import WayofTime.alchemicalWizardry.common.block.BlockSpectral; -import WayofTime.alchemicalWizardry.common.block.BlockSpeedRune; +import WayofTime.alchemicalWizardry.common.block.BlockWritingTable; +import WayofTime.alchemicalWizardry.common.block.BloodRune; +import WayofTime.alchemicalWizardry.common.block.BloodStoneBrick; +import WayofTime.alchemicalWizardry.common.block.EfficiencyRune; +import WayofTime.alchemicalWizardry.common.block.EmptySocket; +import WayofTime.alchemicalWizardry.common.block.ImperfectRitualStone; +import WayofTime.alchemicalWizardry.common.block.LargeBloodStoneBrick; +import WayofTime.alchemicalWizardry.common.block.LifeEssenceBlock; +import WayofTime.alchemicalWizardry.common.block.MimicBlock; +import WayofTime.alchemicalWizardry.common.block.RitualStone; +import WayofTime.alchemicalWizardry.common.block.RuneOfSacrifice; +import WayofTime.alchemicalWizardry.common.block.RuneOfSelfSacrifice; +import WayofTime.alchemicalWizardry.common.block.SpectralBlock; +import WayofTime.alchemicalWizardry.common.block.SpeedRune; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.BlockDemonChest; import WayofTime.alchemicalWizardry.common.items.ItemBlockCrystalBelljar; import WayofTime.alchemicalWizardry.common.items.ItemBloodRuneBlock; @@ -52,8 +49,7 @@ import WayofTime.alchemicalWizardry.common.items.ItemSpellEnhancementBlock; import WayofTime.alchemicalWizardry.common.items.ItemSpellModifierBlock; import WayofTime.alchemicalWizardry.common.items.ItemSpellParadigmBlock; import WayofTime.alchemicalWizardry.common.items.ItemStabilityGlyphBlock; - -import java.util.ArrayList; +import cpw.mods.fml.common.registry.GameRegistry; /** * Created with IntelliJ IDEA. @@ -66,11 +62,11 @@ public class ModBlocks public static Block bloodStoneBrick; public static Block largeBloodStoneBrick; public static BlockAltar blockAltar; - public static BlockBloodRune bloodRune; - public static BlockSpeedRune speedRune; - public static BlockEfficiencyRune efficiencyRune; - public static BlockRuneOfSacrifice runeOfSacrifice; - public static BlockRuneOfSelfSacrifice runeOfSelfSacrifice; + public static BloodRune bloodRune; + public static SpeedRune speedRune; + public static EfficiencyRune efficiencyRune; + public static RuneOfSacrifice runeOfSacrifice; + public static RuneOfSelfSacrifice runeOfSelfSacrifice; public static Block blockMasterStone; public static Block ritualStone; public static Block imperfectRitualStone; @@ -78,7 +74,7 @@ public class ModBlocks public static Block emptySocket; public static Block armourForge; public static Block blockWritingTable; - public static Block blockSpellTable; + public static Block blockHomHeart; public static Block blockPedestal; public static Block blockPlinth; public static Block blockLifeEssence; @@ -94,7 +90,7 @@ public class ModBlocks public static Block blockBuildingSchematicSaver; public static Block blockDemonPortal; public static Block blockReagentConduit; - public static Block blockAlchemicalCalcinator; + public static Block blockAlchemicCalcinator; public static Block blockCrystalBelljar; public static Block blockDemonChest; public static Block blockCrystal; @@ -103,99 +99,98 @@ public class ModBlocks public static Block blockStabilityGlyph; public static Block blockCrucible; - public static ArrayList<String> blocksNotToBeRegistered = new ArrayList<String>(); - public static void init() { -/* blockAltar = (BlockAltar) registerBlock(new BlockAltar(), "altar"); - bloodRune = (BlockBloodRune) registerBlock(new BlockBloodRune(), ItemBloodRuneBlock.class, "base_rune"); - speedRune = (BlockSpeedRune) registerBlock(new BlockSpeedRune(), "speed_rune"); - efficiencyRune = (BlockEfficiencyRune) registerBlock(new BlockEfficiencyRune(), "efficiency_rune"); - runeOfSacrifice = (BlockRuneOfSacrifice) registerBlock(new BlockRuneOfSacrifice(), "sacrifice_rune"); - runeOfSelfSacrifice = (BlockRuneOfSelfSacrifice) registerBlock(new BlockRuneOfSelfSacrifice(), "self_sacrifice_rune"); - */ blockTeleposer = registerBlock(new BlockTeleposer(), "teleposer"); - spectralBlock = registerBlock(new BlockSpectral(), "spectral_block"); - ritualStone = registerBlock(new BlockRitualStone(), "ritual_stone"); - blockMasterStone = registerBlock(new BlockMasterStone(), "master_ritual_stone"); - imperfectRitualStone = registerBlock(new BlockImperfectRitualStone(), "imperfect_ritual_stone"); - emptySocket = registerBlock(new BlockEmptySocket(), "empty_socket"); - bloodSocket = registerBlock(new BlockFilledSocket(), "filled_socket"); - armourForge = registerBlock(new BlockArmourForge(), "soul_armour_forge"); - largeBloodStoneBrick = registerBlock(new BlockLargeBloodStoneBrick(), "large_bloodstone_brick"); - bloodStoneBrick = registerBlock(new BlockBloodStoneBrick(), "bloodstone_brick"); - blockWritingTable = registerBlock(new BlockChemistrySet(), "chemistry_set"); - blockSpellTable = registerBlock(new BlockSpellTable(), "spell_table"); - blockPedestal = registerBlock(new BlockPedestal(), "pedestal"); - blockPlinth = registerBlock(new BlockPlinth(), "plinth"); - blockConduit = registerBlock(new BlockConduit(), "spell_conduit"); - blockBloodLight = registerBlock(new BlockBloodLightSource(), "blood_light"); - blockSpellEffect = registerBlock(new BlockSpellEffect(), "spell_effect"); - blockSpellParadigm = registerBlock(new BlockSpellParadigm(), ItemSpellParadigmBlock.class, "spell_paradigm"); - blockSpellModifier = registerBlock(new BlockSpellModifier(), ItemSpellEnhancementBlock.class, "spell_modifier"); - blockSpellEnhancement = registerBlock(new BlockSpellEnhancement(), ItemSpellModifierBlock.class, "spell_enhancement"); - blockSpectralContainer = registerBlock(new BlockSpectralContainer(), ItemSpellEffectBlock.class, "spectral_container"); - blockDemonPortal = registerBlock(new BlockDemonPortal(), "demon_portal"); - blockBuildingSchematicSaver = registerBlock(new BlockSchematicSaver(), "schematic_saver"); - blockReagentConduit = registerBlock(new BlockReagentConduit(), "reagent_conduit"); - blockAlchemicalCalcinator = registerBlock(new BlockAlchemicalCalcinator(), "alchemical_calcinator"); - blockCrystalBelljar = registerBlock(new BlockBelljar(), ItemBlockCrystalBelljar.class, "belljar"); - blockDemonChest = registerBlock(new BlockDemonChest(), "demon_chest"); - blockCrystal = registerBlock(new BlockCrystal(), ItemCrystalBlock.class, "crystal_block"); - blockMimic = registerBlock(new BlockMimic(), "mimic_block"); + blockAltar = new BlockAltar(); + bloodRune = new BloodRune(); + speedRune = new SpeedRune(); + efficiencyRune = new EfficiencyRune(); + runeOfSacrifice = new RuneOfSacrifice(); + runeOfSelfSacrifice = new RuneOfSelfSacrifice(); + blockTeleposer = new BlockTeleposer(); + spectralBlock = new SpectralBlock(); + ritualStone = new RitualStone(); + blockMasterStone = new BlockMasterStone(); + imperfectRitualStone = new ImperfectRitualStone(); + bloodSocket = new BlockSocket(); + armourForge = new ArmourForge(); + emptySocket = new EmptySocket(); + largeBloodStoneBrick = new LargeBloodStoneBrick(); + bloodStoneBrick = new BloodStoneBrick(); + blockWritingTable = new BlockWritingTable(); + blockHomHeart = new BlockHomHeart(); + blockPedestal = new BlockPedestal(); + blockPlinth = new BlockPlinth(); + blockConduit = new BlockConduit(); + blockBloodLight = new BlockBloodLightSource(); + blockSpellEffect = new BlockSpellEffect(); + blockSpellParadigm = new BlockSpellParadigm(); + blockSpellModifier = new BlockSpellModifier(); + blockSpellEnhancement = new BlockSpellEnhancement(); + blockSpectralContainer = new BlockSpectralContainer(); + blockDemonPortal = new BlockDemonPortal(); + blockBuildingSchematicSaver = new BlockSchematicSaver(); + blockReagentConduit = new BlockReagentConduit(); + blockAlchemicCalcinator = new BlockAlchemicCalcinator(); + blockCrystalBelljar = new BlockBelljar(); + blockDemonChest = new BlockDemonChest(); + blockCrystal = new BlockCrystal(); + blockMimic = new MimicBlock(); - blockLifeEssence = registerBlock(new BlockLifeEssence(), "life_essence"); - blockEnchantmentGlyph = registerBlock(new BlockEnchantmentGlyph(), ItemEnchantmentGlyphBlock.class, "enchantment_glyph"); - blockStabilityGlyph = registerBlock(new BlockStabilityGlyph(), ItemStabilityGlyphBlock.class, "stability_glyph"); - blockCrucible = registerBlock(new BlockIncenseCrucible(), "incense_crucible"); + blockLifeEssence = new LifeEssenceBlock(); + blockEnchantmentGlyph = new BlockEnchantmentGlyph(); + blockStabilityGlyph = new BlockStabilityGlyph(); + blockCrucible = new BlockCrucible(); } - public static Block registerBlock(Block block, String unlocalizedName) + public static void registerBlocksInPre() { - //TODO Insert Model Code here - block.setUnlocalizedName(unlocalizedName); + GameRegistry.registerBlock(ModBlocks.blockAltar, "Altar"); + GameRegistry.registerBlock(ModBlocks.bloodRune, ItemBloodRuneBlock.class, "AlchemicalWizardry" + (ModBlocks.bloodRune.getUnlocalizedName().substring(5))); + GameRegistry.registerBlock(ModBlocks.blockLifeEssence, "lifeEssence"); + GameRegistry.registerBlock(ModBlocks.speedRune, "speedRune"); + GameRegistry.registerBlock(ModBlocks.efficiencyRune, "efficiencyRune"); + GameRegistry.registerBlock(ModBlocks.runeOfSacrifice, "runeOfSacrifice"); + GameRegistry.registerBlock(ModBlocks.runeOfSelfSacrifice, "runeOfSelfSacrifice"); + GameRegistry.registerBlock(ModBlocks.ritualStone, "ritualStone"); + GameRegistry.registerBlock(ModBlocks.blockMasterStone, "masterStone"); + GameRegistry.registerBlock(ModBlocks.bloodSocket, "bloodSocket"); + GameRegistry.registerBlock(ModBlocks.imperfectRitualStone, "imperfectRitualStone"); -// if (!) //creative tab blacklist - { - block.setCreativeTab(AlchemicalWizardry.tabBloodMagic); - } + GameRegistry.registerBlock(ModBlocks.armourForge, "armourForge"); + GameRegistry.registerBlock(ModBlocks.emptySocket, "emptySocket"); + GameRegistry.registerBlock(ModBlocks.bloodStoneBrick, "bloodStoneBrick"); + GameRegistry.registerBlock(ModBlocks.largeBloodStoneBrick, "largeBloodStoneBrick"); + GameRegistry.registerBlock(ModBlocks.blockWritingTable, "blockWritingTable"); + GameRegistry.registerBlock(ModBlocks.blockHomHeart, "blockHomHeart"); + GameRegistry.registerBlock(ModBlocks.blockPedestal, "blockPedestal"); + GameRegistry.registerBlock(ModBlocks.blockPlinth, "blockPlinth"); + GameRegistry.registerBlock(ModBlocks.blockTeleposer, "blockTeleposer"); + GameRegistry.registerBlock(ModBlocks.spectralBlock, "spectralBlock"); + GameRegistry.registerBlock(ModBlocks.blockBloodLight, "bloodLight"); -// blocksNotToBeRegistered.clear(); -// for (String unlocName : BloodMagicConfiguration.blocksToBeDisabled) - { -// if (unlocName.equals(unlocalizedName)) - { -// blocksNotToBeRegistered.add(unlocName); - } - } - // if (!blocksNotToBeRegistered.contains(unlocalizedName)) - { -// GameRegistry.registerBlock(block, unlocalizedName); - } + GameRegistry.registerBlock(ModBlocks.blockConduit, "blockConduit"); + GameRegistry.registerBlock(ModBlocks.blockSpellParadigm, ItemSpellParadigmBlock.class, "AlchemicalWizardry" + (ModBlocks.blockSpellParadigm.getUnlocalizedName())); + GameRegistry.registerBlock(ModBlocks.blockSpellEnhancement, ItemSpellEnhancementBlock.class, "AlchemicalWizardry" + (ModBlocks.blockSpellEnhancement.getUnlocalizedName())); + GameRegistry.registerBlock(ModBlocks.blockSpellModifier, ItemSpellModifierBlock.class, "AlchemicalWizardry" + (ModBlocks.blockSpellModifier.getUnlocalizedName())); + GameRegistry.registerBlock(ModBlocks.blockSpellEffect, ItemSpellEffectBlock.class, "AlchemicalWizardry" + (ModBlocks.blockSpellEffect.getUnlocalizedName())); -// BlockRenderer.registerBlock(block); - - GameRegistry.registerBlock(block, unlocalizedName); - return block; + GameRegistry.registerBlock(ModBlocks.blockSpectralContainer, "spectralContainer"); + GameRegistry.registerBlock(ModBlocks.blockDemonPortal, "demonPortalMain"); + GameRegistry.registerBlock(ModBlocks.blockBuildingSchematicSaver, "blockSchemSaver"); + GameRegistry.registerBlock(ModBlocks.blockReagentConduit, "blockReagentConduit"); + GameRegistry.registerBlock(ModBlocks.blockAlchemicCalcinator, "blockAlchemicCalcinator"); + GameRegistry.registerBlock(ModBlocks.blockCrystalBelljar, ItemBlockCrystalBelljar.class, "blockCrystalBelljar"); + GameRegistry.registerBlock(ModBlocks.blockDemonChest, "blockDemonChest"); + GameRegistry.registerBlock(ModBlocks.blockCrystal, ItemCrystalBlock.class, "blockCrystal"); + GameRegistry.registerBlock(ModBlocks.blockMimic, "blockMimic"); + GameRegistry.registerBlock(ModBlocks.blockEnchantmentGlyph, ItemEnchantmentGlyphBlock.class, "blockEnchantmentGlyph"); + GameRegistry.registerBlock(ModBlocks.blockStabilityGlyph, ItemStabilityGlyphBlock.class, "blockStabilityGlyph"); + + GameRegistry.registerBlock(ModBlocks.blockCrucible, "blockCrucible"); } - public static Block registerBlock(Block block, Class<? extends ItemBlock> itemBlockClass, String unlocalizedName) + public static void registerBlocksInInit() { - block.setCreativeTab(AlchemicalWizardry.tabBloodMagic); - -// for (String unlocName : BloodMagicConfiguration.blocksToBeDisabled) - { -// if (unlocName.equals(unlocalizedName)) - { -// blocksNotToBeRegistered.add(unlocName); - } - } -// if (!blocksNotToBeRegistered.contains(unlocalizedName)) - { - GameRegistry.registerBlock(block, itemBlockClass, unlocalizedName); - } - -// BlockRenderer.registerBlock(block); - - return block; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/ModItems.java b/src/main/java/WayofTime/alchemicalWizardry/ModItems.java index edfcf081..8e504b33 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/ModItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/ModItems.java @@ -1,61 +1,19 @@ package WayofTime.alchemicalWizardry; +import WayofTime.alchemicalWizardry.common.items.*; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Items; import net.minecraft.item.Item; -import net.minecraftforge.fml.common.registry.GameRegistry; import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; -import WayofTime.alchemicalWizardry.common.items.BaseItems; -import WayofTime.alchemicalWizardry.common.items.ActivationCrystal; -import WayofTime.alchemicalWizardry.common.items.AirScribeTool; -import WayofTime.alchemicalWizardry.common.items.ApprenticeBloodOrb; -import WayofTime.alchemicalWizardry.common.items.ArchmageBloodOrb; -import WayofTime.alchemicalWizardry.common.items.ArmourInhibitor; -import WayofTime.alchemicalWizardry.common.items.BlankSpell; -import WayofTime.alchemicalWizardry.common.items.BloodShard; -import WayofTime.alchemicalWizardry.common.items.BoundAxe; -import WayofTime.alchemicalWizardry.common.items.BoundPickaxe; -import WayofTime.alchemicalWizardry.common.items.BoundShovel; -import WayofTime.alchemicalWizardry.common.items.CreativeOrb; -import WayofTime.alchemicalWizardry.common.items.CreativeDagger; -import WayofTime.alchemicalWizardry.common.items.DaggerOfSacrifice; -import WayofTime.alchemicalWizardry.common.items.DawnScribeTool; -import WayofTime.alchemicalWizardry.common.items.DemonCrystal; -import WayofTime.alchemicalWizardry.common.items.DemonicTelepositionFocus; -import WayofTime.alchemicalWizardry.common.items.DuskScribeTool; -import WayofTime.alchemicalWizardry.common.items.EarthScribeTool; -import WayofTime.alchemicalWizardry.common.items.Orb; -import WayofTime.alchemicalWizardry.common.items.EnergyBazooka; -import WayofTime.alchemicalWizardry.common.items.EnergyBlaster; -import WayofTime.alchemicalWizardry.common.items.BoundBlade; -import WayofTime.alchemicalWizardry.common.items.EnhancedTelepositionFocus; -import WayofTime.alchemicalWizardry.common.items.FireScribeTool; -import WayofTime.alchemicalWizardry.common.items.ItemAlchemyBase; -import WayofTime.alchemicalWizardry.common.items.ItemBloodLetterPack; -import WayofTime.alchemicalWizardry.common.items.ItemComplexSpellCrystal; -import WayofTime.alchemicalWizardry.common.items.ItemComponents; -import WayofTime.alchemicalWizardry.common.items.KeyOfBinding; -import WayofTime.alchemicalWizardry.common.items.ItemIncense; -import WayofTime.alchemicalWizardry.common.items.ItemRitualDismantler; -import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; -import WayofTime.alchemicalWizardry.common.items.LavaCrystal; -import WayofTime.alchemicalWizardry.common.items.LifeBucket; -import WayofTime.alchemicalWizardry.common.items.MagicianBloodOrb; -import WayofTime.alchemicalWizardry.common.items.MasterBloodOrb; -import WayofTime.alchemicalWizardry.common.items.ReinforcedTelepositionFocus; -import WayofTime.alchemicalWizardry.common.items.SacrificialDagger; -import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; -import WayofTime.alchemicalWizardry.common.items.TranscendentBloodOrb; -import WayofTime.alchemicalWizardry.common.items.WaterScribeTool; import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourEarth; import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourFire; import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourWater; import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourWind; -import WayofTime.alchemicalWizardry.common.items.energy.AlchemicalRouter; -import WayofTime.alchemicalWizardry.common.items.energy.AlchemicalCleanser; -import WayofTime.alchemicalWizardry.common.items.energy.AlchemicalSegmenter; +import WayofTime.alchemicalWizardry.common.items.energy.ItemAttunedCrystal; +import WayofTime.alchemicalWizardry.common.items.energy.ItemDestinationClearer; +import WayofTime.alchemicalWizardry.common.items.energy.ItemTankSegmenter; import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask; import WayofTime.alchemicalWizardry.common.items.potion.AlchemyReagent; import WayofTime.alchemicalWizardry.common.items.potion.AverageLengtheningCatalyst; @@ -88,13 +46,12 @@ import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheAssassin; import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheBridge; import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheFastMiner; import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfWind; -import WayofTime.alchemicalWizardry.common.items.sigil.SigilCompress; +import WayofTime.alchemicalWizardry.common.items.sigil.SigilPackRat; import WayofTime.alchemicalWizardry.common.items.sigil.SigilSeer; import WayofTime.alchemicalWizardry.common.items.sigil.SigilVoid; import WayofTime.alchemicalWizardry.common.items.sigil.SigilWater; import WayofTime.alchemicalWizardry.common.items.sigil.holding.SigilOfHolding; - -import java.util.ArrayList; +import cpw.mods.fml.common.registry.GameRegistry; /** * Created with IntelliJ IDEA. @@ -133,7 +90,7 @@ public class ModItems public static Item boundAxe; public static Item boundShovel; public static Item boundHelmet; - public static Item boundChestplate; + public static Item boundPlate; public static Item boundLeggings; public static Item boundBoots; public static Item weakBloodShard; @@ -201,7 +158,7 @@ public class ModItems public static Item itemSeerSigil; public static Item itemCombinationalCatalyst; - public static ItemSpellMultiTool customTool; + public static Item customTool; public static Item itemAttunedCrystal; public static Item itemTankSegmenter; @@ -218,22 +175,22 @@ public class ModItems public static Item itemAssassinSigil; public static Item boundHelmetWater; - public static Item boundChestplateWater; + public static Item boundPlateWater; public static Item boundLeggingsWater; public static Item boundBootsWater; public static Item boundHelmetEarth; - public static Item boundChestplateEarth; + public static Item boundPlateEarth; public static Item boundLeggingsEarth; public static Item boundBootsEarth; public static Item boundHelmetWind; - public static Item boundChestplateWind; + public static Item boundPlateWind; public static Item boundLeggingsWind; public static Item boundBootsWind; public static Item boundHelmetFire; - public static Item boundChestplateFire; + public static Item boundPlateFire; public static Item boundLeggingsFire; public static Item boundBootsFire; @@ -246,159 +203,269 @@ public class ModItems public static Item ritualDismantler; - public static ArrayList<String> itemsNotToBeRegistered = new ArrayList<String>(); - public static void init() { - weakBloodOrb = registerItem(new Orb(5000), "weak_blood_orb"); - apprenticeBloodOrb = registerItem(new ApprenticeBloodOrb(25000), "apprentice_blood_orb"); - magicianBloodOrb = registerItem(new MagicianBloodOrb(150000), "magician_blood_orb"); - masterBloodOrb = registerItem(new MasterBloodOrb(1000000), "master_blood_orb"); - archmageBloodOrb = registerItem(new ArchmageBloodOrb(10000000), "archmage_blood_orb"); - transcendentBloodOrb = registerItem(new TranscendentBloodOrb(30000000), "transcendent_blood_orb"); - energyBlaster = registerItem(new EnergyBlaster(), "energy_blaster"); - energySword = registerItem(new BoundBlade(), "bound_blade"); - lavaCrystal = registerItem(new LavaCrystal(), "lava_crystal"); - waterSigil = registerItem(new SigilWater(), "water_sigil"); - lavaSigil = registerItem(new SigilLava(), "lava_sigil"); - voidSigil = registerItem(new SigilVoid(), "void_sigil"); - blankSlate = registerItem(new BaseItems(), "blank_slate"); - reinforcedSlate = registerItem(new BaseItems(), "reinforced_slate"); - sacrificialDagger = registerItem(new SacrificialDagger(), "sacrificial_agger"); - daggerOfSacrifice = registerItem(new DaggerOfSacrifice(), "dagger_of_sacrifice"); - airSigil = registerItem(new SigilAir(), "air_sigil"); - sigilOfTheFastMiner = registerItem(new SigilOfTheFastMiner(), "sigil_of_the_fast_miner"); - sigilOfElementalAffinity = registerItem(new SigilOfElementalAffinity(), "sigil_of_elemental_affinity"); - sigilOfHaste = registerItem(new SigilOfHaste(), "sigil_of_haste"); - sigilOfHolding = registerItem(new SigilOfHolding(), "sigil_of_holding"); - divinationSigil = registerItem(new SigilDivination(), "divination_sigil"); - waterScribeTool = registerItem(new WaterScribeTool(), "water_scribe_tool"); - fireScribeTool = registerItem(new FireScribeTool(), "fire_scribe_tool"); - earthScribeTool = registerItem(new EarthScribeTool(), "earth_scribe_tool"); - airScribeTool = registerItem(new AirScribeTool(), "air_scribe_tool"); - activationCrystal = registerItem(new ActivationCrystal(), "activation_crystal"); - boundPickaxe = registerItem(new BoundPickaxe(), "bound_pickaxe"); - boundAxe = registerItem(new BoundAxe(), "bound_axe"); - boundShovel = registerItem(new BoundShovel(), "bound_shovel"); - boundHelmet = registerItem(new BoundArmour(0), "bound_helmet"); - boundChestplate = registerItem(new BoundArmour(1), "bound_chestplate"); - boundLeggings = registerItem(new BoundArmour(2), "bound_leggings"); - boundBoots = registerItem(new BoundArmour(3), "bound_boots"); - weakBloodShard = registerItem(new BloodShard(), "weak_blood_shard"); - growthSigil = registerItem(new SigilOfGrowth(), "growth_sigil"); - blankSpell = registerItem(new BlankSpell(), "blank_spell"); - alchemyFlask = registerItem(new AlchemyFlask(), "alchemy_flask"); - standardBindingAgent = registerItem(new StandardBindingAgent(), "standard_binding_agent"); - mundanePowerCatalyst = registerItem(new MundanePowerCatalyst(), "mundane_power_catalyst"); - averagePowerCatalyst = registerItem(new AveragePowerCatalyst(), "average_power_catalyst"); - greaterPowerCatalyst = registerItem(new GreaterPowerCatalyst(), "greater_power_catalyst"); - mundaneLengtheningCatalyst = registerItem(new MundaneLengtheningCatalyst(), "mundane_lengthening_catalyst"); - averageLengtheningCatalyst = registerItem(new AverageLengtheningCatalyst(), "average_lengthening_catalyst"); - greaterLengtheningCatalyst = registerItem(new GreaterLengtheningCatalyst(), "greater_lengthening_catalyst"); - incendium = registerItem(new AlchemyReagent(), "incendium"); - magicales = registerItem(new AlchemyReagent(), "magicales"); - sanctus = registerItem(new AlchemyReagent(), "sanctus"); - aether = registerItem(new AlchemyReagent(), "aether"); - simpleCatalyst = registerItem(new AlchemyReagent(), "simple_catalyst"); - crepitous = registerItem(new AlchemyReagent(), "crepitous"); - crystallos = registerItem(new AlchemyReagent(), "crystallos"); - terrae = registerItem(new AlchemyReagent(), "terrae"); - aquasalus = registerItem(new AlchemyReagent(), "aquasalus"); - tennebrae = registerItem(new AlchemyReagent(), "tennebrae"); - demonBloodShard = registerItem(new BloodShard(), "demon_blood_shard"); - sigilOfWind = registerItem(new SigilOfWind(), "sigil_of_wind"); - telepositionFocus = registerItem(new TelepositionFocus(1), "teleposition_focus"); - enhancedTelepositionFocus = registerItem(new EnhancedTelepositionFocus(), "enhanced_teleposition_focus"); - reinforcedTelepositionFocus = registerItem(new ReinforcedTelepositionFocus(), "reinforced_teleposition_focus"); - demonicTelepositionFocus = registerItem(new DemonicTelepositionFocus(), "demonic_teleposition_focus"); - imbuedSlate = registerItem(new BaseItems(), "imbued_slate"); - demonicSlate = registerItem(new BaseItems(), "demonic_slate"); - duskScribeTool = registerItem(new DuskScribeTool(), "dusk_scribe_tool"); - sigilOfTheBridge = registerItem(new SigilOfTheBridge(), "sigil_of_the_bridge"); - armourInhibitor = registerItem(new ArmourInhibitor(), "armour_inhibitor"); - creativeFiller = registerItem(new CreativeOrb(), "creative_orb"); - demonPlacer = registerItem(new DemonCrystal(), "demon_crystal"); - creativeDagger = registerItem(new CreativeDagger(), "creative_dagger"); - weakFillingAgent = registerItem(new WeakFillingAgent(), "weak_filling_agent"); - standardFillingAgent = registerItem(new StandardFillingAgent(), "standard_filling_agent"); - enhancedFillingAgent = registerItem(new EnhancedFillingAgent(), "enhanced_filling_agent"); - weakBindingAgent = registerItem(new WeakBindingAgent(), "weak_binding_agent"); - itemRitualDiviner = registerItem(new ItemRitualDiviner(), "ritual_diviner"); - sigilOfMagnetism = registerItem(new SigilOfMagnetism(), "sigil_of_magnetism"); - itemKeyOfDiablo = registerItem(new KeyOfBinding(), "key_of_binding"); - energyBazooka = registerItem(new EnergyBazooka(), "energy_bazooka"); - itemBloodLightSigil = registerItem(new SigilBloodLight(), "blood_light_sigil"); - itemComplexSpellCrystal = registerItem(new ItemComplexSpellCrystal(), "complex_spell_crystal"); - bucketLife = registerItem(new LifeBucket(ModBlocks.blockLifeEssence), "bucket_life").setContainerItem(Items.bucket).setCreativeTab(CreativeTabs.tabMisc); - itemSigilOfEnderSeverance = registerItem(new SigilOfEnderSeverance(), "sigil_of_ender_severance"); - baseItems = registerItem(new ItemComponents(), "base_items"); - baseAlchemyItems = registerItem(new ItemAlchemyBase(), "base_alchemy_items"); - itemSigilOfSupression = registerItem(new SigilOfSupression(), "sigil_of_suppression"); - itemFluidSigil = registerItem(new SigilFluid(), "fluid_sigil"); - itemSeerSigil = registerItem(new SigilSeer(), "sigil_of_sight"); - customTool = (ItemSpellMultiTool) registerItem(new ItemSpellMultiTool(), "multi_tool"); + weakBloodOrb = new EnergyBattery(5000).setUnlocalizedName("weakBloodOrb"); + apprenticeBloodOrb = new ApprenticeBloodOrb(25000).setUnlocalizedName("apprenticeBloodOrb"); + magicianBloodOrb = new MagicianBloodOrb(150000).setUnlocalizedName("magicianBloodOrb"); + masterBloodOrb = new MasterBloodOrb(1000000).setUnlocalizedName("masterBloodOrb"); + archmageBloodOrb = new ArchmageBloodOrb(10000000).setUnlocalizedName("archmageBloodOrb"); + transcendentBloodOrb = new TranscendentBloodOrb(30000000).setUnlocalizedName("transcendentBloodOrb"); + energyBlaster = new EnergyBlast().setUnlocalizedName("energyBlast"); + energySword = new EnergySword().setUnlocalizedName("energySword"); + lavaCrystal = new LavaCrystal().setUnlocalizedName("lavaCrystal"); + waterSigil = new SigilWater().setUnlocalizedName("waterSigil"); + lavaSigil = new SigilLava().setUnlocalizedName("lavaSigil"); + voidSigil = new SigilVoid().setUnlocalizedName("voidSigil"); + blankSlate = new AWBaseItems().setUnlocalizedName("blankSlate"); + reinforcedSlate = new AWBaseItems().setUnlocalizedName("reinforcedSlate"); + sacrificialDagger = new SacrificialDagger().setUnlocalizedName("sacrificialDagger"); + daggerOfSacrifice = new DaggerOfSacrifice().setUnlocalizedName("daggerOfSacrifice"); + airSigil = new SigilAir().setUnlocalizedName("airSigil"); + sigilOfTheFastMiner = new SigilOfTheFastMiner().setUnlocalizedName("sigilOfTheFastMiner"); + sigilOfElementalAffinity = new SigilOfElementalAffinity().setUnlocalizedName("sigilOfElementalAffinity"); + sigilOfHaste = new SigilOfHaste().setUnlocalizedName("sigilOfHaste"); + sigilOfHolding = new SigilOfHolding().setUnlocalizedName("sigilOfHolding"); + divinationSigil = new SigilDivination().setUnlocalizedName("divinationSigil"); + waterScribeTool = new WaterScribeTool().setUnlocalizedName("waterScribeTool"); + fireScribeTool = new FireScribeTool().setUnlocalizedName("fireScribeTool"); + earthScribeTool = new EarthScribeTool().setUnlocalizedName("earthScribeTool"); + airScribeTool = new AirScribeTool().setUnlocalizedName("airScribeTool"); + activationCrystal = new ActivationCrystal(); + boundPickaxe = new BoundPickaxe().setUnlocalizedName("boundPickaxe"); + boundAxe = new BoundAxe().setUnlocalizedName("boundAxe"); + boundShovel = new BoundShovel().setUnlocalizedName("boundShovel"); + boundHelmet = new BoundArmour(0).setUnlocalizedName("boundHelmet"); + boundPlate = new BoundArmour(1).setUnlocalizedName("boundPlate"); + boundLeggings = new BoundArmour(2).setUnlocalizedName("boundLeggings"); + boundBoots = new BoundArmour(3).setUnlocalizedName("boundBoots"); + weakBloodShard = new BloodShard().setUnlocalizedName("weakBloodShard"); + growthSigil = new SigilOfGrowth().setUnlocalizedName("growthSigil"); + blankSpell = new BlankSpell().setUnlocalizedName("blankSpell"); + alchemyFlask = new AlchemyFlask().setUnlocalizedName("alchemyFlask"); + standardBindingAgent = new StandardBindingAgent().setUnlocalizedName("standardBindingAgent"); + mundanePowerCatalyst = new MundanePowerCatalyst().setUnlocalizedName("mundanePowerCatalyst"); + averagePowerCatalyst = new AveragePowerCatalyst().setUnlocalizedName("averagePowerCatalyst"); + greaterPowerCatalyst = new GreaterPowerCatalyst().setUnlocalizedName("greaterPowerCatalyst"); + mundaneLengtheningCatalyst = new MundaneLengtheningCatalyst().setUnlocalizedName("mundaneLengtheningCatalyst"); + averageLengtheningCatalyst = new AverageLengtheningCatalyst().setUnlocalizedName("averageLengtheningCatalyst"); + greaterLengtheningCatalyst = new GreaterLengtheningCatalyst().setUnlocalizedName("greaterLengtheningCatalyst"); + incendium = new AlchemyReagent().setUnlocalizedName("incendium"); + magicales = new AlchemyReagent().setUnlocalizedName("magicales"); + sanctus = new AlchemyReagent().setUnlocalizedName("sanctus"); + aether = new AlchemyReagent().setUnlocalizedName("aether"); + simpleCatalyst = new AlchemyReagent().setUnlocalizedName("simpleCatalyst"); + crepitous = new AlchemyReagent().setUnlocalizedName("crepitous"); + crystallos = new AlchemyReagent().setUnlocalizedName("crystallos"); + terrae = new AlchemyReagent().setUnlocalizedName("terrae"); + aquasalus = new AlchemyReagent().setUnlocalizedName("aquasalus"); + tennebrae = new AlchemyReagent().setUnlocalizedName("tennebrae"); + demonBloodShard = new BloodShard().setUnlocalizedName("demonBloodShard"); + sigilOfWind = new SigilOfWind().setUnlocalizedName("sigilOfWind"); + telepositionFocus = new TelepositionFocus(1).setUnlocalizedName("telepositionFocus"); + enhancedTelepositionFocus = new EnhancedTelepositionFocus().setUnlocalizedName("enhancedTelepositionFocus"); + reinforcedTelepositionFocus = new ReinforcedTelepositionFocus().setUnlocalizedName("reinforcedTelepositionFocus"); + demonicTelepositionFocus = new DemonicTelepositionFocus().setUnlocalizedName("demonicTelepositionFocus"); + imbuedSlate = new AWBaseItems().setUnlocalizedName("imbuedSlate"); + demonicSlate = new AWBaseItems().setUnlocalizedName("demonicSlate"); + duskScribeTool = new DuskScribeTool().setUnlocalizedName("duskScribeTool"); + sigilOfTheBridge = new SigilOfTheBridge().setUnlocalizedName("sigilOfTheBridge"); + armourInhibitor = new ArmourInhibitor().setUnlocalizedName("armourInhibitor"); + creativeFiller = new CheatyItem().setUnlocalizedName("cheatyItem"); + demonPlacer = new DemonPlacer().setUnlocalizedName("demonPlacer"); + creativeDagger = new CreativeDagger().setUnlocalizedName("creativeDagger"); + weakFillingAgent = new WeakFillingAgent().setUnlocalizedName("weakFillingAgent"); + standardFillingAgent = new StandardFillingAgent().setUnlocalizedName("standardFillingAgent"); + enhancedFillingAgent = new EnhancedFillingAgent().setUnlocalizedName("enhancedFillingAgent"); + weakBindingAgent = new WeakBindingAgent().setUnlocalizedName("weakBindingAgent"); + itemRitualDiviner = new ItemRitualDiviner().setUnlocalizedName("ritualDiviner"); + sigilOfMagnetism = new SigilOfMagnetism().setUnlocalizedName("sigilOfMagnetism"); + itemKeyOfDiablo = new ItemDiabloKey().setUnlocalizedName("itemDiabloKey"); + energyBazooka = new EnergyBazooka().setUnlocalizedName("energyBazooka"); + itemBloodLightSigil = new SigilBloodLight().setUnlocalizedName("bloodLightSigil"); + itemComplexSpellCrystal = new ItemComplexSpellCrystal().setUnlocalizedName("itemComplexSpellCrystal"); + bucketLife = new LifeBucket(ModBlocks.blockLifeEssence).setUnlocalizedName("bucketLife").setContainerItem(Items.bucket).setCreativeTab(CreativeTabs.tabMisc); + itemSigilOfEnderSeverance = (new SigilOfEnderSeverance()).setUnlocalizedName("itemSigilOfEnderSeverance"); + baseItems = new ItemComponents().setUnlocalizedName("baseItems"); + baseAlchemyItems = new ItemAlchemyBase().setUnlocalizedName("baseAlchemyItems"); + itemSigilOfSupression = new SigilOfSupression().setUnlocalizedName("itemSigilOfSupression"); + itemFluidSigil = new SigilFluid().setUnlocalizedName("itemFluidSigil"); + itemSeerSigil = new SigilSeer().setUnlocalizedName("itemSeerSigil"); + customTool = new ItemSpellMultiTool().setUnlocalizedName("multiTool"); SpellParadigmTool.customTool = customTool; - itemCombinationalCatalyst = registerItem(new CombinationalCatalyst(), "combinational_catalyst"); - itemAttunedCrystal = registerItem(new AlchemicalRouter(), "alchemical_router"); - itemTankSegmenter = registerItem(new AlchemicalSegmenter(), "alchemical_segmenter"); - itemDestinationClearer = registerItem(new AlchemicalCleanser(), "alchemical_cleanser"); + itemCombinationalCatalyst = new CombinationalCatalyst().setUnlocalizedName("itemCombinationalCatalyst"); + itemAttunedCrystal = new ItemAttunedCrystal().setUnlocalizedName("itemAttunedCrystal"); + itemTankSegmenter = new ItemTankSegmenter().setUnlocalizedName("itemTankSegmenter"); + itemDestinationClearer = new ItemDestinationClearer().setUnlocalizedName("destinationClearer"); - dawnScribeTool = registerItem(new DawnScribeTool(), "dawn_scribe_tool"); + dawnScribeTool = new DawnScribeTool().setUnlocalizedName("dawnScribeTool"); - itemBloodPack = registerItem(new ItemBloodLetterPack(), "blood_pack"); - itemHarvestSigil = registerItem(new SigilHarvest(), "harvest_sigil"); - itemCompressionSigil = registerItem(new SigilCompress(), "compression_sigil"); - itemAssassinSigil = registerItem(new SigilOfTheAssassin(), "assassin_sigil"); + itemBloodPack = new ItemBloodLetterPack().setUnlocalizedName("itemBloodPack"); + itemHarvestSigil = new SigilHarvest().setUnlocalizedName("itemHarvestSigil"); + itemCompressionSigil = new SigilPackRat().setUnlocalizedName("itemCompressionSigil"); + itemAssassinSigil = new SigilOfTheAssassin().setUnlocalizedName("itemAssassinSigil"); - boundHelmetWater = registerItem(new OmegaArmourWater(0), "bound_helmet_water"); - boundChestplateWater = registerItem(new OmegaArmourWater(1), "bound_chestplate_water"); - boundLeggingsWater = registerItem(new OmegaArmourWater(2), "bound_leggings_water"); - boundBootsWater = registerItem(new OmegaArmourWater(3), "bound_boots_water"); + boundHelmetWater = new OmegaArmourWater(0).setUnlocalizedName("boundHelmetWater"); + boundPlateWater = new OmegaArmourWater(1).setUnlocalizedName("boundPlateWater"); + boundLeggingsWater = new OmegaArmourWater(2).setUnlocalizedName("boundLeggingsWater"); + boundBootsWater = new OmegaArmourWater(3).setUnlocalizedName("boundBootsWater"); - boundHelmetEarth = registerItem(new OmegaArmourEarth(0), "bound_helmet_earth"); - boundChestplateEarth = registerItem(new OmegaArmourEarth(1), "bound_chestplate_earth"); - boundLeggingsEarth = registerItem(new OmegaArmourEarth(2), "bound_leggings_earth"); - boundBootsEarth = registerItem(new OmegaArmourEarth(3), "bound_boots_earth"); + boundHelmetEarth = new OmegaArmourEarth(0).setUnlocalizedName("boundHelmetEarth"); + boundPlateEarth = new OmegaArmourEarth(1).setUnlocalizedName("boundPlateEarth"); + boundLeggingsEarth = new OmegaArmourEarth(2).setUnlocalizedName("boundLeggingsEarth"); + boundBootsEarth = new OmegaArmourEarth(3).setUnlocalizedName("boundBootsEarth"); - boundHelmetWind = registerItem(new OmegaArmourWind(0), "bound_helmet_wind"); - boundChestplateWind = registerItem(new OmegaArmourWind(1), "bound_chestplate_wind"); - boundLeggingsWind = registerItem(new OmegaArmourWind(2), "bound_leggings_wind"); - boundBootsWind = registerItem(new OmegaArmourWind(3), "bound_boots_wind"); + boundHelmetWind = new OmegaArmourWind(0).setUnlocalizedName("boundHelmetWind"); + boundPlateWind = new OmegaArmourWind(1).setUnlocalizedName("boundPlateWind"); + boundLeggingsWind = new OmegaArmourWind(2).setUnlocalizedName("boundLeggingsWind"); + boundBootsWind = new OmegaArmourWind(3).setUnlocalizedName("boundBootsWind"); - boundHelmetFire = registerItem(new OmegaArmourFire(0), "bound_helmet_fire"); - boundChestplateFire = registerItem(new OmegaArmourFire(1), "bound_chestplate_fire"); - boundLeggingsFire = registerItem(new OmegaArmourFire(2), "bound_leggings_fire"); - boundBootsFire = registerItem(new OmegaArmourFire(3), "bound_boots_fire"); + boundHelmetFire = new OmegaArmourFire(0).setUnlocalizedName("boundHelmetFire"); + boundPlateFire = new OmegaArmourFire(1).setUnlocalizedName("boundPlateFire"); + boundLeggingsFire = new OmegaArmourFire(2).setUnlocalizedName("boundLeggingsFire"); + boundBootsFire = new OmegaArmourFire(3).setUnlocalizedName("boundBootsFire"); - inputRoutingFocus = registerItem(new InputRoutingFocus(), "input_routing_focus"); - outputRoutingFocus = registerItem(new OutputRoutingFocus(), "output_routing_focus"); + inputRoutingFocus = new InputRoutingFocus().setUnlocalizedName("inputRoutingFocus"); + outputRoutingFocus = new OutputRoutingFocus().setUnlocalizedName("outputRoutingFocus"); - itemIncense = registerItem(new ItemIncense(), "incense"); + itemIncense = new ItemIncense().setUnlocalizedName("bloodMagicIncenseItem"); - ritualDismantler = registerItem(new ItemRitualDismantler(), "ritual_dismantler"); + ritualDismantler = new ItemRitualDismantler().setUnlocalizedName("ritualDismantler"); } - public static Item registerItem(Item item, String unlocalizedName) + public static void registerItems() { - item.setUnlocalizedName(unlocalizedName); - item.setCreativeTab(AlchemicalWizardry.tabBloodMagic); -// itemsNotToBeRegistered.clear(); + GameRegistry.registerItem(ModItems.weakBloodOrb, "weakBloodOrb"); + GameRegistry.registerItem(ModItems.apprenticeBloodOrb, "apprenticeBloodOrb"); + GameRegistry.registerItem(ModItems.magicianBloodOrb, "magicianBloodOrb"); + GameRegistry.registerItem(ModItems.energyBlaster, "energyBlaster"); -// for (String unlocName : BloodMagicConfiguration.itemsToBeDisabled) - { -// if (unlocName.equals(unlocalizedName)) - { -// itemsNotToBeRegistered.add(unlocName); - } - } + GameRegistry.registerItem(ModItems.energySword, "energySword"); + GameRegistry.registerItem(ModItems.lavaCrystal, "lavaCrystal"); + GameRegistry.registerItem(ModItems.waterSigil, "waterSigil"); + GameRegistry.registerItem(ModItems.lavaSigil, "lavaSigil"); + GameRegistry.registerItem(ModItems.voidSigil, "voidSigil"); + GameRegistry.registerItem(ModItems.blankSlate, "blankSlate"); + GameRegistry.registerItem(ModItems.reinforcedSlate, "reinforcedSlate"); + GameRegistry.registerItem(ModItems.sacrificialDagger, "sacrificialKnife"); + GameRegistry.registerItem(ModItems.daggerOfSacrifice, "daggerOfSacrifice"); + GameRegistry.registerItem(ModItems.airSigil, "airSigil"); + GameRegistry.registerItem(ModItems.sigilOfTheFastMiner, "sigilOfTheFastMiner"); + GameRegistry.registerItem(ModItems.sigilOfElementalAffinity, "sigilOfElementalAffinity"); + GameRegistry.registerItem(ModItems.sigilOfHaste, "sigilOfHaste"); + GameRegistry.registerItem(ModItems.sigilOfHolding, "sigilOfHolding"); + GameRegistry.registerItem(ModItems.divinationSigil, "divinationSigil"); + GameRegistry.registerItem(ModItems.waterScribeTool, "waterScribeTool"); + GameRegistry.registerItem(ModItems.fireScribeTool, "fireScribeTool"); + GameRegistry.registerItem(ModItems.earthScribeTool, "earthScribeTool"); + GameRegistry.registerItem(ModItems.airScribeTool, "airScribeTool"); + GameRegistry.registerItem(ModItems.activationCrystal, "activationCrystal"); + GameRegistry.registerItem(ModItems.boundPickaxe, "boundPickaxe"); + GameRegistry.registerItem(ModItems.boundAxe, "boundAxe"); + GameRegistry.registerItem(ModItems.boundShovel, "boundShovel"); + GameRegistry.registerItem(ModItems.boundHelmet, "boundHelmet"); + GameRegistry.registerItem(ModItems.boundPlate, "boundPlate"); + GameRegistry.registerItem(ModItems.boundLeggings, "boundLeggings"); + GameRegistry.registerItem(ModItems.boundBoots, "boundBoots"); + GameRegistry.registerItem(ModItems.weakBloodShard, "weakBloodShard"); + GameRegistry.registerItem(ModItems.growthSigil, "growthSigil"); + GameRegistry.registerItem(ModItems.blankSpell, "blankSpell"); + GameRegistry.registerItem(ModItems.masterBloodOrb, "masterBloodOrb"); + GameRegistry.registerItem(ModItems.alchemyFlask, "alchemyFlask"); + GameRegistry.registerItem(ModItems.standardBindingAgent, "standardBindingAgent"); + GameRegistry.registerItem(ModItems.mundanePowerCatalyst, "mundanePowerCatalyst"); + GameRegistry.registerItem(ModItems.averagePowerCatalyst, "averagePowerCatalyst"); + GameRegistry.registerItem(ModItems.greaterPowerCatalyst, "greaterPowerCatalyst"); + GameRegistry.registerItem(ModItems.mundaneLengtheningCatalyst, "mundaneLengtheningCatalyst"); + GameRegistry.registerItem(ModItems.averageLengtheningCatalyst, "averageLengtheningCatalyst"); + GameRegistry.registerItem(ModItems.greaterLengtheningCatalyst, "greaterLengtheningCatalyst"); + GameRegistry.registerItem(ModItems.incendium, "incendium"); + GameRegistry.registerItem(ModItems.magicales, "magicales"); + GameRegistry.registerItem(ModItems.sanctus, "sanctus"); + GameRegistry.registerItem(ModItems.aether, "aether"); + GameRegistry.registerItem(ModItems.simpleCatalyst, "simpleCatalyst"); + GameRegistry.registerItem(ModItems.crepitous, "crepitous"); + GameRegistry.registerItem(ModItems.crystallos, "crystallos"); + GameRegistry.registerItem(ModItems.terrae, "terrae"); + GameRegistry.registerItem(ModItems.aquasalus, "aquasalus"); + GameRegistry.registerItem(ModItems.tennebrae, "tennebrae"); + GameRegistry.registerItem(ModItems.demonBloodShard, "demonBloodShard"); + GameRegistry.registerItem(ModItems.archmageBloodOrb, "archmageBloodOrb"); + GameRegistry.registerItem(ModItems.transcendentBloodOrb, "transcendentBloodOrb"); + GameRegistry.registerItem(ModItems.sigilOfWind, "sigilOfWind"); + GameRegistry.registerItem(ModItems.telepositionFocus, "telepositionFocus"); + GameRegistry.registerItem(ModItems.enhancedTelepositionFocus, "enhancedTelepositionFocus"); + GameRegistry.registerItem(ModItems.reinforcedTelepositionFocus, "reinforcedTelepositionFocus"); + GameRegistry.registerItem(ModItems.demonicTelepositionFocus, "demonicTelepositionFocus"); + GameRegistry.registerItem(ModItems.imbuedSlate, "imbuedSlate"); + GameRegistry.registerItem(ModItems.demonicSlate, "demonicSlate"); + GameRegistry.registerItem(ModItems.duskScribeTool, "duskScribeTool"); + GameRegistry.registerItem(ModItems.sigilOfTheBridge, "sigilOfTheBridge"); + GameRegistry.registerItem(ModItems.armourInhibitor, "armourInhibitor"); + GameRegistry.registerItem(ModItems.creativeFiller, "creativeFiller"); + GameRegistry.registerItem(ModItems.demonPlacer, "demonPlacer"); + GameRegistry.registerItem(ModItems.creativeDagger, "creativeDagger"); -// if (!itemsNotToBeRegistered.contains(unlocalizedName)) - { - GameRegistry.registerItem(item, unlocalizedName); - } + GameRegistry.registerItem(ModItems.weakFillingAgent, "weakFillingAgent"); + GameRegistry.registerItem(ModItems.standardFillingAgent, "standardFillingAgent"); + GameRegistry.registerItem(ModItems.enhancedFillingAgent, "enhancedFillingAgent"); + GameRegistry.registerItem(ModItems.weakBindingAgent, "weakBindingAgent"); + GameRegistry.registerItem(ModItems.itemRitualDiviner, "itemRitualDiviner"); + GameRegistry.registerItem(ModItems.sigilOfMagnetism, "sigilOfMagnetism"); + GameRegistry.registerItem(ModItems.itemKeyOfDiablo, "itemKeyOfDiablo"); + GameRegistry.registerItem(ModItems.energyBazooka, "energyBazooka"); + GameRegistry.registerItem(ModItems.itemBloodLightSigil, "itemBloodLightSigil"); + GameRegistry.registerItem(ModItems.itemComplexSpellCrystal, "itemComplexSpellCrystal"); + GameRegistry.registerItem(ModItems.itemSigilOfSupression, "sigilOfSupression"); + GameRegistry.registerItem(ModItems.itemSigilOfEnderSeverance, "sigilOfEnderSeverance"); + GameRegistry.registerItem(ModItems.itemFluidSigil, "fluidSigil"); + GameRegistry.registerItem(ModItems.itemSeerSigil, "seerSigil"); - return item; + GameRegistry.registerItem(ModItems.customTool, "customTool"); + + GameRegistry.registerItem(ModItems.bucketLife, "bucketLife"); + GameRegistry.registerItem(ModItems.itemCombinationalCatalyst, "itemCombinationalCatalyst"); + + GameRegistry.registerItem(ModItems.itemAttunedCrystal, "itemAttunedCrystal"); + GameRegistry.registerItem(ModItems.itemTankSegmenter, "itemTankSegmenter"); + GameRegistry.registerItem(ModItems.itemDestinationClearer, "itemDestinationClearer"); + + GameRegistry.registerItem(ModItems.baseItems, "bloodMagicBaseItems"); + GameRegistry.registerItem(ModItems.baseAlchemyItems, "bloodMagicBaseAlchemyItems"); + + GameRegistry.registerItem(ModItems.dawnScribeTool, "dawnScribeTool"); + + GameRegistry.registerItem(ModItems.itemBloodPack, "itemBloodPack"); + GameRegistry.registerItem(ModItems.itemHarvestSigil, "itemHarvestSigil"); + GameRegistry.registerItem(ModItems.itemCompressionSigil, "itemCompressionSigil"); + GameRegistry.registerItem(ModItems.itemAssassinSigil, "itemAssassinSigil"); + + GameRegistry.registerItem(ModItems.boundHelmetWater, "boundHelmetWater"); + GameRegistry.registerItem(ModItems.boundPlateWater, "boundPlateWater"); + GameRegistry.registerItem(ModItems.boundLeggingsWater, "boundLeggingsWater"); + GameRegistry.registerItem(ModItems.boundBootsWater, "boundBootsWater"); + + GameRegistry.registerItem(ModItems.boundHelmetEarth, "boundHelmetEarth"); + GameRegistry.registerItem(ModItems.boundPlateEarth, "boundPlateEarth"); + GameRegistry.registerItem(ModItems.boundLeggingsEarth, "boundLeggingsEarth"); + GameRegistry.registerItem(ModItems.boundBootsEarth, "boundBootsEarth"); + + GameRegistry.registerItem(ModItems.boundHelmetWind, "boundHelmetWind"); + GameRegistry.registerItem(ModItems.boundPlateWind, "boundPlateWind"); + GameRegistry.registerItem(ModItems.boundLeggingsWind, "boundLeggingsWind"); + GameRegistry.registerItem(ModItems.boundBootsWind, "boundBootsWind"); + + GameRegistry.registerItem(ModItems.boundHelmetFire, "boundHelmetFire"); + GameRegistry.registerItem(ModItems.boundPlateFire, "boundPlateFire"); + GameRegistry.registerItem(ModItems.boundLeggingsFire, "boundLeggingsFire"); + GameRegistry.registerItem(ModItems.boundBootsFire, "boundBootsFire"); + + GameRegistry.registerItem(ModItems.inputRoutingFocus, "inputRoutingFocus"); + GameRegistry.registerItem(ModItems.outputRoutingFocus, "outputRoutingFocus"); + + GameRegistry.registerItem(ModItems.itemIncense, "bloodMagicIncenseItem"); + GameRegistry.registerItem(ModItems.ritualDismantler, "ritualDismantler"); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/ILimitingLogic.java b/src/main/java/WayofTime/alchemicalWizardry/api/ILimitingLogic.java index 2d7a4912..30ab2ca8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/ILimitingLogic.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/ILimitingLogic.java @@ -2,5 +2,5 @@ package WayofTime.alchemicalWizardry.api; public interface ILimitingLogic { - int getRoutingLimit(); + public int getRoutingLimit(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/Int3.java b/src/main/java/WayofTime/alchemicalWizardry/api/Int3.java index 7c8fa226..16facc02 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/Int3.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/Int3.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.api; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; + public class Int3 { @@ -9,11 +9,6 @@ public class Int3 public int yCoord; public int zCoord; - public Int3(BlockPos pos) - { - this(pos.getX(), pos.getY(), pos.getZ()); - } - public Int3(int xCoord, int yCoord, int zCoord) { this.xCoord = xCoord; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusParadigm.java index d77a2e1a..c41cab43 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusParadigm.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusParadigm.java @@ -7,9 +7,9 @@ import net.minecraft.item.ItemStack; public class RoutingFocusParadigm { - public List<RoutingFocusLogic> logicList = new LinkedList<RoutingFocusLogic>(); + public List<RoutingFocusLogic> logicList = new LinkedList(); - public List<RoutingFocusPosAndFacing> locationList = new LinkedList<RoutingFocusPosAndFacing>(); + public List<RoutingFocusPosAndFacing> locationList = new LinkedList(); public int maximumAmount = 0; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusPosAndFacing.java b/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusPosAndFacing.java index a49ffee1..a6ee34a9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusPosAndFacing.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/RoutingFocusPosAndFacing.java @@ -1,13 +1,13 @@ package WayofTime.alchemicalWizardry.api; -import net.minecraft.util.EnumFacing; +import net.minecraftforge.common.util.ForgeDirection; public class RoutingFocusPosAndFacing { public Int3 location; - public EnumFacing facing; + public ForgeDirection facing; - public RoutingFocusPosAndFacing(Int3 location, EnumFacing facing) + public RoutingFocusPosAndFacing(Int3 location, ForgeDirection facing) { this.location = location; this.facing = facing; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemicalPotionCreationHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemicalPotionCreationHandler.java index a6ca090d..6af04910 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemicalPotionCreationHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemicalPotionCreationHandler.java @@ -6,7 +6,7 @@ import java.util.ArrayList; public class AlchemicalPotionCreationHandler { - public static ArrayList<AlchemyPotionHandlerComponent> registeredPotionEffects = new ArrayList<AlchemyPotionHandlerComponent>(); + public static ArrayList<AlchemyPotionHandlerComponent> registeredPotionEffects = new ArrayList(); public static void addPotion(ItemStack itemStack, int potionID, int tickDuration) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipeRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipeRegistry.java index 99ad2868..dfb24596 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipeRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/AlchemyRecipeRegistry.java @@ -8,7 +8,7 @@ import java.util.List; public class AlchemyRecipeRegistry { - public static List<AlchemyRecipe> recipes = new ArrayList<AlchemyRecipe>(); + public static List<AlchemyRecipe> recipes = new ArrayList(); public static void registerRecipe(ItemStack output, int amountNeeded, ItemStack[] recipe, int bloodOrbLevel) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentHandler.java index cf1a3fdf..165e9ab3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/IReagentHandler.java @@ -1,18 +1,18 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy; -import net.minecraft.util.EnumFacing; +import net.minecraftforge.common.util.ForgeDirection; public interface IReagentHandler { - int fill(EnumFacing from, ReagentStack resource, boolean doFill); + int fill(ForgeDirection from, ReagentStack resource, boolean doFill); - ReagentStack drain(EnumFacing from, ReagentStack resource, boolean doDrain); + ReagentStack drain(ForgeDirection from, ReagentStack resource, boolean doDrain); - ReagentStack drain(EnumFacing from, int maxDrain, boolean doDrain); + ReagentStack drain(ForgeDirection from, int maxDrain, boolean doDrain); - boolean canFill(EnumFacing from, Reagent reagent); + boolean canFill(ForgeDirection from, Reagent reagent); - boolean canDrain(EnumFacing from, Reagent reagent); + boolean canDrain(ForgeDirection from, Reagent reagent); - ReagentContainerInfo[] getContainerInfo(EnumFacing from); + ReagentContainerInfo[] getContainerInfo(ForgeDirection from); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentRegistry.java index 429587a1..20b43931 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentRegistry.java @@ -9,8 +9,8 @@ import net.minecraft.item.ItemStack; public class ReagentRegistry { - public static Map<String, Reagent> reagentList = new HashMap<String, Reagent>(); - public static Map<ItemStack, ReagentStack> itemToReagentMap = new HashMap<ItemStack, ReagentStack>(); + public static Map<String, Reagent> reagentList = new HashMap(); + public static Map<ItemStack, ReagentStack> itemToReagentMap = new HashMap(); public static Reagent sanctusReagent; public static Reagent incendiumReagent; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentStack.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentStack.java index 8923f3d3..f8583970 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentStack.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/ReagentStack.java @@ -28,8 +28,9 @@ public class ReagentStack } int amount = tag.getInteger("amount"); + ReagentStack stack = new ReagentStack(reagent, amount); - return new ReagentStack(reagent, amount); + return stack; } public NBTTagCompound writeToNBT(NBTTagCompound tag) diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileReagentHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileReagentHandler.java index 5a841651..3e754648 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileReagentHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileReagentHandler.java @@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; +import net.minecraftforge.common.util.ForgeDirection; public class TileReagentHandler extends TileEntity implements IReagentHandler { @@ -25,13 +25,13 @@ public class TileReagentHandler extends TileEntity implements IReagentHandler /* IReagentHandler */ @Override - public int fill(EnumFacing from, ReagentStack resource, boolean doFill) + public int fill(ForgeDirection from, ReagentStack resource, boolean doFill) { return tank.fill(resource, doFill); } @Override - public ReagentStack drain(EnumFacing from, ReagentStack resource, boolean doDrain) + public ReagentStack drain(ForgeDirection from, ReagentStack resource, boolean doDrain) { if (resource == null || !resource.isReagentEqual(tank.getReagent())) { @@ -41,25 +41,25 @@ public class TileReagentHandler extends TileEntity implements IReagentHandler } @Override - public ReagentStack drain(EnumFacing from, int maxDrain, boolean doDrain) + public ReagentStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { return tank.drain(maxDrain, doDrain); } @Override - public boolean canFill(EnumFacing from, Reagent reagent) + public boolean canFill(ForgeDirection from, Reagent reagent) { return true; } @Override - public boolean canDrain(EnumFacing from, Reagent reagent) + public boolean canDrain(ForgeDirection from, Reagent reagent) { return true; } @Override - public ReagentContainerInfo[] getContainerInfo(EnumFacing from) + public ReagentContainerInfo[] getContainerInfo(ForgeDirection from) { return new ReagentContainerInfo[]{tank.getInfo()}; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileSegmentedReagentHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileSegmentedReagentHandler.java index f965ab7a..d1f2427f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileSegmentedReagentHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/alchemy/energy/TileSegmentedReagentHandler.java @@ -1,15 +1,15 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; - import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; import net.minecraftforge.common.util.Constants; +import net.minecraftforge.common.util.ForgeDirection; + +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; public class TileSegmentedReagentHandler extends TileEntity implements ISegmentedReagentHandler { @@ -30,7 +30,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente { super(); - this.attunedTankMap = new HashMap<Reagent, Integer>(); + this.attunedTankMap = new HashMap(); this.tanks = new ReagentContainer[numberOfTanks]; for (int i = 0; i < numberOfTanks; i++) { @@ -98,7 +98,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente /* ISegmentedReagentHandler */ @Override - public int fill(EnumFacing from, ReagentStack resource, boolean doFill) + public int fill(ForgeDirection from, ReagentStack resource, boolean doFill) { int totalFill = 0; @@ -116,7 +116,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente ReagentStack remainingStack = resource.copy(); remainingStack.amount = maxFill - totalFill; - boolean doesReagentMatch = tanks[i].getReagent() != null && tanks[i].getReagent().isReagentEqual(remainingStack); + boolean doesReagentMatch = tanks[i].getReagent() == null ? false : tanks[i].getReagent().isReagentEqual(remainingStack); if (doesReagentMatch) { @@ -164,7 +164,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente } @Override - public ReagentStack drain(EnumFacing from, ReagentStack resource, boolean doDrain) + public ReagentStack drain(ForgeDirection from, ReagentStack resource, boolean doDrain) { if (resource == null) { @@ -197,7 +197,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente /* Only returns the amount from the first available tank */ @Override - public ReagentStack drain(EnumFacing from, int maxDrain, boolean doDrain) + public ReagentStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { for (int i = 0; i < tanks.length; i++) { @@ -212,19 +212,19 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente } @Override - public boolean canFill(EnumFacing from, Reagent reagent) + public boolean canFill(ForgeDirection from, Reagent reagent) { return true; } @Override - public boolean canDrain(EnumFacing from, Reagent reagent) + public boolean canDrain(ForgeDirection from, Reagent reagent) { return true; } @Override - public ReagentContainerInfo[] getContainerInfo(EnumFacing from) + public ReagentContainerInfo[] getContainerInfo(ForgeDirection from) { ReagentContainerInfo[] info = new ReagentContainerInfo[this.getNumberOfTanks()]; for (int i = 0; i < this.getNumberOfTanks(); i++) diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipe.java index bb581251..7e6af770 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipe.java @@ -76,7 +76,7 @@ public class AltarRecipe protected boolean areTagsEqual(NBTTagCompound tag, NBTTagCompound comparedTag) { - Set set = tag.getKeySet(); + Set set = tag.func_150296_c(); for(Object obj : set) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipeRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipeRegistry.java index 566fbfe9..528e7b75 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipeRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/altarRecipeRegistry/AltarRecipeRegistry.java @@ -9,8 +9,8 @@ import net.minecraft.item.ItemStack; public class AltarRecipeRegistry { - public static List<AltarRecipe> altarRecipes = new LinkedList<AltarRecipe>(); - public static Map<Integer, ItemStack> orbMap = new HashMap<Integer, ItemStack>(); + public static List<AltarRecipe> altarRecipes = new LinkedList(); + public static Map<Integer, ItemStack> orbMap = new HashMap(); public static void registerAltarRecipe(ItemStack result, ItemStack requiredItem, int minTier, int liquidRequired, int consumptionRate, int drainRate, boolean canBeFilled) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRegistry.java index 407f74ff..ba069118 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/BindingRegistry.java @@ -7,7 +7,7 @@ import java.util.List; public class BindingRegistry { - public static List<BindingRecipe> bindingRecipes = new LinkedList<BindingRecipe>(); + public static List<BindingRecipe> bindingRecipes = new LinkedList(); public static void registerRecipe(ItemStack output, ItemStack input) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRegistry.java index d031edd3..3ae2eaf2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/bindingRegistry/UnbindingRegistry.java @@ -7,7 +7,7 @@ import java.util.List; public class UnbindingRegistry { - public static List<UnbindingRecipe> unbindingRecipes = new LinkedList<UnbindingRecipe>(); + public static List<UnbindingRecipe> unbindingRecipes = new LinkedList(); public static void addAllUnbindingRecipesFromBinding() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionRegistry.java index 342b9b7d..689b022a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/compress/CompressionRegistry.java @@ -15,8 +15,8 @@ import net.minecraft.world.World; */ public class CompressionRegistry { - public static List<CompressionHandler> compressionRegistry = new ArrayList<CompressionHandler>(); - public static Map<ItemStack, Integer> thresholdMap = new HashMap<ItemStack, Integer>(); + public static List<CompressionHandler> compressionRegistry = new ArrayList(); + public static Map<ItemStack, Integer> thresholdMap = new HashMap(); public static void registerHandler(CompressionHandler handler) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/AddToNetworkEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/AddToNetworkEvent.java index 448f4712..ddcc3b01 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/AddToNetworkEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/AddToNetworkEvent.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.api.event; -import net.minecraftforge.fml.common.eventhandler.Cancelable; -import net.minecraftforge.fml.common.eventhandler.Event; +import cpw.mods.fml.common.eventhandler.Cancelable; +import cpw.mods.fml.common.eventhandler.Event; @Cancelable public class AddToNetworkEvent extends Event diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemBindEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemBindEvent.java index 5d78bcd0..95e15da4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemBindEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemBindEvent.java @@ -1,9 +1,9 @@ package WayofTime.alchemicalWizardry.api.event; +import cpw.mods.fml.common.eventhandler.Cancelable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.eventhandler.Cancelable; -import net.minecraftforge.fml.common.eventhandler.Event; +import cpw.mods.fml.common.eventhandler.Event; @Cancelable public class ItemBindEvent extends Event diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainInContainerEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainInContainerEvent.java index 0cd29c51..5a81c1d2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainInContainerEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainInContainerEvent.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.api.event; import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.eventhandler.Cancelable; +import cpw.mods.fml.common.eventhandler.Cancelable; @Cancelable public class ItemDrainInContainerEvent extends SoulNetworkEvent diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainNetworkEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainNetworkEvent.java index aa9c32d2..d75fd7dc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainNetworkEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/ItemDrainNetworkEvent.java @@ -2,7 +2,7 @@ package WayofTime.alchemicalWizardry.api.event; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.eventhandler.Cancelable; +import cpw.mods.fml.common.eventhandler.Cancelable; @Cancelable public class ItemDrainNetworkEvent extends PlayerDrainNetworkEvent diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerAddToNetworkEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerAddToNetworkEvent.java index c4a3820c..f7522557 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerAddToNetworkEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerAddToNetworkEvent.java @@ -2,7 +2,7 @@ package WayofTime.alchemicalWizardry.api.event; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.eventhandler.Cancelable; +import cpw.mods.fml.common.eventhandler.Cancelable; @Cancelable public class PlayerAddToNetworkEvent extends AddToNetworkEvent diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerDrainNetworkEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerDrainNetworkEvent.java index d70c3267..dacb26d8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerDrainNetworkEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/PlayerDrainNetworkEvent.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.api.event; import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.fml.common.eventhandler.Cancelable; +import cpw.mods.fml.common.eventhandler.Cancelable; @Cancelable public class PlayerDrainNetworkEvent extends SoulNetworkEvent diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualActivatedEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualActivatedEvent.java index 5bcc7eeb..83c10c05 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualActivatedEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualActivatedEvent.java @@ -2,8 +2,8 @@ package WayofTime.alchemicalWizardry.api.event; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.eventhandler.Cancelable; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import cpw.mods.fml.common.eventhandler.Cancelable; @Cancelable public class RitualActivatedEvent extends RitualEvent diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualEvent.java index 36ee929c..fbe1649c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualEvent.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.api.event; -import net.minecraftforge.fml.common.eventhandler.Event; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import cpw.mods.fml.common.eventhandler.Event; public class RitualEvent extends Event { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualRunEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualRunEvent.java index 4b5134b7..4bcf075f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualRunEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/RitualRunEvent.java @@ -1,13 +1,16 @@ package WayofTime.alchemicalWizardry.api.event; -import net.minecraftforge.fml.common.eventhandler.Cancelable; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import cpw.mods.fml.common.eventhandler.Cancelable; @Cancelable public class RitualRunEvent extends RitualEvent { + + public RitualRunEvent(IMasterRitualStone mrs, String ownerKey, String ritualKey) { super(mrs, ownerKey, ritualKey); } + } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/SacrificeKnifeUsedEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/SacrificeKnifeUsedEvent.java index 1849c6c9..04acf352 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/SacrificeKnifeUsedEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/SacrificeKnifeUsedEvent.java @@ -1,8 +1,8 @@ package WayofTime.alchemicalWizardry.api.event; import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.fml.common.eventhandler.Cancelable; -import net.minecraftforge.fml.common.eventhandler.Event; +import cpw.mods.fml.common.eventhandler.Cancelable; +import cpw.mods.fml.common.eventhandler.Event; @Cancelable public class SacrificeKnifeUsedEvent extends Event diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/SoulNetworkEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/SoulNetworkEvent.java index 3d60650a..bf47a136 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/SoulNetworkEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/SoulNetworkEvent.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.api.event; -import net.minecraftforge.fml.common.eventhandler.Event; - +import cpw.mods.fml.common.eventhandler.Event; public class SoulNetworkEvent extends Event { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/event/TeleposeEvent.java b/src/main/java/WayofTime/alchemicalWizardry/api/event/TeleposeEvent.java index 4fc7310f..40c3170e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/event/TeleposeEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/event/TeleposeEvent.java @@ -1,50 +1,56 @@ package WayofTime.alchemicalWizardry.api.event; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; -import net.minecraftforge.fml.common.eventhandler.Cancelable; -import net.minecraftforge.fml.common.eventhandler.Event; +import cpw.mods.fml.common.eventhandler.Cancelable; +import cpw.mods.fml.common.eventhandler.Event; /** Fired when a teleposer attempts to transpose two blocks. Use this to perform special cleanup or compensation, or cancel it entirely to prevent the transposition. */ @Cancelable -public class TeleposeEvent extends Event -{ - public final World initialWorld; - public final BlockPos initialPos; +public class TeleposeEvent extends Event { - public final Block initialBlock; - public final IBlockState initialState; + public final World initialWorld; + public final int initialX; + public final int initialY; + public final int initialZ; - public final World finalWorld; - public final BlockPos finalPos; + public final Block initialBlock; + public final int initialMetadata; - public final Block finalBlock; - public final IBlockState finalState; + public final World finalWorld; + public final int finalX; + public final int finalY; + public final int finalZ; - public TeleposeEvent(World wi, BlockPos posi, IBlockState statei, World wf, BlockPos posf, IBlockState statef) - { - initialWorld = wi; - initialPos = posi; + public final Block finalBlock; + public final int finalMetadata; + + public TeleposeEvent(World wi, int xi, int yi, int zi, Block bi, int mi, World wf, int xf, int yf, int zf, Block bf, int mf) { + initialWorld = wi; + initialX = xi; + initialY = yi; + initialZ = zi; - initialState = statei; - initialBlock = initialState.getBlock(); + initialBlock = bi; + initialMetadata = mi; + + finalWorld = wf; + finalX = xf; + finalY = yf; + finalZ = zf; + + finalBlock = bf; + finalMetadata = mf; + } + + public TileEntity getInitialTile() { + return initialWorld.getTileEntity(initialX, initialY, initialZ); + } + + public TileEntity getFinalTile() { + return finalWorld.getTileEntity(finalX, finalY, finalZ); + } - finalWorld = wf; - finalPos = posf; - - finalState = statef; - finalBlock = finalState.getBlock(); - } - - public TileEntity getInitialTile() { - return initialWorld.getTileEntity(initialPos); - } - - public TileEntity getFinalTile() { - return finalWorld.getTileEntity(finalPos); - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/guide/OrbRecipeRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/api/guide/OrbRecipeRenderer.java index 2de81c65..e4926e1e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/guide/OrbRecipeRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/guide/OrbRecipeRenderer.java @@ -1,135 +1,135 @@ -//package WayofTime.alchemicalWizardry.api.guide; -// -//import java.util.ArrayList; -//import java.util.List; -// -//import net.minecraft.client.Minecraft; -//import net.minecraft.client.gui.FontRenderer; -//import net.minecraft.item.ItemStack; -//import net.minecraft.item.crafting.IRecipe; -//import net.minecraft.util.ResourceLocation; -//import net.minecraft.util.StatCollector; -//import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; -//import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; -//import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; -//import amerifrance.guideapi.ModInformation; -//import amerifrance.guideapi.api.abstraction.CategoryAbstract; -//import amerifrance.guideapi.api.abstraction.EntryAbstract; -//import amerifrance.guideapi.api.abstraction.IRecipeRenderer; -//import amerifrance.guideapi.api.base.Book; -//import amerifrance.guideapi.api.util.GuiHelper; -//import amerifrance.guideapi.gui.GuiBase; -//import cpw.mods.fml.relauncher.ReflectionHelper; -// -//public class OrbRecipeRenderer implements IRecipeRenderer -//{ -// public IRecipe recipe; -// -// public OrbRecipeRenderer(IRecipe recipe) -// { -// this.recipe = recipe; -// } -// -// @Override -// public void draw(Book book, CategoryAbstract category, EntryAbstract entry, -// int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, -// FontRenderer fontRenderer) { -// Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation(ModInformation.GUITEXLOC + "recipe_elements.png")); -// guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 0, 105, 65); -// -// guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.recipe.shapedOrb"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0); -// if(recipe instanceof ShapelessBloodOrbRecipe) -// { -// ShapelessBloodOrbRecipe shapelessBloodOrbRecipe = (ShapelessBloodOrbRecipe) recipe; -// List<Object> list = shapelessBloodOrbRecipe.getInput(); -// -// int width = 3; -// int height = 3; -// for (int y = 0; y < height; y++) { -// for (int x = 0; x < width; x++) { -// if(list.size() - 1 < y * width + x) -// { -// continue; -// } -// -// int stackX = (x + 1) * 18 + (guiLeft + guiBase.xSize / 7); -// int stackY = (y + 1) * 18 + (guiTop + guiBase.ySize / 5); -// -// Object component = list.get(y * width + x); -// if (component != null) { -// if (component instanceof ItemStack) { -// GuiHelper.drawItemStack((ItemStack) component, stackX, stackY); -// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { -// guiBase.renderToolTip((ItemStack) component, stackX, stackY); -// } -// } else if (component instanceof Integer) { -// GuiHelper.drawItemStack(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY); -// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { -// guiBase.renderToolTip(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY); -// } -// } else { -// if (((ArrayList<ItemStack>) component).isEmpty()) return; -// GuiHelper.drawItemStack(((ArrayList<ItemStack>) component).get(0), stackX, stackY); -// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { -// guiBase.renderToolTip(((ArrayList<ItemStack>) component).get(0), stackX, stackY); -// } -// } -// } -// } -// } -// int outputX = (5 * 18) + (guiLeft + guiBase.xSize / 7); -// int outputY = (2 * 18) + (guiTop + guiBase.xSize / 5); -// GuiHelper.drawItemStack(shapelessBloodOrbRecipe.getRecipeOutput(), outputX, outputY); -// if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) { -// guiBase.renderToolTip(shapelessBloodOrbRecipe.getRecipeOutput(), outputX, outputY); -// } -// }else -// { -// ShapedBloodOrbRecipe shapedBloodOrbRecipe = (ShapedBloodOrbRecipe) recipe; -// int width = ReflectionHelper.getPrivateValue(ShapedBloodOrbRecipe.class, shapedBloodOrbRecipe, 4); -// int height = ReflectionHelper.getPrivateValue(ShapedBloodOrbRecipe.class, shapedBloodOrbRecipe, 5); -// for (int y = 0; y < height; y++) { -// for (int x = 0; x < width; x++) { -// int stackX = (x + 1) * 18 + (guiLeft + guiBase.xSize / 7); -// int stackY = (y + 1) * 18 + (guiTop + guiBase.ySize / 5); -// Object component = shapedBloodOrbRecipe.getInput()[y * width + x]; -// if (component != null) { -// if (component instanceof ItemStack) { -// GuiHelper.drawItemStack((ItemStack) component, stackX, stackY); -// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { -// guiBase.renderToolTip((ItemStack) component, stackX, stackY); -// } -// } else if (component instanceof Integer) { -// GuiHelper.drawItemStack(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY); -// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { -// guiBase.renderToolTip(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY); -// } -// } else { -// if (((ArrayList<ItemStack>) component).isEmpty()) return; -// GuiHelper.drawItemStack(((ArrayList<ItemStack>) component).get(0), stackX, stackY); -// if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { -// guiBase.renderToolTip(((ArrayList<ItemStack>) component).get(0), stackX, stackY); -// } -// } -// } -// } -// } -// int outputX = (5 * 18) + (guiLeft + guiBase.xSize / 7); -// int outputY = (2 * 18) + (guiTop + guiBase.xSize / 5); -// GuiHelper.drawItemStack(shapedBloodOrbRecipe.getRecipeOutput(), outputX, outputY); -// if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) { -// guiBase.renderToolTip(shapedBloodOrbRecipe.getRecipeOutput(), outputX, outputY); -// } -// } -// -// } -// -// @Override -// public void drawExtras(Book book, CategoryAbstract category, -// EntryAbstract entry, int guiLeft, int guiTop, int mouseX, -// int mouseY, GuiBase guiBase, FontRenderer fontRenderer) { -// // TODO Auto-generated method stub -// -// } -// -//} +package WayofTime.alchemicalWizardry.api.guide; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; +import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; +import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; +import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; +import amerifrance.guideapi.ModInformation; +import amerifrance.guideapi.api.abstraction.CategoryAbstract; +import amerifrance.guideapi.api.abstraction.EntryAbstract; +import amerifrance.guideapi.api.abstraction.IRecipeRenderer; +import amerifrance.guideapi.api.base.Book; +import amerifrance.guideapi.api.util.GuiHelper; +import amerifrance.guideapi.gui.GuiBase; +import cpw.mods.fml.relauncher.ReflectionHelper; + +public class OrbRecipeRenderer implements IRecipeRenderer +{ + public IRecipe recipe; + + public OrbRecipeRenderer(IRecipe recipe) + { + this.recipe = recipe; + } + + @Override + public void draw(Book book, CategoryAbstract category, EntryAbstract entry, + int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, + FontRenderer fontRenderer) { + Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation(ModInformation.GUITEXLOC + "recipe_elements.png")); + guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 0, 105, 65); + + guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.recipe.shapedOrb"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0); + if(recipe instanceof ShapelessBloodOrbRecipe) + { + ShapelessBloodOrbRecipe shapelessBloodOrbRecipe = (ShapelessBloodOrbRecipe) recipe; + List<Object> list = shapelessBloodOrbRecipe.getInput(); + + int width = 3; + int height = 3; + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + if(list.size() - 1 < y * width + x) + { + continue; + } + + int stackX = (x + 1) * 18 + (guiLeft + guiBase.xSize / 7); + int stackY = (y + 1) * 18 + (guiTop + guiBase.ySize / 5); + + Object component = list.get(y * width + x); + if (component != null) { + if (component instanceof ItemStack) { + GuiHelper.drawItemStack((ItemStack) component, stackX, stackY); + if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { + guiBase.renderToolTip((ItemStack) component, stackX, stackY); + } + } else if (component instanceof Integer) { + GuiHelper.drawItemStack(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY); + if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { + guiBase.renderToolTip(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY); + } + } else { + if (((ArrayList<ItemStack>) component).isEmpty()) return; + GuiHelper.drawItemStack(((ArrayList<ItemStack>) component).get(0), stackX, stackY); + if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { + guiBase.renderToolTip(((ArrayList<ItemStack>) component).get(0), stackX, stackY); + } + } + } + } + } + int outputX = (5 * 18) + (guiLeft + guiBase.xSize / 7); + int outputY = (2 * 18) + (guiTop + guiBase.xSize / 5); + GuiHelper.drawItemStack(shapelessBloodOrbRecipe.getRecipeOutput(), outputX, outputY); + if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) { + guiBase.renderToolTip(shapelessBloodOrbRecipe.getRecipeOutput(), outputX, outputY); + } + }else + { + ShapedBloodOrbRecipe shapedBloodOrbRecipe = (ShapedBloodOrbRecipe) recipe; + int width = ReflectionHelper.getPrivateValue(ShapedBloodOrbRecipe.class, shapedBloodOrbRecipe, 4); + int height = ReflectionHelper.getPrivateValue(ShapedBloodOrbRecipe.class, shapedBloodOrbRecipe, 5); + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + int stackX = (x + 1) * 18 + (guiLeft + guiBase.xSize / 7); + int stackY = (y + 1) * 18 + (guiTop + guiBase.ySize / 5); + Object component = shapedBloodOrbRecipe.getInput()[y * width + x]; + if (component != null) { + if (component instanceof ItemStack) { + GuiHelper.drawItemStack((ItemStack) component, stackX, stackY); + if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { + guiBase.renderToolTip((ItemStack) component, stackX, stackY); + } + } else if (component instanceof Integer) { + GuiHelper.drawItemStack(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY); + if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { + guiBase.renderToolTip(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY); + } + } else { + if (((ArrayList<ItemStack>) component).isEmpty()) return; + GuiHelper.drawItemStack(((ArrayList<ItemStack>) component).get(0), stackX, stackY); + if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) { + guiBase.renderToolTip(((ArrayList<ItemStack>) component).get(0), stackX, stackY); + } + } + } + } + } + int outputX = (5 * 18) + (guiLeft + guiBase.xSize / 7); + int outputY = (2 * 18) + (guiTop + guiBase.xSize / 5); + GuiHelper.drawItemStack(shapedBloodOrbRecipe.getRecipeOutput(), outputX, outputY); + if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) { + guiBase.renderToolTip(shapedBloodOrbRecipe.getRecipeOutput(), outputX, outputY); + } + } + + } + + @Override + public void drawExtras(Book book, CategoryAbstract category, + EntryAbstract entry, int guiLeft, int guiTop, int mouseX, + int mouseY, GuiBase guiBase, FontRenderer fontRenderer) { + // TODO Auto-generated method stub + + } + +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageAltarRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageAltarRecipe.java index 7e61a8e5..cbad2be3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageAltarRecipe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageAltarRecipe.java @@ -1,69 +1,69 @@ -//package WayofTime.alchemicalWizardry.api.guide; -// -// -//import net.minecraft.client.Minecraft; -//import net.minecraft.client.gui.FontRenderer; -//import net.minecraft.init.Blocks; -//import net.minecraft.item.Item; -//import net.minecraft.item.ItemStack; -//import net.minecraft.util.ResourceLocation; -//import net.minecraft.util.StatCollector; -//import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; -//import amerifrance.guideapi.api.abstraction.CategoryAbstract; -//import amerifrance.guideapi.api.abstraction.EntryAbstract; -//import amerifrance.guideapi.api.base.Book; -//import amerifrance.guideapi.api.base.PageBase; -//import amerifrance.guideapi.api.util.GuiHelper; -//import amerifrance.guideapi.gui.GuiBase; -//import cpw.mods.fml.relauncher.Side; -//import cpw.mods.fml.relauncher.SideOnly; -// -//public class PageAltarRecipe extends PageBase { -// -// public ItemStack input; -// public ItemStack output; -// public int tier; -// public int bloodRequired; -// -// public PageAltarRecipe(AltarRecipe recipe) { -// this.input = recipe.getRequiredItem(); -// this.output = recipe.getResult(); -// this.tier = recipe.getMinTier(); -// this.bloodRequired = recipe.getLiquidRequired(); -// } -// -// @Override -// @SideOnly(Side.CLIENT) -// public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) { -// -// Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("alchemicalwizardry" + ":textures/gui/guide/altar.png")); -// guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 87, 146, 104); -// -// guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.recipe.altar"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0); -// -// int inputX = (1 + 1) * 20 + (guiLeft + guiBase.xSize / 7); -// int inputY = (20) + (guiTop + guiBase.ySize / 5); //1 * 20 -// GuiHelper.drawItemStack(input, inputX, inputY); -// if (GuiHelper.isMouseBetween(mouseX, mouseY, inputX, inputY, 15, 15)) { -// guiBase.renderToolTip(input, mouseX, mouseY); -// } -// -// if (output == null) { -// output = new ItemStack(Blocks.fire); -// } -// int outputX = (5 * 20) + (guiLeft + guiBase.xSize / 7); -// int outputY = (20) + (guiTop + guiBase.xSize / 5); // 1 * 20 -// GuiHelper.drawItemStack(output, outputX, outputY); -// if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) { -// guiBase.renderToolTip(output, outputX, outputY); -// } -// -// if (output.getItem() == Item.getItemFromBlock(Blocks.fire)) { -// guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.furnace.error"), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0xED073D); -// guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("bm.string.tier") + ": " + String.valueOf(tier), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0); -// guiBase.drawCenteredString(fontRenderer, "LP: " + String.valueOf(bloodRequired), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 30, 0); -// } -// guiBase.drawCenteredString(fontRenderer, String.format(StatCollector.translateToLocal("text.recipe.altar.tier"), String.valueOf(tier)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0); -// guiBase.drawCenteredString(fontRenderer, String.format(StatCollector.translateToLocal("text.recipe.altar.bloodRequired"), String.valueOf(bloodRequired)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0); -// } -//} +package WayofTime.alchemicalWizardry.api.guide; + + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; +import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; +import amerifrance.guideapi.api.abstraction.CategoryAbstract; +import amerifrance.guideapi.api.abstraction.EntryAbstract; +import amerifrance.guideapi.api.base.Book; +import amerifrance.guideapi.api.base.PageBase; +import amerifrance.guideapi.api.util.GuiHelper; +import amerifrance.guideapi.gui.GuiBase; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class PageAltarRecipe extends PageBase { + + public ItemStack input; + public ItemStack output; + public int tier; + public int bloodRequired; + + public PageAltarRecipe(AltarRecipe recipe) { + this.input = recipe.getRequiredItem(); + this.output = recipe.getResult(); + this.tier = recipe.getMinTier(); + this.bloodRequired = recipe.getLiquidRequired(); + } + + @Override + @SideOnly(Side.CLIENT) + public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) { + + Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("alchemicalwizardry" + ":textures/gui/guide/altar.png")); + guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 87, 146, 104); + + guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.recipe.altar"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0); + + int inputX = (1 + 1) * 20 + (guiLeft + guiBase.xSize / 7) + 1; + int inputY = (20) + (guiTop + guiBase.ySize / 5) - 1; //1 * 20 + GuiHelper.drawItemStack(input, inputX, inputY); + if (GuiHelper.isMouseBetween(mouseX, mouseY, inputX, inputY, 15, 15)) { + guiBase.renderToolTip(input, mouseX, mouseY); + } + + if (output == null) { + output = new ItemStack(Blocks.fire); + } + int outputX = (5 * 20) + (guiLeft + guiBase.xSize / 7) + 1; + int outputY = (20) + (guiTop + guiBase.xSize / 5) - 1; // 1 * 20 + GuiHelper.drawItemStack(output, outputX, outputY); + if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) { + guiBase.renderToolTip(output, outputX, outputY); + } + + if (output.getItem() == Item.getItemFromBlock(Blocks.fire)) { + guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.furnace.error"), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0xED073D); + guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("bm.string.tier") + ": " + String.valueOf(tier), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0); + guiBase.drawCenteredString(fontRenderer, "LP: " + String.valueOf(bloodRequired), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 30, 0); + } + guiBase.drawCenteredString(fontRenderer, String.format(StatCollector.translateToLocal("text.recipe.altar.tier"), String.valueOf(tier)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0); + guiBase.drawCenteredString(fontRenderer, String.format(StatCollector.translateToLocal("text.recipe.altar.bloodRequired"), String.valueOf(bloodRequired)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageMultiBlock.java b/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageMultiBlock.java index 0a0678f6..09f510c2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageMultiBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageMultiBlock.java @@ -1,145 +1,145 @@ -//package WayofTime.alchemicalWizardry.api.guide; -// -//import net.minecraft.client.Minecraft; -//import net.minecraft.client.gui.FontRenderer; -//import net.minecraft.client.renderer.RenderHelper; -//import net.minecraft.client.renderer.entity.RenderItem; -//import net.minecraft.item.ItemStack; -// -//import org.lwjgl.opengl.GL11; -//import org.lwjgl.opengl.GL12; -// -//import amerifrance.guideapi.api.abstraction.CategoryAbstract; -//import amerifrance.guideapi.api.abstraction.EntryAbstract; -//import amerifrance.guideapi.api.base.Book; -//import amerifrance.guideapi.api.base.PageBase; -//import amerifrance.guideapi.gui.GuiBase; -//import cpw.mods.fml.relauncher.Side; -//import cpw.mods.fml.relauncher.SideOnly; -// -//public class PageMultiBlock extends PageBase -//{ -// ItemStack[][][] structure; -// boolean canTick = false; -// int tick = 0; -// int showLayer = -1; -// float scaleFactor = 1; -// -// boolean renderMouseOver = true; -// -// public PageMultiBlock(ItemStack[][][] structure) -// { -// this.structure = structure; -// initPage(structure); -// } -// -// int blockCount=0; -// int[] countPerLevel; -// int structureHeight = 0; -// int structureLength = 0; -// int structureWidth = 0; -// -// public void initPage(ItemStack[][][] structure) -// { -// structureHeight = structure.length; -// structureWidth=0; -// structureLength=0; -// countPerLevel = new int[structureHeight]; -// blockCount=0; -// for(int h=0; h<structure.length; h++) -// { -// if(structure[h].length-1>structureLength) -// structureLength = structure[h].length-1; -// int perLvl=0; -// for(int l=0; l<structure[h].length; l++) -// { -// if(structure[h][l].length-1>structureWidth) -// structureWidth = structure[h][l].length-1; -// for(ItemStack ss : structure[h][l]) -// if(ss!=null) -// perLvl++; -// } -// countPerLevel[h] = perLvl; -// blockCount += perLvl; -// } -// tick= (showLayer==-1?blockCount:countPerLevel[showLayer])*40; -//// int yOff = (structureHeight-1)*12+structureWidth*5+structureLength*5+16; -//// pageButtons.add(new GuiButtonManualNavigation(gui, 100, x+4,y+yOff/2-5, 10,10, 4)); -//// pageButtons.add(new GuiButtonManualNavigation(gui, 101, x+4,y+yOff/2-8-16, 10,16, 3)); -//// pageButtons.add(new GuiButtonManualNavigation(gui, 102, x+4,y+yOff/2+8, 10,16, 2)); -// } -// -// @Override -// @SideOnly(Side.CLIENT) -// public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) -// { -//// if(multiblock.getStructureManual()!=null) -// Minecraft mc = Minecraft.getMinecraft(); -// -// int x = guiLeft + 32; -// int y = guiTop + 30; -// { -// if(canTick) -// tick++; -// -// int prevLayers = 0; -// if(showLayer!=-1) -// for(int ll=0; ll<showLayer; ll++) -// prevLayers+=countPerLevel[ll]; -// int limiter = prevLayers+ (tick/40)% ((showLayer==-1?blockCount:countPerLevel[showLayer])+4); -// -// int xHalf = (structureWidth*5 - structureLength*5); -// int yOffPartial = (structureHeight-1)*12+structureWidth*5+structureLength*5; -//// int yOffTotal = yOffPartial+16; -// -// GL11.glDisable(GL11.GL_DEPTH_TEST); -// -// GL11.glPushMatrix(); -// GL11.glTranslatef((1-scaleFactor)*(guiLeft + 64), (1-scaleFactor)*(guiTop+60), 0); -// GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); -// GL11.glEnable(GL12.GL_RESCALE_NORMAL); -// RenderHelper.enableGUIStandardItemLighting(); -// RenderItem.getInstance().renderWithColor=true; -// int i=0; -// ItemStack highlighted = null; -// for(int h=0; h<structure.length; h++) -// if(showLayer==-1 || h<=showLayer) -// { -// ItemStack[][] level = structure[h]; -// for(int l=level.length-1; l>=0; l--) -// { -// ItemStack[] row = level[l]; -// for(int w=row.length-1; w>=0; w--) -// { -// int xx = 60 +xHalf -10*w +10*l -7; -// int yy = yOffPartial - 5*w - 5*l -12*h; -// GL11.glTranslated(0, 0, 1); -// if(row[w]!=null && i<=limiter) -// { -// i++; -// RenderItem.getInstance().renderItemIntoGUI(mc.fontRendererObj, mc.renderEngine, row[w], x+xx, y+yy); -// if(mouseX>=x+xx&&mouseX<x+xx+16 && mouseY>=y+yy&&mouseY<y+yy+16) -// highlighted = row[w]; -// } -// } -// } -// } -// GL11.glTranslated(0, 0, -i); -// RenderHelper.disableStandardItemLighting(); -// GL11.glDisable(GL12.GL_RESCALE_NORMAL); -// GL11.glPopMatrix(); -// -// GL11.glEnable(GL11.GL_BLEND); -// GL11.glEnable(GL11.GL_DEPTH_TEST); -// -// mc.fontRendererObj.setUnicodeFlag(false); -// if(highlighted!=null && renderMouseOver) -// guiBase.renderToolTip(highlighted, mouseX, mouseY); -// RenderHelper.disableStandardItemLighting(); -// -//// mc.fontRendererObj.setUnicodeFlag(true); -//// if(localizedText!=null&&!localizedText.isEmpty()) -//// manual.fontRendererObj.drawSplitString(localizedText, x,y+yOffTotal, 120, manual.getTextColour()); -// } -// } -//} \ No newline at end of file +package WayofTime.alchemicalWizardry.api.guide; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.item.ItemStack; + +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + +import amerifrance.guideapi.api.abstraction.CategoryAbstract; +import amerifrance.guideapi.api.abstraction.EntryAbstract; +import amerifrance.guideapi.api.base.Book; +import amerifrance.guideapi.api.base.PageBase; +import amerifrance.guideapi.gui.GuiBase; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class PageMultiBlock extends PageBase +{ + ItemStack[][][] structure; + boolean canTick = false; + int tick = 0; + int showLayer = -1; + float scaleFactor = 1; + + boolean renderMouseOver = true; + + public PageMultiBlock(ItemStack[][][] structure) + { + this.structure = structure; + initPage(structure); + } + + int blockCount=0; + int[] countPerLevel; + int structureHeight = 0; + int structureLength = 0; + int structureWidth = 0; + + public void initPage(ItemStack[][][] structure) + { + structureHeight = structure.length; + structureWidth=0; + structureLength=0; + countPerLevel = new int[structureHeight]; + blockCount=0; + for(int h=0; h<structure.length; h++) + { + if(structure[h].length-1>structureLength) + structureLength = structure[h].length-1; + int perLvl=0; + for(int l=0; l<structure[h].length; l++) + { + if(structure[h][l].length-1>structureWidth) + structureWidth = structure[h][l].length-1; + for(ItemStack ss : structure[h][l]) + if(ss!=null) + perLvl++; + } + countPerLevel[h] = perLvl; + blockCount += perLvl; + } + tick= (showLayer==-1?blockCount:countPerLevel[showLayer])*40; +// int yOff = (structureHeight-1)*12+structureWidth*5+structureLength*5+16; +// pageButtons.add(new GuiButtonManualNavigation(gui, 100, x+4,y+yOff/2-5, 10,10, 4)); +// pageButtons.add(new GuiButtonManualNavigation(gui, 101, x+4,y+yOff/2-8-16, 10,16, 3)); +// pageButtons.add(new GuiButtonManualNavigation(gui, 102, x+4,y+yOff/2+8, 10,16, 2)); + } + + @Override + @SideOnly(Side.CLIENT) + public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) + { +// if(multiblock.getStructureManual()!=null) + Minecraft mc = Minecraft.getMinecraft(); + + int x = guiLeft + 32; + int y = guiTop + 30; + { + if(canTick) + tick++; + + int prevLayers = 0; + if(showLayer!=-1) + for(int ll=0; ll<showLayer; ll++) + prevLayers+=countPerLevel[ll]; + int limiter = prevLayers+ (tick/40)% ((showLayer==-1?blockCount:countPerLevel[showLayer])+4); + + int xHalf = (structureWidth*5 - structureLength*5); + int yOffPartial = (structureHeight-1)*12+structureWidth*5+structureLength*5; +// int yOffTotal = yOffPartial+16; + + GL11.glDisable(GL11.GL_DEPTH_TEST); + + GL11.glPushMatrix(); + GL11.glTranslatef((1-scaleFactor)*(guiLeft + 64), (1-scaleFactor)*(guiTop+60), 0); + GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + RenderHelper.enableGUIStandardItemLighting(); + RenderItem.getInstance().renderWithColor=true; + int i=0; + ItemStack highlighted = null; + for(int h=0; h<structure.length; h++) + if(showLayer==-1 || h<=showLayer) + { + ItemStack[][] level = structure[h]; + for(int l=level.length-1; l>=0; l--) + { + ItemStack[] row = level[l]; + for(int w=row.length-1; w>=0; w--) + { + int xx = 60 +xHalf -10*w +10*l -7; + int yy = yOffPartial - 5*w - 5*l -12*h; + GL11.glTranslated(0, 0, 1); + if(row[w]!=null && i<=limiter) + { + i++; + RenderItem.getInstance().renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, row[w], x+xx, y+yy); + if(mouseX>=x+xx&&mouseX<x+xx+16 && mouseY>=y+yy&&mouseY<y+yy+16) + highlighted = row[w]; + } + } + } + } + GL11.glTranslated(0, 0, -i); + RenderHelper.disableStandardItemLighting(); + GL11.glDisable(GL12.GL_RESCALE_NORMAL); + GL11.glPopMatrix(); + + GL11.glEnable(GL11.GL_BLEND); + GL11.glEnable(GL11.GL_DEPTH_TEST); + + mc.fontRenderer.setUnicodeFlag(false); + if(highlighted!=null && renderMouseOver) + guiBase.renderToolTip(highlighted, mouseX, mouseY); + RenderHelper.disableStandardItemLighting(); + +// mc.fontRenderer.setUnicodeFlag(true); +// if(localizedText!=null&&!localizedText.isEmpty()) +// manual.fontRenderer.drawSplitString(localizedText, x,y+yOffTotal, 120, manual.getTextColour()); + } + } +} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageRitualMultiBlock.java b/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageRitualMultiBlock.java index 1ac64f17..2de3bf4c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageRitualMultiBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/guide/PageRitualMultiBlock.java @@ -1,23 +1,22 @@ -//package WayofTime.alchemicalWizardry.api.guide; -// -//import java.util.List; -// -//import net.minecraft.item.ItemStack; -//import WayofTime.alchemicalWizardry.ModBlocks; -//import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -//import WayofTime.alchemicalWizardry.api.rituals.Rituals; -// -//public class PageRitualMultiBlock extends PageMultiBlock -//{ -// private static ItemStack blankStone; -// private static ItemStack waterStone; -// private static ItemStack fireStone; -// private static ItemStack earthStone; -// private static ItemStack airStone; -// private static ItemStack duskStone; -// private static ItemStack dawnStone; -// static -// { +package WayofTime.alchemicalWizardry.api.guide; + +import java.util.List; + +import net.minecraft.item.ItemStack; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.Rituals; + +public class PageRitualMultiBlock extends PageMultiBlock +{ + private static ItemStack blankStone; + private static ItemStack waterStone; + private static ItemStack fireStone; + private static ItemStack earthStone; + private static ItemStack airStone; + private static ItemStack duskStone; + private static ItemStack dawnStone; + static + { // blankStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.BLANK); // waterStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.WATER); // fireStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.FIRE); @@ -25,72 +24,72 @@ // airStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.AIR); // duskStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.DUSK); // dawnStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.DAWN); -// } -// -// private PageRitualMultiBlock(ItemStack[][][] structure) -// { -// super(structure); -// } -// -// public static PageRitualMultiBlock getPageForRitual(String ritualID) -// { -// return getPageForRitual(Rituals.getRitualList(ritualID)); -// } -// -// public static PageRitualMultiBlock getPageForRitual(List<RitualComponent> ritualComponents) -// { -// int minX = 0; -// int minY = 0; -// int minZ = 0; -// -// int maxX = 0; -// int maxY = 0; -// int maxZ = 0; -// -// for(RitualComponent comp : ritualComponents) -// { -// minX = Math.min(comp.getX(), minX); -// minY = Math.min(comp.getY(), minY); -// minZ = Math.min(comp.getZ(), minZ); -// -// maxX = Math.max(comp.getX(), maxX); -// maxY = Math.max(comp.getY(), maxY); -// maxZ = Math.max(comp.getZ(), maxZ); -// } -// -// System.out.println("Min: (" + minX + ", " + minY + ", " + minZ + "), Max: (" + maxX + ", " + maxY + ", " + maxZ + ")"); -// -// ItemStack[][][] tempStructure = new ItemStack[maxY-minY+1][maxX-minX+1][maxZ-minZ+1]; //First value is vertical, second is down to the left, third is down to the right -// -// for(RitualComponent comp : ritualComponents) -// { -// tempStructure[comp.getY() - minY][comp.getX() - minX][comp.getZ() - minZ] = getStackForRitualStone(comp.getStoneType()); -// } -// + } + + private PageRitualMultiBlock(ItemStack[][][] structure) + { + super(structure); + } + + public static PageRitualMultiBlock getPageForRitual(String ritualID) + { + return getPageForRitual(Rituals.getRitualList(ritualID)); + } + + public static PageRitualMultiBlock getPageForRitual(List<RitualComponent> ritualComponents) + { + int minX = 0; + int minY = 0; + int minZ = 0; + + int maxX = 0; + int maxY = 0; + int maxZ = 0; + + for(RitualComponent comp : ritualComponents) + { + minX = Math.min(comp.getX(), minX); + minY = Math.min(comp.getY(), minY); + minZ = Math.min(comp.getZ(), minZ); + + maxX = Math.max(comp.getX(), maxX); + maxY = Math.max(comp.getY(), maxY); + maxZ = Math.max(comp.getZ(), maxZ); + } + + System.out.println("Min: (" + minX + ", " + minY + ", " + minZ + "), Max: (" + maxX + ", " + maxY + ", " + maxZ + ")"); + + ItemStack[][][] tempStructure = new ItemStack[maxY-minY+1][maxX-minX+1][maxZ-minZ+1]; //First value is vertical, second is down to the left, third is down to the right + + for(RitualComponent comp : ritualComponents) + { + tempStructure[comp.getY() - minY][comp.getX() - minX][comp.getZ() - minZ] = getStackForRitualStone(comp.getStoneType()); + } + // tempStructure[-minY][-minX][-minZ] = new ItemStack(ModBlocks.blockMasterStone); -// -// return new PageRitualMultiBlock(tempStructure); -// } -// -// private static ItemStack getStackForRitualStone(int type) -// { -// switch(type) -// { -// case RitualComponent.BLANK: -// return blankStone; -// case RitualComponent.WATER: -// return waterStone; -// case RitualComponent.FIRE: -// return fireStone; -// case RitualComponent.EARTH: -// return earthStone; -// case RitualComponent.AIR: -// return airStone; -// case RitualComponent.DUSK: -// return duskStone; -// case RitualComponent.DAWN: -// return dawnStone; -// } -// return blankStone; -// } -//} + + return new PageRitualMultiBlock(tempStructure); + } + + private static ItemStack getStackForRitualStone(int type) + { + switch(type) + { + case RitualComponent.BLANK: + return blankStone; + case RitualComponent.WATER: + return waterStone; + case RitualComponent.FIRE: + return fireStone; + case RitualComponent.EARTH: + return earthStone; + case RitualComponent.AIR: + return airStone; + case RitualComponent.DUSK: + return duskStone; + case RitualComponent.DAWN: + return dawnStone; + } + return blankStone; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/harvest/HarvestRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/harvest/HarvestRegistry.java index 2d5e884b..aac57f57 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/harvest/HarvestRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/harvest/HarvestRegistry.java @@ -1,30 +1,28 @@ package WayofTime.alchemicalWizardry.api.harvest; +import net.minecraft.block.Block; +import net.minecraft.world.World; + import java.util.ArrayList; import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; - public class HarvestRegistry { - public static List<IHarvestHandler> handlerList = new ArrayList<IHarvestHandler>(); + public static List<IHarvestHandler> handlerList = new ArrayList(); public static void registerHarvestHandler(IHarvestHandler handler) { handlerList.add(handler); } - public static boolean harvestBlock(World world, BlockPos pos) + public static boolean harvestBlock(World world, int xCoord, int yCoord, int zCoord) { - IBlockState state = world.getBlockState(pos); - Block block = state.getBlock(); + Block block = world.getBlock(xCoord, yCoord, zCoord); + int meta = world.getBlockMetadata(xCoord, yCoord, zCoord); for (IHarvestHandler handler : handlerList) { - if (handler.harvestAndPlant(world, pos, block, state)) + if (handler.harvestAndPlant(world, xCoord, yCoord, zCoord, block, meta)) { return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/harvest/IHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/harvest/IHarvestHandler.java index d7dc78a8..0d5fb32b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/harvest/IHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/harvest/IHarvestHandler.java @@ -1,8 +1,6 @@ package WayofTime.alchemicalWizardry.api.harvest; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; public interface IHarvestHandler @@ -11,8 +9,12 @@ public interface IHarvestHandler * A handler that is used to harvest and replant the block at the specified location * * @param world + * @param xCoord + * @param yCoord + * @param zCoord * @param block block at this given location + * @param meta meta at this given location * @return true if successfully harvested, false if not */ - boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state); + boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java index 40773cb5..2d7325ca 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/ItemSpellMultiTool.java @@ -8,7 +8,7 @@ import java.util.Set; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; @@ -18,12 +18,12 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.util.Constants; +import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; import WayofTime.alchemicalWizardry.api.spell.SpellEffect; @@ -43,6 +43,12 @@ public class ItemSpellMultiTool extends Item this.setMaxStackSize(1); this.setFull3D(); } + + @Override + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundTool"); + } @Override public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) @@ -92,7 +98,7 @@ public class ItemSpellMultiTool extends Item } @Override - public boolean onBlockStartBreak(ItemStack stack, BlockPos pos, EntityPlayer player) + public boolean onBlockStartBreak(ItemStack stack, int x, int y, int z, EntityPlayer player) { if (player.worldObj.isRemote) { @@ -103,23 +109,23 @@ public class ItemSpellMultiTool extends Item return false; World world = player.worldObj; - IBlockState state = world.getBlockState(pos); - Block block = state.getBlock(); + Block block = player.worldObj.getBlock(x, y, z); + int meta = world.getBlockMetadata(x, y, z); if (block == null || block == Blocks.air) return false; int hlvl = -1; - float blockHardness = block.getBlockHardness(world, pos); + float blockHardness = block.getBlockHardness(world, x, y, z); MovingObjectPosition mop = APISpellHelper.raytraceFromEntity(world, player, true, 5.0D); - IBlockState localState = world.getBlockState(pos); - Block localBlock = state.getBlock(); - String toolClass = block.getHarvestTool(state); + Block localBlock = world.getBlock(x, y, z); + int localMeta = world.getBlockMetadata(x, y, z); + String toolClass = block.getHarvestTool(meta); if (toolClass != null && this.getHarvestLevel(stack, toolClass) != -1) - hlvl = block.getHarvestLevel(state); + hlvl = block.getHarvestLevel(meta); int toolLevel = this.getHarvestLevel(stack, toolClass); - float localHardness = localBlock == null ? Float.MAX_VALUE : localBlock.getBlockHardness(world, pos); + float localHardness = localBlock == null ? Float.MAX_VALUE : localBlock.getBlockHardness(world, x, y, z); if (hlvl <= toolLevel && localHardness - 1.5 <= blockHardness) { @@ -133,7 +139,7 @@ public class ItemSpellMultiTool extends Item String localToolClass = this.getToolClassForMaterial(localBlock.getMaterial()); - if (localToolClass != null && this.getHarvestLevel(stack, toolClass) >= localBlock.getHarvestLevel(localState)) + if (localToolClass != null && this.getHarvestLevel(stack, toolClass) >= localBlock.getHarvestLevel(localMeta)) { isEffective = true; } @@ -148,31 +154,31 @@ public class ItemSpellMultiTool extends Item { if (isEffective) { - if (localBlock.removedByPlayer(world, pos, player, true)) + if (localBlock.removedByPlayer(world, player, x, y, z, true)) { - localBlock.onBlockDestroyedByPlayer(world, pos, localState); + localBlock.onBlockDestroyedByPlayer(world, x, y, z, localMeta); } - localBlock.onBlockHarvested(world, pos, localState, player); + localBlock.onBlockHarvested(world, x, y, z, localMeta, player); if (blockHardness > 0f) - onBlockDestroyed(stack, world, localBlock, pos, player); + onBlockDestroyed(stack, world, localBlock, x, y, z, player); - List<ItemStack> items = APISpellHelper.getItemsFromBlock(world, pos, localBlock, localState, this.getSilkTouch(stack), this.getFortuneLevel(stack)); + List<ItemStack> items = APISpellHelper.getItemsFromBlock(world, localBlock, x, y, z, localMeta, this.getSilkTouch(stack), this.getFortuneLevel(stack)); SpellParadigmTool parad = this.loadParadigmFromStack(stack); List<ItemStack> newItems = parad.handleItemList(stack, items); if (!world.isRemote) { - APISpellHelper.spawnItemListInWorld(newItems, world, pos.getX() + 0.5f, pos.getY() + 0.5f, pos.getZ() + 0.5f); + APISpellHelper.spawnItemListInWorld(newItems, world, x + 0.5f, y + 0.5f, z + 0.5f); } - world.markBlockForUpdate(pos); + world.func_147479_m(x, y, z); int cost = 0; cost += parad.digSurroundingArea(stack, world, player, mop, localToolClass, localHardness, toolLevel, this); - cost += parad.onBreakBlock(stack, world, player, localBlock, localState, pos, mop.field_178784_b); + cost += parad.onBreakBlock(stack, world, player, localBlock, localMeta, x, y, z, ForgeDirection.getOrientation(mop.sideHit)); if (cost > 0) { @@ -180,14 +186,14 @@ public class ItemSpellMultiTool extends Item } } else { - world.setBlockToAir(pos); - world.markBlockForUpdate(pos); + world.setBlockToAir(x, y, z); + world.func_147479_m(x, y, z); } } else { - world.setBlockToAir(pos); - world.markBlockForUpdate(pos); + world.setBlockToAir(x, y, z); + world.func_147479_m(x, y, z); } } } @@ -252,7 +258,7 @@ public class ItemSpellMultiTool extends Item public Set<String> getToolClasses(ItemStack stack) { - Set<String> set = new HashSet<String>(); + Set<String> set = new HashSet(); if (this.getHarvestLevel(stack, "pickaxe") > -1) { @@ -273,14 +279,18 @@ public class ItemSpellMultiTool extends Item } @Override - public float getDigSpeed(ItemStack stack, IBlockState state) + public float getDigSpeed(ItemStack stack, Block block, int meta) { - Block block = state.getBlock(); - String toolClass = block.getHarvestTool(state); + String toolClass = block.getHarvestTool(meta); if (toolClass == null || toolClass.equals("")) { - return 1.0f; + toolClass = getToolClassOfMaterial(block.getMaterial()); + + if(toolClass == "") + { + return 1.0f; + } } { if (stack.hasTagCompound()) @@ -296,6 +306,26 @@ public class ItemSpellMultiTool extends Item return 1.0f; } + + public String getToolClassOfMaterial(Material mat) + { + if(mat == Material.iron || mat == Material.anvil || mat == Material.rock) + { + return "pickaxe"; + } + + if(mat == Material.wood || mat == Material.plants || mat == Material.vine) + { + return "axe"; + } + + if(mat == Material.ground || mat == Material.grass) + { + return "shovel"; + } + + return ""; + } @Override public int getHarvestLevel(ItemStack stack, String toolClass) @@ -369,7 +399,7 @@ public class ItemSpellMultiTool extends Item MovingObjectPosition mop = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, false); - int cost; + int cost = 0; if (mop != null && mop.typeOfHit.equals(MovingObjectPosition.MovingObjectType.BLOCK)) { @@ -549,7 +579,10 @@ public class ItemSpellMultiTool extends Item public void setDuration(ItemStack container, World world, int duration) { - if (!world.isRemote) + if (world.isRemote) + { + return; + } else { World overWorld = DimensionManager.getWorld(0); long worldtime = overWorld.getTotalWorldTime(); @@ -629,10 +662,10 @@ public class ItemSpellMultiTool extends Item NBTTagList tagList = tagiest.getTagList("Effects", Constants.NBT.TAG_COMPOUND); - List<SpellEffect> spellEffectList = new LinkedList<SpellEffect>(); + List<SpellEffect> spellEffectList = new LinkedList(); for (int i = 0; i < tagList.tagCount(); i++) { - NBTTagCompound tag = tagList.getCompoundTagAt(i); + NBTTagCompound tag = (NBTTagCompound) tagList.getCompoundTagAt(i); SpellEffect eff = SpellEffect.getEffectFromTag(tag); if (eff != null) @@ -726,10 +759,10 @@ public class ItemSpellMultiTool extends Item NBTTagList tagList = tagiest.getTagList("ToolTips", Constants.NBT.TAG_COMPOUND); - List<String> toolTipList = new LinkedList<String>(); + List<String> toolTipList = new LinkedList(); for (int i = 0; i < tagList.tagCount(); i++) { - NBTTagCompound tag = tagList.getCompoundTagAt(i); + NBTTagCompound tag = (NBTTagCompound) tagList.getCompoundTagAt(i); String str = tag.getString("tip"); if (str != null) diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapedBloodOrbRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapedBloodOrbRecipe.java index ca2122bd..83461f3f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapedBloodOrbRecipe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapedBloodOrbRecipe.java @@ -1,11 +1,6 @@ package WayofTime.alchemicalWizardry.api.items; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Map.Entry; - +import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; import net.minecraft.block.Block; import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.Item; @@ -14,7 +9,12 @@ import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.ShapedRecipes; import net.minecraft.world.World; import net.minecraftforge.oredict.OreDictionary; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Map.Entry; /** * Shaped Blood Orb Recipe Handler by joshie * @@ -278,10 +278,4 @@ public class ShapedBloodOrbRecipe implements IRecipe { return this.input; } - - @Override - public ItemStack[] func_179532_b(InventoryCrafting inventory) - { - return new ItemStack[1]; - } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapelessBloodOrbRecipe.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapelessBloodOrbRecipe.java index 0040f745..80662b3b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapelessBloodOrbRecipe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/ShapelessBloodOrbRecipe.java @@ -134,7 +134,7 @@ public class ShapelessBloodOrbRecipe implements IRecipe //If target is integer, then we should be check the blood orb value of the item instead if (next instanceof Integer) { - if (slot.getItem() instanceof IBloodOrb) + if (slot != null && slot.getItem() instanceof IBloodOrb) { IBloodOrb orb = (IBloodOrb) slot.getItem(); if (orb.getOrbLevel() < (Integer) next) @@ -177,10 +177,4 @@ public class ShapelessBloodOrbRecipe implements IRecipe { return this.input; } - - @Override - public ItemStack[] func_179532_b(InventoryCrafting inventory) - { - return new ItemStack[1]; - } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IRitualDiviner.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IRitualDiviner.java index 2189a6ed..03094a88 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IRitualDiviner.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IRitualDiviner.java @@ -2,21 +2,13 @@ package WayofTime.alchemicalWizardry.api.items.interfaces; import net.minecraft.item.ItemStack; -public interface IRitualDiviner -{ +public interface IRitualDiviner { int cycleDirection(ItemStack stack); - String getCurrentRitual(ItemStack stack); - int getDirection(ItemStack stack); - int getMaxRuneDisplacement(ItemStack stack); - String getNameForDirection(int direction); - void setCurrentRitual(ItemStack stack, String ritualID); - void setDirection(ItemStack stack, int direction); - void setMaxRuneDisplacement(ItemStack stack, int displacement); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/renderer/MRSRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/api/renderer/MRSRenderer.java index 8200f4e2..7eea34c1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/renderer/MRSRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/renderer/MRSRenderer.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.api.renderer; -import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.texture.TextureManager; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.util.ResourceLocation; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -8,8 +9,13 @@ public abstract class MRSRenderer { public abstract void renderAt(IMasterRitualStone tile, double x, double y, double z); - protected void bindTexture(ResourceLocation location) + protected void bindTexture(ResourceLocation p_147499_1_) { - Minecraft.getMinecraft().getTextureManager().bindTexture(location); + TextureManager texturemanager = TileEntityRendererDispatcher.instance.field_147553_e; + + if (texturemanager != null) + { + texturemanager.bindTexture(p_147499_1_); + } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IMasterRitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IMasterRitualStone.java index 8b38ecac..3577ad47 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IMasterRitualStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IMasterRitualStone.java @@ -1,13 +1,12 @@ package WayofTime.alchemicalWizardry.api.rituals; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.alchemy.energy.ISegmentedReagentHandler; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; public interface IMasterRitualStone extends ISegmentedReagentHandler { - void performRitual(World world, BlockPos pos, String ritualID); + void performRitual(World world, int x, int y, int z, String ritualID); String getOwner(); @@ -23,9 +22,13 @@ public interface IMasterRitualStone extends ISegmentedReagentHandler int getDirection(); - World getWorldObj(); + World getWorld(); - BlockPos getPosition(); + int getXCoord(); + + int getYCoord(); + + int getZCoord(); NBTTagCompound getCustomRitualTag(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IRitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IRitualStone.java index 74d1e9a8..3ea6d90e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IRitualStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/IRitualStone.java @@ -1,7 +1,5 @@ package WayofTime.alchemicalWizardry.api.rituals; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; public interface IRitualStone @@ -9,10 +7,12 @@ public interface IRitualStone /** * x, y, and z give the position of the Ritual Stone * @param world - * @param pos - * @param state + * @param x + * @param y + * @param z + * @param meta * @param runeType * @return */ - boolean isRuneType(World world, BlockPos pos, IBlockState state, int runeType); + boolean isRuneType(World world, int x, int y, int z, int meta, int runeType); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/LocalRitualStorage.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/LocalRitualStorage.java index d9d7cdfc..e5a3241b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/LocalRitualStorage.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/LocalRitualStorage.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.api.rituals; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; +import WayofTime.alchemicalWizardry.api.Int3; /** * This class is used to pass ritual-specific data into the RitualEffect from the containing Master Ritual Stone. This is basically used as auxillarary storage, @@ -10,27 +10,33 @@ import net.minecraft.util.BlockPos; */ public class LocalRitualStorage { - public BlockPos coords; + public int xCoord; + public int yCoord; + public int zCoord; public void writeToNBT(NBTTagCompound tag) { - tag.setInteger("xCoord", coords.getX()); - tag.setInteger("yCoord", coords.getY()); - tag.setInteger("zCoord", coords.getZ()); + tag.setInteger("xCoord", xCoord); + tag.setInteger("yCoord", yCoord); + tag.setInteger("zCoord", zCoord); } public void readFromNBT(NBTTagCompound tag) { - this.coords = new BlockPos(tag.getInteger("xCoord"), tag.getInteger("yCoord"), tag.getInteger("zCoord")); + this.xCoord = tag.getInteger("xCoord"); + this.yCoord = tag.getInteger("yCoord"); + this.zCoord = tag.getInteger("zCoord"); } - public BlockPos getLocation() + public Int3 getLocation() { - return coords; + return new Int3(xCoord, yCoord, zCoord); } - public void setLocation(BlockPos location) + public void setLocation(Int3 location) { - this.coords = location; + this.xCoord = location.xCoord; + this.yCoord = location.yCoord; + this.zCoord = location.zCoord; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java index 8bbe8397..85f291c7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/RitualEffect.java @@ -4,7 +4,7 @@ import java.util.ArrayList; import java.util.List; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.EnumFacing; +import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; @@ -17,7 +17,10 @@ public abstract class RitualEffect return true; } - public void onRitualBroken(IMasterRitualStone ritualStone, RitualBreakMethod method) {} + public void onRitualBroken(IMasterRitualStone ritualStone, RitualBreakMethod method) + { + + } public abstract int getCostPerRefresh(); @@ -37,13 +40,13 @@ public abstract class RitualEffect ReagentStack reagentStack = new ReagentStack(reagent, amount); - ReagentStack stack = ritualStone.drain(EnumFacing.UP, reagentStack, false); + ReagentStack stack = ritualStone.drain(ForgeDirection.UNKNOWN, reagentStack, false); if (stack != null && stack.amount >= amount) { if (doDrain) { - ritualStone.drain(EnumFacing.UP, reagentStack, true); + ritualStone.drain(ForgeDirection.UNKNOWN, reagentStack, true); } return true; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java index a45f0fd1..4b9a48c6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/rituals/Rituals.java @@ -6,16 +6,14 @@ import java.util.List; import java.util.Map; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.common.eventhandler.Event; import WayofTime.alchemicalWizardry.api.event.RitualRunEvent; import WayofTime.alchemicalWizardry.api.event.RitualStopEvent; import WayofTime.alchemicalWizardry.api.renderer.MRSRenderer; +import cpw.mods.fml.common.eventhandler.Event; public class Rituals { @@ -26,8 +24,8 @@ public class Rituals public final MRSRenderer customRenderer; - public static Map<String, Rituals> ritualMap = new HashMap<String, Rituals>(); - public static List<String> keyList = new LinkedList<String>(); + public static Map<String, Rituals> ritualMap = new HashMap(); + public static List<String> keyList = new LinkedList(); public Rituals(int crystalLevel, int actCost, RitualEffect effect, String name, MRSRenderer renderer) { @@ -97,11 +95,11 @@ public class Rituals } } - public static String checkValidRitual(World world, BlockPos pos) + public static String checkValidRitual(World world, int x, int y, int z) { for (String key : ritualMap.keySet()) { - if (checkRitualIsValid(world, pos, key)) + if (checkRitualIsValid(world, x, y, z, key)) { return key; } @@ -124,9 +122,9 @@ public class Rituals return false; } - public static boolean checkRitualIsValid(World world, BlockPos pos, String ritualID) + public static boolean checkRitualIsValid(World world, int x, int y, int z, String ritualID) { - int direction = Rituals.getDirectionOfRitual(world, pos, ritualID); + int direction = Rituals.getDirectionOfRitual(world, x, y, z, ritualID); return direction != -1; } @@ -137,7 +135,7 @@ public class Rituals * 3 - SOUTH * 4 - WEST */ - public static boolean checkDirectionOfRitualValid(World world, BlockPos pos, String ritualID, int direction) + public static boolean checkDirectionOfRitualValid(World world, int x, int y, int z, String ritualID, int direction) { List<RitualComponent> ritual = Rituals.getRitualList(ritualID); @@ -146,18 +144,15 @@ public class Rituals return false; } - IBlockState testState; Block test; TileEntity te; for (RitualComponent rc : ritual) { - BlockPos newPos = pos.add(rc.getX(direction), rc.getY(), rc.getZ(direction)); - testState = world.getBlockState(newPos); - test = testState.getBlock(); - te = world.getTileEntity(newPos); + test = world.getBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)); + te = world.getTileEntity(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)); - if (!(test instanceof IRitualStone && ((IRitualStone)test).isRuneType(world, newPos, testState, rc.getStoneType())) + if (!(test instanceof IRitualStone && ((IRitualStone)test).isRuneType(world, x + rc.getX(direction), y, z+ rc.getZ(direction), world.getBlockMetadata(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)), rc.getStoneType())) && !(te instanceof ITileRitualStone && ((ITileRitualStone)te).isRuneType(rc.getStoneType()))) { return false; @@ -167,11 +162,11 @@ public class Rituals return true; } - public static int getDirectionOfRitual(World world, BlockPos pos, String ritualID) + public static int getDirectionOfRitual(World world, int x, int y, int z, String ritualID) { for (int i = 1; i <= 4; i++) { - if (Rituals.checkDirectionOfRitualValid(world, pos, ritualID, i)) + if (Rituals.checkDirectionOfRitualValid(world, x, y, z, ritualID, i)) { return i; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/PlayerSacrificeHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/PlayerSacrificeHandler.java index af286e12..1e3db2b2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/PlayerSacrificeHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/sacrifice/PlayerSacrificeHandler.java @@ -1,11 +1,10 @@ package WayofTime.alchemicalWizardry.api.sacrifice; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; @@ -13,6 +12,7 @@ public class PlayerSacrificeHandler { public static float scalingOfSacrifice = 0.001f; public static int soulFrayDuration = 400; + public static Potion soulFrayId; public static float getPlayerIncense(EntityPlayer player) { return APISpellHelper.getCurrentIncense(player); @@ -41,7 +41,7 @@ public class PlayerSacrificeHandler public static boolean sacrificePlayerHealth(EntityPlayer player) { - if(player.isPotionActive(AlchemicalWizardry.customPotionSoulFray)) + if(player.isPotionActive(soulFrayId)) { return false; } @@ -61,7 +61,7 @@ public class PlayerSacrificeHandler { player.setHealth(maxHealth/10.0f); setPlayerIncense(player, 0); - player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionSoulFray.id, soulFrayDuration)); + player.addPotionEffect(new PotionEffect(soulFrayId.id, soulFrayDuration)); return true; } @@ -78,7 +78,10 @@ public class PlayerSacrificeHandler public static boolean findAndFillAltar(World world, EntityPlayer player, int amount) { - IBloodAltar altarEntity = getAltar(world, player.getPosition()); + int posX = (int) Math.round(player.posX - 0.5f); + int posY = (int) player.posY; + int posZ = (int) Math.round(player.posZ - 0.5f); + IBloodAltar altarEntity = getAltar(world, posX, posY, posZ); if (altarEntity == null) { @@ -91,7 +94,7 @@ public class PlayerSacrificeHandler return true; } - public static IBloodAltar getAltar(World world, BlockPos pos) + public static IBloodAltar getAltar(World world, int x, int y, int z) { TileEntity tileEntity; @@ -101,7 +104,7 @@ public class PlayerSacrificeHandler { for (int k = -2; k <= 1; k++) { - tileEntity = world.getTileEntity(pos.add(i, j, k)); + tileEntity = world.getTileEntity(i + x, k + y, j + z); if(tileEntity instanceof IBloodAltar) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/ComplexNetworkHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/ComplexNetworkHandler.java index 0718624a..c9b69311 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/ComplexNetworkHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/ComplexNetworkHandler.java @@ -12,9 +12,11 @@ import java.util.Map.Entry; import java.util.UUID; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.server.MinecraftServer; import com.google.gson.Gson; import com.google.gson.GsonBuilder; +import com.mojang.authlib.GameProfile; /** @@ -23,17 +25,46 @@ import com.google.gson.GsonBuilder; public class ComplexNetworkHandler { public static String fileName = "config/BloodMagic/soulnetworkKeys"; - static HashMap<UUID, String> keyMap = new HashMap<UUID, String>(); + static HashMap<UUID, String> keyMap = new HashMap(); public static UUID getUUIDFromPlayer(EntityPlayer player) { return player.getPersistentID(); } + + public static EntityPlayer getPlayerFromUUID(UUID uuid) + { + MinecraftServer server = MinecraftServer.getServer(); + GameProfile gameProfile; + gameProfile = server.func_152358_ax().func_152652_a(uuid); + String str = uuid.toString(); + //TODO ServerConfigurationManager d.createPlayerForUser + UUID.fromString(str); + return null; + } public static String getKeyForPlayer(EntityPlayer player) { return ""; } + public static UUID getUUIDForKey(String key) + { +// if (MinecraftServer.getServer() == null) +// { +// return null; +// } +// +// World world = MinecraftServer.getServer().worldServers[0]; +// UUIDKeyMap data = (UUIDKeyMap) world.loadItemData(UUIDKeyMap.class, key); +// +// if (data == null) +// { +// data = new UUIDKeyMap(key); +// world.setItemData(key, data); +// } + return null; + } + public static String assignKeyToPlayer(EntityPlayer player) { return ""; @@ -70,8 +101,9 @@ public class ComplexNetworkHandler try { br = new BufferedReader(new FileReader(save)); - - keyMap = gson.fromJson(br, keyMap.getClass()); + HashMap schema = gson.fromJson(br, keyMap.getClass()); + + keyMap = schema; if(keyMap != null) { @@ -85,6 +117,7 @@ public class ComplexNetworkHandler e.printStackTrace(); } } + else { keyMap = null; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java index ea051a0d..d9f30f41 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java @@ -9,42 +9,16 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.util.DamageSource; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.common.eventhandler.Event; -import net.minecraftforge.fml.common.eventhandler.Event.Result; import WayofTime.alchemicalWizardry.api.event.AddToNetworkEvent; import WayofTime.alchemicalWizardry.api.event.ItemBindEvent; import WayofTime.alchemicalWizardry.api.event.ItemDrainInContainerEvent; import WayofTime.alchemicalWizardry.api.event.ItemDrainNetworkEvent; +import cpw.mods.fml.common.eventhandler.Event; +import cpw.mods.fml.common.eventhandler.Event.Result; public class SoulNetworkHandler { - public static boolean canSyphonInContainer(ItemStack ist, int damageToBeDone) - { - if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) - { - String ownerName = ist.getTagCompound().getString("ownerName"); - - if (MinecraftServer.getServer() == null) - { - return false; - } - - World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); - - if (data == null) - { - data = new LifeEssenceNetwork(ownerName); - world.setItemData(ownerName, data); - } - - return data.currentEssence >= damageToBeDone; - } - - return false; - } - public static boolean syphonFromNetworkWhileInContainer(ItemStack ist, int damageToBeDone) { String ownerName = ""; @@ -422,7 +396,7 @@ public class SoulNetworkHandler public static String getUsername(EntityPlayer player) { - return player.getName(); + return player.getCommandSenderName(); } public static EntityPlayer getPlayerForUsername(String str) @@ -431,7 +405,7 @@ public class SoulNetworkHandler { return null; } - return MinecraftServer.getServer().getConfigurationManager().getPlayerByUsername(str); + return MinecraftServer.getServer().getConfigurationManager().func_152612_a(str); } public static void causeNauseaToPlayer(ItemStack stack) diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/APISpellHelper.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/APISpellHelper.java index 452085ec..ed3f65ad 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/APISpellHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/APISpellHelper.java @@ -4,7 +4,6 @@ import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -14,15 +13,14 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.IRecipe; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraftforge.fml.common.registry.GameRegistry; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import cpw.mods.fml.common.registry.GameRegistry; public class APISpellHelper { @@ -232,7 +230,7 @@ public class APISpellHelper if (!world.isRemote && player instanceof EntityPlayer) d1 += 1.62D; double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f; - Vec3 vec3 = new Vec3(d0, d1, d2); + Vec3 vec3 = APISpellHelper.createVec3(d0, d1, d2); float f3 = MathHelper.cos(-f2 * 0.017453292F - (float) Math.PI); float f4 = MathHelper.sin(-f2 * 0.017453292F - (float) Math.PI); float f5 = -MathHelper.cos(-f1 * 0.017453292F); @@ -244,33 +242,56 @@ public class APISpellHelper // d3 = ((EntityPlayerMP) player).theItemInWorldManager.getBlockReachDistance(); } Vec3 vec31 = vec3.addVector((double) f7 * range, (double) f6 * range, (double) f8 * range); - return world.rayTraceBlocks(vec3, vec31, par3, !par3, par3); + return world.func_147447_a(vec3, vec31, par3, !par3, par3); } - public static List<ItemStack> getItemsFromBlock(World world, BlockPos pos, Block block, IBlockState state, boolean silkTouch, int fortune) + public static Vec3 createVec3(double x, double y, double z) + { + return Vec3.createVectorHelper(x, y, z); + } + + public static List<ItemStack> getItemsFromBlock(World world, Block block, int x, int y, int z, int meta, boolean silkTouch, int fortune) { - boolean canSilk = block.canSilkHarvest(world, pos, state, null); //Null player + boolean canSilk = block.canSilkHarvest(world, null, x, y, z, meta); if (canSilk && silkTouch) { ArrayList<ItemStack> items = new ArrayList<ItemStack>(); - ItemStack item = new ItemStack(block, 1, block.getMetaFromState(state)); - + ItemStack item = createStackedBlock(block, meta); + items.add(item); return items; } else { - return block.getDrops(world, pos, state, fortune); + return block.getDrops(world, x, y, z, meta, fortune); } } + public static ItemStack createStackedBlock(Block block, int meta) + { + int j = 0; + if(block == Blocks.lit_redstone_ore) + { + block = Blocks.redstone_ore; + } + + Item item = Item.getItemFromBlock(block); + + if (item != null && item.getHasSubtypes()) + { + j = meta; + } + + return new ItemStack(item, 1, j); + } + public static void spawnItemListInWorld(List<ItemStack> items, World world, float x, float y, float z) { for (ItemStack stack : items) { EntityItem itemEntity = new EntityItem(world, x, y, z, stack); - itemEntity.setDefaultPickupDelay(); + itemEntity.delayBeforeCanPickup = 10; world.spawnEntityInWorld(itemEntity); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java index c4afda4e..51657249 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/EntitySpellProjectile.java @@ -6,24 +6,20 @@ import java.util.LinkedList; import java.util.List; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.IProjectile; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class EntitySpellProjectile extends Entity implements IProjectile { @@ -45,10 +41,10 @@ public class EntitySpellProjectile extends Entity implements IProjectile //Custom variables private int maxRicochet = 0; private float damage = 1; - public List<IProjectileImpactEffect> impactList = new ArrayList<IProjectileImpactEffect>(); + public List<IProjectileImpactEffect> impactList = new ArrayList(); private boolean penetration = false; - public List<IProjectileUpdateEffect> updateEffectList = new ArrayList<IProjectileUpdateEffect>(); - public List<SpellEffect> spellEffectList = new LinkedList<SpellEffect>(); + public List<IProjectileUpdateEffect> updateEffectList = new ArrayList(); + public List<SpellEffect> spellEffectList = new LinkedList(); private int blocksBroken = 0; public EntitySpellProjectile(World par1World) @@ -62,6 +58,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile super(par1World); this.setSize(0.5F, 0.5F); this.setPosition(par2, par4, par6); + yOffset = 0.0F; } public EntitySpellProjectile(World par1World, EntityPlayer par2EntityPlayer) @@ -75,6 +72,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile posY -= 0.2D; posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; this.setPosition(posX, posY, posZ); + yOffset = 0.0F; motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); @@ -113,6 +111,18 @@ public class EntitySpellProjectile extends Entity implements IProjectile prevRotationPitch = rotationPitch = (float) (Math.atan2(var3, var10) * 180.0D / Math.PI); } + @Override + @SideOnly(Side.CLIENT) + /** + * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, + * posY, posZ, yaw, pitch + */ + public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) + { + this.setPosition(par1, par3, par5); + this.setRotation(par7, par8); + } + @Override @SideOnly(Side.CLIENT) /** @@ -148,7 +158,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile } if (shootingEntity == null) { - List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(posX - 1, posY - 1, posZ - 1, posX + 1, posY + 1, posZ + 1)); + List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(posX - 1, posY - 1, posZ - 1, posX + 1, posY + 1, posZ + 1)); Iterator i = players.iterator(); double closestDistance = Double.MAX_VALUE; EntityPlayer closestPlayer = null; @@ -172,15 +182,14 @@ public class EntitySpellProjectile extends Entity implements IProjectile prevRotationYaw = rotationYaw = (float) (Math.atan2(motionX, motionZ) * 180.0D / Math.PI); prevRotationPitch = rotationPitch = (float) (Math.atan2(motionY, var1) * 180.0D / Math.PI); } - IBlockState state = worldObj.getBlockState(new BlockPos(xTile, yTile, zTile)); - Block var16 = state.getBlock(); + Block var16 = worldObj.getBlock(xTile, yTile, zTile); if (var16 != null) { - var16.setBlockBoundsBasedOnState(worldObj, new BlockPos(xTile, yTile, zTile)); - AxisAlignedBB var2 = var16.getCollisionBoundingBox(worldObj, new BlockPos(xTile, yTile, zTile), state); + var16.setBlockBoundsBasedOnState(worldObj, xTile, yTile, zTile); + AxisAlignedBB var2 = var16.getCollisionBoundingBoxFromPool(worldObj, xTile, yTile, zTile); - if (var2 != null && var2.isVecInside(new Vec3(posX, posY, posZ))) + if (var2 != null && var2.isVecInside(APISpellHelper.createVec3(posX, posY, posZ))) { inGround = true; } @@ -188,7 +197,14 @@ public class EntitySpellProjectile extends Entity implements IProjectile if (inGround) { + Block var18 = worldObj.getBlock(xTile, yTile, zTile); + int var19 = worldObj.getBlockMetadata(xTile, yTile, zTile); +// if (var18.equals(Block.getBlockById(inTile)) && var19 == inData) + { + // this.groundImpact(); + // this.setDead(); + } } else { ++ticksInAir; @@ -202,19 +218,19 @@ public class EntitySpellProjectile extends Entity implements IProjectile } } - Vec3 var17 = new Vec3(posX, posY, posZ); - Vec3 var3 = new Vec3(posX + motionX, posY + motionY, posZ + motionZ); - MovingObjectPosition var4 = worldObj.rayTraceBlocks(var17, var3, true, false, false); - var17 = new Vec3(posX, posY, posZ); - var3 = new Vec3(posX + motionX, posY + motionY, posZ + motionZ); + Vec3 var17 = APISpellHelper.createVec3(posX, posY, posZ); + Vec3 var3 = APISpellHelper.createVec3(posX + motionX, posY + motionY, posZ + motionZ); + MovingObjectPosition var4 = worldObj.func_147447_a(var17, var3, true, false, false); + var17 = APISpellHelper.createVec3(posX, posY, posZ); + var3 = APISpellHelper.createVec3(posX + motionX, posY + motionY, posZ + motionZ); if (var4 != null) { - var3 = new Vec3(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord); + var3 = APISpellHelper.createVec3(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord); } Entity var5 = null; - List var6 = worldObj.getEntitiesWithinAABBExcludingEntity(this, getBoundingBox().addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); + List var6 = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); double var7 = 0.0D; Iterator var9 = var6.iterator(); float var11; @@ -226,7 +242,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile if (var10.canBeCollidedWith() && (var10 != shootingEntity || ticksInAir >= 5)) { var11 = 0.3F; - AxisAlignedBB var12 = var10.getBoundingBox().expand(var11, var11, var11); + AxisAlignedBB var12 = var10.boundingBox.expand(var11, var11, var11); MovingObjectPosition var13 = var12.calculateIntercept(var17, var3); if (var13 != null) @@ -271,14 +287,14 @@ public class EntitySpellProjectile extends Entity implements IProjectile if (ticksInAir % 3 == 0) { double gauss = gaussian(1.0F); - worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB, posX, posY, posZ, gauss, gauss, 0.0F); + worldObj.spawnParticle("mobSpell", posX, posY, posZ, gauss, gauss, 0.0F); } } private void doFiringParticles() { - worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - worldObj.spawnParticle(EnumParticleTypes.FLAME, posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); + worldObj.spawnParticle("mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + worldObj.spawnParticle("flame", posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); } /** @@ -301,6 +317,17 @@ public class EntitySpellProjectile extends Entity implements IProjectile effectList.appendTag(eff.getTag()); } +// for (String str : this.effectList) +// { +// if (str != null) +// { +// NBTTagCompound tag = new NBTTagCompound(); +// +// tag.setString("Class", str); +// effectList.appendTag(tag); +// } +// } + par1NBTTagCompound.setTag("Effects", effectList); par1NBTTagCompound.setInteger("blocksBroken", blocksBroken); par1NBTTagCompound.setBoolean("isSilkTouch", isSilkTouch); @@ -323,7 +350,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile NBTTagList tagList = par1NBTTagCompound.getTagList("Effects", Constants.NBT.TAG_COMPOUND); - List<SpellEffect> spellEffectList = new LinkedList<SpellEffect>(); + List<SpellEffect> spellEffectList = new LinkedList(); for (int i = 0; i < tagList.tagCount(); i++) { NBTTagCompound tag = tagList.getCompoundTagAt(i); @@ -361,6 +388,13 @@ public class EntitySpellProjectile extends Entity implements IProjectile return false; } + @Override + @SideOnly(Side.CLIENT) + public float getShadowSize() + { + return 0.0F; + } + /** * Sets the amount of knockback the arrow applies when it hits a mob. */ @@ -414,7 +448,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile { if (!this.penetration) { - this.groundImpact(mop.field_178784_b); + this.groundImpact(mop.sideHit); this.performTileImpactEffects(mop); } } @@ -439,7 +473,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile { for (int particles = 0; particles < i; particles++) { - worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), posGauss(1.0F), posGauss(1.0F), 0.0F); + worldObj.spawnParticle("mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), posGauss(1.0F), posGauss(1.0F), 0.0F); } } @@ -453,7 +487,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile return DamageSource.causePlayerDamage(shootingEntity); } - private void groundImpact(EnumFacing sideHit) + private void groundImpact(int sideHit) { this.ricochet(sideHit); } @@ -473,22 +507,22 @@ public class EntitySpellProjectile extends Entity implements IProjectile return d + d * ((rand.nextFloat() - 0.5D) / 4); } - private void ricochet(EnumFacing sideHit) + private void ricochet(int sideHit) { switch (sideHit) { - case UP: - case DOWN: + case 0: + case 1: // topHit, bottomHit, reflect Y motionY = motionY * -1; break; - case WEST: - case EAST: + case 2: + case 3: // westHit, eastHit, reflect Z motionZ = motionZ * -1; break; - case SOUTH: - case NORTH: + case 4: + case 5: // southHit, northHit, reflect X motionX = motionX * -1; break; @@ -501,23 +535,23 @@ public class EntitySpellProjectile extends Entity implements IProjectile { switch (sideHit) { - case UP: - worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), -gaussian(0.1D), gaussian(0.1D)); + case 0: + worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), -gaussian(0.1D), gaussian(0.1D)); break; - case DOWN: - worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); + case 1: + worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); break; - case NORTH: - worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), -gaussian(0.1D)); + case 2: + worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), -gaussian(0.1D)); break; - case SOUTH: - worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); + case 3: + worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); break; - case WEST: - worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, -gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); + case 4: + worldObj.spawnParticle("smoke", posX, posY, posZ, -gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); break; - case EAST: - worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); + case 5: + worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); break; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ExtrapolatedMeleeEntityEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ExtrapolatedMeleeEntityEffect.java index b5c58751..03929374 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/ExtrapolatedMeleeEntityEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/ExtrapolatedMeleeEntityEffect.java @@ -35,7 +35,7 @@ public abstract class ExtrapolatedMeleeEntityEffect implements IMeleeSpellEntity double y = entityPlayer.posY + entityPlayer.getEyeHeight() + lookVec.yCoord; double z = entityPlayer.posZ + lookVec.zCoord; - List<Entity> entities = world.getEntitiesWithinAABB(Entity.class, new AxisAlignedBB(x - 0.5f, y - 0.5f, z - 0.5f, x + 0.5f, y + 0.5f, z + 0.5f).expand(radius, radius, radius)); + List<Entity> entities = world.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(x - 0.5f, y - 0.5f, z - 0.5f, x + 0.5f, y + 0.5f, z + 0.5f).expand(radius, radius, radius)); int hit = 0; if (entities != null) diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnBreakBlock.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnBreakBlock.java index 6c8fbaa7..6c10f6c3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnBreakBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/IOnBreakBlock.java @@ -1,14 +1,12 @@ package WayofTime.alchemicalWizardry.api.spell; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; public interface IOnBreakBlock { - int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, IBlockState state, BlockPos pos, EnumFacing sideBroken); + int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, int meta, int x, int y, int z, ForgeDirection sideBroken); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellCenteredWorldEffect.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellCenteredWorldEffect.java index bccfe653..68ec0133 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellCenteredWorldEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/MeleeSpellCenteredWorldEffect.java @@ -1,8 +1,6 @@ package WayofTime.alchemicalWizardry.api.spell; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.BlockPos; -import net.minecraft.util.MathHelper; import net.minecraft.util.Vec3; import net.minecraft.world.World; @@ -19,12 +17,11 @@ public abstract class MeleeSpellCenteredWorldEffect extends MeleeSpellWorldEffec public void onWorldEffect(World world, EntityPlayer entityPlayer) { Vec3 lookVec = entityPlayer.getLook(range).normalize(); - - int x = MathHelper.floor_double(entityPlayer.posX + lookVec.xCoord * range); - int y = MathHelper.floor_double(entityPlayer.posY + entityPlayer.getEyeHeight() + lookVec.yCoord * range); - int z = MathHelper.floor_double(entityPlayer.posZ + lookVec.zCoord * range); + int x = (int) (entityPlayer.posX + lookVec.xCoord * range); + int y = (int) (entityPlayer.posY + entityPlayer.getEyeHeight() + lookVec.yCoord * range); + int z = (int) (entityPlayer.posZ + lookVec.zCoord * range); - this.onCenteredWorldEffect(entityPlayer, world, new BlockPos(x, y, z)); + this.onCenteredWorldEffect(entityPlayer, world, x, y, z); } public void setRange(float range) @@ -32,5 +29,5 @@ public abstract class MeleeSpellCenteredWorldEffect extends MeleeSpellWorldEffec this.range = range; } - public abstract void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos); + public abstract void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffectRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffectRegistry.java index fcdd82f5..f217b12a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffectRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellEffectRegistry.java @@ -8,9 +8,9 @@ import java.util.Map.Entry; public class SpellEffectRegistry { - public static Map<Class<? extends SpellParadigm>, List<ComplexSpellEffect>> effectRegistry = new HashMap<Class<? extends SpellParadigm>, List<ComplexSpellEffect>>(); - public static Map<String, ComplexSpellType> typeRegistry = new HashMap<String, ComplexSpellType>(); - public static Map<String, ComplexSpellModifier> modifierRegistry = new HashMap<String, ComplexSpellModifier>(); + public static Map<Class<? extends SpellParadigm>, List<ComplexSpellEffect>> effectRegistry = new HashMap(); + public static Map<String, ComplexSpellType> typeRegistry = new HashMap(); + public static Map<String, ComplexSpellModifier> modifierRegistry = new HashMap(); public static void registerSpellEffect(Class<? extends SpellParadigm> paraClass, ComplexSpellEffect effect) { @@ -43,7 +43,7 @@ public class SpellEffectRegistry effectList.add(effect); }else { - List<ComplexSpellEffect> effectList = new LinkedList<ComplexSpellEffect>(); + List<ComplexSpellEffect> effectList = new LinkedList(); effectList.add(effect); effectRegistry.put(paraClass, effectList); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigm.java index 4f72d4ff..5423cb4f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigm.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigm.java @@ -9,7 +9,7 @@ import net.minecraft.world.World; public abstract class SpellParadigm { - protected List<SpellEffect> bufferedEffectList = new LinkedList<SpellEffect>(); + protected List<SpellEffect> bufferedEffectList = new LinkedList(); public void addBufferedEffect(SpellEffect effect) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmMelee.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmMelee.java index 12023f7a..629f7dba 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmMelee.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmMelee.java @@ -15,12 +15,15 @@ public class SpellParadigmMelee extends SpellParadigm public SpellParadigmMelee() { - this.entityEffectList = new ArrayList<IMeleeSpellEntityEffect>(); - this.worldEffectList = new ArrayList<IMeleeSpellWorldEffect>(); + this.entityEffectList = new ArrayList(); + this.worldEffectList = new ArrayList(); } @Override - public void enhanceParadigm(SpellEnhancement enh) {} + public void enhanceParadigm(SpellEnhancement enh) + { + + } @Override public void castSpell(World world, EntityPlayer entityPlayer, ItemStack itemStack) diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmProjectile.java index f1a33800..8b6f6a31 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmProjectile.java @@ -25,8 +25,8 @@ public class SpellParadigmProjectile extends SpellParadigm this.damageSource = DamageSource.generic; this.damage = 1; this.cost = 0; - this.impactList = new ArrayList<IProjectileImpactEffect>(); - this.updateEffectList = new ArrayList<IProjectileUpdateEffect>(); + this.impactList = new ArrayList(); + this.updateEffectList = new ArrayList(); this.penetration = false; this.ricochetMax = 0; this.isSilkTouch = false; diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmSelf.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmSelf.java index 91c6ab1d..89cffe07 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmSelf.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmSelf.java @@ -14,11 +14,14 @@ public class SpellParadigmSelf extends SpellParadigm public SpellParadigmSelf() { - selfSpellEffectList = new ArrayList<ISelfSpellEffect>(); + selfSpellEffectList = new ArrayList(); } @Override - public void enhanceParadigm(SpellEnhancement enh) {} + public void enhanceParadigm(SpellEnhancement enh) + { + + } @Override public void castSpell(World world, EntityPlayer entityPlayer, ItemStack itemStack) diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmTool.java b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmTool.java index e61795b9..e407ef24 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/spell/SpellParadigmTool.java @@ -7,16 +7,14 @@ import java.util.Map.Entry; import java.util.Set; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; @@ -49,31 +47,31 @@ public class SpellParadigmTool extends SpellParadigm public SpellParadigmTool() { - this.leftClickEffectList = new LinkedList<ILeftClickEffect>(); - this.rightClickEffectList = new LinkedList<IRightClickEffect>(); - this.toolUpdateEffectList = new LinkedList<IToolUpdateEffect>(); - this.toolSummonEffectList = new LinkedList<IOnSummonTool>(); - this.toolBanishEffectList = new LinkedList<IOnBanishTool>(); - this.breakBlockEffectList = new LinkedList<IOnBreakBlock>(); - this.itemManipulatorEffectList = new LinkedList<IItemManipulator>(); - this.digAreaEffectList = new LinkedList<IDigAreaEffect>(); - this.specialDamageEffectList = new LinkedList<ISpecialDamageEffect>(); - this.durationHash = new HashMap<String, Integer>(); + this.leftClickEffectList = new LinkedList(); + this.rightClickEffectList = new LinkedList(); + this.toolUpdateEffectList = new LinkedList(); + this.toolSummonEffectList = new LinkedList(); + this.toolBanishEffectList = new LinkedList(); + this.breakBlockEffectList = new LinkedList(); + this.itemManipulatorEffectList = new LinkedList(); + this.digAreaEffectList = new LinkedList(); + this.specialDamageEffectList = new LinkedList(); + this.durationHash = new HashMap(); - this.toolInfoString = new HashMap<String, String>(); - this.critChanceHash = new HashMap<String, Float>(); + this.toolInfoString = new HashMap(); + this.critChanceHash = new HashMap(); - this.harvestLevel = new HashMap<String, Integer>(); + this.harvestLevel = new HashMap(); this.harvestLevel.put("pickaxe", -1); this.harvestLevel.put("shovel", -1); this.harvestLevel.put("axe", -1); - this.digSpeed = new HashMap<String, Float>(); + this.digSpeed = new HashMap(); this.digSpeed.put("pickaxe", 1.0f); this.digSpeed.put("shovel", 1.0f); this.digSpeed.put("axe", 1.0f); - this.maxDamageHash = new HashMap<String, Float>(); + this.maxDamageHash = new HashMap(); this.maxDamageHash.put("default", 5.0f); this.fortuneLevel = 0; @@ -339,12 +337,12 @@ public class SpellParadigmTool extends SpellParadigm return total; } - public int onBreakBlock(ItemStack container, World world, EntityPlayer player, Block block, IBlockState state, BlockPos pos, EnumFacing sideBroken) + public int onBreakBlock(ItemStack container, World world, EntityPlayer player, Block block, int meta, int x, int y, int z, ForgeDirection sideBroken) { int total = 0; for (IOnBreakBlock effect : this.breakBlockEffectList) { - total += effect.onBlockBroken(container, world, player, block, state, pos, sideBroken); + total += effect.onBlockBroken(container, world, player, block, meta, x, y, z, sideBroken); } return total; @@ -356,7 +354,8 @@ public class SpellParadigmTool extends SpellParadigm for (IItemManipulator eff : this.itemManipulatorEffectList) { - heldList = eff.handleItemsOnBlockBroken(toolStack, heldList); + List<ItemStack> newHeldList = eff.handleItemsOnBlockBroken(toolStack, heldList); + heldList = newHeldList; } return heldList; @@ -464,7 +463,7 @@ public class SpellParadigmTool extends SpellParadigm public float getAddedDamageForEntity(Entity entity) { - HashMap<String, Float> hash = new HashMap<String, Float>(); + HashMap<String, Float> hash = new HashMap(); for (ISpecialDamageEffect effect : this.specialDamageEffectList) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistry.java index 01c065f8..18180d8c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/summoningRegistry/SummoningRegistry.java @@ -9,7 +9,7 @@ import java.util.List; public class SummoningRegistry { - public static List<SummoningRegistryComponent> summoningList = new ArrayList<SummoningRegistryComponent>(); + public static List<SummoningRegistryComponent> summoningList = new ArrayList(); public static void registerSummon(SummoningHelper s, ItemStack[] ring1, ItemStack[] ring2, ItemStack[] ring3, int amountUsed, int bloodOrbLevel) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellTile.java b/src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellTile.java index ac47e535..c5d868e0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellTile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/tile/ISpellTile.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.api.tile; -import net.minecraft.util.EnumFacing; +import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; public interface ISpellTile { void modifySpellParadigm(SpellParadigm parad); - boolean canInputRecieveOutput(EnumFacing output); + boolean canInputRecieveOutput(ForgeDirection output); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/BlockRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/client/BlockRenderer.java deleted file mode 100644 index 8ade0296..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/client/BlockRenderer.java +++ /dev/null @@ -1,14 +0,0 @@ -package WayofTime.alchemicalWizardry.client; - -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.client.resources.model.ModelResourceLocation; -import net.minecraft.item.Item; - -public class BlockRenderer -{ - public static void registerBlock(Block block) - { - Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation("alchemicalwizardry:" + block.getUnlocalizedName().substring(5), "inventory")); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/ClientEventHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/ClientEventHandler.java index ee938546..b99319df 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/ClientEventHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/ClientEventHandler.java @@ -1,23 +1,55 @@ package WayofTime.alchemicalWizardry.client; import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.event.RenderBlockOverlayEvent; +import net.minecraftforge.client.event.RenderHandEvent; import net.minecraftforge.client.event.sound.SoundEvent; -import net.minecraftforge.fml.client.FMLClientHandler; -import net.minecraftforge.fml.common.eventhandler.Event.Result; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.InputEvent; -import net.minecraftforge.fml.common.gameevent.TickEvent.Phase; -import net.minecraftforge.fml.common.gameevent.TickEvent.RenderTickEvent; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; - +import WayofTime.alchemicalWizardry.client.renderer.RenderHelper; +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.common.eventhandler.Event.Result; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.InputEvent; +import cpw.mods.fml.common.gameevent.TickEvent.Phase; +import cpw.mods.fml.common.gameevent.TickEvent.RenderTickEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class ClientEventHandler { - private Minecraft mcClient = FMLClientHandler.instance().getClient(); + private Minecraft mc = FMLClientHandler.instance().getClient(); + + public static ResourceLocation currentPlayerTexture = null; + @SideOnly(Side.CLIENT) + @SubscribeEvent + public void renderPOVArmour(RenderHandEvent event) + { + if (this.mc.thePlayer.worldObj.isRemote && this.mc.gameSettings.thirdPersonView == 0 && !this.mc.renderViewEntity.isPlayerSleeping() && !this.mc.gameSettings.hideGUI && !this.mc.playerController.enableEverythingIsScrewedUpMode()) + { + currentPlayerTexture = ((AbstractClientPlayer) mc.thePlayer).getLocationSkin(); + + ClientUtils.renderPlayerArmourInPOV(mc.thePlayer, event.partialTicks); + event.setCanceled(true); + } + } + +// @SubscribeEvent(priority = EventPriority.LOWEST) +// public void onPlayerRenderTick(RenderPlayerEvent.Pre event) +// { +// ModelBiped model = ((BoundArmour)ModItems.boundPlate).getArmorModel(event.entityPlayer, new ItemStack(ModItems.boundPlate), 2); +// String texture = ((BoundArmour)ModItems.boundPlate).getArmorTexture(new ItemStack(ModItems.boundPlate), event.entityPlayer, 2, ""); +// +// ResourceLocation resourcelocation = new ResourceLocation(texture); +// event.renderer.modelBipedMain.bipedBody.addChild(model.bipedBody); +// Minecraft.getMinecraft().renderEngine.bindTexture(resourcelocation); +// +// } + @SubscribeEvent public void onKeyInput(InputEvent.KeyInputEvent event) { @@ -66,7 +98,7 @@ public class ClientEventHandler if (event.phase.equals(Phase.START)) return; -// if (!RenderHelper.onTickInGame(mcClient)) + if (!RenderHelper.onTickInGame(mc)) { } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java b/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java index f5450b05..9c1112ff 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java @@ -4,10 +4,7 @@ import net.minecraft.item.ItemBlock; import net.minecraft.world.World; import net.minecraftforge.client.MinecraftForgeClient; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.client.FMLClientHandler; -import net.minecraftforge.fml.client.registry.ClientRegistry; -import net.minecraftforge.fml.client.registry.RenderingRegistry; -import net.minecraftforge.fml.common.FMLCommonHandler; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; import WayofTime.alchemicalWizardry.client.renderer.RitualDivinerRender; @@ -41,9 +38,7 @@ import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazooka import WayofTime.alchemicalWizardry.common.entity.projectile.EntityMeteor; import WayofTime.alchemicalWizardry.common.entity.projectile.EntityParticleBeam; import WayofTime.alchemicalWizardry.common.items.sigil.holding.ScrollHelper; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderAlchemicalCalcinator; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderAltar; -import WayofTime.alchemicalWizardry.common.renderer.block.RenderChemistrySet; +import WayofTime.alchemicalWizardry.common.renderer.block.RenderAlchemicCalcinator; import WayofTime.alchemicalWizardry.common.renderer.block.RenderConduit; import WayofTime.alchemicalWizardry.common.renderer.block.RenderCrystalBelljar; import WayofTime.alchemicalWizardry.common.renderer.block.RenderMasterStone; @@ -54,6 +49,8 @@ import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellEffectBlock import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellEnhancementBlock; import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellModifierBlock; import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellParadigmBlock; +import WayofTime.alchemicalWizardry.common.renderer.block.RenderWritingTable; +import WayofTime.alchemicalWizardry.common.renderer.block.TEAltarRenderer; import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEAlchemicalCalcinatorItemRenderer; import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEAltarItemRenderer; import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEBellJarItemRenderer; @@ -88,10 +85,9 @@ import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBazoo import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBlastProjectile; import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderMeteor; import WayofTime.alchemicalWizardry.common.thread.GAPIChecker; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; @@ -101,6 +97,11 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; +import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.client.registry.ClientRegistry; +import cpw.mods.fml.client.registry.RenderingRegistry; +import cpw.mods.fml.common.FMLCommonHandler; public class ClientProxy extends CommonProxy { @@ -148,19 +149,22 @@ public class ClientProxy extends CommonProxy MinecraftForge.EVENT_BUS.register(new RitualDivinerRender()); - ClientRegistry.bindTileEntitySpecialRenderer(TEAltar.class, new RenderAltar()); + ClientRegistry.bindTileEntitySpecialRenderer(TEAltar.class, new TEAltarRenderer()); ClientRegistry.bindTileEntitySpecialRenderer(TEPedestal.class, new RenderPedestal()); ClientRegistry.bindTileEntitySpecialRenderer(TEPlinth.class, new RenderPlinth()); - ClientRegistry.bindTileEntitySpecialRenderer(TEChemistrySet.class, new RenderChemistrySet()); + ClientRegistry.bindTileEntitySpecialRenderer(TEWritingTable.class, new RenderWritingTable()); ClientRegistry.bindTileEntitySpecialRenderer(TEConduit.class, new RenderConduit()); ClientRegistry.bindTileEntitySpecialRenderer(TESpellEffectBlock.class, new RenderSpellEffectBlock()); ClientRegistry.bindTileEntitySpecialRenderer(TESpellEnhancementBlock.class, new RenderSpellEnhancementBlock()); ClientRegistry.bindTileEntitySpecialRenderer(TESpellParadigmBlock.class, new RenderSpellParadigmBlock()); ClientRegistry.bindTileEntitySpecialRenderer(TESpellModifierBlock.class, new RenderSpellModifierBlock()); ClientRegistry.bindTileEntitySpecialRenderer(TEReagentConduit.class, new RenderReagentConduit()); - ClientRegistry.bindTileEntitySpecialRenderer(TEMasterStone.class, new RenderMasterStone()); - ClientRegistry.bindTileEntitySpecialRenderer(TEAlchemicalCalcinator.class, new RenderAlchemicalCalcinator()); - ClientRegistry.bindTileEntitySpecialRenderer(TEBelljar.class, new RenderCrystalBelljar()); + if (AlchemicalWizardry.displayRitualAnimation) + { + ClientRegistry.bindTileEntitySpecialRenderer(TEMasterStone.class, new RenderMasterStone()); + } + ClientRegistry.bindTileEntitySpecialRenderer(TEAlchemicCalcinator.class, new RenderAlchemicCalcinator()); + ClientRegistry.bindTileEntitySpecialRenderer(TEBellJar.class, new RenderCrystalBelljar()); //Item Renderer stuff MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockConduit), new TEConduitItemRenderer()); @@ -168,7 +172,7 @@ public class ClientProxy extends CommonProxy MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellEnhancement), new TESpellEnhancementBlockItemRenderer()); MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellParadigm), new TESpellParadigmBlockItemRenderer()); MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellModifier), new TESpellModifierBlockItemRenderer()); - MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockAlchemicalCalcinator), new TEAlchemicalCalcinatorItemRenderer()); + MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockAlchemicCalcinator), new TEAlchemicalCalcinatorItemRenderer()); MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockCrystalBelljar), new TEBellJarItemRenderer()); } @@ -179,7 +183,7 @@ public class ClientProxy extends CommonProxy } @Override - public void initRendering() + public void InitRendering() { MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockAltar), new TEAltarItemRenderer()); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/ClientUtils.java b/src/main/java/WayofTime/alchemicalWizardry/client/ClientUtils.java new file mode 100644 index 00000000..b7474db3 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/client/ClientUtils.java @@ -0,0 +1,348 @@ +package WayofTime.alchemicalWizardry.client; + +import static net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON; +import static net.minecraftforge.client.IItemRenderer.ItemRenderType.FIRST_PERSON_MAP; +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.EntityClientPlayerMP; +import net.minecraft.client.entity.EntityPlayerSP; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.renderer.entity.RenderPlayer; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; +import net.minecraft.item.ItemCloth; +import net.minecraft.item.ItemMap; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.storage.MapData; +import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.MinecraftForgeClient; + +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + +public class ClientUtils +{ + public static Minecraft mc = Minecraft.getMinecraft(); + + private static final ResourceLocation RES_MAP_BACKGROUND = new ResourceLocation("textures/map/map_background.png"); + + public static void renderPlayerArmourInPOV(EntityPlayer player, float partialTickTime) + { + GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT); + float f1 = 1.0f;//this.prevEquippedProgress + (this.equippedProgress - this.prevEquippedProgress) * partialTickTime; + EntityClientPlayerMP entityclientplayermp = mc.thePlayer; + float f2 = entityclientplayermp.prevRotationPitch + (entityclientplayermp.rotationPitch - entityclientplayermp.prevRotationPitch) * partialTickTime; +// GL11.glPushMatrix(); + GL11.glRotatef(180 - (entityclientplayermp.prevRotationYaw + (entityclientplayermp.rotationYaw - entityclientplayermp.prevRotationYaw) * partialTickTime), 0.0F, 1.0F, 0.0F); + GL11.glRotatef(-f2, 1.0F, 0.0F, 0.0F); + RenderHelper.enableStandardItemLighting(); +// GL11.glPopMatrix(); + EntityPlayerSP entityplayersp = (EntityPlayerSP)entityclientplayermp; + float f3 = entityplayersp.prevRenderArmPitch + (entityplayersp.renderArmPitch - entityplayersp.prevRenderArmPitch) * partialTickTime; + float f4 = entityplayersp.prevRenderArmYaw + (entityplayersp.renderArmYaw - entityplayersp.prevRenderArmYaw) * partialTickTime; + GL11.glRotatef((entityclientplayermp.rotationPitch - f3) * 0.1F, 1.0F, 0.0F, 0.0F); + GL11.glRotatef((entityclientplayermp.rotationYaw - f4) * 0.1F, 0.0F, 1.0F, 0.0F); + ItemStack itemstack = player.getCurrentEquippedItem(); + + if (itemstack != null && itemstack.getItem() instanceof ItemCloth) + { + GL11.glEnable(GL11.GL_BLEND); + OpenGlHelper.glBlendFunc(770, 771, 1, 0); + } + + int i = mc.theWorld.getLightBrightnessForSkyBlocks(MathHelper.floor_double(entityclientplayermp.posX), MathHelper.floor_double(entityclientplayermp.posY), MathHelper.floor_double(entityclientplayermp.posZ), 0); + int j = i % 65536; + int k = i / 65536; + OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + float f5; + float f6; + float f7; + + if (itemstack != null) + { + int l = itemstack.getItem().getColorFromItemStack(itemstack, 0); + f5 = (float)(l >> 16 & 255) / 255.0F; + f6 = (float)(l >> 8 & 255) / 255.0F; + f7 = (float)(l & 255) / 255.0F; + GL11.glColor4f(f5, f6, f7, 1.0F); + } + else + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + } + + float f8; + float f9; + float f10; + float f13; + Render render; + RenderPlayer renderplayer; + + + if (itemstack != null && itemstack.getItem() instanceof ItemMap) + { + GL11.glPushMatrix(); + f13 = 0.8F; + f5 = entityclientplayermp.getSwingProgress(partialTickTime); + f6 = MathHelper.sin(f5 * (float)Math.PI); + f7 = MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI); + GL11.glTranslatef(-f7 * 0.4F, MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI * 2.0F) * 0.2F, -f6 * 0.2F); + f5 = 1.0F - f2 / 45.0F + 0.1F; + + if (f5 < 0.0F) + { + f5 = 0.0F; + } + + if (f5 > 1.0F) + { + f5 = 1.0F; + } + + f5 = -MathHelper.cos(f5 * (float)Math.PI) * 0.5F + 0.5F; + GL11.glTranslatef(0.0F, 0.0F * f13 - (1.0F - f1) * 1.2F - f5 * 0.5F + 0.04F, -0.9F * f13); + GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(f5 * -85.0F, 0.0F, 0.0F, 1.0F); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + mc.getTextureManager().bindTexture(entityclientplayermp.getLocationSkin()); + + for (int i1 = 0; i1 < 2; ++i1) + { + int j1 = i1 * 2 - 1; + GL11.glPushMatrix(); + GL11.glTranslatef(-0.0F, -0.6F, 1.1F * (float)j1); + GL11.glRotatef((float)(-45 * j1), 1.0F, 0.0F, 0.0F); + GL11.glRotatef(-90.0F, 0.0F, 0.0F, 1.0F); + GL11.glRotatef(59.0F, 0.0F, 0.0F, 1.0F); + GL11.glRotatef((float)(-65 * j1), 0.0F, 1.0F, 0.0F); + render = RenderManager.instance.getEntityRenderObject(mc.thePlayer); + renderplayer = (RenderPlayer)render; + f10 = 1.0F; + GL11.glScalef(f10, f10, f10); + renderFirstPersonArm(renderplayer, mc.thePlayer); + GL11.glPopMatrix(); + } + + f6 = entityclientplayermp.getSwingProgress(partialTickTime); + f7 = MathHelper.sin(f6 * f6 * (float)Math.PI); + f8 = MathHelper.sin(MathHelper.sqrt_float(f6) * (float)Math.PI); + GL11.glRotatef(-f7 * 20.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(-f8 * 20.0F, 0.0F, 0.0F, 1.0F); + GL11.glRotatef(-f8 * 80.0F, 1.0F, 0.0F, 0.0F); + f9 = 0.38F; + GL11.glScalef(f9, f9, f9); + GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); + GL11.glTranslatef(-1.0F, -1.0F, 0.0F); + f10 = 0.015625F; + GL11.glScalef(f10, f10, f10); + mc.getTextureManager().bindTexture(RES_MAP_BACKGROUND); + Tessellator tessellator = Tessellator.instance; + GL11.glNormal3f(0.0F, 0.0F, -1.0F); + tessellator.startDrawingQuads(); + byte b0 = 7; + tessellator.addVertexWithUV((double)(0 - b0), (double)(128 + b0), 0.0D, 0.0D, 1.0D); + tessellator.addVertexWithUV((double)(128 + b0), (double)(128 + b0), 0.0D, 1.0D, 1.0D); + tessellator.addVertexWithUV((double)(128 + b0), (double)(0 - b0), 0.0D, 1.0D, 0.0D); + tessellator.addVertexWithUV((double)(0 - b0), (double)(0 - b0), 0.0D, 0.0D, 0.0D); + tessellator.draw(); + + IItemRenderer custom = MinecraftForgeClient.getItemRenderer(itemstack, FIRST_PERSON_MAP); + MapData mapdata = ((ItemMap)itemstack.getItem()).getMapData(itemstack, mc.theWorld); + + if (custom == null) + { + if (mapdata != null) + { + mc.entityRenderer.getMapItemRenderer().func_148250_a(mapdata, false); + } + } + else + { + custom.renderItem(FIRST_PERSON_MAP, itemstack, mc.thePlayer, mc.getTextureManager(), mapdata); + } + + GL11.glPopMatrix(); + } + else if (itemstack != null) + { + GL11.glPushMatrix(); + f13 = 0.8F; + + if (entityclientplayermp.getItemInUseCount() > 0) + { + EnumAction enumaction = itemstack.getItemUseAction(); + + if (enumaction == EnumAction.eat || enumaction == EnumAction.drink) + { + f6 = (float)entityclientplayermp.getItemInUseCount() - partialTickTime + 1.0F; + f7 = 1.0F - f6 / (float)itemstack.getMaxItemUseDuration(); + f8 = 1.0F - f7; + f8 = f8 * f8 * f8; + f8 = f8 * f8 * f8; + f8 = f8 * f8 * f8; + f9 = 1.0F - f8; + GL11.glTranslatef(0.0F, MathHelper.abs(MathHelper.cos(f6 / 4.0F * (float)Math.PI) * 0.1F) * (float)((double)f7 > 0.2D ? 1 : 0), 0.0F); + GL11.glTranslatef(f9 * 0.6F, -f9 * 0.5F, 0.0F); + GL11.glRotatef(f9 * 90.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(f9 * 10.0F, 1.0F, 0.0F, 0.0F); + GL11.glRotatef(f9 * 30.0F, 0.0F, 0.0F, 1.0F); + } + } + else + { + f5 = entityclientplayermp.getSwingProgress(partialTickTime); + f6 = MathHelper.sin(f5 * (float)Math.PI); + f7 = MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI); + GL11.glTranslatef(-f7 * 0.4F, MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI * 2.0F) * 0.2F, -f6 * 0.2F); + } + + GL11.glTranslatef(0.7F * f13, -0.65F * f13 - (1.0F - f1) * 0.6F, -0.9F * f13); + GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + f5 = entityclientplayermp.getSwingProgress(partialTickTime); + f6 = MathHelper.sin(f5 * f5 * (float)Math.PI); + f7 = MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI); + GL11.glRotatef(-f6 * 20.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(-f7 * 20.0F, 0.0F, 0.0F, 1.0F); + GL11.glRotatef(-f7 * 80.0F, 1.0F, 0.0F, 0.0F); + f8 = 0.4F; + GL11.glScalef(f8, f8, f8); + float f11; + float f12; + + if (entityclientplayermp.getItemInUseCount() > 0) + { + EnumAction enumaction1 = itemstack.getItemUseAction(); + + if (enumaction1 == EnumAction.block) + { + GL11.glTranslatef(-0.5F, 0.2F, 0.0F); + GL11.glRotatef(30.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(-80.0F, 1.0F, 0.0F, 0.0F); + GL11.glRotatef(60.0F, 0.0F, 1.0F, 0.0F); + } + else if (enumaction1 == EnumAction.bow) + { + GL11.glRotatef(-18.0F, 0.0F, 0.0F, 1.0F); + GL11.glRotatef(-12.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(-8.0F, 1.0F, 0.0F, 0.0F); + GL11.glTranslatef(-0.9F, 0.2F, 0.0F); + f10 = (float)itemstack.getMaxItemUseDuration() - ((float)entityclientplayermp.getItemInUseCount() - partialTickTime + 1.0F); + f11 = f10 / 20.0F; + f11 = (f11 * f11 + f11 * 2.0F) / 3.0F; + + if (f11 > 1.0F) + { + f11 = 1.0F; + } + + if (f11 > 0.1F) + { + GL11.glTranslatef(0.0F, MathHelper.sin((f10 - 0.1F) * 1.3F) * 0.01F * (f11 - 0.1F), 0.0F); + } + + GL11.glTranslatef(0.0F, 0.0F, f11 * 0.1F); + GL11.glRotatef(-335.0F, 0.0F, 0.0F, 1.0F); + GL11.glRotatef(-50.0F, 0.0F, 1.0F, 0.0F); + GL11.glTranslatef(0.0F, 0.5F, 0.0F); + f12 = 1.0F + f11 * 0.2F; + GL11.glScalef(1.0F, 1.0F, f12); + GL11.glTranslatef(0.0F, -0.5F, 0.0F); + GL11.glRotatef(50.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(335.0F, 0.0F, 0.0F, 1.0F); + } + } + + if (itemstack.getItem().shouldRotateAroundWhenRendering()) + { + GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F); + } + + if (itemstack.getItem().requiresMultipleRenderPasses()) + { + RenderManager.instance.itemRenderer.renderItem(entityclientplayermp, itemstack, 0, EQUIPPED_FIRST_PERSON); + for (int x = 1; x < itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); x++) + { + int k1 = itemstack.getItem().getColorFromItemStack(itemstack, x); + f10 = (float)(k1 >> 16 & 255) / 255.0F; + f11 = (float)(k1 >> 8 & 255) / 255.0F; + f12 = (float)(k1 & 255) / 255.0F; + GL11.glColor4f(1.0F * f10, 1.0F * f11, 1.0F * f12, 1.0F); + RenderManager.instance.itemRenderer.renderItem(entityclientplayermp, itemstack, x, EQUIPPED_FIRST_PERSON); + } + } + else + { + RenderManager.instance.itemRenderer.renderItem(entityclientplayermp, itemstack, 0, EQUIPPED_FIRST_PERSON); + } + + GL11.glPopMatrix(); + } + else if (!entityclientplayermp.isInvisible()) + { + GL11.glPushMatrix(); + f13 = 0.8F; + f5 = entityclientplayermp.getSwingProgress(partialTickTime); + f6 = MathHelper.sin(f5 * (float)Math.PI); + f7 = MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI); + GL11.glTranslatef(-f7 * 0.3F, MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI * 2.0F) * 0.4F, -f6 * 0.4F); + GL11.glTranslatef(0.8F * f13, -0.75F * f13 - (1.0F - f1) * 0.6F, -0.9F * f13); + GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + f5 = entityclientplayermp.getSwingProgress(partialTickTime); + f6 = MathHelper.sin(f5 * f5 * (float)Math.PI); + f7 = MathHelper.sin(MathHelper.sqrt_float(f5) * (float)Math.PI); + GL11.glRotatef(f7 * 70.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(-f6 * 20.0F, 0.0F, 0.0F, 1.0F); + mc.getTextureManager().bindTexture(entityclientplayermp.getLocationSkin()); + GL11.glTranslatef(-1.0F, 3.6F, 3.5F); + GL11.glRotatef(120.0F, 0.0F, 0.0F, 1.0F); + GL11.glRotatef(200.0F, 1.0F, 0.0F, 0.0F); + GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F); + GL11.glScalef(1.0F, 1.0F, 1.0F); + GL11.glTranslatef(5.6F, 0.0F, 0.0F); + render = RenderManager.instance.getEntityRenderObject(mc.thePlayer); + renderplayer = (RenderPlayer)render; + f10 = 1.0F; + GL11.glScalef(f10, f10, f10); + renderFirstPersonArm(renderplayer, mc.thePlayer); + GL11.glPopMatrix(); + } + + if (itemstack != null && itemstack.getItem() instanceof ItemCloth) + { + GL11.glDisable(GL11.GL_BLEND); + } + + GL11.glDisable(GL12.GL_RESCALE_NORMAL); + RenderHelper.disableStandardItemLighting(); + } + + public static void renderFirstPersonArm(RenderPlayer renderer, EntityPlayer player) + { + float f = 1.0F; + GL11.glColor3f(f, f, f); + + GL11.glPushMatrix(); + ModelRenderer mRenderer = new POVArmourModelWrapper(renderer.modelBipedMain); + renderer.modelBipedMain.onGround = 0.0F; + renderer.modelBipedMain.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, player); + renderer.modelBipedMain.bipedRightArm.render(0.0625F); + + GL11.glPushMatrix(); + mRenderer.rotateAngleX = renderer.modelBipedMain.bipedRightArm.rotateAngleX; + mRenderer.rotateAngleY = renderer.modelBipedMain.bipedRightArm.rotateAngleY; + mRenderer.rotateAngleZ = renderer.modelBipedMain.bipedRightArm.rotateAngleZ; + mRenderer.render(0.0625F); + GL11.glPopMatrix(); + GL11.glPopMatrix(); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/POVArmourModelWrapper.java b/src/main/java/WayofTime/alchemicalWizardry/client/POVArmourModelWrapper.java new file mode 100644 index 00000000..1355fdac --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/client/POVArmourModelWrapper.java @@ -0,0 +1,47 @@ +package WayofTime.alchemicalWizardry.client; + +import org.lwjgl.opengl.GL11; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +@SideOnly(Side.CLIENT) +public class POVArmourModelWrapper extends ModelRenderer +{ + private final ModelRenderer armModel; + private final ResourceLocation resource; + + public POVArmourModelWrapper(ModelBase model) + { + super(model); + ItemStack plateStack = new ItemStack(ModItems.boundPlateFire); + ModelBiped bipedModel = ((BoundArmour)ModItems.boundPlateFire).getArmorModel(Minecraft.getMinecraft().thePlayer, plateStack, 1); + armModel = bipedModel.bipedRightArm; + resource = new ResourceLocation(((BoundArmour)ModItems.boundPlateFire).getArmorTexture(plateStack, Minecraft.getMinecraft().thePlayer, 1, "POV")); + addBox(0, 0, 0, 0, 0, 0); //Adds in a blank box as it's required in certain cases such as rendering arrows in entities + } + + @Override + public void render(float partialTicks) + { + GL11.glPushMatrix(); +// GL11.glTranslated(0.3, -.1, 0); + Minecraft.getMinecraft().renderEngine.bindTexture(resource); + armModel.rotateAngleX = this.rotateAngleX; + armModel.rotateAngleY = this.rotateAngleY; + armModel.rotateAngleZ = this.rotateAngleZ; + armModel.render(partialTicks); + + GL11.glPopMatrix(); + Minecraft.getMinecraft().renderEngine.bindTexture(ClientEventHandler.currentPlayerTexture); + + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGui.java b/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGui.java index 0030115d..f9299dec 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGui.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGui.java @@ -1,15 +1,15 @@ package WayofTime.alchemicalWizardry.client.gui; - -import static WayofTime.alchemicalWizardry.BloodMagicConfiguration.config; +import cpw.mods.fml.client.config.GuiConfig; +import cpw.mods.fml.client.config.IConfigElement; +import net.minecraft.client.gui.GuiScreen; +import net.minecraftforge.common.config.ConfigCategory; +import net.minecraftforge.common.config.ConfigElement; import java.util.ArrayList; import java.util.List; -import net.minecraft.client.gui.GuiScreen; -import net.minecraftforge.common.config.ConfigElement; -import net.minecraftforge.fml.client.config.GuiConfig; -import net.minecraftforge.fml.client.config.IConfigElement; +import static WayofTime.alchemicalWizardry.BloodMagicConfiguration.config; public class ConfigGui extends GuiConfig { @@ -22,16 +22,16 @@ public class ConfigGui extends GuiConfig { List<IConfigElement> list = new ArrayList<IConfigElement>(); // adds sections declared in ConfigHandler. toLowerCase() is used because the configuration class automatically does this, so must we. - list.add(new ConfigElement(config.getCategory("clientsettings".toLowerCase()))); - list.add(new ConfigElement(config.getCategory("dungeon loot chances".toLowerCase()))); - list.add(new ConfigElement(config.getCategory("meteor".toLowerCase()))); - list.add(new ConfigElement(config.getCategory("orecrushing".toLowerCase()))); - list.add(new ConfigElement(config.getCategory("potion id".toLowerCase()))); - list.add(new ConfigElement(config.getCategory("wellofsufferingblacklist".toLowerCase()))); - list.add(new ConfigElement(config.getCategory("wimpysettings".toLowerCase()))); - list.add(new ConfigElement(config.getCategory("ritual blacklist".toLowerCase()))); - list.add(new ConfigElement(config.getCategory("teleposer blacklist".toLowerCase()))); - list.add(new ConfigElement(config.getCategory("demon configs".toLowerCase()))); + list.add(new ConfigElement<ConfigCategory>(config.getCategory("clientsettings".toLowerCase()))); + list.add(new ConfigElement<ConfigCategory>(config.getCategory("dungeon loot chances".toLowerCase()))); + list.add(new ConfigElement<ConfigCategory>(config.getCategory("meteor".toLowerCase()))); + list.add(new ConfigElement<ConfigCategory>(config.getCategory("orecrushing".toLowerCase()))); + list.add(new ConfigElement<ConfigCategory>(config.getCategory("potion id".toLowerCase()))); + list.add(new ConfigElement<ConfigCategory>(config.getCategory("wellofsufferingblacklist".toLowerCase()))); + list.add(new ConfigElement<ConfigCategory>(config.getCategory("wimpysettings".toLowerCase()))); + list.add(new ConfigElement<ConfigCategory>(config.getCategory("ritual blacklist".toLowerCase()))); + list.add(new ConfigElement<ConfigCategory>(config.getCategory("teleposer blacklist".toLowerCase()))); + list.add(new ConfigElement<ConfigCategory>(config.getCategory("demon configs".toLowerCase()))); return list; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGuiFactory.java b/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGuiFactory.java index 6413230c..e4705728 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGuiFactory.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/gui/ConfigGuiFactory.java @@ -1,15 +1,17 @@ package WayofTime.alchemicalWizardry.client.gui; -import java.util.Set; - +import cpw.mods.fml.client.IModGuiFactory; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; -import net.minecraftforge.fml.client.IModGuiFactory; + +import java.util.Set; public class ConfigGuiFactory implements IModGuiFactory { @Override - public void initialize(Minecraft minecraftInstance) {} + public void initialize(Minecraft minecraftInstance) { + + } @Override public Class<? extends GuiScreen> mainConfigGuiClass() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAlchemyRecipeHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAlchemyRecipeHandler.java index c92c0b0f..d06aded2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAlchemyRecipeHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAlchemyRecipeHandler.java @@ -6,7 +6,6 @@ import java.awt.Rectangle; import java.util.ArrayList; import java.util.List; -import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiChemistrySet; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.item.Item; @@ -16,6 +15,7 @@ import net.minecraft.util.StatCollector; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; +import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiWritingTable; import codechicken.nei.ItemList; import codechicken.nei.NEIServerUtils; import codechicken.nei.PositionedStack; @@ -104,7 +104,7 @@ public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler { @Override public Class<? extends GuiContainer> getGuiClass() { - return GuiChemistrySet.class; + return GuiWritingTable.class; } @Override @@ -154,7 +154,7 @@ public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler { @Override public void drawExtras(int id) { CachedAlchemyRecipe cache = (CachedAlchemyRecipe) arecipes.get(id); - Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + cache.lp + "LP", getLPX(cache.lp), 34, 0); + Minecraft.getMinecraft().fontRenderer.drawString("\u00a77" + cache.lp + "LP", getLPX(cache.lp), 34, 0); } public int getLPX(int lp) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAltarRecipeHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAltarRecipeHandler.java index c932f60a..79f216dd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAltarRecipeHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIAltarRecipeHandler.java @@ -30,7 +30,7 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler { // PositionedStack inputItems; PositionedStack output; int tier, lp_amount, consumption, drain; - + public CachedAltarRecipe(AltarRecipe recipe) { // inputItems = new PositionedStack(recipe.input, 38, 2, false); input = new PositionedStack(recipe.requiredItem, 38, 2, false); @@ -40,18 +40,18 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler { consumption = recipe.consumptionRate; drain = recipe.drainRate; } - + @Override public PositionedStack getIngredient() { return input; } - + @Override public PositionedStack getResult() { return output; } } - + @Override public void loadCraftingRecipes(String outputId, Object... results) { if (outputId.equals("alchemicalwizardry.altar") && getClass() == NEIAltarRecipeHandler.class) { @@ -62,7 +62,7 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler { super.loadCraftingRecipes(outputId, results); } } - + @Override public void loadCraftingRecipes(ItemStack result) { for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) { @@ -71,7 +71,7 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler { } } } - + @Override public void loadUsageRecipes(ItemStack ingredient) { for(AltarRecipe recipe: AltarRecipeRegistry.altarRecipes) { @@ -80,7 +80,7 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler { } } } - + //Mouse Position helper public Point getMouse(int width, int height) { Point mousepos = getMousePosition(); @@ -89,7 +89,7 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler { Point relMouse = new Point(mousepos.x - guiLeft, mousepos.y - guiTop); return relMouse; } - + //width helper, getting width normal way hates me on compile public int getGuiWidth(GuiRecipe gui) { try { @@ -104,10 +104,10 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler { } } catch (Exception e) { e.printStackTrace(); - return 0; + return 0; } } - + //height helper, getting height normal way hates me on compile public int getGuiHeight(GuiRecipe gui) { try { @@ -122,17 +122,17 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler { } } catch (Exception e) { e.printStackTrace(); - return 0; + return 0; } } - + @Override public void drawExtras(int id) { CachedAltarRecipe recipe = (CachedAltarRecipe) arecipes.get(id); - Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + StatCollector.translateToLocal("bm.string.tier") + ": " + recipe.tier, 78, 5, 0); - Minecraft.getMinecraft().fontRendererObj.drawString("\u00a77" + "LP: " + recipe.lp_amount, 78, 15, 0); + Minecraft.getMinecraft().fontRenderer.drawString("\u00a77" + StatCollector.translateToLocal("bm.string.tier") + ": " + recipe.tier, 78, 5, 0); + Minecraft.getMinecraft().fontRenderer.drawString("\u00a77" + "LP: " + recipe.lp_amount, 78, 15, 0); } - + @Override public List<String> handleTooltip(GuiRecipe gui, List<String> currenttip, int id) { currenttip = super.handleTooltip(gui, currenttip, id); @@ -144,20 +144,20 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler { currenttip.add(StatCollector.translateToLocal("bm.string.consume") + ": " + recipe.consumption + "LP/t"); currenttip.add(StatCollector.translateToLocal("bm.string.drain") + ": " + recipe.drain + "LP/t"); } - + return currenttip; } - + @Override public String getOverlayIdentifier() { return "altarrecipes"; } - + @Override public void loadTransferRects() { transferRects.add(new RecipeTransferRect(new Rectangle(90, 32, 22, 16), "alchemicalwizardry.altar")); } - + @Override public String getRecipeName() { return " " + StatCollector.translateToLocal("tile.bloodAltar.name"); @@ -167,7 +167,7 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler { public String getGuiTexture() { return new ResourceLocation("alchemicalwizardry", "gui/nei/altar.png").toString(); } - + public static Point getMousePosition() { Dimension size = displaySize(); Dimension res = displayRes(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapedHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapedHandler.java index b32f47cd..98e2b782 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapedHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapedHandler.java @@ -128,7 +128,7 @@ public class NEIBloodOrbShapedHandler extends ShapedRecipeHandler { return new CachedBloodOrbRecipe(width, height, items, recipe.getRecipeOutput()); } - + @Override public void loadTransferRects() { transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18), "crafting")); diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapelessHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapelessHandler.java index ebf7afba..7be1ee25 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapelessHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIBloodOrbShapelessHandler.java @@ -34,7 +34,7 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler { stack.setMaxSize(1); ingredients.add(stack); } else if (o instanceof Integer) { - ArrayList<ItemStack> orbs = new ArrayList<ItemStack>(); + ArrayList<ItemStack> orbs = new ArrayList(); for (Item item : NEIConfig.bloodOrbs) { if (((IBloodOrb) item).getOrbLevel() >= (Integer) o) { orbs.add(new ItemStack(item)); @@ -53,7 +53,7 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler { } } } - + @Override public void loadCraftingRecipes(String outputId, Object... results) { if (outputId.equals("crafting") && getClass() == NEIBloodOrbShapelessHandler.class) { @@ -72,7 +72,7 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler { super.loadCraftingRecipes(outputId, results); } } - + @Override public void loadCraftingRecipes(ItemStack result) { List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList(); @@ -89,7 +89,7 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler { } } } - + @Override public void loadUsageRecipes(ItemStack ingredient) { List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList(); @@ -107,7 +107,7 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler { } } } - + public CachedBloodOrbRecipe forgeShapelessRecipe(ShapelessBloodOrbRecipe recipe) { ArrayList<Object> items = recipe.getInput(); @@ -117,7 +117,7 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler { return new CachedBloodOrbRecipe(items, recipe.getRecipeOutput()); } - + @Override public void loadTransferRects() { transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18), "crafting")); diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIConfig.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIConfig.java index 4fa27786..c1ef8769 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIConfig.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIConfig.java @@ -1,15 +1,14 @@ package WayofTime.alchemicalWizardry.client.nei; - import java.util.ArrayList; import net.minecraft.item.Item; import codechicken.nei.api.API; import codechicken.nei.api.IConfigureNEI; -public class NEIConfig implements IConfigureNEI { +public class NEIConfig implements IConfigureNEI { public static ArrayList<Item> bloodOrbs = new ArrayList<Item>(); - + @Override public void loadConfig() { API.registerRecipeHandler(new NEIAlchemyRecipeHandler()); diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDElement.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDElement.java index da724a81..f3f97f01 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDElement.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDElement.java @@ -29,7 +29,7 @@ public class HUDElement public boolean showDamageOverlay = false; public boolean showItemCount = false; - static RenderItem itemRenderer = Minecraft.getMinecraft().getRenderItem(); + static RenderItem itemRenderer = new RenderItem(); public HUDElement(ItemStack itemStack, int iconW, int iconH, int padW, int value) { @@ -54,8 +54,8 @@ public class HUDElement private void initSize() { - elementH = enableItemName ? Math.max(Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT * 2, iconH) : - Math.max(mc.fontRendererObj.FONT_HEIGHT, iconH); + elementH = enableItemName ? Math.max(Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT * 2, iconH) : + Math.max(mc.fontRenderer.FONT_HEIGHT, iconH); if (itemStack != null) { @@ -65,7 +65,7 @@ public class HUDElement if (showValue) { maxDamage = itemStack.getMaxDamage() + 1; - damage = maxDamage - itemStack.getItemDamage(); + damage = maxDamage - itemStack.getItemDamageForDisplay(); boolean showSpecialValue = true; boolean showValue = false; @@ -88,17 +88,17 @@ public class HUDElement (damage * 100 / maxDamage) + "%"; } - itemDamageW = mc.fontRendererObj.getStringWidth(HUDUtils.stripCtrl(itemDamage)); + itemDamageW = mc.fontRenderer.getStringWidth(HUDUtils.stripCtrl(itemDamage)); elementW = padW + iconW + padW + itemDamageW + offset; if (enableItemName) { itemName = itemStack.getDisplayName(); elementW = padW + iconW + padW + - Math.max(mc.fontRendererObj.getStringWidth(HUDUtils.stripCtrl(itemName)), itemDamageW); + Math.max(mc.fontRenderer.getStringWidth(HUDUtils.stripCtrl(itemName)), itemDamageW); } - itemNameW = mc.fontRendererObj.getStringWidth(HUDUtils.stripCtrl(itemName)); + itemNameW = mc.fontRenderer.getStringWidth(HUDUtils.stripCtrl(itemName)); } } @@ -114,27 +114,27 @@ public class HUDElement boolean toRight = true; if (toRight) { - itemRenderer.func_180450_b(itemStack, x - (iconW + padW), y); - HUDUtils.renderItemOverlayIntoGUI(mc.fontRendererObj, itemStack, x - (iconW + padW), y, showDamageOverlay, showItemCount); + itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), itemStack, x - (iconW + padW), y); + HUDUtils.renderItemOverlayIntoGUI(mc.fontRenderer, itemStack, x - (iconW + padW), y, showDamageOverlay, showItemCount); RenderHelper.disableStandardItemLighting(); GL11.glDisable(32826 /* GL_RESCALE_NORMAL_EXT */); GL11.glDisable(GL11.GL_BLEND); - mc.fontRendererObj.drawString(itemName + "\247r", x - (padW + iconW + padW) - itemNameW, y, 0xffffff); - mc.fontRendererObj.drawString(itemDamage + "\247r", x - (padW + iconW + padW) - itemDamageW, + mc.fontRenderer.drawStringWithShadow(itemName + "\247r", x - (padW + iconW + padW) - itemNameW, y, 0xffffff); + mc.fontRenderer.drawStringWithShadow(itemDamage + "\247r", x - (padW + iconW + padW) - itemDamageW, y + (enableItemName ? elementH / 2 : elementH / 4), 0xffffff); } else { - itemRenderer.func_180450_b(itemStack, x, y); - HUDUtils.renderItemOverlayIntoGUI(mc.fontRendererObj, itemStack, x, y, showDamageOverlay, showItemCount); + itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), itemStack, x, y); + HUDUtils.renderItemOverlayIntoGUI(mc.fontRenderer, itemStack, x, y, showDamageOverlay, showItemCount); RenderHelper.disableStandardItemLighting(); GL11.glDisable(32826 /* GL_RESCALE_NORMAL_EXT */); GL11.glDisable(GL11.GL_BLEND); - mc.fontRendererObj.drawString(itemName + "\247r", x + iconW + padW, y, 0xffffff); - mc.fontRendererObj.drawString(itemDamage + "\247r", x + iconW + padW, + mc.fontRenderer.drawStringWithShadow(itemName + "\247r", x + iconW + padW, y, 0xffffff); + mc.fontRenderer.drawStringWithShadow(itemDamage + "\247r", x + iconW + padW, y + (enableItemName ? elementH / 2 : elementH / 4), 0xffffff); } GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDUtils.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDUtils.java index 957067e6..2c42afea 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDUtils.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/HUDUtils.java @@ -4,13 +4,11 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; - import org.lwjgl.opengl.GL11; /** @@ -171,13 +169,12 @@ public final class HUDUtils { float var7 = 0.00390625F; float var8 = 0.00390625F; - Tessellator tessellator = Tessellator.getInstance(); - WorldRenderer wr = tessellator.getWorldRenderer(); - wr.startDrawingQuads(); - wr.addVertexWithUV((x + 0), (y + height), zLevel, ((u + 0) * var7), ((v + height) * var8)); - wr.addVertexWithUV((x + width), (y + height), zLevel, ((u + width) * var7), ((v + height) * var8)); - wr.addVertexWithUV((x + width), (y + 0), zLevel, ((u + width) * var7), ((v + 0) * var8)); - wr.addVertexWithUV((x + 0), (y + 0), zLevel, ((u + 0) * var7), ((v + 0) * var8)); + Tessellator tessellator = Tessellator.instance; + tessellator.startDrawingQuads(); + tessellator.addVertexWithUV((x + 0), (y + height), zLevel, ((u + 0) * var7), ((v + height) * var8)); + tessellator.addVertexWithUV((x + width), (y + height), zLevel, ((u + width) * var7), ((v + height) * var8)); + tessellator.addVertexWithUV((x + width), (y + 0), zLevel, ((u + width) * var7), ((v + 0) * var8)); + tessellator.addVertexWithUV((x + 0), (y + 0), zLevel, ((u + 0) * var7), ((v + 0) * var8)); tessellator.draw(); } @@ -198,12 +195,12 @@ public final class HUDUtils { if (itemStack.isItemDamaged() && showDamageBar) { - int var11 = (int) Math.round(13.0D - itemStack.getItemDamage() * 13.0D / itemStack.getMaxDamage()); - int var7 = (int) Math.round(255.0D - itemStack.getItemDamage() * 255.0D / itemStack.getMaxDamage()); + int var11 = (int) Math.round(13.0D - itemStack.getItemDamageForDisplay() * 13.0D / itemStack.getMaxDamage()); + int var7 = (int) Math.round(255.0D - itemStack.getItemDamageForDisplay() * 255.0D / itemStack.getMaxDamage()); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glDisable(GL11.GL_TEXTURE_2D); - Tessellator var8 = Tessellator.getInstance(); + Tessellator var8 = Tessellator.instance; int var9 = 255 - var7 << 16 | var7 << 8; int var10 = (255 - var7) / 4 << 16 | 16128; renderQuad(var8, x + 2, y + 13, 13, 2, 0); @@ -229,7 +226,7 @@ public final class HUDUtils String var6 = "" + count; GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); - fontRenderer.drawString(var6, x + 19 - 2 - fontRenderer.getStringWidth(var6), y + 6 + 3, 16777215); + fontRenderer.drawStringWithShadow(var6, x + 19 - 2 - fontRenderer.getStringWidth(var6), y + 6 + 3, 16777215); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_DEPTH_TEST); } @@ -243,13 +240,12 @@ public final class HUDUtils */ public static void renderQuad(Tessellator tessellator, int x, int y, int width, int height, int color) { - WorldRenderer wr = tessellator.getWorldRenderer(); - wr.startDrawingQuads(); -// wr.setColorOpaque_I(color); - wr.addVertex((x + 0), (y + 0), 0.0D); - wr.addVertex((x + 0), (y + height), 0.0D); - wr.addVertex((x + width), (y + height), 0.0D); - wr.addVertex((x + width), (y + 0), 0.0D); + tessellator.startDrawingQuads(); + tessellator.setColorOpaque_I(color); + tessellator.addVertex((x + 0), (y + 0), 0.0D); + tessellator.addVertex((x + 0), (y + height), 0.0D); + tessellator.addVertex((x + width), (y + height), 0.0D); + tessellator.addVertex((x + width), (y + 0), 0.0D); tessellator.draw(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderFakeBlocks.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderFakeBlocks.java index 954edba0..1ddd11d2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderFakeBlocks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderFakeBlocks.java @@ -2,7 +2,7 @@ package WayofTime.alchemicalWizardry.client.renderer; import net.minecraft.block.Block; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; +import net.minecraft.util.IIcon; import net.minecraft.world.World; /* @@ -16,11 +16,10 @@ public class RenderFakeBlocks double maxX = minX + 1; double maxY = minY + 1; double maxZ = minZ + 1; - Tessellator tessellator = Tessellator.getInstance(); - WorldRenderer wr = tessellator.getWorldRenderer(); + Tessellator tessellator = Tessellator.instance; - wr.startDrawingQuads(); -// wr.setColorRGBA(255, 255, 255, 200); + tessellator.startDrawingQuads(); + tessellator.setColorRGBA(255, 255, 255, 200); float texMinU, texMaxU, texMinV, texMaxV; @@ -28,76 +27,80 @@ public class RenderFakeBlocks texMaxU = getMaxU(block, meta, 0); texMinV = getMinV(block, meta, 0); texMaxV = getMaxV(block, meta, 0); - wr.addVertexWithUV(minX, minY, minZ, texMinU, texMinV); - wr.addVertexWithUV(maxX, minY, minZ, texMaxU, texMinV); - wr.addVertexWithUV(maxX, minY, maxZ, texMaxU, texMaxV); - wr.addVertexWithUV(minX, minY, maxZ, texMinU, texMaxV); + tessellator.addVertexWithUV(minX, minY, minZ, texMinU, texMinV); + tessellator.addVertexWithUV(maxX, minY, minZ, texMaxU, texMinV); + tessellator.addVertexWithUV(maxX, minY, maxZ, texMaxU, texMaxV); + tessellator.addVertexWithUV(minX, minY, maxZ, texMinU, texMaxV); texMinU = getMinU(block, meta, 1); texMaxU = getMaxU(block, meta, 1); texMinV = getMinV(block, meta, 1); texMaxV = getMaxV(block, meta, 1); - wr.addVertexWithUV(minX, maxY, maxZ, texMinU, texMaxV); - wr.addVertexWithUV(maxX, maxY, maxZ, texMaxU, texMaxV); - wr.addVertexWithUV(maxX, maxY, minZ, texMaxU, texMinV); - wr.addVertexWithUV(minX, maxY, minZ, texMinU, texMinV); + tessellator.addVertexWithUV(minX, maxY, maxZ, texMinU, texMaxV); + tessellator.addVertexWithUV(maxX, maxY, maxZ, texMaxU, texMaxV); + tessellator.addVertexWithUV(maxX, maxY, minZ, texMaxU, texMinV); + tessellator.addVertexWithUV(minX, maxY, minZ, texMinU, texMinV); texMinU = getMinU(block, meta, 2); texMaxU = getMaxU(block, meta, 2); texMinV = getMinV(block, meta, 2); texMaxV = getMaxV(block, meta, 2); - wr.addVertexWithUV(maxX, minY, minZ, texMinU, texMaxV); - wr.addVertexWithUV(minX, minY, minZ, texMaxU, texMaxV); - wr.addVertexWithUV(minX, maxY, minZ, texMaxU, texMinV); - wr.addVertexWithUV(maxX, maxY, minZ, texMinU, texMinV); + tessellator.addVertexWithUV(maxX, minY, minZ, texMinU, texMaxV); + tessellator.addVertexWithUV(minX, minY, minZ, texMaxU, texMaxV); + tessellator.addVertexWithUV(minX, maxY, minZ, texMaxU, texMinV); + tessellator.addVertexWithUV(maxX, maxY, minZ, texMinU, texMinV); texMinU = getMinU(block, meta, 3); texMaxU = getMaxU(block, meta, 3); texMinV = getMinV(block, meta, 3); texMaxV = getMaxV(block, meta, 3); - wr.addVertexWithUV(minX, minY, maxZ, texMinU, texMaxV); - wr.addVertexWithUV(maxX, minY, maxZ, texMaxU, texMaxV); - wr.addVertexWithUV(maxX, maxY, maxZ, texMaxU, texMinV); - wr.addVertexWithUV(minX, maxY, maxZ, texMinU, texMinV); + tessellator.addVertexWithUV(minX, minY, maxZ, texMinU, texMaxV); + tessellator.addVertexWithUV(maxX, minY, maxZ, texMaxU, texMaxV); + tessellator.addVertexWithUV(maxX, maxY, maxZ, texMaxU, texMinV); + tessellator.addVertexWithUV(minX, maxY, maxZ, texMinU, texMinV); texMinU = getMinU(block, meta, 4); texMaxU = getMaxU(block, meta, 4); texMinV = getMinV(block, meta, 4); texMaxV = getMaxV(block, meta, 4); - wr.addVertexWithUV(minX, minY, minZ, texMinU, texMaxV); - wr.addVertexWithUV(minX, minY, maxZ, texMaxU, texMaxV); - wr.addVertexWithUV(minX, maxY, maxZ, texMaxU, texMinV); - wr.addVertexWithUV(minX, maxY, minZ, texMinU, texMinV); + tessellator.addVertexWithUV(minX, minY, minZ, texMinU, texMaxV); + tessellator.addVertexWithUV(minX, minY, maxZ, texMaxU, texMaxV); + tessellator.addVertexWithUV(minX, maxY, maxZ, texMaxU, texMinV); + tessellator.addVertexWithUV(minX, maxY, minZ, texMinU, texMinV); texMinU = getMinU(block, meta, 5); texMaxU = getMaxU(block, meta, 5); texMinV = getMinV(block, meta, 5); texMaxV = getMaxV(block, meta, 5); - wr.addVertexWithUV(maxX, minY, maxZ, texMinU, texMaxV); - wr.addVertexWithUV(maxX, minY, minZ, texMaxU, texMaxV); - wr.addVertexWithUV(maxX, maxY, minZ, texMaxU, texMinV); - wr.addVertexWithUV(maxX, maxY, maxZ, texMinU, texMinV); + tessellator.addVertexWithUV(maxX, minY, maxZ, texMinU, texMaxV); + tessellator.addVertexWithUV(maxX, minY, minZ, texMaxU, texMaxV); + tessellator.addVertexWithUV(maxX, maxY, minZ, texMaxU, texMinV); + tessellator.addVertexWithUV(maxX, maxY, maxZ, texMinU, texMinV); tessellator.draw(); } private static float getMinU(Block block, int meta, int side) { - return 0; + IIcon icon = block.getIcon(side, meta); + return icon.getMinU(); } private static float getMaxU(Block block, int meta, int side) { - return 256; + IIcon icon = block.getIcon(side, meta); + return icon.getMaxU(); } private static float getMinV(Block block, int meta, int side) { - return 0; + IIcon icon = block.getIcon(side, meta); + return icon.getMinV(); } private static float getMaxV(Block block, int meta, int side) { - return 256; + IIcon icon = block.getIcon(side, meta); + return icon.getMaxV(); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderHelper.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderHelper.java index 7c551e80..964feb72 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RenderHelper.java @@ -7,14 +7,14 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiChat; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; +import net.minecraft.util.IIcon; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; @@ -167,7 +167,7 @@ public class RenderHelper private static List<HUDElement> getHUDElements(Minecraft mc) { - List<HUDElement> elements = new ArrayList<HUDElement>(); + List<HUDElement> elements = new ArrayList(); MovingObjectPosition movingobjectposition = mc.objectMouseOver; World world = mc.theWorld; @@ -179,9 +179,11 @@ public class RenderHelper { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - BlockPos pos = movingobjectposition.func_178782_a(); + int x = movingobjectposition.blockX; + int y = movingobjectposition.blockY; + int z = movingobjectposition.blockZ; - TileEntity tile = world.getTileEntity(pos); + TileEntity tile = world.getTileEntity(x, y, z); if (!(tile instanceof IReagentHandler)) { @@ -190,7 +192,7 @@ public class RenderHelper IReagentHandler relay = (IReagentHandler) tile; - ReagentContainerInfo[] infos = relay.getContainerInfo(movingobjectposition.field_178784_b); + ReagentContainerInfo[] infos = relay.getContainerInfo(ForgeDirection.getOrientation(movingobjectposition.sideHit)); if (infos != null) { @@ -248,13 +250,12 @@ public class RenderHelper { float f = 0.00390625F; float f1 = 0.00390625F; - Tessellator tessellator = Tessellator.getInstance(); - WorldRenderer wr = tessellator.getWorldRenderer(); - wr.startDrawingQuads(); - wr.addVertexWithUV((double)p_73729_1_, p_73729_2_ + p_73729_6_, (double)zLevel, (p_73729_3_ * f), (p_73729_4_ + p_73729_6_) * f1); - wr.addVertexWithUV(p_73729_1_ + p_73729_5_, p_73729_2_ + p_73729_6_, (double)zLevel, (p_73729_3_ + p_73729_5_) * f, (p_73729_4_ + p_73729_6_) * f1); - wr.addVertexWithUV(p_73729_1_ + p_73729_5_, (double)p_73729_2_, (double)zLevel, (p_73729_3_ + p_73729_5_) * f, p_73729_4_ * f1); - wr.addVertexWithUV((double)p_73729_1_, (double)p_73729_2_, (double)zLevel, (double)(p_73729_3_ * f), p_73729_4_ * f1); + Tessellator tessellator = Tessellator.instance; + tessellator.startDrawingQuads(); + tessellator.addVertexWithUV((double)p_73729_1_, p_73729_2_ + p_73729_6_, (double)zLevel, (p_73729_3_ * f), (p_73729_4_ + p_73729_6_) * f1); + tessellator.addVertexWithUV(p_73729_1_ + p_73729_5_, p_73729_2_ + p_73729_6_, (double)zLevel, (p_73729_3_ + p_73729_5_) * f, (p_73729_4_ + p_73729_6_) * f1); + tessellator.addVertexWithUV(p_73729_1_ + p_73729_5_, (double)p_73729_2_, (double)zLevel, (p_73729_3_ + p_73729_5_) * f, p_73729_4_ * f1); + tessellator.addVertexWithUV((double)p_73729_1_, (double)p_73729_2_, (double)zLevel, (double)(p_73729_3_ * f), p_73729_4_ * f1); tessellator.draw(); } @@ -287,6 +288,17 @@ public class RenderHelper GL11.glPopMatrix(); } + + public static void renderIcon(int p_94149_1_, int p_94149_2_, IIcon p_94149_3_, int p_94149_4_, int p_94149_5_) + { + Tessellator tessellator = Tessellator.instance; + tessellator.startDrawingQuads(); + tessellator.addVertexWithUV((double)p_94149_1_, (double)(p_94149_2_ + p_94149_5_), (double)zLevel, (double)p_94149_3_.getMinU(), (double)p_94149_3_.getMaxV()); + tessellator.addVertexWithUV((double)(p_94149_1_ + p_94149_4_), (double)(p_94149_2_ + p_94149_5_), (double)zLevel, (double)p_94149_3_.getMaxU(), (double)p_94149_3_.getMaxV()); + tessellator.addVertexWithUV((double)(p_94149_1_ + p_94149_4_), (double)p_94149_2_, (double)zLevel, (double)p_94149_3_.getMaxU(), (double)p_94149_3_.getMinV()); + tessellator.addVertexWithUV((double)p_94149_1_, (double)p_94149_2_, (double)zLevel, (double)p_94149_3_.getMinU(), (double)p_94149_3_.getMinV()); + tessellator.draw(); + } private static void displayArmorStatus(Minecraft mc) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RitualDivinerRender.java b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RitualDivinerRender.java index 9b877d3f..94b0cfc1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RitualDivinerRender.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/renderer/RitualDivinerRender.java @@ -1,16 +1,7 @@ package WayofTime.alchemicalWizardry.client.renderer; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; -import net.minecraftforge.client.event.RenderWorldLastEvent; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; import WayofTime.alchemicalWizardry.ModBlocks; @@ -20,8 +11,15 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.EntityClientPlayerMP; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; +import net.minecraftforge.client.event.RenderWorldLastEvent; -/** +/* * Created in Scala by Alex-Hawks * Translated and implemented by Arcaratus */ @@ -32,24 +30,22 @@ public class RitualDivinerRender public void render(RenderWorldLastEvent event) { Minecraft minecraft = Minecraft.getMinecraft(); - EntityPlayer player = minecraft.thePlayer; + EntityClientPlayerMP player = minecraft.thePlayer; World world = player.worldObj; if (minecraft.objectMouseOver == null || minecraft.objectMouseOver.typeOfHit != MovingObjectPosition.MovingObjectType.BLOCK) { return; } - - BlockPos pos = minecraft.objectMouseOver.func_178782_a(); - TileEntity tileEntity = world.getTileEntity(pos); + TileEntity tileEntity = world.getTileEntity(minecraft.objectMouseOver.blockX, minecraft.objectMouseOver.blockY, minecraft.objectMouseOver.blockZ); if (!(tileEntity instanceof IMasterRitualStone)) { return; } - Vector3 vec3 = new Vector3(pos.getX(), pos.getY(), pos.getZ()); + Vector3 vec3 = new Vector3(minecraft.objectMouseOver.blockX, minecraft.objectMouseOver.blockY, minecraft.objectMouseOver.blockZ); double posX = player.lastTickPosX + (player.posX - player.lastTickPosX) * event.partialTicks; double posY = player.lastTickPosY + (player.posY - player.lastTickPosY) * event.partialTicks; double posZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * event.partialTicks; @@ -75,7 +71,7 @@ public class RitualDivinerRender double minY = vX.y - posY; double minZ = vX.z - posZ; - if (!world.getBlockState(new BlockPos(vX.x, vX.y, vX.z)).getBlock().isOpaqueCube()) + if (!world.getBlock(vX.x, vX.y, vX.z).isOpaqueCube()) { RenderFakeBlocks.drawFakeBlock(vX, ModBlocks.ritualStone, ritualComponent.getStoneType(), minX, minY, minZ, world); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java index beb46388..10b04848 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java @@ -7,6 +7,8 @@ import java.util.List; import java.util.Map; import java.util.Random; +import WayofTime.alchemicalWizardry.common.achievements.ModAchievements; +import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -22,26 +24,20 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; +import net.minecraft.util.Vec3; import net.minecraftforge.common.ISpecialArmor.ArmorProperties; import net.minecraftforge.event.AnvilUpdateEvent; import net.minecraftforge.event.entity.living.EnderTeleportEvent; import net.minecraftforge.event.entity.living.LivingAttackEvent; +import net.minecraftforge.event.entity.living.LivingDeathEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn; import net.minecraftforge.event.entity.player.EntityInteractEvent; -import net.minecraftforge.fml.client.event.ConfigChangedEvent; -import net.minecraftforge.fml.common.Optional; -import net.minecraftforge.fml.common.eventhandler.Event.Result; -import net.minecraftforge.fml.common.eventhandler.EventPriority; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; -import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.oredict.OreDictionary; +import vazkii.botania.api.internal.IManaBurst; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.BloodMagicConfiguration; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; @@ -49,7 +45,7 @@ import WayofTime.alchemicalWizardry.api.event.TeleposeEvent; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; -import WayofTime.alchemicalWizardry.common.items.BoundBlade; +import WayofTime.alchemicalWizardry.common.items.EnergySword; import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; @@ -57,14 +53,21 @@ import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; import WayofTime.alchemicalWizardry.common.omega.ReagentRegenConfiguration; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; +import cpw.mods.fml.client.event.ConfigChangedEvent; +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.eventhandler.Event.Result; +import cpw.mods.fml.common.eventhandler.EventPriority; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; +import cpw.mods.fml.common.registry.GameRegistry; public class AlchemicalWizardryEventHooks { - public static Map<String, Boolean> playerFlightBuff = new HashMap<String, Boolean>(); - public static List<String> playersWith1Step = new ArrayList<String>(); + public static Map<String, Boolean> playerFlightBuff = new HashMap(); + public static List<String> playersWith1Step = new ArrayList(); - public static Map<Integer, List<CoordAndRange>> respawnMap = new HashMap<Integer, List<CoordAndRange>>(); - public static Map<Integer, List<CoordAndRange>> forceSpawnMap = new HashMap<Integer, List<CoordAndRange>>(); + public static Map<Integer, List<CoordAndRange>> respawnMap = new HashMap(); + public static Map<Integer, List<CoordAndRange>> forceSpawnMap = new HashMap(); public static Random rand = new Random(); @@ -83,7 +86,7 @@ public class AlchemicalWizardryEventHooks parad.onEmptyHandEntityInteract(player, event.target); }else { - if(heldItem.getItem() instanceof BoundBlade) + if(heldItem.getItem() instanceof EnergySword) { parad.onBoundSwordInteractWithEntity(player, event.target); } @@ -114,7 +117,7 @@ public class AlchemicalWizardryEventHooks float prevHp = APISpellHelper.getCurrentAdditionalHP((EntityPlayer)event.entityLiving); if(prevHp > 0) { - float recalculatedAmount = ArmorProperties.applyArmor(player, player.inventory.armorInventory, event.source, event.ammount); + float recalculatedAmount = ArmorProperties.ApplyArmor(player, player.inventory.armorInventory, event.source, event.ammount); if (recalculatedAmount <= 0) return; recalculatedAmount = SpellHelper.applyPotionDamageCalculations(player, event.source, recalculatedAmount); //Recalculated damage @@ -332,7 +335,7 @@ public class AlchemicalWizardryEventHooks String respawnRitual = "AW028SpawnWard"; - int dimension = event.world.provider.getDimensionId(); + int dimension = event.world.provider.dimensionId; if (respawnMap.containsKey(dimension)) { List<CoordAndRange> list = respawnMap.get(dimension); @@ -341,7 +344,7 @@ public class AlchemicalWizardryEventHooks { for (CoordAndRange coords : list) { - TileEntity tile = event.world.getTileEntity(coords.getPos()); + TileEntity tile = event.world.getTileEntity(coords.xCoord, coords.yCoord, coords.zCoord); if (tile instanceof TEMasterStone && ((TEMasterStone) tile).isRunning && ((TEMasterStone) tile).getCurrentRitual().equals(respawnRitual)) { @@ -385,7 +388,7 @@ public class AlchemicalWizardryEventHooks { for (CoordAndRange coords : list) { - TileEntity tile = event.world.getTileEntity(coords.getPos()); + TileEntity tile = event.world.getTileEntity(coords.xCoord, coords.yCoord, coords.zCoord); if (tile instanceof TEMasterStone && ((TEMasterStone) tile).isRunning && ((TEMasterStone) tile).getCurrentRitual().equals(forceSpawnRitual)) { @@ -505,10 +508,10 @@ public class AlchemicalWizardryEventHooks double y = entityLiving.posY; double z = entityLiving.posZ; - BlockPos blockVector = entityLiving.getPosition(); - int xPos = blockVector.getX(); - int yPos = blockVector.getY(); - int zPos = blockVector.getZ(); + Vec3 blockVector = SpellHelper.getEntityBlockVector(entityLiving); + int xPos = (int) (blockVector.xCoord); + int yPos = (int) (blockVector.yCoord); + int zPos = (int) (blockVector.zCoord); if (entityLiving instanceof EntityPlayer) { @@ -589,7 +592,7 @@ public class AlchemicalWizardryEventHooks int posY = (int) Math.round(entity.posY); int posZ = (int) Math.round(entity.posZ - 0.5f); int d0 = (int) ((i + 1) * 2.5); - AxisAlignedBB axisalignedbb = new AxisAlignedBB(posX - 0.5, posY - 0.5, posZ - 0.5, posX + 0.5, posY + 0.5, posZ + 0.5).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(posX - 0.5, posY - 0.5, posZ - 0.5, posX + 0.5, posY + 0.5, posZ + 0.5).expand(d0, d0, d0); List list = event.entityLiving.worldObj.getEntitiesWithinAABB(Entity.class, axisalignedbb); Iterator iterator = list.iterator(); @@ -694,7 +697,7 @@ public class AlchemicalWizardryEventHooks if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionFlameCloak)) { - entityLiving.worldObj.spawnParticle(EnumParticleTypes.FLAME, x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0); + entityLiving.worldObj.spawnParticle("flame", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0); int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFlameCloak).getAmplifier(); double range = i * 0.5; @@ -715,7 +718,7 @@ public class AlchemicalWizardryEventHooks if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionIceCloak)) { if (entityLiving.worldObj.getWorldTime() % 2 == 0) - entityLiving.worldObj.spawnParticle(EnumParticleTypes.REDSTONE, x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0x74, 0xbb, 0xfb); + entityLiving.worldObj.spawnParticle("reddust", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0x74, 0xbb, 0xfb); int r = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionIceCloak).getAmplifier(); int horizRange = r + 1; @@ -729,7 +732,7 @@ public class AlchemicalWizardryEventHooks { for (int j = -vertRange - 1; j <= vertRange - 1; j++) { - SpellHelper.freezeWaterBlock(entityLiving.worldObj, new BlockPos(xPos + i, yPos + j, zPos + k)); + SpellHelper.freezeWaterBlock(entityLiving.worldObj, xPos + i, yPos + j, zPos + k); } } } @@ -738,7 +741,7 @@ public class AlchemicalWizardryEventHooks if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionHeavyHeart)) { - entityLiving.worldObj.spawnParticle(EnumParticleTypes.FLAME, x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0); + entityLiving.worldObj.spawnParticle("flame", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0); int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionHeavyHeart).getAmplifier(); double decrease = 0.025 * (i + 1); @@ -756,7 +759,7 @@ public class AlchemicalWizardryEventHooks if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionFireFuse)) { - entityLiving.worldObj.spawnParticle(EnumParticleTypes.FLAME, x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0); + entityLiving.worldObj.spawnParticle("flame", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0); int r = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFireFuse).getAmplifier(); int radius = r + 1; @@ -788,7 +791,7 @@ public class AlchemicalWizardryEventHooks meta = 0; if (block != null) - if ((block == event.initialBlock || block == event.finalBlock) && (meta == event.initialBlock.getMetaFromState(event.initialState) || meta == event.finalBlock.getMetaFromState(event.finalState) || meta == OreDictionary.WILDCARD_VALUE)) + if (( block == event.initialBlock || block == event.finalBlock) && (meta == event.initialMetadata || meta == event.finalMetadata || meta == OreDictionary.WILDCARD_VALUE)) event.setCanceled(true); // If the block uses shorthand syntax: modid:blockname @@ -798,12 +801,31 @@ public class AlchemicalWizardryEventHooks int meta = 0; if (block != null) - if (( block == event.initialBlock || block == event.finalBlock) && (meta == event.initialBlock.getMetaFromState(event.initialState) || meta == event.finalBlock.getMetaFromState(event.finalState) || meta == OreDictionary.WILDCARD_VALUE)) + if (( block == event.initialBlock || block == event.finalBlock) && (meta == event.initialMetadata || meta == event.finalMetadata || meta == OreDictionary.WILDCARD_VALUE)) event.setCanceled(true); } } } + @SubscribeEvent + public void onEntityDeath(LivingDeathEvent event) + { + EntityLivingBase entityLiving = event.entityLiving; + + if (entityLiving instanceof IDemon && event.source.getEntity() instanceof EntityPlayer) + { + EntityPlayer player = (EntityPlayer) event.source.getEntity(); + + player.addStat(ModAchievements.demonSpawn, 1); + } + if (entityLiving instanceof IHoardDemon && event.source.getEntity() instanceof EntityPlayer) + { + EntityPlayer player = (EntityPlayer) event.source.getEntity(); + + player.addStat(ModAchievements.demons, 1); + } + } + @SubscribeEvent public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) { if (event.modID.equals("AWWayofTime")) { @@ -815,11 +837,11 @@ public class AlchemicalWizardryEventHooks @Optional.Method(modid = "Botania") private boolean isManaBurst(Entity entity) { -// if(entity instanceof IManaBurst) { -// ItemStack lens = ((IManaBurst)entity).getSourceLens(); -// return !(lens.getItemDamage()!=8 && lens.getItemDamage()!=11); -// } -// else + if(entity instanceof IManaBurst) { + ItemStack lens = ((IManaBurst)entity).getSourceLens(); + return !(lens.getItemDamage()!=8 && lens.getItemDamage()!=11); + } + else return false; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryFuelHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryFuelHandler.java index 730ac5cd..5a09d2b2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryFuelHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryFuelHandler.java @@ -1,5 +1,9 @@ package WayofTime.alchemicalWizardry.common; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.items.LavaCrystal; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.common.IFuelHandler; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -7,10 +11,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; -import net.minecraftforge.fml.common.IFuelHandler; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.items.LavaCrystal; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class AlchemicalWizardryFuelHandler implements IFuelHandler { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/ClientToServerPacketHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/ClientToServerPacketHandler.java index 7a5f2fed..077bf2c4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/ClientToServerPacketHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/ClientToServerPacketHandler.java @@ -1,8 +1,8 @@ package WayofTime.alchemicalWizardry.common; -import net.minecraftforge.fml.common.network.NetworkRegistry; -import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; -import net.minecraftforge.fml.relauncher.Side; +import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; +import cpw.mods.fml.relauncher.Side; public class ClientToServerPacketHandler { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java b/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java index 1e9201a8..ee1a7d93 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/CommonProxy.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.common; import net.minecraft.world.World; -import net.minecraftforge.fml.common.registry.EntityRegistry; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; import WayofTime.alchemicalWizardry.common.entity.mob.BookEntityItem; @@ -21,6 +20,10 @@ import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; import WayofTime.alchemicalWizardry.common.entity.projectile.TeleportProjectile; import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile; import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; +import cpw.mods.fml.common.registry.EntityRegistry; +import cpw.mods.fml.common.registry.GameRegistry; public class CommonProxy { @@ -30,16 +33,38 @@ public class CommonProxy // Nothing here as the server doesn't render graphics! } - public void registerPostSideObjects() {} + public void registerPostSideObjects() + { + + } - public void registerEntities() {} + public void registerEntities() + { + } public World getClientWorld() { return null; } - public void registerEvents() {} + public void registerActions() + { + } + + public void registerEvents() + { + } + + public void registerSoundHandler() + { + // Nothing here as this is a server side proxy + } + + public void registerTileEntities() + { + GameRegistry.registerTileEntity(TEAltar.class, "containerAltar"); + GameRegistry.registerTileEntity(TEMasterStone.class, "containerMasterStone"); + } public void registerEntityTrackers() { @@ -63,5 +88,12 @@ public class CommonProxy EntityRegistry.registerModEntity(BookEntityItem.class, "bookEntityItem", 17, AlchemicalWizardry.instance, 120, 3, true); } - public void initRendering() {} + public void registerTickHandlers() + { + } + + public void InitRendering() + { + // TODO Auto-generated method stub + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/CoordAndRange.java b/src/main/java/WayofTime/alchemicalWizardry/common/CoordAndRange.java index a388a048..f4a89a65 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/CoordAndRange.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/CoordAndRange.java @@ -1,7 +1,5 @@ package WayofTime.alchemicalWizardry.common; -import net.minecraft.util.BlockPos; - public class CoordAndRange { public int xCoord; @@ -10,11 +8,6 @@ public class CoordAndRange public int horizRadius; public int vertRadius; - public CoordAndRange(BlockPos pos, int horiz, int vert) - { - this(pos.getX(), pos.getY(), pos.getZ(), horiz, vert); - } - public CoordAndRange(int x, int y, int z, int horiz, int vert) { this.xCoord = x; @@ -23,11 +16,6 @@ public class CoordAndRange this.horizRadius = horiz; this.vertRadius = vert; } - - public BlockPos getPos() - { - return new BlockPos(xCoord, yCoord, zCoord); - } @Override public boolean equals(Object o) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggro.java b/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggro.java index 1396e5ae..2b6fb25a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggro.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/EntityAITargetAggro.java @@ -9,7 +9,7 @@ public class EntityAITargetAggro extends EntityAINearestAttackableTarget public EntityAITargetAggro(EntityDemon par1EntityDemon, Class par2Class, int par3, boolean par4) { - super(par1EntityDemon, par2Class, par4); + super(par1EntityDemon, par2Class, par3, par4); this.theCreature = par1EntityDemon; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/ItemType.java b/src/main/java/WayofTime/alchemicalWizardry/common/ItemType.java index 9ec2079b..e71dabe0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/ItemType.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/ItemType.java @@ -53,7 +53,7 @@ public class ItemType public ItemStack createStack(int count) { ItemStack result = new ItemStack(item, count, meta); - result.setTagCompound(nbtTag); + result.stackTagCompound = nbtTag; return result; } @@ -87,7 +87,7 @@ public class ItemType public static ItemType fromStack(ItemStack stack) { - return new ItemType(stack.getItem(), stack.getItemDamage(), stack.getTagCompound()); + return new ItemType(stack.getItem(), stack.getItemDamage(), stack.stackTagCompound); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/LifeBucketHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/LifeBucketHandler.java index fada6f98..3552f251 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/LifeBucketHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/LifeBucketHandler.java @@ -1,15 +1,14 @@ package WayofTime.alchemicalWizardry.common; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.ModItems; +import cpw.mods.fml.common.eventhandler.Event.Result; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.event.entity.player.FillBucketEvent; -import net.minecraftforge.fml.common.eventhandler.Event.Result; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.ModItems; public class LifeBucketHandler { @@ -29,12 +28,11 @@ public class LifeBucketHandler public ItemStack fillCustomBucket(World world, MovingObjectPosition pos) { - IBlockState state = world.getBlockState(pos.func_178782_a()); - Block block = state.getBlock(); + Block block = world.getBlock(pos.blockX, pos.blockY, pos.blockZ); - if (block != null && (block.equals(ModBlocks.blockLifeEssence)) && block.getMetaFromState(state) == 0) + if (block != null && (block.equals(ModBlocks.blockLifeEssence)) && world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) == 0) { - world.setBlockToAir(pos.func_178782_a()); + world.setBlockToAir(pos.blockX, pos.blockY, pos.blockZ); return new ItemStack(ModItems.bucketLife); } else { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/LifeEssence.java b/src/main/java/WayofTime/alchemicalWizardry/common/LifeEssence.java index fdc69542..1892168e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/LifeEssence.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/LifeEssence.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common; import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; public class LifeEssence extends Fluid { @@ -18,7 +19,7 @@ public class LifeEssence extends Fluid } @Override - public String getLocalizedName() + public String getLocalizedName(FluidStack fluidStack) { return "Life Essence"; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/MessageKeyPressed.java b/src/main/java/WayofTime/alchemicalWizardry/common/MessageKeyPressed.java index 055f91ff..ae4377f8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/MessageKeyPressed.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/MessageKeyPressed.java @@ -3,10 +3,10 @@ package WayofTime.alchemicalWizardry.common; import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.network.simpleimpl.IMessage; -import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; -import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; +import cpw.mods.fml.common.network.simpleimpl.IMessage; +import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; +import cpw.mods.fml.common.network.simpleimpl.MessageContext; public class MessageKeyPressed implements IMessage, IMessageHandler<MessageKeyPressed, IMessage> { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/ModLivingDropsEvent.java b/src/main/java/WayofTime/alchemicalWizardry/common/ModLivingDropsEvent.java index 185c1584..663c52c0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/ModLivingDropsEvent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/ModLivingDropsEvent.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.common; +import WayofTime.alchemicalWizardry.ModItems; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraftforge.event.entity.living.LivingDropsEvent; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import WayofTime.alchemicalWizardry.ModItems; public class ModLivingDropsEvent { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java index f11a4853..5bdc65e4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java @@ -13,19 +13,9 @@ import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.network.Packet; -import net.minecraft.network.PacketBuffer; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.common.network.FMLEmbeddedChannel; -import net.minecraftforge.fml.common.network.FMLIndexedMessageToMessageCodec; -import net.minecraftforge.fml.common.network.FMLOutboundHandler; -import net.minecraftforge.fml.common.network.NetworkRegistry; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.ColourAndCoords; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; @@ -39,7 +29,14 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; -import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; +import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.network.FMLEmbeddedChannel; +import cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec; +import cpw.mods.fml.common.network.FMLOutboundHandler; +import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public enum NewPacketHandler { @@ -98,7 +95,7 @@ public enum NewPacketHandler protected void channelRead0(ChannelHandlerContext ctx, TEAltarMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.pos); + TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z); if (te instanceof TEAltar) { TEAltar altar = (TEAltar) te; @@ -114,11 +111,11 @@ public enum NewPacketHandler protected void channelRead0(ChannelHandlerContext ctx, TEOrientableMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.pos); + TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z); if (te instanceof TEOrientable) { - ((TEOrientable) te).setInputDirection(EnumFacing.getFront(msg.input)); - ((TEOrientable) te).setOutputDirection(EnumFacing.getFront(msg.output)); + ((TEOrientable) te).setInputDirection(ForgeDirection.getOrientation(msg.input)); + ((TEOrientable) te).setOutputDirection(ForgeDirection.getOrientation(msg.output)); } } } @@ -129,7 +126,7 @@ public enum NewPacketHandler protected void channelRead0(ChannelHandlerContext ctx, TEPedestalMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.pos); + TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z); if (te instanceof TEPedestal) { TEPedestal pedestal = (TEPedestal) te; @@ -145,7 +142,7 @@ public enum NewPacketHandler protected void channelRead0(ChannelHandlerContext ctx, TEPlinthMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.pos); + TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z); if (te instanceof TEPlinth) { TEPlinth Plinth = (TEPlinth) te; @@ -161,7 +158,7 @@ public enum NewPacketHandler protected void channelRead0(ChannelHandlerContext ctx, TESocketMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.pos); + TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z); if (te instanceof TESocket) { TESocket Socket = (TESocket) te; @@ -177,7 +174,7 @@ public enum NewPacketHandler protected void channelRead0(ChannelHandlerContext ctx, TETeleposerMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.pos); + TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z); if (te instanceof TETeleposer) { TETeleposer Teleposer = (TETeleposer) te; @@ -193,10 +190,10 @@ public enum NewPacketHandler protected void channelRead0(ChannelHandlerContext ctx, TEWritingTableMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.pos); - if (te instanceof TEChemistrySet) + TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z); + if (te instanceof TEWritingTable) { - TEChemistrySet WritingTable = (TEChemistrySet) te; + TEWritingTable WritingTable = (TEWritingTable) te; WritingTable.handlePacketData(msg.items); } @@ -210,7 +207,7 @@ public enum NewPacketHandler { World world = AlchemicalWizardry.proxy.getClientWorld(); - world.spawnParticle(EnumParticleTypes.func_179342_a(msg.particle), msg.xCoord, msg.yCoord, msg.zCoord, msg.xVel, msg.yVel, msg.zVel); + world.spawnParticle(msg.particle, msg.xCoord, msg.yCoord, msg.zCoord, msg.xVel, msg.yVel, msg.zVel); } } @@ -236,7 +233,7 @@ public enum NewPacketHandler protected void channelRead0(ChannelHandlerContext ctx, TEMasterStoneMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.pos); + TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z); if (te instanceof TEMasterStone) { TEMasterStone masterStone = (TEMasterStone) te; @@ -253,7 +250,7 @@ public enum NewPacketHandler protected void channelRead0(ChannelHandlerContext ctx, TEReagentConduitMessage msg) throws Exception { World world = AlchemicalWizardry.proxy.getClientWorld(); - TileEntity te = world.getTileEntity(msg.pos); + TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z); if (te instanceof TEReagentConduit) { TEReagentConduit reagentConduit = (TEReagentConduit) te; @@ -321,7 +318,9 @@ public enum NewPacketHandler public static class TEAltarMessage extends BMMessage { - BlockPos pos; + int x; + int y; + int z; int[] items; int[] fluids; @@ -330,7 +329,9 @@ public enum NewPacketHandler public static class TEOrientableMessage extends BMMessage { - BlockPos pos; + int x; + int y; + int z; int input; int output; @@ -338,42 +339,52 @@ public enum NewPacketHandler public static class TEPedestalMessage extends BMMessage { - BlockPos pos; + int x; + int y; + int z; int[] items; } public static class TEPlinthMessage extends BMMessage { - BlockPos pos; + int x; + int y; + int z; int[] items; } public static class TESocketMessage extends BMMessage { - BlockPos pos; + int x; + int y; + int z; int[] items; } public static class TETeleposerMessage extends BMMessage { - BlockPos pos; + int x; + int y; + int z; int[] items; } public static class TEWritingTableMessage extends BMMessage { - BlockPos pos; + int x; + int y; + int z; int[] items; } public static class ParticleMessage extends BMMessage { - int particle; + String particle; double xCoord; double yCoord; @@ -393,7 +404,9 @@ public enum NewPacketHandler public static class TEMasterStoneMessage extends BMMessage { - BlockPos pos; + int x; + int y; + int z; String ritual; boolean isRunning; @@ -401,7 +414,9 @@ public enum NewPacketHandler public static class TEReagentConduitMessage extends BMMessage { - BlockPos pos; + int x; + int y; + int z; List<ColourAndCoords> destinationList; } @@ -486,209 +501,231 @@ public enum NewPacketHandler @Override public void encodeInto(ChannelHandlerContext ctx, BMMessage msg, ByteBuf target) throws Exception { - PacketBuffer newBuffer = new PacketBuffer(target); - newBuffer.writeInt(msg.index); + target.writeInt(msg.index); switch (msg.index) { case 0: - newBuffer.writeBlockPos(((TEAltarMessage) msg).pos); + target.writeInt(((TEAltarMessage) msg).x); + target.writeInt(((TEAltarMessage) msg).y); + target.writeInt(((TEAltarMessage) msg).z); - newBuffer.writeBoolean(((TEAltarMessage) msg).items != null); + target.writeBoolean(((TEAltarMessage) msg).items != null); if (((TEAltarMessage) msg).items != null) { int[] items = ((TEAltarMessage) msg).items; for (int j = 0; j < items.length; j++) { int i = items[j]; - newBuffer.writeInt(i); + target.writeInt(i); } } - newBuffer.writeBoolean(((TEAltarMessage) msg).fluids != null); + target.writeBoolean(((TEAltarMessage) msg).fluids != null); if (((TEAltarMessage) msg).fluids != null) { int[] fluids = ((TEAltarMessage) msg).fluids; for (int j = 0; j < fluids.length; j++) { int i = fluids[j]; - newBuffer.writeInt(i); + target.writeInt(i); } } - newBuffer.writeInt(((TEAltarMessage) msg).capacity); + target.writeInt(((TEAltarMessage) msg).capacity); break; case 1: - newBuffer.writeBlockPos(((TEOrientableMessage) msg).pos); + target.writeInt(((TEOrientableMessage) msg).x); + target.writeInt(((TEOrientableMessage) msg).y); + target.writeInt(((TEOrientableMessage) msg).z); - newBuffer.writeInt(((TEOrientableMessage) msg).input); - newBuffer.writeInt(((TEOrientableMessage) msg).output); + target.writeInt(((TEOrientableMessage) msg).input); + target.writeInt(((TEOrientableMessage) msg).output); break; case 2: - newBuffer.writeBlockPos(((TEPedestalMessage) msg).pos); + target.writeInt(((TEPedestalMessage) msg).x); + target.writeInt(((TEPedestalMessage) msg).y); + target.writeInt(((TEPedestalMessage) msg).z); - newBuffer.writeBoolean(((TEPedestalMessage) msg).items != null); + target.writeBoolean(((TEPedestalMessage) msg).items != null); if (((TEPedestalMessage) msg).items != null) { int[] items = ((TEPedestalMessage) msg).items; for (int j = 0; j < items.length; j++) { int i = items[j]; - newBuffer.writeInt(i); + target.writeInt(i); } } break; case 3: - newBuffer.writeBlockPos(((TEPlinthMessage) msg).pos); + target.writeInt(((TEPlinthMessage) msg).x); + target.writeInt(((TEPlinthMessage) msg).y); + target.writeInt(((TEPlinthMessage) msg).z); - newBuffer.writeBoolean(((TEPlinthMessage) msg).items != null); + target.writeBoolean(((TEPlinthMessage) msg).items != null); if (((TEPlinthMessage) msg).items != null) { int[] items = ((TEPlinthMessage) msg).items; for (int j = 0; j < items.length; j++) { int i = items[j]; - newBuffer.writeInt(i); + target.writeInt(i); } } break; case 4: - newBuffer.writeBlockPos(((TESocketMessage) msg).pos); + target.writeInt(((TESocketMessage) msg).x); + target.writeInt(((TESocketMessage) msg).y); + target.writeInt(((TESocketMessage) msg).z); - newBuffer.writeBoolean(((TESocketMessage) msg).items != null); + target.writeBoolean(((TESocketMessage) msg).items != null); if (((TESocketMessage) msg).items != null) { int[] items = ((TESocketMessage) msg).items; for (int j = 0; j < items.length; j++) { int i = items[j]; - newBuffer.writeInt(i); + target.writeInt(i); } } break; case 5: - newBuffer.writeBlockPos(((TETeleposerMessage) msg).pos); + target.writeInt(((TETeleposerMessage) msg).x); + target.writeInt(((TETeleposerMessage) msg).y); + target.writeInt(((TETeleposerMessage) msg).z); - newBuffer.writeBoolean(((TETeleposerMessage) msg).items != null); + target.writeBoolean(((TETeleposerMessage) msg).items != null); if (((TETeleposerMessage) msg).items != null) { int[] items = ((TETeleposerMessage) msg).items; for (int j = 0; j < items.length; j++) { int i = items[j]; - newBuffer.writeInt(i); + target.writeInt(i); } } break; case 6: - newBuffer.writeBlockPos(((TEWritingTableMessage) msg).pos); + target.writeInt(((TEWritingTableMessage) msg).x); + target.writeInt(((TEWritingTableMessage) msg).y); + target.writeInt(((TEWritingTableMessage) msg).z); - newBuffer.writeBoolean(((TEWritingTableMessage) msg).items != null); + target.writeBoolean(((TEWritingTableMessage) msg).items != null); if (((TEWritingTableMessage) msg).items != null) { int[] items = ((TEWritingTableMessage) msg).items; for (int j = 0; j < items.length; j++) { int i = items[j]; - newBuffer.writeInt(i); + target.writeInt(i); } } break; case 7: - newBuffer.writeInt(((ParticleMessage) msg).particle); + String str = ((ParticleMessage) msg).particle; + target.writeInt(str.length()); + for (int i = 0; i < str.length(); i++) + { + target.writeChar(str.charAt(i)); + } - newBuffer.writeDouble(((ParticleMessage) msg).xCoord); - newBuffer.writeDouble(((ParticleMessage) msg).yCoord); - newBuffer.writeDouble(((ParticleMessage) msg).zCoord); + target.writeDouble(((ParticleMessage) msg).xCoord); + target.writeDouble(((ParticleMessage) msg).yCoord); + target.writeDouble(((ParticleMessage) msg).zCoord); - newBuffer.writeDouble(((ParticleMessage) msg).xVel); - newBuffer.writeDouble(((ParticleMessage) msg).yVel); - newBuffer.writeDouble(((ParticleMessage) msg).zVel); + target.writeDouble(((ParticleMessage) msg).xVel); + target.writeDouble(((ParticleMessage) msg).yVel); + target.writeDouble(((ParticleMessage) msg).zVel); break; case 8: - newBuffer.writeDouble(((VelocityMessage) msg).xVel); - newBuffer.writeDouble(((VelocityMessage) msg).yVel); - newBuffer.writeDouble(((VelocityMessage) msg).zVel); + target.writeDouble(((VelocityMessage) msg).xVel); + target.writeDouble(((VelocityMessage) msg).yVel); + target.writeDouble(((VelocityMessage) msg).zVel); break; case 9: - newBuffer.writeBlockPos(((TEMasterStoneMessage) msg).pos); + target.writeInt(((TEMasterStoneMessage) msg).x); + target.writeInt(((TEMasterStoneMessage) msg).y); + target.writeInt(((TEMasterStoneMessage) msg).z); String ritual = ((TEMasterStoneMessage) msg).ritual; - newBuffer.writeInt(ritual.length()); + target.writeInt(ritual.length()); for (int i = 0; i < ritual.length(); i++) { - newBuffer.writeChar(ritual.charAt(i)); + target.writeChar(ritual.charAt(i)); } - newBuffer.writeBoolean(((TEMasterStoneMessage) msg).isRunning); + target.writeBoolean(((TEMasterStoneMessage) msg).isRunning); break; case 10: - newBuffer.writeBlockPos(((TEReagentConduitMessage) msg).pos); + target.writeInt(((TEReagentConduitMessage) msg).x); + target.writeInt(((TEReagentConduitMessage) msg).y); + target.writeInt(((TEReagentConduitMessage) msg).z); List<ColourAndCoords> list = ((TEReagentConduitMessage) msg).destinationList; - newBuffer.writeInt(list.size()); + target.writeInt(list.size()); for (ColourAndCoords colourSet : list) { - newBuffer.writeInt(colourSet.colourRed); - newBuffer.writeInt(colourSet.colourGreen); - newBuffer.writeInt(colourSet.colourBlue); - newBuffer.writeInt(colourSet.colourIntensity); - newBuffer.writeInt(colourSet.xCoord); - newBuffer.writeInt(colourSet.yCoord); - newBuffer.writeInt(colourSet.zCoord); + target.writeInt(colourSet.colourRed); + target.writeInt(colourSet.colourGreen); + target.writeInt(colourSet.colourBlue); + target.writeInt(colourSet.colourIntensity); + target.writeInt(colourSet.xCoord); + target.writeInt(colourSet.yCoord); + target.writeInt(colourSet.zCoord); } break; case 11: - newBuffer.writeInt(((CurrentLPMessage) msg).currentLP); - newBuffer.writeInt(((CurrentLPMessage) msg).maxLP); + target.writeInt(((CurrentLPMessage) msg).currentLP); + target.writeInt(((CurrentLPMessage) msg).maxLP); break; case 12: char[] charSet = ((CurrentReagentBarMessage)msg).reagent.toCharArray(); - newBuffer.writeInt(charSet.length); + target.writeInt(charSet.length); for(char cha : charSet) { - newBuffer.writeChar(cha); + target.writeChar(cha); } - newBuffer.writeFloat(((CurrentReagentBarMessage)msg).currentAR); - newBuffer.writeFloat(((CurrentReagentBarMessage)msg).maxAR); + target.writeFloat(((CurrentReagentBarMessage)msg).currentAR); + target.writeFloat(((CurrentReagentBarMessage)msg).maxAR); break; case 13: - newBuffer.writeFloat(((CurrentAddedHPMessage) msg).currentHP); - newBuffer.writeFloat(((CurrentAddedHPMessage) msg).maxHP); + target.writeFloat(((CurrentAddedHPMessage) msg).currentHP); + target.writeFloat(((CurrentAddedHPMessage) msg).maxHP); break; case 14: System.out.println("Packet is being encoded"); - newBuffer.writeByte(((KeyboardMessage)msg).keyPressed); + target.writeByte(((KeyboardMessage)msg).keyPressed); break; } } @@ -697,14 +734,15 @@ public enum NewPacketHandler @Override public void decodeInto(ChannelHandlerContext ctx, ByteBuf dat, BMMessage msg) { - PacketBuffer newBuffer = new PacketBuffer(dat); - int index = newBuffer.readInt(); + int index = dat.readInt(); switch (index) { case 0: - ((TEAltarMessage) msg).pos = newBuffer.readBlockPos(); - boolean hasStacks = newBuffer.readBoolean(); + ((TEAltarMessage) msg).x = dat.readInt(); + ((TEAltarMessage) msg).y = dat.readInt(); + ((TEAltarMessage) msg).z = dat.readInt(); + boolean hasStacks = dat.readBoolean(); ((TEAltarMessage) msg).items = new int[TEAltar.sizeInv * 3]; if (hasStacks) @@ -712,34 +750,38 @@ public enum NewPacketHandler ((TEAltarMessage) msg).items = new int[TEAltar.sizeInv * 3]; for (int i = 0; i < ((TEAltarMessage) msg).items.length; i++) { - ((TEAltarMessage) msg).items[i] = newBuffer.readInt(); + ((TEAltarMessage) msg).items[i] = dat.readInt(); } } - boolean hasFluids = newBuffer.readBoolean(); + boolean hasFluids = dat.readBoolean(); ((TEAltarMessage) msg).fluids = new int[6]; if (hasFluids) for (int i = 0; i < ((TEAltarMessage) msg).fluids.length; i++) { - ((TEAltarMessage) msg).fluids[i] = newBuffer.readInt(); + ((TEAltarMessage) msg).fluids[i] = dat.readInt(); } - ((TEAltarMessage) msg).capacity = newBuffer.readInt(); + ((TEAltarMessage) msg).capacity = dat.readInt(); break; case 1: - ((TEOrientableMessage) msg).pos = newBuffer.readBlockPos(); + ((TEOrientableMessage) msg).x = dat.readInt(); + ((TEOrientableMessage) msg).y = dat.readInt(); + ((TEOrientableMessage) msg).z = dat.readInt(); - ((TEOrientableMessage) msg).input = newBuffer.readInt(); - ((TEOrientableMessage) msg).output = newBuffer.readInt(); + ((TEOrientableMessage) msg).input = dat.readInt(); + ((TEOrientableMessage) msg).output = dat.readInt(); break; case 2: - ((TEPedestalMessage) msg).pos = newBuffer.readBlockPos(); + ((TEPedestalMessage) msg).x = dat.readInt(); + ((TEPedestalMessage) msg).y = dat.readInt(); + ((TEPedestalMessage) msg).z = dat.readInt(); - boolean hasStacks1 = newBuffer.readBoolean(); + boolean hasStacks1 = dat.readBoolean(); ((TEPedestalMessage) msg).items = new int[TEPedestal.sizeInv * 3]; if (hasStacks1) @@ -747,16 +789,18 @@ public enum NewPacketHandler ((TEPedestalMessage) msg).items = new int[TEPedestal.sizeInv * 3]; for (int i = 0; i < ((TEPedestalMessage) msg).items.length; i++) { - ((TEPedestalMessage) msg).items[i] = newBuffer.readInt(); + ((TEPedestalMessage) msg).items[i] = dat.readInt(); } } break; case 3: - ((TEPlinthMessage) msg).pos = newBuffer.readBlockPos(); + ((TEPlinthMessage) msg).x = dat.readInt(); + ((TEPlinthMessage) msg).y = dat.readInt(); + ((TEPlinthMessage) msg).z = dat.readInt(); - boolean hasStacks2 = newBuffer.readBoolean(); + boolean hasStacks2 = dat.readBoolean(); ((TEPlinthMessage) msg).items = new int[TEPlinth.sizeInv * 3]; if (hasStacks2) @@ -764,16 +808,18 @@ public enum NewPacketHandler ((TEPlinthMessage) msg).items = new int[TEPlinth.sizeInv * 3]; for (int i = 0; i < ((TEPlinthMessage) msg).items.length; i++) { - ((TEPlinthMessage) msg).items[i] = newBuffer.readInt(); + ((TEPlinthMessage) msg).items[i] = dat.readInt(); } } break; case 4: - ((TESocketMessage) msg).pos = newBuffer.readBlockPos(); + ((TESocketMessage) msg).x = dat.readInt(); + ((TESocketMessage) msg).y = dat.readInt(); + ((TESocketMessage) msg).z = dat.readInt(); - boolean hasStacks3 = newBuffer.readBoolean(); + boolean hasStacks3 = dat.readBoolean(); ((TESocketMessage) msg).items = new int[TESocket.sizeInv * 3]; if (hasStacks3) @@ -781,16 +827,18 @@ public enum NewPacketHandler ((TESocketMessage) msg).items = new int[TESocket.sizeInv * 3]; for (int i = 0; i < ((TESocketMessage) msg).items.length; i++) { - ((TESocketMessage) msg).items[i] = newBuffer.readInt(); + ((TESocketMessage) msg).items[i] = dat.readInt(); } } break; case 5: - ((TETeleposerMessage) msg).pos = newBuffer.readBlockPos(); + ((TETeleposerMessage) msg).x = dat.readInt(); + ((TETeleposerMessage) msg).y = dat.readInt(); + ((TETeleposerMessage) msg).z = dat.readInt(); - boolean hasStacks4 = newBuffer.readBoolean(); + boolean hasStacks4 = dat.readBoolean(); ((TETeleposerMessage) msg).items = new int[TETeleposer.sizeInv * 3]; if (hasStacks4) @@ -798,75 +846,89 @@ public enum NewPacketHandler ((TETeleposerMessage) msg).items = new int[TETeleposer.sizeInv * 3]; for (int i = 0; i < ((TETeleposerMessage) msg).items.length; i++) { - ((TETeleposerMessage) msg).items[i] = newBuffer.readInt(); + ((TETeleposerMessage) msg).items[i] = dat.readInt(); } } break; case 6: - ((TEWritingTableMessage) msg).pos = newBuffer.readBlockPos(); + ((TEWritingTableMessage) msg).x = dat.readInt(); + ((TEWritingTableMessage) msg).y = dat.readInt(); + ((TEWritingTableMessage) msg).z = dat.readInt(); - boolean hasStacks5 = newBuffer.readBoolean(); + boolean hasStacks5 = dat.readBoolean(); - ((TEWritingTableMessage) msg).items = new int[TEChemistrySet.sizeInv * 3]; + ((TEWritingTableMessage) msg).items = new int[TEWritingTable.sizeInv * 3]; if (hasStacks5) { - ((TEWritingTableMessage) msg).items = new int[TEChemistrySet.sizeInv * 3]; + ((TEWritingTableMessage) msg).items = new int[TEWritingTable.sizeInv * 3]; for (int i = 0; i < ((TEWritingTableMessage) msg).items.length; i++) { - ((TEWritingTableMessage) msg).items[i] = newBuffer.readInt(); + ((TEWritingTableMessage) msg).items[i] = dat.readInt(); } } break; case 7: - ((ParticleMessage) msg).particle = newBuffer.readInt(); + int size = dat.readInt(); + String str = ""; - ((ParticleMessage) msg).xCoord = newBuffer.readDouble(); - ((ParticleMessage) msg).yCoord = newBuffer.readDouble(); - ((ParticleMessage) msg).zCoord = newBuffer.readDouble(); + for (int i = 0; i < size; i++) + { + str = str + dat.readChar(); + } - ((ParticleMessage) msg).xVel = newBuffer.readDouble(); - ((ParticleMessage) msg).yVel = newBuffer.readDouble(); - ((ParticleMessage) msg).zVel = newBuffer.readDouble(); + ((ParticleMessage) msg).particle = str; + + ((ParticleMessage) msg).xCoord = dat.readDouble(); + ((ParticleMessage) msg).yCoord = dat.readDouble(); + ((ParticleMessage) msg).zCoord = dat.readDouble(); + + ((ParticleMessage) msg).xVel = dat.readDouble(); + ((ParticleMessage) msg).yVel = dat.readDouble(); + ((ParticleMessage) msg).zVel = dat.readDouble(); break; case 8: - ((VelocityMessage) msg).xVel = newBuffer.readDouble(); - ((VelocityMessage) msg).yVel = newBuffer.readDouble(); - ((VelocityMessage) msg).zVel = newBuffer.readDouble(); + ((VelocityMessage) msg).xVel = dat.readDouble(); + ((VelocityMessage) msg).yVel = dat.readDouble(); + ((VelocityMessage) msg).zVel = dat.readDouble(); break; case 9: - ((TEMasterStoneMessage) msg).pos = newBuffer.readBlockPos(); + ((TEMasterStoneMessage) msg).x = dat.readInt(); + ((TEMasterStoneMessage) msg).y = dat.readInt(); + ((TEMasterStoneMessage) msg).z = dat.readInt(); - int ritualStrSize = newBuffer.readInt(); + int ritualStrSize = dat.readInt(); String ritual = ""; for (int i = 0; i < ritualStrSize; i++) { - ritual = ritual + newBuffer.readChar(); + ritual = ritual + dat.readChar(); } ((TEMasterStoneMessage) msg).ritual = ritual; - ((TEMasterStoneMessage) msg).isRunning = newBuffer.readBoolean(); + ((TEMasterStoneMessage) msg).isRunning = dat.readBoolean(); break; case 10: - ((TEReagentConduitMessage) msg).pos = newBuffer.readBlockPos(); - - int listSize = newBuffer.readInt(); + ((TEReagentConduitMessage) msg).x = dat.readInt(); + ((TEReagentConduitMessage) msg).y = dat.readInt(); + ((TEReagentConduitMessage) msg).z = dat.readInt(); + + int listSize = dat.readInt(); List<ColourAndCoords> list = new LinkedList(); for (int i = 0; i < listSize; i++) { - list.add(new ColourAndCoords(newBuffer.readInt(), newBuffer.readInt(), newBuffer.readInt(), newBuffer.readInt(), newBuffer.readInt(), newBuffer.readInt(), newBuffer.readInt())); + list.add(new ColourAndCoords(dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt())); } ((TEReagentConduitMessage) msg).destinationList = list; @@ -874,34 +936,34 @@ public enum NewPacketHandler break; case 11: - ((CurrentLPMessage) msg).currentLP = newBuffer.readInt(); - ((CurrentLPMessage) msg).maxLP = newBuffer.readInt(); + ((CurrentLPMessage) msg).currentLP = dat.readInt(); + ((CurrentLPMessage) msg).maxLP = dat.readInt(); break; case 12: - int size1 = newBuffer.readInt(); + int size1 = dat.readInt(); String str1 = ""; for(int i=0; i<size1; i++) { - str1 = str1 + newBuffer.readChar(); + str1 = str1 + dat.readChar(); } ((CurrentReagentBarMessage) msg).reagent = str1; - ((CurrentReagentBarMessage) msg).currentAR = newBuffer.readFloat(); - ((CurrentReagentBarMessage) msg).maxAR = newBuffer.readFloat(); + ((CurrentReagentBarMessage) msg).currentAR = dat.readFloat(); + ((CurrentReagentBarMessage) msg).maxAR = dat.readFloat(); break; case 13: - ((CurrentAddedHPMessage) msg).currentHP = newBuffer.readFloat(); - ((CurrentAddedHPMessage) msg).maxHP = newBuffer.readFloat(); + ((CurrentAddedHPMessage) msg).currentHP = dat.readFloat(); + ((CurrentAddedHPMessage) msg).maxHP = dat.readFloat(); break; case 14: System.out.println("Packet recieved: being decoded"); - ((KeyboardMessage)msg).keyPressed = newBuffer.readByte(); + ((KeyboardMessage)msg).keyPressed = dat.readByte(); break; } } @@ -912,7 +974,9 @@ public enum NewPacketHandler { TEAltarMessage msg = new TEAltarMessage(); msg.index = 0; - msg.pos = tileAltar.getPos(); + msg.x = tileAltar.xCoord; + msg.y = tileAltar.yCoord; + msg.z = tileAltar.zCoord; msg.items = tileAltar.buildIntDataList(); msg.fluids = tileAltar.buildFluidList(); msg.capacity = tileAltar.getCapacity(); @@ -924,9 +988,11 @@ public enum NewPacketHandler { TEOrientableMessage msg = new TEOrientableMessage(); msg.index = 1; - msg.pos = tileOrientable.getPos(); - msg.input = tileOrientable.getIntForEnumFacing(tileOrientable.getInputDirection()); - msg.output = tileOrientable.getIntForEnumFacing(tileOrientable.getOutputDirection()); + msg.x = tileOrientable.xCoord; + msg.y = tileOrientable.yCoord; + msg.z = tileOrientable.zCoord; + msg.input = tileOrientable.getIntForForgeDirection(tileOrientable.getInputDirection()); + msg.output = tileOrientable.getIntForForgeDirection(tileOrientable.getOutputDirection()); return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg); } @@ -935,7 +1001,9 @@ public enum NewPacketHandler { TEPedestalMessage msg = new TEPedestalMessage(); msg.index = 2; - msg.pos = tilePedestal.getPos(); + msg.x = tilePedestal.xCoord; + msg.y = tilePedestal.yCoord; + msg.z = tilePedestal.zCoord; msg.items = tilePedestal.buildIntDataList(); return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg); @@ -945,7 +1013,9 @@ public enum NewPacketHandler { TEPlinthMessage msg = new TEPlinthMessage(); msg.index = 3; - msg.pos = tilePlinth.getPos(); + msg.x = tilePlinth.xCoord; + msg.y = tilePlinth.yCoord; + msg.z = tilePlinth.zCoord; msg.items = tilePlinth.buildIntDataList(); return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg); @@ -955,7 +1025,9 @@ public enum NewPacketHandler { TESocketMessage msg = new TESocketMessage(); msg.index = 4; - msg.pos = tileSocket.getPos(); + msg.x = tileSocket.xCoord; + msg.y = tileSocket.yCoord; + msg.z = tileSocket.zCoord; msg.items = tileSocket.buildIntDataList(); return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg); @@ -965,27 +1037,31 @@ public enum NewPacketHandler { TETeleposerMessage msg = new TETeleposerMessage(); msg.index = 5; - msg.pos = tileTeleposer.getPos(); + msg.x = tileTeleposer.xCoord; + msg.y = tileTeleposer.yCoord; + msg.z = tileTeleposer.zCoord; msg.items = tileTeleposer.buildIntDataList(); return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg); } - public static Packet getPacket(TEChemistrySet tileWritingTable) + public static Packet getPacket(TEWritingTable tileWritingTable) { TEWritingTableMessage msg = new TEWritingTableMessage(); msg.index = 6; - msg.pos = tileWritingTable.getPos(); + msg.x = tileWritingTable.xCoord; + msg.y = tileWritingTable.yCoord; + msg.z = tileWritingTable.zCoord; msg.items = tileWritingTable.buildIntDataList(); return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg); } - public static Packet getParticlePacket(EnumParticleTypes type, double xCoord, double yCoord, double zCoord, double xVel, double yVel, double zVel) + public static Packet getParticlePacket(String str, double xCoord, double yCoord, double zCoord, double xVel, double yVel, double zVel) { ParticleMessage msg = new ParticleMessage(); msg.index = 7; - msg.particle = type.ordinal(); + msg.particle = str; msg.xCoord = xCoord; msg.yCoord = yCoord; msg.zCoord = zCoord; @@ -1011,7 +1087,9 @@ public enum NewPacketHandler { TEMasterStoneMessage msg = new TEMasterStoneMessage(); msg.index = 9; - msg.pos = tile.getPos(); + msg.x = tile.xCoord; + msg.y = tile.yCoord; + msg.z = tile.zCoord; msg.ritual = tile.getCurrentRitual(); msg.isRunning = tile.isRunning; @@ -1023,7 +1101,9 @@ public enum NewPacketHandler { TEReagentConduitMessage msg = new TEReagentConduitMessage(); msg.index = 10; - msg.pos = tile.getPos(); + msg.x = tile.xCoord; + msg.y = tile.yCoord; + msg.z = tile.zCoord; msg.destinationList = tile.destinationList; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementTrigger.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementTrigger.java index 69e07158..c5f3c932 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementTrigger.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementTrigger.java @@ -1,10 +1,11 @@ package WayofTime.alchemicalWizardry.common.achievements; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.PlayerEvent; import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.stats.Achievement; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.PlayerEvent; public class AchievementTrigger { @@ -32,13 +33,25 @@ public class AchievementTrigger { for (Item item : AchievementsRegistry.craftinglist) { - if (event.crafting != null && event.crafting.getItem() == item) + if (event.crafting != null) { - Achievement achievement = AchievementsRegistry.getAchievementForItem(event.crafting.getItem()); - - if (achievement != null) + if (event.crafting.getItem() == item) { - event.player.addStat(achievement, 1); + Achievement achievement = AchievementsRegistry.getAchievementForItem(event.crafting.getItem()); + + if (achievement != null) + { + event.player.addStat(achievement, 1); + } + } + if (event.crafting.getItem() instanceof ItemBlock) + { + Achievement achievement = AchievementsRegistry.getAchievementForBlock(((ItemBlock) event.crafting.getItem()).field_150939_a); + + if (achievement != null) + { + event.player.addStat(achievement, 1); + } } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsMod.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsMod.java index 9511664d..c499c440 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsMod.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsMod.java @@ -10,7 +10,7 @@ import java.util.List; public class AchievementsMod extends Achievement { - public static List<Achievement> achievements = new ArrayList<Achievement>(); + public static List<Achievement> achievements = new ArrayList(); public AchievementsMod(String name, int x, int y, ItemStack icon, Achievement parent) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsRegistry.java index cd5f27b5..02e15ac6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/AchievementsRegistry.java @@ -1,6 +1,9 @@ package WayofTime.alchemicalWizardry.common.achievements; +import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; +import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; import net.minecraft.item.Item; import net.minecraft.block.Block; import net.minecraft.stats.Achievement; @@ -12,38 +15,90 @@ public class AchievementsRegistry { public final static List<Item> craftinglist = new ArrayList<Item>(); public final static List<Item> pickupList = new ArrayList<Item>(); + public final static List<Block> blockCraftingList = new ArrayList<Block>(); +// public final static List<Block> blockPickupList = new ArrayList<Block>(); public static void init() { addItemsToCraftingList(); + addBlocksToCraftingList(); addItemsToPickupList(); +// addBlocksToPickupList(); } public static void addItemsToCraftingList() { craftinglist.add(ModItems.sacrificialDagger); + craftinglist.add(ModItems.itemBloodPack); + craftinglist.add(ModItems.waterSigil); + craftinglist.add(ModItems.airSigil); + craftinglist.add(ModItems.sigilOfHolding); + craftinglist.add(ModItems.itemRitualDiviner); + craftinglist.add(ModItems.sigilOfTheBridge); + craftinglist.add(ModItems.itemSigilOfSupression); + craftinglist.add(ModItems.energyBazooka); + } + + public static void addBlocksToCraftingList() + { + blockCraftingList.add(ModBlocks.bloodRune); + blockCraftingList.add(ModBlocks.blockWritingTable); + blockCraftingList.add(ModBlocks.blockTeleposer); } public static void addItemsToPickupList() { pickupList.add(ModItems.weakBloodOrb); + pickupList.add(ModItems.apprenticeBloodOrb); + pickupList.add(ModItems.daggerOfSacrifice); + pickupList.add(ModItems.magicianBloodOrb); + pickupList.add(ModItems.energySword); + pickupList.add(ModItems.boundHelmet); + pickupList.add(ModItems.boundPlate); + pickupList.add(ModItems.boundLeggings); + pickupList.add(ModItems.boundBoots); + pickupList.add(ModItems.itemComplexSpellCrystal); + pickupList.add(ModItems.masterBloodOrb); + pickupList.add(ModItems.archmageBloodOrb); + pickupList.add(ModItems.transcendentBloodOrb); + } + + public static void addBlocksToPickupList() + { + } public static Achievement getAchievementForItem(Item item) { - if (item == ModItems.sacrificialDagger) - { - return ModAchievements.firstPrick; - } - if (item == ModItems.weakBloodOrb) - { - return ModAchievements.weakOrb; - } + if (item == ModItems.sacrificialDagger) return ModAchievements.firstPrick; + if (item == ModItems.weakBloodOrb) return ModAchievements.weakOrb; + if (item == ModItems.itemBloodPack) return ModAchievements.bloodLettersPack; + if (item == ModItems.waterSigil) return ModAchievements.waterSigil; + if (item == ModItems.apprenticeBloodOrb) return ModAchievements.apprenticeOrb; + if (item == ModItems.airSigil) return ModAchievements.airSigil; + if (item == ModItems.daggerOfSacrifice) return ModAchievements.daggerOfSacrifice; + if (item == ModItems.magicianBloodOrb) return ModAchievements.magicianOrb; + if (item == ModItems.sigilOfHolding) return ModAchievements.sigilHolding; + if (item == ModItems.energySword) return ModAchievements.boundBlade; + if (item instanceof BoundArmour) return ModAchievements.boundArmor; + if (item == ModItems.itemComplexSpellCrystal) return ModAchievements.complexSpells; + if (item instanceof ItemRitualDiviner) return ModAchievements.ritualDiviner; + if (item == ModItems.masterBloodOrb) return ModAchievements.masterOrb; + if (item == ModItems.sigilOfTheBridge) return ModAchievements.phantomBridgeSigil; + if (item == ModItems.itemSigilOfSupression) return ModAchievements.suppressionSigil; + if (item == ModItems.archmageBloodOrb) return ModAchievements.archmageOrb; + if (item == ModItems.energyBazooka) return ModAchievements.energyBazooka; + if (item == ModItems.transcendentBloodOrb) return ModAchievements.transcendentOrb; + return null; } public static Achievement getAchievementForBlock(Block block) { + if (block == ModBlocks.bloodRune) return ModAchievements.blankRunes; + if (block == ModBlocks.blockWritingTable) return ModAchievements.brewingPotions; + if (block == ModBlocks.blockTeleposer) return ModAchievements.teleposer; + return null; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ICraftAchievement.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ICraftAchievement.java deleted file mode 100644 index 47006462..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ICraftAchievement.java +++ /dev/null @@ -1,11 +0,0 @@ -package WayofTime.alchemicalWizardry.common.achievements; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.stats.Achievement; - -public interface ICraftAchievement -{ - Achievement getAchievementOnCraft(ItemStack stack, EntityPlayer player, IInventory matrix); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/IPickupAchievement.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/IPickupAchievement.java deleted file mode 100644 index 3d2a7351..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/IPickupAchievement.java +++ /dev/null @@ -1,11 +0,0 @@ -package WayofTime.alchemicalWizardry.common.achievements; - -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.stats.Achievement; - -public interface IPickupAchievement -{ - Achievement getAchievementOnPickup(ItemStack stack, EntityPlayer player, EntityItem item); -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ModAchievements.java b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ModAchievements.java index ed4238ed..da29820f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ModAchievements.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/achievements/ModAchievements.java @@ -1,10 +1,11 @@ package WayofTime.alchemicalWizardry.common.achievements; +import WayofTime.alchemicalWizardry.ModBlocks; +import net.minecraft.item.ItemStack; import net.minecraft.stats.Achievement; -import net.minecraft.util.StatCollector; import net.minecraftforge.common.AchievementPage; -import net.minecraftforge.fml.common.FMLCommonHandler; import WayofTime.alchemicalWizardry.ModItems; +import cpw.mods.fml.common.FMLCommonHandler; public class ModAchievements { @@ -12,13 +13,57 @@ public class ModAchievements public static Achievement firstPrick; public static Achievement weakOrb; + public static Achievement bloodLettersPack; + public static Achievement waterSigil; + public static Achievement blankRunes; + public static Achievement apprenticeOrb; + public static Achievement airSigil; + public static Achievement daggerOfSacrifice; + public static Achievement brewingPotions; + public static Achievement magicianOrb; + public static Achievement sigilHolding; + public static Achievement boundBlade; + public static Achievement boundArmor; + public static Achievement complexSpells; + public static Achievement ritualDiviner; + public static Achievement masterOrb; + public static Achievement demonSpawn; + public static Achievement phantomBridgeSigil; + public static Achievement teleposer; + public static Achievement suppressionSigil; + public static Achievement archmageOrb; + public static Achievement energyBazooka; + public static Achievement demons; + public static Achievement transcendentOrb; public static void init() { - firstPrick = new AchievementsMod(StatCollector.translateToLocal("firstPrick"), 0, 0, ModItems.sacrificialDagger, null); - weakOrb = new AchievementsMod(StatCollector.translateToLocal("weakOrb"), 3, 0, ModItems.weakBloodOrb, firstPrick); + firstPrick = new AchievementsMod("firstPrick", 0, 0, ModItems.sacrificialDagger, null).setSpecial(); + weakOrb = new AchievementsMod("weakOrb", 3, 0, ModItems.weakBloodOrb, firstPrick); + bloodLettersPack = new AchievementsMod("bloodLettersPack", 3, 2, ModItems.itemBloodPack, weakOrb); + waterSigil = new AchievementsMod("waterSigil", 6, 2, ModItems.waterSigil, weakOrb); + blankRunes = new AchievementsMod("blankRunes", 4, -2, ModBlocks.bloodRune, weakOrb); + apprenticeOrb = new AchievementsMod("apprenticeOrb", 4, -4, ModItems.apprenticeBloodOrb, blankRunes); + airSigil = new AchievementsMod("airSigil", 6, 1, ModItems.airSigil, apprenticeOrb); + daggerOfSacrifice = new AchievementsMod("daggerSacrifice", 4, -5, ModItems.daggerOfSacrifice, apprenticeOrb); + brewingPotions = new AchievementsMod("brewingPotions", 6, -3, ModBlocks.blockWritingTable, apprenticeOrb); + magicianOrb = new AchievementsMod("magicianOrb", 2, -2, ModItems.magicianBloodOrb, apprenticeOrb); + sigilHolding = new AchievementsMod("sigilHolding", 6, 0, ModItems.sigilOfHolding, magicianOrb); + boundBlade = new AchievementsMod("boundBlade", 0, -2, ModItems.energySword, magicianOrb); + boundArmor = new AchievementsMod("boundArmor", 1, -1, ModItems.boundPlate, magicianOrb); + complexSpells = new AchievementsMod("complexSpells", 1, -4, ModItems.itemComplexSpellCrystal, magicianOrb); + ritualDiviner = new AchievementsMod("ritualDiviner", 1, -3, ModItems.itemRitualDiviner, magicianOrb); + masterOrb = new AchievementsMod("masterOrb", -2, -1, ModItems.masterBloodOrb, boundBlade); + demonSpawn = new AchievementsMod("demonSpawn", -3, -2, ModItems.demonPlacer, masterOrb); + phantomBridgeSigil = new AchievementsMod("phantomBridgeSigil", 6, -1, ModItems.sigilOfTheBridge, masterOrb); + teleposer = new AchievementsMod("teleposer", -4, -1, ModBlocks.blockTeleposer, masterOrb); + suppressionSigil = new AchievementsMod("suppressionSigil", 6, -2, ModItems.itemSigilOfSupression, masterOrb); + archmageOrb = new AchievementsMod("archmageOrb", -1, 2, ModItems.archmageBloodOrb, masterOrb); + energyBazooka = new AchievementsMod("energyBazooka", -3, 2, ModItems.energyBazooka, archmageOrb); + demons = new AchievementsMod("demons", 0, 3, new ItemStack(ModItems.baseItems, 1, 29), archmageOrb).setSpecial(); + transcendentOrb = new AchievementsMod("trancsendentOrb", 0, 5, ModItems.transcendentBloodOrb, demons); - alchemicalWizardryPage = new AchievementPage("AlchemicalWizardry", AchievementsMod.achievements.toArray(new Achievement[AchievementsMod.achievements.size()])); + alchemicalWizardryPage = new AchievementPage("Blood Magic", AchievementsMod.achievements.toArray(new Achievement[AchievementsMod.achievements.size()])); AchievementPage.registerAchievementPage(alchemicalWizardryPage); AchievementsRegistry.init(); FMLCommonHandler.instance().bus().register(new AchievementTrigger()); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionRegistry.java index 0c0c4618..0ac3bf52 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionRegistry.java @@ -11,7 +11,7 @@ import java.util.List; public class CombinedPotionRegistry { - public static List<CombinedPotionComponent> potionList = new ArrayList<CombinedPotionComponent>(); + public static List<CombinedPotionComponent> potionList = new ArrayList(); public static void registerCombinedPotionRecipe(Potion result, Potion pot1, Potion pot2) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockArmourForge.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/ArmourForge.java similarity index 73% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/BlockArmourForge.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/ArmourForge.java index 3a806593..e9f8eee9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockArmourForge.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/ArmourForge.java @@ -7,9 +7,11 @@ import WayofTime.alchemicalWizardry.common.ArmourComponent; import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -17,46 +19,52 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import java.util.ArrayList; import java.util.List; -public class BlockArmourForge extends Block +public class ArmourForge extends Block { - public static List<ArmourComponent> helmetList = new ArrayList<ArmourComponent>(); - public static List<ArmourComponent> plateList = new ArrayList<ArmourComponent>(); - public static List<ArmourComponent> leggingsList = new ArrayList<ArmourComponent>(); - public static List<ArmourComponent> bootsList = new ArrayList<ArmourComponent>(); + public static List<ArmourComponent> helmetList = new ArrayList(); + public static List<ArmourComponent> plateList = new ArrayList(); + public static List<ArmourComponent> leggingsList = new ArrayList(); + public static List<ArmourComponent> bootsList = new ArrayList(); - public BlockArmourForge() + public ArmourForge() { super(Material.iron); setHardness(2.0F); setResistance(5.0F); setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setBlockName("armourForge"); } @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:SoulForge"); + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { if (world.isRemote) { return false; } - int armourType = getArmourType(world, blockPos); + int armourType = getArmourType(world, x, y, z); if (armourType == -1) { return false; } - int direction = getDirectionForArmourType(world, blockPos, armourType); + int direction = getDirectionForArmourType(world, x, y, z, armourType); - if (!isParadigmValid(armourType, direction, world, blockPos)) + if (!isParadigmValid(armourType, direction, world, x, y, z)) { return false; } @@ -68,7 +76,7 @@ public class BlockArmourForge extends Block { case 0: list = plateList; - armourPiece = new ItemStack(ModItems.boundChestplate, 1, 0); + armourPiece = new ItemStack(ModItems.boundPlate, 1, 0); break; case 1: @@ -111,27 +119,27 @@ public class BlockArmourForge extends Block switch (direction) { case 1: - tileEntity = world.getTileEntity(blockPos.add(xOff, 0, -zOff)); + tileEntity = world.getTileEntity(x + xOff, y, z - zOff); break; case 2: - tileEntity = world.getTileEntity(blockPos.add(zOff, 0, xOff)); + tileEntity = world.getTileEntity(x + zOff, y, z + xOff); break; case 3: - tileEntity = world.getTileEntity(blockPos.add(-xOff, 0, zOff)); + tileEntity = world.getTileEntity(x - xOff, y, z + zOff); break; case 4: - tileEntity = world.getTileEntity(blockPos.add(-zOff, 0, -xOff)); + tileEntity = world.getTileEntity(x - zOff, y, z - xOff); break; case 5: - tileEntity = world.getTileEntity(blockPos.add(xOff, zOff, 0)); + tileEntity = world.getTileEntity(x + xOff, y + zOff, z); break; case 6: - tileEntity = world.getTileEntity(blockPos.add(0, zOff, xOff)); + tileEntity = world.getTileEntity(x, y + zOff, z + xOff); break; default: @@ -141,13 +149,15 @@ public class BlockArmourForge extends Block if (tileEntity instanceof TESocket) { ItemStack itemStack = ((TESocket) tileEntity).getStackInSlot(0); - BlockPos tilePos = tileEntity.getPos(); + int xCoord = tileEntity.xCoord; + int yCoord = tileEntity.yCoord; + int zCoord = tileEntity.zCoord; ((TESocket) tileEntity).setInventorySlotContents(0, null); - world.setBlockToAir(tilePos); + world.setBlockToAir(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); for (int i = 0; i < 8; i++) { - SpellHelper.sendIndexedParticleToAllAround(world, tilePos, 20, world.provider.getDimensionId(), 1, tilePos); + SpellHelper.sendIndexedParticleToAllAround(world, xCoord, yCoord, zCoord, 20, world.provider.dimensionId, 1, xCoord, yCoord, zCoord); } if (itemStack != null) @@ -167,19 +177,19 @@ public class BlockArmourForge extends Block { int xOff = (world.rand.nextInt(11) - 5); int zOff = (int) (Math.sqrt(25 - xOff * xOff) * (world.rand.nextInt(2) - 0.5) * 2); - world.addWeatherEffect(new EntityLightningBolt(world, blockPos.getX() + xOff, blockPos.getY() + 5, blockPos.getZ() + zOff)); - world.spawnEntityInWorld(new EntityItem(world, blockPos.getX(), blockPos.getY() + 1, blockPos.getZ(), armourPiece)); + world.addWeatherEffect(new EntityLightningBolt(world, x + xOff, y + 5, z + zOff)); + world.spawnEntityInWorld(new EntityItem(world, x, y + 1, z, armourPiece)); } return true; } //0 for plate, 1 for leggings, 2 for helmet, 3 for boots - public int getArmourType(World world, BlockPos blockPos) + public int getArmourType(World world, int x, int y, int z) { for (int i = 0; i <= 3; i++) { - if (getDirectionForArmourType(world, blockPos, i) != -1) + if (getDirectionForArmourType(world, x, y, z, i) != -1) { return i; } @@ -188,11 +198,11 @@ public class BlockArmourForge extends Block return -1; } - public int getDirectionForArmourType(World world, BlockPos blockPos, int armourType) + public int getDirectionForArmourType(World world, int x, int y, int z, int armourType) { for (int i = 1; i <= 6; i++) { - if (isParadigmValid(armourType, i, world, blockPos)) + if (isParadigmValid(armourType, i, world, x, y, z)) { return i; } @@ -201,7 +211,7 @@ public class BlockArmourForge extends Block return -1; } - public boolean isParadigmValid(int armourType, int direction, World world, BlockPos blockPos) + public boolean isParadigmValid(int armourType, int direction, World world, int x, int y, int z) { List<ArmourComponent> list = null; @@ -237,7 +247,7 @@ public class BlockArmourForge extends Block switch (direction) { case 1: - if (!(world.getTileEntity(blockPos.add(xOff, 0, -zOff)) instanceof TESocket)) + if (!(world.getTileEntity(x + xOff, y, z - zOff) instanceof TESocket)) { return false; } @@ -245,7 +255,7 @@ public class BlockArmourForge extends Block break; case 2: - if (!(world.getTileEntity(blockPos.add(zOff, 0, xOff)) instanceof TESocket)) + if (!(world.getTileEntity(x + zOff, y, z + xOff) instanceof TESocket)) { return false; } @@ -253,7 +263,7 @@ public class BlockArmourForge extends Block break; case 3: - if (!(world.getTileEntity(blockPos.add(-xOff, 0, zOff)) instanceof TESocket)) + if (!(world.getTileEntity(x - xOff, y, z + zOff) instanceof TESocket)) { return false; } @@ -261,7 +271,7 @@ public class BlockArmourForge extends Block break; case 4: - if (!(world.getTileEntity(blockPos.add(-zOff, 0, -xOff)) instanceof TESocket)) + if (!(world.getTileEntity(x - zOff, y, z - xOff) instanceof TESocket)) { return false; } @@ -269,7 +279,7 @@ public class BlockArmourForge extends Block break; case 5: - if (!(world.getTileEntity(blockPos.add(xOff, zOff, 0)) instanceof TESocket)) + if (!(world.getTileEntity(x + xOff, y + zOff, z) instanceof TESocket)) { return false; } @@ -277,7 +287,7 @@ public class BlockArmourForge extends Block break; case 6: - if (!(world.getTileEntity(blockPos.add(0, zOff, xOff)) instanceof TESocket)) + if (!(world.getTileEntity(x, y + zOff, z + xOff) instanceof TESocket)) { return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicalCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicCalcinator.java similarity index 75% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicalCalcinator.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicCalcinator.java index ae0548f9..e9e98e44 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicalCalcinator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicCalcinator.java @@ -1,36 +1,43 @@ package WayofTime.alchemicalWizardry.common.block; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; +import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import java.util.Random; -public class BlockAlchemicalCalcinator extends BlockContainer +public class BlockAlchemicCalcinator extends BlockContainer { - public BlockAlchemicalCalcinator() + public BlockAlchemicCalcinator() { super(Material.rock); setHardness(2.0F); setResistance(5.0F); + this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setBlockName("alchemicCalcinator"); } @Override public TileEntity createNewTileEntity(World world, int meta) { - return new TEAlchemicalCalcinator(); + return new TEAlchemicCalcinator(); + } + + @Override + public boolean renderAsNormalBlock() + { + return false; } @Override @@ -46,7 +53,7 @@ public class BlockAlchemicalCalcinator extends BlockContainer } @Override - public boolean hasTileEntity(IBlockState blockState) + public boolean hasTileEntity() { return true; } @@ -58,16 +65,16 @@ public class BlockAlchemicalCalcinator extends BlockContainer } @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) + public void breakBlock(World world, int x, int y, int z, Block par5, int par6) { - dropItems(world, blockPos); - super.breakBlock(world, blockPos, blockState); + dropItems(world, x, y, z); + super.breakBlock(world, x, y, z, par5, par6); } - private void dropItems(World world, BlockPos blockPos) + private void dropItems(World world, int x, int y, int z) { Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(blockPos); + TileEntity tileEntity = world.getTileEntity(x, y, z); if (!(tileEntity instanceof IInventory)) { @@ -85,7 +92,9 @@ public class BlockAlchemicalCalcinator extends BlockContainer float rx = rand.nextFloat() * 0.8F + 0.1F; float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); + EntityItem entityItem = new EntityItem(world, + x + rx, y + ry, z + rz, + new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { @@ -103,9 +112,9 @@ public class BlockAlchemicalCalcinator extends BlockContainer } @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { - TEAlchemicalCalcinator tileEntity = (TEAlchemicalCalcinator) world.getTileEntity(blockPos); + TEAlchemicCalcinator tileEntity = (TEAlchemicCalcinator) world.getTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { @@ -151,7 +160,7 @@ public class BlockAlchemicalCalcinator extends BlockContainer } } - tileEntity.getWorld().markBlockForUpdate(blockPos); + tileEntity.getWorldObj().markBlockForUpdate(x, y, z); return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAltar.java index 9397611b..1b425496 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAltar.java @@ -2,33 +2,67 @@ package WayofTime.alchemicalWizardry.common.block; import java.util.Random; +import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; +import net.minecraft.util.IIcon; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.api.items.IAltarManipulator; -import WayofTime.alchemicalWizardry.common.items.Orb; +import WayofTime.alchemicalWizardry.common.items.EnergyBattery; import WayofTime.alchemicalWizardry.common.items.sigil.holding.SigilOfHolding; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class BlockAltar extends BlockContainer { + @SideOnly(Side.CLIENT) + private IIcon topIcon; + @SideOnly(Side.CLIENT) + private IIcon sideIcon2; + @SideOnly(Side.CLIENT) + private IIcon bottomIcon; + public BlockAltar() { super(Material.rock); setHardness(2.0F); setResistance(5.0F); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setBlockName("bloodAltar"); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_Top"); + this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_SideType2"); + this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_Bottom"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) + { + switch (side) + { + case 0: + return bottomIcon; + case 1: + return topIcon; + default: + return sideIcon2; + } } @Override @@ -38,17 +72,17 @@ public class BlockAltar extends BlockContainer } @Override - public int getComparatorInputOverride(World world, BlockPos blockPos) + public int getComparatorInputOverride(World world, int x, int y, int z, int meta) { - TileEntity tile = world.getTileEntity(blockPos); + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof TEAltar) { ItemStack stack = ((TEAltar) tile).getStackInSlot(0); - if (stack != null && stack.getItem() instanceof Orb) + if (stack != null && stack.getItem() instanceof EnergyBattery) { - Orb bloodOrb = (Orb) stack.getItem(); + EnergyBattery bloodOrb = (EnergyBattery) stack.getItem(); int maxEssence = bloodOrb.getMaxEssence(); int currentEssence = bloodOrb.getCurrentEssence(stack); int level = currentEssence * 15 / maxEssence; @@ -60,9 +94,9 @@ public class BlockAltar extends BlockContainer } @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { - TEAltar tileEntity = (TEAltar) world.getTileEntity(blockPos); + TEAltar tileEntity = (TEAltar) world.getTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { @@ -77,7 +111,7 @@ public class BlockAltar extends BlockContainer { if (player.worldObj.isRemote) { - world.markBlockForUpdate(blockPos); + world.markBlockForUpdate(x, y, z); } else { tileEntity.sendChatInfoToPlayer(player); @@ -88,7 +122,7 @@ public class BlockAltar extends BlockContainer { if (player.worldObj.isRemote) { - world.markBlockForUpdate(blockPos); + world.markBlockForUpdate(x, y, z); } else { tileEntity.sendMoreChatInfoToPlayer(player); @@ -107,7 +141,7 @@ public class BlockAltar extends BlockContainer { if (player.worldObj.isRemote) { - world.markBlockForUpdate(blockPos); + world.markBlockForUpdate(x, y, z); } else { tileEntity.sendChatInfoToPlayer(player); @@ -118,7 +152,7 @@ public class BlockAltar extends BlockContainer { if (player.worldObj.isRemote) { - world.markBlockForUpdate(blockPos); + world.markBlockForUpdate(x, y, z); } else { tileEntity.sendMoreChatInfoToPlayer(player); @@ -142,21 +176,21 @@ public class BlockAltar extends BlockContainer tileEntity.setInventorySlotContents(0, null); tileEntity.setActive(); } - world.markBlockForUpdate(blockPos); + world.markBlockForUpdate(x, y, z); return true; } @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) + public void breakBlock(World world, int x, int y, int z, Block par5, int par6) { - dropItems(world, blockPos); - super.breakBlock(world, blockPos, blockState); + dropItems(world, x, y, z); + super.breakBlock(world, x, y, z, par5, par6); } - private void dropItems(World world, BlockPos blockPos) + private void dropItems(World world, int x, int y, int z) { Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(blockPos); + TileEntity tileEntity = world.getTileEntity(x, y, z); if (!(tileEntity instanceof IInventory)) { @@ -174,7 +208,9 @@ public class BlockAltar extends BlockContainer float rx = rand.nextFloat() * 0.8F + 0.1F; float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); + EntityItem entityItem = new EntityItem(world, + x + rx, y + ry, z + rz, + new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { @@ -191,6 +227,12 @@ public class BlockAltar extends BlockContainer } } + @Override + public boolean renderAsNormalBlock() + { + return false; + } + @Override public int getRenderType() { @@ -204,16 +246,15 @@ public class BlockAltar extends BlockContainer } @Override - public boolean hasTileEntity(IBlockState blockState) + public boolean hasTileEntity() { return true; } @Override - @SideOnly(Side.CLIENT) - public void randomDisplayTick(World world, BlockPos blockPos, IBlockState blockState, Random rand) + public void randomDisplayTick(World world, int x, int y, int z, Random rand) { - TEAltar tileEntity = (TEAltar) world.getTileEntity(blockPos); + TEAltar tileEntity = (TEAltar) world.getTileEntity(x, y, z); if (!tileEntity.isActive()) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java index 6ed3c8c0..e04354f3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java @@ -5,7 +5,6 @@ import java.util.List; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -14,16 +13,15 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class BlockBelljar extends BlockContainer { @@ -32,9 +30,11 @@ public class BlockBelljar extends BlockContainer super(Material.glass); setHardness(2.0F); setResistance(5.0F); + this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setBlockName("crystalBelljar"); } - @Override + @SideOnly(Side.CLIENT) public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { @@ -73,16 +73,16 @@ public class BlockBelljar extends BlockContainer } @Override - public void onBlockPlacedBy(World world, BlockPos blockPos, IBlockState blockState, EntityLivingBase entityLiving, ItemStack stack) + public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLiving, ItemStack stack) { - TileEntity tile = world.getTileEntity(blockPos); + TileEntity tile = world.getTileEntity(x, y, z); - if (tile instanceof TEBelljar) + if (tile instanceof TEBellJar) { NBTTagCompound tag = stack.getTagCompound(); if (tag != null) { - ((TEBelljar) tile).readTankNBTOnPlace(tag); + ((TEBellJar) tile).readTankNBTOnPlace(tag); } } } @@ -90,7 +90,13 @@ public class BlockBelljar extends BlockContainer @Override public TileEntity createNewTileEntity(World world, int meta) { - return new TEBelljar(); + return new TEBellJar(); + } + + @Override + public boolean renderAsNormalBlock() + { + return false; } @Override @@ -106,7 +112,7 @@ public class BlockBelljar extends BlockContainer } @Override - public boolean hasTileEntity(IBlockState blockState) + public boolean hasTileEntity() { return true; } @@ -118,35 +124,35 @@ public class BlockBelljar extends BlockContainer } @Override - public int getComparatorInputOverride(World world, BlockPos blockPos) + public int getComparatorInputOverride(World world, int x, int y, int z, int meta) { - TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TEBelljar) + TileEntity tile = world.getTileEntity(x, y, z); + if (tile instanceof TEBellJar) { - return ((TEBelljar) tile).getRSPowerOutput(); + return ((TEBellJar) tile).getRSPowerOutput(); } return 15; } @Override - public void onBlockHarvested(World world, BlockPos blockPos, IBlockState blockState, EntityPlayer player) + public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player) { - this.dropBlockAsItem(world, blockPos, blockState, 0); - super.onBlockHarvested(world, blockPos, blockState, player); + this.dropBlockAsItem(world, x, y, z, meta, 0); + super.onBlockHarvested(world, x, y, z, meta, player); } @Override - public ArrayList<ItemStack> getDrops(IBlockAccess world, BlockPos blockPos, IBlockState blockState, int fortune) + public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) { - ArrayList<ItemStack> list = new ArrayList<ItemStack>(); + ArrayList<ItemStack> list = new ArrayList(); - TileEntity tile = world.getTileEntity(blockPos); + TileEntity tile = world.getTileEntity(x, y, z); - if (tile instanceof TEBelljar) + if (tile instanceof TEBellJar) { ItemStack drop = new ItemStack(this); NBTTagCompound tag = new NBTTagCompound(); - ((TEBelljar) tile).writeTankNBT(tag); + ((TEBellJar) tile).writeTankNBT(tag); drop.setTagCompound(tag); list.add(drop); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodLightSource.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodLightSource.java index 827fd08e..4b0dfb9a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodLightSource.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodLightSource.java @@ -1,12 +1,12 @@ package WayofTime.alchemicalWizardry.common.block; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -18,10 +18,18 @@ public class BlockBloodLightSource extends Block public BlockBloodLightSource() { super(Material.cloth); + this.setBlockName("blockBloodLightSource"); } @Override - public int getLightValue(IBlockAccess world, BlockPos blockPos) + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:BlockBloodLight"); + } + + @Override + public int getLightValue(IBlockAccess world, int x, int y, int z) { return 15; } @@ -33,7 +41,13 @@ public class BlockBloodLightSource extends Block } @Override - public void randomDisplayTick(World world, BlockPos blockPos, IBlockState blockState, Random rand) + public boolean renderAsNormalBlock() + { + return false; + } + + @Override + public void randomDisplayTick(World world, int x, int y, int z, Random rand) { if (rand.nextInt(3) != 0) { @@ -41,12 +55,13 @@ public class BlockBloodLightSource extends Block float f1 = f * 0.6F + 0.4F; float f2 = f * f * 0.7F - 0.5F; float f3 = f * f * 0.6F - 0.7F; - world.spawnParticle(EnumParticleTypes.REDSTONE, blockPos.getX() + 0.5D + rand.nextGaussian() / 8, blockPos.getY() + 0.5D, blockPos.getZ() + 0.5D + rand.nextGaussian() / 8, f1, f2, f3); + world.spawnParticle("reddust", x + 0.5D + rand.nextGaussian() / 8, y + 0.5D, z + 0.5D + rand.nextGaussian() / 8, f1, f2, f3); } } @Override - public void addCollisionBoxesToList(World par1World, BlockPos blockPos, IBlockState blockState, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity) + + public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity) { this.setBlockBounds(0.40F, 0.40F, 0.40F, 0.60F, 0.60F, 0.60F); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodRune.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodRune.java deleted file mode 100644 index 7bf74a8d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodRune.java +++ /dev/null @@ -1,101 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.properties.IProperty; -import net.minecraft.block.properties.PropertyInteger; -import net.minecraft.block.state.BlockState; -import net.minecraft.block.state.IBlockState; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.ModBlocks; - -public class BlockBloodRune extends Block -{ - public static final PropertyInteger INTEGER = PropertyInteger.create("rune", 0, 5); - - public BlockBloodRune() - { - super(Material.iron); - this.setDefaultState(this.blockState.getBaseState().withProperty(INTEGER, Integer.valueOf(0))); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - protected BlockState createBlockState() - { - return new BlockState(this, new IProperty[] {INTEGER}); - } - - @Override - public IBlockState getStateFromMeta(int meta) - { - return this.getDefaultState().withProperty(INTEGER, Integer.valueOf(meta)); - } - - @Override - public int getMetaFromState(IBlockState state) - { - return ((Integer)state.getValue(INTEGER)).intValue(); - } - - public int getRuneEffect(int metaData) - { - switch (metaData) - { - case 0: - return 0; - - case 1: //Altar Capacity rune - return 5; - - case 2: //Filling/emptying rune - return 6; - - case 3: //Orb Capacity rune - return 7; - - case 4: //Better Capacity rune - return 8; - - case 5: //Acceleration rune - return 9; - } - - return 0; - } - - @Override - @SideOnly(Side.CLIENT) - - /** - * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) - */ - public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) - { - if (this.equals(ModBlocks.bloodRune)) - { - par3List.add(new ItemStack(par1, 1, 0)); - par3List.add(new ItemStack(par1, 1, 1)); - par3List.add(new ItemStack(par1, 1, 2)); - par3List.add(new ItemStack(par1, 1, 3)); - par3List.add(new ItemStack(par1, 1, 4)); - par3List.add(new ItemStack(par1, 1, 5)); - } else - { - super.getSubBlocks(par1, par2CreativeTabs, par3List); - } - } - - @Override - public int damageDropped(IBlockState blockState) - { - return blockState.getBlock().damageDropped(blockState); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodStoneBrick.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodStoneBrick.java deleted file mode 100644 index dea4dc65..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBloodStoneBrick.java +++ /dev/null @@ -1,14 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; - -public class BlockBloodStoneBrick extends Block -{ - public BlockBloodStoneBrick() - { - super(Material.iron); - setHardness(2.0F); - setResistance(5.0F); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockConduit.java index 0974291e..8be5b305 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockConduit.java @@ -1,24 +1,61 @@ package WayofTime.alchemicalWizardry.common.block; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; -import net.minecraft.block.state.IBlockState; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; +import net.minecraft.util.IIcon; import net.minecraft.world.World; public class BlockConduit extends BlockOrientable { + @SideOnly(Side.CLIENT) + private IIcon topIcon; + @SideOnly(Side.CLIENT) + private IIcon sideIcon2; + @SideOnly(Side.CLIENT) + private IIcon bottomIcon; + public BlockConduit() { super(); setHardness(2.0F); setResistance(5.0F); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setBlockName("blockConduit"); } @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) { - super.breakBlock(world, blockPos, blockState); + this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_Top"); + this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_SideType2"); + this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_Bottom"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) + { + switch (side) + { + case 0: + return bottomIcon; + case 1: + return topIcon; + default: + return sideIcon2; + } + } + + @Override + public void breakBlock(World world, int x, int y, int z, Block par5, int par6) + { + super.breakBlock(world, x, y, z, par5, par6); } @Override @@ -27,6 +64,12 @@ public class BlockConduit extends BlockOrientable return new TEConduit(); } + @Override + public boolean renderAsNormalBlock() + { + return false; + } + @Override public int getRenderType() { @@ -40,7 +83,7 @@ public class BlockConduit extends BlockOrientable } @Override - public boolean hasTileEntity(IBlockState blockState) + public boolean hasTileEntity() { return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockIncenseCrucible.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrucible.java similarity index 59% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/BlockIncenseCrucible.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrucible.java index d12a848c..195375ed 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockIncenseCrucible.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrucible.java @@ -2,36 +2,48 @@ package WayofTime.alchemicalWizardry.common.block; import java.util.Random; +import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; +import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.sacrifice.IIncense; import WayofTime.alchemicalWizardry.common.tileEntity.TECrucible; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; -public class BlockIncenseCrucible extends BlockContainer +public class BlockCrucible extends BlockContainer { - public BlockIncenseCrucible() + @SideOnly(Side.CLIENT) + private IIcon topIcon; + @SideOnly(Side.CLIENT) + private IIcon sideIcon; + @SideOnly(Side.CLIENT) + private IIcon bottomIcon; + + public BlockCrucible() { super(Material.anvil); this.setHardness(2.0f); this.setResistance(1.5f); + this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setBlockName("blockCrucible"); this.setBlockBounds(0.3125F, 0.0F, 0.3125F, 0.6875F, 0.625F, 0.6875F); } @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { - TECrucible tileEntity = (TECrucible) world.getTileEntity(blockPos); + TECrucible tileEntity = (TECrucible) world.getTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { @@ -51,10 +63,34 @@ public class BlockIncenseCrucible extends BlockContainer // player.inventory.addItemStackToInventory(tileEntity.getStackInSlot(0)); // tileEntity.setInventorySlotContents(0, null); } - world.markBlockForUpdate(blockPos); + world.markBlockForUpdate(x, y, z); return true; } + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:Crucible_Top"); + this.sideIcon = iconRegister.registerIcon("AlchemicalWizardry:Crucible_Side"); + this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:Crucible_Bottom"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) + { + switch (side) + { + case 0: + return bottomIcon; + case 1: + return topIcon; + default: + return sideIcon; + } + } + // @Override // public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) // { @@ -62,7 +98,7 @@ public class BlockIncenseCrucible extends BlockContainer // } @Override - public void setBlockBoundsBasedOnState(IBlockAccess world, BlockPos blockPos) + public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) { this.setBlockBounds(0.3125F, 0.0F, 0.3125F, 0.6875F, 0.625F, 0.6875F); } @@ -72,6 +108,12 @@ public class BlockIncenseCrucible extends BlockContainer { return false; } + + @Override + public boolean renderAsNormalBlock() + { + return false; + } @Override public TileEntity createNewTileEntity(World world, int meta) @@ -80,20 +122,20 @@ public class BlockIncenseCrucible extends BlockContainer } @Override - public void randomDisplayTick(World world, BlockPos blockPos, IBlockState blockState, Random rand) + public void randomDisplayTick(World world, int x, int y, int z, Random rand) { if (rand.nextInt(3) != 0) { - TECrucible tile = (TECrucible)world.getTileEntity(blockPos); - tile.spawnClientParticle(world, blockPos, rand); + TECrucible tile = (TECrucible)world.getTileEntity(x, y, z); + tile.spawnClientParticle(world, x, y, z, rand); } } @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) + public void breakBlock(World world, int x, int y, int z, Block par5, int par6) { - dropItems(world, blockPos); - super.breakBlock(world, blockPos, blockState); + dropItems(world, x, y, z); + super.breakBlock(world, x, y, z, par5, par6); } @Override @@ -103,9 +145,9 @@ public class BlockIncenseCrucible extends BlockContainer } @Override - public int getComparatorInputOverride(World world, BlockPos blockPos) + public int getComparatorInputOverride(World world, int x, int y, int z, int meta) { - TileEntity tile = world.getTileEntity(blockPos); + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof TECrucible) { return ((TECrucible) tile).getRSPowerOutput(); @@ -113,10 +155,10 @@ public class BlockIncenseCrucible extends BlockContainer return 15; } - private void dropItems(World world, BlockPos blockPos) + private void dropItems(World world, int x, int y, int z) { Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(blockPos); + TileEntity tileEntity = world.getTileEntity(x, y, z); if (!(tileEntity instanceof IInventory)) { @@ -134,7 +176,9 @@ public class BlockIncenseCrucible extends BlockContainer float rx = rand.nextFloat() * 0.8F + 0.1F; float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); + EntityItem entityItem = new EntityItem(world, + x + rx, y + ry, z + rz, + new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrystal.java index 1c917c3c..57184a4f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrystal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockCrystal.java @@ -1,28 +1,48 @@ package WayofTime.alchemicalWizardry.common.block; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import net.minecraft.util.IIcon; import java.util.List; public class BlockCrystal extends Block { + //private Icon bloodRuneIcon; + @SideOnly(Side.CLIENT) + private IIcon fullIcon; + @SideOnly(Side.CLIENT) + private IIcon brickIcon; + + public BlockCrystal() { super(Material.iron); + this.setBlockName("crystalBlock"); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); setHardness(2.0F); setResistance(5.0F); } @Override @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:BlankRune"); + this.fullIcon = iconRegister.registerIcon("AlchemicalWizardry:ShardCluster"); + this.brickIcon = iconRegister.registerIcon("AlchemicalWizardry:ShardClusterBrick"); + } + + @SideOnly(Side.CLIENT) + /** * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) */ @@ -39,8 +59,25 @@ public class BlockCrystal extends Block } @Override - public int damageDropped(IBlockState blockState) + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) { - return blockState.getBlock().damageDropped(blockState); + switch (meta) + { + case 0: + return fullIcon; + + case 1: + return brickIcon; + + default: + return blockIcon; + } + } + + @Override + public int damageDropped(int metadata) + { + return metadata; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockDemonPortal.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockDemonPortal.java index 9dee123f..eb3ab934 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockDemonPortal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockDemonPortal.java @@ -1,13 +1,14 @@ package WayofTime.alchemicalWizardry.common.block; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; public class BlockDemonPortal extends BlockContainer @@ -17,18 +18,27 @@ public class BlockDemonPortal extends BlockContainer super(Material.rock); setHardness(1000); setResistance(10000); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setBlockName("demonPortal"); } @Override - public void onBlockHarvested(World world, BlockPos blockPos, IBlockState blockState, EntityPlayer player) + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) { - TileEntity tile = world.getTileEntity(blockPos); + this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:DemonPortal"); + } + + @Override + public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player) + { + TileEntity tile = world.getTileEntity(x, y, z); if(tile instanceof TEDemonPortal) { ((TEDemonPortal) tile).notifyPortalOfBreak(); } - super.onBlockHarvested(world, blockPos, blockState, player); + super.onBlockHarvested(world, x, y, z, meta, player); } @Override @@ -38,16 +48,16 @@ public class BlockDemonPortal extends BlockContainer } @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are) { if (world.isRemote) { return false; } - TEDemonPortal tileEntity = (TEDemonPortal) world.getTileEntity(blockPos); + TEDemonPortal tileEntity = (TEDemonPortal) world.getTileEntity(x, y, z); - tileEntity.rightClickBlock(player, side.getIndex()); + tileEntity.rightClickBlock(player, side); return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEfficiencyRune.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEfficiencyRune.java deleted file mode 100644 index 2dbb1792..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEfficiencyRune.java +++ /dev/null @@ -1,17 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -public class BlockEfficiencyRune extends BlockBloodRune -{ - public BlockEfficiencyRune() - { - super(); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public int getRuneEffect(int metaData) - { - return 2; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEmptySocket.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEmptySocket.java deleted file mode 100644 index 8aa7e951..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEmptySocket.java +++ /dev/null @@ -1,20 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; - -public class BlockEmptySocket extends Block -{ - public BlockEmptySocket() - { - super(Material.iron); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public boolean isOpaqueCube() - { - return false; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEnchantmentGlyph.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEnchantmentGlyph.java index 2eee791d..9cd21a37 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEnchantmentGlyph.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockEnchantmentGlyph.java @@ -4,27 +4,59 @@ import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; +import net.minecraft.util.IIcon; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.omega.IEnchantmentGlyph; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph { + @SideOnly(Side.CLIENT) + private IIcon enchantability; + @SideOnly(Side.CLIENT) + private IIcon enchantmentLevel; + public BlockEnchantmentGlyph() { super(Material.iron); setHardness(2.0F); setResistance(5.0F); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setBlockName("enchantmentGlyph"); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:LargeBloodStoneBrick"); + this.enchantability = iconRegister.registerIcon("AlchemicalWizardry:GlyphEnchantability"); + this.enchantmentLevel = iconRegister.registerIcon("AlchemicalWizardry:GlyphEnchantmentLevel"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) + { + switch (meta) + { + case 0: + return enchantability; + case 1: + return enchantmentLevel; + default: + return this.blockIcon; + } } @Override - public int getAdditionalStabilityForFaceCount(World world, BlockPos pos, int meta, int faceCount) + public int getAdditionalStabilityForFaceCount(World world, int x, int y, int z, int meta, int faceCount) { switch(meta) { @@ -38,7 +70,7 @@ public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph } @Override - public int getEnchantability(World world, BlockPos pos, int meta) + public int getEnchantability(World world, int x, int y, int z, int meta) { switch(meta) { @@ -50,7 +82,7 @@ public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph } @Override - public int getEnchantmentLevel(World world, BlockPos pos, int meta) + public int getEnchantmentLevel(World world, int x, int y, int z, int meta) { switch(meta) { @@ -60,8 +92,7 @@ public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph return 0; } } - - @Override + @SideOnly(Side.CLIENT) public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { @@ -70,10 +101,10 @@ public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph par3List.add(new ItemStack(par1, 1, i)); } } - - @Override - public int damageDropped(IBlockState blockState) + + @Override + public int damageDropped(int metadata) { - return blockState.getBlock().damageDropped(blockState); + return metadata; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockHomHeart.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockHomHeart.java new file mode 100644 index 00000000..f1ba267a --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockHomHeart.java @@ -0,0 +1,98 @@ +package WayofTime.alchemicalWizardry.common.block; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.items.BlankSpell; +import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class BlockHomHeart extends BlockContainer +{ + @SideOnly(Side.CLIENT) + private IIcon bottomIcon; + @SideOnly(Side.CLIENT) + private IIcon topIcon; + @SideOnly(Side.CLIENT) + private IIcon sideIcon; + + public BlockHomHeart() + { + super(Material.rock); + setHardness(2.0F); + setResistance(5.0F); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setBlockName("blockHomHeart"); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:HomHeart_top"); + this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:HomHeart_bottom"); + this.sideIcon = iconRegister.registerIcon("AlchemicalWizardry:HomHeart_side"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) + { + switch (side) + { + case 0: + return bottomIcon; + case 1: + return topIcon; + default: + return sideIcon; + } + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) + { + TEHomHeart tileEntity = (TEHomHeart) world.getTileEntity(x, y, z); + + if (tileEntity == null || player.isSneaking()) + { + return false; + } + + ItemStack playerItem = player.getCurrentEquippedItem(); + + if (playerItem != null) + { + if (playerItem.getItem() instanceof BlankSpell) + { + if (playerItem.getTagCompound() == null) + { + playerItem.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound itemTag = playerItem.getTagCompound(); + itemTag.setInteger("xCoord", x); + itemTag.setInteger("yCoord", y); + itemTag.setInteger("zCoord", z); + itemTag.setInteger("dimensionId", world.provider.dimensionId); + return true; + } + } + + return false; + } + + @Override + public TileEntity createNewTileEntity(World world, int metaMaybe) + { + return new TEHomHeart(); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLargeBloodStoneBrick.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLargeBloodStoneBrick.java deleted file mode 100644 index 1f12e28d..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLargeBloodStoneBrick.java +++ /dev/null @@ -1,14 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; - -public class BlockLargeBloodStoneBrick extends Block -{ - public BlockLargeBloodStoneBrick() - { - super(Material.iron); - setHardness(2.0F); - setResistance(5.0F); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLifeEssence.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLifeEssence.java deleted file mode 100644 index 37276de0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockLifeEssence.java +++ /dev/null @@ -1,29 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import net.minecraft.block.material.Material; -import net.minecraft.util.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.fluids.BlockFluidClassic; - -public class BlockLifeEssence extends BlockFluidClassic -{ - public BlockLifeEssence() - { - super(AlchemicalWizardry.lifeEssenceFluid, Material.water); - AlchemicalWizardry.lifeEssenceFluid.setBlock(this); - } - - @Override - public boolean canDisplace(IBlockAccess world, BlockPos blockPos) - { - return !world.getBlockState(blockPos).getBlock().getMaterial().isLiquid() && super.canDisplace(world, blockPos); - } - - @Override - public boolean displaceIfPossible(World world, BlockPos blockPos) - { - return !world.getBlockState(blockPos).getBlock().getMaterial().isLiquid() && super.displaceIfPossible(world, blockPos); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java index d30f3e5e..096dc60e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMasterStone.java @@ -1,16 +1,17 @@ package WayofTime.alchemicalWizardry.common.block; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.items.ActivationCrystal; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.Explosion; import net.minecraft.world.World; @@ -21,25 +22,34 @@ public class BlockMasterStone extends BlockContainer super(Material.iron); setHardness(2.0F); setResistance(5.0F); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setBlockName("blockMasterStone"); } @Override - public void onBlockHarvested(World world, BlockPos blockPos, IBlockState blockState, EntityPlayer player) + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) { - TileEntity tile = world.getTileEntity(blockPos); + this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:MasterStone"); + } + + @Override + public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player) + { + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof TEMasterStone) { ((TEMasterStone) tile).useOnRitualBroken(); } - super.onBlockHarvested(world, blockPos, blockState, player); + super.onBlockHarvested(world, x, y, z, meta, player); } @Override - public void onBlockDestroyedByExplosion(World world, BlockPos blockPos, Explosion explosion) + public void onBlockDestroyedByExplosion(World world, int x, int y, int z, Explosion explosion) { - super.onBlockDestroyedByExplosion(world, blockPos, explosion); - TileEntity tile = world.getTileEntity(blockPos); + super.onBlockDestroyedByExplosion(world, x, y, z, explosion); + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof TEMasterStone) { ((TEMasterStone) tile).useOnRitualBrokenExplosion(); @@ -47,9 +57,9 @@ public class BlockMasterStone extends BlockContainer } @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { - TEMasterStone tileEntity = (TEMasterStone) world.getTileEntity(blockPos); + TEMasterStone tileEntity = (TEMasterStone) world.getTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { @@ -72,8 +82,8 @@ public class BlockMasterStone extends BlockContainer ActivationCrystal acItem = (ActivationCrystal) item; // tileEntity.setOwner(acItem.getOwnerName(playerItem)); - tileEntity.activateRitual(world, acItem.getCrystalLevel(playerItem), playerItem, player, ActivationCrystal.getOwnerName(playerItem)); - world.markBlockForUpdate(blockPos); + tileEntity.activateRitual(world, acItem.getCrystalLevel(playerItem), playerItem, player, acItem.getOwnerName(playerItem)); + world.markBlockForUpdate(x, y, z); return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMimic.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMimic.java deleted file mode 100644 index 7737d3ac..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockMimic.java +++ /dev/null @@ -1,210 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.particle.EffectRenderer; -import net.minecraft.client.particle.EntityDiggingFX; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.*; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.tileEntity.TEMimicBlock; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -public class BlockMimic extends BlockContainer -{ - public BlockMimic() - { - super(Material.water); - setHardness(2.0F); - setResistance(5.0F); -// this.setBlockBounds(0, 0, 0, 0, 0, 0); - } - - @Override - @SideOnly(Side.CLIENT) - public boolean shouldSideBeRendered(IBlockAccess world, BlockPos blockPos, EnumFacing side) - { - TileEntity TE = world.getTileEntity(blockPos); - if(!(TE instanceof TEMimicBlock)) - { - return true; - } - TEMimicBlock mimic = (TEMimicBlock)TE; - - Block block = mimic.getBlock(); - - return block == null || block.shouldSideBeRendered(world, blockPos, side); - } - - @Override - public boolean canCollideCheck(IBlockState blockState, boolean bool) - { - return blockState.getBlock().getMetaFromState(blockState) == 1; - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TEMimicBlock(); - } - - @Override - public boolean canSilkHarvest(World world, BlockPos pos, IBlockState state, EntityPlayer player) - { - return false; - } - - @Override - public int quantityDropped(Random random) - { - return 0; - } - - @Override - public boolean isBlockSolid(IBlockAccess world, BlockPos blockPos, EnumFacing side) - { - TileEntity tile = world.getTileEntity(blockPos); - if(tile instanceof TEMimicBlock) - { - Block block = ((TEMimicBlock) tile).getBlock(); - int mimicMeta = ((TEMimicBlock) tile).getMetaOfMimic(); - - if(block != null) - { - return block.isBlockSolid(world, blockPos, side); //side was mimicM - } - } - return super.isBlockSolid(world, blockPos, side); - } - - @Override - public boolean addHitEffects(World world, MovingObjectPosition target, EffectRenderer effectRenderer) - { - TileEntity tile = world.getTileEntity(target.func_178782_a()); - - TEMimicBlock TE = (TEMimicBlock)tile; - - if (TE != null) - { - Block block = TE.getBlock(); - - double xOffset = target.func_178782_a().getX() + world.rand.nextDouble() * (block.getBlockBoundsMaxX() - block.getBlockBoundsMinX() - 0.1F * 2.0F) + 0.1F + block.getBlockBoundsMinX(); - double yOffset = target.func_178782_a().getY() + world.rand.nextDouble() * (block.getBlockBoundsMaxY() - block.getBlockBoundsMinY() - 0.1F * 2.0F) + 0.1F + block.getBlockBoundsMinY(); - double zOffset = target.func_178782_a().getZ() + world.rand.nextDouble() * (block.getBlockBoundsMaxZ() - block.getBlockBoundsMinZ() - 0.1F * 2.0F) + 0.1F + block.getBlockBoundsMinZ(); - - switch (target.subHit) - { - case 0: - yOffset = target.func_178782_a().getY() + block.getBlockBoundsMinY() - 0.1D; - break; - case 1: - yOffset = target.func_178782_a().getY() + block.getBlockBoundsMaxY() + 0.1D; - break; - case 2: - zOffset = target.func_178782_a().getZ() + block.getBlockBoundsMinZ() - 0.1D; - break; - case 3: - zOffset = target.func_178782_a().getZ() + block.getBlockBoundsMaxZ() + 0.1D; - break; - case 4: - xOffset = target.func_178782_a().getX() + block.getBlockBoundsMinX() - 0.1D; - break; - case 5: - xOffset = target.func_178782_a().getX() + block.getBlockBoundsMaxX() + 0.1D; - break; - } - -// BlockMimic.addHitEffect(TE, target, xOffset, yOffset, zOffset, null, effectRenderer); - - return true; - - } - - return super.addHitEffects(world, target, effectRenderer); - } - - @Override - public AxisAlignedBB getCollisionBoundingBox(World world, BlockPos blockPos, IBlockState blockState) - { - TEMimicBlock tile = (TEMimicBlock)world.getTileEntity(blockPos); - Block block = tile.getBlock(); - - return block != null ? block.getCollisionBoundingBox(world, blockPos, blockState) : super.getCollisionBoundingBox(world, blockPos, blockState); - } - - @Override - @SideOnly(Side.CLIENT) - public int colorMultiplier(IBlockAccess blockAccess, BlockPos blockPos, int renderPass) - { - TEMimicBlock TE = (TEMimicBlock)blockAccess.getTileEntity(blockPos); - if (TE != null) - { - Block block = TE.getBlock(); - if(block != null) - { - return block.colorMultiplier(blockAccess, blockPos); - } - } - - return super.colorMultiplier(blockAccess, blockPos); - } - -/* @Override - public void velocityToAddToEntity(World world, BlockPos, Entity entity, Vec3 vec) - { - TEMimicBlock TE = (TEMimicBlock)world.getTileEntity(x, y, z); - if (TE != null) - { - Block block = TE.getBlock(); - if(block != null) - { - block.velocityToAddToEntity(world, x, y, z, entity, vec); - } - } - } - No longer in 1.8 apparently - - public static void addHitEffect(TEMimicBlock TE, MovingObjectPosition target, double x, double y, double z, ItemStack itemStack, EffectRenderer effectRenderer) - { - EntityDiggingFX particle = new EntityDiggingFX(TE.getWorld(), x, y, z, 0.0D, 0.0D, 0.0D, TE.getBlock(), TE.getMetaOfMimic()); - effectRenderer.addEffect(particle.func_174846_a(target.func_178782_a()).multiplyVelocity(0.2F).multipleParticleScaleBy(0.6F)); - } -*/ - @Override - public void onEntityCollidedWithBlock(World world, BlockPos blockPos, Entity entity) - { - TEMimicBlock TE = (TEMimicBlock)world.getTileEntity(blockPos); - if (TE != null) - { - if(TE.getBlockEffectWhileInside(entity, blockPos)) - { - return; - }else - { - Block block = TE.getBlock(); - if(block != null) - { - block.onEntityCollidedWithBlock(world, blockPos, entity); - return; - } - } - } - - super.onEntityCollidedWithBlock(world, blockPos, entity); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockOrientable.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockOrientable.java index 0e919d8e..6836b7ff 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockOrientable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockOrientable.java @@ -1,14 +1,13 @@ package WayofTime.alchemicalWizardry.common.block; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.tileEntity.TEOrientable; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; public class BlockOrientable extends BlockContainer { @@ -17,6 +16,7 @@ public class BlockOrientable extends BlockContainer super(Material.rock); setHardness(2.0F); setResistance(5.0F); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -26,7 +26,7 @@ public class BlockOrientable extends BlockContainer } @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are) { //Right-click orients the output face. Shift-right-click orients the input face. if (world.isRemote) @@ -34,20 +34,20 @@ public class BlockOrientable extends BlockContainer return false; } - TileEntity tile = world.getTileEntity(blockPos); + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof TEOrientable) { TEOrientable newTile = (TEOrientable) tile; if (player.isSneaking()) { - int nextSide = TEOrientable.getIntForEnumFacing(newTile.getInputDirection()) + 1; + int nextSide = TEOrientable.getIntForForgeDirection(newTile.getInputDirection()) + 1; if (nextSide > 5) { nextSide = 0; } - if (EnumFacing.getFront(nextSide) == newTile.getOutputDirection()) + if (ForgeDirection.getOrientation(nextSide) == newTile.getOutputDirection()) { nextSide++; if (nextSide > 5) @@ -56,16 +56,16 @@ public class BlockOrientable extends BlockContainer } } - newTile.setInputDirection(EnumFacing.getFront(nextSide)); + newTile.setInputDirection(ForgeDirection.getOrientation(nextSide)); } else { - int nextSide = TEOrientable.getIntForEnumFacing(newTile.getOutputDirection()) + 1; + int nextSide = TEOrientable.getIntForForgeDirection(newTile.getOutputDirection()) + 1; if (nextSide > 5) { nextSide = 0; } - if (EnumFacing.getFront(nextSide) == newTile.getInputDirection()) + if (ForgeDirection.getOrientation(nextSide) == newTile.getInputDirection()) { nextSide++; if (nextSide > 5) @@ -74,17 +74,17 @@ public class BlockOrientable extends BlockContainer } } - newTile.setOutputDirection(EnumFacing.getFront(nextSide)); + newTile.setOutputDirection(ForgeDirection.getOrientation(nextSide)); } } - world.markBlockForUpdate(blockPos); + world.markBlockForUpdate(x, y, z); return true; } @Override - public int damageDropped(IBlockState blockState) + public int damageDropped(int metadata) { - return blockState.getBlock().damageDropped(blockState); + return metadata; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPedestal.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPedestal.java index 0a7ce6f4..d057b4a3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPedestal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPedestal.java @@ -2,35 +2,71 @@ package WayofTime.alchemicalWizardry.common.block; import java.util.Random; +import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; +import net.minecraft.util.IIcon; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class BlockPedestal extends BlockContainer { + @SideOnly(Side.CLIENT) + private IIcon topIcon; + @SideOnly(Side.CLIENT) + private IIcon sideIcon2; + @SideOnly(Side.CLIENT) + private IIcon bottomIcon; + public BlockPedestal() { super(Material.rock); setHardness(2.0F); setResistance(5.0F); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setBlockName("bloodPedestal"); float f = 0.3125F; this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.6F, 0.5F + f); } @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) { - TEPedestal tileEntity = (TEPedestal) world.getTileEntity(blockPos); + this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:ArcanePedestal"); + this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket"); + this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) + { + switch (side) + { + case 0: + return bottomIcon; + case 1: + return topIcon; + default: + return sideIcon2; + } + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) + { + TEPedestal tileEntity = (TEPedestal) world.getTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { @@ -51,21 +87,21 @@ public class BlockPedestal extends BlockContainer tileEntity.setInventorySlotContents(0, null); tileEntity.setActive(); } - world.markBlockForUpdate(blockPos); + world.markBlockForUpdate(x, y, z); return true; } @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) + public void breakBlock(World world, int x, int y, int z, Block par5, int par6) { - dropItems(world, blockPos); - super.breakBlock(world, blockPos, blockState); + dropItems(world, x, y, z); + super.breakBlock(world, x, y, z, par5, par6); } - private void dropItems(World world, BlockPos blockPos) + private void dropItems(World world, int x, int y, int z) { Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(blockPos); + TileEntity tileEntity = world.getTileEntity(x, y, z); if (!(tileEntity instanceof IInventory)) { @@ -83,7 +119,7 @@ public class BlockPedestal extends BlockContainer float rx = rand.nextFloat() * 0.8F + 0.1F; float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); + EntityItem entityItem = new EntityItem(world, x + rx, y + ry, z + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { @@ -106,6 +142,12 @@ public class BlockPedestal extends BlockContainer return new TEPedestal(); } + @Override + public boolean renderAsNormalBlock() + { + return false; + } + @Override public int getRenderType() { @@ -119,7 +161,7 @@ public class BlockPedestal extends BlockContainer } @Override - public boolean hasTileEntity(IBlockState blockState) + public boolean hasTileEntity() { return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPlinth.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPlinth.java index 6d4b79e7..56d47c64 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPlinth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockPlinth.java @@ -2,35 +2,71 @@ package WayofTime.alchemicalWizardry.common.block; import java.util.Random; +import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; +import net.minecraft.util.IIcon; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class BlockPlinth extends BlockContainer { + @SideOnly(Side.CLIENT) + private IIcon topIcon; + @SideOnly(Side.CLIENT) + private IIcon sideIcon2; + @SideOnly(Side.CLIENT) + private IIcon bottomIcon; + public BlockPlinth() { super(Material.rock); setHardness(2.0F); setResistance(5.0F); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setBlockName("bloodPlinth"); float f = 0.0625F; this.setBlockBounds(f, 0.0F, f, 1.0f - f, 0.875f, 1.0f - f); } @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) { - TEPlinth tileEntity = (TEPlinth) world.getTileEntity(blockPos); + this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:ArcanePlinth"); + this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket"); + this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) + { + switch (side) + { + case 0: + return bottomIcon; + case 1: + return topIcon; + default: + return sideIcon2; + } + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) + { + TEPlinth tileEntity = (TEPlinth) world.getTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { @@ -51,21 +87,21 @@ public class BlockPlinth extends BlockContainer tileEntity.setInventorySlotContents(0, null); tileEntity.setActive(); } - world.markBlockForUpdate(blockPos); + world.markBlockForUpdate(x, y, z); return true; } @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) + public void breakBlock(World world, int x, int y, int z, Block par5, int par6) { - dropItems(world, blockPos); - super.breakBlock(world, blockPos, blockState); + dropItems(world, x, y, z); + super.breakBlock(world, x, y, z, par5, par6); } - private void dropItems(World world, BlockPos blockPos) + private void dropItems(World world, int x, int y, int z) { Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(blockPos); + TileEntity tileEntity = world.getTileEntity(x, y, z); if (!(tileEntity instanceof IInventory)) { @@ -83,7 +119,7 @@ public class BlockPlinth extends BlockContainer float rx = rand.nextFloat() * 0.8F + 0.1F; float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); + EntityItem entityItem = new EntityItem(world, x + rx, y + ry, z + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { @@ -106,6 +142,12 @@ public class BlockPlinth extends BlockContainer return new TEPlinth(); } + @Override + public boolean renderAsNormalBlock() + { + return false; + } + @Override public int getRenderType() { @@ -119,7 +161,7 @@ public class BlockPlinth extends BlockContainer } @Override - public boolean hasTileEntity(IBlockState blockState) + public boolean hasTileEntity() { return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockReagentConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockReagentConduit.java index f6cb50a5..eeae6acc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockReagentConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockReagentConduit.java @@ -2,13 +2,14 @@ package WayofTime.alchemicalWizardry.common.block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class BlockReagentConduit extends BlockContainer { @@ -17,6 +18,15 @@ public class BlockReagentConduit extends BlockContainer super(Material.cloth); setHardness(2.0F); setResistance(5.0F); + this.setBlockName("blockReagentConduit"); + this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:SimpleTransCircle"); } @Override @@ -32,9 +42,9 @@ public class BlockReagentConduit extends BlockContainer } @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are) { - return super.onBlockActivated(world, blockPos, state, player, side, hitX, hitY, hitZ); + return super.onBlockActivated(world, x, y, z, player, side, what, these, are); } @Override @@ -43,6 +53,12 @@ public class BlockReagentConduit extends BlockContainer return false; } + @Override + public boolean renderAsNormalBlock() + { + return false; + } + @Override public int getRenderType() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRitualStone.java deleted file mode 100644 index 6a5ed2db..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRitualStone.java +++ /dev/null @@ -1,69 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import WayofTime.alchemicalWizardry.api.rituals.IRitualStone; -import WayofTime.alchemicalWizardry.common.items.ScribeTool; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; - -public class BlockRitualStone extends Block implements IRitualStone -{ - public BlockRitualStone() - { - super(Material.iron); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public int damageDropped(IBlockState blockState) - { - return 0; - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - ItemStack playerItem = player.getCurrentEquippedItem(); - - if (playerItem == null) - { - return false; - } - - Item item = playerItem.getItem(); - - if (!(item instanceof ScribeTool)) - { - return false; - } - - if (playerItem.getMaxDamage() <= playerItem.getItemDamage() && !(playerItem.getMaxDamage() == 0)) - { - return false; - } - - ScribeTool scribeTool = (ScribeTool) item; - - if (!player.capabilities.isCreativeMode) - { - playerItem.setItemDamage(playerItem.getItemDamage() + 1); - } - - world.setBlockState(blockPos, state.getBlock().getStateFromMeta(scribeTool.getType()), 3); - world.markBlockForUpdate(blockPos); - return true; - } - - @Override - public boolean isRuneType(World world, BlockPos blockPos, IBlockState blockState, int runeType) - { - return blockState.getBlock().getMetaFromState(blockState) == runeType; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSacrifice.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSacrifice.java deleted file mode 100644 index a5786b30..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSacrifice.java +++ /dev/null @@ -1,17 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -public class BlockRuneOfSacrifice extends BlockBloodRune -{ - public BlockRuneOfSacrifice() - { - super(); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public int getRuneEffect(int metaData) - { - return 3; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSelfSacrifice.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSelfSacrifice.java deleted file mode 100644 index c7b729a0..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockRuneOfSelfSacrifice.java +++ /dev/null @@ -1,17 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -public class BlockRuneOfSelfSacrifice extends BlockBloodRune -{ - public BlockRuneOfSelfSacrifice() - { - super(); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public int getRuneEffect(int metaData) - { - return 4; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java index 7d7ab440..813e00ad 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java @@ -1,13 +1,11 @@ package WayofTime.alchemicalWizardry.common.block; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.tileEntity.TESchematicSaver; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; public class BlockSchematicSaver extends BlockContainer @@ -17,6 +15,8 @@ public class BlockSchematicSaver extends BlockContainer super(Material.rock); setHardness(2.0F); setResistance(5.0F); +// setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setBlockName("schematicSaver"); } @Override @@ -26,16 +26,16 @@ public class BlockSchematicSaver extends BlockContainer } @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are) { if (world.isRemote) { return false; } - TESchematicSaver tileEntity = (TESchematicSaver) world.getTileEntity(blockPos); + TESchematicSaver tileEntity = (TESchematicSaver) world.getTileEntity(x, y, z); - tileEntity.rightClickBlock(); + tileEntity.rightClickBlock(player, side); return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockFilledSocket.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSocket.java similarity index 60% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/BlockFilledSocket.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSocket.java index d59b4cb9..9cfd5bcd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockFilledSocket.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSocket.java @@ -1,36 +1,72 @@ package WayofTime.alchemicalWizardry.common.block; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; +import net.minecraft.util.IIcon; import net.minecraft.world.World; import java.util.Random; -public class BlockFilledSocket extends BlockContainer +public class BlockSocket extends BlockContainer { - public BlockFilledSocket() + @SideOnly(Side.CLIENT) + private IIcon topIcon; + @SideOnly(Side.CLIENT) + private IIcon sideIcon2; + @SideOnly(Side.CLIENT) + private IIcon bottomIcon; + + public BlockSocket() { super(Material.rock); setHardness(2.0F); setResistance(5.0F); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setBlockName("bloodSocket"); //func_111022_d("AlchemicalWizardry:blocks"); } @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState blockState, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) { - TESocket tileEntity = (TESocket) world.getTileEntity(blockPos); + this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket"); + this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket"); + this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) + { + switch (side) + { + case 0: + return bottomIcon; + case 1: + return topIcon; + default: + return sideIcon2; + } + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) + { + TESocket tileEntity = (TESocket) world.getTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { @@ -60,21 +96,21 @@ public class BlockFilledSocket extends BlockContainer tileEntity.setActive(); return true; } - world.markBlockForUpdate(blockPos); + world.markBlockForUpdate(x, y, z); return false; } @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) + public void breakBlock(World world, int x, int y, int z, Block par5, int par6) { - dropItems(world, blockPos); - super.breakBlock(world, blockPos, blockState); + dropItems(world, x, y, z); + super.breakBlock(world, x, y, z, par5, par6); } - private void dropItems(World world, BlockPos blockPos) + private void dropItems(World world, int x, int y, int z) { Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(blockPos); + TileEntity tileEntity = world.getTileEntity(x, y, z); if (!(tileEntity instanceof IInventory)) { @@ -92,7 +128,7 @@ public class BlockFilledSocket extends BlockContainer float rx = rand.nextFloat() * 0.8F + 0.1F; float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); + EntityItem entityItem = new EntityItem(world, x + rx, y + ry, z + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectralContainer.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectralContainer.java index 9b024b1b..adf845bb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectralContainer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectralContainer.java @@ -1,13 +1,14 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -19,9 +20,17 @@ public class BlockSpectralContainer extends BlockContainer public BlockSpectralContainer() { super(Material.cloth); + this.setBlockName("blockSpectralContainer"); this.setBlockBounds(0, 0, 0, 0, 0, 0); } + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:BlockBloodLight"); + } + @Override public boolean isOpaqueCube() { @@ -29,22 +38,30 @@ public class BlockSpectralContainer extends BlockContainer } @Override - public void addCollisionBoxesToList(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, List list, Entity collidingEntity) {} + public boolean renderAsNormalBlock() + { + return false; + } @Override + public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity) + { + + } + public int quantityDropped(Random par1Random) { return 0; } @Override - public boolean isReplaceable(World world, BlockPos blockPos) + public boolean isReplaceable(IBlockAccess world, int x, int y, int z) { return true; } @Override - public boolean isAir(IBlockAccess world, BlockPos blockPos) + public boolean isAir(IBlockAccess world, int x, int y, int z) { return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpeedRune.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpeedRune.java deleted file mode 100644 index 4db82016..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpeedRune.java +++ /dev/null @@ -1,17 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -public class BlockSpeedRune extends BlockBloodRune -{ - public BlockSpeedRune() - { - super(); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public int getRuneEffect(int metaData) - { - return 1; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEffect.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEffect.java index c7f31294..18e6d1bb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEffect.java @@ -2,21 +2,23 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; + public class BlockSpellEffect extends BlockOrientable { public BlockSpellEffect() { super(); + this.setBlockName("blockSpellEffect"); } @Override @@ -25,6 +27,12 @@ public class BlockSpellEffect extends BlockOrientable return new TESpellEffectBlock(); } + @Override + public boolean renderAsNormalBlock() + { + return false; + } + @Override public int getRenderType() { @@ -37,7 +45,6 @@ public class BlockSpellEffect extends BlockOrientable return false; } - @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEnhancement.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEnhancement.java index 1a0f3ddf..b58d36c0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEnhancement.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellEnhancement.java @@ -2,13 +2,13 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; @@ -17,6 +17,7 @@ public class BlockSpellEnhancement extends BlockOrientable public BlockSpellEnhancement() { super(); + this.setBlockName("blockSpellEnhancement"); } @Override @@ -25,6 +26,12 @@ public class BlockSpellEnhancement extends BlockOrientable return new TESpellEnhancementBlock(); } + @Override + public boolean renderAsNormalBlock() + { + return false; + } + @Override public int getRenderType() { @@ -37,7 +44,6 @@ public class BlockSpellEnhancement extends BlockOrientable return false; } - @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellModifier.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellModifier.java index 241f9fd8..80c384cc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellModifier.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellModifier.java @@ -2,13 +2,13 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; @@ -17,6 +17,7 @@ public class BlockSpellModifier extends BlockOrientable public BlockSpellModifier() { super(); + this.setBlockName("blockSpellModifier"); } @Override @@ -25,7 +26,6 @@ public class BlockSpellModifier extends BlockOrientable return new TESpellModifierBlock(); } - @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { @@ -47,6 +47,12 @@ public class BlockSpellModifier extends BlockOrientable return false; } + @Override + public boolean renderAsNormalBlock() + { + return false; + } + @Override public int getRenderType() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellParadigm.java index 6c8d15b9..e510791c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellParadigm.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellParadigm.java @@ -3,18 +3,15 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.common.items.ItemComplexSpellCrystal; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; -import net.minecraft.block.state.IBlockState; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; @@ -23,6 +20,7 @@ public class BlockSpellParadigm extends BlockOrientable public BlockSpellParadigm() { super(); + this.setBlockName("blockSpellParadigm"); } @Override @@ -31,8 +29,8 @@ public class BlockSpellParadigm extends BlockOrientable return new TESpellParadigmBlock(); } - @Override @SideOnly(Side.CLIENT) + /** * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) */ @@ -51,7 +49,7 @@ public class BlockSpellParadigm extends BlockOrientable } @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are) { ItemStack stack = player.getCurrentEquippedItem(); @@ -63,14 +61,14 @@ public class BlockSpellParadigm extends BlockOrientable } NBTTagCompound itemTag = stack.getTagCompound(); - itemTag.setInteger("xCoord", blockPos.getX()); - itemTag.setInteger("yCoord", blockPos.getY()); - itemTag.setInteger("zCoord", blockPos.getZ()); - itemTag.setInteger("dimensionId", world.provider.getDimensionId()); + itemTag.setInteger("xCoord", x); + itemTag.setInteger("yCoord", y); + itemTag.setInteger("zCoord", z); + itemTag.setInteger("dimensionId", world.provider.dimensionId); return true; } - return super.onBlockActivated(world, blockPos, state, player, side, hitX, hitY, hitZ); + return super.onBlockActivated(world, x, y, z, player, side, what, these, are); } @Override @@ -79,6 +77,12 @@ public class BlockSpellParadigm extends BlockOrientable return false; } + @Override + public boolean renderAsNormalBlock() + { + return false; + } + @Override public int getRenderType() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java deleted file mode 100644 index 89b4746e..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java +++ /dev/null @@ -1,63 +0,0 @@ -package WayofTime.alchemicalWizardry.common.block; - -import WayofTime.alchemicalWizardry.common.items.BlankSpell; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellTable; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; - -public class BlockSpellTable extends BlockContainer -{ - public BlockSpellTable() - { - super(Material.rock); - setHardness(2.0F); - setResistance(5.0F); - } - - @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) - { - TESpellTable tileEntity = (TESpellTable) world.getTileEntity(blockPos); - - if (tileEntity == null || player.isSneaking()) - { - return false; - } - - ItemStack playerItem = player.getCurrentEquippedItem(); - - if (playerItem != null) - { - if (playerItem.getItem() instanceof BlankSpell) - { - if (playerItem.getTagCompound() == null) - { - playerItem.setTagCompound(new NBTTagCompound()); - } - - NBTTagCompound itemTag = playerItem.getTagCompound(); - itemTag.setInteger("xCoord", blockPos.getX()); - itemTag.setInteger("yCoord", blockPos.getY()); - itemTag.setInteger("zCoord", blockPos.getZ()); - itemTag.setInteger("dimensionId", world.provider.getDimensionId()); - return true; - } - } - - return false; - } - - @Override - public TileEntity createNewTileEntity(World world, int metaMaybe) - { - return new TESpellTable(); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockStabilityGlyph.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockStabilityGlyph.java index 55be5fde..50cddbf5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockStabilityGlyph.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockStabilityGlyph.java @@ -4,26 +4,54 @@ import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; +import net.minecraft.util.IIcon; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.omega.IStabilityGlyph; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class BlockStabilityGlyph extends Block implements IStabilityGlyph { + @SideOnly(Side.CLIENT) + private IIcon stability1; + public BlockStabilityGlyph() { super(Material.iron); setHardness(2.0F); setResistance(5.0F); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setBlockName("stabilityGlyph"); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:LargeBloodStoneBrick"); + this.stability1 = iconRegister.registerIcon("AlchemicalWizardry:GlyphStability1"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) + { + switch (meta) + { + case 0: + return stability1; + default: + return this.blockIcon; + } } @Override - public int getAdditionalStabilityForFaceCount(World world, BlockPos pos, int meta, int faceCount) + public int getAdditionalStabilityForFaceCount(World world, int x, int y, int z, int meta, int faceCount) { switch(meta) { @@ -34,7 +62,7 @@ public class BlockStabilityGlyph extends Block implements IStabilityGlyph } } - @Override + @SideOnly(Side.CLIENT) public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java index 56a31494..97dea481 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockTeleposer.java @@ -7,7 +7,7 @@ import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockMobSpawner; import net.minecraft.block.BlockPortal; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -15,31 +15,65 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; +import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; -//import net.minecraftforge.fml.common.Optional; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.event.TeleposeEvent; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; -//import codechicken.multipart.MultipartHelper; -//import codechicken.multipart.TileMultipart; +import codechicken.multipart.MultipartHelper; +import codechicken.multipart.TileMultipart; +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class BlockTeleposer extends BlockContainer { + @SideOnly(Side.CLIENT) + private IIcon topIcon; + @SideOnly(Side.CLIENT) + private IIcon sideIcon2; + @SideOnly(Side.CLIENT) + private IIcon bottomIcon; + public BlockTeleposer() { super(Material.rock); setHardness(2.0F); setResistance(5.0F); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setBlockName("bloodTeleposer"); } @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Top"); + this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Side"); + this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Side"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) + { + switch (side) + { + case 0: + return bottomIcon; + case 1: + return topIcon; + default: + return sideIcon2; + } + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { ItemStack playerItem = player.getCurrentEquippedItem(); @@ -55,28 +89,28 @@ public class BlockTeleposer extends BlockContainer } NBTTagCompound itemTag = playerItem.getTagCompound(); - itemTag.setInteger("xCoord", pos.getX()); - itemTag.setInteger("yCoord", pos.getY()); - itemTag.setInteger("zCoord", pos.getZ()); - itemTag.setInteger("dimensionId", world.provider.getDimensionId()); + itemTag.setInteger("xCoord", x); + itemTag.setInteger("yCoord", y); + itemTag.setInteger("zCoord", z); + itemTag.setInteger("dimensionId", world.provider.dimensionId); return true; } } - player.openGui(AlchemicalWizardry.instance, 1, world, pos.getX(), pos.getY(), pos.getZ()); + player.openGui(AlchemicalWizardry.instance, 1, world, x, y, z); return true; } @Override - public void breakBlock(World world, BlockPos pos, IBlockState state) + public void breakBlock(World world, int x, int y, int z, Block par5, int par6) { - dropItems(world, pos); - super.breakBlock(world, pos, state); + dropItems(world, x, y, z); + super.breakBlock(world, x, y, z, par5, par6); } - private void dropItems(World world, BlockPos pos) + private void dropItems(World world, int x, int y, int z) { Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(pos); + TileEntity tileEntity = world.getTileEntity(x, y, z); if (!(tileEntity instanceof IInventory)) { @@ -94,7 +128,7 @@ public class BlockTeleposer extends BlockContainer float rx = rand.nextFloat() * 0.8F + 0.1F; float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, pos.getX() + rx, pos.getY() + ry, pos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); + EntityItem entityItem = new EntityItem(world, x + rx, y + ry, z + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { @@ -117,20 +151,20 @@ public class BlockTeleposer extends BlockContainer return new TETeleposer(); } - public static boolean swapBlocks(Object caller, World worldI, World worldF, BlockPos posi, BlockPos posf) + public static boolean swapBlocks(Object caller, World worldI, World worldF, int xi, int yi, int zi, int xf, int yf, int zf) { - return swapBlocks(caller, worldI, worldF, posi, posf, true, 3); + return swapBlocks(caller, worldI, worldF, xi, yi, zi, xf, yf, zf, true, 3); } - public static boolean swapBlocksWithoutSound(Object caller, World worldI, World worldF, BlockPos posi, BlockPos posf) + public static boolean swapBlocksWithoutSound(Object caller, World worldI, World worldF, int xi, int yi, int zi, int xf, int yf, int zf) { - return swapBlocks(caller, worldI, worldF, posi, posf, false, 3); + return swapBlocks(caller, worldI, worldF, xi, yi, zi, xf, yf, zf, false, 3); } - public static boolean swapBlocks(Object caller, World worldI, World worldF, BlockPos posi, BlockPos posf, boolean doSound, int flag) + public static boolean swapBlocks(Object caller, World worldI, World worldF, int xi, int yi, int zi, int xf, int yf, int zf, boolean doSound, int flag) { - TileEntity tileEntityI = worldI.getTileEntity(posi); - TileEntity tileEntityF = worldF.getTileEntity(posf); + TileEntity tileEntityI = worldI.getTileEntity(xi, yi, zi); + TileEntity tileEntityF = worldF.getTileEntity(xf, yf, zf); NBTTagCompound nbttag1 = new NBTTagCompound(); NBTTagCompound nbttag2 = new NBTTagCompound(); @@ -145,10 +179,8 @@ public class BlockTeleposer extends BlockContainer tileEntityF.writeToNBT(nbttag2); } - IBlockState stateI = worldI.getBlockState(posi); - Block blockI = stateI.getBlock(); - IBlockState stateF = worldF.getBlockState(posf); - Block blockF = stateF.getBlock(); + Block blockI = worldI.getBlock(xi, yi, zi); + Block blockF = worldF.getBlock(xf, yf, zf); if (blockI.equals(Blocks.air) && blockF.equals(Blocks.air)) @@ -160,15 +192,18 @@ public class BlockTeleposer extends BlockContainer { return false; } + + int metaI = worldI.getBlockMetadata(xi, yi, zi); + int metaF = worldF.getBlockMetadata(xf, yf, zf); - TeleposeEvent evt = new TeleposeEvent(worldI, posi, stateI, worldF, posf, stateF); + TeleposeEvent evt = new TeleposeEvent(worldI, xi, yi, zi, blockI, metaI, worldF, xf, yf, zf, blockF, metaF); if (MinecraftForge.EVENT_BUS.post(evt)) return false; if(doSound) { - worldI.playSoundEffect(posi.getX(), posi.getY(), posi.getZ(), "mob.endermen.portal", 1.0F, 1.0F); - worldF.playSoundEffect(posf.getX(), posf.getY(), posf.getZ(), "mob.endermen.portal", 1.0F, 1.0F); + worldI.playSoundEffect(xi, yi, zi, "mob.endermen.portal", 1.0F, 1.0F); + worldF.playSoundEffect(xf, yf, zf, "mob.endermen.portal", 1.0F, 1.0F); } //CLEAR TILES @@ -176,68 +211,73 @@ public class BlockTeleposer extends BlockContainer if (finalBlock != null) { - TileEntity tileToSet = finalBlock.createTileEntity(worldF, stateF); + TileEntity tileToSet = finalBlock.createTileEntity(worldF, metaF); - worldF.setTileEntity(posf, tileToSet); + worldF.setTileEntity(xf, yf, zf, tileToSet); } if (blockI != null) { - TileEntity tileToSet = blockI.createTileEntity(worldI, stateI); + TileEntity tileToSet = blockI.createTileEntity(worldI, metaI); - worldI.setTileEntity(posi, tileToSet); + worldI.setTileEntity(xi, yi, zi, tileToSet); } //TILES CLEARED - worldF.setBlockState(posf, stateI, flag); + worldF.setBlock(xf, yf, zf, blockI, metaI, flag); if (tileEntityI != null) { TileEntity newTileEntityI = TileEntity.createAndLoadEntity(nbttag1); -// if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityI)) + if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityI)) { -// newTileEntityI = createMultipartFromNBT(worldF, nbttag1); + newTileEntityI = createMultipartFromNBT(worldF, nbttag1); } - worldF.setTileEntity(posf, newTileEntityI); + worldF.setTileEntity(xf, yf, zf, newTileEntityI); - newTileEntityI.setPos(posf); -// if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityI)) + newTileEntityI.xCoord = xf; + newTileEntityI.yCoord = yf; + newTileEntityI.zCoord = zf; + + if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityI)) { -// sendDescriptorOfTile(worldF, newTileEntityI); + sendDescriptorOfTile(worldF, newTileEntityI); } } - worldI.setBlockState(posi, stateF, flag); + worldI.setBlock(xi, yi, zi, finalBlock, metaF, flag); if (tileEntityF != null) { TileEntity newTileEntityF = TileEntity.createAndLoadEntity(nbttag2); -// if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityF)) + if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityF)) { -// newTileEntityF = createMultipartFromNBT(worldI, nbttag2); + newTileEntityF = createMultipartFromNBT(worldI, nbttag2); } - worldI.setTileEntity(posi, newTileEntityF); + worldI.setTileEntity(xi, yi, zi, newTileEntityF); - newTileEntityF.setPos(posi); + newTileEntityF.xCoord = xi; + newTileEntityF.yCoord = yi; + newTileEntityF.zCoord = zi; -// if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityF)) + if(AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityF)) { -// sendDescriptorOfTile(worldI, newTileEntityF); + sendDescriptorOfTile(worldI, newTileEntityF); } } return true; } -/* @Optional.Method(modid = "ForgeMultipart") + @Optional.Method(modid = "ForgeMultipart") public static boolean isMultipart(TileEntity tile) { return tile instanceof TileMultipart; } - + @Optional.Method(modid = "ForgeMultipart") public static TileEntity createMultipartFromNBT(World world, NBTTagCompound tag) { @@ -249,5 +289,4 @@ public class BlockTeleposer extends BlockContainer { MultipartHelper.sendDescPacket(world, tile); } - */ } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockWritingTable.java similarity index 50% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/BlockWritingTable.java index 9830f182..c55e50a8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockWritingTable.java @@ -1,10 +1,13 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; +import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -13,26 +16,58 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; +import net.minecraft.util.IIcon; import net.minecraft.world.World; import java.util.List; import java.util.Random; -public class BlockChemistrySet extends BlockContainer +public class BlockWritingTable extends BlockContainer { - public BlockChemistrySet() + @SideOnly(Side.CLIENT) + private IIcon topIcon; + @SideOnly(Side.CLIENT) + private IIcon sideIcon2; + @SideOnly(Side.CLIENT) + private IIcon bottomIcon; + + public BlockWritingTable() { super(Material.wood); setHardness(2.0F); setResistance(5.0F); + this.setBlockName("blockWritingTable"); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) { - TileEntity tileEntity = world.getTileEntity(blockPos); + this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:AlchemicChemistrySet"); + this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_SideType2"); + this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_Bottom"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) + { + switch (side) + { + case 0: + return bottomIcon; + case 1: + return topIcon; + default: + return sideIcon2; + } + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int metadata, float what, float these, float are) + { + TileEntity tileEntity = world.getTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { @@ -40,21 +75,21 @@ public class BlockChemistrySet extends BlockContainer } //code to open gui explained later - player.openGui(AlchemicalWizardry.instance, 0, world, blockPos.getX(), blockPos.getY(), blockPos.getZ()); + player.openGui(AlchemicalWizardry.instance, 0, world, x, y, z); return true; } @Override - public void breakBlock(World world, BlockPos blockPos, IBlockState blockState) + public void breakBlock(World world, int x, int y, int z, Block par5, int par6) { - dropItems(world, blockPos); - super.breakBlock(world, blockPos, blockState); + dropItems(world, x, y, z); + super.breakBlock(world, x, y, z, par5, par6); } - private void dropItems(World world, BlockPos blockPos) + private void dropItems(World world, int x, int y, int z) { Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(blockPos); + TileEntity tileEntity = world.getTileEntity(x, y, z); if (!(tileEntity instanceof IInventory)) { @@ -72,7 +107,9 @@ public class BlockChemistrySet extends BlockContainer float rx = rand.nextFloat() * 0.8F + 0.1F; float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, blockPos.getX() + rx, blockPos.getY() + ry, blockPos.getZ() + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); + EntityItem entityItem = new EntityItem(world, + x + rx, y + ry, z + rz, + new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { @@ -92,7 +129,13 @@ public class BlockChemistrySet extends BlockContainer @Override public TileEntity createNewTileEntity(World world, int meta) { - return new TEChemistrySet(); + return new TEWritingTable(); + } + + @Override + public boolean renderAsNormalBlock() + { + return false; } @Override @@ -108,21 +151,20 @@ public class BlockChemistrySet extends BlockContainer } @Override - public boolean hasTileEntity(IBlockState blockState) + public boolean hasTileEntity() { return true; } @Override - public void addCollisionBoxesToList(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, List list, Entity collidingEntity) + public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity) { this.setBlockBounds(0.4375F, 0.0F, 0.4375F, 0.5625F, 0.9375F, 0.5625F); - super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity); + super.addCollisionBoxesToList(par1World, par2, par3, par4, par5AxisAlignedBB, par6List, par7Entity); this.setBlockBoundsForItemRender(); - super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity); + super.addCollisionBoxesToList(par1World, par2, par3, par4, par5AxisAlignedBB, par6List, par7Entity); } - @Override public void setBlockBoundsForItemRender() { this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodRune.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodRune.java new file mode 100644 index 00000000..9b1cdf56 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodRune.java @@ -0,0 +1,132 @@ +package WayofTime.alchemicalWizardry.common.block; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModBlocks; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import java.util.List; + +public class BloodRune extends Block +{ + //private Icon bloodRuneIcon; + @SideOnly(Side.CLIENT) + private IIcon altarCapacityRuneIcon; + @SideOnly(Side.CLIENT) + private IIcon dislocationRuneIcon; + @SideOnly(Side.CLIENT) + private IIcon orbCapacityRuneIcon; + @SideOnly(Side.CLIENT) + private IIcon betterCapacityRuneIcon; + @SideOnly(Side.CLIENT) + private IIcon accelerationRuneIcon; + + public BloodRune() + { + super(Material.iron); + this.setBlockName("bloodRune"); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + setHardness(2.0F); + setResistance(5.0F); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:BlankRune"); + this.altarCapacityRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:AltarCapacityRune"); + this.dislocationRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:DislocationRune"); + this.orbCapacityRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:OrbCapacityRune"); + this.betterCapacityRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:BetterCapacityRune"); + this.accelerationRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:AccelerationRune"); + } + + public int getRuneEffect(int metaData) + { + switch (metaData) + { + case 0: + return 0; + + case 1: //Altar Capacity rune + return 5; + + case 2: //Filling/emptying rune + return 6; + + case 3: //Orb Capacity rune + return 7; + + case 4: //Better Capacity rune + return 8; + + case 5: //Acceleration rune + return 9; + } + + return 0; + } + + @SideOnly(Side.CLIENT) + + /** + * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) + */ + public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) + { + if (this.equals(ModBlocks.bloodRune)) + { + par3List.add(new ItemStack(par1, 1, 0)); + par3List.add(new ItemStack(par1, 1, 1)); + par3List.add(new ItemStack(par1, 1, 2)); + par3List.add(new ItemStack(par1, 1, 3)); + par3List.add(new ItemStack(par1, 1, 4)); + par3List.add(new ItemStack(par1, 1, 5)); + } else + { + super.getSubBlocks(par1, par2CreativeTabs, par3List); + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) + { + switch (meta) + { + case 0: + return blockIcon; + + case 1: + return altarCapacityRuneIcon; + + case 2: + return dislocationRuneIcon; + + case 3: + return this.orbCapacityRuneIcon; + + case 4: + return this.betterCapacityRuneIcon; + + case 5: + return this.accelerationRuneIcon; + default: + return blockIcon; + } + } + + @Override + public int damageDropped(int metadata) + { + return metadata; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodStoneBrick.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodStoneBrick.java new file mode 100644 index 00000000..054cd8b8 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodStoneBrick.java @@ -0,0 +1,27 @@ +package WayofTime.alchemicalWizardry.common.block; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; + +public class BloodStoneBrick extends Block +{ + public BloodStoneBrick() + { + super(Material.iron); + setHardness(2.0F); + setResistance(5.0F); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setBlockName("bloodStoneBrick"); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodStoneBrick"); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/EfficiencyRune.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/EfficiencyRune.java new file mode 100644 index 00000000..6226b917 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/EfficiencyRune.java @@ -0,0 +1,31 @@ +package WayofTime.alchemicalWizardry.common.block; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + +public class EfficiencyRune extends BloodRune +{ + public EfficiencyRune() + { + super(); + this.setBlockName("efficiencyRune"); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + setHardness(2.0F); + setResistance(5.0F); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:EfficiencyRune"); + } + + @Override + public int getRuneEffect(int metaData) + { + return 2; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/EmptySocket.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/EmptySocket.java new file mode 100644 index 00000000..f6964f63 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/EmptySocket.java @@ -0,0 +1,33 @@ +package WayofTime.alchemicalWizardry.common.block; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; + +public class EmptySocket extends Block +{ + public EmptySocket() + { + super(Material.iron); + setHardness(2.0F); + setResistance(5.0F); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setBlockName("emptySocket"); + } + + @Override + public boolean isOpaqueCube() + { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:EmptySocket"); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/IOrientable.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/IOrientable.java index f270aa72..7545d11c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/IOrientable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/IOrientable.java @@ -1,14 +1,14 @@ package WayofTime.alchemicalWizardry.common.block; -import net.minecraft.util.EnumFacing; +import net.minecraftforge.common.util.ForgeDirection; public interface IOrientable { - EnumFacing getInputDirection(); + ForgeDirection getInputDirection(); - EnumFacing getOutputDirection(); + ForgeDirection getOutputDirection(); - void setInputDirection(EnumFacing direction); + void setInputDirection(ForgeDirection direction); - void setOutputDirection(EnumFacing direction); + void setOutputDirection(ForgeDirection direction); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockImperfectRitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/ImperfectRitualStone.java similarity index 70% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/BlockImperfectRitualStone.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/ImperfectRitualStone.java index 6e409014..cde800fc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockImperfectRitualStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/ImperfectRitualStone.java @@ -1,49 +1,59 @@ package WayofTime.alchemicalWizardry.common.block; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.monster.EntityZombie; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -public class BlockImperfectRitualStone extends Block +public class ImperfectRitualStone extends Block { - public BlockImperfectRitualStone() + public ImperfectRitualStone() { super(Material.iron); setHardness(2.0F); setResistance(5.0F); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setBlockName("imperfectRitualStone"); } @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:ImperfectRitualStone"); + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float xOff, float yOff, float zOff) { if(SpellHelper.isFakePlayer(player)) { return false; } { - Block block = world.getBlockState(blockPos.add(0, 1, 0)).getBlock(); + Block block = world.getBlock(x, y + 1, z); if (block == Blocks.water) { if (!player.capabilities.isCreativeMode && !world.isRemote) { - SoulNetworkHandler.hurtPlayer(player, 5000); + EnergyItems.drainPlayerNetwork(player, 5000); } if (!world.isRemote) { - world.addWeatherEffect(new EntityLightningBolt(world, blockPos.getX(), blockPos.getY() + 2, blockPos.getZ())); + world.addWeatherEffect(new EntityLightningBolt(world, x, y + 2, z)); } world.getWorldInfo().setRaining(true); @@ -61,11 +71,11 @@ public class BlockImperfectRitualStone extends Block { if (!player.capabilities.isCreativeMode && !world.isRemote) { - SoulNetworkHandler.hurtPlayer(player, 5000); + EnergyItems.drainPlayerNetwork(player, 5000); } EntityZombie zomb = new EntityZombie(world); - zomb.setPosition(blockPos.getX() + 0.5, blockPos.getY() + 2, blockPos.getZ() + 0.5); + zomb.setPosition(x + 0.5, y + 2, z + 0.5); zomb.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2000)); zomb.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 20000, 7)); zomb.addPotionEffect(new PotionEffect(Potion.resistance.id, 20000, 3)); @@ -73,7 +83,7 @@ public class BlockImperfectRitualStone extends Block if (!world.isRemote) { world.spawnEntityInWorld(zomb); - world.addWeatherEffect(new EntityLightningBolt(world, blockPos.getX(), blockPos.getY() + 2, blockPos.getZ())); + world.addWeatherEffect(new EntityLightningBolt(world, x, y + 2, z)); } return true; @@ -81,24 +91,24 @@ public class BlockImperfectRitualStone extends Block { if (!player.capabilities.isCreativeMode && !world.isRemote) { - SoulNetworkHandler.hurtPlayer(player, 5000); + EnergyItems.drainPlayerNetwork(player, 5000); } if (!world.isRemote) { - world.addWeatherEffect(new EntityLightningBolt(world, blockPos.getX(), blockPos.getY() + 2, blockPos.getZ())); + world.addWeatherEffect(new EntityLightningBolt(world, x, y + 2, z)); world.setWorldTime((world.getWorldTime() / 24000) * 24000 + 13800); } } else if (block == Blocks.bedrock) { if (!player.capabilities.isCreativeMode && !world.isRemote) { - SoulNetworkHandler.hurtPlayer(player, 5000); + EnergyItems.drainPlayerNetwork(player, 5000); } if (!world.isRemote) { - world.addWeatherEffect(new EntityLightningBolt(world, blockPos.getX(), blockPos.getY() + 2, blockPos.getZ())); + world.addWeatherEffect(new EntityLightningBolt(world, x, y + 2, z)); } player.addPotionEffect(new PotionEffect(Potion.resistance.id, 60 * 20, 1)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/LargeBloodStoneBrick.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/LargeBloodStoneBrick.java new file mode 100644 index 00000000..623c2418 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/LargeBloodStoneBrick.java @@ -0,0 +1,27 @@ +package WayofTime.alchemicalWizardry.common.block; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; + +public class LargeBloodStoneBrick extends Block +{ + public LargeBloodStoneBrick() + { + super(Material.iron); + setHardness(2.0F); + setResistance(5.0F); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setBlockName("largeBloodStoneBrick"); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:LargeBloodStoneBrick"); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/LifeEssenceBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/LifeEssenceBlock.java new file mode 100644 index 00000000..79c6f8a4 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/LifeEssenceBlock.java @@ -0,0 +1,49 @@ +package WayofTime.alchemicalWizardry.common.block; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.fluids.BlockFluidClassic; + +public class LifeEssenceBlock extends BlockFluidClassic +{ + public LifeEssenceBlock() + { + super(AlchemicalWizardry.lifeEssenceFluid, Material.water); + AlchemicalWizardry.lifeEssenceFluid.setBlock(this); + this.setBlockName("lifeEssenceFluidBlock"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) + { + return this.blockIcon; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:lifeEssenceStill"); + AlchemicalWizardry.lifeEssenceFluid.setFlowingIcon(blockIcon); + AlchemicalWizardry.lifeEssenceFluid.setStillIcon(blockIcon); + } + + @Override + public boolean canDisplace(IBlockAccess world, int x, int y, int z) + { + return !world.getBlock(x, y, z).getMaterial().isLiquid() && super.canDisplace(world, x, y, z); + } + + @Override + public boolean displaceIfPossible(World world, int x, int y, int z) + { + return !world.getBlock(x, y, z).getMaterial().isLiquid() && super.displaceIfPossible(world, x, y, z); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/MimicBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/MimicBlock.java new file mode 100644 index 00000000..84dcdcb6 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/MimicBlock.java @@ -0,0 +1,231 @@ +package WayofTime.alchemicalWizardry.common.block; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.particle.EffectRenderer; +import net.minecraft.client.particle.EntityDiggingFX; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.IIcon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.tileEntity.TEMimicBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class MimicBlock extends BlockContainer +{ + public MimicBlock() + { + super(Material.water); + setHardness(2.0F); + setResistance(5.0F); + this.setBlockName("blockMimic"); +// this.setBlockBounds(0, 0, 0, 0, 0, 0); + } + + @Override + @SideOnly(Side.CLIENT) + public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) + { + TileEntity TE = world.getTileEntity(x, y, z); + if(!(TE instanceof TEMimicBlock)) + { + return true; + } + TEMimicBlock mimic = (TEMimicBlock)TE; + + Block block = mimic.getBlock(); + + return block == null || block.shouldSideBeRendered(world, x, y, z, side); + } + + @SideOnly(Side.CLIENT) + public int getRenderBlockPass() + { + return 1; + } + + @Override + public boolean canCollideCheck(int meta, boolean bool) + { + return meta == 1; + } + + @SideOnly(Side.CLIENT) + @Override + /** + * Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side + */ + public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) + { + TileEntity TE = blockAccess.getTileEntity(x, y, z); + TEMimicBlock mimic = (TEMimicBlock)TE; + Block block = mimic.getBlock(); + int meta = mimic.getMetaOfMimic(); + + return block != null ? block.getIcon(side, meta) : this.blockIcon; + } + + public boolean isOpaqueCube() + { + return false; + } + + @Override + public TileEntity createNewTileEntity(World world, int meta) + { + return new TEMimicBlock(); + } + + @Override + public boolean canSilkHarvest(World world, EntityPlayer player, int x, int y, int z, int metadata) + { + return false; + } + + @Override + public int quantityDropped(int meta, int fortune, Random random) + { + return 0; + } + + @Override + public boolean isBlockSolid(IBlockAccess world, int x, int y, int z, int meta) + { + TileEntity tile = world.getTileEntity(x, y, z); + if(tile instanceof TEMimicBlock) + { + Block block = ((TEMimicBlock) tile).getBlock(); + int mimicMeta = ((TEMimicBlock) tile).getMetaOfMimic(); + + if(block != null) + { + return block.isBlockSolid(world, x, y, z, mimicMeta); + } + } + return super.isBlockSolid(world, x, y, z, meta); + } + + @Override + public boolean addHitEffects(World world, MovingObjectPosition target, EffectRenderer effectRenderer) + { + TileEntity tile = world.getTileEntity(target.blockX, target.blockY, target.blockZ); + + TEMimicBlock TE = (TEMimicBlock)tile; + + if (TE != null) + { + Block block = TE.getBlock(); + + double xOffset = target.blockX + world.rand.nextDouble() * (block.getBlockBoundsMaxX() - block.getBlockBoundsMinX() - 0.1F * 2.0F) + 0.1F + block.getBlockBoundsMinX(); + double yOffset = target.blockY + world.rand.nextDouble() * (block.getBlockBoundsMaxY() - block.getBlockBoundsMinY() - 0.1F * 2.0F) + 0.1F + block.getBlockBoundsMinY(); + double zOffset = target.blockZ + world.rand.nextDouble() * (block.getBlockBoundsMaxZ() - block.getBlockBoundsMinZ() - 0.1F * 2.0F) + 0.1F + block.getBlockBoundsMinZ(); + + switch (target.sideHit) { + case 0: + yOffset = target.blockY + block.getBlockBoundsMinY() - 0.1D; + break; + case 1: + yOffset = target.blockY + block.getBlockBoundsMaxY() + 0.1D; + break; + case 2: + zOffset = target.blockZ + block.getBlockBoundsMinZ() - 0.1D; + break; + case 3: + zOffset = target.blockZ + block.getBlockBoundsMaxZ() + 0.1D; + break; + case 4: + xOffset = target.blockX + block.getBlockBoundsMinX() - 0.1D; + break; + case 5: + xOffset = target.blockX + block.getBlockBoundsMaxX() + 0.1D; + break; + } + + MimicBlock.addHitEffect(TE, target, xOffset, yOffset, zOffset, null, effectRenderer); + + return true; + + } + + return super.addHitEffects(world, target, effectRenderer); + } + + @Override + public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) + { + TEMimicBlock tile = (TEMimicBlock)world.getTileEntity(x, y, z); + Block block = tile.getBlock(); + + return block != null ? block.getCollisionBoundingBoxFromPool(world, x, y, z) : super.getCollisionBoundingBoxFromPool(world, x, y, z); + } + + @Override + @SideOnly(Side.CLIENT) + public int colorMultiplier(IBlockAccess blockAccess, int x, int y, int z) + { + TEMimicBlock TE = (TEMimicBlock)blockAccess.getTileEntity(x, y, z); + if (TE != null) + { + Block block = TE.getBlock(); + if(block != null) + { + return block.colorMultiplier(blockAccess, x, y, z); + } + } + + return super.colorMultiplier(blockAccess, x, y, z); + } + + @Override + public void velocityToAddToEntity(World world, int x, int y, int z, Entity entity, Vec3 vec) + { + TEMimicBlock TE = (TEMimicBlock)world.getTileEntity(x, y, z); + if (TE != null) + { + Block block = TE.getBlock(); + if(block != null) + { + block.velocityToAddToEntity(world, x, y, z, entity, vec); + } + } + } + + public static void addHitEffect(TEMimicBlock TE, MovingObjectPosition target, double x, double y, double z, ItemStack itemStack, EffectRenderer effectRenderer) + { + EntityDiggingFX particle = new EntityDiggingFX(TE.getWorldObj(), x, y, z, 0.0D, 0.0D, 0.0D, TE.getBlock(), TE.getMetaOfMimic()); + effectRenderer.addEffect(particle.applyColourMultiplier(target.blockX, target.blockY, target.blockZ).multiplyVelocity(0.2F).multipleParticleScaleBy(0.6F)); + } + + @Override + public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) + { + TEMimicBlock TE = (TEMimicBlock)world.getTileEntity(x, y, z); + if (TE != null) + { + if(TE.getBlockEffectWhileInside(entity, x, y, z)) + { + return; + }else + { + Block block = TE.getBlock(); + if(block != null) + { + block.onEntityCollidedWithBlock(world, x, y, z, entity); + return; + } + } + } + + super.onEntityCollidedWithBlock(world, x, y, z, entity); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/RitualStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/RitualStone.java new file mode 100644 index 00000000..ae839bed --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/RitualStone.java @@ -0,0 +1,133 @@ +package WayofTime.alchemicalWizardry.common.block; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.rituals.IRitualStone; +import WayofTime.alchemicalWizardry.common.items.ScribeTool; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class RitualStone extends Block implements IRitualStone +{ + @SideOnly(Side.CLIENT) + private IIcon blankIcon; + @SideOnly(Side.CLIENT) + private IIcon waterStoneIcon; + @SideOnly(Side.CLIENT) + private IIcon fireStoneIcon; + @SideOnly(Side.CLIENT) + private IIcon earthStoneIcon; + @SideOnly(Side.CLIENT) + private IIcon airStoneIcon; + @SideOnly(Side.CLIENT) + private IIcon duskStoneIcon; + @SideOnly(Side.CLIENT) + private IIcon dawnStoneIcon; + + public RitualStone() + { + super(Material.iron); + setHardness(2.0F); + setResistance(5.0F); + this.setBlockName("ritualStone"); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.blankIcon = iconRegister.registerIcon("AlchemicalWizardry:RitualStone"); + this.waterStoneIcon = iconRegister.registerIcon("AlchemicalWizardry:WaterRitualStone"); + this.fireStoneIcon = iconRegister.registerIcon("AlchemicalWizardry:FireRitualStone"); + this.earthStoneIcon = iconRegister.registerIcon("AlchemicalWizardry:EarthRitualStone"); + this.airStoneIcon = iconRegister.registerIcon("AlchemicalWizardry:AirRitualStone"); + this.duskStoneIcon = iconRegister.registerIcon("AlchemicalWizardry:DuskRitualStone"); + this.dawnStoneIcon = iconRegister.registerIcon("AlchemicalWizardry:LightRitualStone"); + } + + @Override + public int damageDropped(int metadata) + { + return 0; + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) + { + ItemStack playerItem = player.getCurrentEquippedItem(); + + if (playerItem == null) + { + return false; + } + + Item item = playerItem.getItem(); + + if (!(item instanceof ScribeTool)) + { + return false; + } + + if (playerItem.getMaxDamage() <= playerItem.getItemDamage() && !(playerItem.getMaxDamage() == 0)) + { + return false; + } + + ScribeTool scribeTool = (ScribeTool) item; + + if (!player.capabilities.isCreativeMode) + { + playerItem.setItemDamage(playerItem.getItemDamage() + 1); + } + + world.setBlockMetadataWithNotify(x, y, z, scribeTool.getType(), 3); + world.markBlockForUpdate(x, y, z); + return true; + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int metadata) + { + switch (metadata) + { + case 0: + return blankIcon; + + case 1: + return waterStoneIcon; + + case 2: + return fireStoneIcon; + + case 3: + return earthStoneIcon; + + case 4: + return airStoneIcon; + + case 5: + return duskStoneIcon; + + case 6: + return dawnStoneIcon; + + default: + return blankIcon; + } + } + + @Override + public boolean isRuneType(World world, int x, int y, int z, int meta, int runeType) + { + return meta == runeType; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSacrifice.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSacrifice.java new file mode 100644 index 00000000..2094e97a --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSacrifice.java @@ -0,0 +1,31 @@ +package WayofTime.alchemicalWizardry.common.block; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + +public class RuneOfSacrifice extends BloodRune +{ + public RuneOfSacrifice() + { + super(); + this.setBlockName("runeOfSacrifice"); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + setHardness(2.0F); + setResistance(5.0F); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:RuneOfSacrifice"); + } + + @Override + public int getRuneEffect(int metaData) + { + return 3; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSelfSacrifice.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSelfSacrifice.java new file mode 100644 index 00000000..2c13ce41 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/RuneOfSelfSacrifice.java @@ -0,0 +1,31 @@ +package WayofTime.alchemicalWizardry.common.block; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + +public class RuneOfSelfSacrifice extends BloodRune +{ + public RuneOfSelfSacrifice() + { + super(); + this.setBlockName("runeOfSelfSacrifice"); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + setHardness(2.0F); + setResistance(5.0F); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:RuneOfSelfSacrifice"); + } + + @Override + public int getRuneEffect(int metaData) + { + return 4; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectral.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/SpectralBlock.java similarity index 54% rename from src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectral.java rename to src/main/java/WayofTime/alchemicalWizardry/common/block/SpectralBlock.java index 5ad9f527..9ff5313a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpectral.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/SpectralBlock.java @@ -1,33 +1,41 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; +import net.minecraft.util.Facing; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import java.util.Random; -public class BlockSpectral extends BlockContainer +public class SpectralBlock extends BlockContainer { - public BlockSpectral() + public SpectralBlock() { super(Material.rock); + this.setBlockName("spectralBlock"); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:SpectralBlock"); } @Override public boolean isOpaqueCube() { + Block d; return false; } @@ -37,13 +45,12 @@ public class BlockSpectral extends BlockContainer return 0; } - @Override @SideOnly(Side.CLIENT) - public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, BlockPos blockPos, EnumFacing side) + public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) { - Block block = p_149646_1_.getBlockState(blockPos).getBlock(); + Block block = p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_); - if (p_149646_1_.getBlockState(blockPos) != p_149646_1_.getBlockState(blockPos.add(-side.getFrontOffsetX(), -side.getFrontOffsetY(), -side.getFrontOffsetZ()))) + if (p_149646_1_.getBlockMetadata(p_149646_2_, p_149646_3_, p_149646_4_) != p_149646_1_.getBlockMetadata(p_149646_2_ - Facing.offsetsXForSide[p_149646_5_], p_149646_3_ - Facing.offsetsYForSide[p_149646_5_], p_149646_4_ - Facing.offsetsZForSide[p_149646_5_])) { return true; } @@ -53,11 +60,20 @@ public class BlockSpectral extends BlockContainer return false; } - return block != this && super.shouldSideBeRendered(p_149646_1_, blockPos, side); + return block != this && super.shouldSideBeRendered(p_149646_1_, p_149646_2_, p_149646_3_, p_149646_4_, p_149646_5_); + } + + @SideOnly(Side.CLIENT) + /** + * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha + */ + public int getRenderBlockPass() + { + return 1; } @Override - public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { if (player.isSneaking()) { @@ -70,7 +86,7 @@ public class BlockSpectral extends BlockContainer { if (playerItem.getItem() instanceof ItemBlock) { - world.addBlockEvent(blockPos, ((ItemBlock) playerItem.getItem()).getBlock(), playerItem.getItemDamage(), 3); + world.setBlock(x, y, z, ((ItemBlock) (playerItem.getItem())).field_150939_a, playerItem.getItemDamage(), 3); if (!player.capabilities.isCreativeMode) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/SpeedRune.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/SpeedRune.java new file mode 100644 index 00000000..ac628ad6 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/SpeedRune.java @@ -0,0 +1,31 @@ +package WayofTime.alchemicalWizardry.common.block; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + +public class SpeedRune extends BloodRune +{ + public SpeedRune() + { + super(); + this.setBlockName("speedRune"); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + setHardness(2.0F); + setResistance(5.0F); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) + { + this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:SpeedRune"); + } + + @Override + public int getRuneEffect(int metaData) + { + return 1; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarComponent.java b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarComponent.java index 06e1a3e6..4aeb4e75 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarComponent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarComponent.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; public class AltarComponent { @@ -48,11 +47,6 @@ public class AltarComponent { return metadata; } - - public IBlockState getBlockState() - { - return block.getStateFromMeta(getMetadata()); - } public boolean isBloodRune() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java index 013b550b..23d0845b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java @@ -4,28 +4,26 @@ import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.IFadedRune; -import WayofTime.alchemicalWizardry.common.block.BlockBloodRune; +import WayofTime.alchemicalWizardry.common.block.BloodRune; public class UpgradedAltars { - public static List<AltarComponent> secondTierAltar = new ArrayList<AltarComponent>(); - public static List<AltarComponent> thirdTierAltar = new ArrayList<AltarComponent>(); - public static List<AltarComponent> fourthTierAltar = new ArrayList<AltarComponent>(); - public static List<AltarComponent> fifthTierAltar = new ArrayList<AltarComponent>(); - public static List<AltarComponent> sixthTierAltar = new ArrayList<AltarComponent>(); + public static List<AltarComponent> secondTierAltar = new ArrayList(); + public static List<AltarComponent> thirdTierAltar = new ArrayList(); + public static List<AltarComponent> fourthTierAltar = new ArrayList(); + public static List<AltarComponent> fifthTierAltar = new ArrayList(); + public static List<AltarComponent> sixthTierAltar = new ArrayList(); public static int highestAltar = 6; - public static int isAltarValid(World world, BlockPos pos) + public static int isAltarValid(World world, int x, int y, int z) { for (int i = highestAltar; i >= 2; i--) { - if (checkAltarIsValid(world, pos, i)) + if (checkAltarIsValid(world, x, y, z, i)) { return i; } @@ -34,37 +32,144 @@ public class UpgradedAltars return 1; } - public static boolean checkAltarIsValid(World world, BlockPos pos, int altarTier) + public static boolean checkAltarIsValid(World world, int x, int y, int z, int altarTier) { - List<AltarComponent> list = UpgradedAltars.getAltarUpgradeListForTier(altarTier); - - for (AltarComponent ac : list) + switch (altarTier) { - BlockPos newPos = pos.add(ac.getX(), ac.getY(), ac.getZ()); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - - if (ac.isBloodRune()) - { - if (!(block instanceof BlockBloodRune)) - { - return false; - } - } else - { - int metadata = block.getMetaFromState(state); + case 1: + return true; - if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(newPos))) + case 2: + for (AltarComponent ac : secondTierAltar) { - return false; + if (ac.isBloodRune()) + { + Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); + + if (!(testBlock instanceof BloodRune)) + { + return false; + } + } else + { + Block block = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); + int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); + + if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) + { + return false; + } + } } - } + + return true; + + case 3: + for (AltarComponent ac : thirdTierAltar) + { + if (ac.isBloodRune()) + { + Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); + + if (!(testBlock instanceof BloodRune)) + { + return false; + } + } else + { + Block block = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); + int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); + + if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) + { + return false; + } + } + } + + return true; + + case 4: + for (AltarComponent ac : fourthTierAltar) + { + if (ac.isBloodRune()) + { + Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); + + if (!(testBlock instanceof BloodRune)) + { + return false; + } + } else + { + Block block = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); + int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); + + if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) + { + return false; + } + } + } + + return true; + + case 5: + for (AltarComponent ac : fifthTierAltar) + { + if (ac.isBloodRune()) + { + Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); + + if (!(testBlock instanceof BloodRune)) + { + return false; + } + } else + { + Block block = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); + int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); + + if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) + { + return false; + } + } + } + + return true; + + case 6: + for (AltarComponent ac : sixthTierAltar) + { + if (ac.isBloodRune()) + { + Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); + + if (!(testBlock instanceof BloodRune)) + { + return false; + } + } else + { + Block block = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); + int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); + + if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) + { + return false; + } + } + } + + return true; + + default: + return false; } - - return true; } - public static AltarUpgradeComponent getUpgrades(World world, BlockPos pos, int altarTier) + public static AltarUpgradeComponent getUpgrades(World world, int x, int y, int z, int altarTier) { if(world.isRemote) { @@ -75,24 +180,21 @@ public class UpgradedAltars for (AltarComponent ac : list) { - BlockPos newPos = pos.add(ac.getX(), ac.getY(), ac.getZ()); - if (ac.isUpgradeSlot()) { //Currently checks the getRuneEffect. //TODO Change so that it uses the metadata instead, with the BlockID. - IBlockState state = world.getBlockState(newPos); - Block testBlock = state.getBlock(); - int meta = testBlock.getMetaFromState(state); + Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); + int meta = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - if (testBlock instanceof BlockBloodRune) + if (testBlock instanceof BloodRune) { if (testBlock instanceof IFadedRune && altarTier > ((IFadedRune)testBlock).getAltarTierLimit(meta)) { - return UpgradedAltars.getUpgrades(world, pos, ((IFadedRune)testBlock).getAltarTierLimit(meta)); + return UpgradedAltars.getUpgrades(world, x, y, z, ((IFadedRune)testBlock).getAltarTierLimit(meta)); } - switch (((BlockBloodRune) testBlock).getRuneEffect(meta)) + switch (((BloodRune) testBlock).getRuneEffect(meta)) { case 1: upgrades.addSpeedUpgrade(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/book/BloodMagicGuide.java b/src/main/java/WayofTime/alchemicalWizardry/common/book/BloodMagicGuide.java index 071bfd5a..39204a70 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/book/BloodMagicGuide.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/book/BloodMagicGuide.java @@ -1,836 +1,836 @@ -//package WayofTime.alchemicalWizardry.common.book; -// -//import java.awt.Color; -//import java.util.ArrayList; -//import java.util.List; -// -//import net.minecraft.item.ItemStack; -//import net.minecraft.item.crafting.IRecipe; -//import net.minecraft.util.ResourceLocation; -//import net.minecraft.util.StatCollector; -//import WayofTime.alchemicalWizardry.AlchemicalWizardry; -//import WayofTime.alchemicalWizardry.ModBlocks; -//import WayofTime.alchemicalWizardry.ModItems; -//import WayofTime.alchemicalWizardry.api.guide.OrbRecipeRenderer; -//import WayofTime.alchemicalWizardry.api.guide.PageAltarRecipe; -//import WayofTime.alchemicalWizardry.common.guide.RecipeHolder; -//import amerifrance.guideapi.api.GuideRegistry; -//import amerifrance.guideapi.api.abstraction.CategoryAbstract; -//import amerifrance.guideapi.api.abstraction.EntryAbstract; -//import amerifrance.guideapi.api.abstraction.IPage; -//import amerifrance.guideapi.api.base.Book; -//import amerifrance.guideapi.api.util.BookBuilder; -//import amerifrance.guideapi.api.util.PageHelper; -//import amerifrance.guideapi.categories.CategoryItemStack; -//import amerifrance.guideapi.entries.EntryUniText; -//import amerifrance.guideapi.pages.PageIRecipe; -//import amerifrance.guideapi.pages.PageUnlocImage; -// -//public class BloodMagicGuide -//{ -// public static Book bloodMagicGuide; -// public static List<CategoryAbstract> categories = new ArrayList(); -// -// public static void registerGuide() -// { -// registerArchitectBook(); -// registerRitualBook(); -// registerDemonBook(); -// registerSpellBook(); -// registerAlchemyBook(); -// -// BookBuilder bmBookBuilder = new BookBuilder(); -// bmBookBuilder.setCategories(categories).setUnlocBookTitle("guide.BloodMagic.book.title").setUnlocWelcomeMessage("guide.BloodMagic.welcomeMessage").setUnlocDisplayName("guide.BloodMagic.book.name").setBookColor(new Color(190, 10, 0)).setAuthor("--Blood Magic"); -// -//// bloodMagicGuide = new Book(categories, "guide.BloodMagic.book.title", "guide.BloodMagic.welcomeMessage", "guide.BloodMagic.book.name", new Color(190, 10, 0)); -// bloodMagicGuide = bmBookBuilder.build(); -// GuideRegistry.registerBook(bloodMagicGuide); -// } -// -// public static PageIRecipe getOrbPageForRecipe(IRecipe recipe) -// { -// return new PageIRecipe(recipe, new OrbRecipeRenderer(recipe)); -// } -// -// public static void registerArchitectBook() -// { -// List<EntryAbstract> entries = new ArrayList(); -// -// ArrayList<IPage> introPages = new ArrayList(); -// introPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.intro"))); -// entries.add(new EntryUniText(introPages, "guide.BloodMagic.entryName.architect.intro")); -// -// ArrayList<IPage> bloodAltarPages = new ArrayList(); -// bloodAltarPages.add(new PageIRecipe(RecipeHolder.bloodAltarRecipe)); -// bloodAltarPages.add(new PageIRecipe(RecipeHolder.knifeRecipe)); -// bloodAltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodAltar.1"))); -// bloodAltarPages.add(new PageAltarRecipe(RecipeHolder.weakBloodOrbRecipe)); -// bloodAltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodAltar.2"))); -// entries.add(new EntryUniText(bloodAltarPages, "guide.BloodMagic.entryName.architect.bloodAltar")); -// -// ArrayList<IPage> soulNetworkPages = new ArrayList(); -// soulNetworkPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulNetwork"))); -// entries.add(new EntryUniText(soulNetworkPages, "guide.BloodMagic.entryName.architect.soulNetwork")); -// -// ArrayList<IPage> blankSlatePages = new ArrayList(); -// blankSlatePages.add(new PageAltarRecipe(RecipeHolder.blankSlateRecipe)); -// blankSlatePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.blankSlate"))); -// entries.add(new EntryUniText(blankSlatePages, "guide.BloodMagic.entryName.architect.blankSlate")); -// -// ArrayList<IPage> divinationSigilPages = new ArrayList(); -// divinationSigilPages.add(getOrbPageForRecipe(RecipeHolder.divinationSigilRecipe)); -// divinationSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.divination"))); -// entries.add(new EntryUniText(divinationSigilPages, "guide.BloodMagic.entryName.architect.divination")); -// -// ArrayList<IPage> waterSigilPages = new ArrayList(); -// waterSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.waterSigil.1"))); -// waterSigilPages.add(getOrbPageForRecipe(RecipeHolder.waterSigilRecipe)); -// waterSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.waterSigil.2"))); -// entries.add(new EntryUniText(waterSigilPages, "guide.BloodMagic.entryName.architect.waterSigil")); -// -// ArrayList<IPage> lavaCrystalPages = new ArrayList(); -// lavaCrystalPages.add(getOrbPageForRecipe(RecipeHolder.lavaCrystalRecipe)); -// lavaCrystalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.lavaCrystal"))); -// entries.add(new EntryUniText(lavaCrystalPages, "guide.BloodMagic.entryName.architect.lavaCrystal")); -// -// ArrayList<IPage> hellHarvestPages = new ArrayList(); -// hellHarvestPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.hellHarvest"))); -// entries.add(new EntryUniText(hellHarvestPages, "guide.BloodMagic.entryName.architect.hellHarvest")); -// -// ArrayList<IPage> lavaSigilPages = new ArrayList(); -// lavaSigilPages.add(new PageIRecipe(RecipeHolder.lavaSigilRecipe)); -// lavaSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.lavaSigil"))); -// entries.add(new EntryUniText(lavaSigilPages, "guide.BloodMagic.entryName.architect.lavaSigil")); -// -// ArrayList<IPage> blankRunePages = new ArrayList(); -// blankRunePages.add(getOrbPageForRecipe(RecipeHolder.blankRuneRecipe)); -// blankRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.blankRunes.1"))); -// blankRunePages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T2.png"), true)); -// blankRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.blankRunes.2"))); -// entries.add(new EntryUniText(blankRunePages, "guide.BloodMagic.entryName.architect.blankRunes")); -// -// ArrayList<IPage> speedRunePages = new ArrayList(); -// speedRunePages.add(new PageIRecipe(RecipeHolder.speedRuneRecipe)); -// speedRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.speedRunes"))); -// entries.add(new EntryUniText(speedRunePages, "guide.BloodMagic.entryName.architect.speedRunes")); -// -// ArrayList<IPage> apprenticeOrbPages = new ArrayList(); -// apprenticeOrbPages.add(new PageAltarRecipe(RecipeHolder.apprenticeBloodOrbRecipe)); -// apprenticeOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.apprenticeOrb"))); -// entries.add(new EntryUniText(apprenticeOrbPages, "guide.BloodMagic.entryName.architect.apprenticeOrb")); -// -// ArrayList<IPage> voidSigilPages = new ArrayList(); -// voidSigilPages.add(getOrbPageForRecipe(RecipeHolder.voidSigilRecipe)); -// voidSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.voidSigil"))); -// entries.add(new EntryUniText(voidSigilPages, "guide.BloodMagic.entryName.architect.voidSigil")); -// -// ArrayList<IPage> airSigilPages = new ArrayList(); -// airSigilPages.add(getOrbPageForRecipe(RecipeHolder.airSigilRecipe)); -// airSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.airSigil"))); -// entries.add(new EntryUniText(airSigilPages, "guide.BloodMagic.entryName.architect.airSigil")); -// -// ArrayList<IPage> sightSigilPages = new ArrayList(); -// sightSigilPages.add(getOrbPageForRecipe(RecipeHolder.sightSigilRecipe)); -// sightSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sightSigil"))); -// entries.add(new EntryUniText(sightSigilPages, "guide.BloodMagic.entryName.architect.sightSigil")); -// -// ArrayList<IPage> advancedAltarPages = new ArrayList(); -// advancedAltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.advancedAltar"))); -// entries.add(new EntryUniText(advancedAltarPages, "guide.BloodMagic.entryName.architect.advancedAltar")); -// -// ArrayList<IPage> fastMinerPages = new ArrayList(); -// fastMinerPages.add(getOrbPageForRecipe(RecipeHolder.fastMinerRecipe)); -// fastMinerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fastMiner"))); -// entries.add(new EntryUniText(fastMinerPages, "guide.BloodMagic.entryName.architect.fastMiner")); -// -// ArrayList<IPage> soulFrayPages = new ArrayList(); -// soulFrayPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulFray"))); -// entries.add(new EntryUniText(soulFrayPages, "guide.BloodMagic.entryName.architect.soulFray")); -// -// ArrayList<IPage> greenGrovePages = new ArrayList(); -// greenGrovePages.add(getOrbPageForRecipe(RecipeHolder.greenGroveRecipe)); -// greenGrovePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.greenGrove"))); -// entries.add(new EntryUniText(greenGrovePages, "guide.BloodMagic.entryName.architect.greenGrove")); -// -// ArrayList<IPage> daggerPages = new ArrayList(); -// daggerPages.add(new PageAltarRecipe(RecipeHolder.daggerRecipe)); -// daggerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.dagger"))); -// entries.add(new EntryUniText(daggerPages, "guide.BloodMagic.entryName.architect.dagger")); -// -// ArrayList<IPage> sacrificePages = new ArrayList(); -// sacrificePages.add(getOrbPageForRecipe(RecipeHolder.selfSacrificeRuneRecipe)); -// sacrificePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sacrifice.1"))); -// sacrificePages.add(getOrbPageForRecipe(RecipeHolder.sacrificeRuneRecipe)); -// sacrificePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sacrifice.2"))); -// entries.add(new EntryUniText(sacrificePages, "guide.BloodMagic.entryName.architect.sacrifice")); -// -// ArrayList<IPage> bloodPackPages = new ArrayList(); -// bloodPackPages.add(new PageIRecipe(RecipeHolder.bloodPackRecipe)); -// bloodPackPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodPack"))); -// entries.add(new EntryUniText(bloodPackPages, "guide.BloodMagic.entryName.architect.bloodPack")); -// -// ArrayList<IPage> fivePeoplePages = new ArrayList(); -// fivePeoplePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fivePeople"))); -// entries.add(new EntryUniText(fivePeoplePages, "guide.BloodMagic.entryName.architect.fivePeople")); -// -// ArrayList<IPage> tier3Pages = new ArrayList(); -// tier3Pages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T3.png"), true)); -// tier3Pages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier3"))); -// entries.add(new EntryUniText(tier3Pages, "guide.BloodMagic.entryName.architect.tier3")); -// -// ArrayList<IPage> magicianOrbPages = new ArrayList(); -// magicianOrbPages.add(new PageAltarRecipe(RecipeHolder.magicianBloodOrbRecipe)); -// magicianOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.magicianOrb"))); -// entries.add(new EntryUniText(magicianOrbPages, "guide.BloodMagic.entryName.architect.magicianOrb")); -// -// ArrayList<IPage> newRunePages = new ArrayList(); -// newRunePages.add(getOrbPageForRecipe(RecipeHolder.capacityRuneRecipe)); -// newRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.newRune.1"))); -// newRunePages.add(getOrbPageForRecipe(RecipeHolder.dislocationRuneRecipe)); -// newRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.newRune.2"))); -// entries.add(new EntryUniText(newRunePages, "guide.BloodMagic.entryName.architect.newRune")); -// -// ArrayList<IPage> magnetismPages = new ArrayList(); -// magnetismPages.add(getOrbPageForRecipe(RecipeHolder.magnetismSigilRecipe)); -// magnetismPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.magnetism"))); -// entries.add(new EntryUniText(magnetismPages, "guide.BloodMagic.entryName.architect.magnetism")); -// -// ArrayList<IPage> phantomBridgePages = new ArrayList(); -// phantomBridgePages.add(getOrbPageForRecipe(RecipeHolder.phantomBridgeRecipe)); -// phantomBridgePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.phantomBridge"))); -// entries.add(new EntryUniText(phantomBridgePages, "guide.BloodMagic.entryName.architect.phantomBridge")); -// -// ArrayList<IPage> holdingPages = new ArrayList(); -// holdingPages.add(getOrbPageForRecipe(RecipeHolder.holdingSigilRecipe)); -// holdingPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.holding"))); -// entries.add(new EntryUniText(holdingPages, "guide.BloodMagic.entryName.architect.holding")); -// -// ArrayList<IPage> elementalAffinityPages = new ArrayList(); -// elementalAffinityPages.add(getOrbPageForRecipe(RecipeHolder.affinitySigilRecipe)); -// elementalAffinityPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.elementalAffinity"))); -// entries.add(new EntryUniText(elementalAffinityPages, "guide.BloodMagic.entryName.architect.elementalAffinity")); -// -// ArrayList<IPage> ritualStonesPages = new ArrayList(); -// ritualStonesPages.add(getOrbPageForRecipe(RecipeHolder.ritualStoneRecipe)); -// ritualStonesPages.add(getOrbPageForRecipe(RecipeHolder.masterStoneRecipe)); -// ritualStonesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.ritualStones"))); -// entries.add(new EntryUniText(ritualStonesPages, "guide.BloodMagic.entryName.architect.ritualStones")); -// -// ArrayList<IPage> bloodLampPages = new ArrayList(); -// bloodLampPages.add(getOrbPageForRecipe(RecipeHolder.bloodLampRecipe)); -// bloodLampPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodLamp"))); -// entries.add(new EntryUniText(bloodLampPages, "guide.BloodMagic.entryName.architect.bloodLamp")); -// -// ArrayList<IPage> boundArmourPages = new ArrayList(); -// boundArmourPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.boundArmour.1"))); -// boundArmourPages.add(new PageIRecipe(RecipeHolder.emptySocketRecipe)); -// boundArmourPages.add(new PageAltarRecipe(RecipeHolder.filledSocketRecipe)); -// boundArmourPages.add(getOrbPageForRecipe(RecipeHolder.soulForgeRecipe)); -// boundArmourPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.boundArmour.2"))); -// entries.add(new EntryUniText(boundArmourPages, "guide.BloodMagic.entryName.architect.boundArmour")); -// -// if(AlchemicalWizardry.isThaumcraftLoaded) -// { -// ArrayList<IPage> sanguineArmourPages = new ArrayList(); -// sanguineArmourPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sanguineArmour"), new ItemStack(ModItems.sanguineRobe))); -// entries.add(new EntryUniText(sanguineArmourPages, "guide.BloodMagic.entryName.architect.sanguineArmour")); -// } -// -// ArrayList<IPage> soulSuppressPages = new ArrayList(); -// soulSuppressPages.add(new PageIRecipe(RecipeHolder.inhibitorRecipe)); -// soulSuppressPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulSuppress"))); -// entries.add(new EntryUniText(soulSuppressPages, "guide.BloodMagic.entryName.architect.soulSuppress")); -// -// ArrayList<IPage> ritualDivinerPages = new ArrayList(); -// ritualDivinerPages.add(new PageIRecipe(RecipeHolder.ritualDiviner1Recipe)); -// ritualDivinerPages.add(new PageIRecipe(RecipeHolder.ritualDiviner2Recipe)); -// ritualDivinerPages.add(new PageIRecipe(RecipeHolder.ritualDiviner3Recipe)); -// ritualDivinerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.ritualDiviner"))); -// entries.add(new EntryUniText(ritualDivinerPages, "guide.BloodMagic.entryName.architect.ritualDiviner")); -// -// ArrayList<IPage> bloodShardPages = new ArrayList(); -// bloodShardPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodShard"), new ItemStack(ModItems.weakBloodShard))); -// entries.add(new EntryUniText(bloodShardPages, "guide.BloodMagic.entryName.architect.bloodShard")); -// -// ArrayList<IPage> tier4AltarPages = new ArrayList(); -// tier4AltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier4Altar.1"))); -// tier4AltarPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T4.png"), true)); -// tier4AltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier4Altar.2"))); -// entries.add(new EntryUniText(tier4AltarPages, "guide.BloodMagic.entryName.architect.tier4Altar")); -// -// ArrayList<IPage> masterOrbPages = new ArrayList(); -// masterOrbPages.add(new PageAltarRecipe(RecipeHolder.masterBloodOrbRecipe)); -// masterOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.masterOrb"))); -// entries.add(new EntryUniText(masterOrbPages, "guide.BloodMagic.entryName.architect.masterOrb")); -// -// ArrayList<IPage> whirlwindPages = new ArrayList(); -// whirlwindPages.add(getOrbPageForRecipe(RecipeHolder.whirlwindSigilRecipe)); -// whirlwindPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.whirlwind"))); -// entries.add(new EntryUniText(whirlwindPages, "guide.BloodMagic.entryName.architect.whirlwind")); -// -// ArrayList<IPage> compressionPages = new ArrayList(); -// compressionPages.add(getOrbPageForRecipe(RecipeHolder.compressionSigilRecipe)); -// compressionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.compression"))); -// entries.add(new EntryUniText(compressionPages, "guide.BloodMagic.entryName.architect.compression")); -// -// ArrayList<IPage> severancePages = new ArrayList(); -// severancePages.add(getOrbPageForRecipe(RecipeHolder.enderSeveranceSigilRecipe)); -// severancePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.severance"))); -// entries.add(new EntryUniText(severancePages, "guide.BloodMagic.entryName.architect.severance")); -// -// ArrayList<IPage> teleposerPages = new ArrayList(); -// teleposerPages.add(new PageAltarRecipe(RecipeHolder.teleposerFocusRecipe1)); -// teleposerPages.add(new PageIRecipe(RecipeHolder.teleposerRecipe)); -// teleposerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.teleposer"))); -// entries.add(new EntryUniText(teleposerPages, "guide.BloodMagic.entryName.architect.teleposer")); -// -// ArrayList<IPage> suppressionPages = new ArrayList(); -// suppressionPages.add(getOrbPageForRecipe(RecipeHolder.suppressionSigilRecipe)); -// suppressionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.suppression"))); -// entries.add(new EntryUniText(suppressionPages, "guide.BloodMagic.entryName.architect.suppression")); -// -// ArrayList<IPage> superiorCapacityPages = new ArrayList(); -// superiorCapacityPages.add(getOrbPageForRecipe(RecipeHolder.superiorCapacityRecipe)); -// superiorCapacityPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.superiorCapacity"))); -// entries.add(new EntryUniText(superiorCapacityPages, "guide.BloodMagic.entryName.architect.superiorCapacity")); -// -// ArrayList<IPage> orbRunePages = new ArrayList(); -// orbRunePages.add(getOrbPageForRecipe(RecipeHolder.orbRuneRecipe)); -// orbRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.orbRune"))); -// entries.add(new EntryUniText(orbRunePages, "guide.BloodMagic.entryName.architect.orbRune")); -// -// ArrayList<IPage> fieldTripPages = new ArrayList(); -// fieldTripPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fieldTrip"))); -// entries.add(new EntryUniText(fieldTripPages, "guide.BloodMagic.entryName.architect.fieldTrip")); -// -// ArrayList<IPage> bindingKeyPages = new ArrayList(); -// bindingKeyPages.add(new PageIRecipe(RecipeHolder.keyOfBindingRecipe)); -// bindingKeyPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bindingKey"))); -// entries.add(new EntryUniText(bindingKeyPages, "guide.BloodMagic.entryName.architect.bindingKey")); -// -// ArrayList<IPage> tier5AltarPages = new ArrayList(); -// tier5AltarPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T5.png"), true)); -// tier5AltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier5Altar"))); -// entries.add(new EntryUniText(tier5AltarPages, "guide.BloodMagic.entryName.architect.tier5Altar")); -// -// ArrayList<IPage> priceOfPowerPages = new ArrayList(); -// priceOfPowerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.priceOfPower"))); -// entries.add(new EntryUniText(priceOfPowerPages, "guide.BloodMagic.entryName.architect.priceOfPower")); -// -// ArrayList<IPage> demonicOrbPages = new ArrayList(); -// demonicOrbPages.add(new PageAltarRecipe(RecipeHolder.archmageBloodOrbRecipe)); -// demonicOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.demonicOrb"))); -// entries.add(new EntryUniText(demonicOrbPages, "guide.BloodMagic.entryName.architect.demonicOrb")); -// -// ArrayList<IPage> energyBazookaPages = new ArrayList(); -// demonicOrbPages.add(getOrbPageForRecipe(RecipeHolder.energyBazookaRecipe)); -// energyBazookaPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.energyBazooka"))); -// entries.add(new EntryUniText(energyBazookaPages, "guide.BloodMagic.entryName.architect.energyBazooka")); -// -// ArrayList<IPage> accelerationRunePages = new ArrayList(); -// demonicOrbPages.add(getOrbPageForRecipe(RecipeHolder.accelerationRuneRecipe)); -// accelerationRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.accelerationRune"))); -// entries.add(new EntryUniText(accelerationRunePages, "guide.BloodMagic.entryName.architect.accelerationRune")); -// -// ArrayList<IPage> harvestPages = new ArrayList(); -// demonicOrbPages.add(getOrbPageForRecipe(RecipeHolder.harvestSigilRecipe)); -// harvestPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.harvest"))); -// entries.add(new EntryUniText(harvestPages, "guide.BloodMagic.entryName.architect.harvest")); -// -// ArrayList<IPage> demonProblemPages = new ArrayList(); -// demonProblemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.demonProblem"))); -// entries.add(new EntryUniText(demonProblemPages, "guide.BloodMagic.entryName.architect.demonProblem")); -// -// ArrayList<IPage> tier6AltarPages = new ArrayList(); -// tier6AltarPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T6.png"), true)); -// tier6AltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier6Altar"))); -// tier6AltarPages.add(new PageIRecipe(RecipeHolder.crystalCluserRecipe)); -// tier6AltarPages.add(new PageAltarRecipe(RecipeHolder.transcendentBloodOrbRecipe)); -// entries.add(new EntryUniText(tier6AltarPages, "guide.BloodMagic.entryName.architect.tier6Altar")); -// -// ArrayList<IPage> moreThanHumanPages = new ArrayList(); -// moreThanHumanPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.moreThanHuman"))); -// entries.add(new EntryUniText(moreThanHumanPages, "guide.BloodMagic.entryName.architect.moreThanHuman")); -// -// categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.architect", new ItemStack(ModItems.divinationSigil))); -// } -// -// public static void registerRitualBook() -// { -// List<EntryAbstract> entries = new ArrayList(); -// -//// ArrayList<IPage> testPages = new ArrayList(); -//// testPages.add(PageRitualMultiBlock.getPageForRitual("AW031Convocation")); -//// entries.add(new EntryUniText(testPages, "Test page")); -// -// -// ArrayList<IPage> introPages = new ArrayList(); -// introPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.intro"))); -// entries.add(new EntryUniText(introPages, "guide.BloodMagic.entryName.rituals.intro")); -// -// ArrayList<IPage> weakRitualPages = new ArrayList(); -// weakRitualPages.add(getOrbPageForRecipe(RecipeHolder.weakRitualStoneRecipe)); -// weakRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.weakRitual"))); -// entries.add(new EntryUniText(weakRitualPages, "guide.BloodMagic.entryName.rituals.weakRitual")); -// -// ArrayList<IPage> ritualsPages = new ArrayList(); -// ritualsPages.add(getOrbPageForRecipe(RecipeHolder.ritualStoneRecipe)); -// ritualsPages.add(getOrbPageForRecipe(RecipeHolder.masterStoneRecipe)); -// ritualsPages.add(new PageAltarRecipe(RecipeHolder.waterScribeTool)); -// ritualsPages.add(new PageAltarRecipe(RecipeHolder.fireScribeTool)); -// ritualsPages.add(new PageAltarRecipe(RecipeHolder.earthScribeTool)); -// ritualsPages.add(new PageAltarRecipe(RecipeHolder.airScribeTool)); -// ritualsPages.add(new PageIRecipe(RecipeHolder.ritualDiviner1Recipe)); -// ritualsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.rituals"))); -// ritualsPages.add(new PageAltarRecipe(RecipeHolder.weakActivationRecipe)); -// entries.add(new EntryUniText(ritualsPages, "guide.BloodMagic.entryName.rituals.rituals")); -// -// ArrayList<IPage> waterRitualPages = new ArrayList(); -// waterRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Water.png"), true)); -// waterRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.waterRitual"))); -// entries.add(new EntryUniText(waterRitualPages, "guide.BloodMagic.entryName.rituals.waterRitual")); -// -// ArrayList<IPage> lavaRitualPages = new ArrayList(); -// lavaRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Lava.png"), true)); -// lavaRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.lavaRitual"))); -// entries.add(new EntryUniText(lavaRitualPages, "guide.BloodMagic.entryName.rituals.lavaRitual")); -// -// ArrayList<IPage> groveRitualPages = new ArrayList(); -// groveRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/GreenGrove.png"), true)); -// groveRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.groveRitual"))); -// entries.add(new EntryUniText(groveRitualPages, "guide.BloodMagic.entryName.rituals.groveRitual")); -// -// ArrayList<IPage> interdictionRitualPages = new ArrayList(); -// interdictionRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Interdiction.png"), true)); -// interdictionRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.interdictionRitual"))); -// entries.add(new EntryUniText(interdictionRitualPages, "guide.BloodMagic.entryName.rituals.interdictionRitual")); -// -// ArrayList<IPage> containmentRitualPages = new ArrayList(); -// containmentRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Containment.png"), true)); -// containmentRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.containmentRitual"))); -// entries.add(new EntryUniText(containmentRitualPages, "guide.BloodMagic.entryName.rituals.containmentRitual")); -// -// ArrayList<IPage> bindingRitualPages = new ArrayList(); -// bindingRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Binding.png"), true)); -// bindingRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.bindingRitual"))); -// entries.add(new EntryUniText(bindingRitualPages, "guide.BloodMagic.entryName.rituals.bindingRitual")); -// -// ArrayList<IPage> beastModePages = new ArrayList(); -// beastModePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.beastMode"))); -// entries.add(new EntryUniText(beastModePages, "guide.BloodMagic.entryName.rituals.beastMode")); -// -// ArrayList<IPage> unbindingRitualPages = new ArrayList(); -// unbindingRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Unbinding.png"), true)); -// unbindingRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.unbindingRitual"))); -// entries.add(new EntryUniText(unbindingRitualPages, "guide.BloodMagic.entryName.rituals.unbindingRitual")); -// -// ArrayList<IPage> jumpRitualPages = new ArrayList(); -// jumpRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Jump.png"), true)); -// jumpRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.jumpRitual"))); -// entries.add(new EntryUniText(jumpRitualPages, "guide.BloodMagic.entryName.rituals.jumpRitual")); -// -// ArrayList<IPage> duskInkPages = new ArrayList(); -// duskInkPages.add(new PageAltarRecipe(RecipeHolder.duskRecipe)); -// duskInkPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.duskInk"))); -// entries.add(new EntryUniText(duskInkPages, "guide.BloodMagic.entryName.rituals.duskInk")); -// -// ArrayList<IPage> magnetismRitualPages = new ArrayList(); -// magnetismRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Magnetism.png"), true)); -// magnetismRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.magnetismRitual"))); -// entries.add(new EntryUniText(magnetismRitualPages, "guide.BloodMagic.entryName.rituals.magnetismRitual")); -// -// ArrayList<IPage> crusherRitualPages = new ArrayList(); -// crusherRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Crusher.png"), true)); -// crusherRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.crusherRitual"))); -// entries.add(new EntryUniText(crusherRitualPages, "guide.BloodMagic.entryName.rituals.crusherRitual")); -// -// ArrayList<IPage> speedRitualPages = new ArrayList(); -// speedRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Speed.png"), true)); -// speedRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.speedRitual"))); -// entries.add(new EntryUniText(speedRitualPages, "guide.BloodMagic.entryName.rituals.speedRitual")); -// -// ArrayList<IPage> shepherdRitualPages = new ArrayList(); -// shepherdRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/AnimalGrowth.png"), true)); -// shepherdRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.shepherdRitual"))); -// entries.add(new EntryUniText(shepherdRitualPages, "guide.BloodMagic.entryName.rituals.shepherdRitual")); -// -// ArrayList<IPage> darkMagicPages = new ArrayList(); -// darkMagicPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.darkMagic"))); -// entries.add(new EntryUniText(darkMagicPages, "guide.BloodMagic.entryName.rituals.darkMagic")); -// -// ArrayList<IPage> knifeAndSufferingRitualPages = new ArrayList(); -// knifeAndSufferingRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/WellOfSuffering.png"), true)); -// knifeAndSufferingRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.knifeAndSufferingRitual.1"))); -// knifeAndSufferingRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/FeatheredKnife.png"), true)); -// knifeAndSufferingRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.knifeAndSufferingRitual.2"))); -// entries.add(new EntryUniText(knifeAndSufferingRitualPages, "guide.BloodMagic.entryName.rituals.knifeAndSufferingRitual")); -// -// ArrayList<IPage> regenerationRitualPages = new ArrayList(); -// regenerationRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Regeneration.png"), true)); -// regenerationRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.regenerationRitual"))); -// entries.add(new EntryUniText(regenerationRitualPages, "guide.BloodMagic.entryName.rituals.regenerationRitual")); -// -// ArrayList<IPage> harvestFestivalPages = new ArrayList(); -// harvestFestivalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.harvestFestival"))); -// entries.add(new EntryUniText(harvestFestivalPages, "guide.BloodMagic.entryName.rituals.harvestFestival")); -// -// ArrayList<IPage> thenThereWereFivePages = new ArrayList(); -// thenThereWereFivePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.thenThereWereFive"))); -// entries.add(new EntryUniText(thenThereWereFivePages, "guide.BloodMagic.entryName.rituals.thenThereWereFive")); -// -// ArrayList<IPage> alchemyRitualPages = new ArrayList(); -// alchemyRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Alchemy.png"), true)); -// alchemyRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.alchemyRitual"))); -// entries.add(new EntryUniText(alchemyRitualPages, "guide.BloodMagic.entryName.rituals.alchemyRitual")); -// -// ArrayList<IPage> domeRitualPages = new ArrayList(); -// domeRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Dome.png"), true)); -// domeRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.domeRitual"))); -// entries.add(new EntryUniText(domeRitualPages, "guide.BloodMagic.entryName.rituals.domeRitual")); -// -// ArrayList<IPage> awakenedCrystalPages = new ArrayList(); -// awakenedCrystalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.awakenedCrystal"))); -// entries.add(new EntryUniText(awakenedCrystalPages, "guide.BloodMagic.entryName.rituals.awakenedCrystal")); -// -// ArrayList<IPage> featheredEarthRitualPages = new ArrayList(); -// featheredEarthRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/FeatheredEarth.png"), true)); -// featheredEarthRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.featheredEarthRitual"))); -// entries.add(new EntryUniText(featheredEarthRitualPages, "guide.BloodMagic.entryName.rituals.featheredEarthRitual")); -// -// ArrayList<IPage> gaiaRitualPages = new ArrayList(); -// gaiaRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Gaia.png"), true)); -// gaiaRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.gaiaRitual"))); -// entries.add(new EntryUniText(gaiaRitualPages, "guide.BloodMagic.entryName.rituals.gaiaRitual")); -// -// ArrayList<IPage> condorRitualPages = new ArrayList(); -// condorRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Flight.png"), true)); -// condorRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.condorRitual"))); -// entries.add(new EntryUniText(condorRitualPages, "guide.BloodMagic.entryName.rituals.condorRitual")); -// -// ArrayList<IPage> meteorRitualPages = new ArrayList(); -// meteorRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Meteor.png"), true)); -// meteorRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.meteorRitual"))); -// entries.add(new EntryUniText(meteorRitualPages, "guide.BloodMagic.entryName.rituals.meteorRitual")); -// -// ArrayList<IPage> expulsionRitualPages = new ArrayList(); -// expulsionRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Expulsion.png"), true)); -// expulsionRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.expulsionRitual"))); -// entries.add(new EntryUniText(expulsionRitualPages, "guide.BloodMagic.entryName.rituals.expulsionRitual")); -// -// ArrayList<IPage> costOfProgressPages = new ArrayList(); -// costOfProgressPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.costOfProgress.1"))); -// costOfProgressPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.costOfProgress.2"))); -// entries.add(new EntryUniText(costOfProgressPages, "guide.BloodMagic.entryName.rituals.costOfProgress")); -// -// ArrayList<IPage> zephyrRitualPages = new ArrayList(); -// zephyrRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Zephyr.png"), true)); -// zephyrRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.zephyrRitual"))); -// entries.add(new EntryUniText(zephyrRitualPages, "guide.BloodMagic.entryName.rituals.zephyrRitual")); -// -// ArrayList<IPage> harvestRitualPages = new ArrayList(); -// harvestRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Harvest.png"), true)); -// harvestRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.harvestRitual"))); -// entries.add(new EntryUniText(harvestRitualPages, "guide.BloodMagic.entryName.rituals.harvestRitual")); -// -// ArrayList<IPage> eternalSoulRitualPages = new ArrayList(); -// eternalSoulRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/EternalSoul.png"), true)); -// eternalSoulRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.eternalSoulRitual"))); -// entries.add(new EntryUniText(eternalSoulRitualPages, "guide.BloodMagic.entryName.rituals.eternalSoulRitual")); -// -// ArrayList<IPage> ellipsoidRitualPages = new ArrayList(); -// ellipsoidRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Ellipsoid.png"), true)); -// ellipsoidRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.ellipsoidRitual"))); -// entries.add(new EntryUniText(ellipsoidRitualPages, "guide.BloodMagic.entryName.rituals.ellipsoidRitual")); -// -// ArrayList<IPage> evaporationRitualPages = new ArrayList(); -// evaporationRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Evaporation.png"), true)); -// evaporationRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.evaporationRitual"))); -// entries.add(new EntryUniText(evaporationRitualPages, "guide.BloodMagic.entryName.rituals.evaporationRitual")); -// -// ArrayList<IPage> sacrosanctityRitualPages = new ArrayList(); -// sacrosanctityRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Sacrosanctity.png"), true)); -// sacrosanctityRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.sacrosanctityRitual"))); -// entries.add(new EntryUniText(sacrosanctityRitualPages, "guide.BloodMagic.entryName.rituals.sacrosanctityRitual")); -// -// ArrayList<IPage> evilRitualPages = new ArrayList(); -// evilRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/VeilOfEvil.png"), true)); -// evilRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.evilRitual"))); -// entries.add(new EntryUniText(evilRitualPages, "guide.BloodMagic.entryName.rituals.evilRitual")); -// -// ArrayList<IPage> stomachRitualPages = new ArrayList(); -// stomachRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Stomach.png"), true)); -// stomachRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.stomachRitual"))); -// entries.add(new EntryUniText(stomachRitualPages, "guide.BloodMagic.entryName.rituals.stomachRitual")); -// -// ArrayList<IPage> reagentEffectsRitualPages = new ArrayList(); -// for(int i=1; i<=24; i++) -// { -// reagentEffectsRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.reagentEffects." + i))); -// } -// entries.add(new EntryUniText(reagentEffectsRitualPages, "guide.BloodMagic.entryName.rituals.reagentEffects")); -// -// ArrayList<IPage> conclaveOfMagesPages = new ArrayList(); -// conclaveOfMagesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.conclaveOfMages"))); -// entries.add(new EntryUniText(conclaveOfMagesPages, "guide.BloodMagic.entryName.rituals.conclaveOfMages")); -// -// ArrayList<IPage> forbiddenParadisePages = new ArrayList(); -// forbiddenParadisePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.forbiddenParadise"))); -// entries.add(new EntryUniText(forbiddenParadisePages, "guide.BloodMagic.entryName.rituals.forbiddenParadise")); -// -// ArrayList<IPage> convocationRitualPages = new ArrayList(); -// convocationRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Convocation.png"), true)); -// convocationRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.convocationRitual"))); -// entries.add(new EntryUniText(convocationRitualPages, "guide.BloodMagic.entryName.rituals.convocationRitual")); -// -// ArrayList<IPage> longHaulPages = new ArrayList(); -// longHaulPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.longHaul"))); -// entries.add(new EntryUniText(longHaulPages, "guide.BloodMagic.entryName.rituals.longHaul")); -// -// ArrayList<IPage> phantomHandsRitualPages = new ArrayList(); -// phantomHandsRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/PhantomHands.png"), true)); -// phantomHandsRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.phantomHandsRitual"))); -// entries.add(new EntryUniText(phantomHandsRitualPages, "guide.BloodMagic.entryName.rituals.phantomHandsRitual")); -// -// ArrayList<IPage> anvilRitualPages = new ArrayList(); -// anvilRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/BeatingAnvil.png"), true)); -// anvilRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.anvilRitual"))); -// entries.add(new EntryUniText(anvilRitualPages, "guide.BloodMagic.entryName.rituals.anvilRitual")); -// -// ArrayList<IPage> dawnInkPages = new ArrayList(); -// dawnInkPages.add(new PageAltarRecipe(RecipeHolder.dawnRecipe)); -// dawnInkPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.dawnInk"))); -// entries.add(new EntryUniText(dawnInkPages, "guide.BloodMagic.entryName.rituals.dawnInk")); -// -// ArrayList<IPage> symmetryRitualPages = new ArrayList(); -// symmetryRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/SymmetryOmega.png"), true)); -// symmetryRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.symmetryRitual"))); -// entries.add(new EntryUniText(symmetryRitualPages, "guide.BloodMagic.entryName.rituals.symmetryRitual")); -// -// ArrayList<IPage> stallingRitualPages = new ArrayList(); -// stallingRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/StallingOmega.png"), true)); -// stallingRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.stallingRitual"))); -// entries.add(new EntryUniText(stallingRitualPages, "guide.BloodMagic.entryName.rituals.stallingRitual")); -// -// ArrayList<IPage> newMoonRitualPages = new ArrayList(); -// newMoonRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.newMoonRitual"))); -// entries.add(new EntryUniText(newMoonRitualPages, "guide.BloodMagic.entryName.rituals.newMoonRitual")); -// -// categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.rituals", new ItemStack(ModBlocks.blockMasterStone))); -// } -// -// public static void registerDemonBook() -// { -// List<EntryAbstract> entries = new ArrayList(); -// -// ArrayList<IPage> ashesPages = new ArrayList(); -// ashesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.ashes"))); -// entries.add(new EntryUniText(ashesPages, "guide.BloodMagic.entryName.demons.ashes")); -// -// ArrayList<IPage> tamedDemonPages = new ArrayList(); -// tamedDemonPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.tamedDemon"))); -// entries.add(new EntryUniText(tamedDemonPages, "guide.BloodMagic.entryName.demons.tamedDemon")); -// -// ArrayList<IPage> futurePages = new ArrayList(); -// futurePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.future"))); -// entries.add(new EntryUniText(futurePages, "guide.BloodMagic.entryName.demons.future")); -// -// ArrayList<IPage> knightPages = new ArrayList(); -// knightPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.knight"))); -// entries.add(new EntryUniText(knightPages, "guide.BloodMagic.entryName.demons.knight")); -// -// ArrayList<IPage> demonShardPages = new ArrayList(); -// demonShardPages.addAll(PageHelper.pagesForLongText((StatCollector.translateToLocal("aw.entries.demons.demonShard")), new ItemStack(ModItems.demonBloodShard))); -// entries.add(new EntryUniText(demonShardPages, "guide.BloodMagic.entryName.demons.demonShard")); -// -// -// ArrayList<IPage> demonSummoningPages = new ArrayList(); -// demonSummoningPages.add(new PageIRecipe(RecipeHolder.arcanePedestalRecipe)); -// demonSummoningPages.add(new PageIRecipe(RecipeHolder.arcanePlinthRecipe)); -// demonSummoningPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/demons/Ring1.png"), true)); -// demonSummoningPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/demons/Ring2.png"), true)); -// demonSummoningPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.demonSummoning"))); -// entries.add(new EntryUniText(demonSummoningPages, "guide.BloodMagic.entryName.demons.demonSummoning")); -// -// ArrayList<IPage> keysGatePages = new ArrayList(); -// for(int i=1; i<=10; i++) -// { -// keysGatePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.keysGate." + i))); -// } -// entries.add(new EntryUniText(keysGatePages, "guide.BloodMagic.entryName.demons.keysGate")); -// -// ArrayList<IPage> futurePlansPages = new ArrayList(); -// futurePlansPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.futurePlans"))); -// entries.add(new EntryUniText(futurePlansPages, "guide.BloodMagic.entryName.demons.futurePlans")); -// -// ArrayList<IPage> demonInvasionPages = new ArrayList(); -// demonInvasionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.demonInvasion"))); -// entries.add(new EntryUniText(demonInvasionPages, "guide.BloodMagic.entryName.demons.demonInvasion")); -// -// ArrayList<IPage> observationsPages = new ArrayList(); -// observationsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.observations"))); -// entries.add(new EntryUniText(observationsPages, "guide.BloodMagic.entryName.demons.observations")); -// -// categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.demons", new ItemStack(ModItems.demonBloodShard))); -// } -// -// public static void registerSpellBook() -// { -// List<EntryAbstract> entries = new ArrayList(); -// -// ArrayList<IPage> demonGirlPages = new ArrayList(); -// demonGirlPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.demonGirl"))); -// entries.add(new EntryUniText(demonGirlPages, "guide.BloodMagic.entryName.spells.demonGirl")); -// -// ArrayList<IPage> spellTablePages = new ArrayList(); -// spellTablePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.spellTable.1"))); -// spellTablePages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/SimpleSpellTable.png"), true)); -// spellTablePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.spellTable.2"))); -// entries.add(new EntryUniText(spellTablePages, "guide.BloodMagic.entryName.spells.spellTable")); -// -// ArrayList<IPage> simpleEffectsPages = new ArrayList(); -// for(int i=1; i<=11; i++) -// { -// simpleEffectsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.simpleEffects." + i))); -// } -// entries.add(new EntryUniText(simpleEffectsPages, "guide.BloodMagic.entryName.spells.simpleEffects")); -// -// ArrayList<IPage> tableAndSkullsPages = new ArrayList(); -// tableAndSkullsPages.add(new PageAltarRecipe(RecipeHolder.blankSpellRecipe)); -// tableAndSkullsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.tableAndSkulls.1"))); -// tableAndSkullsPages.add(getOrbPageForRecipe(RecipeHolder.spellTableRecipe)); -// tableAndSkullsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.tableAndSkulls.2"))); -// entries.add(new EntryUniText(tableAndSkullsPages, "guide.BloodMagic.entryName.spells.tableAndSkulls")); -// -// ArrayList<IPage> timePassesPages = new ArrayList(); -// timePassesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.timePasses"))); -// entries.add(new EntryUniText(timePassesPages, "guide.BloodMagic.entryName.spells.timePasses")); -// -// ArrayList<IPage> complexSpellBasicsPages = new ArrayList(); -// complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics.1"))); -// complexSpellBasicsPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Paradigm.png"), true)); -// -// for(int i=2; i<=6; i++) -// complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics." + i))); -// -// complexSpellBasicsPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Effect.png"), true)); -// complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics.7"))); -// complexSpellBasicsPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Modifier.png"), true)); -// -// for(int i=8; i<=12; i++) -// complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics." + i))); -// -// complexSpellBasicsPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Enhancement.png"), true)); -// -// for(int i=13; i<=16; i++) -// complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics." + i))); -// -// complexSpellBasicsPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Conduit.png"), true)); -// complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics.17"))); -// -// entries.add(new EntryUniText(complexSpellBasicsPages, "guide.BloodMagic.entryName.spells.complexSpellBasics")); -// -// ArrayList<IPage> complexSpellEffectsPages = new ArrayList(); -// for(int i=1; i<=17; i++) -// complexSpellEffectsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellEffects." + i))); -// entries.add(new EntryUniText(complexSpellEffectsPages, "guide.BloodMagic.entryName.spells.complexSpellEffects")); -// -// ArrayList<IPage> offTopicPages = new ArrayList(); -// offTopicPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.offTopic"))); -// entries.add(new EntryUniText(offTopicPages, "guide.BloodMagic.entryName.spells.offTopic")); -// -// ArrayList<IPage> demonicPowerPages = new ArrayList(); -// demonicPowerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.demonicPower"))); -// entries.add(new EntryUniText(demonicPowerPages, "guide.BloodMagic.entryName.spells.demonicPower")); -// -// categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.spells", new ItemStack(ModItems.itemComplexSpellCrystal))); -// } -// -// public static void registerAlchemyBook() -// { -// List<EntryAbstract> entries = new ArrayList(); -// -// ArrayList<IPage> fatedMeetingPages = new ArrayList(); -// fatedMeetingPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.fatedMeeting"))); -// entries.add(new EntryUniText(fatedMeetingPages, "guide.BloodMagic.entryName.alchemy.fatedMeeting")); -// -// ArrayList<IPage> firstStepsPages = new ArrayList(); -// firstStepsPages.add(getOrbPageForRecipe(RecipeHolder.alchemySetRecipe)); -// firstStepsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.firstSteps"))); -// entries.add(new EntryUniText(firstStepsPages, "guide.BloodMagic.entryName.alchemy.firstSteps")); -// -// ArrayList<IPage> chemistrySetPages = new ArrayList(); -// for(int i=1; i<=10; i++) -// chemistrySetPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.chemistrySet." + i))); -// entries.add(new EntryUniText(chemistrySetPages, "guide.BloodMagic.entryName.alchemy.chemistrySet")); -// -// ArrayList<IPage> incensePages = new ArrayList(); -// incensePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.incense.1"))); -// incensePages.add(new PageIRecipe(RecipeHolder.crucibleRecipe)); -// incensePages.add(new PageIRecipe(RecipeHolder.woodAshRecipe)); -// incensePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.incense.2"))); -// incensePages.add(getOrbPageForRecipe(RecipeHolder.byrrusRecipe)); -// incensePages.add(getOrbPageForRecipe(RecipeHolder.livensRecipe)); -// incensePages.add(getOrbPageForRecipe(RecipeHolder.virRecipe)); -// incensePages.add(getOrbPageForRecipe(RecipeHolder.purpuraRecipe)); -// incensePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.incense.3"))); -// entries.add(new EntryUniText(incensePages, "guide.BloodMagic.entryName.alchemy.incense")); -// -// ArrayList<IPage> potionsPages = new ArrayList(); -// potionsPages.add(new PageAltarRecipe(RecipeHolder.flaskRecipe)); -// potionsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.potions"))); -// entries.add(new EntryUniText(potionsPages, "guide.BloodMagic.entryName.alchemy.potions")); -// -// ArrayList<IPage> reagentRevolutionPages = new ArrayList(); -// for(int i=1; i<=8; i++) -// reagentRevolutionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentRevolution." + i))); -// entries.add(new EntryUniText(reagentRevolutionPages, "guide.BloodMagic.entryName.alchemy.reagentRevolution")); -// -// ArrayList<IPage> newPotionsPages = new ArrayList(); -// newPotionsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.newPotions"))); -// entries.add(new EntryUniText(newPotionsPages, "guide.BloodMagic.entryName.alchemy.newPotions")); -// -// ArrayList<IPage> soulSandPages = new ArrayList(); -// soulSandPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.soulSand"))); -// entries.add(new EntryUniText(soulSandPages, "guide.BloodMagic.entryName.alchemy.soulSand")); -// -// ArrayList<IPage> timeGoesByPages = new ArrayList(); -// timeGoesByPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.timeGoesBy"))); -// entries.add(new EntryUniText(timeGoesByPages, "guide.BloodMagic.entryName.alchemy.timeGoesBy")); -// -// ArrayList<IPage> catalystsPages = new ArrayList(); -// catalystsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.catalysts"))); -// entries.add(new EntryUniText(catalystsPages, "guide.BloodMagic.entryName.alchemy.catalysts")); -// -// ArrayList<IPage> activationCrystalPages = new ArrayList(); -// activationCrystalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.activationCrystal"))); -// entries.add(new EntryUniText(activationCrystalPages, "guide.BloodMagic.entryName.alchemy.activationCrystal")); -// -// ArrayList<IPage> reagentSystemPages = new ArrayList(); -// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.1"))); -// reagentSystemPages.add(new PageIRecipe(RecipeHolder.calcinatorRecipe)); -// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.2"))); -// reagentSystemPages.add(new PageIRecipe(RecipeHolder.belljarRecipe)); -// reagentSystemPages.add(new PageIRecipe(RecipeHolder.relayRecipe)); -// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.3"))); -// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.4"))); -// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.5"))); -// reagentSystemPages.add(new PageIRecipe(RecipeHolder.routerRecipe)); -// reagentSystemPages.add(new PageIRecipe(RecipeHolder.segmenterRecipe)); -// reagentSystemPages.add(new PageIRecipe(RecipeHolder.cleanserRecipe)); -// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.6"))); -// -// reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.7"))); -// -// entries.add(new EntryUniText(reagentSystemPages, "guide.BloodMagic.entryName.alchemy.reagentSystem")); -// -// ArrayList<IPage> magusSecretPages = new ArrayList(); -// magusSecretPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.magusSecret"))); -// entries.add(new EntryUniText(magusSecretPages, "guide.BloodMagic.entryName.alchemy.magusSecret")); -// -// ArrayList<IPage> simpleCreationsPages = new ArrayList(); -// simpleCreationsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.simpleCreations"))); -// entries.add(new EntryUniText(simpleCreationsPages, "guide.BloodMagic.entryName.alchemy.simpleCreations")); -// -// categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.alchemy", new ItemStack(ModItems.alchemyFlask))); -// } -//} +package WayofTime.alchemicalWizardry.common.book; + +import java.awt.Color; +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.guide.OrbRecipeRenderer; +import WayofTime.alchemicalWizardry.api.guide.PageAltarRecipe; +import WayofTime.alchemicalWizardry.common.guide.RecipeHolder; +import amerifrance.guideapi.api.GuideRegistry; +import amerifrance.guideapi.api.abstraction.CategoryAbstract; +import amerifrance.guideapi.api.abstraction.EntryAbstract; +import amerifrance.guideapi.api.abstraction.IPage; +import amerifrance.guideapi.api.base.Book; +import amerifrance.guideapi.api.util.BookBuilder; +import amerifrance.guideapi.api.util.PageHelper; +import amerifrance.guideapi.categories.CategoryItemStack; +import amerifrance.guideapi.entries.EntryUniText; +import amerifrance.guideapi.pages.PageIRecipe; +import amerifrance.guideapi.pages.PageUnlocImage; + +public class BloodMagicGuide +{ + public static Book bloodMagicGuide; + public static List<CategoryAbstract> categories = new ArrayList(); + + public static void registerGuide() + { + registerArchitectBook(); + registerRitualBook(); + registerDemonBook(); + registerSpellBook(); + registerAlchemyBook(); + + BookBuilder bmBookBuilder = new BookBuilder(); + bmBookBuilder.setCategories(categories).setUnlocBookTitle("guide.BloodMagic.book.title").setUnlocWelcomeMessage("guide.BloodMagic.welcomeMessage").setUnlocDisplayName("guide.BloodMagic.book.name").setBookColor(new Color(190, 10, 0)).setAuthor("-Blood Magic"); + +// bloodMagicGuide = new Book(categories, "guide.BloodMagic.book.title", "guide.BloodMagic.welcomeMessage", "guide.BloodMagic.book.name", new Color(190, 10, 0)); + bloodMagicGuide = bmBookBuilder.build(); + GuideRegistry.registerBook(bloodMagicGuide); + } + + public static PageIRecipe getOrbPageForRecipe(IRecipe recipe) + { + return new PageIRecipe(recipe, new OrbRecipeRenderer(recipe)); + } + + public static void registerArchitectBook() + { + List<EntryAbstract> entries = new ArrayList(); + + ArrayList<IPage> introPages = new ArrayList(); + introPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.intro"))); + entries.add(new EntryUniText(introPages, "guide.BloodMagic.entryName.architect.intro")); + + ArrayList<IPage> bloodAltarPages = new ArrayList(); + bloodAltarPages.add(new PageIRecipe(RecipeHolder.bloodAltarRecipe)); + bloodAltarPages.add(new PageIRecipe(RecipeHolder.knifeRecipe)); + bloodAltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodAltar.1"))); + bloodAltarPages.add(new PageAltarRecipe(RecipeHolder.weakBloodOrbRecipe)); + bloodAltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodAltar.2"))); + entries.add(new EntryUniText(bloodAltarPages, "guide.BloodMagic.entryName.architect.bloodAltar")); + + ArrayList<IPage> soulNetworkPages = new ArrayList(); + soulNetworkPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulNetwork"))); + entries.add(new EntryUniText(soulNetworkPages, "guide.BloodMagic.entryName.architect.soulNetwork")); + + ArrayList<IPage> blankSlatePages = new ArrayList(); + blankSlatePages.add(new PageAltarRecipe(RecipeHolder.blankSlateRecipe)); + blankSlatePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.blankSlate"))); + entries.add(new EntryUniText(blankSlatePages, "guide.BloodMagic.entryName.architect.blankSlate")); + + ArrayList<IPage> divinationSigilPages = new ArrayList(); + divinationSigilPages.add(getOrbPageForRecipe(RecipeHolder.divinationSigilRecipe)); + divinationSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.divination"))); + entries.add(new EntryUniText(divinationSigilPages, "guide.BloodMagic.entryName.architect.divination")); + + ArrayList<IPage> waterSigilPages = new ArrayList(); + waterSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.waterSigil.1"))); + waterSigilPages.add(getOrbPageForRecipe(RecipeHolder.waterSigilRecipe)); + waterSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.waterSigil.2"))); + entries.add(new EntryUniText(waterSigilPages, "guide.BloodMagic.entryName.architect.waterSigil")); + + ArrayList<IPage> lavaCrystalPages = new ArrayList(); + lavaCrystalPages.add(getOrbPageForRecipe(RecipeHolder.lavaCrystalRecipe)); + lavaCrystalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.lavaCrystal"))); + entries.add(new EntryUniText(lavaCrystalPages, "guide.BloodMagic.entryName.architect.lavaCrystal")); + + ArrayList<IPage> hellHarvestPages = new ArrayList(); + hellHarvestPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.hellHarvest"))); + entries.add(new EntryUniText(hellHarvestPages, "guide.BloodMagic.entryName.architect.hellHarvest")); + + ArrayList<IPage> lavaSigilPages = new ArrayList(); + lavaSigilPages.add(new PageIRecipe(RecipeHolder.lavaSigilRecipe)); + lavaSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.lavaSigil"))); + entries.add(new EntryUniText(lavaSigilPages, "guide.BloodMagic.entryName.architect.lavaSigil")); + + ArrayList<IPage> blankRunePages = new ArrayList(); + blankRunePages.add(getOrbPageForRecipe(RecipeHolder.blankRuneRecipe)); + blankRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.blankRunes.1"))); + blankRunePages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T2.png"), true)); + blankRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.blankRunes.2"))); + entries.add(new EntryUniText(blankRunePages, "guide.BloodMagic.entryName.architect.blankRunes")); + + ArrayList<IPage> speedRunePages = new ArrayList(); + speedRunePages.add(new PageIRecipe(RecipeHolder.speedRuneRecipe)); + speedRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.speedRunes"))); + entries.add(new EntryUniText(speedRunePages, "guide.BloodMagic.entryName.architect.speedRunes")); + + ArrayList<IPage> apprenticeOrbPages = new ArrayList(); + apprenticeOrbPages.add(new PageAltarRecipe(RecipeHolder.apprenticeBloodOrbRecipe)); + apprenticeOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.apprenticeOrb"))); + entries.add(new EntryUniText(apprenticeOrbPages, "guide.BloodMagic.entryName.architect.apprenticeOrb")); + + ArrayList<IPage> voidSigilPages = new ArrayList(); + voidSigilPages.add(getOrbPageForRecipe(RecipeHolder.voidSigilRecipe)); + voidSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.voidSigil"))); + entries.add(new EntryUniText(voidSigilPages, "guide.BloodMagic.entryName.architect.voidSigil")); + + ArrayList<IPage> airSigilPages = new ArrayList(); + airSigilPages.add(getOrbPageForRecipe(RecipeHolder.airSigilRecipe)); + airSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.airSigil"))); + entries.add(new EntryUniText(airSigilPages, "guide.BloodMagic.entryName.architect.airSigil")); + + ArrayList<IPage> sightSigilPages = new ArrayList(); + sightSigilPages.add(getOrbPageForRecipe(RecipeHolder.sightSigilRecipe)); + sightSigilPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sightSigil"))); + entries.add(new EntryUniText(sightSigilPages, "guide.BloodMagic.entryName.architect.sightSigil")); + + ArrayList<IPage> advancedAltarPages = new ArrayList(); + advancedAltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.advancedAltar"))); + entries.add(new EntryUniText(advancedAltarPages, "guide.BloodMagic.entryName.architect.advancedAltar")); + + ArrayList<IPage> fastMinerPages = new ArrayList(); + fastMinerPages.add(getOrbPageForRecipe(RecipeHolder.fastMinerRecipe)); + fastMinerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fastMiner"))); + entries.add(new EntryUniText(fastMinerPages, "guide.BloodMagic.entryName.architect.fastMiner")); + + ArrayList<IPage> soulFrayPages = new ArrayList(); + soulFrayPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulFray"))); + entries.add(new EntryUniText(soulFrayPages, "guide.BloodMagic.entryName.architect.soulFray")); + + ArrayList<IPage> greenGrovePages = new ArrayList(); + greenGrovePages.add(getOrbPageForRecipe(RecipeHolder.greenGroveRecipe)); + greenGrovePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.greenGrove"))); + entries.add(new EntryUniText(greenGrovePages, "guide.BloodMagic.entryName.architect.greenGrove")); + + ArrayList<IPage> daggerPages = new ArrayList(); + daggerPages.add(new PageAltarRecipe(RecipeHolder.daggerRecipe)); + daggerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.dagger"))); + entries.add(new EntryUniText(daggerPages, "guide.BloodMagic.entryName.architect.dagger")); + + ArrayList<IPage> sacrificePages = new ArrayList(); + sacrificePages.add(getOrbPageForRecipe(RecipeHolder.selfSacrificeRuneRecipe)); + sacrificePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sacrifice.1"))); + sacrificePages.add(getOrbPageForRecipe(RecipeHolder.sacrificeRuneRecipe)); + sacrificePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sacrifice.2"))); + entries.add(new EntryUniText(sacrificePages, "guide.BloodMagic.entryName.architect.sacrifice")); + + ArrayList<IPage> bloodPackPages = new ArrayList(); + bloodPackPages.add(new PageIRecipe(RecipeHolder.bloodPackRecipe)); + bloodPackPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodPack"))); + entries.add(new EntryUniText(bloodPackPages, "guide.BloodMagic.entryName.architect.bloodPack")); + + ArrayList<IPage> fivePeoplePages = new ArrayList(); + fivePeoplePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fivePeople"))); + entries.add(new EntryUniText(fivePeoplePages, "guide.BloodMagic.entryName.architect.fivePeople")); + + ArrayList<IPage> tier3Pages = new ArrayList(); + tier3Pages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T3.png"), true)); + tier3Pages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier3"))); + entries.add(new EntryUniText(tier3Pages, "guide.BloodMagic.entryName.architect.tier3")); + + ArrayList<IPage> magicianOrbPages = new ArrayList(); + magicianOrbPages.add(new PageAltarRecipe(RecipeHolder.magicianBloodOrbRecipe)); + magicianOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.magicianOrb"))); + entries.add(new EntryUniText(magicianOrbPages, "guide.BloodMagic.entryName.architect.magicianOrb")); + + ArrayList<IPage> newRunePages = new ArrayList(); + newRunePages.add(getOrbPageForRecipe(RecipeHolder.capacityRuneRecipe)); + newRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.newRune.1"))); + newRunePages.add(getOrbPageForRecipe(RecipeHolder.dislocationRuneRecipe)); + newRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.newRune.2"))); + entries.add(new EntryUniText(newRunePages, "guide.BloodMagic.entryName.architect.newRune")); + + ArrayList<IPage> magnetismPages = new ArrayList(); + magnetismPages.add(getOrbPageForRecipe(RecipeHolder.magnetismSigilRecipe)); + magnetismPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.magnetism"))); + entries.add(new EntryUniText(magnetismPages, "guide.BloodMagic.entryName.architect.magnetism")); + + ArrayList<IPage> phantomBridgePages = new ArrayList(); + phantomBridgePages.add(getOrbPageForRecipe(RecipeHolder.phantomBridgeRecipe)); + phantomBridgePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.phantomBridge"))); + entries.add(new EntryUniText(phantomBridgePages, "guide.BloodMagic.entryName.architect.phantomBridge")); + + ArrayList<IPage> holdingPages = new ArrayList(); + holdingPages.add(getOrbPageForRecipe(RecipeHolder.holdingSigilRecipe)); + holdingPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.holding"))); + entries.add(new EntryUniText(holdingPages, "guide.BloodMagic.entryName.architect.holding")); + + ArrayList<IPage> elementalAffinityPages = new ArrayList(); + elementalAffinityPages.add(getOrbPageForRecipe(RecipeHolder.affinitySigilRecipe)); + elementalAffinityPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.elementalAffinity"))); + entries.add(new EntryUniText(elementalAffinityPages, "guide.BloodMagic.entryName.architect.elementalAffinity")); + + ArrayList<IPage> ritualStonesPages = new ArrayList(); + ritualStonesPages.add(getOrbPageForRecipe(RecipeHolder.ritualStoneRecipe)); + ritualStonesPages.add(getOrbPageForRecipe(RecipeHolder.masterStoneRecipe)); + ritualStonesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.ritualStones"))); + entries.add(new EntryUniText(ritualStonesPages, "guide.BloodMagic.entryName.architect.ritualStones")); + + ArrayList<IPage> bloodLampPages = new ArrayList(); + bloodLampPages.add(getOrbPageForRecipe(RecipeHolder.bloodLampRecipe)); + bloodLampPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodLamp"))); + entries.add(new EntryUniText(bloodLampPages, "guide.BloodMagic.entryName.architect.bloodLamp")); + + ArrayList<IPage> boundArmourPages = new ArrayList(); + boundArmourPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.boundArmour.1"))); + boundArmourPages.add(new PageIRecipe(RecipeHolder.emptySocketRecipe)); + boundArmourPages.add(new PageAltarRecipe(RecipeHolder.filledSocketRecipe)); + boundArmourPages.add(getOrbPageForRecipe(RecipeHolder.soulForgeRecipe)); + boundArmourPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.boundArmour.2"))); + entries.add(new EntryUniText(boundArmourPages, "guide.BloodMagic.entryName.architect.boundArmour")); + + if(AlchemicalWizardry.isThaumcraftLoaded) + { + ArrayList<IPage> sanguineArmourPages = new ArrayList(); + sanguineArmourPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sanguineArmour"), new ItemStack(ModItems.sanguineRobe))); + entries.add(new EntryUniText(sanguineArmourPages, "guide.BloodMagic.entryName.architect.sanguineArmour")); + } + + ArrayList<IPage> soulSuppressPages = new ArrayList(); + soulSuppressPages.add(new PageIRecipe(RecipeHolder.inhibitorRecipe)); + soulSuppressPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulSuppress"))); + entries.add(new EntryUniText(soulSuppressPages, "guide.BloodMagic.entryName.architect.soulSuppress")); + + ArrayList<IPage> ritualDivinerPages = new ArrayList(); + ritualDivinerPages.add(new PageIRecipe(RecipeHolder.ritualDiviner1Recipe)); + ritualDivinerPages.add(new PageIRecipe(RecipeHolder.ritualDiviner2Recipe)); + ritualDivinerPages.add(new PageIRecipe(RecipeHolder.ritualDiviner3Recipe)); + ritualDivinerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.ritualDiviner"))); + entries.add(new EntryUniText(ritualDivinerPages, "guide.BloodMagic.entryName.architect.ritualDiviner")); + + ArrayList<IPage> bloodShardPages = new ArrayList(); + bloodShardPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodShard"), new ItemStack(ModItems.weakBloodShard))); + entries.add(new EntryUniText(bloodShardPages, "guide.BloodMagic.entryName.architect.bloodShard")); + + ArrayList<IPage> tier4AltarPages = new ArrayList(); + tier4AltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier4Altar.1"))); + tier4AltarPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T4.png"), true)); + tier4AltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier4Altar.2"))); + entries.add(new EntryUniText(tier4AltarPages, "guide.BloodMagic.entryName.architect.tier4Altar")); + + ArrayList<IPage> masterOrbPages = new ArrayList(); + masterOrbPages.add(new PageAltarRecipe(RecipeHolder.masterBloodOrbRecipe)); + masterOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.masterOrb"))); + entries.add(new EntryUniText(masterOrbPages, "guide.BloodMagic.entryName.architect.masterOrb")); + + ArrayList<IPage> whirlwindPages = new ArrayList(); + whirlwindPages.add(getOrbPageForRecipe(RecipeHolder.whirlwindSigilRecipe)); + whirlwindPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.whirlwind"))); + entries.add(new EntryUniText(whirlwindPages, "guide.BloodMagic.entryName.architect.whirlwind")); + + ArrayList<IPage> compressionPages = new ArrayList(); + compressionPages.add(getOrbPageForRecipe(RecipeHolder.compressionSigilRecipe)); + compressionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.compression"))); + entries.add(new EntryUniText(compressionPages, "guide.BloodMagic.entryName.architect.compression")); + + ArrayList<IPage> severancePages = new ArrayList(); + severancePages.add(getOrbPageForRecipe(RecipeHolder.enderSeveranceSigilRecipe)); + severancePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.severance"))); + entries.add(new EntryUniText(severancePages, "guide.BloodMagic.entryName.architect.severance")); + + ArrayList<IPage> teleposerPages = new ArrayList(); + teleposerPages.add(new PageAltarRecipe(RecipeHolder.teleposerFocusRecipe1)); + teleposerPages.add(new PageIRecipe(RecipeHolder.teleposerRecipe)); + teleposerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.teleposer"))); + entries.add(new EntryUniText(teleposerPages, "guide.BloodMagic.entryName.architect.teleposer")); + + ArrayList<IPage> suppressionPages = new ArrayList(); + suppressionPages.add(getOrbPageForRecipe(RecipeHolder.suppressionSigilRecipe)); + suppressionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.suppression"))); + entries.add(new EntryUniText(suppressionPages, "guide.BloodMagic.entryName.architect.suppression")); + + ArrayList<IPage> superiorCapacityPages = new ArrayList(); + superiorCapacityPages.add(getOrbPageForRecipe(RecipeHolder.superiorCapacityRecipe)); + superiorCapacityPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.superiorCapacity"))); + entries.add(new EntryUniText(superiorCapacityPages, "guide.BloodMagic.entryName.architect.superiorCapacity")); + + ArrayList<IPage> orbRunePages = new ArrayList(); + orbRunePages.add(getOrbPageForRecipe(RecipeHolder.orbRuneRecipe)); + orbRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.orbRune"))); + entries.add(new EntryUniText(orbRunePages, "guide.BloodMagic.entryName.architect.orbRune")); + + ArrayList<IPage> fieldTripPages = new ArrayList(); + fieldTripPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fieldTrip"))); + entries.add(new EntryUniText(fieldTripPages, "guide.BloodMagic.entryName.architect.fieldTrip")); + + ArrayList<IPage> bindingKeyPages = new ArrayList(); + bindingKeyPages.add(new PageIRecipe(RecipeHolder.keyOfBindingRecipe)); + bindingKeyPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bindingKey"))); + entries.add(new EntryUniText(bindingKeyPages, "guide.BloodMagic.entryName.architect.bindingKey")); + + ArrayList<IPage> tier5AltarPages = new ArrayList(); + tier5AltarPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T5.png"), true)); + tier5AltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier5Altar"))); + entries.add(new EntryUniText(tier5AltarPages, "guide.BloodMagic.entryName.architect.tier5Altar")); + + ArrayList<IPage> priceOfPowerPages = new ArrayList(); + priceOfPowerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.priceOfPower"))); + entries.add(new EntryUniText(priceOfPowerPages, "guide.BloodMagic.entryName.architect.priceOfPower")); + + ArrayList<IPage> demonicOrbPages = new ArrayList(); + demonicOrbPages.add(new PageAltarRecipe(RecipeHolder.archmageBloodOrbRecipe)); + demonicOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.demonicOrb"))); + entries.add(new EntryUniText(demonicOrbPages, "guide.BloodMagic.entryName.architect.demonicOrb")); + + ArrayList<IPage> energyBazookaPages = new ArrayList(); + demonicOrbPages.add(getOrbPageForRecipe(RecipeHolder.energyBazookaRecipe)); + energyBazookaPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.energyBazooka"))); + entries.add(new EntryUniText(energyBazookaPages, "guide.BloodMagic.entryName.architect.energyBazooka")); + + ArrayList<IPage> accelerationRunePages = new ArrayList(); + demonicOrbPages.add(getOrbPageForRecipe(RecipeHolder.accelerationRuneRecipe)); + accelerationRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.accelerationRune"))); + entries.add(new EntryUniText(accelerationRunePages, "guide.BloodMagic.entryName.architect.accelerationRune")); + + ArrayList<IPage> harvestPages = new ArrayList(); + demonicOrbPages.add(getOrbPageForRecipe(RecipeHolder.harvestSigilRecipe)); + harvestPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.harvest"))); + entries.add(new EntryUniText(harvestPages, "guide.BloodMagic.entryName.architect.harvest")); + + ArrayList<IPage> demonProblemPages = new ArrayList(); + demonProblemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.demonProblem"))); + entries.add(new EntryUniText(demonProblemPages, "guide.BloodMagic.entryName.architect.demonProblem")); + + ArrayList<IPage> tier6AltarPages = new ArrayList(); + tier6AltarPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T6.png"), true)); + tier6AltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier6Altar"))); + tier6AltarPages.add(new PageIRecipe(RecipeHolder.crystalCluserRecipe)); + tier6AltarPages.add(new PageAltarRecipe(RecipeHolder.transcendentBloodOrbRecipe)); + entries.add(new EntryUniText(tier6AltarPages, "guide.BloodMagic.entryName.architect.tier6Altar")); + + ArrayList<IPage> moreThanHumanPages = new ArrayList(); + moreThanHumanPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.moreThanHuman"))); + entries.add(new EntryUniText(moreThanHumanPages, "guide.BloodMagic.entryName.architect.moreThanHuman")); + + categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.architect", new ItemStack(ModItems.divinationSigil))); + } + + public static void registerRitualBook() + { + List<EntryAbstract> entries = new ArrayList(); + +// ArrayList<IPage> testPages = new ArrayList(); +// testPages.add(PageRitualMultiBlock.getPageForRitual("AW031Convocation")); +// entries.add(new EntryUniText(testPages, "Test page")); + + + ArrayList<IPage> introPages = new ArrayList(); + introPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.intro"))); + entries.add(new EntryUniText(introPages, "guide.BloodMagic.entryName.rituals.intro")); + + ArrayList<IPage> weakRitualPages = new ArrayList(); + weakRitualPages.add(getOrbPageForRecipe(RecipeHolder.weakRitualStoneRecipe)); + weakRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.weakRitual"))); + entries.add(new EntryUniText(weakRitualPages, "guide.BloodMagic.entryName.rituals.weakRitual")); + + ArrayList<IPage> ritualsPages = new ArrayList(); + ritualsPages.add(getOrbPageForRecipe(RecipeHolder.ritualStoneRecipe)); + ritualsPages.add(getOrbPageForRecipe(RecipeHolder.masterStoneRecipe)); + ritualsPages.add(new PageAltarRecipe(RecipeHolder.waterScribeTool)); + ritualsPages.add(new PageAltarRecipe(RecipeHolder.fireScribeTool)); + ritualsPages.add(new PageAltarRecipe(RecipeHolder.earthScribeTool)); + ritualsPages.add(new PageAltarRecipe(RecipeHolder.airScribeTool)); + ritualsPages.add(new PageIRecipe(RecipeHolder.ritualDiviner1Recipe)); + ritualsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.rituals"))); + ritualsPages.add(new PageAltarRecipe(RecipeHolder.weakActivationRecipe)); + entries.add(new EntryUniText(ritualsPages, "guide.BloodMagic.entryName.rituals.rituals")); + + ArrayList<IPage> waterRitualPages = new ArrayList(); + waterRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Water.png"), true)); + waterRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.waterRitual"))); + entries.add(new EntryUniText(waterRitualPages, "guide.BloodMagic.entryName.rituals.waterRitual")); + + ArrayList<IPage> lavaRitualPages = new ArrayList(); + lavaRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Lava.png"), true)); + lavaRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.lavaRitual"))); + entries.add(new EntryUniText(lavaRitualPages, "guide.BloodMagic.entryName.rituals.lavaRitual")); + + ArrayList<IPage> groveRitualPages = new ArrayList(); + groveRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/GreenGrove.png"), true)); + groveRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.groveRitual"))); + entries.add(new EntryUniText(groveRitualPages, "guide.BloodMagic.entryName.rituals.groveRitual")); + + ArrayList<IPage> interdictionRitualPages = new ArrayList(); + interdictionRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Interdiction.png"), true)); + interdictionRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.interdictionRitual"))); + entries.add(new EntryUniText(interdictionRitualPages, "guide.BloodMagic.entryName.rituals.interdictionRitual")); + + ArrayList<IPage> containmentRitualPages = new ArrayList(); + containmentRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Containment.png"), true)); + containmentRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.containmentRitual"))); + entries.add(new EntryUniText(containmentRitualPages, "guide.BloodMagic.entryName.rituals.containmentRitual")); + + ArrayList<IPage> bindingRitualPages = new ArrayList(); + bindingRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Binding.png"), true)); + bindingRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.bindingRitual"))); + entries.add(new EntryUniText(bindingRitualPages, "guide.BloodMagic.entryName.rituals.bindingRitual")); + + ArrayList<IPage> beastModePages = new ArrayList(); + beastModePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.beastMode"))); + entries.add(new EntryUniText(beastModePages, "guide.BloodMagic.entryName.rituals.beastMode")); + + ArrayList<IPage> unbindingRitualPages = new ArrayList(); + unbindingRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Unbinding.png"), true)); + unbindingRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.unbindingRitual"))); + entries.add(new EntryUniText(unbindingRitualPages, "guide.BloodMagic.entryName.rituals.unbindingRitual")); + + ArrayList<IPage> jumpRitualPages = new ArrayList(); + jumpRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Jump.png"), true)); + jumpRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.jumpRitual"))); + entries.add(new EntryUniText(jumpRitualPages, "guide.BloodMagic.entryName.rituals.jumpRitual")); + + ArrayList<IPage> duskInkPages = new ArrayList(); + duskInkPages.add(new PageAltarRecipe(RecipeHolder.duskRecipe)); + duskInkPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.duskInk"))); + entries.add(new EntryUniText(duskInkPages, "guide.BloodMagic.entryName.rituals.duskInk")); + + ArrayList<IPage> magnetismRitualPages = new ArrayList(); + magnetismRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Magnetism.png"), true)); + magnetismRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.magnetismRitual"))); + entries.add(new EntryUniText(magnetismRitualPages, "guide.BloodMagic.entryName.rituals.magnetismRitual")); + + ArrayList<IPage> crusherRitualPages = new ArrayList(); + crusherRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Crusher.png"), true)); + crusherRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.crusherRitual"))); + entries.add(new EntryUniText(crusherRitualPages, "guide.BloodMagic.entryName.rituals.crusherRitual")); + + ArrayList<IPage> speedRitualPages = new ArrayList(); + speedRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Speed.png"), true)); + speedRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.speedRitual"))); + entries.add(new EntryUniText(speedRitualPages, "guide.BloodMagic.entryName.rituals.speedRitual")); + + ArrayList<IPage> shepherdRitualPages = new ArrayList(); + shepherdRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/AnimalGrowth.png"), true)); + shepherdRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.shepherdRitual"))); + entries.add(new EntryUniText(shepherdRitualPages, "guide.BloodMagic.entryName.rituals.shepherdRitual")); + + ArrayList<IPage> darkMagicPages = new ArrayList(); + darkMagicPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.darkMagic"))); + entries.add(new EntryUniText(darkMagicPages, "guide.BloodMagic.entryName.rituals.darkMagic")); + + ArrayList<IPage> knifeAndSufferingRitualPages = new ArrayList(); + knifeAndSufferingRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/WellOfSuffering.png"), true)); + knifeAndSufferingRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.knifeAndSufferingRitual.1"))); + knifeAndSufferingRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/FeatheredKnife.png"), true)); + knifeAndSufferingRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.knifeAndSufferingRitual.2"))); + entries.add(new EntryUniText(knifeAndSufferingRitualPages, "guide.BloodMagic.entryName.rituals.knifeAndSufferingRitual")); + + ArrayList<IPage> regenerationRitualPages = new ArrayList(); + regenerationRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Regeneration.png"), true)); + regenerationRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.regenerationRitual"))); + entries.add(new EntryUniText(regenerationRitualPages, "guide.BloodMagic.entryName.rituals.regenerationRitual")); + + ArrayList<IPage> harvestFestivalPages = new ArrayList(); + harvestFestivalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.harvestFestival"))); + entries.add(new EntryUniText(harvestFestivalPages, "guide.BloodMagic.entryName.rituals.harvestFestival")); + + ArrayList<IPage> thenThereWereFivePages = new ArrayList(); + thenThereWereFivePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.thenThereWereFive"))); + entries.add(new EntryUniText(thenThereWereFivePages, "guide.BloodMagic.entryName.rituals.thenThereWereFive")); + + ArrayList<IPage> alchemyRitualPages = new ArrayList(); + alchemyRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Alchemy.png"), true)); + alchemyRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.alchemyRitual"))); + entries.add(new EntryUniText(alchemyRitualPages, "guide.BloodMagic.entryName.rituals.alchemyRitual")); + + ArrayList<IPage> domeRitualPages = new ArrayList(); + domeRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Dome.png"), true)); + domeRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.domeRitual"))); + entries.add(new EntryUniText(domeRitualPages, "guide.BloodMagic.entryName.rituals.domeRitual")); + + ArrayList<IPage> awakenedCrystalPages = new ArrayList(); + awakenedCrystalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.awakenedCrystal"))); + entries.add(new EntryUniText(awakenedCrystalPages, "guide.BloodMagic.entryName.rituals.awakenedCrystal")); + + ArrayList<IPage> featheredEarthRitualPages = new ArrayList(); + featheredEarthRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/FeatheredEarth.png"), true)); + featheredEarthRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.featheredEarthRitual"))); + entries.add(new EntryUniText(featheredEarthRitualPages, "guide.BloodMagic.entryName.rituals.featheredEarthRitual")); + + ArrayList<IPage> gaiaRitualPages = new ArrayList(); + gaiaRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Gaia.png"), true)); + gaiaRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.gaiaRitual"))); + entries.add(new EntryUniText(gaiaRitualPages, "guide.BloodMagic.entryName.rituals.gaiaRitual")); + + ArrayList<IPage> condorRitualPages = new ArrayList(); + condorRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Flight.png"), true)); + condorRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.condorRitual"))); + entries.add(new EntryUniText(condorRitualPages, "guide.BloodMagic.entryName.rituals.condorRitual")); + + ArrayList<IPage> meteorRitualPages = new ArrayList(); + meteorRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Meteor.png"), true)); + meteorRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.meteorRitual"))); + entries.add(new EntryUniText(meteorRitualPages, "guide.BloodMagic.entryName.rituals.meteorRitual")); + + ArrayList<IPage> expulsionRitualPages = new ArrayList(); + expulsionRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Expulsion.png"), true)); + expulsionRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.expulsionRitual"))); + entries.add(new EntryUniText(expulsionRitualPages, "guide.BloodMagic.entryName.rituals.expulsionRitual")); + + ArrayList<IPage> costOfProgressPages = new ArrayList(); + costOfProgressPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.costOfProgress.1"))); + costOfProgressPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.costOfProgress.2"))); + entries.add(new EntryUniText(costOfProgressPages, "guide.BloodMagic.entryName.rituals.costOfProgress")); + + ArrayList<IPage> zephyrRitualPages = new ArrayList(); + zephyrRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Zephyr.png"), true)); + zephyrRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.zephyrRitual"))); + entries.add(new EntryUniText(zephyrRitualPages, "guide.BloodMagic.entryName.rituals.zephyrRitual")); + + ArrayList<IPage> harvestRitualPages = new ArrayList(); + harvestRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Harvest.png"), true)); + harvestRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.harvestRitual"))); + entries.add(new EntryUniText(harvestRitualPages, "guide.BloodMagic.entryName.rituals.harvestRitual")); + + ArrayList<IPage> eternalSoulRitualPages = new ArrayList(); + eternalSoulRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/EternalSoul.png"), true)); + eternalSoulRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.eternalSoulRitual"))); + entries.add(new EntryUniText(eternalSoulRitualPages, "guide.BloodMagic.entryName.rituals.eternalSoulRitual")); + + ArrayList<IPage> ellipsoidRitualPages = new ArrayList(); + ellipsoidRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Ellipsoid.png"), true)); + ellipsoidRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.ellipsoidRitual"))); + entries.add(new EntryUniText(ellipsoidRitualPages, "guide.BloodMagic.entryName.rituals.ellipsoidRitual")); + + ArrayList<IPage> evaporationRitualPages = new ArrayList(); + evaporationRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Evaporation.png"), true)); + evaporationRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.evaporationRitual"))); + entries.add(new EntryUniText(evaporationRitualPages, "guide.BloodMagic.entryName.rituals.evaporationRitual")); + + ArrayList<IPage> sacrosanctityRitualPages = new ArrayList(); + sacrosanctityRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Sacrosanctity.png"), true)); + sacrosanctityRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.sacrosanctityRitual"))); + entries.add(new EntryUniText(sacrosanctityRitualPages, "guide.BloodMagic.entryName.rituals.sacrosanctityRitual")); + + ArrayList<IPage> evilRitualPages = new ArrayList(); + evilRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/VeilOfEvil.png"), true)); + evilRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.evilRitual"))); + entries.add(new EntryUniText(evilRitualPages, "guide.BloodMagic.entryName.rituals.evilRitual")); + + ArrayList<IPage> stomachRitualPages = new ArrayList(); + stomachRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Stomach.png"), true)); + stomachRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.stomachRitual"))); + entries.add(new EntryUniText(stomachRitualPages, "guide.BloodMagic.entryName.rituals.stomachRitual")); + + ArrayList<IPage> reagentEffectsRitualPages = new ArrayList(); + for(int i=1; i<=24; i++) + { + reagentEffectsRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.reagentEffects." + i))); + } + entries.add(new EntryUniText(reagentEffectsRitualPages, "guide.BloodMagic.entryName.rituals.reagentEffects")); + + ArrayList<IPage> conclaveOfMagesPages = new ArrayList(); + conclaveOfMagesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.conclaveOfMages"))); + entries.add(new EntryUniText(conclaveOfMagesPages, "guide.BloodMagic.entryName.rituals.conclaveOfMages")); + + ArrayList<IPage> forbiddenParadisePages = new ArrayList(); + forbiddenParadisePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.forbiddenParadise"))); + entries.add(new EntryUniText(forbiddenParadisePages, "guide.BloodMagic.entryName.rituals.forbiddenParadise")); + + ArrayList<IPage> convocationRitualPages = new ArrayList(); + convocationRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/Convocation.png"), true)); + convocationRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.convocationRitual"))); + entries.add(new EntryUniText(convocationRitualPages, "guide.BloodMagic.entryName.rituals.convocationRitual")); + + ArrayList<IPage> longHaulPages = new ArrayList(); + longHaulPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.longHaul"))); + entries.add(new EntryUniText(longHaulPages, "guide.BloodMagic.entryName.rituals.longHaul")); + + ArrayList<IPage> phantomHandsRitualPages = new ArrayList(); + phantomHandsRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/PhantomHands.png"), true)); + phantomHandsRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.phantomHandsRitual"))); + entries.add(new EntryUniText(phantomHandsRitualPages, "guide.BloodMagic.entryName.rituals.phantomHandsRitual")); + + ArrayList<IPage> anvilRitualPages = new ArrayList(); + anvilRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/BeatingAnvil.png"), true)); + anvilRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.anvilRitual"))); + entries.add(new EntryUniText(anvilRitualPages, "guide.BloodMagic.entryName.rituals.anvilRitual")); + + ArrayList<IPage> dawnInkPages = new ArrayList(); + dawnInkPages.add(new PageAltarRecipe(RecipeHolder.dawnRecipe)); + dawnInkPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.dawnInk"))); + entries.add(new EntryUniText(dawnInkPages, "guide.BloodMagic.entryName.rituals.dawnInk")); + + ArrayList<IPage> symmetryRitualPages = new ArrayList(); + symmetryRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/SymmetryOmega.png"), true)); + symmetryRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.symmetryRitual"))); + entries.add(new EntryUniText(symmetryRitualPages, "guide.BloodMagic.entryName.rituals.symmetryRitual")); + + ArrayList<IPage> stallingRitualPages = new ArrayList(); + stallingRitualPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/rituals/StallingOmega.png"), true)); + stallingRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.stallingRitual"))); + entries.add(new EntryUniText(stallingRitualPages, "guide.BloodMagic.entryName.rituals.stallingRitual")); + + ArrayList<IPage> newMoonRitualPages = new ArrayList(); + newMoonRitualPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.rituals.newMoonRitual"))); + entries.add(new EntryUniText(newMoonRitualPages, "guide.BloodMagic.entryName.rituals.newMoonRitual")); + + categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.rituals", new ItemStack(ModBlocks.blockMasterStone))); + } + + public static void registerDemonBook() + { + List<EntryAbstract> entries = new ArrayList(); + + ArrayList<IPage> ashesPages = new ArrayList(); + ashesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.ashes"))); + entries.add(new EntryUniText(ashesPages, "guide.BloodMagic.entryName.demons.ashes")); + + ArrayList<IPage> tamedDemonPages = new ArrayList(); + tamedDemonPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.tamedDemon"))); + entries.add(new EntryUniText(tamedDemonPages, "guide.BloodMagic.entryName.demons.tamedDemon")); + + ArrayList<IPage> futurePages = new ArrayList(); + futurePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.future"))); + entries.add(new EntryUniText(futurePages, "guide.BloodMagic.entryName.demons.future")); + + ArrayList<IPage> knightPages = new ArrayList(); + knightPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.knight"))); + entries.add(new EntryUniText(knightPages, "guide.BloodMagic.entryName.demons.knight")); + + ArrayList<IPage> demonShardPages = new ArrayList(); + demonShardPages.addAll(PageHelper.pagesForLongText((StatCollector.translateToLocal("aw.entries.demons.demonShard")), new ItemStack(ModItems.demonBloodShard))); + entries.add(new EntryUniText(demonShardPages, "guide.BloodMagic.entryName.demons.demonShard")); + + + ArrayList<IPage> demonSummoningPages = new ArrayList(); + demonSummoningPages.add(new PageIRecipe(RecipeHolder.arcanePedestalRecipe)); + demonSummoningPages.add(new PageIRecipe(RecipeHolder.arcanePlinthRecipe)); + demonSummoningPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/demons/Ring1.png"), true)); + demonSummoningPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/demons/Ring2.png"), true)); + demonSummoningPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.demonSummoning"))); + entries.add(new EntryUniText(demonSummoningPages, "guide.BloodMagic.entryName.demons.demonSummoning")); + + ArrayList<IPage> keysGatePages = new ArrayList(); + for(int i=1; i<=10; i++) + { + keysGatePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.keysGate." + i))); + } + entries.add(new EntryUniText(keysGatePages, "guide.BloodMagic.entryName.demons.keysGate")); + + ArrayList<IPage> futurePlansPages = new ArrayList(); + futurePlansPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.futurePlans"))); + entries.add(new EntryUniText(futurePlansPages, "guide.BloodMagic.entryName.demons.futurePlans")); + + ArrayList<IPage> demonInvasionPages = new ArrayList(); + demonInvasionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.demonInvasion"))); + entries.add(new EntryUniText(demonInvasionPages, "guide.BloodMagic.entryName.demons.demonInvasion")); + + ArrayList<IPage> observationsPages = new ArrayList(); + observationsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.demons.observations"))); + entries.add(new EntryUniText(observationsPages, "guide.BloodMagic.entryName.demons.observations")); + + categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.demons", new ItemStack(ModItems.demonBloodShard))); + } + + public static void registerSpellBook() + { + List<EntryAbstract> entries = new ArrayList(); + + ArrayList<IPage> demonGirlPages = new ArrayList(); + demonGirlPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.demonGirl"))); + entries.add(new EntryUniText(demonGirlPages, "guide.BloodMagic.entryName.spells.demonGirl")); + + ArrayList<IPage> spellTablePages = new ArrayList(); + spellTablePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.spellTable.1"))); + spellTablePages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/SimpleSpellTable.png"), true)); + spellTablePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.spellTable.2"))); + entries.add(new EntryUniText(spellTablePages, "guide.BloodMagic.entryName.spells.spellTable")); + + ArrayList<IPage> simpleEffectsPages = new ArrayList(); + for(int i=1; i<=11; i++) + { + simpleEffectsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.simpleEffects." + i))); + } + entries.add(new EntryUniText(simpleEffectsPages, "guide.BloodMagic.entryName.spells.simpleEffects")); + + ArrayList<IPage> tableAndSkullsPages = new ArrayList(); + tableAndSkullsPages.add(new PageAltarRecipe(RecipeHolder.blankSpellRecipe)); + tableAndSkullsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.tableAndSkulls.1"))); + tableAndSkullsPages.add(getOrbPageForRecipe(RecipeHolder.spellTableRecipe)); + tableAndSkullsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.tableAndSkulls.2"))); + entries.add(new EntryUniText(tableAndSkullsPages, "guide.BloodMagic.entryName.spells.tableAndSkulls")); + + ArrayList<IPage> timePassesPages = new ArrayList(); + timePassesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.timePasses"))); + entries.add(new EntryUniText(timePassesPages, "guide.BloodMagic.entryName.spells.timePasses")); + + ArrayList<IPage> complexSpellBasicsPages = new ArrayList(); + complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics.1"))); + complexSpellBasicsPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Paradigm.png"), true)); + + for(int i=2; i<=6; i++) + complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics." + i))); + + complexSpellBasicsPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Effect.png"), true)); + complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics.7"))); + complexSpellBasicsPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Modifier.png"), true)); + + for(int i=8; i<=12; i++) + complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics." + i))); + + complexSpellBasicsPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Enhancement.png"), true)); + + for(int i=13; i<=16; i++) + complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics." + i))); + + complexSpellBasicsPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/spells/Conduit.png"), true)); + complexSpellBasicsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellBasics.17"))); + + entries.add(new EntryUniText(complexSpellBasicsPages, "guide.BloodMagic.entryName.spells.complexSpellBasics")); + + ArrayList<IPage> complexSpellEffectsPages = new ArrayList(); + for(int i=1; i<=17; i++) + complexSpellEffectsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.complexSpellEffects." + i))); + entries.add(new EntryUniText(complexSpellEffectsPages, "guide.BloodMagic.entryName.spells.complexSpellEffects")); + + ArrayList<IPage> offTopicPages = new ArrayList(); + offTopicPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.offTopic"))); + entries.add(new EntryUniText(offTopicPages, "guide.BloodMagic.entryName.spells.offTopic")); + + ArrayList<IPage> demonicPowerPages = new ArrayList(); + demonicPowerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.spells.demonicPower"))); + entries.add(new EntryUniText(demonicPowerPages, "guide.BloodMagic.entryName.spells.demonicPower")); + + categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.spells", new ItemStack(ModItems.itemComplexSpellCrystal))); + } + + public static void registerAlchemyBook() + { + List<EntryAbstract> entries = new ArrayList(); + + ArrayList<IPage> fatedMeetingPages = new ArrayList(); + fatedMeetingPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.fatedMeeting"))); + entries.add(new EntryUniText(fatedMeetingPages, "guide.BloodMagic.entryName.alchemy.fatedMeeting")); + + ArrayList<IPage> firstStepsPages = new ArrayList(); + firstStepsPages.add(getOrbPageForRecipe(RecipeHolder.alchemySetRecipe)); + firstStepsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.firstSteps"))); + entries.add(new EntryUniText(firstStepsPages, "guide.BloodMagic.entryName.alchemy.firstSteps")); + + ArrayList<IPage> chemistrySetPages = new ArrayList(); + for(int i=1; i<=10; i++) + chemistrySetPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.chemistrySet." + i))); + entries.add(new EntryUniText(chemistrySetPages, "guide.BloodMagic.entryName.alchemy.chemistrySet")); + + ArrayList<IPage> incensePages = new ArrayList(); + incensePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.incense.1"))); + incensePages.add(new PageIRecipe(RecipeHolder.crucibleRecipe)); + incensePages.add(new PageIRecipe(RecipeHolder.woodAshRecipe)); + incensePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.incense.2"))); + incensePages.add(getOrbPageForRecipe(RecipeHolder.byrrusRecipe)); + incensePages.add(getOrbPageForRecipe(RecipeHolder.livensRecipe)); + incensePages.add(getOrbPageForRecipe(RecipeHolder.virRecipe)); + incensePages.add(getOrbPageForRecipe(RecipeHolder.purpuraRecipe)); + incensePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.incense.3"))); + entries.add(new EntryUniText(incensePages, "guide.BloodMagic.entryName.alchemy.incense")); + + ArrayList<IPage> potionsPages = new ArrayList(); + potionsPages.add(new PageAltarRecipe(RecipeHolder.flaskRecipe)); + potionsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.potions"))); + entries.add(new EntryUniText(potionsPages, "guide.BloodMagic.entryName.alchemy.potions")); + + ArrayList<IPage> reagentRevolutionPages = new ArrayList(); + for(int i=1; i<=8; i++) + reagentRevolutionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentRevolution." + i))); + entries.add(new EntryUniText(reagentRevolutionPages, "guide.BloodMagic.entryName.alchemy.reagentRevolution")); + + ArrayList<IPage> newPotionsPages = new ArrayList(); + newPotionsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.newPotions"))); + entries.add(new EntryUniText(newPotionsPages, "guide.BloodMagic.entryName.alchemy.newPotions")); + + ArrayList<IPage> soulSandPages = new ArrayList(); + soulSandPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.soulSand"))); + entries.add(new EntryUniText(soulSandPages, "guide.BloodMagic.entryName.alchemy.soulSand")); + + ArrayList<IPage> timeGoesByPages = new ArrayList(); + timeGoesByPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.timeGoesBy"))); + entries.add(new EntryUniText(timeGoesByPages, "guide.BloodMagic.entryName.alchemy.timeGoesBy")); + + ArrayList<IPage> catalystsPages = new ArrayList(); + catalystsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.catalysts"))); + entries.add(new EntryUniText(catalystsPages, "guide.BloodMagic.entryName.alchemy.catalysts")); + + ArrayList<IPage> activationCrystalPages = new ArrayList(); + activationCrystalPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.activationCrystal"))); + entries.add(new EntryUniText(activationCrystalPages, "guide.BloodMagic.entryName.alchemy.activationCrystal")); + + ArrayList<IPage> reagentSystemPages = new ArrayList(); + reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.1"))); + reagentSystemPages.add(new PageIRecipe(RecipeHolder.calcinatorRecipe)); + reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.2"))); + reagentSystemPages.add(new PageIRecipe(RecipeHolder.belljarRecipe)); + reagentSystemPages.add(new PageIRecipe(RecipeHolder.relayRecipe)); + reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.3"))); + reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.4"))); + reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.5"))); + reagentSystemPages.add(new PageIRecipe(RecipeHolder.routerRecipe)); + reagentSystemPages.add(new PageIRecipe(RecipeHolder.segmenterRecipe)); + reagentSystemPages.add(new PageIRecipe(RecipeHolder.cleanserRecipe)); + reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.6"))); + + reagentSystemPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.reagentSystem.7"))); + + entries.add(new EntryUniText(reagentSystemPages, "guide.BloodMagic.entryName.alchemy.reagentSystem")); + + ArrayList<IPage> magusSecretPages = new ArrayList(); + magusSecretPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.magusSecret"))); + entries.add(new EntryUniText(magusSecretPages, "guide.BloodMagic.entryName.alchemy.magusSecret")); + + ArrayList<IPage> simpleCreationsPages = new ArrayList(); + simpleCreationsPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.alchemy.simpleCreations"))); + entries.add(new EntryUniText(simpleCreationsPages, "guide.BloodMagic.entryName.alchemy.simpleCreations")); + + categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.alchemy", new ItemStack(ModItems.alchemyFlask))); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandBind.java b/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandBind.java new file mode 100644 index 00000000..c97515a8 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandBind.java @@ -0,0 +1,76 @@ +package WayofTime.alchemicalWizardry.common.commands; + +import java.util.List; + +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.server.MinecraftServer; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; + +public class CommandBind extends CommandBase +{ + public CommandBind() {} + + public String getCommandName() + { + return "bind"; + } + + public int getRequiredPermissionLevel() + { + return 2; + } + + public String getCommandUsage(ICommandSender icommandsender) + { + return "commands.bind.usage"; + } + + public void processCommand(ICommandSender iCommandSender, String[] astring) + { + EntityPlayerMP entityplayermp = getCommandSenderAsPlayer(iCommandSender); + ItemStack item = entityplayermp.getCurrentEquippedItem(); + EntityPlayerMP targetPlayer = getPlayer(iCommandSender, astring[0]); + + if (targetPlayer == null) + { + throw new CommandException("commands.bind.failed.noPlayer"); + } + + if (item != null && item.getItem() instanceof IBindable) + { + if (EnergyItems.getOwnerName(item).isEmpty()) + { + EnergyItems.checkAndSetItemOwner(item, targetPlayer); + func_152373_a(iCommandSender, this, "commands.bind.success"); + } + else + { + throw new CommandException("commands.bind.failed.alreadyBound"); + } + } + else if (!(item.getItem() instanceof IBindable)) + { + throw new CommandException("commands.bind.failed.notBindable"); + } + } + + public List addTabCompletionOptions(ICommandSender iCommandSender, String[] astring) + { + return getListOfStringsMatchingLastWord(astring, this.getPlayer()); + } + + protected String[] getPlayer() + { + return MinecraftServer.getServer().getAllUsernames(); + } + + public boolean isUsernameIndex(String[] astring, int par2) + { + return par2 == 0; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandSN.java b/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandSN.java new file mode 100644 index 00000000..5f96be2d --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandSN.java @@ -0,0 +1,137 @@ +package WayofTime.alchemicalWizardry.common.commands; + +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.server.MinecraftServer; + +import java.util.List; + +public class CommandSN extends CommandBase +{ + public CommandSN() {} + + @Override + public String getCommandName() + { + return "soulnetwork"; + } + + @Override + public int getRequiredPermissionLevel() + { + return 2; + } + + @Override + public String getCommandUsage(ICommandSender icommandsender) + { + return "commands.soulnetwork.usage"; + } + + @Override + public void processCommand(ICommandSender icommandsender, String[] astring) + { + EntityPlayerMP targetPlayer = getPlayer(icommandsender, astring[0]); + String owner = targetPlayer.getDisplayName(); + EntityPlayerMP proxyPlayerName = getPlayer(icommandsender, astring[0]); + + if (astring.length >= 2 && astring.length <= 3) + { + if ("add".equalsIgnoreCase(astring[1])) + { + int amount = parseIntBounded(icommandsender, astring[2], Integer.MIN_VALUE, Integer.MAX_VALUE); + + SoulNetworkHandler.addCurrentEssenceToMaximum(owner, amount, Integer.MAX_VALUE); + func_152373_a(icommandsender, this, "commands.soulnetwork.add.success", amount, owner); + } + else if ("subtract".equalsIgnoreCase(astring[1])) + { + int amount = parseIntBounded(icommandsender, astring[2], Integer.MIN_VALUE, Integer.MAX_VALUE); + + if (amount > SoulNetworkHandler.getCurrentEssence(owner)) + { + int lp = SoulNetworkHandler.getCurrentEssence(owner); + SoulNetworkHandler.syphonFromNetwork(owner, lp); + func_152373_a(icommandsender, this, "commands.soulnetwork.subtract.success", SoulNetworkHandler.getCurrentEssence(owner), owner); + } + else + { + SoulNetworkHandler.syphonFromNetwork(owner, amount); + func_152373_a(icommandsender, this, "commands.soulnetwork.subtract.success", amount, owner); + } + } + else if ("fill".equalsIgnoreCase(astring[1])) + { + int amount = Integer.MAX_VALUE - SoulNetworkHandler.getCurrentEssence(owner); + SoulNetworkHandler.addCurrentEssenceToMaximum(owner, amount, Integer.MAX_VALUE); + func_152373_a(icommandsender, this, "commands.soulnetwork.fill.success", owner); + } + else if ("empty".equalsIgnoreCase(astring[1])) + { + SoulNetworkHandler.syphonFromNetwork(owner, SoulNetworkHandler.getCurrentEssence(owner)); + func_152373_a(icommandsender, this, "commands.soulnetwork.empty.success", owner); + } + else if ("get".equalsIgnoreCase(astring[1])) + { + int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); + func_152373_a(icommandsender, this, "commands.soulnetwork.get.success", currentEssence, owner); + } + else if ("fillMax".equalsIgnoreCase(astring[1])) + { + int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); + int orbTier = SoulNetworkHandler.getCurrentMaxOrb(owner); + int maxForOrb = SoulNetworkHandler.getMaximumForOrbTier(orbTier); + int fillAmount = maxForOrb - currentEssence; + SoulNetworkHandler.addCurrentEssenceToMaximum(owner, fillAmount, fillAmount); + func_152373_a(icommandsender, this, "commands.soulnetwork.fillMax.success", owner); + } + else if ("create".equalsIgnoreCase(astring[1])) + { + int orbTier = parseIntBounded(icommandsender, astring[2], 1, 6); + SoulNetworkHandler.setMaxOrbToMax(proxyPlayerName.getDisplayName(), orbTier); + func_152373_a(icommandsender, this, "commands.soulnetwork.create.success", owner, orbTier); + } + else + { + throw new CommandException("commands.soulnetwork.notACommand"); + } + } + else if (astring.length == 0) + { + throw new CommandException("commands.soulnetwork.noPlayer"); + } + else if (astring.length == 1) + { + throw new CommandException("commands.soulnetwork.noCommand"); + } + } + + @Override + public List addTabCompletionOptions(ICommandSender iCommandSender, String[] astring) + { + if (astring.length == 1) + { + return getListOfStringsMatchingLastWord(astring, this.getPlayer()); + } + else if (astring.length == 2) + { + return getListOfStringsMatchingLastWord(astring, "add", "subtract", "fill", "empty", "get", "fillMax", "create"); + } + + return null; + } + + protected String[] getPlayer() + { + return MinecraftServer.getServer().getAllUsernames(); + } + + @Override + public boolean isUsernameIndex(String[] astring, int par2) + { + return par2 == 0; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandUnbind.java b/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandUnbind.java new file mode 100644 index 00000000..3a1cc09a --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/commands/CommandUnbind.java @@ -0,0 +1,52 @@ +package WayofTime.alchemicalWizardry.common.commands; + +import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; + +public class CommandUnbind extends CommandBase +{ + public CommandUnbind() {} + + public String getCommandName() + { + return "unbind"; + } + + public int getRequiredPermissionLevel() + { + return 2; + } + + public String getCommandUsage(ICommandSender icommandsender) + { + return "commands.unbind.usage"; + } + + public void processCommand(ICommandSender iCommandSender, String[] astring) + { + EntityPlayerMP entityplayermp = getCommandSenderAsPlayer(iCommandSender); + ItemStack item = entityplayermp.getCurrentEquippedItem(); + + if (item != null && item.getItem() instanceof IBindable) + { + if (!EnergyItems.getOwnerName(item).isEmpty()) + { + item.getTagCompound().removeTag("ownerName"); + func_152373_a(iCommandSender, this, "commands.unbind.success"); + } + else + { + throw new CommandException("commands.unbind.failed.notBindable"); + } + } + else if (!(item.getItem() instanceof IBindable)) + { + throw new CommandException("commands.unbind.failed.notBindable"); + } + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingManager.java b/src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingManager.java index b8ce890d..6f52fefa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingManager.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/compress/StorageBlockCraftingManager.java @@ -231,8 +231,8 @@ public class StorageBlockCraftingManager if (i == 2 && itemstack.getItem() == itemstack1.getItem() && itemstack.stackSize == 1 && itemstack1.stackSize == 1 && itemstack.getItem().isRepairable()) { Item item = itemstack.getItem(); - int j1 = item.getMaxDamage() - itemstack.getItemDamage(); - int k = item.getMaxDamage() - itemstack1.getItemDamage(); + int j1 = item.getMaxDamage() - itemstack.getItemDamageForDisplay(); + int k = item.getMaxDamage() - itemstack1.getItemDamageForDisplay(); int l = j1 + k + item.getMaxDamage() * 5 / 100; int i1 = item.getMaxDamage() - l; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java index 6186b6c9..18503f85 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BlockSet.java @@ -14,16 +14,15 @@ import net.minecraft.block.BlockTrapDoor; import net.minecraft.init.Blocks; import net.minecraft.inventory.IInventory; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.common.registry.GameRegistry.UniqueIdentifier; +import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.common.demonVillage.loot.DemonVillageLootRegistry; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.IBlockPortalNode; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.ITilePortalNode; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier; public class BlockSet { @@ -40,7 +39,7 @@ public class BlockSet { this.blockid = blockid; this.metadata = new int[4]; - positions = new ArrayList<Int3>(); + positions = new ArrayList(); } public BlockSet(Block block) @@ -277,7 +276,7 @@ public class BlockSet return GameRegistry.findBlock(modId, name); } - public int getMetaForDirection(EnumFacing dir) + public int getMetaForDirection(ForgeDirection dir) { if (metadata.length < 4) { @@ -299,7 +298,7 @@ public class BlockSet } } - public void buildAtIndex(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, EnumFacing dir, int index, boolean populateInventories, int tier) + public void buildAtIndex(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, ForgeDirection dir, int index, boolean populateInventories, int tier) { Block block = this.getBlock(); if (index >= positions.size() || block == null) @@ -334,15 +333,14 @@ public class BlockSet default: } - BlockPos newPos = new BlockPos(xCoord + xOff, yCoord + yOff, zCoord + zOff); - world.setBlockState(newPos, block.getStateFromMeta(meta), 3); + world.setBlock(xCoord + xOff, yCoord + yOff, zCoord + zOff, block, meta, 3); if(populateInventories) { - this.populateIfIInventory(world, newPos, tier); + this.populateIfIInventory(world, xCoord + xOff, yCoord + yOff, zCoord + zOff, tier); } if(block instanceof IBlockPortalNode) { - TileEntity tile = world.getTileEntity(newPos); + TileEntity tile = world.getTileEntity(xCoord + xOff, yCoord + yOff, zCoord + zOff); if(tile instanceof ITilePortalNode) { ((ITilePortalNode) tile).setPortalLocation(teDemonPortal); @@ -350,16 +348,16 @@ public class BlockSet } } - public void populateIfIInventory(World world, BlockPos pos, int tier) + public void populateIfIInventory(World world, int x, int y, int z, int tier) { - TileEntity tile = world.getTileEntity(pos); + TileEntity tile = world.getTileEntity(x, y, z); if(tile instanceof IInventory) { DemonVillageLootRegistry.populateChest((IInventory)tile, tier); } } - public void buildAll(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, EnumFacing dir, boolean populateInventories, int tier) + public void buildAll(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, ForgeDirection dir, boolean populateInventories, int tier) { for (int i = 0; i < positions.size(); i++) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java index 6c62e88a..fc1ba6b7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java @@ -4,10 +4,8 @@ import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; @@ -30,7 +28,7 @@ public class BuildingSchematic public BuildingSchematic(String name) { this.name = name; - blockList = new ArrayList<BlockSet>(); + blockList = new ArrayList(); this.doorX = 0; this.doorZ = 0; this.doorY = 0; @@ -54,7 +52,7 @@ public class BuildingSchematic blockList.add(set); } - public void buildAll(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, EnumFacing dir, boolean populateInventories) + public void buildAll(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, ForgeDirection dir, boolean populateInventories) { for (BlockSet set : blockList) { @@ -88,9 +86,9 @@ public class BuildingSchematic return new Int3(gridX, doorY, gridZ); } - public List<Int3> getGriddedPositions(EnumFacing dir) + public List<Int3> getGriddedPositions(ForgeDirection dir) { - List<Int3> positionList = new ArrayList<Int3>(); + List<Int3> positionList = new ArrayList(); for (BlockSet blockSet : blockList) { @@ -129,7 +127,7 @@ public class BuildingSchematic return positionList; } - public void destroyAllInField(World world, int xCoord, int yCoord, int zCoord, EnumFacing dir) + public void destroyAllInField(World world, int xCoord, int yCoord, int zCoord, ForgeDirection dir) { // GridSpaceHolder grid = this.createGSH(); //GridSpaceHolder is not aware of the buildings - need to use the schematic @@ -139,12 +137,10 @@ public class BuildingSchematic { for (Int3 pos : positionList) { - BlockPos newPos = new BlockPos(xCoord + pos.xCoord, yCoord + i, zCoord + pos.zCoord); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); + Block block = world.getBlock(xCoord + pos.xCoord, yCoord + i, zCoord + pos.zCoord); if (block != ModBlocks.blockDemonPortal) { - world.setBlockToAir(newPos); + world.setBlockToAir(xCoord + pos.xCoord, yCoord + i, zCoord + pos.zCoord); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonBuilding.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonBuilding.java index fa6450d7..aa190a28 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonBuilding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonBuilding.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.common.demonVillage; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; @@ -30,17 +30,17 @@ public class DemonBuilding return schematic.getName(); } - public boolean isValid(GridSpaceHolder master, int gridX, int gridZ, EnumFacing dir) + public boolean isValid(GridSpaceHolder master, int gridX, int gridZ, ForgeDirection dir) { return area.doesContainAll(master, gridX, gridZ, dir); } - public void buildAll(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, EnumFacing dir, boolean populateInventories) + public void buildAll(TEDemonPortal teDemonPortal, World world, int xCoord, int yCoord, int zCoord, ForgeDirection dir, boolean populateInventories) { schematic.buildAll(teDemonPortal, world, xCoord, yCoord, zCoord, dir, populateInventories); } - public void setAllGridSpaces(int xInit, int zInit, int yLevel, EnumFacing dir, int type, GridSpaceHolder master) + public void setAllGridSpaces(int xInit, int zInit, int yLevel, ForgeDirection dir, int type, GridSpaceHolder master) { area.setAllGridSpaces(xInit, zInit, yLevel, dir, type, master); } @@ -57,7 +57,7 @@ public class DemonBuilding return scheme.createGSH(); } - public Int3 getDoorSpace(EnumFacing dir) + public Int3 getDoorSpace(ForgeDirection dir) { int x; int z; @@ -84,7 +84,7 @@ public class DemonBuilding return new Int3(x, doorGridSpace.yCoord, z); } - public Int3 getGridOffsetFromRoad(EnumFacing sideOfRoad, int yLevel) + public Int3 getGridOffsetFromRoad(ForgeDirection sideOfRoad, int yLevel) { Int3 doorSpace = this.getDoorSpace(sideOfRoad); int x = doorSpace.xCoord; @@ -109,7 +109,7 @@ public class DemonBuilding return new Int3(x, yLevel, z); } - public void destroyAllInField(World world, int xCoord, int yCoord, int zCoord, EnumFacing dir) + public void destroyAllInField(World world, int xCoord, int yCoord, int zCoord, ForgeDirection dir) { schematic.destroyAllInField(world, xCoord, yCoord, zCoord, dir); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonVillagePath.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonVillagePath.java index eeb4da3c..ee83c7f8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonVillagePath.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/DemonVillagePath.java @@ -3,11 +3,9 @@ package WayofTime.alchemicalWizardry.common.demonVillage; import net.minecraft.block.Block; import net.minecraft.block.BlockFlower; import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.IRoadWard; @@ -18,19 +16,19 @@ public class DemonVillagePath public int xPos; public int yPos; public int zPos; - public EnumFacing dir; + public ForgeDirection dir; public int length; public static boolean canGoDown = true; public static boolean tunnelIfObstructed = false; public static boolean createBridgeInAirIfObstructed = false; - public DemonVillagePath(int xi, int yi, int zi, EnumFacing dir2, int length) + public DemonVillagePath(int xi, int yi, int zi, ForgeDirection dir, int length) { this.xPos = xi; this.yPos = yi; this.zPos = zi; - this.dir = dir2; + this.dir = dir; this.length = length; } @@ -42,11 +40,11 @@ public class DemonVillagePath int rad = this.getRoadRadius(); int value = 0; - int finalYPos = this.constructPartialPath(portal, world, clearance, xi - rad * dir.getFrontOffsetX(), yi, zi - rad * dir.getFrontOffsetZ(), dir, length + rad, false); + int finalYPos = this.constructPartialPath(portal, world, clearance, xi - rad * dir.offsetX, yi, zi - rad * dir.offsetZ, dir, length + rad, false); for (int i = -rad; i <= rad; i++) { - value = Math.max(this.constructPartialPath(portal, world, clearance, xi - rad * dir.getFrontOffsetX() + i * dir.getFrontOffsetZ(), yi, zi - rad * dir.getFrontOffsetZ() + i * dir.getFrontOffsetX(), dir, length + 2 * rad, true), value); + value = Math.max(this.constructPartialPath(portal, world, clearance, xi - rad * dir.offsetX + i * dir.offsetZ, yi, zi - rad * dir.offsetZ + i * dir.offsetX, dir, length + 2 * rad, true), value); if(TEDemonPortal.printDebug) System.out.println("" + (length + 2 * rad) + ", " + value + ""); } @@ -82,12 +80,12 @@ public class DemonVillagePath * @param doConstruct * @return length if doConstruct, yi if !doConstruct */ - public int constructPartialPath(TEDemonPortal portal, World world, int clearance, int xi, int yi, int zi, EnumFacing dir, int length, boolean doConstruct) + public int constructPartialPath(TEDemonPortal portal, World world, int clearance, int xi, int yi, int zi, ForgeDirection dir, int length, boolean doConstruct) { for (int i = 0; i < length; i++) { - int xOffset = i * dir.getFrontOffsetX(); - int zOffset = i * dir.getFrontOffsetZ(); + int xOffset = i * dir.offsetX; + int zOffset = i * dir.offsetZ; boolean completed = false; @@ -95,19 +93,14 @@ public class DemonVillagePath { int sign = 1; - BlockPos pos1 = new BlockPos(xi + xOffset, yi + sign * yOffset, zi + zOffset); - BlockPos highPos1 = pos1.offsetUp(); - - IBlockState state1 = world.getBlockState(pos1); - IBlockState highState1 = world.getBlockState(highPos1); - Block block1 = state1.getBlock(); - Block highBlock1 = highState1.getBlock(); + Block block1 = world.getBlock(xi + xOffset, yi + sign * yOffset, zi + zOffset); + Block highBlock1 = world.getBlock(xi + xOffset, yi + sign * yOffset + 1, zi + zOffset); - if ((this.forceReplaceBlock(block1))||(!block1.isReplaceable(world, pos1) && this.isBlockReplaceable(block1) ) && (this.forceCanTunnelUnder(highBlock1) || highBlock1.isReplaceable(world, highPos1))) + if ((this.forceReplaceBlock(block1))||(!block1.isReplaceable(world, xi + xOffset, yi + sign * yOffset, zi + zOffset) && this.isBlockReplaceable(block1) ) && (this.forceCanTunnelUnder(highBlock1) || highBlock1.isReplaceable(world, xi + xOffset, yi + sign * yOffset + 1, zi + zOffset))) { if(doConstruct) { - world.setBlockState(pos1, portal.getRoadState(), 3); + world.setBlock(xi + xOffset, yi + sign * yOffset, zi + zOffset, portal.getRoadBlock(), portal.getRoadMeta(), 3); } yi += sign * yOffset; completed = true; @@ -115,19 +108,14 @@ public class DemonVillagePath } else if(canGoDown) { sign = -1; - pos1 = new BlockPos(xi + xOffset, yi + sign * yOffset, zi + zOffset); - highPos1 = pos1.offsetUp(); - - state1 = world.getBlockState(pos1); - highState1 = world.getBlockState(highPos1); - block1 = state1.getBlock(); - highBlock1 = highState1.getBlock(); + Block block2 = world.getBlock(xi + xOffset, yi + sign * yOffset, zi + zOffset); + Block highBlock2 = world.getBlock(xi + xOffset, yi + sign * yOffset + 1, zi + zOffset); - if ((this.forceReplaceBlock(block1))||(!block1.isReplaceable(world, pos1) && this.isBlockReplaceable(block1) ) && (this.forceCanTunnelUnder(highBlock1) || highBlock1.isReplaceable(world, highPos1))) + if ((this.forceReplaceBlock(block2))||(!block2.isReplaceable(world, xi + xOffset, yi + sign * yOffset, zi + zOffset) && this.isBlockReplaceable(block2)) && (this.forceCanTunnelUnder(highBlock2) || highBlock2.isReplaceable(world, xi + xOffset, yi + sign * yOffset + 1, zi + zOffset))) { - if(doConstruct) + if(doConstruct) { - world.setBlockState(pos1, portal.getRoadState(), 3); + world.setBlock(xi + xOffset, yi + sign * yOffset, zi + zOffset, portal.getRoadBlock(), portal.getRoadMeta(), 3); } yi += sign * yOffset; completed = true; @@ -141,17 +129,15 @@ public class DemonVillagePath boolean returnAmount = true; if(createBridgeInAirIfObstructed) { - BlockPos pos1 = new BlockPos(xi + xOffset, yi, zi + zOffset); - IBlockState state1 = world.getBlockState(pos1); - Block block1 = state1.getBlock(); + Block block1 = world.getBlock(xi + xOffset, yi, zi + zOffset); - if (block1.isReplaceable(world, pos1) || !this.isBlockReplaceable(block1) || !this.forceReplaceBlock(block1)) + if (block1.isReplaceable(world, xi + xOffset, yi, zi + zOffset) || !this.isBlockReplaceable(block1) || !this.forceReplaceBlock(block1)) { returnAmount = false; if(doConstruct) { - world.setBlockState(pos1, portal.getRoadState(), 3); + world.setBlock(xi + xOffset, yi, zi + zOffset, portal.getRoadBlock(), portal.getRoadMeta(), 3); } }else { @@ -160,20 +146,18 @@ public class DemonVillagePath }else if(tunnelIfObstructed) { - BlockPos pos1 = new BlockPos(xi + xOffset, yi, zi + zOffset); - IBlockState state1 = world.getBlockState(pos1); - Block block1 = state1.getBlock(); + Block block1 = world.getBlock(xi + xOffset, yi, zi + zOffset); - if (!block1.isReplaceable(world, pos1) || this.isBlockReplaceable(block1) || !this.forceReplaceBlock(block1)) + if (!block1.isReplaceable(world, xi + xOffset, yi, zi + zOffset) || this.isBlockReplaceable(block1) || !this.forceReplaceBlock(block1)) { returnAmount = false; if(doConstruct) { - world.setBlockState(pos1, portal.getRoadState(), 3); - world.setBlockToAir(pos1.offsetUp(1)); - world.setBlockToAir(pos1.offsetUp(2)); - world.setBlockToAir(pos1.offsetUp(3)); + world.setBlock(xi + xOffset, yi, zi + zOffset, portal.getRoadBlock(), portal.getRoadMeta(), 3); + world.setBlockToAir(xi + xOffset, yi + 1, zi + zOffset); + world.setBlockToAir(xi + xOffset, yi + 2, zi + zOffset); + world.setBlockToAir(xi + xOffset, yi + 3, zi + zOffset); } }else { @@ -199,37 +183,27 @@ public class DemonVillagePath for (int i = 0; i < length; i++) { - int xOffset = i * dir.getFrontOffsetX(); - int zOffset = i * dir.getFrontOffsetZ(); + int xOffset = i * dir.offsetX; + int zOffset = i * dir.offsetZ; for (int yOffset = 0; yOffset <= clearance; yOffset++) { int sign = 1; - BlockPos pos1 = new BlockPos(xi + xOffset, yi + sign * yOffset, zi + zOffset); - BlockPos highPos1 = pos1.offsetUp(); - - IBlockState state1 = world.getBlockState(pos1); - IBlockState highState1 = world.getBlockState(highPos1); - Block block1 = state1.getBlock(); - Block highBlock1 = highState1.getBlock(); + Block block1 = world.getBlock(xi + xOffset, yi + sign * yOffset, zi + zOffset); + Block highBlock1 = world.getBlock(xi + xOffset, yi + sign * yOffset + 1, zi + zOffset); - if ((this.forceReplaceBlock(block1))||(!block1.isReplaceable(world, pos1) && this.isBlockReplaceable(block1) ) && (this.forceCanTunnelUnder(highBlock1) || highBlock1.isReplaceable(world, highPos1))) + if ((this.forceReplaceBlock(block1))||(!block1.isReplaceable(world, xi + xOffset, yi + sign * yOffset, zi + zOffset) && this.isBlockReplaceable(block1) ) && (this.forceCanTunnelUnder(highBlock1) || highBlock1.isReplaceable(world, xi + xOffset, yi + sign * yOffset + 1, zi + zOffset))) { yi += sign * yOffset; break; } else { sign = -1; - BlockPos pos2 = new BlockPos(xi + xOffset, yi + sign * yOffset, zi + zOffset); - BlockPos highPos2 = pos2.offsetUp(); - - IBlockState state2 = world.getBlockState(pos2); - IBlockState highState2 = world.getBlockState(highPos2); - Block block2 = state2.getBlock(); - Block highBlock2 = highState2.getBlock(); + Block block2 = world.getBlock(xi + xOffset, yi + sign * yOffset, zi + zOffset); + Block highBlock2 = world.getBlock(xi + xOffset, yi + sign * yOffset + 1, zi + zOffset); - if ((this.forceReplaceBlock(block2))||(!block2.isReplaceable(world, pos2) && this.isBlockReplaceable(block2) ) && (this.forceCanTunnelUnder(highBlock2) || highBlock2.isReplaceable(world, highPos2))) + if ((this.forceReplaceBlock(block2))||(!block2.isReplaceable(world, xi + xOffset, yi + sign * yOffset, zi + zOffset) && this.isBlockReplaceable(block2) ) && (this.forceCanTunnelUnder(highBlock2) || highBlock2.isReplaceable(world, xi + xOffset, yi + sign * yOffset + 1, zi + zOffset))) { yi += sign * yOffset; break; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpaceHolder.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpaceHolder.java index bbb3c04f..e4c58087 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpaceHolder.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/GridSpaceHolder.java @@ -1,13 +1,11 @@ package WayofTime.alchemicalWizardry.common.demonVillage; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; public class GridSpaceHolder { @@ -141,7 +139,7 @@ public class GridSpaceHolder } } - public boolean doesContainAll(GridSpaceHolder master, int xInit, int zInit, EnumFacing dir) + public boolean doesContainAll(GridSpaceHolder master, int xInit, int zInit, ForgeDirection dir) { if (master != null) { @@ -193,7 +191,7 @@ public class GridSpaceHolder return false; } - public void setAllGridSpaces(int xInit, int zInit, int yLevel, EnumFacing dir, int type, GridSpaceHolder master) + public void setAllGridSpaces(int xInit, int zInit, int yLevel, ForgeDirection dir, int type, GridSpaceHolder master) { if(TEDemonPortal.printDebug) AlchemicalWizardry.logger.info("Grid space selected: (" + xInit + "," + zInit + ")"); @@ -241,7 +239,7 @@ public class GridSpaceHolder } } - public void destroyAllInGridSpaces(World world, int xCoord, int yCoord, int zCoord, EnumFacing dir) + public void destroyAllInGridSpaces(World world, int xCoord, int yCoord, int zCoord, ForgeDirection dir) { for (int i = -negXRadius; i <= posXRadius; i++) { @@ -280,14 +278,12 @@ public class GridSpaceHolder { for (int m = -2; m <= 2; m++) { - BlockPos newPos = new BlockPos(xCoord + xOff * 5 + l, yCoord, zCoord + zOff * 5 + m); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); + Block block = world.getBlock(xCoord + xOff * 5 + l, yCoord, zCoord + zOff * 5 + m); if (block == ModBlocks.blockDemonPortal) { continue; } - world.setBlockToAir(newPos); + world.setBlockToAir(xCoord + xOff * 5 + l, yCoord, zCoord + zOff * 5 + m); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/TileBlockSet.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/TileBlockSet.java new file mode 100644 index 00000000..a135df1a --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/TileBlockSet.java @@ -0,0 +1,8 @@ +package WayofTime.alchemicalWizardry.common.demonVillage; + +import net.minecraft.nbt.NBTTagCompound; + +public class TileBlockSet extends BlockSet +{ + public NBTTagCompound tag; +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityAIOccasionalRangedAttack.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityAIOccasionalRangedAttack.java index 9d7ea89f..d23816ae 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityAIOccasionalRangedAttack.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityAIOccasionalRangedAttack.java @@ -24,6 +24,7 @@ public class EntityAIOccasionalRangedAttack extends EntityAIBase private int maxRangedAttackTime; private float field_96562_i; private float field_82642_h; + private static final String __OBFID = "CL_00001609"; private double range; public EntityAIOccasionalRangedAttack(IOccasionalRangedAttackMob p_i1649_1_, double p_i1649_2_, int p_i1649_4_, float p_i1649_5_, double range) @@ -109,7 +110,7 @@ public class EntityAIOccasionalRangedAttack extends EntityAIBase */ public void updateTask() { - double d0 = this.entityHost.getDistanceSq(this.attackTarget.posX, this.attackTarget.getBoundingBox().minY, this.attackTarget.posZ); + double d0 = this.entityHost.getDistanceSq(this.attackTarget.posX, this.attackTarget.boundingBox.minY, this.attackTarget.posZ); boolean flag = this.entityHost.getEntitySenses().canSee(this.attackTarget); if (flag) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityDemonAIHurtByTarget.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityDemonAIHurtByTarget.java index 303ab7a2..147ddd73 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityDemonAIHurtByTarget.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/ai/EntityDemonAIHurtByTarget.java @@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.common.demonVillage.ai; import net.minecraft.entity.EntityCreature; import net.minecraft.entity.ai.EntityAIHurtByTarget; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; +import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; @@ -20,14 +20,14 @@ public class EntityDemonAIHurtByTarget extends EntityAIHurtByTarget @Override public void startExecuting() { - BlockPos portalPosition = ((IHoardDemon)this.taskOwner).getPortalLocation(); + Int3 portalPosition = ((IHoardDemon)this.taskOwner).getPortalLocation(); if(portalPosition == null) { super.startExecuting(); return; } - TileEntity portal = this.taskOwner.worldObj.getTileEntity(portalPosition); + TileEntity portal = this.taskOwner.worldObj.getTileEntity(portalPosition.xCoord, portalPosition.yCoord, portalPosition.zCoord); if((this.taskOwner.getAITarget() instanceof IHoardDemon && portalPosition.equals(((IHoardDemon)this.taskOwner.getAITarget()).getPortalLocation()))) { @@ -36,7 +36,7 @@ public class EntityDemonAIHurtByTarget extends EntityAIHurtByTarget this.taskOwner.setAttackTarget(this.taskOwner.getAITarget()); - if (this.entityCallsForHelp) + if (this.entityCallsForHelp && this.taskOwner instanceof IHoardDemon) { if(portal instanceof TEDemonPortal) @@ -45,7 +45,7 @@ public class EntityDemonAIHurtByTarget extends EntityAIHurtByTarget } // double d0 = this.getTargetDistance(); -// List list = this.taskOwner.worldObj.getEntitiesWithinAABB(this.taskOwner.getClass(), new AxisAlignedBB(this.taskOwner.posX, this.taskOwner.posY, this.taskOwner.posZ, this.taskOwner.posX + 1.0D, this.taskOwner.posY + 1.0D, this.taskOwner.posZ + 1.0D).expand(d0, 10.0D, d0)); +// List list = this.taskOwner.worldObj.getEntitiesWithinAABB(this.taskOwner.getClass(), AxisAlignedBB.getBoundingBox(this.taskOwner.posX, this.taskOwner.posY, this.taskOwner.posZ, this.taskOwner.posX + 1.0D, this.taskOwner.posY + 1.0D, this.taskOwner.posZ + 1.0D).expand(d0, 10.0D, d0)); // Iterator iterator = list.iterator(); // // while (iterator.hasNext()) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonHoardPacket.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonHoardPacket.java index 8d0274ad..ba35ddde 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonHoardPacket.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonHoardPacket.java @@ -5,7 +5,10 @@ import net.minecraft.world.World; public abstract class DemonHoardPacket { - public DemonHoardPacket() {} + public DemonHoardPacket() + { + + } public abstract int summonDemons(TEDemonPortal teDemonPortal, World world, int x, int y, int z, DemonType type, int tier, boolean spawnGuardian); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketRegistry.java index 2d30d788..fd193f95 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/DemonPacketRegistry.java @@ -9,7 +9,7 @@ import net.minecraft.world.World; public class DemonPacketRegistry { - public static Map<String, DemonHoardPacket> packetMap = new HashMap<String, DemonHoardPacket>(); + public static Map<String, DemonHoardPacket> packetMap = new HashMap(); public static boolean registerDemonPacket(String string, DemonHoardPacket packet) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGrunt.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGrunt.java index f257f01b..c507d72a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGrunt.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/EntityMinorDemonGrunt.java @@ -20,11 +20,11 @@ import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage; import WayofTime.alchemicalWizardry.common.EntityAITargetAggroCloaking; @@ -34,6 +34,7 @@ import WayofTime.alchemicalWizardry.common.demonVillage.ai.IOccasionalRangedAtta import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; +import WayofTime.alchemicalWizardry.common.rituals.LocalStorageAlphaPact; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRangedAttackMob, IHoardDemon @@ -42,7 +43,7 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); private boolean isAngry = true; - private BlockPos demonPortal; + private Int3 demonPortal; private static float maxTamedHealth = 200.0F; private static float maxUntamedHealth = 200.0F; @@ -53,7 +54,7 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan { super(par1World, AlchemicalWizardry.entityMinorDemonGruntID); this.setSize(0.7F, 1.8F); -// this.getNavigator().setAvoidsWater(true); + this.getNavigator().setAvoidsWater(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, this.aiSit); this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); @@ -67,7 +68,7 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan this.setAggro(false); this.setTamed(false); - demonPortal = new BlockPos(0,0,0); + demonPortal = new Int3(0,0,0); if (par1World != null && !par1World.isRemote) { @@ -127,13 +128,13 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan } @Override - public void setPortalLocation(BlockPos position) + public void setPortalLocation(Int3 position) { this.demonPortal = position; } @Override - public BlockPos getPortalLocation() + public Int3 getPortalLocation() { return this.demonPortal; } @@ -175,25 +176,23 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan * (abstract) Protected helper method to write subclass entity data to NBT. */ @Override - public void writeEntityToNBT(NBTTagCompound tag) + public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) { - super.writeEntityToNBT(tag); - tag.setBoolean("Angry", this.isAngry()); + super.writeEntityToNBT(par1NBTTagCompound); + par1NBTTagCompound.setBoolean("Angry", this.isAngry()); - tag.setInteger("xCoord", this.demonPortal.getX()); - tag.setInteger("yCoord", this.demonPortal.getY()); - tag.setInteger("zCoord", this.demonPortal.getZ()); + this.demonPortal.writeToNBT(par1NBTTagCompound); } /** * (abstract) Protected helper method to read subclass entity data from NBT. */ @Override - public void readEntityFromNBT(NBTTagCompound tag) + public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) { - super.readEntityFromNBT(tag); - this.setAngry(tag.getBoolean("Angry")); - this.demonPortal = new BlockPos(tag.getInteger("xCoord"), tag.getInteger("yCoord"), tag.getInteger("zCoord")); + super.readEntityFromNBT(par1NBTTagCompound); + this.setAngry(par1NBTTagCompound.getBoolean("Angry")); + this.demonPortal = Int3.readFromNBT(par1NBTTagCompound); this.setCombatTask(); } @@ -253,7 +252,7 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan { if(!this.enthralled) { - TileEntity tile = this.worldObj.getTileEntity(this.demonPortal); + TileEntity tile = this.worldObj.getTileEntity(this.demonPortal.xCoord, this.demonPortal.yCoord, this.demonPortal.zCoord); if(tile instanceof TEDemonPortal) { ((TEDemonPortal) tile).enthrallDemon(this); @@ -262,12 +261,12 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan { IMasterRitualStone stone = (IMasterRitualStone)tile; LocalRitualStorage stor = stone.getLocalStorage(); -// if(stor instanceof LocalStorageAlphaPact) -// { -// LocalStorageAlphaPact storage = (LocalStorageAlphaPact)stor; -// -// storage.thrallDemon(this); -// } + if(stor instanceof LocalStorageAlphaPact) + { + LocalStorageAlphaPact storage = (LocalStorageAlphaPact)stor; + + storage.thrallDemon(this); + } } } super.onUpdate(); @@ -326,7 +325,7 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan --itemstack.stackSize; } - this.heal((float) itemfood.getHealAmount(itemstack)); + this.heal((float) itemfood.func_150905_g(itemstack)); if (itemstack.stackSize <= 0) { @@ -344,8 +343,8 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan { this.aiSit.setSitting(!this.isSitting()); this.isJumping = false; -// this.setPathToEntity(null); -// this.setTarget(null); + this.setPathToEntity(null); + this.setTarget(null); this.setAttackTarget(null); } @@ -368,7 +367,7 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan if (this.rand.nextInt(1) == 0) { this.setTamed(true); -// this.setPathToEntity(null); + this.setPathToEntity(null); this.setAttackTarget(null); this.aiSit.setSitting(true); this.setHealth(maxTamedHealth); @@ -501,7 +500,7 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan } @Override - public boolean thrallDemon(BlockPos location) + public boolean thrallDemon(Int3 location) { this.setPortalLocation(location); return true; @@ -510,9 +509,9 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan @Override public boolean isSamePortal(IHoardDemon demon) { - BlockPos position = demon.getPortalLocation(); - TileEntity portal = worldObj.getTileEntity(this.demonPortal); + Int3 position = demon.getPortalLocation(); + TileEntity portal = worldObj.getTileEntity(this.demonPortal.xCoord, this.demonPortal.yCoord, this.demonPortal.zCoord); - return portal instanceof TEDemonPortal && portal == worldObj.getTileEntity(position); + return portal instanceof TEDemonPortal ? portal == worldObj.getTileEntity(position.xCoord, position.yCoord, position.zCoord) : false; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/IHoardDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/IHoardDemon.java index aee48836..7f9f2660 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/IHoardDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/demonHoard/demon/IHoardDemon.java @@ -1,14 +1,11 @@ package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon; -import net.minecraft.util.BlockPos; +import WayofTime.alchemicalWizardry.api.Int3; public interface IHoardDemon { - void setPortalLocation(BlockPos position); - - BlockPos getPortalLocation(); - - boolean thrallDemon(BlockPos location); - + void setPortalLocation(Int3 position); + Int3 getPortalLocation(); + boolean thrallDemon(Int3 location); boolean isSamePortal(IHoardDemon demon); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/loot/DemonVillageLootRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/loot/DemonVillageLootRegistry.java index b5e4d0d1..a501269b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/loot/DemonVillageLootRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/loot/DemonVillageLootRegistry.java @@ -11,14 +11,14 @@ import WayofTime.alchemicalWizardry.ModItems; public class DemonVillageLootRegistry { - public static ArrayList<WeightedRandomChestContent> list1 = new ArrayList<WeightedRandomChestContent>(); + public static ArrayList<WeightedRandomChestContent> list1 = new ArrayList(); public static void init() { String[] tier1Strings = new String[]{ChestGenHooks.DUNGEON_CHEST, ChestGenHooks.PYRAMID_DESERT_CHEST}; for(String str : tier1Strings) { - List<WeightedRandomChestContent> contents = ChestGenHooks.getItems(str, new Random()); + WeightedRandomChestContent[] contents = ChestGenHooks.getItems(str, new Random()); if(contents != null) { for(WeightedRandomChestContent content : contents) @@ -34,6 +34,16 @@ public class DemonVillageLootRegistry public static void populateChest(IInventory tile, int tier) { - WeightedRandomChestContent.generateChestContents(new Random(), list1, tile, tile.getSizeInventory() / 3); + WeightedRandomChestContent.generateChestContents(new Random(), toArray(list1), tile, tile.getSizeInventory() / 3); + } + + public static WeightedRandomChestContent[] toArray(List<WeightedRandomChestContent> aList) + { + int size = aList.size(); + WeightedRandomChestContent[] contents = new WeightedRandomChestContent[size]; + + contents = aList.toArray(contents); + + return contents; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/BlockDemonChest.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/BlockDemonChest.java index f880b4e1..eec54945 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/BlockDemonChest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/BlockDemonChest.java @@ -1,9 +1,9 @@ package WayofTime.alchemicalWizardry.common.demonVillage.tileEntity; +import net.minecraft.block.Block; import net.minecraft.block.BlockChest; -import net.minecraft.block.state.IBlockState; +import net.minecraft.inventory.IInventory; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; @@ -12,10 +12,15 @@ public class BlockDemonChest extends BlockChest implements IBlockPortalNode public BlockDemonChest() { super(0); - this.setHardness(2.5F).setStepSound(soundTypeWood).setUnlocalizedName("demonChest"); + this.setHardness(2.5F).setStepSound(soundTypeWood).setBlockName("demonChest"); this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); } + public IInventory func_149951_m(World world, int x, int y, int z) + { + return (IInventory)world.getTileEntity(x, y, z); + } + @Override public TileEntity createNewTileEntity(World var1, int var2) { @@ -23,18 +28,18 @@ public class BlockDemonChest extends BlockChest implements IBlockPortalNode } @Override - public void breakBlock(World world, BlockPos pos, IBlockState state) + public void breakBlock(World world, int x, int y, int z, Block block, int meta) { - TileEntity tile = world.getTileEntity(pos); + TileEntity tile = world.getTileEntity(x, y, z); if(tile instanceof TEDemonChest) { ((TEDemonChest) tile).notifyPortalOfInteraction(); } - super.breakBlock(world, pos, state); + super.breakBlock(world, x, y, z, block, meta); } @Override - public boolean canPlaceBlockAt(World world, BlockPos pos) + public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_) { return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonChest.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonChest.java index 528d6142..a1d4fd88 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonChest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonChest.java @@ -1,17 +1,16 @@ package WayofTime.alchemicalWizardry.common.demonVillage.tileEntity; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityChest; -import net.minecraft.util.BlockPos; +import WayofTime.alchemicalWizardry.api.Int3; public class TEDemonChest extends TileEntityChest implements ITilePortalNode { - public BlockPos portalLocation = BlockPos.ORIGIN; + public Int3 portalLocation = new Int3(0,0,0); @Override - public String getName() + public String getInventoryName() { return "Demon's Chest"; } @@ -21,42 +20,42 @@ public class TEDemonChest extends TileEntityChest implements ITilePortalNode { super.readFromNBT(tag); NBTTagCompound portalTag = tag.getCompoundTag("portalLocation"); - portalLocation = new BlockPos(portalTag.getInteger("xCoord"), portalTag.getInteger("yCoord"), portalTag.getInteger("zCoord")); + portalLocation = Int3.readFromNBT(portalTag); } @Override public void writeToNBT(NBTTagCompound tag) { super.writeToNBT(tag); - NBTTagCompound portalTag = new NBTTagCompound(); - portalTag.setInteger("xCoord", portalLocation.getX()); - portalTag.setInteger("yCoord", portalLocation.getY()); - portalTag.setInteger("zCoord", portalLocation.getZ()); + NBTTagCompound portalTag = portalLocation.writeToNBT(new NBTTagCompound()); tag.setTag("portalLocation", portalTag); } @Override - public void openInventory(EntityPlayer player) + public void openInventory() { - super.openInventory(player); + super.openInventory(); this.notifyPortalOfInteraction(); } @Override - public void checkForAdjacentChests() {} + public void checkForAdjacentChests() + { + + } @Override public void setPortalLocation(TEDemonPortal teDemonPortal) { if(teDemonPortal != null) { - portalLocation = teDemonPortal.getPos(); + portalLocation = new Int3(teDemonPortal.xCoord, teDemonPortal.yCoord, teDemonPortal.zCoord); } } public TEDemonPortal getDemonPortal() { - TileEntity tile = worldObj.getTileEntity(portalLocation); + TileEntity tile = worldObj.getTileEntity(portalLocation.xCoord, portalLocation.yCoord, portalLocation.zCoord); if(tile instanceof TEDemonPortal) { return (TEDemonPortal)tile; @@ -72,6 +71,6 @@ public class TEDemonChest extends TileEntityChest implements ITilePortalNode return; } - portal.notifyDemons(pos.getX(), pos.getY(), pos.getZ(), 50); + portal.notifyDemons(xCoord, yCoord, zCoord, 50); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java index d5a1fee6..5c6f43c4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java @@ -15,7 +15,6 @@ import java.util.Random; import java.util.Set; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityCreature; import net.minecraft.entity.EntityLivingBase; @@ -23,11 +22,9 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import net.minecraft.server.gui.IUpdatePlayerListBox; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraftforge.common.util.Constants; +import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; @@ -45,7 +42,7 @@ import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardD import com.google.gson.Gson; import com.google.gson.GsonBuilder; -public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox +public class TEDemonPortal extends TileEntity { public DemonType type = DemonType.FIRE; @@ -66,9 +63,9 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox public static int[] tierCostList = new int[]{1500}; - public Set<IHoardDemon> hoardList = new HashSet<IHoardDemon>(); + public Set<IHoardDemon> hoardList = new HashSet(); - public static List<DemonBuilding> buildingList = new ArrayList<DemonBuilding>(); + public static List<DemonBuilding> buildingList = new ArrayList(); public Random rand = new Random(); private GridSpace[][] area; @@ -88,7 +85,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox public float pointPool; public String nextDemonPortalName = ""; - public EnumFacing nextDemonPortalDirection = EnumFacing.DOWN; + public ForgeDirection nextDemonPortalDirection = ForgeDirection.DOWN; public int buildingStage = -1; @@ -119,7 +116,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox isInitialized = false; - this.setGridSpace(0, 0, new GridSpace(GridSpace.MAIN_PORTAL, pos.getY())); + this.setGridSpace(0, 0, new GridSpace(GridSpace.MAIN_PORTAL, yCoord)); this.houseCooldown = 0; this.roadCooldown = 0; @@ -168,7 +165,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox { float totalChance = 0; - Map<String, Float> map = new HashMap<String, Float>(); + Map<String, Float> map = new HashMap(); map.put("roadChance", this.getRoadChance()); map.put("houseChance", this.getHouseChance()); map.put("demonPortalChance", this.getDemonPortalChance()); @@ -285,7 +282,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox { if(demon instanceof IHoardDemon) { - boolean enthrall = ((IHoardDemon) demon).thrallDemon(pos); + boolean enthrall = ((IHoardDemon) demon).thrallDemon(new Int3(this.xCoord, this.yCoord, this.zCoord)); if(enthrall) { this.hoardList.add((IHoardDemon)demon); @@ -309,10 +306,10 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox { if (Math.abs(xIndex) == 1 || Math.abs(zIndex) == 1) { - this.setGridSpace(xIndex, zIndex, new GridSpace(GridSpace.ROAD, pos.getY())); + this.setGridSpace(xIndex, zIndex, new GridSpace(GridSpace.ROAD, yCoord)); } else if (xIndex == 0 && zIndex == 0) { - this.setGridSpace(0, 0, new GridSpace(GridSpace.MAIN_PORTAL, pos.getY())); + this.setGridSpace(0, 0, new GridSpace(GridSpace.MAIN_PORTAL, yCoord)); } else { this.setGridSpace(xIndex, zIndex, new GridSpace()); @@ -337,7 +334,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox public void createParty() { - worldObj.createExplosion(null, pos.getX() + rand.nextInt(10) - rand.nextInt(10), pos.getY(), pos.getZ() + rand.nextInt(10) - rand.nextInt(10), 5*rand.nextFloat(), false); + worldObj.createExplosion(null, xCoord + rand.nextInt(10) - rand.nextInt(10), yCoord, zCoord + rand.nextInt(10) - rand.nextInt(10), 5*rand.nextFloat(), false); } public void start() @@ -349,7 +346,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox * Randomly increase one of the cooldowns such that a road, house, or a demon portal tier is caused. Demons are also randomly spawned via this mechanic. */ @Override - public void update() + public void updateEntity() { if(worldObj.isRemote) { @@ -367,7 +364,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox if(delayBeforeParty <= 0) { - worldObj.createExplosion(null, pos.getX(), pos.getY(), pos.getZ(), 15, false); + worldObj.createExplosion(null, xCoord, yCoord, zCoord, 15, false); this.initialize(); } @@ -496,7 +493,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox this.nextDemonPortalName = par1NBTTagCompound.getString("nextDemonPortalName"); this.buildingStage = par1NBTTagCompound.getInteger("buildingStage"); - this.nextDemonPortalDirection = EnumFacing.getFront(par1NBTTagCompound.getInteger("nextDemonPortalDirection")); + this.nextDemonPortalDirection = ForgeDirection.getOrientation(par1NBTTagCompound.getInteger("nextDemonPortalDirection")); this.pointPool = par1NBTTagCompound.getFloat("pointPool"); this.lockdownTimer = par1NBTTagCompound.getInteger("lockdownTimer"); @@ -556,24 +553,24 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox public int createRandomDemonHoard(TEDemonPortal teDemonPortal, int tier, DemonType type, boolean spawnGuardian) { int next = rand.nextInt(4); - EnumFacing dir; + ForgeDirection dir; switch (next) { case 0: - dir = EnumFacing.NORTH; + dir = ForgeDirection.NORTH; break; case 1: - dir = EnumFacing.SOUTH; + dir = ForgeDirection.SOUTH; break; case 2: - dir = EnumFacing.EAST; + dir = ForgeDirection.EAST; break; case 3: - dir = EnumFacing.WEST; + dir = ForgeDirection.WEST; break; default: - dir = EnumFacing.NORTH; + dir = ForgeDirection.NORTH; } Int3 road = findRoadSpaceFromDirection(dir, (rand.nextInt(negXRadius + negZRadius + posXRadius + posZRadius)) + 1); @@ -585,30 +582,30 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox if(TEDemonPortal.printDebug) System.out.println("Spawning Demons"); - return DemonPacketRegistry.spawnDemons(teDemonPortal, worldObj, pos.getX() + road.xCoord * 5, road.yCoord + 1, pos.getZ() + road.zCoord * 5, type, tier, spawnGuardian); + return DemonPacketRegistry.spawnDemons(teDemonPortal, worldObj, xCoord + road.xCoord * 5, road.yCoord + 1, zCoord + road.zCoord * 5, type, tier, spawnGuardian); } public int createRandomRoad() //Return the number of road spaces { int next = rand.nextInt(4); - EnumFacing dir; + ForgeDirection dir; switch (next) { case 0: - dir = EnumFacing.NORTH; + dir = ForgeDirection.NORTH; break; case 1: - dir = EnumFacing.SOUTH; + dir = ForgeDirection.SOUTH; break; case 2: - dir = EnumFacing.EAST; + dir = ForgeDirection.EAST; break; case 3: - dir = EnumFacing.WEST; + dir = ForgeDirection.WEST; break; default: - dir = EnumFacing.NORTH; + dir = ForgeDirection.NORTH; } Int3 road = findRoadSpaceFromDirection(dir, (rand.nextInt(negXRadius + negZRadius + posXRadius + posZRadius)) + 1); @@ -620,7 +617,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox if(printDebug) AlchemicalWizardry.logger.info("X: " + x + " Z: " + z + " Direction: " + dir.toString()); - List<EnumFacing> directions = this.findValidExtentionDirection(x, z); + List<ForgeDirection> directions = this.findValidExtentionDirection(x, z); if (directions.size() <= 0) { @@ -630,9 +627,9 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox int maxDistance = 5; int distance = 0; - EnumFacing dominantDirection = null; + ForgeDirection dominantDirection = null; - for (EnumFacing direction : directions) + for (ForgeDirection direction : directions) { int amt = this.getLength(direction, maxDistance, x, z); if (amt > distance) @@ -659,9 +656,9 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox return distance; } - public List<EnumFacing> findValidExtentionDirection(int x, int z) + public List<ForgeDirection> findValidExtentionDirection(int x, int z) { - List<EnumFacing> directions = new LinkedList<EnumFacing>(); + List<ForgeDirection> directions = new LinkedList(); if (this.getGridSpace(x, z) == null || !this.getGridSpace(x, z).isRoadSegment()) { @@ -671,41 +668,41 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox GridSpace nextGrid = this.getGridSpace(x + 1, z); if (nextGrid.isEmpty()) { - directions.add(EnumFacing.EAST); + directions.add(ForgeDirection.EAST); } nextGrid = this.getGridSpace(x - 1, z); if (nextGrid.isEmpty()) { - directions.add(EnumFacing.WEST); + directions.add(ForgeDirection.WEST); } nextGrid = this.getGridSpace(x, z + 1); if (nextGrid.isEmpty()) { - directions.add(EnumFacing.SOUTH); + directions.add(ForgeDirection.SOUTH); } nextGrid = this.getGridSpace(x, z - 1); if (nextGrid.isEmpty()) { - directions.add(EnumFacing.NORTH); + directions.add(ForgeDirection.NORTH); } return directions; } - public int getLength(EnumFacing dir, int maxLength, int x, int z) //Number of spaces forward + public int getLength(ForgeDirection dir, int maxLength, int x, int z) //Number of spaces forward { for (int i = 1; i <= maxLength; i++) { - GridSpace space = this.getGridSpace(x + i * dir.getFrontOffsetX(), z + i * dir.getFrontOffsetZ()); + GridSpace space = this.getGridSpace(x + i * dir.offsetX, z + i * dir.offsetZ); if (space.isEmpty()) { for (int k = 1; k <= this.getRoadSpacer(); k++) { - GridSpace space1 = this.getGridSpace(x + i * dir.getFrontOffsetX() + dir.getFrontOffsetZ() * k, z + i * dir.getFrontOffsetZ() + dir.getFrontOffsetX() * k); - GridSpace space2 = this.getGridSpace(x + i * dir.getFrontOffsetX() - dir.getFrontOffsetZ() * k, z + i * dir.getFrontOffsetZ() - dir.getFrontOffsetX() * k); + GridSpace space1 = this.getGridSpace(x + i * dir.offsetX + dir.offsetZ * k, z + i * dir.offsetZ + dir.offsetX * k); + GridSpace space2 = this.getGridSpace(x + i * dir.offsetX - dir.offsetZ * k, z + i * dir.offsetZ - dir.offsetX * k); if (space1.isRoadSegment() || space2.isRoadSegment()) { @@ -726,10 +723,10 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox return maxLength; } - public Int3 findRoadSpaceFromDirection(EnumFacing dir, int amount) //TODO + public Int3 findRoadSpaceFromDirection(ForgeDirection dir, int amount) //TODO { int index = 0; - if (dir == EnumFacing.NORTH) + if (dir == ForgeDirection.NORTH) { if(printDebug) System.out.print("NORTH!"); @@ -748,7 +745,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox } } } - } else if (dir == EnumFacing.SOUTH) + } else if (dir == ForgeDirection.SOUTH) { for (int i = negZRadius + Math.min(posZRadius, limit); i >= Math.max(0, -limit + negZRadius); i--) { @@ -765,7 +762,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox } } } - } else if (dir == EnumFacing.EAST) + } else if (dir == ForgeDirection.EAST) { for (int i = negXRadius + Math.min(posXRadius, limit); i >= Math.max(0, -limit + negXRadius); i--) { @@ -782,7 +779,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox } } } - } else if (dir == EnumFacing.WEST) + } else if (dir == ForgeDirection.WEST) { for (int i = Math.max(0, -limit + negXRadius); i <= negXRadius + Math.min(posXRadius, limit); i++) { @@ -804,10 +801,10 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox return new Int3(0, 0, 0); } - public Int3 findEmptySpaceNearRoad(EnumFacing dir, int amount, int closeness) + public Int3 findEmptySpaceNearRoad(ForgeDirection dir, int amount, int closeness) { int index = 0; - if (dir == EnumFacing.NORTH) + if (dir == ForgeDirection.NORTH) { if(printDebug) System.out.print("NORTH!"); @@ -831,7 +828,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox } } } - } else if (dir == EnumFacing.SOUTH) + } else if (dir == ForgeDirection.SOUTH) { for (int i = negZRadius + posZRadius; i >= 0; i--) { @@ -853,7 +850,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox } } } - } else if (dir == EnumFacing.EAST) + } else if (dir == ForgeDirection.EAST) { for (int i = negXRadius + posXRadius; i >= 0; i--) { @@ -875,7 +872,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox } } } - } else if (dir == EnumFacing.WEST) + } else if (dir == ForgeDirection.WEST) { for (int i = 0; i <= negXRadius + posXRadius; i++) { @@ -902,10 +899,10 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox return new Int3(0, 0, 0); } - public Int3 findEmptySpaceFromDirection(EnumFacing dir, int amount) + public Int3 findEmptySpaceFromDirection(ForgeDirection dir, int amount) { int index = 0; - if (dir == EnumFacing.NORTH) + if (dir == ForgeDirection.NORTH) { if(printDebug) System.out.print("NORTH!"); @@ -924,7 +921,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox } } } - } else if (dir == EnumFacing.SOUTH) + } else if (dir == ForgeDirection.SOUTH) { for (int i = negZRadius + posZRadius; i >= 0; i--) { @@ -941,7 +938,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox } } } - } else if (dir == EnumFacing.EAST) + } else if (dir == ForgeDirection.EAST) { for (int i = negXRadius + posXRadius; i >= 0; i--) { @@ -958,7 +955,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox } } } - } else if (dir == EnumFacing.WEST) + } else if (dir == ForgeDirection.WEST) { for (int i = 0; i <= negXRadius + posXRadius; i++) { @@ -980,7 +977,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox return new Int3(0, 0, 0); } - public int createGriddedRoad(int gridXi, int yi, int gridZi, EnumFacing dir, int gridLength, boolean convertStarter) //Total grid length + public int createGriddedRoad(int gridXi, int yi, int gridZi, ForgeDirection dir, int gridLength, boolean convertStarter) //Total grid length { if (gridLength == 0 || gridLength == 1) { @@ -995,13 +992,13 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox { this.setGridSpace(initGridX, initGridZ, new GridSpace(GridSpace.CROSSROAD, initY)); - DemonCrosspath crosspath = new DemonCrosspath(pos.getX() + initGridX * 5, initY, pos.getZ() + initGridZ * 5); + DemonCrosspath crosspath = new DemonCrosspath(xCoord + initGridX * 5, initY, zCoord + initGridZ * 5); crosspath.createCrosspath(worldObj); } for (int index = 0; index < gridLength - 1; index++) { - DemonVillagePath path = new DemonVillagePath(pos.getX() + initGridX * 5, initY, pos.getZ() + initGridZ * 5, dir, 6); + DemonVillagePath path = new DemonVillagePath(xCoord + initGridX * 5, initY, zCoord + initGridZ * 5, dir, 6); Int3AndBool temp = path.constructFullPath(this, worldObj, this.getRoadStepClearance()); Int3 next = temp.coords; @@ -1018,8 +1015,8 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox return index; } - initGridX += dir.getFrontOffsetX(); - initGridZ += dir.getFrontOffsetZ(); + initGridX += dir.offsetX; + initGridZ += dir.offsetZ; if (!this.getGridSpace(initGridX, initGridZ).isRoadSegment()) { @@ -1160,10 +1157,10 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox // // this.initialize(); // -// if (EnumFacing.getOrientation(side) == EnumFacing.UP) +// if (ForgeDirection.getOrientation(side) == ForgeDirection.UP) // { // this.createRandomBuilding(DemonBuilding.BUILDING_HOUSE, 0); -// } else if (EnumFacing.getOrientation(side) == EnumFacing.DOWN) +// } else if (ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) // { // this.createRandomBuilding(DemonBuilding.BUILDING_PORTAL, 0); // } else @@ -1197,11 +1194,11 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox // GridSpaceHolder grid = this.createGSH(); - List<EnumFacing> directions = new ArrayList<EnumFacing>(); + List<ForgeDirection> directions = new ArrayList(); for (int i = 2; i < 6; i++) { - EnumFacing testDir = EnumFacing.getFront(i); + ForgeDirection testDir = ForgeDirection.getOrientation(i); directions.add(testDir); } @@ -1210,9 +1207,9 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox return 0; } - HashMap<EnumFacing, List<DemonBuilding>> schemMap = new HashMap<EnumFacing, List<DemonBuilding>>(); + HashMap<ForgeDirection, List<DemonBuilding>> schemMap = new HashMap(); - for (EnumFacing nextDir : directions) + for (ForgeDirection nextDir : directions) { for (DemonBuilding build : TEDemonPortal.buildingList) { @@ -1226,7 +1223,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox schemMap.get(nextDir).add(build); } else { - schemMap.put(nextDir, new ArrayList<DemonBuilding>()); + schemMap.put(nextDir, new ArrayList()); schemMap.get(nextDir).add(build); } } @@ -1237,7 +1234,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox return 0; } - EnumFacing chosenDirection = (EnumFacing) schemMap.keySet().toArray()[new Random().nextInt(schemMap.keySet().size())]; + ForgeDirection chosenDirection = (ForgeDirection) schemMap.keySet().toArray()[new Random().nextInt(schemMap.keySet().size())]; DemonBuilding build = schemMap.get(chosenDirection).get(new Random().nextInt(schemMap.get(chosenDirection).size())); // Int3 portalSpace = build.getDoorSpace(chosenDirection); @@ -1279,7 +1276,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox GridSpaceHolder grid = this.createGSH(); - EnumFacing chosenDirection = this.nextDemonPortalDirection; + ForgeDirection chosenDirection = this.nextDemonPortalDirection; Int3 portalSpace = build.getDoorSpace(chosenDirection); int yOffset = portalSpace.yCoord; @@ -1291,9 +1288,9 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox case 1: int yDestination = yLevel + yOffset; - if(pos.getY() != yDestination) + if(yCoord != yDestination) { - BlockTeleposer.swapBlocks(this, worldObj, worldObj, pos, new BlockPos(pos.getX(), yDestination, pos.getZ())); + BlockTeleposer.swapBlocks(this, worldObj, worldObj, xCoord, yCoord, zCoord, xCoord, yDestination, zCoord); }else { //Nuthin - just as a reminder that we can now increment properly @@ -1301,9 +1298,9 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox break; case 2: - build.destroyAllInField(worldObj, pos.getX() + (x) * 5, yLevel, pos.getZ() + (z) * 5, chosenDirection.getOpposite()); + build.destroyAllInField(worldObj, xCoord + (x) * 5, yLevel, zCoord + (z) * 5, chosenDirection.getOpposite()); - build.buildAll(this, worldObj, pos.getX() + (x) * 5, yLevel, pos.getZ() + (z) * 5, chosenDirection.getOpposite(), true); + build.buildAll(this, worldObj, xCoord + (x) * 5, yLevel, zCoord + (z) * 5, chosenDirection.getOpposite(), true); build.setAllGridSpaces(x, z, yLevel, chosenDirection.getOpposite(), GridSpace.MAIN_PORTAL, grid); this.loadGSH(grid); break; @@ -1317,24 +1314,24 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox public int createRandomHouse(int buildingTier) { int next = rand.nextInt(4); - EnumFacing dir; + ForgeDirection dir; switch (next) { case 0: - dir = EnumFacing.NORTH; + dir = ForgeDirection.NORTH; break; case 1: - dir = EnumFacing.SOUTH; + dir = ForgeDirection.SOUTH; break; case 2: - dir = EnumFacing.EAST; + dir = ForgeDirection.EAST; break; case 3: - dir = EnumFacing.WEST; + dir = ForgeDirection.WEST; break; default: - dir = EnumFacing.NORTH; + dir = ForgeDirection.NORTH; } Int3 space = this.findRoadSpaceFromDirection(dir, (rand.nextInt(negXRadius + negZRadius + posXRadius + posZRadius)) + 1); // Second: 1 * @@ -1353,12 +1350,12 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox return 0; } - List<EnumFacing> directions = new ArrayList<EnumFacing>(); + List<ForgeDirection> directions = new ArrayList(); for (int i = 2; i < 6; i++) { - EnumFacing testDir = EnumFacing.getFront(i); - if (this.getGridSpace(x + testDir.getFrontOffsetX(), z + testDir.getFrontOffsetZ()).isEmpty()) + ForgeDirection testDir = ForgeDirection.getOrientation(i); + if (this.getGridSpace(x + testDir.offsetX, z + testDir.offsetZ).isEmpty()) { directions.add(testDir); } @@ -1369,9 +1366,9 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox return 0; } - HashMap<EnumFacing, List<DemonBuilding>> schemMap = new HashMap<EnumFacing, List<DemonBuilding>>(); + HashMap<ForgeDirection, List<DemonBuilding>> schemMap = new HashMap(); - for (EnumFacing nextDir : directions) + for (ForgeDirection nextDir : directions) { for (DemonBuilding build : TEDemonPortal.buildingList) { @@ -1390,7 +1387,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox schemMap.get(nextDir).add(build); } else { - schemMap.put(nextDir, new ArrayList<DemonBuilding>()); + schemMap.put(nextDir, new ArrayList()); schemMap.get(nextDir).add(build); } } else @@ -1406,18 +1403,22 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox return 0; } - EnumFacing chosenDirection = (EnumFacing) schemMap.keySet().toArray()[new Random().nextInt(schemMap.keySet().size())]; + ForgeDirection chosenDirection = (ForgeDirection) schemMap.keySet().toArray()[new Random().nextInt(schemMap.keySet().size())]; DemonBuilding build = schemMap.get(chosenDirection).get(new Random().nextInt(schemMap.get(chosenDirection).size())); Int3 offsetSpace = build.getGridOffsetFromRoad(chosenDirection, yLevel); int xOff = offsetSpace.xCoord; int zOff = offsetSpace.zCoord; - build.destroyAllInField(worldObj, pos.getX() + (x + xOff) * 5, yLevel, pos.getZ() + (z + zOff) * 5, chosenDirection.getOpposite()); - build.buildAll(this, worldObj, pos.getX() + (x + xOff) * 5, yLevel, pos.getZ() + (z + zOff) * 5, chosenDirection.getOpposite(), true); + build.destroyAllInField(worldObj, xCoord + (x + xOff) * 5, yLevel, zCoord + (z + zOff) * 5, chosenDirection.getOpposite()); + build.buildAll(this, worldObj, xCoord + (x + xOff) * 5, yLevel, zCoord + (z + zOff) * 5, chosenDirection.getOpposite(), true); build.setAllGridSpaces(x + xOff, z + zOff, yLevel, chosenDirection.getOpposite(), GridSpace.HOUSE, grid); this.loadGSH(grid); + DemonVillagePath path = new DemonVillagePath(xCoord + (x) * 5, yLevel, zCoord + (z) * 5, chosenDirection, 2); + + Int3AndBool temp = path.constructFullPath(this, worldObj, this.getRoadStepClearance()); + return build.getNumberOfGridSpaces(); } @@ -1445,9 +1446,14 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox return -1; } - public void createRoad(int xi, int yi, int zi, EnumFacing dir, int length, boolean doesNotDrop) + public void createRoad(int xi, int yi, int zi, ForgeDirection dir, int length, boolean doesNotDrop) { - if (dir.getFrontOffsetY() != 0) + int curX = xi; + int curY = yi; + int curZ = zi; + int roadRadius = this.getRoadRadius(); + + if (dir.offsetY != 0) { return; } @@ -1489,11 +1495,6 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox } return 0; } - - public IBlockState getRoadState() - { - return getRoadBlock().getStateFromMeta(getRoadMeta()); - } public int getRoadStepClearance() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/BookEntityItem.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/BookEntityItem.java index 00187b3d..14f06b92 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/BookEntityItem.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/BookEntityItem.java @@ -26,7 +26,7 @@ public class BookEntityItem extends EntityItem public BookEntityItem(World world, Entity original, ItemStack stack) { this(world, original.posX, original.posY, original.posZ); - this.setDefaultPickupDelay(); + this.delayBeforeCanPickup = 20; this.motionX = original.motionX; this.motionY = original.motionY; this.motionZ = original.motionZ; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java index 08dbb8bc..3d21cda8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBileDemon.java @@ -1,29 +1,34 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.pathfinding.PathNavigateGround; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.*; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntityGhast; +import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; public class EntityBileDemon extends EntityDemon { + private static float maxTamedHealth = 100.0F; + private static float maxUntamedHealth = 200.0F; + private int attackTimer; + public EntityBileDemon(World par1World) { super(par1World, AlchemicalWizardry.entityBileDemonID); - maxTamedHealth = 100.0F; - maxUntamedHealth = 200.0F; this.setSize(1.3F, 2.0F); - ((PathNavigateGround)this.getNavigator()).func_179690_a(true); + this.getNavigator().setAvoidsWater(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0D, true)); this.tasks.addTask(3, this.aiSit); @@ -36,7 +41,6 @@ public class EntityBileDemon extends EntityDemon this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true)); this.setTamed(false); attackTimer = 0; - this.applyEntityAttributes(); } @Override @@ -57,4 +61,338 @@ public class EntityBileDemon extends EntityDemon //this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D); } + + /** + * Returns true if the newer Entity AI code should be run + */ + public boolean isAIEnabled() + { + return true; + } + + /** + * Sets the active target the Task system uses for tracking + */ + public void setAttackTarget(EntityLivingBase par1EntityLivingBase) + { + super.setAttackTarget(par1EntityLivingBase); + + if (par1EntityLivingBase == null) + { + this.setAngry(false); + } else if (!this.isTamed()) + { + this.setAngry(true); + } + } + + /** + * main AI tick function, replaces updateEntityActionState + */ + protected void updateAITick() + { + this.dataWatcher.updateObject(18, this.getHealth()); + } + + protected void entityInit() + { + super.entityInit(); + this.dataWatcher.addObject(18, this.getHealth()); + //this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1))); + } + + /** + * Plays step sound at given x, y, z for the entity + */ + protected void playStepSound(int par1, int par2, int par3, int par4) + { + this.playSound("mob.zombie.step", 0.15F, 1.0F); + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) + { + super.writeEntityToNBT(par1NBTTagCompound); + par1NBTTagCompound.setBoolean("Angry", this.isAngry()); + par1NBTTagCompound.setByte("attackTimer", (byte) attackTimer); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) + { + super.readEntityFromNBT(par1NBTTagCompound); + this.setAngry(par1NBTTagCompound.getBoolean("Angry")); + + attackTimer = par1NBTTagCompound.getByte("attackTimer"); + } + + /** + * Returns the sound this mob makes while it's alive. + */ + protected String getLivingSound() + { + return "none"; + } + + /** + * Returns the sound this mob makes when it is hurt. + */ + protected String getHurtSound() + { + return "mob.irongolem.hit"; + } + + /** + * Returns the sound this mob makes on death. + */ + protected String getDeathSound() + { + return "mob.irongolem.death"; + } + + /** + * Returns the volume for the sounds this mob makes. + */ + protected float getSoundVolume() + { + return 1.0F; + } + + /** + * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons + * use this to react to sunlight and start to burn. + */ + public void onLivingUpdate() + { + super.onLivingUpdate(); + + if (attackTimer > 0) + { + attackTimer--; + } + } + + /** + * Called to update the entity's position/logic. + */ + public void onUpdate() + { + super.onUpdate(); + } + + public float getEyeHeight() + { + return this.height * 0.8F; + } + + /** + * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently + * use in wolves. + */ + public int getVerticalFaceSpeed() + { + return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); + } + + /** + * Called when the entity is attacked. + */ + public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) + { + if (this.isEntityInvulnerable()) + { + return false; + } else + { + Entity entity = par1DamageSource.getEntity(); + this.aiSit.setSitting(false); + + if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) + { + par2 = (par2 + 1.0F) / 2.0F; + } + + return super.attackEntityFrom(par1DamageSource, par2); + } + } + + public boolean attackEntityAsMob(Entity par1Entity) + { + this.attackTimer = 10; + this.worldObj.setEntityState(this, (byte) 4); + boolean flag = par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) (7 + this.rand.nextInt(15))); + + if (flag) + { + par1Entity.motionY += 0.4000000059604645D; + } + + this.playSound("mob.irongolem.throw", 1.0F, 1.0F); + return flag; + } + + public void setTamed(boolean par1) + { + super.setTamed(par1); + + if (par1) + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); + } else + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); + } + } + + /** + * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. + */ + @Override + public boolean interact(EntityPlayer par1EntityPlayer) + { + ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); + + if (this.isTamed()) + { + if (itemstack != null) + { + if (itemstack.getItem() instanceof ItemFood) + { + ItemFood itemfood = (ItemFood) itemstack.getItem(); + + if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < maxTamedHealth) + { + if (!par1EntityPlayer.capabilities.isCreativeMode) + { + --itemstack.stackSize; + } + + this.heal((float) itemfood.func_150905_g(itemstack)); + + if (itemstack.stackSize <= 0) + { + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); + } + + return true; + } + } + } + + if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack)) + { + if (!this.worldObj.isRemote) + { + this.aiSit.setSitting(!this.isSitting()); + this.isJumping = false; + this.setPathToEntity(null); + this.setTarget(null); + this.setAttackTarget(null); + } + + this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); + } + } else if (itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) + { + if (!par1EntityPlayer.capabilities.isCreativeMode) + { + --itemstack.stackSize; + } + + if (itemstack.stackSize <= 0) + { + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); + } + + if (!this.worldObj.isRemote) + { + if (this.rand.nextInt(1) == 0) + { + this.setTamed(true); + this.setPathToEntity(null); + this.setAttackTarget(null); + this.aiSit.setSitting(true); + this.setHealth(maxTamedHealth); + this.func_152115_b(par1EntityPlayer.getUniqueID().toString()); + this.playTameEffect(true); + this.worldObj.setEntityState(this, (byte) 7); + } else + { + this.playTameEffect(false); + this.worldObj.setEntityState(this, (byte) 6); + } + } + + return true; + } + + return super.interact(par1EntityPlayer); + } + + /** + * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on + * the animal type) + */ + public boolean isBreedingItem(ItemStack par1ItemStack) + { + return false; + } + + /** + * Determines whether this wolf is angry or not. + */ + public boolean isAngry() + { + return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; + } + + /** + * Sets whether this wolf is angry or not. + */ + public void setAngry(boolean par1) + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + + if (par1) + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); + } else + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); + } + } + + /** + * Determines if an entity can be despawned, used on idle far away entities + */ + protected boolean canDespawn() + { + return false; + } + + @Override + public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) + { + if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) + { + if (par1EntityLivingBase instanceof EntityBileDemon) + { + EntityBileDemon entitywolf = (EntityBileDemon) par1EntityLivingBase; + + if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) + { + return false; + } + } + + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + } else + { + return false; + } + } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java index 7d431217..2dad0271 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityBoulderFist.java @@ -1,31 +1,37 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILeapAtTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.pathfinding.PathNavigateGround; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; +import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.*; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntityGhast; +import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; public class EntityBoulderFist extends EntityDemon { private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); + private static float maxTamedHealth = 60.0F; + private static float maxUntamedHealth = 50.0F; + public EntityBoulderFist(World par1World) { super(par1World, AlchemicalWizardry.entityBoulderFistID); this.setSize(0.8F, 1.2F); - ((PathNavigateGround)this.getNavigator()).func_179690_a(true); + this.getNavigator().setAvoidsWater(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, this.aiSit); this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F)); @@ -53,8 +59,6 @@ public class EntityBoulderFist extends EntityDemon super.applyEntityAttributes(); //This line affects the speed of the monster this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D); - float maxTamedHealth = 60.0F; - float maxUntamedHealth = 50.0F; //My guess is that this will alter the max health if (this.isTamed()) @@ -66,6 +70,334 @@ public class EntityBoulderFist extends EntityDemon } } + /** + * Returns true if the newer Entity AI code should be run + */ + public boolean isAIEnabled() + { + return true; + } + + /** + * Sets the active target the Task system uses for tracking + */ + public void setAttackTarget(EntityLivingBase par1EntityLivingBase) + { + super.setAttackTarget(par1EntityLivingBase); + + if (par1EntityLivingBase == null) + { + this.setAngry(false); + } else if (!this.isTamed()) + { + this.setAngry(true); + } + } + + /** + * main AI tick function, replaces updateEntityActionState + */ + protected void updateAITick() + { + this.dataWatcher.updateObject(18, this.getHealth()); + } + + protected void entityInit() + { + super.entityInit(); + this.dataWatcher.addObject(18, this.getHealth()); + } + + /** + * Plays step sound at given x, y, z for the entity + */ + protected void playStepSound(int par1, int par2, int par3, int par4) + { + this.playSound("mob.zombie.step", 0.15F, 1.0F); + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) + { + super.writeEntityToNBT(par1NBTTagCompound); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) + { + super.readEntityFromNBT(par1NBTTagCompound); + this.setAngry(par1NBTTagCompound.getBoolean("Angry")); + + this.setCombatTask(); + } + + /** + * Returns the sound this mob makes while it's alive. + */ + protected String getLivingSound() + { + //TODO change sounds + return this.isAngry() ? "mob.wolf.growl" : (this.rand.nextInt(3) == 0 ? (this.isTamed() && this.dataWatcher.getWatchableObjectFloat(18) < 10.0F ? "mob.wolf.whine" : "mob.wolf.panting") : "mob.wolf.bark"); + } + + /** + * Returns the sound this mob makes when it is hurt. + */ + protected String getHurtSound() + { + return "mob.wolf.hurt"; + } + + /** + * Returns the sound this mob makes on death. + */ + protected String getDeathSound() + { + return "mob.wolf.death"; + } + + /** + * Returns the volume for the sounds this mob makes. + */ + protected float getSoundVolume() + { + return 0.4F; + } + + /** + * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons + * use this to react to sunlight and start to burn. + */ + public void onLivingUpdate() + { + super.onLivingUpdate(); + } + + /** + * Called to update the entity's position/logic. + */ + public void onUpdate() + { + super.onUpdate(); + } + + public float getEyeHeight() + { + return this.height * 0.8F; + } + + /** + * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently + * use in wolves. + */ + public int getVerticalFaceSpeed() + { + return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); + } + + /** + * Called when the entity is attacked. + */ + public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) + { + if (this.isEntityInvulnerable()) + { + return false; + } else + { + Entity entity = par1DamageSource.getEntity(); + this.aiSit.setSitting(false); + + if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) + { + par2 = (par2 + 1.0F) / 2.0F; + } + + return super.attackEntityFrom(par1DamageSource, par2); + } + } + + public boolean attackEntityAsMob(Entity par1Entity) + { + int i = this.isTamed() ? 6 : 7; + return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); + } + + public void setTamed(boolean par1) + { + super.setTamed(par1); + + if (par1) + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); + } else + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); + } + } + + /** + * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. + */ + @Override + public boolean interact(EntityPlayer par1EntityPlayer) + { + ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); + + if (this.isTamed()) + { + if (itemstack != null) + { + if (itemstack.getItem() instanceof ItemFood) + { + ItemFood itemfood = (ItemFood) itemstack.getItem(); + + if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < maxTamedHealth) + { + if (!par1EntityPlayer.capabilities.isCreativeMode) + { + --itemstack.stackSize; + } + + this.heal((float) itemfood.func_150905_g(itemstack)); + + if (itemstack.stackSize <= 0) + { + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); + } + + return true; + } + } + } + + if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack)) + { + if (!this.worldObj.isRemote) + { + this.aiSit.setSitting(!this.isSitting()); + this.isJumping = false; + this.setPathToEntity(null); + this.setTarget(null); + this.setAttackTarget(null); + } + + this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); + } + } else if (itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) + { + if (!par1EntityPlayer.capabilities.isCreativeMode) + { + --itemstack.stackSize; + } + + if (itemstack.stackSize <= 0) + { + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); + } + + if (!this.worldObj.isRemote) + { + if (this.rand.nextInt(1) == 0) + { + this.setTamed(true); + this.setPathToEntity(null); + this.setAttackTarget(null); + this.aiSit.setSitting(true); + this.setHealth(maxTamedHealth); + this.func_152115_b(par1EntityPlayer.getUniqueID().toString()); + this.playTameEffect(true); + this.worldObj.setEntityState(this, (byte) 7); + } else + { + this.playTameEffect(false); + this.worldObj.setEntityState(this, (byte) 6); + } + } + + return true; + } + + return super.interact(par1EntityPlayer); + } + + + /** + * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on + * the animal type) + */ + public boolean isBreedingItem(ItemStack par1ItemStack) + { + return false; + } + + /** + * Determines whether this wolf is angry or not. + */ + public boolean isAngry() + { + return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; + } + + /** + * Sets whether this wolf is angry or not. + */ + public void setAngry(boolean par1) + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + + if (par1) + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); + } else + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); + } + } + + /** + * Determines if an entity can be despawned, used on idle far away entities + */ + protected boolean canDespawn() + { + return false; + } + + @Override + public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) + { + if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) + { + if (par1EntityLivingBase instanceof EntityBoulderFist) + { + EntityBoulderFist entitywolf = (EntityBoulderFist) par1EntityLivingBase; + + if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) + { + return false; + } + } + + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + } else + { + return false; + } + } + + /** + * Attack the specified entity using a ranged attack. + */ + public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) + { + HolyProjectile hol = new HolyProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 5, 600); + this.worldObj.spawnEntityInWorld(hol); + } + /** * sets this entity's combat AI. */ diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java index e87ee5a8..a9179329 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityDemon.java @@ -1,35 +1,21 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityAgeable; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.passive.EntityAnimal; -import net.minecraft.entity.passive.EntityHorse; import net.minecraft.entity.passive.EntityTameable; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ChatComponentTranslation; -import net.minecraft.util.DamageSource; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.common.IDemon; -import WayofTime.alchemicalWizardry.common.items.DemonCrystal; +import WayofTime.alchemicalWizardry.common.items.DemonPlacer; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class EntityDemon extends EntityTameable implements IDemon { - protected boolean isAggro; - protected String demonID; - - protected float maxTamedHealth = 100.0F; - protected float maxUntamedHealth = 200.0F; - protected int attackTimer; + private boolean isAggro; + private String demonID; protected boolean dropCrystal = true; @@ -75,15 +61,13 @@ public class EntityDemon extends EntityTameable implements IDemon // TODO Auto-generated method stub return null; } - + @Override public void writeToNBT(NBTTagCompound tag) { super.writeToNBT(tag); tag.setBoolean("dropCrystal", this.getDoesDropCrystal()); - tag.setBoolean("isAggro", isAggro); - tag.setString("demonID", demonID); } @Override @@ -92,8 +76,6 @@ public class EntityDemon extends EntityTameable implements IDemon super.readFromNBT(tag); this.setDropCrystal(tag.getBoolean("dropCrystal")); - isAggro = tag.getBoolean("isAggro"); - demonID = tag.getString("demonID"); } @Override @@ -103,14 +85,14 @@ public class EntityDemon extends EntityTameable implements IDemon { ItemStack drop = new ItemStack(ModItems.demonPlacer); - DemonCrystal.setDemonString(drop, this.getDemonID()); + DemonPlacer.setDemonString(drop, this.getDemonID()); if ((this.getOwner() instanceof EntityPlayer)) { - DemonCrystal.setOwnerName(drop, SpellHelper.getUsername((EntityPlayer) this.getOwner())); + DemonPlacer.setOwnerName(drop, SpellHelper.getUsername((EntityPlayer) this.getOwner())); } - if (this.hasCustomName()) + if (this.hasCustomNameTag()) { drop.setStackDisplayName(this.getCustomNameTag()); } @@ -156,368 +138,4 @@ public class EntityDemon extends EntityTameable implements IDemon { this.demonID = id; } - - - /** - * Returns true if the newer Entity AI code should be run - */ - public boolean isAIEnabled() - { - return true; - } - - /** - * Sets the active target the Task system uses for tracking - */ - public void setAttackTarget(EntityLivingBase par1EntityLivingBase) - { - super.setAttackTarget(par1EntityLivingBase); - - if (par1EntityLivingBase == null) - { - this.setAngry(false); - } else if (!this.isTamed()) - { - this.setAngry(true); - } - } - - @Override - /** - * main AI tick function, replaces updateEntityActionState - */ - protected void updateAITick() - { - this.dataWatcher.updateObject(18, this.getHealth()); - } - - @Override - protected void entityInit() - { - super.entityInit(); - this.dataWatcher.addObject(18, this.getHealth()); - this.dataWatcher.addObject(19, 0); - //this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1))); - } - - /** - * Plays step sound at given x, y, z for the entity - */ - protected void playStepSound(int par1, int par2, int par3, int par4) - { - this.playSound("mob.zombie.step", 0.15F, 1.0F); - } - - @Override - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeEntityToNBT(par1NBTTagCompound); - par1NBTTagCompound.setBoolean("Angry", this.isAngry()); - par1NBTTagCompound.setByte("attackTimer", (byte) attackTimer); - } - - @Override - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readEntityFromNBT(par1NBTTagCompound); - this.setAngry(par1NBTTagCompound.getBoolean("Angry")); - - attackTimer = par1NBTTagCompound.getByte("attackTimer"); - } - - @Override - /** - * Returns the sound this mob makes while it's alive. - */ - protected String getLivingSound() - { - return "none"; - } - - @Override - /** - * Returns the sound this mob makes when it is hurt. - */ - protected String getHurtSound() - { - return "mob.irongolem.hit"; - } - - @Override - /** - * Returns the sound this mob makes on death. - */ - protected String getDeathSound() - { - return "mob.irongolem.death"; - } - - @Override - /** - * Returns the volume for the sounds this mob makes. - */ - protected float getSoundVolume() - { - return 1.0F; - } - - /** - * Returns the item ID for the item the mob drops on death. - */ - protected int getDropItemId() - { - return -1; - } - - public int getAttackTimer() - { - return attackTimer; - } - - @Override - /** - * Called to update the entity's position/logic. - */ - public void onUpdate() - { - super.onUpdate(); - } - - @Override - public float getEyeHeight() - { - return this.height * 0.8F; - } - - @Override - /** - * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently - * use in wolves. - */ - public int getVerticalFaceSpeed() - { - return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); - } - - @Override - /** - * Called when the entity is attacked. - */ - public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) - { -// if (this.isEntityInvulnerable()) -// { -// return false; -// } else - { - Entity entity = par1DamageSource.getEntity(); - this.aiSit.setSitting(false); - - if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) - { - par2 = (par2 + 1.0F) / 2.0F; - } - - return super.attackEntityFrom(par1DamageSource, par2); - } - } - - @Override - public boolean attackEntityAsMob(Entity par1Entity) - { - this.attackTimer = 10; - this.worldObj.setEntityState(this, (byte) 4); - boolean flag = par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) (7 + this.rand.nextInt(15))); - - if (flag) - { - par1Entity.motionY += 0.4000000059604645D; - } - - this.playSound("mob.irongolem.throw", 1.0F, 1.0F); - return flag; - } - - @Override - public void setTamed(boolean par1) - { - super.setTamed(par1); - - if (par1) - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); - } else - { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); - } - } - - /** - * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. - */ - @Override - public boolean interact(EntityPlayer par1EntityPlayer) - { - ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); - - if (this.isTamed()) - { - if (itemstack != null) - { - if (itemstack.getItem() instanceof ItemFood) - { - ItemFood itemfood = (ItemFood) itemstack.getItem(); - - if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < maxTamedHealth) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - this.heal((float) itemfood.getHealAmount(itemstack)); - - if (itemstack.stackSize <= 0) - { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); - } - - return true; - } - } - } - - if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack)) - { - if (!this.worldObj.isRemote) - { - this.aiSit.setSitting(!this.isSitting()); - this.isJumping = false; -// this.setPathToEntity(null); -// this.setTarget(null); - this.setAttackTarget(null); - } - - this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); - } - } else if (itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) - { - if (!par1EntityPlayer.capabilities.isCreativeMode) - { - --itemstack.stackSize; - } - - if (itemstack.stackSize <= 0) - { - par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); - } - - if (!this.worldObj.isRemote) - { - if (this.rand.nextInt(1) == 0) - { - this.setTamed(true); -// this.setPathToEntity(null); - this.setAttackTarget(null); - this.aiSit.setSitting(true); - this.setHealth(maxTamedHealth); - this.func_152115_b(par1EntityPlayer.getUniqueID().toString()); - this.playTameEffect(true); - this.worldObj.setEntityState(this, (byte) 7); - } else - { - this.playTameEffect(false); - this.worldObj.setEntityState(this, (byte) 6); - } - } - - return true; - } - - return super.interact(par1EntityPlayer); - } - - /** - * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on - * the animal type) - */ - public boolean isBreedingItem(ItemStack par1ItemStack) - { - return false; - } - - /** - * Determines whether this wolf is angry or not. - */ - public boolean isAngry() - { - return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; - } - - /** - * Sets whether this wolf is angry or not. - */ - public void setAngry(boolean par1) - { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); - - if (par1) - { - this.dataWatcher.updateObject(16, b0 | 2); - } else - { - this.dataWatcher.updateObject(16, b0 & -3); - } - } - - @Override - /** - * Returns true if the mob is currently able to mate with the specified mob. - */ - public boolean canMateWith(EntityAnimal par1EntityAnimal) - { - return false; - } - - public boolean func_70922_bv() - { - return this.dataWatcher.getWatchableObjectByte(19) == 1; - } - - @Override - /** - * Determines if an entity can be despawned, used on idle far away entities - */ - protected boolean canDespawn() - { - return false; - } - - @Override - public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) - { - if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) - { - if (par1EntityLivingBase instanceof EntityBileDemon) - { - EntityBileDemon entitywolf = (EntityBileDemon) par1EntityLivingBase; - - if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) - { - return false; - } - } - - return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); - } else - { - return false; - } - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java index b37b4695..6b6d73e2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityElemental.java @@ -2,13 +2,13 @@ package WayofTime.alchemicalWizardry.common.entity.mob; import java.util.List; +import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIAttackOnCollide; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.entity.passive.EntityHorse; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; @@ -16,12 +16,9 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModItems; @@ -45,20 +42,19 @@ public class EntityElemental extends EntityDemon } } -// public int courseChangeCooldown; + public int courseChangeCooldown; public double waypointX; public double waypointY; public double waypointZ; -/* private Entity targetedEntity; + private Entity targetedEntity; /** * Cooldown time between target loss and new target aquirement. - + */ private int aggroCooldown; public int prevAttackCounter; public int attackCounter; -*/ - @Override + /** * The explosion radius of spawned fireballs. */ @@ -70,67 +66,74 @@ public class EntityElemental extends EntityDemon } } - @Override + protected void fall(float par1) + { + } + + /** + * Takes in the distance the entity has fallen this tick and whether its on the ground to update the fall distance + * and deal fall damage if landing on the ground. Args: distanceFallenThisTick, onGround + */ + protected void updateFallState(double par1, boolean par3) + { + } + /** * Moves the entity based on the specified heading. Args: strafe, forward */ - public void moveEntityWithHeading(float p_70612_1_, float p_70612_2_) + public void moveEntityWithHeading(float par1, float par2) { if (this.isInWater()) { - this.moveFlying(p_70612_1_, p_70612_2_, 0.02F); + this.moveFlying(par1, par2, 0.02F); this.moveEntity(this.motionX, this.motionY, this.motionZ); this.motionX *= 0.800000011920929D; this.motionY *= 0.800000011920929D; this.motionZ *= 0.800000011920929D; - } - else if (this.isInLava()) + } else if (this.handleLavaMovement()) { - this.moveFlying(p_70612_1_, p_70612_2_, 0.02F); + this.moveFlying(par1, par2, 0.02F); this.moveEntity(this.motionX, this.motionY, this.motionZ); this.motionX *= 0.5D; this.motionY *= 0.5D; this.motionZ *= 0.5D; - } - else + } else { float f2 = 0.91F; if (this.onGround) { - f2 = this.worldObj.getBlockState(new BlockPos(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.getEntityBoundingBox().minY) - 1, MathHelper.floor_double(this.posZ))).getBlock().slipperiness * 0.91F; + f2 = 0.54600006F; + Block i = this.worldObj.getBlock(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.boundingBox.minY) - 1, MathHelper.floor_double(this.posZ)); + + if (i != null) + { + f2 = i.slipperiness * 0.91F; + } } float f3 = 0.16277136F / (f2 * f2 * f2); - this.moveFlying(p_70612_1_, p_70612_2_, this.onGround ? 0.1F * f3 : 0.02F); + this.moveFlying(par1, par2, this.onGround ? 0.1F * f3 : 0.02F); f2 = 0.91F; if (this.onGround) { - f2 = this.worldObj.getBlockState(new BlockPos(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.getEntityBoundingBox().minY) - 1, MathHelper.floor_double(this.posZ))).getBlock().slipperiness * 0.91F; + f2 = 0.54600006F; + Block j = this.worldObj.getBlock(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.boundingBox.minY) - 1, MathHelper.floor_double(this.posZ)); + + if (j != null) + { + f2 = j.slipperiness * 0.91F; + } } this.moveEntity(this.motionX, this.motionY, this.motionZ); - this.motionX *= (double)f2; - this.motionY *= (double)f2; - this.motionZ *= (double)f2; + this.motionX *= (double) f2; + this.motionY *= (double) f2; + this.motionZ *= (double) f2; } - - this.prevLimbSwingAmount = this.limbSwingAmount; - double d1 = this.posX - this.prevPosX; - double d0 = this.posZ - this.prevPosZ; - float f4 = MathHelper.sqrt_double(d1 * d1 + d0 * d0) * 4.0F; - - if (f4 > 1.0F) - { - f4 = 1.0F; - } - - this.limbSwingAmount += (f4 - this.limbSwingAmount) * 0.4F; - this.limbSwing += this.limbSwingAmount; } - @Override /** * returns true if this entity is by a ladder, false otherwise */ @@ -139,10 +142,115 @@ public class EntityElemental extends EntityDemon return false; } - @SideOnly(Side.CLIENT) - public boolean func_110182_bF() + protected void updateEntityActionState() { - return this.dataWatcher.getWatchableObjectByte(25) != 0; + if (this.getHealth() <= this.getMaxHealth() / 2.0f && worldObj.rand.nextInt(200) == 0) + { + this.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionReciprocation.id, 100, 1)); + } + + this.prevAttackCounter = this.attackCounter; + double d0 = this.waypointX - this.posX; + double d1 = this.waypointY - this.posY; + double d2 = this.waypointZ - this.posZ; + double d3 = d0 * d0 + d1 * d1 + d2 * d2; + + if (d3 < 1.0D || d3 > 3600.0D) + { + this.waypointX = this.posX + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); + this.waypointY = this.posY + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); + this.waypointZ = this.posZ + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); + } + + if (this.courseChangeCooldown-- <= 0) + { + this.courseChangeCooldown += this.rand.nextInt(5) + 2; + d3 = (double) MathHelper.sqrt_double(d3); + + if (this.isCourseTraversable(this.waypointX, this.waypointY, this.waypointZ, d3)) + { + this.motionX += d0 / d3 * 0.1D; + this.motionY += d1 / d3 * 0.1D; + this.motionZ += d2 / d3 * 0.1D; + } else + { + this.waypointX = this.posX + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); + this.waypointY = this.posY + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); + this.waypointZ = this.posZ + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); + } + } + + if (this.targetedEntity != null && this.targetedEntity.isDead) + { + this.targetedEntity = null; + } + + if (this.targetedEntity == null || this.aggroCooldown-- <= 0) + { + this.targetedEntity = getClosestVulnerableMonsterToEntity(this, 100.0D); + + if (this.targetedEntity != null) + { + this.aggroCooldown = 20; + } + } + + double d4 = 64.0D; + + if (this.targetedEntity != null && this.targetedEntity.getDistanceSqToEntity(this) < d4 * d4) + { + double d5 = this.targetedEntity.posX - this.posX; + double d6 = this.targetedEntity.boundingBox.minY + (double) (this.targetedEntity.height / 2.0F) - (this.posY + (double) (this.height / 2.0F)); + double d7 = this.targetedEntity.posZ - this.posZ; + this.renderYawOffset = this.rotationYaw = -((float) Math.atan2(d5, d7)) * 180.0F / (float) Math.PI; + + if (this.courseChangeCooldown <= 0) + { + if (isCourseTraversable(this.targetedEntity.posX, this.targetedEntity.posY, this.targetedEntity.posZ, Math.sqrt(d5 * d5 + d6 * d6 + d7 * d7))) + { + this.waypointX = this.targetedEntity.posX; + this.waypointY = this.targetedEntity.posY; + this.waypointZ = this.targetedEntity.posZ; + this.motionX += d5 / d3 * 0.1D; + this.motionY += d6 / d3 * 0.1D; + this.motionZ += d7 / d3 * 0.1D; + } else + { + this.waypointX = this.posX + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); + this.waypointY = this.posY + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); + this.waypointZ = this.posZ + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F); + this.motionX += d5 / d3 * 0.1D; + this.motionY += d6 / d3 * 0.1D; + this.motionZ += d7 / d3 * 0.1D; + } + } + + if (this.canEntityBeSeen(this.targetedEntity)) + { + if (Math.sqrt(d5 * d5 + d6 * d6 + d7 * d7) < 4) + { + ++this.attackCounter; + + if (this.attackCounter >= 10) + { + this.worldObj.playAuxSFXAtEntity(null, 1008, (int) this.posX, (int) this.posY, (int) this.posZ, 0); + this.inflictEffectOnEntity(this.targetedEntity); + this.attackCounter = -40; + } + } + } else if (this.attackCounter > 0) + { + --this.attackCounter; + } + } else + { + this.renderYawOffset = this.rotationYaw = -((float) Math.atan2(motionX, this.motionZ)) * 180.0F / (float) Math.PI; + + if (this.attackCounter > 0) + { + --this.attackCounter; + } + } } /** @@ -153,7 +261,7 @@ public class EntityElemental extends EntityDemon double d4 = (this.waypointX - this.posX) / par7; double d5 = (this.waypointY - this.posY) / par7; double d6 = (this.waypointZ - this.posZ) / par7; - AxisAlignedBB axisalignedbb = this.getBoundingBox(); + AxisAlignedBB axisalignedbb = this.boundingBox.copy(); for (int i = 1; (double) i < par7; ++i) { @@ -168,7 +276,6 @@ public class EntityElemental extends EntityDemon return true; } - @Override /** * Will return how many at most can spawn in a chunk at once. */ @@ -177,7 +284,6 @@ public class EntityElemental extends EntityDemon return 1; } - @Override /** * (abstract) Protected helper method to write subclass entity data to NBT. */ @@ -186,14 +292,12 @@ public class EntityElemental extends EntityDemon super.writeEntityToNBT(par1NBTTagCompound); } - @Override /** * (abstract) Protected helper method to read subclass entity data from NBT. */ public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) { super.readEntityFromNBT(par1NBTTagCompound); - this.setAngry(par1NBTTagCompound.getBoolean("Angry")); this.setCombatTask(); } @@ -215,7 +319,6 @@ public class EntityElemental extends EntityDemon } } - @Override /** * Returns true if the newer Entity AI code should be run */ @@ -224,24 +327,14 @@ public class EntityElemental extends EntityDemon return false; } - @Override /** * Sets the active target the Task system uses for tracking */ public void setAttackTarget(EntityLivingBase par1EntityLivingBase) { super.setAttackTarget(par1EntityLivingBase); - - if (par1EntityLivingBase == null) - { - this.setAngry(false); - } else if (!this.isTamed()) - { - this.setAngry(true); - } } - @Override /** * main AI tick function, replaces updateEntityActionState */ @@ -250,16 +343,13 @@ public class EntityElemental extends EntityDemon this.dataWatcher.updateObject(18, this.getHealth()); } - @Override protected void entityInit() { super.entityInit(); this.dataWatcher.addObject(18, this.getHealth()); this.dataWatcher.addObject(19, 0); - this.dataWatcher.addObject(25, 0); } - @Override /** * Plays step sound at given x, y, z for the entity */ @@ -268,7 +358,6 @@ public class EntityElemental extends EntityDemon this.playSound("mob.zombie.step", 0.15F, 1.0F); } - @Override /** * Returns the sound this mob makes while it's alive. */ @@ -278,7 +367,6 @@ public class EntityElemental extends EntityDemon return "none"; } - @Override /** * Returns the sound this mob makes when it is hurt. */ @@ -287,7 +375,6 @@ public class EntityElemental extends EntityDemon return "none"; } - @Override /** * Returns the sound this mob makes on death. */ @@ -296,7 +383,6 @@ public class EntityElemental extends EntityDemon return "none"; } - @Override /** * Returns the volume for the sounds this mob makes. */ @@ -305,36 +391,28 @@ public class EntityElemental extends EntityDemon return 0.4F; } - @Override /** - * Returns the item ID for the item the mob drops on death. + * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons + * use this to react to sunlight and start to burn. */ - protected int getDropItemId() + public void onLivingUpdate() { - return -1; + super.onLivingUpdate(); } - @Override /** * Called to update the entity's position/logic. */ public void onUpdate() { super.onUpdate(); - - if (this.getHealth() <= this.getMaxHealth() / 2.0f && worldObj.rand.nextInt(200) == 0) - { - this.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionReciprocation.id, 100, 1)); - } } - @Override public float getEyeHeight() { return this.height * 0.8F; } - @Override /** * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently * use in wolves. @@ -344,18 +422,17 @@ public class EntityElemental extends EntityDemon return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); } - @Override /** * Called when the entity is attacked. */ - public boolean attackEntityFrom(DamageSource source, float par2) + public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) { - if (this.func_180431_b(source)) + if (this.isEntityInvulnerable()) { return false; } else { - Entity entity = source.getEntity(); + Entity entity = par1DamageSource.getEntity(); this.aiSit.setSitting(false); if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) @@ -363,18 +440,16 @@ public class EntityElemental extends EntityDemon par2 = (par2 + 1.0F) / 2.0F; } - return super.attackEntityFrom(source, par2); + return super.attackEntityFrom(par1DamageSource, par2); } } - @Override public boolean attackEntityAsMob(Entity par1Entity) { int i = this.isTamed() ? 6 : 7; return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); } - @Override public void setTamed(boolean par1) { super.setTamed(par1); @@ -388,7 +463,10 @@ public class EntityElemental extends EntityDemon } } - @Override + /** + * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. + */ + /** * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on * the animal type) @@ -398,59 +476,6 @@ public class EntityElemental extends EntityDemon return false; } - @Override - /** - * Determines whether this wolf is angry or not. - */ - public boolean isAngry() - { - return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; - } - - @Override - /** - * Sets whether this wolf is angry or not. - */ - public void setAngry(boolean par1) - { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); - - if (par1) - { - this.dataWatcher.updateObject(16, b0 | 2); - } else - { - this.dataWatcher.updateObject(16, b0 & -3); - } - } - - public void func_70918_i(boolean par1) - { - if (par1) - { - this.dataWatcher.updateObject(19, 1); - } else - { - this.dataWatcher.updateObject(19, 0); - } - } - - @Override - /** - * Returns true if the mob is currently able to mate with the specified mob. - */ - public boolean canMateWith(EntityAnimal par1EntityAnimal) - { - return false; - } - - @Override - public boolean func_70922_bv() - { - return this.dataWatcher.getWatchableObjectByte(19) == 1; - } - - @Override /** * Determines if an entity can be despawned, used on idle far away entities */ @@ -511,7 +536,7 @@ public class EntityElemental extends EntityDemon double range = Math.sqrt(par2); double verticalRange = Math.sqrt(par2); - List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(par1 - 0.5f, par3 - 0.5f, par5 - 0.5f, par1 + 0.5f, par3 + 0.5f, par5 + 0.5f).expand(range, verticalRange, range)); + List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(par1 - 0.5f, par3 - 0.5f, par5 - 0.5f, par1 + 0.5f, par3 + 0.5f, par5 + 0.5f).expand(range, verticalRange, range)); if (entities == null) { return null; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java index 8c654f08..3187dccf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java @@ -1,35 +1,36 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IRangedAttackMob; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIArrowAttack; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.pathfinding.PathNavigateGround; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.*; +import net.minecraft.entity.ai.*; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntityGhast; +import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob { private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 40, 40, 15.0F); private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); + private static float maxTamedHealth = 50.0F; + private static float maxUntamedHealth = 50.0F; + public EntityFallenAngel(World par1World) { super(par1World, AlchemicalWizardry.entityFallenAngelID); this.setSize(0.7F, 1.8F); - ((PathNavigateGround)this.getNavigator()).func_179690_a(true); + this.getNavigator().setAvoidsWater(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, this.aiSit); this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); @@ -57,8 +58,6 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob super.applyEntityAttributes(); //This line affects the speed of the monster this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D); - float maxTamedHealth = 50.0F; - float maxUntamedHealth = 50.0F; //My guess is that this will alter the max health if (this.isTamed()) @@ -70,6 +69,327 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob } } + /** + * Returns true if the newer Entity AI code should be run + */ + public boolean isAIEnabled() + { + return true; + } + + /** + * Sets the active target the Task system uses for tracking + */ + public void setAttackTarget(EntityLivingBase par1EntityLivingBase) + { + super.setAttackTarget(par1EntityLivingBase); + + if (par1EntityLivingBase == null) + { + this.setAngry(false); + } else if (!this.isTamed()) + { + this.setAngry(true); + } + } + + /** + * main AI tick function, replaces updateEntityActionState + */ + protected void updateAITick() + { + this.dataWatcher.updateObject(18, this.getHealth()); + } + + protected void entityInit() + { + super.entityInit(); + this.dataWatcher.addObject(18, this.getHealth()); + } + + /** + * Plays step sound at given x, y, z for the entity + */ + protected void playStepSound(int par1, int par2, int par3, int par4) + { + this.playSound("mob.zombie.step", 0.15F, 1.0F); + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) + { + super.writeEntityToNBT(par1NBTTagCompound); + par1NBTTagCompound.setBoolean("Angry", this.isAngry()); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) + { + super.readEntityFromNBT(par1NBTTagCompound); + this.setAngry(par1NBTTagCompound.getBoolean("Angry")); + + this.setCombatTask(); + } + + /** + * Returns the sound this mob makes while it's alive. + */ + protected String getLivingSound() + { + //TODO change sounds + return "none"; + } + + /** + * Returns the sound this mob makes when it is hurt. + */ + protected String getHurtSound() + { + return "none"; + } + + /** + * Returns the sound this mob makes on death. + */ + protected String getDeathSound() + { + return "mob.wolf.death"; + } + + /** + * Returns the volume for the sounds this mob makes. + */ + protected float getSoundVolume() + { + return 0.4F; + } + + /** + * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons + * use this to react to sunlight and start to burn. + */ + public void onLivingUpdate() + { + super.onLivingUpdate(); + } + + /** + * Called to update the entity's position/logic. + */ + public void onUpdate() + { + super.onUpdate(); + } + + public float getEyeHeight() + { + return this.height * 0.8F; + } + + /** + * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently + * use in wolves. + */ + public int getVerticalFaceSpeed() + { + return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); + } + + /** + * Called when the entity is attacked. + */ + public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) + { + if (this.isEntityInvulnerable()) + { + return false; + } else + { + Entity entity = par1DamageSource.getEntity(); + this.aiSit.setSitting(false); + + if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) + { + par2 = (par2 + 1.0F) / 2.0F; + } + + return super.attackEntityFrom(par1DamageSource, par2); + } + } + + public boolean attackEntityAsMob(Entity par1Entity) + { + int i = this.isTamed() ? 4 : 2; + return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); + } + + public void setTamed(boolean par1) + { + super.setTamed(par1); + + if (par1) + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); + } else + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); + } + } + + /** + * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. + */ + @Override + public boolean interact(EntityPlayer par1EntityPlayer) + { + ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); + + if (this.isTamed()) + { + if (itemstack != null) + { + if (itemstack.getItem() instanceof ItemFood) + { + ItemFood itemfood = (ItemFood) itemstack.getItem(); + + if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < maxTamedHealth) + { + if (!par1EntityPlayer.capabilities.isCreativeMode) + { + --itemstack.stackSize; + } + + this.heal((float) itemfood.func_150905_g(itemstack)); + + if (itemstack.stackSize <= 0) + { + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); + } + + return true; + } + } + } + + if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack)) + { + if (!this.worldObj.isRemote) + { + this.aiSit.setSitting(!this.isSitting()); + this.isJumping = false; + this.setPathToEntity(null); + this.setTarget(null); + this.setAttackTarget(null); + } + + this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); + } + } else if (itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) + { + if (!par1EntityPlayer.capabilities.isCreativeMode) + { + --itemstack.stackSize; + } + + if (itemstack.stackSize <= 0) + { + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); + } + + if (!this.worldObj.isRemote) + { + if (this.rand.nextInt(1) == 0) + { + this.setTamed(true); + this.setPathToEntity(null); + this.setAttackTarget(null); + this.aiSit.setSitting(true); + this.setHealth(maxTamedHealth); + this.func_152115_b(par1EntityPlayer.getUniqueID().toString()); + this.playTameEffect(true); + this.worldObj.setEntityState(this, (byte) 7); + } else + { + this.playTameEffect(false); + this.worldObj.setEntityState(this, (byte) 6); + } + } + + return true; + } + + return super.interact(par1EntityPlayer); + } + + + /** + * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on + * the animal type) + */ + public boolean isBreedingItem(ItemStack par1ItemStack) + { + return false; + //return par1ItemStack == null ? false : (!(Item.itemsList[par1ItemStack.itemID] instanceof ItemFood) ? false : ((ItemFood)Item.itemsList[par1ItemStack.itemID]).isWolfsFavoriteMeat()); + } + + /** + * Determines whether this wolf is angry or not. + */ + public boolean isAngry() + { + return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; + } + + /** + * Sets whether this wolf is angry or not. + */ + public void setAngry(boolean par1) + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + + if (par1) + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); + } else + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); + } + } + + /** + * Determines if an entity can be despawned, used on idle far away entities + */ + protected boolean canDespawn() + { + //return !this.isTamed() && this.ticksExisted > 2400; + return false; + } + + public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) + { + if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) + { + if (par1EntityLivingBase instanceof EntityFallenAngel) + { + EntityFallenAngel entitywolf = (EntityFallenAngel) par1EntityLivingBase; + + if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) + { + return false; + } + } + + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + } else + { + return false; + } + } + /** * Attack the specified entity using a ranged attack. */ diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFireElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFireElemental.java index c54d4588..b09aa6e5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFireElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityFireElemental.java @@ -15,7 +15,6 @@ public class EntityFireElemental extends EntityElemental implements IMob this.isImmuneToFire = true; } - @Override public void inflictEffectOnEntity(Entity target) { if (target instanceof EntityLivingBase) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityHolyElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityHolyElemental.java index bbccf90e..51be44c9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityHolyElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityHolyElemental.java @@ -16,7 +16,6 @@ public class EntityHolyElemental extends EntityElemental implements IMob super(world, AlchemicalWizardry.entityHolyElementalID); } - @Override public void inflictEffectOnEntity(Entity target) { if (target instanceof EntityLivingBase) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java index 33f72245..854926e7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityIceDemon.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.common.entity.mob; +import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IRangedAttackMob; import net.minecraft.entity.SharedMonsterAttributes; @@ -13,17 +14,31 @@ import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; import net.minecraft.entity.ai.EntityAISwimming; import net.minecraft.entity.ai.EntityAIWander; import net.minecraft.entity.ai.EntityAIWatchClosest; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntityGhast; +import net.minecraft.entity.passive.EntityHorse; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; +import net.minecraft.util.Vec3; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class EntityIceDemon extends EntityDemon implements IRangedAttackMob { private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 30, 50, 15.0F); private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); + private static float maxTamedHealth = 50.0F; + private static float maxUntamedHealth = 30.0F; + public EntityIceDemon(World par1World) { super(par1World, AlchemicalWizardry.entityIceDemonID); @@ -53,8 +68,6 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob super.applyEntityAttributes(); //This line affects the speed of the monster this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.40000001192092896D); - float maxTamedHealth = 50.0F; - float maxUntamedHealth = 30.0F; //My guess is that this will alter the max health if (this.isTamed()) @@ -66,7 +79,345 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob } } + /** + * Returns true if the newer Entity AI code should be run + */ + public boolean isAIEnabled() + { + return true; + } + + /** + * Sets the active target the Task system uses for tracking + */ + public void setAttackTarget(EntityLivingBase par1EntityLivingBase) + { + super.setAttackTarget(par1EntityLivingBase); + + if (par1EntityLivingBase == null) + { + this.setAngry(false); + } else if (!this.isTamed()) + { + this.setAngry(true); + } + } + + /** + * main AI tick function, replaces updateEntityActionState + */ + protected void updateAITick() + { + this.dataWatcher.updateObject(18, this.getHealth()); + } + + protected void entityInit() + { + super.entityInit(); + this.dataWatcher.addObject(18, this.getHealth()); + } + + /** + * Plays step sound at given x, y, z for the entity + */ + protected void playStepSound(int par1, int par2, int par3, int par4) + { + this.playSound("mob.zombie.step", 0.15F, 1.0F); + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) + { + super.writeEntityToNBT(par1NBTTagCompound); + par1NBTTagCompound.setBoolean("Angry", this.isAngry()); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) + { + super.readEntityFromNBT(par1NBTTagCompound); + this.setAngry(par1NBTTagCompound.getBoolean("Angry")); + + this.setCombatTask(); + } + + /** + * Returns the sound this mob makes while it's alive. + */ + protected String getLivingSound() + { + return "none"; + } + + /** + * Returns the sound this mob makes when it is hurt. + */ + protected String getHurtSound() + { + return "mob.irongolem.hit"; + } + + /** + * Returns the sound this mob makes on death. + */ + protected String getDeathSound() + { + return "mob.irongolem.death"; + } + + /** + * Returns the volume for the sounds this mob makes. + */ + protected float getSoundVolume() + { + return 0.4F; + } + + /** + * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons + * use this to react to sunlight and start to burn. + */ + public void onLivingUpdate() + { + super.onLivingUpdate(); + int range = 2; + + Vec3 blockVector = SpellHelper.getEntityBlockVector(this); + + int xCoord = (int) (blockVector.xCoord); + int yCoord = (int) (blockVector.yCoord); + int zCoord = (int) (blockVector.zCoord); + + for (int i = -range; i <= range; i++) + { + for (int j = -range; j <= range; j++) + { + for (int k = -range; k <= range; k++) + { + if (worldObj.rand.nextFloat() < 0.25f) + { + SpellHelper.freezeWaterBlock(worldObj, xCoord + i, yCoord + j, zCoord + k); + } + } + } + } + } + + /** + * Called to update the entity's position/logic. + */ + public void onUpdate() + { + super.onUpdate(); + } + + public float getEyeHeight() + { + return this.height * 0.8F; + } + + /** + * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently + * use in wolves. + */ + public int getVerticalFaceSpeed() + { + return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); + } + + /** + * Called when the entity is attacked. + */ + public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) + { + if (this.isEntityInvulnerable()) + { + return false; + } else + { + Entity entity = par1DamageSource.getEntity(); + this.aiSit.setSitting(false); + + if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) + { + par2 = (par2 + 1.0F) / 2.0F; + } + + return super.attackEntityFrom(par1DamageSource, par2); + } + } + + public boolean attackEntityAsMob(Entity par1Entity) + { + int i = this.isTamed() ? 4 : 2; + return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); + } + + public void setTamed(boolean par1) + { + super.setTamed(par1); + + if (par1) + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); + } else + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); + } + } + + /** + * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. + */ @Override + public boolean interact(EntityPlayer par1EntityPlayer) + { + ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); + + if (this.isTamed()) + { + if (itemstack != null) + { + if (itemstack.getItem() instanceof ItemFood) + { + ItemFood itemfood = (ItemFood) itemstack.getItem(); + + if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < maxTamedHealth) + { + if (!par1EntityPlayer.capabilities.isCreativeMode) + { + --itemstack.stackSize; + } + + this.heal((float) itemfood.func_150905_g(itemstack)); + + if (itemstack.stackSize <= 0) + { + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); + } + + return true; + } + } + } + + if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack)) + { + if (!this.worldObj.isRemote) + { + this.aiSit.setSitting(!this.isSitting()); + this.isJumping = false; + this.setPathToEntity(null); + this.setTarget(null); + this.setAttackTarget(null); + } + + this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); + } + } else if (itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) + { + if (!par1EntityPlayer.capabilities.isCreativeMode) + { + --itemstack.stackSize; + } + + if (itemstack.stackSize <= 0) + { + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); + } + + if (!this.worldObj.isRemote) + { + if (this.rand.nextInt(1) == 0) + { + this.setTamed(true); + this.setPathToEntity(null); + this.setAttackTarget(null); + this.aiSit.setSitting(true); + this.setHealth(maxTamedHealth); + this.func_152115_b(par1EntityPlayer.getUniqueID().toString()); + this.playTameEffect(true); + this.worldObj.setEntityState(this, (byte) 7); + } else + { + this.playTameEffect(false); + this.worldObj.setEntityState(this, (byte) 6); + } + } + + return true; + } + + return super.interact(par1EntityPlayer); + } + + + /** + * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on + * the animal type) + */ + public boolean isBreedingItem(ItemStack par1ItemStack) + { + return false; + } + + /** + * Determines whether this wolf is angry or not. + */ + public boolean isAngry() + { + return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; + } + + /** + * Sets whether this wolf is angry or not. + */ + public void setAngry(boolean par1) + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + + if (par1) + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); + } else + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); + } + } + + /** + * Determines if an entity can be despawned, used on idle far away entities + */ + protected boolean canDespawn() + { + return false; + } + + public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) + { + if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) + { + if (par1EntityLivingBase instanceof EntityIceDemon) + { + EntityIceDemon entitywolf = (EntityIceDemon) par1EntityLivingBase; + + if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) + { + return false; + } + } + + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + } else + { + return false; + } + } + /** * Attack the specified entity using a ranged attack. */ diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java index 6429aa2c..e6d9955f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityLowerGuardian.java @@ -1,29 +1,35 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import net.minecraft.entity.EntityAgeable; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.pathfinding.PathNavigateGround; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.*; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntityGhast; +import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; public class EntityLowerGuardian extends EntityDemon { + private static float maxTamedHealth = 50.0F; + private static float maxUntamedHealth = 30.0F; + private int attackTimer; + public EntityLowerGuardian(World par1World) { super(par1World, AlchemicalWizardry.entityLowerGuardianID); this.setSize(0.7F, 1.8F); - ((PathNavigateGround)this.getNavigator()).func_179690_a(true); + this.getNavigator().setAvoidsWater(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0D, true)); this.tasks.addTask(3, this.aiSit); @@ -37,6 +43,7 @@ public class EntityLowerGuardian extends EntityDemon this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false)); this.setAggro(false); this.setTamed(false); + attackTimer = 0; } @Override @@ -45,8 +52,6 @@ public class EntityLowerGuardian extends EntityDemon super.applyEntityAttributes(); //This line affects the speed of the monster this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D); - float maxTamedHealth = 50.0F; - float maxUntamedHealth = 30.0F; //My guess is that this will alter the max health if (this.isTamed()) @@ -58,10 +63,342 @@ public class EntityLowerGuardian extends EntityDemon } } -/* public EntityAgeable createChild(EntityAgeable par1EntityAgeable) + /** + * Returns true if the newer Entity AI code should be run + */ + public boolean isAIEnabled() { - return this.spawnBabyAnimal(par1EntityAgeable); + return true; + } + + /** + * Sets the active target the Task system uses for tracking + */ + public void setAttackTarget(EntityLivingBase par1EntityLivingBase) + { + super.setAttackTarget(par1EntityLivingBase); + + if (par1EntityLivingBase == null) + { + this.setAngry(false); + } else if (!this.isTamed()) + { + this.setAngry(true); + } + } + + /** + * main AI tick function, replaces updateEntityActionState + */ + protected void updateAITick() + { + this.dataWatcher.updateObject(18, this.getHealth()); + } + + protected void entityInit() + { + super.entityInit(); + this.dataWatcher.addObject(18, this.getHealth()); + } + + /** + * Plays step sound at given x, y, z for the entity + */ + protected void playStepSound(int par1, int par2, int par3, int par4) + { + this.playSound("mob.zombie.step", 0.15F, 1.0F); + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) + { + super.writeEntityToNBT(par1NBTTagCompound); + par1NBTTagCompound.setBoolean("Angry", this.isAngry()); + par1NBTTagCompound.setByte("attackTimer", (byte) attackTimer); + par1NBTTagCompound.setBoolean("isAggro", this.isAggro()); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) + { + super.readEntityFromNBT(par1NBTTagCompound); + this.setAngry(par1NBTTagCompound.getBoolean("Angry")); + + attackTimer = par1NBTTagCompound.getByte("attackTimer"); + } + + /** + * Returns the sound this mob makes while it's alive. + */ + protected String getLivingSound() + { + return "none"; + } + + /** + * Returns the sound this mob makes when it is hurt. + */ + protected String getHurtSound() + { + return "mob.irongolem.hit"; + } + + /** + * Returns the sound this mob makes on death. + */ + protected String getDeathSound() + { + return "mob.irongolem.death"; + } + + /** + * Returns the volume for the sounds this mob makes. + */ + protected float getSoundVolume() + { + return 1.0F; + } + + /** + * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons + * use this to react to sunlight and start to burn. + */ + public void onLivingUpdate() + { + super.onLivingUpdate(); + + if (attackTimer > 0) + { + attackTimer--; + } + } + + public int getAttackTimer() + { + return attackTimer; + } + + /** + * Called to update the entity's position/logic. + */ + public void onUpdate() + { + super.onUpdate(); + } + + public float getEyeHeight() + { + return this.height * 0.8F; + } + + /** + * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently + * use in wolves. + */ + public int getVerticalFaceSpeed() + { + return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); + } + + /** + * Called when the entity is attacked. + */ + public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) + { + if (this.isEntityInvulnerable()) + { + return false; + } else + { + Entity entity = par1DamageSource.getEntity(); + this.aiSit.setSitting(false); + + if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) + { + par2 = (par2 + 1.0F) / 2.0F; + } + + return super.attackEntityFrom(par1DamageSource, par2); + } + } + + public boolean attackEntityAsMob(Entity par1Entity) + { + this.attackTimer = 10; + this.worldObj.setEntityState(this, (byte) 4); + boolean flag = par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) (7 + this.rand.nextInt(15))); + + if (flag) + { + par1Entity.motionY += 0.4000000059604645D; + } + + this.playSound("mob.irongolem.throw", 1.0F, 1.0F); + return flag; + } + + public void setTamed(boolean par1) + { + super.setTamed(par1); + + if (par1) + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); + } else + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); + } + } + + /** + * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. + */ + @Override + public boolean interact(EntityPlayer par1EntityPlayer) + { + ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); + + if (this.isTamed()) + { + if (itemstack != null) + { + if (itemstack.getItem() instanceof ItemFood) + { + ItemFood itemfood = (ItemFood) itemstack.getItem(); + + if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < maxTamedHealth) + { + if (!par1EntityPlayer.capabilities.isCreativeMode) + { + --itemstack.stackSize; + } + + this.heal((float) itemfood.func_150905_g(itemstack)); + + if (itemstack.stackSize <= 0) + { + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); + } + + return true; + } + } + } + + if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack)) + { + if (!this.worldObj.isRemote) + { + this.aiSit.setSitting(!this.isSitting()); + this.isJumping = false; + this.setPathToEntity(null); + this.setTarget(null); + this.setAttackTarget(null); + } + + this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); + } + } else if (itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) + { + if (!par1EntityPlayer.capabilities.isCreativeMode) + { + --itemstack.stackSize; + } + + if (itemstack.stackSize <= 0) + { + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); + } + + if (!this.worldObj.isRemote) + { + if (this.rand.nextInt(1) == 0) + { + this.setTamed(true); + this.setPathToEntity(null); + this.setAttackTarget(null); + this.aiSit.setSitting(true); + this.setHealth(maxTamedHealth); + this.func_152115_b(par1EntityPlayer.getUniqueID().toString()); + this.playTameEffect(true); + this.worldObj.setEntityState(this, (byte) 7); + } else + { + this.playTameEffect(false); + this.worldObj.setEntityState(this, (byte) 6); + } + } + + return true; + } + + return super.interact(par1EntityPlayer); + } + + + /** + * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on + * the animal type) + */ + public boolean isBreedingItem(ItemStack par1ItemStack) + { + return false; + } + + /** + * Determines whether this wolf is angry or not. + */ + public boolean isAngry() + { + return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; + } + + /** + * Sets whether this wolf is angry or not. + */ + public void setAngry(boolean par1) + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + + if (par1) + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); + } else + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); + } + } + + /** + * Determines if an entity can be despawned, used on idle far away entities + */ + protected boolean canDespawn() + { + return false; + } + + public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) + { + if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) + { + if (par1EntityLivingBase instanceof EntityLowerGuardian) + { + EntityLowerGuardian entitywolf = (EntityLowerGuardian) par1EntityLivingBase; + + if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) + { + return false; + } + } + + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + } else + { + return false; + } } - I don't know what this method changed to - */ } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java index 4f76dc33..f73ba7c8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShade.java @@ -1,32 +1,37 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.pathfinding.PathNavigateGround; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.*; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntityGhast; +import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; public class EntityShade extends EntityDemon { private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); + private static float maxTamedHealth = 50.0F; + private static float maxUntamedHealth = 100.0F; + public EntityShade(World par1World) { super(par1World, AlchemicalWizardry.entityShadeID); this.setSize(0.8F, 2.0F); - ((PathNavigateGround)this.getNavigator()).func_179690_a(true); + this.getNavigator().setAvoidsWater(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, this.aiSit); this.tasks.addTask(3, new EntityAIAttackOnCollide(this, 1.0D, true)); @@ -53,8 +58,6 @@ public class EntityShade extends EntityDemon super.applyEntityAttributes(); //This line affects the speed of the monster this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D); - float maxTamedHealth = 50.0F; - float maxUntamedHealth = 100.0F; //My guess is that this will alter the max health if (this.isTamed()) @@ -66,6 +69,328 @@ public class EntityShade extends EntityDemon } } + /** + * Returns true if the newer Entity AI code should be run + */ + public boolean isAIEnabled() + { + return true; + } + + /** + * Sets the active target the Task system uses for tracking + */ + public void setAttackTarget(EntityLivingBase par1EntityLivingBase) + { + super.setAttackTarget(par1EntityLivingBase); + + if (par1EntityLivingBase == null) + { + this.setAngry(false); + } else if (!this.isTamed()) + { + this.setAngry(true); + } + } + + /** + * main AI tick function, replaces updateEntityActionState + */ + protected void updateAITick() + { + this.dataWatcher.updateObject(18, this.getHealth()); + } + + protected void entityInit() + { + super.entityInit(); + this.dataWatcher.addObject(18, this.getHealth()); + } + + /** + * Plays step sound at given x, y, z for the entity + */ + protected void playStepSound(int par1, int par2, int par3, int par4) + { + this.playSound("mob.zombie.step", 0.15F, 1.0F); + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) + { + super.writeEntityToNBT(par1NBTTagCompound); + par1NBTTagCompound.setBoolean("Angry", this.isAngry()); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) + { + super.readEntityFromNBT(par1NBTTagCompound); + this.setAngry(par1NBTTagCompound.getBoolean("Angry")); + + this.setCombatTask(); + } + + /** + * Returns the sound this mob makes while it's alive. + */ + protected String getLivingSound() + { + //TODO change sounds + return "none"; + } + + /** + * Returns the sound this mob makes when it is hurt. + */ + protected String getHurtSound() + { + return "none"; + } + + /** + * Returns the sound this mob makes on death. + */ + protected String getDeathSound() + { + return "none"; + } + + /** + * Returns the volume for the sounds this mob makes. + */ + protected float getSoundVolume() + { + return 0.4F; + } + + /** + * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons + * use this to react to sunlight and start to burn. + */ + public void onLivingUpdate() + { + super.onLivingUpdate(); + } + + /** + * Called to update the entity's position/logic. + */ + public void onUpdate() + { + super.onUpdate(); + } + + public float getEyeHeight() + { + return this.height * 0.8F; + } + + /** + * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently + * use in wolves. + */ + public int getVerticalFaceSpeed() + { + return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); + } + + /** + * Called when the entity is attacked. + */ + public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) + { + if (this.isEntityInvulnerable()) + { + return false; + } else + { + Entity entity = par1DamageSource.getEntity(); + this.aiSit.setSitting(false); + + if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) + { + par2 = (par2 + 1.0F) / 2.0F; + } + + return super.attackEntityFrom(par1DamageSource, par2); + } + } + + public boolean attackEntityAsMob(Entity par1Entity) + { + int i = this.isTamed() ? 6 : 7; + return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); + } + + public void setTamed(boolean par1) + { + super.setTamed(par1); + + if (par1) + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); + } else + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); + } + } + + /** + * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. + */ + @Override + public boolean interact(EntityPlayer par1EntityPlayer) + { + ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); + + if (this.isTamed()) + { + if (itemstack != null) + { + if (itemstack.getItem() instanceof ItemFood) + { + ItemFood itemfood = (ItemFood) itemstack.getItem(); + + if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < maxTamedHealth) + { + if (!par1EntityPlayer.capabilities.isCreativeMode) + { + --itemstack.stackSize; + } + + this.heal((float) itemfood.func_150905_g(itemstack)); + + if (itemstack.stackSize <= 0) + { + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); + } + + return true; + } + } + } + + if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack)) + { + if (!this.worldObj.isRemote) + { + this.aiSit.setSitting(!this.isSitting()); + this.isJumping = false; + this.setPathToEntity(null); + this.setTarget(null); + this.setAttackTarget(null); + } + + this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); + } + } else if (itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) + { + if (!par1EntityPlayer.capabilities.isCreativeMode) + { + --itemstack.stackSize; + } + + if (itemstack.stackSize <= 0) + { + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); + } + + if (!this.worldObj.isRemote) + { + if (this.rand.nextInt(1) == 0) + { + this.setTamed(true); + this.setPathToEntity(null); + this.setAttackTarget(null); + this.aiSit.setSitting(true); + this.setHealth(maxTamedHealth); + this.func_152115_b(par1EntityPlayer.getUniqueID().toString()); + this.playTameEffect(true); + this.worldObj.setEntityState(this, (byte) 7); + } else + { + this.playTameEffect(false); + this.worldObj.setEntityState(this, (byte) 6); + } + } + + return true; + } + + return super.interact(par1EntityPlayer); + } + + + /** + * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on + * the animal type) + */ + public boolean isBreedingItem(ItemStack par1ItemStack) + { + return false; + } + + /** + * Determines whether this wolf is angry or not. + */ + public boolean isAngry() + { + return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; + } + + /** + * Sets whether this wolf is angry or not. + */ + public void setAngry(boolean par1) + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + + if (par1) + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); + } else + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); + } + } + + /** + * Determines if an entity can be despawned, used on idle far away entities + */ + protected boolean canDespawn() + { + return false; + } + + public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) + { + if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) + { + if (par1EntityLivingBase instanceof EntityBoulderFist) + { + EntityBoulderFist entitywolf = (EntityBoulderFist) par1EntityLivingBase; + + if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) + { + return false; + } + } + + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + } else + { + return false; + } + } + + /** + * Attack the specified entity using a ranged attack. + */ public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) { HolyProjectile hol = new HolyProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 5, 600); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShadeElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShadeElemental.java index 3e5ed0f3..004fcce4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShadeElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityShadeElemental.java @@ -15,7 +15,6 @@ public class EntityShadeElemental extends EntityElemental implements IMob super(world, AlchemicalWizardry.entityShadeElementalID); } - @Override public void inflictEffectOnEntity(Entity target) { if (target instanceof EntityLivingBase) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java index d8b5da90..0ebeb103 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntitySmallEarthGolem.java @@ -1,35 +1,36 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IRangedAttackMob; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIArrowAttack; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.pathfinding.PathNavigateGround; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.*; +import net.minecraft.entity.ai.*; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntityGhast; +import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackMob { private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 25, 25, 15.0F); private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); + private static float maxTamedHealth = 20.0F; + private static float maxUntamedHealth = 10.0F; + public EntitySmallEarthGolem(World par1World) { super(par1World, AlchemicalWizardry.entitySmallEarthGolemID); this.setSize(0.2F, 1.0F); - ((PathNavigateGround)this.getNavigator()).func_179690_a(true); + this.getNavigator().setAvoidsWater(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, this.aiSit); this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); @@ -55,8 +56,6 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM super.applyEntityAttributes(); //This line affects the speed of the monster this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.40000001192092896D); - float maxTamedHealth = 20.0F; - float maxUntamedHealth = 10.0F; //My guess is that this will alter the max health if (this.isTamed()) @@ -68,7 +67,324 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM } } + /** + * Returns true if the newer Entity AI code should be run + */ + public boolean isAIEnabled() + { + return true; + } + + /** + * Sets the active target the Task system uses for tracking + */ + public void setAttackTarget(EntityLivingBase par1EntityLivingBase) + { + super.setAttackTarget(par1EntityLivingBase); + + if (par1EntityLivingBase == null) + { + this.setAngry(false); + } else if (!this.isTamed()) + { + this.setAngry(true); + } + } + + /** + * main AI tick function, replaces updateEntityActionState + */ + protected void updateAITick() + { + this.dataWatcher.updateObject(18, this.getHealth()); + } + + protected void entityInit() + { + super.entityInit(); + this.dataWatcher.addObject(18, this.getHealth()); + } + + /** + * Plays step sound at given x, y, z for the entity + */ + protected void playStepSound(int par1, int par2, int par3, int par4) + { + this.playSound("mob.zombie.step", 0.15F, 1.0F); + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) + { + super.writeEntityToNBT(par1NBTTagCompound); + par1NBTTagCompound.setBoolean("Angry", this.isAngry()); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) + { + super.readEntityFromNBT(par1NBTTagCompound); + this.setAngry(par1NBTTagCompound.getBoolean("Angry")); + + this.setCombatTask(); + } + + /** + * Returns the sound this mob makes while it's alive. + */ + protected String getLivingSound() + { + return "none"; + } + + /** + * Returns the sound this mob makes when it is hurt. + */ + protected String getHurtSound() + { + return "mob.irongolem.hit"; + } + + /** + * Returns the sound this mob makes on death. + */ + protected String getDeathSound() + { + return "mob.irongolem.death"; + } + + /** + * Returns the volume for the sounds this mob makes. + */ + protected float getSoundVolume() + { + return 0.4F; + } + + /** + * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons + * use this to react to sunlight and start to burn. + */ + public void onLivingUpdate() + { + super.onLivingUpdate(); + } + + /** + * Called to update the entity's position/logic. + */ + public void onUpdate() + { + super.onUpdate(); + } + + public float getEyeHeight() + { + return this.height * 0.8F; + } + + /** + * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently + * use in wolves. + */ + public int getVerticalFaceSpeed() + { + return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); + } + + /** + * Called when the entity is attacked. + */ + public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) + { + if (this.isEntityInvulnerable()) + { + return false; + } else + { + Entity entity = par1DamageSource.getEntity(); + this.aiSit.setSitting(false); + + if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) + { + par2 = (par2 + 1.0F) / 2.0F; + } + + return super.attackEntityFrom(par1DamageSource, par2); + } + } + + public boolean attackEntityAsMob(Entity par1Entity) + { + int i = this.isTamed() ? 4 : 2; + return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); + } + + public void setTamed(boolean par1) + { + super.setTamed(par1); + + if (par1) + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); + } else + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); + } + } + + /** + * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. + */ @Override + public boolean interact(EntityPlayer par1EntityPlayer) + { + ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); + + if (this.isTamed()) + { + if (itemstack != null) + { + if (itemstack.getItem() instanceof ItemFood) + { + ItemFood itemfood = (ItemFood) itemstack.getItem(); + + if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < maxTamedHealth) + { + if (!par1EntityPlayer.capabilities.isCreativeMode) + { + --itemstack.stackSize; + } + + this.heal((float) itemfood.func_150905_g(itemstack)); + + if (itemstack.stackSize <= 0) + { + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); + } + + return true; + } + } + } + + if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack)) + { + if (!this.worldObj.isRemote) + { + this.aiSit.setSitting(!this.isSitting()); + this.isJumping = false; + this.setPathToEntity(null); + this.setTarget(null); + this.setAttackTarget(null); + } + + this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); + } + } else if (itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) + { + if (!par1EntityPlayer.capabilities.isCreativeMode) + { + --itemstack.stackSize; + } + + if (itemstack.stackSize <= 0) + { + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); + } + + if (!this.worldObj.isRemote) + { + if (this.rand.nextInt(1) == 0) + { + this.setTamed(true); + this.setPathToEntity(null); + this.setAttackTarget(null); + this.aiSit.setSitting(true); + this.setHealth(maxTamedHealth); + this.func_152115_b(par1EntityPlayer.getUniqueID().toString()); + this.playTameEffect(true); + this.worldObj.setEntityState(this, (byte) 7); + } else + { + this.playTameEffect(false); + this.worldObj.setEntityState(this, (byte) 6); + } + } + + return true; + } + + return super.interact(par1EntityPlayer); + } + + + /** + * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on + * the animal type) + */ + public boolean isBreedingItem(ItemStack par1ItemStack) + { + return false; + } + + /** + * Determines whether this wolf is angry or not. + */ + public boolean isAngry() + { + return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; + } + + /** + * Sets whether this wolf is angry or not. + */ + public void setAngry(boolean par1) + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + + if (par1) + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); + } else + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); + } + } + + /** + * Determines if an entity can be despawned, used on idle far away entities + */ + protected boolean canDespawn() + { + return false; + } + + public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) + { + if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) + { + if (par1EntityLivingBase instanceof EntitySmallEarthGolem) + { + EntitySmallEarthGolem entitywolf = (EntitySmallEarthGolem) par1EntityLivingBase; + + if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) + { + return false; + } + } + + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + } else + { + return false; + } + } + /** * Attack the specified entity using a ranged attack. */ diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWaterElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWaterElemental.java index 449a1ea2..ab141887 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWaterElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWaterElemental.java @@ -14,7 +14,6 @@ public class EntityWaterElemental extends EntityElemental implements IMob super(world, AlchemicalWizardry.entityWaterElementalID); } - @Override public void inflictEffectOnEntity(Entity target) { if (target instanceof EntityLivingBase) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java index ef2de0c2..02389aac 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/EntityWingedFireDemon.java @@ -1,35 +1,36 @@ package WayofTime.alchemicalWizardry.common.entity.mob; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IRangedAttackMob; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIArrowAttack; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIFollowOwner; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.pathfinding.PathNavigateGround; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.*; +import net.minecraft.entity.ai.*; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntityGhast; +import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackMob { private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 40, 40, 15.0F); private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); + private static float maxTamedHealth = 100.0F; + private static float maxUntamedHealth = 200.0F; + public EntityWingedFireDemon(World par1World) { super(par1World, AlchemicalWizardry.entityWingedFireDemonID); this.setSize(0.7F, 1.8F); - ((PathNavigateGround)this.getNavigator()).func_179690_a(true); + this.getNavigator().setAvoidsWater(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, this.aiSit); this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); @@ -57,8 +58,6 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM super.applyEntityAttributes(); //This line affects the speed of the monster this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D); - float maxTamedHealth = 100.0F; - float maxUntamedHealth = 200.0F; //My guess is that this will alter the max health if (this.isTamed()) @@ -72,13 +71,338 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM //this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D); } + /** + * Returns true if the newer Entity AI code should be run + */ + public boolean isAIEnabled() + { + return true; + } + + /** + * Sets the active target the Task system uses for tracking + */ + public void setAttackTarget(EntityLivingBase par1EntityLivingBase) + { + super.setAttackTarget(par1EntityLivingBase); + + if (par1EntityLivingBase == null) + { + this.setAngry(false); + } else if (!this.isTamed()) + { + this.setAngry(true); + } + } + + /** + * main AI tick function, replaces updateEntityActionState + */ + protected void updateAITick() + { + this.dataWatcher.updateObject(18, this.getHealth()); + } + + protected void entityInit() + { + super.entityInit(); + this.dataWatcher.addObject(18, this.getHealth()); + } + + /** + * Plays step sound at given x, y, z for the entity + */ + protected void playStepSound(int par1, int par2, int par3, int par4) + { + this.playSound("mob.zombie.step", 0.15F, 1.0F); + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) + { + super.writeEntityToNBT(par1NBTTagCompound); + par1NBTTagCompound.setBoolean("Angry", this.isAngry()); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) + { + super.readEntityFromNBT(par1NBTTagCompound); + this.setAngry(par1NBTTagCompound.getBoolean("Angry")); + + this.setCombatTask(); + } + + /** + * Returns the sound this mob makes while it's alive. + */ + protected String getLivingSound() + { + return "mob.blaze.breathe"; + } + + /** + * Returns the sound this mob makes when it is hurt. + */ + protected String getHurtSound() + { + return "mob.blaze.hit"; + } + + /** + * Returns the sound this mob makes on death. + */ + protected String getDeathSound() + { + return "mob.blaze.death"; + } + + /** + * Returns the volume for the sounds this mob makes. + */ + protected float getSoundVolume() + { + return 0.4F; + } + + /** + * Returns the item ID for the item the mob drops on death. + */ + protected int getDropItemId() + { + return -1; + } + + /** + * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons + * use this to react to sunlight and start to burn. + */ + public void onLivingUpdate() + { + super.onLivingUpdate(); + } + + /** + * Called to update the entity's position/logic. + */ + public void onUpdate() + { + super.onUpdate(); + } + + public float getEyeHeight() + { + return this.height * 0.8F; + } + + /** + * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently + * use in wolves. + */ + public int getVerticalFaceSpeed() + { + return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); + } + + /** + * Called when the entity is attacked. + */ + public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) + { + if (this.isEntityInvulnerable()) + { + return false; + } else + { + Entity entity = par1DamageSource.getEntity(); + this.aiSit.setSitting(false); + + if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) + { + par2 = (par2 + 1.0F) / 2.0F; + } + + return super.attackEntityFrom(par1DamageSource, par2); + } + } + + public boolean attackEntityAsMob(Entity par1Entity) + { + int i = this.isTamed() ? 4 : 2; + return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); + } + + public void setTamed(boolean par1) + { + super.setTamed(par1); + + if (par1) + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxTamedHealth); + } else + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxUntamedHealth); + } + } + + /** + * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. + */ @Override + public boolean interact(EntityPlayer par1EntityPlayer) + { + ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); + + if (this.isTamed()) + { + if (itemstack != null) + { + if (itemstack.getItem() instanceof ItemFood) + { + ItemFood itemfood = (ItemFood) itemstack.getItem(); + + if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < maxTamedHealth) + { + if (!par1EntityPlayer.capabilities.isCreativeMode) + { + --itemstack.stackSize; + } + + this.heal((float) itemfood.func_150905_g(itemstack)); + + if (itemstack.stackSize <= 0) + { + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); + } + + return true; + } + } + } + + if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack)) + { + if (!this.worldObj.isRemote) + { + this.aiSit.setSitting(!this.isSitting()); + this.isJumping = false; + this.setPathToEntity(null); + this.setTarget(null); + this.setAttackTarget(null); + } + + this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); + } + } else if (itemstack != null && itemstack.getItem().equals(ModItems.weakBloodOrb) && !this.isAngry()) + { + if (!par1EntityPlayer.capabilities.isCreativeMode) + { + --itemstack.stackSize; + } + + if (itemstack.stackSize <= 0) + { + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null); + } + + if (!this.worldObj.isRemote) + { + if (this.rand.nextInt(1) == 0) + { + this.setTamed(true); + this.setPathToEntity(null); + this.setAttackTarget(null); + this.aiSit.setSitting(true); + this.setHealth(maxTamedHealth); + this.func_152115_b(par1EntityPlayer.getUniqueID().toString()); + this.playTameEffect(true); + this.worldObj.setEntityState(this, (byte) 7); + } else + { + this.playTameEffect(false); + this.worldObj.setEntityState(this, (byte) 6); + } + } + + return true; + } + + return super.interact(par1EntityPlayer); + } + + + /** + * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on + * the animal type) + */ + public boolean isBreedingItem(ItemStack par1ItemStack) + { + return false; + } + + /** + * Determines whether this wolf is angry or not. + */ + public boolean isAngry() + { + return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; + } + + /** + * Sets whether this wolf is angry or not. + */ + public void setAngry(boolean par1) + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + + if (par1) + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 2))); + } else + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -3))); + } + } + + /** + * Determines if an entity can be despawned, used on idle far away entities + */ + protected boolean canDespawn() + { + return false; + } + + public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) + { + if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) + { + if (par1EntityLivingBase instanceof EntityWingedFireDemon) + { + EntityWingedFireDemon entitywolf = (EntityWingedFireDemon) par1EntityLivingBase; + + if (entitywolf.isTamed() && entitywolf.getOwner() == par2EntityLivingBase) + { + return false; + } + } + + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + } else + { + return false; + } + } + /** * Attack the specified entity using a ranged attack. */ public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) { - this.worldObj.playAuxSFXAtEntity(null, 1009, this.getPosition(), 0); + this.worldObj.playAuxSFXAtEntity(null, 1009, (int) this.posX, (int) this.posY, (int) this.posZ, 0); FireProjectile hol = new FireProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 20, 600); this.worldObj.spawnEntityInWorld(hol); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/MailOrderEntityItem.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/MailOrderEntityItem.java index 26ddfa57..bf7f5263 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/MailOrderEntityItem.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/mob/MailOrderEntityItem.java @@ -1,12 +1,15 @@ package WayofTime.alchemicalWizardry.common.entity.mob; +import pneumaticCraft.api.PneumaticRegistry; +import cpw.mods.fml.common.Optional; import net.minecraft.entity.Entity; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import net.minecraftforge.fml.common.Optional; import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.book.BloodMagicGuide; +import amerifrance.guideapi.api.GuideRegistry; public class MailOrderEntityItem extends EntityItem { @@ -28,7 +31,7 @@ public class MailOrderEntityItem extends EntityItem public MailOrderEntityItem(World world, Entity original, ItemStack stack) { this(world, original.posX, original.posY, original.posZ); - this.setDefaultPickupDelay(); + this.delayBeforeCanPickup = 20; this.motionX = original.motionX; this.motionY = original.motionY; this.motionZ = original.motionZ; @@ -54,11 +57,11 @@ public class MailOrderEntityItem extends EntityItem this.deliverItemViaDrone(this.posX, this.posY, this.posZ); }else { -// EntityItem entity = new BookEntityItem(worldObj, this.posX, this.posY, this.posZ, GuideRegistry.getItemStackForBook(BloodMagicGuide.bloodMagicGuide)); -// entity.lifespan = 6000; -// entity.setDefaultPickupDelay(); -// entity.motionY = 1; -// worldObj.spawnEntityInWorld(entity); + EntityItem entity = new BookEntityItem(worldObj, this.posX, this.posY, this.posZ, GuideRegistry.getItemStackForBook(BloodMagicGuide.bloodMagicGuide)); + entity.lifespan = 6000; + entity.delayBeforeCanPickup = 20; + entity.motionY = 1; + worldObj.spawnEntityInWorld(entity); } this.setDead(); @@ -68,6 +71,6 @@ public class MailOrderEntityItem extends EntityItem @Optional.Method(modid = "PneumaticCraft") public void deliverItemViaDrone(double x, double y, double z) { -// PneumaticRegistry.getInstance().deliverItemsAmazonStyle(worldObj, (int)x, (int)y, (int)z, GuideRegistry.getItemStackForBook(BloodMagicGuide.bloodMagicGuide)); + PneumaticRegistry.getInstance().deliverItemsAmazonStyle(worldObj, (int)x, (int)y, (int)z, GuideRegistry.getItemStackForBook(BloodMagicGuide.bloodMagicGuide)); } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java index 57cde54c..3e5e9bfa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EnergyBlastProjectile.java @@ -4,7 +4,6 @@ import java.util.Iterator; import java.util.List; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IProjectile; @@ -13,18 +12,17 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraftforge.fml.common.registry.IThrowableEntity; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.common.registry.IThrowableEntity; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; -//Shamelessly ripped off from x3n0ph0b3 //Shame! +//Shamelessly ripped off from x3n0ph0b3 public class EnergyBlastProjectile extends Entity implements IProjectile, IThrowableEntity { protected int xTile = -1; @@ -39,6 +37,8 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow public EntityLivingBase shootingEntity; protected int ticksInAir = 0; protected int maxTicksInAir = 600; + private int ricochetCounter = 0; + private boolean scheduledForDeath = false; protected int projectileDamage; public EnergyBlastProjectile(World par1World) @@ -53,6 +53,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow super(par1World); this.setSize(0.5F, 0.5F); this.setPosition(par2, par4, par6); + yOffset = 0.0F; this.maxTicksInAir = 600; } @@ -67,6 +68,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow posY -= 0.2D; posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; this.setPosition(posX, posY, posZ); + yOffset = 0.0F; motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); @@ -86,6 +88,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow posY -= 0.2D; posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; this.setPosition(posX, posY, posZ); + yOffset = 0.0F; motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); @@ -101,7 +104,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow this.shootingEntity = par2EntityLivingBase; this.posY = par2EntityLivingBase.posY + (double) par2EntityLivingBase.getEyeHeight() - 0.10000000149011612D; double d0 = par3EntityLivingBase.posX - par2EntityLivingBase.posX; - double d1 = par3EntityLivingBase.getBoundingBox().minY + (double) (par3EntityLivingBase.height / 1.5F) - this.posY; + double d1 = par3EntityLivingBase.boundingBox.minY + (double) (par3EntityLivingBase.height / 1.5F) - this.posY; double d2 = par3EntityLivingBase.posZ - par2EntityLivingBase.posZ; double d3 = (double) MathHelper.sqrt_double(d0 * d0 + d2 * d2); @@ -112,6 +115,8 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow double d4 = d0 / d3; double d5 = d2 / d3; this.setLocationAndAngles(par2EntityLivingBase.posX + d4, this.posY, par2EntityLivingBase.posZ + d5, f2, f3); + this.yOffset = 0.0F; + float f4 = (float) d3 * 0.2F; this.setThrowableHeading(d0, d1, d2, par4, par5); } @@ -150,6 +155,18 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow prevRotationPitch = rotationPitch = (float) (Math.atan2(var3, var10) * 180.0D / Math.PI); } + @Override + @SideOnly(Side.CLIENT) + /** + * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, + * posY, posZ, yaw, pitch + */ + public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) + { + this.setPosition(par1, par3, par5); + this.setRotation(par7, par8); + } + @Override @SideOnly(Side.CLIENT) /** @@ -187,7 +204,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow if (shootingEntity == null) { - List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(posX - 1, posY - 1, posZ - 1, posX + 1, posY + 1, posZ + 1)); + List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(posX - 1, posY - 1, posZ - 1, posX + 1, posY + 1, posZ + 1)); Iterator i = players.iterator(); double closestDistance = Double.MAX_VALUE; EntityPlayer closestPlayer = null; @@ -216,21 +233,28 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow prevRotationPitch = rotationPitch = (float) (Math.atan2(motionY, var1) * 180.0D / Math.PI); } - IBlockState state = worldObj.getBlockState(new BlockPos(xTile, yTile, zTile)); - Block var16 = state.getBlock(); + Block var16 = worldObj.getBlock(xTile, yTile, zTile); if (var16 != null) { - var16.setBlockBoundsBasedOnState(worldObj, new BlockPos(xTile, yTile, zTile)); - AxisAlignedBB var2 = var16.getCollisionBoundingBox(worldObj, new BlockPos(xTile, yTile, zTile), state); + var16.setBlockBoundsBasedOnState(worldObj, xTile, yTile, zTile); + AxisAlignedBB var2 = var16.getCollisionBoundingBoxFromPool(worldObj, xTile, yTile, zTile); - if (var2 != null && var2.isVecInside(new Vec3(posX, posY, posZ))) + if (var2 != null && var2.isVecInside(SpellHelper.createVec3(posX, posY, posZ))) { inGround = true; } } - if (!inGround) + if (inGround) + { + Block var18 = worldObj.getBlock(xTile, yTile, zTile); + int var19 = worldObj.getBlockMetadata(xTile, yTile, zTile); + + if (var18.equals(Block.getBlockById(inTile)) && var19 == inData) + { + } + } else { ++ticksInAir; @@ -242,23 +266,22 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow } } - Vec3 var17 = new Vec3(posX, posY, posZ); - Vec3 var3 = new Vec3(posX + motionX, posY + motionY, posZ + motionZ); - MovingObjectPosition var4 = worldObj.rayTraceBlocks(var17, var3, true, false, false); - var17 = new Vec3(posX, posY, posZ); - var3 = new Vec3(posX + motionX, posY + motionY, posZ + motionZ); + Vec3 var17 = SpellHelper.createVec3(posX, posY, posZ); + Vec3 var3 = SpellHelper.createVec3(posX + motionX, posY + motionY, posZ + motionZ); + MovingObjectPosition var4 = worldObj.func_147447_a(var17, var3, true, false, false); + var17 = SpellHelper.createVec3(posX, posY, posZ); + var3 = SpellHelper.createVec3(posX + motionX, posY + motionY, posZ + motionZ); if (var4 != null) { - var3 = new Vec3(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord); + var3 = SpellHelper.createVec3(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord); } Entity var5 = null; - List var6 = worldObj.getEntitiesWithinAABBExcludingEntity(this, getBoundingBox().addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); + List var6 = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); double var7 = 0.0D; Iterator var9 = var6.iterator(); float var11; - boolean scheduledForDeath = false; while (var9.hasNext()) { @@ -267,7 +290,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow if (var10.canBeCollidedWith() && (var10 != shootingEntity || ticksInAir >= 5)) { var11 = 0.3F; - AxisAlignedBB var12 = var10.getBoundingBox().expand(var11, var11, var11); + AxisAlignedBB var12 = var10.boundingBox.expand(var11, var11, var11); MovingObjectPosition var13 = var12.calculateIntercept(var17, var3); if (var13 != null) @@ -308,8 +331,8 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow public void doFiringParticles() { - worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - worldObj.spawnParticle(EnumParticleTypes.FLAME, posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); + worldObj.spawnParticle("mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + worldObj.spawnParticle("flame", posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); } /** @@ -356,6 +379,20 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow return false; } + @Override + @SideOnly(Side.CLIENT) + public float getShadowSize() + { + return 0.0F; + } + + /** + * Sets the amount of knockback the arrow applies when it hits a mob. + */ + public void setKnockbackStrength(int par1) + { + } + /** * If returns false, the item will not inflict any damage against entities. */ @@ -425,15 +462,20 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow worldObj.createExplosion(shootingEntity, this.posX, this.posY, this.posZ, (float) (0.1), true); } - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); + spawnHitParticles("magicCrit", 8); this.setDead(); } - protected void spawnHitParticles(EnumParticleTypes type, int i) + private int d6() + { + return rand.nextInt(6) + 1; + } + + protected void spawnHitParticles(String string, int i) { for (int particles = 0; particles < i; particles++) { - worldObj.spawnParticle(type, posX, posY - (type == EnumParticleTypes.PORTAL ? 1 : 0), posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); + worldObj.spawnParticle(string, posX, posY - (string == "portal" ? 1 : 0), posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); } } @@ -474,5 +516,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow { if (entity instanceof EntityLivingBase) this.shootingEntity = (EntityLivingBase) entity; + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBeamParticle.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBeamParticle.java new file mode 100644 index 00000000..d4029d91 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBeamParticle.java @@ -0,0 +1,16 @@ +package WayofTime.alchemicalWizardry.common.entity.projectile; + +import net.minecraft.client.particle.EntityFX; +import net.minecraft.world.World; + +public class EntityBeamParticle extends EntityFX +{ + + protected EntityBeamParticle(World p_i1218_1_, double p_i1218_2_, + double p_i1218_4_, double p_i1218_6_) + { + super(p_i1218_1_, p_i1218_2_, p_i1218_4_, p_i1218_6_); + // TODO Auto-generated constructor stub + } + +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java index 4b1665fb..c0490bd8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityBloodLightProjectile.java @@ -1,15 +1,13 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; +import WayofTime.alchemicalWizardry.ModBlocks; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.ModBlocks; + public class EntityBloodLightProjectile extends EnergyBlastProjectile { @@ -57,12 +55,39 @@ public class EntityBloodLightProjectile extends EnergyBlastProjectile this.onImpact(mop.entityHit); } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - EnumFacing facing = mop.field_178784_b; - BlockPos position = mop.func_178782_a().offset(facing); - - if(this.worldObj.isAirBlock(position)) + int sideHit = mop.sideHit; + int blockX = mop.blockX; + int blockY = mop.blockY; + int blockZ = mop.blockZ; + + if (sideHit == 0 && this.worldObj.isAirBlock(blockX, blockY - 1, blockZ)) { - this.worldObj.setBlockState(position, ModBlocks.blockBloodLight.getDefaultState()); + this.worldObj.setBlock(blockX, blockY - 1, blockZ, ModBlocks.blockBloodLight); + } + + if (sideHit == 1 && this.worldObj.isAirBlock(blockX, blockY + 1, blockZ)) + { + this.worldObj.setBlock(blockX, blockY + 1, blockZ, ModBlocks.blockBloodLight); + } + + if (sideHit == 2 && this.worldObj.isAirBlock(blockX, blockY, blockZ - 1)) + { + this.worldObj.setBlock(blockX, blockY, blockZ - 1, ModBlocks.blockBloodLight); + } + + if (sideHit == 3 && this.worldObj.isAirBlock(blockX, blockY, blockZ + 1)) + { + this.worldObj.setBlock(blockX, blockY, blockZ + 1, ModBlocks.blockBloodLight); + } + + if (sideHit == 4 && this.worldObj.isAirBlock(blockX - 1, blockY, blockZ)) + { + this.worldObj.setBlock(blockX - 1, blockY, blockZ, ModBlocks.blockBloodLight); + } + + if (sideHit == 5 && this.worldObj.isAirBlock(blockX + 1, blockY, blockZ)) + { + this.worldObj.setBlock(blockX + 1, blockY, blockZ, ModBlocks.blockBloodLight); } } @@ -85,13 +110,12 @@ public class EntityBloodLightProjectile extends EnergyBlastProjectile } } - BlockPos pos = new BlockPos(this.posX, this.posY, this.posZ); - if (worldObj.isAirBlock(pos)) + if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ)) { - worldObj.setBlockState(pos, Blocks.fire.getDefaultState()); + worldObj.setBlock((int) this.posX, (int) this.posY, (int) this.posZ, Blocks.fire); } - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); + spawnHitParticles("magicCrit", 8); this.setDead(); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java index 55f8b9f0..fbc3fa57 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaMainProjectile.java @@ -3,7 +3,6 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -53,7 +52,7 @@ public class EntityEnergyBazookaMainProjectile extends EnergyBlastProjectile this.onImpact(mop.entityHit); } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - worldObj.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, 5.0f, false); + worldObj.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, (float) (5.0f), false); this.spawnSecondaryProjectiles(); } @@ -74,10 +73,10 @@ public class EntityEnergyBazookaMainProjectile extends EnergyBlastProjectile spawnSecondaryProjectiles(); } - worldObj.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, 5.0f, false); + worldObj.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, (float) (5.0f), false); } - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); + spawnHitParticles("magicCrit", 8); this.setDead(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java index ad105632..617db735 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityEnergyBazookaSecondaryProjectile.java @@ -4,23 +4,20 @@ import java.util.Iterator; import java.util.List; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IProjectile; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectile implements IProjectile { @@ -51,6 +48,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil super(par1World); this.setSize(0.5F, 0.5F); this.setPosition(par2, par4, par6); + yOffset = 0.0F; this.damage = damage; } @@ -65,6 +63,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil posY -= 0.2D; posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; this.setPosition(posX, posY, posZ); + yOffset = 0.0F; motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); @@ -103,6 +102,18 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil prevRotationPitch = rotationPitch = (float) (Math.atan2(var3, var10) * 180.0D / Math.PI); } + @Override + @SideOnly(Side.CLIENT) + /** + * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, + * posY, posZ, yaw, pitch + */ + public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) + { + this.setPosition(par1, par3, par5); + this.setRotation(par7, par8); + } + @Override @SideOnly(Side.CLIENT) /** @@ -140,7 +151,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil if (shootingEntity == null) { - List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(posX - 1, posY - 1, posZ - 1, posX + 1, posY + 1, posZ + 1)); + List players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(posX - 1, posY - 1, posZ - 1, posX + 1, posY + 1, posZ + 1)); Iterator i = players.iterator(); double closestDistance = Double.MAX_VALUE; EntityPlayer closestPlayer = null; @@ -169,21 +180,28 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil prevRotationPitch = rotationPitch = (float) (Math.atan2(motionY, var1) * 180.0D / Math.PI); } - IBlockState state = worldObj.getBlockState(new BlockPos(xTile, yTile, zTile)); - Block var16 = state.getBlock(); + Block var16 = worldObj.getBlock(xTile, yTile, zTile); if (var16 != null) { - var16.setBlockBoundsBasedOnState(worldObj, new BlockPos(xTile, yTile, zTile)); - AxisAlignedBB var2 = var16.getCollisionBoundingBox(worldObj, new BlockPos(xTile, yTile, zTile), state); + var16.setBlockBoundsBasedOnState(worldObj, xTile, yTile, zTile); + AxisAlignedBB var2 = var16.getCollisionBoundingBoxFromPool(worldObj, xTile, yTile, zTile); - if (var2 != null && var2.isVecInside(new Vec3(posX, posY, posZ))) + if (var2 != null && var2.isVecInside(SpellHelper.createVec3(posX, posY, posZ))) { inGround = true; } } - if (!inGround) + if (inGround) + { + Block var18 = worldObj.getBlock(xTile, yTile, zTile); + int var19 = worldObj.getBlockMetadata(xTile, yTile, zTile); + + if (var18.equals(Block.getBlockById(inTile)) && var19 == inData) + { + } + } else { ++ticksInAir; @@ -195,19 +213,19 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil } } - Vec3 var17 = new Vec3(posX, posY, posZ); - Vec3 var3 = new Vec3(posX + motionX, posY + motionY, posZ + motionZ); - MovingObjectPosition var4 = worldObj.rayTraceBlocks(var17, var3, true, false, false); - var17 = new Vec3(posX, posY, posZ); - var3 = new Vec3(posX + motionX, posY + motionY, posZ + motionZ); + Vec3 var17 = SpellHelper.createVec3(posX, posY, posZ); + Vec3 var3 = SpellHelper.createVec3(posX + motionX, posY + motionY, posZ + motionZ); + MovingObjectPosition var4 = worldObj.func_147447_a(var17, var3, true, false, false); + var17 = SpellHelper.createVec3(posX, posY, posZ); + var3 = SpellHelper.createVec3(posX + motionX, posY + motionY, posZ + motionZ); if (var4 != null) { - var3 = new Vec3(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord); + var3 = SpellHelper.createVec3(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord); } Entity var5 = null; - List var6 = worldObj.getEntitiesWithinAABBExcludingEntity(this, getBoundingBox().addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); + List var6 = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D)); double var7 = 0.0D; Iterator var9 = var6.iterator(); float var11; @@ -219,7 +237,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil if (var10.canBeCollidedWith() && (var10 != shootingEntity || ticksInAir >= 5)) { var11 = 0.3F; - AxisAlignedBB var12 = var10.getBoundingBox().expand(var11, var11, var11); + AxisAlignedBB var12 = var10.boundingBox.expand(var11, var11, var11); MovingObjectPosition var13 = var12.calculateIntercept(var17, var3); if (var13 != null) @@ -260,8 +278,8 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil public void doFiringParticles() { - worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - worldObj.spawnParticle(EnumParticleTypes.FLAME, posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); + worldObj.spawnParticle("mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + worldObj.spawnParticle("flame", posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); } /** @@ -302,6 +320,20 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil return false; } + @Override + @SideOnly(Side.CLIENT) + public float getShadowSize() + { + return 0.0F; + } + + /** + * Sets the amount of knockback the arrow applies when it hits a mob. + */ + public void setKnockbackStrength(int par1) + { + } + /** * If returns false, the item will not inflict any damage against entities. */ @@ -311,7 +343,6 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil return false; } - @Override /** * Whether the arrow has a stream of critical hit particles flying behind * it. @@ -329,7 +360,6 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil } } - @Override /** * Whether the arrow has a stream of critical hit particles flying behind * it. @@ -340,7 +370,6 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil return (var1 & 1) != 0; } - @Override public void onImpact(MovingObjectPosition mop) { if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null) @@ -353,12 +382,11 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil this.onImpact(mop.entityHit); } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - this.groundImpact(mop.field_178784_b); + this.groundImpact(mop.sideHit); worldObj.createExplosion(shootingEntity, posX, posY, posZ, 2, false); } } - @Override public void onImpact(Entity mop) { if (mop == shootingEntity && ticksInAir > 3) @@ -371,7 +399,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil worldObj.createExplosion(shootingEntity, posX, posY, posZ, 2, false); } - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); + spawnHitParticles("magicCrit", 8); this.setDead(); } @@ -380,59 +408,60 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil return rand.nextInt(6) + 1; } - @Override - protected void spawnHitParticles(EnumParticleTypes type, int i) + public void spawnHitParticles(String string, int i) { for (int particles = 0; particles < i; particles++) { - worldObj.spawnParticle(type, posX, posY - (type == EnumParticleTypes.PORTAL ? 1 : 0), posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); + worldObj.spawnParticle(string, posX, posY - (string == "portal" ? 1 : 0), posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); } } - @Override public void doDamage(int i, Entity mop) { mop.attackEntityFrom(this.getDamageSource(), i); } - @Override public DamageSource getDamageSource() { return DamageSource.causeMobDamage(shootingEntity); } - public void groundImpact(EnumFacing sideHit) + public void groundImpact(int sideHit) { this.ricochet(sideHit); } - @Override public double smallGauss(double d) { return (worldObj.rand.nextFloat() - 0.5D) * d; } - @Override public double gaussian(double d) { return d + d * ((rand.nextFloat() - 0.5D) / 4); } - private void ricochet(EnumFacing sideHit) - { - if(sideHit.getFrontOffsetX() != 0) + private void ricochet(int sideHit) + { + switch (sideHit) { - motionX *= -1; - } - - if(sideHit.getFrontOffsetY() != 0) - { - motionY *= -1; - } - - if(sideHit.getFrontOffsetZ() != 0) - { - motionZ *= -1; + case 0: + case 1: + // topHit, bottomHit, reflect Y + motionY = motionY * -1; + break; + + case 2: + case 3: + // westHit, eastHit, reflect Z + motionZ = motionZ * -1; + break; + + case 4: + case 5: + // southHit, northHit, reflect X + motionX = motionX * -1; + break; } ricochetCounter++; @@ -443,33 +472,32 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil for (int particles = 0; particles < 4; particles++) { - worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); -// switch (sideHit) -// { -// case 0: -// worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), -gaussian(0.1D), gaussian(0.1D)); -// break; -// -// case 1: -// worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); -// break; -// -// case 2: -// worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), -gaussian(0.1D)); -// break; -// -// case 3: -// worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); -// break; -// -// case 4: -// worldObj.spawnParticle("smoke", posX, posY, posZ, -gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); -// break; -// -// case 5: -// worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); -// break; -// } + switch (sideHit) + { + case 0: + worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), -gaussian(0.1D), gaussian(0.1D)); + break; + + case 1: + worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); + break; + + case 2: + worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), -gaussian(0.1D)); + break; + + case 3: + worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); + break; + + case 4: + worldObj.spawnParticle("smoke", posX, posY, posZ, -gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); + break; + + case 5: + worldObj.spawnParticle("smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D)); + break; + } } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java index 9b234851..2307236c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityMeteor.java @@ -74,7 +74,7 @@ public class EntityMeteor extends EnergyBlastProjectile this.onImpact(mop.entityHit); } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - MeteorRegistry.createMeteorImpact(worldObj, mop.func_178782_a(), this.meteorID, new boolean[]{hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae}); + MeteorRegistry.createMeteorImpact(worldObj, mop.blockX, mop.blockY, mop.blockZ, this.meteorID, new boolean[]{hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae}); } this.setDead(); @@ -83,7 +83,7 @@ public class EntityMeteor extends EnergyBlastProjectile @Override public void onImpact(Entity mop) { - MeteorRegistry.createMeteorImpact(worldObj, this.getPosition(), meteorID, new boolean[]{hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae}); + MeteorRegistry.createMeteorImpact(worldObj, (int) this.posX, (int) this.posY, (int) this.posZ, meteorID, new boolean[]{hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae}); this.setDead(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityParticleBeam.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityParticleBeam.java index 32ac5547..88c92ad2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityParticleBeam.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/EntityParticleBeam.java @@ -1,17 +1,18 @@ package WayofTime.alchemicalWizardry.common.entity.projectile; +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.common.registry.IThrowableEntity; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.particle.EntityCloudFX; +import net.minecraft.client.particle.EntityFX; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IProjectile; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MathHelper; import net.minecraft.world.World; -import net.minecraftforge.fml.common.registry.IThrowableEntity; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; //Shamelessly ripped off from x3n0ph0b3 public class EntityParticleBeam extends Entity implements IProjectile, IThrowableEntity @@ -34,6 +35,7 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl public EntityLivingBase shootingEntity; protected int ticksInAir = 0; protected int maxTicksInAir = 600; + private int ricochetCounter = 0; private boolean scheduledForDeath = false; protected int projectileDamage; @@ -49,6 +51,7 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl super(par1World); this.setSize(0.5F, 0.5F); this.setPosition(par2, par4, par6); + yOffset = 0.0F; this.maxTicksInAir = 600; } @@ -63,6 +66,7 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl posY -= 0.2D; posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; this.setPosition(posX, posY, posZ); + yOffset = 0.0F; motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); @@ -82,6 +86,7 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl posY -= 0.2D; posZ -= MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * 0.16F; this.setPosition(posX, posY, posZ); + yOffset = 0.0F; motionX = -MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionZ = MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI); motionY = -MathHelper.sin(rotationPitch / 180.0F * (float) Math.PI); @@ -97,7 +102,7 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl this.shootingEntity = par2EntityLivingBase; this.posY = par2EntityLivingBase.posY + (double) par2EntityLivingBase.getEyeHeight() - 0.10000000149011612D; double d0 = par3EntityLivingBase.posX - par2EntityLivingBase.posX; - double d1 = par3EntityLivingBase.getBoundingBox().minY + (double) (par3EntityLivingBase.height / 1.5F) - this.posY; + double d1 = par3EntityLivingBase.boundingBox.minY + (double) (par3EntityLivingBase.height / 1.5F) - this.posY; double d2 = par3EntityLivingBase.posZ - par2EntityLivingBase.posZ; double d3 = (double) MathHelper.sqrt_double(d0 * d0 + d2 * d2); @@ -108,6 +113,8 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl double d4 = d0 / d3; double d5 = d2 / d3; this.setLocationAndAngles(par2EntityLivingBase.posX + d4, this.posY, par2EntityLivingBase.posZ + d5, f2, f3); + this.yOffset = 0.0F; + float f4 = (float) d3 * 0.2F; this.setThrowableHeading(d0, d1, d2, par4, par5); } @@ -146,6 +153,18 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl prevRotationPitch = rotationPitch = (float) (Math.atan2(var3, var10) * 180.0D / Math.PI); } + @Override + @SideOnly(Side.CLIENT) + /** + * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, + * posY, posZ, yaw, pitch + */ + public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) + { + this.setPosition(par1, par3, par5); + this.setRotation(par7, par8); + } + @Override @SideOnly(Side.CLIENT) /** @@ -206,11 +225,9 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl { return; } - - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); -// EntityFX particle = new EntityCloudFX(worldObj, posX, posY, posZ, 0, 0, 0); -// particle.setRBGColorF(colourRed + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()), colourGreen + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()), colourBlue + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat())); -// FMLClientHandler.instance().getClient().effectRenderer.addEffect(particle); + EntityFX particle = new EntityCloudFX(worldObj, posX, posY, posZ, 0, 0, 0); + particle.setRBGColorF(colourRed + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()), colourGreen + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()), colourBlue + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat())); + FMLClientHandler.instance().getClient().effectRenderer.addEffect(particle); } /** @@ -265,6 +282,21 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl return false; } + @Override + @SideOnly(Side.CLIENT) + public float getShadowSize() + { + return 0.0F; + } + + protected void spawnHitParticles(String string, int i) + { + for (int particles = 0; particles < i; particles++) + { + worldObj.spawnParticle(string, posX, posY - (string == "portal" ? 1 : 0), posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); + } + } + public DamageSource getDamageSource() { return DamageSource.causeMobDamage(shootingEntity); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/ExplosionProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/ExplosionProjectile.java index 6ab68863..24c6af9b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/ExplosionProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/ExplosionProjectile.java @@ -4,7 +4,6 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -82,15 +81,15 @@ public class ExplosionProjectile extends EnergyBlastProjectile } } - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); + spawnHitParticles("magicCrit", 8); this.setDead(); } @Override public void doFiringParticles() { - worldObj.spawnParticle(EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - worldObj.spawnParticle(EnumParticleTypes.EXPLOSION_LARGE, posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); + worldObj.spawnParticle("mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + worldObj.spawnParticle("explode", posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java index 19b1086a..ba8f3041 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/FireProjectile.java @@ -4,9 +4,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Blocks; import net.minecraft.potion.Potion; -import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -62,10 +60,9 @@ public class FireProjectile extends EnergyBlastProjectile { for (int k = -1; k <= 1; k++) { - BlockPos newPos = new BlockPos(this.posX + i, this.posY + j, this.posZ + k); - if (worldObj.isAirBlock(newPos)) + if (worldObj.isAirBlock((int) this.posX + i, (int) this.posY + j, (int) this.posZ + k)) { - worldObj.setBlockState(newPos, Blocks.fire.getDefaultState()); + worldObj.setBlock((int) this.posX + i, (int) this.posY + j, (int) this.posZ + k, Blocks.fire); } } } @@ -86,12 +83,12 @@ public class FireProjectile extends EnergyBlastProjectile { if (mop instanceof EntityLivingBase) { - mop.setFire(10 * this.projectileDamage); + ((EntityLivingBase) mop).setFire(10 * this.projectileDamage); ((EntityLivingBase) mop).setRevengeTarget(shootingEntity); - if (((EntityLivingBase) mop).isPotionActive(Potion.fireResistance) || mop.isImmuneToFire()) + if (((EntityLivingBase) mop).isPotionActive(Potion.fireResistance) || ((EntityLivingBase) mop).isImmuneToFire()) { - mop.attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); + ((EntityLivingBase) mop).attackEntityFrom(DamageSource.causeMobDamage(shootingEntity), 1); } else { doDamage(projectileDamage, mop); @@ -100,13 +97,12 @@ public class FireProjectile extends EnergyBlastProjectile } } - BlockPos newPos = new BlockPos(this.posX, this.posY, this.posZ); - if (worldObj.isAirBlock(newPos)) + if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ)) { - worldObj.setBlockState(newPos, Blocks.fire.getDefaultState()); + worldObj.setBlock((int) this.posX, (int) this.posY, (int) this.posZ, Blocks.fire); } - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); + spawnHitParticles("magicCrit", 8); this.setDead(); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java index f662ab31..3fc5e2ac 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/HolyProjectile.java @@ -4,7 +4,6 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -52,7 +51,7 @@ public class HolyProjectile extends EnergyBlastProjectile } this.onImpact(mop.entityHit); - } //else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { } @@ -72,7 +71,7 @@ public class HolyProjectile extends EnergyBlastProjectile { if (((EntityLivingBase) mop).isEntityUndead()) { - doDamage(projectileDamage * 2, mop); + doDamage((int) (projectileDamage * 2), mop); } else { doDamage(projectileDamage, mop); @@ -80,14 +79,18 @@ public class HolyProjectile extends EnergyBlastProjectile } } - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); + if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ)) + { + } + + spawnHitParticles("magicCrit", 8); this.setDead(); } @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, posX, posY, posZ, 1.0F, 1.0F, 1.0F); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpell", posX, posY, posZ, 1.0F, 1.0F, 1.0F); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java index 130f88f9..3ba02709 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/IceProjectile.java @@ -5,7 +5,6 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; @@ -54,7 +53,7 @@ public class IceProjectile extends EnergyBlastProjectile } this.onImpact(mop.entityHit); - }// else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { } this.setDead(); @@ -71,9 +70,9 @@ public class IceProjectile extends EnergyBlastProjectile { if (mop instanceof EntityLivingBase) { - if (mop.isImmuneToFire()) + if (((EntityLivingBase) mop).isImmuneToFire()) { - doDamage(projectileDamage * 2, mop); + doDamage((int) (projectileDamage * 2), mop); ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 200, 2)); } else { @@ -83,14 +82,19 @@ public class IceProjectile extends EnergyBlastProjectile } } - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); + if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ)) + { + //worldObj.setBlock((int)this.posX, (int)this.posY, (int)this.posZ,Block.fire.blockID); + } + + spawnHitParticles("magicCrit", 8); this.setDead(); } @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.EXPLOSION_LARGE, posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "explode", posX, posY, posZ, gaussian(motionX), gaussian(motionY), gaussian(motionZ)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java index f936106f..fe521b4c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/LightningBoltProjectile.java @@ -6,7 +6,6 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -84,15 +83,15 @@ public class LightningBoltProjectile extends EnergyBlastProjectile } } - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); + spawnHitParticles("magicCrit", 8); this.setDead(); } @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, posX, posY, posZ, 1.0F, 1.0F, 1.0F); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpell", posX, posY, posZ, 1.0F, 1.0F, 1.0F); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java index 6995f529..cc9cf06c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/MudProjectile.java @@ -7,7 +7,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -60,7 +59,7 @@ public class MudProjectile extends EnergyBlastProjectile } this.onImpact(mop.entityHit); - }// else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { } @@ -88,15 +87,15 @@ public class MudProjectile extends EnergyBlastProjectile } } - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); + spawnHitParticles("magicCrit", 8); this.setDead(); } @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, posX, posY, posZ, 0.5F, 0.297F, 0.0664F); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpell", posX, posY, posZ, 0.5F, 0.297F, 0.0664F); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java index 8b2308b7..48ea1bf5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/TeleportProjectile.java @@ -7,7 +7,6 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; @@ -84,7 +83,7 @@ public class TeleportProjectile extends EnergyBlastProjectile { if (shootingEntity.isRiding()) { - shootingEntity.mountEntity(null); + shootingEntity.mountEntity((Entity) null); } shootingEntity.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ); } @@ -118,7 +117,7 @@ public class TeleportProjectile extends EnergyBlastProjectile { if (shootingEntity.isRiding()) { - shootingEntity.mountEntity(null); + shootingEntity.mountEntity((Entity) null); } shootingEntity.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ); @@ -132,15 +131,15 @@ public class TeleportProjectile extends EnergyBlastProjectile } } - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); + spawnHitParticles("magicCrit", 8); this.setDead(); } @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.PORTAL, posX, posY, posZ, -motionX, -motionY, -motionZ); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "portal", posX, posY, posZ, -motionX, -motionY, -motionZ); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java index 556bddbe..4ec890ff 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WaterProjectile.java @@ -6,7 +6,6 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -49,7 +48,7 @@ public class WaterProjectile extends EnergyBlastProjectile } this.onImpact(mop.entityHit); - }// else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { } @@ -66,7 +65,7 @@ public class WaterProjectile extends EnergyBlastProjectile { if (mop instanceof EntityLivingBase) { - if (mop.isImmuneToFire()) + if (((EntityLivingBase) mop).isImmuneToFire()) { doDamage(projectileDamage * 2, mop); ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 80, 1)); @@ -78,14 +77,14 @@ public class WaterProjectile extends EnergyBlastProjectile } } - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); + spawnHitParticles("magicCrit", 8); this.setDead(); } @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.PORTAL, posX, posY, posZ, -motionX, -motionY, -motionZ); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "portal", posX, posY, posZ, -motionX, -motionY, -motionZ); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java index 6af663b7..fbe86c24 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/entity/projectile/WindGustProjectile.java @@ -4,7 +4,6 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -52,7 +51,7 @@ public class WindGustProjectile extends EnergyBlastProjectile } this.onImpact(mop.entityHit); - }// else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + } else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { } @@ -75,14 +74,14 @@ public class WindGustProjectile extends EnergyBlastProjectile } } - spawnHitParticles(EnumParticleTypes.CRIT_MAGIC, 8); + spawnHitParticles("magicCrit", 8); this.setDead(); } @Override public void doFiringParticles() { - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB_AMBIENT, posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); - SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, posX, posY, posZ, 1.0F, 1.0F, 1.0F); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D); + SpellHelper.sendParticleToAllAround(worldObj, posX, posY, posZ, 30, worldObj.provider.dimensionId, "mobSpell", posX, posY, posZ, 1.0F, 1.0F, 1.0F); } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/guide/RecipeHolder.java b/src/main/java/WayofTime/alchemicalWizardry/common/guide/RecipeHolder.java index 10003173..8bbbaba9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/guide/RecipeHolder.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/guide/RecipeHolder.java @@ -155,7 +155,7 @@ public class RecipeHolder arcanePlinthRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockPlinth)); arcanePedestalRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockPedestal)); - spellTableRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockSpellTable)); + spellTableRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockHomHeart)); alchemySetRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockWritingTable)); crucibleRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockCrucible)); @@ -168,7 +168,7 @@ public class RecipeHolder routerRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemAttunedCrystal)); segmenterRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemTankSegmenter)); cleanserRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemDestinationClearer)); - calcinatorRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockAlchemicalCalcinator)); + calcinatorRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockAlchemicCalcinator)); belljarRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockCrystalBelljar)); relayRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockReagentConduit)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/AgriCraftCropHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/AgriCraftCropHarvestHandler.java new file mode 100644 index 00000000..6ed664b2 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/AgriCraftCropHarvestHandler.java @@ -0,0 +1,83 @@ +package WayofTime.alchemicalWizardry.common.harvest; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; +import cpw.mods.fml.common.registry.GameRegistry; + +public class AgriCraftCropHarvestHandler implements IHarvestHandler +{ + public Block harvestBlock; + public Method isMature; + public Method harvest; + + public AgriCraftCropHarvestHandler() + { + this.harvestBlock = getBlockForString("AgriCraft:crops"); + if(this.harvestBlock != null) + { + try { + Class clazz = Class.forName("com.InfinityRaider.AgriCraft.blocks.BlockCrop"); + if(clazz != null) + { + isMature = clazz.getMethod("isMature", World.class, int.class, int.class, int.class); + harvest = clazz.getMethod("harvest", World.class, int.class, int.class, int.class); + } + } catch (ClassNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (NoSuchMethodException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (SecurityException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + public boolean isHarvesterValid() + { + return harvestBlock != null && isMature != null && harvest != null; + } + + public static Block getBlockForString(String str) + { + String[] parts = str.split(":"); + String modId = parts[0]; + String name = parts[1]; + return GameRegistry.findBlock(modId, name); + } + + public boolean canHandleBlock(Block block) + { + return block == harvestBlock; + } + + @Override + public boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta) + { + if (!this.canHandleBlock(block)) + { + return false; + } + + try { + return (Boolean)(isMature.invoke(block, world, xCoord, yCoord, zCoord)) && (Boolean)(harvest.invoke(block, world, xCoord, yCoord, zCoord)); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalArgumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (InvocationTargetException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + return false; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/BloodMagicHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/BloodMagicHarvestHandler.java index 4703ebaa..3b437fac 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/BloodMagicHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/BloodMagicHarvestHandler.java @@ -3,13 +3,12 @@ package WayofTime.alchemicalWizardry.common.harvest; import java.util.List; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; +import net.minecraft.block.BlockCrops; import net.minecraft.entity.item.EntityItem; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.IPlantable; import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; @@ -23,6 +22,10 @@ public class BloodMagicHarvestHandler implements IHarvestHandler public int getHarvestMeta(Block block) { + if(block instanceof BlockCrops) + { + + } if (block == Blocks.wheat) { return 7; @@ -43,9 +46,9 @@ public class BloodMagicHarvestHandler implements IHarvestHandler } @Override - public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) + public boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta) { - if (!this.canHandleBlock(block) || block.getMetaFromState(state) != this.getHarvestMeta(block)) + if (!this.canHandleBlock(block) || meta != this.getHarvestMeta(block)) { return false; } @@ -59,7 +62,7 @@ public class BloodMagicHarvestHandler implements IHarvestHandler int fortune = 0; - List<ItemStack> list = block.getDrops(world, pos, state, fortune); + List<ItemStack> list = block.getDrops(world, xCoord, yCoord, zCoord, meta, fortune); boolean foundAndRemovedSeed = false; for (ItemStack stack : list) @@ -89,15 +92,16 @@ public class BloodMagicHarvestHandler implements IHarvestHandler if (foundAndRemovedSeed) { - IBlockState plantState = seed.getPlant(world, pos); + int plantMeta = seed.getPlantMetadata(world, xCoord, yCoord, zCoord); + Block plantBlock = seed.getPlant(world, xCoord, yCoord, zCoord); - world.destroyBlock(pos, false); + world.func_147480_a(xCoord, yCoord, zCoord, false); - world.setBlockState(pos, plantState, 3); + world.setBlock(xCoord, yCoord, zCoord, plantBlock, plantMeta, 3); for (ItemStack stack : list) { - EntityItem itemEnt = new EntityItem(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, stack); + EntityItem itemEnt = new EntityItem(world, xCoord, yCoord, zCoord, stack); world.spawnEntityInWorld(itemEnt); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/CactusReedHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/CactusReedHarvestHandler.java index f8c2d7ee..3f948080 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/CactusReedHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/CactusReedHarvestHandler.java @@ -1,11 +1,9 @@ package WayofTime.alchemicalWizardry.common.harvest; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; public class CactusReedHarvestHandler implements IHarvestHandler { @@ -15,19 +13,19 @@ public class CactusReedHarvestHandler implements IHarvestHandler } @Override - public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) + public boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta) { if (!this.canHandleBlock(block)) { return false; } - if (world.getBlockState(pos.offsetDown(1)).getBlock() != block || world.getBlockState(pos.offsetDown(2)).getBlock() != block) + if (world.getBlock(xCoord, yCoord - 1, zCoord) != block || world.getBlock(xCoord, yCoord - 2, zCoord) != block) { return false; } - world.destroyBlock(pos, true); + world.func_147480_a(xCoord, yCoord, zCoord, true); return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericItemStackHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericItemStackHarvestHandler.java index 77837d15..45dee807 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericItemStackHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericItemStackHarvestHandler.java @@ -1,18 +1,17 @@ package WayofTime.alchemicalWizardry.common.harvest; +import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; +import net.minecraft.block.Block; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.common.IPlantable; + import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.IPlantable; -import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; - public class GenericItemStackHarvestHandler implements IHarvestHandler { + public Block harvestBlock; public int harvestMeta; public ItemStack harvestItem; @@ -31,15 +30,15 @@ public class GenericItemStackHarvestHandler implements IHarvestHandler return block == harvestBlock; } - public int getHarvestMeta() + public int getHarvestMeta(Block block) { return harvestMeta; } @Override - public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) + public boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta) { - if (!this.canHandleBlock(block) || block.getMetaFromState(state) != this.getHarvestMeta()) + if (!this.canHandleBlock(block) || meta != this.getHarvestMeta(block)) { return false; } @@ -48,14 +47,14 @@ public class GenericItemStackHarvestHandler implements IHarvestHandler if (seed == null) { - world.destroyBlock(pos, true); + world.func_147480_a(xCoord, yCoord, zCoord, true); return true; } else { int fortune = 0; - List<ItemStack> list = block.getDrops(world, pos, state, fortune); + List<ItemStack> list = block.getDrops(world, xCoord, yCoord, zCoord, meta, fortune); boolean foundAndRemovedSeed = false; for (ItemStack stack : list) @@ -86,15 +85,16 @@ public class GenericItemStackHarvestHandler implements IHarvestHandler if (foundAndRemovedSeed) { - IBlockState plantState = seed.getPlant(world, pos); + int plantMeta = seed.getPlantMetadata(world, xCoord, yCoord, zCoord); + Block plantBlock = seed.getPlant(world, xCoord, yCoord, zCoord); - world.destroyBlock(pos, false); + world.func_147480_a(xCoord, yCoord, zCoord, false); - world.setBlockState(pos, plantState, 3); + world.setBlock(xCoord, yCoord, zCoord, plantBlock, plantMeta, 3); for (ItemStack stack : list) { - EntityItem itemEnt = new EntityItem(world, pos.getX(), pos.getY(), pos.getZ(), stack); + EntityItem itemEnt = new EntityItem(world, xCoord, yCoord, zCoord, stack); world.spawnEntityInWorld(itemEnt); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericPamSeedlessFruitHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericPamSeedlessFruitHarvestHandler.java index 581c6ada..a5d4b036 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericPamSeedlessFruitHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericPamSeedlessFruitHarvestHandler.java @@ -1,69 +1,67 @@ -//package WayofTime.alchemicalWizardry.common.harvest; -// -//import net.minecraft.block.Block; -//import net.minecraft.block.state.IBlockState; -//import net.minecraft.item.Item; -//import net.minecraft.util.BlockPos; -//import net.minecraft.world.World; -//import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; -//import cpw.mods.fml.common.registry.GameRegistry; -// -//public class GenericPamSeedlessFruitHarvestHandler implements IHarvestHandler -//{ -// public Block harvestBlock; -// public int harvestMeta; -// public int resetMeta; -// -// public GenericPamSeedlessFruitHarvestHandler(String block, int harvestMeta, int resetMeta) -// { -// this.harvestBlock = getBlockForString(block); -// this.harvestMeta = harvestMeta; -// this.resetMeta = resetMeta; -// } -// -// public boolean isHarvesterValid() -// { -// return harvestBlock != null; -// } -// -// public static Block getBlockForString(String str) -// { -// String[] parts = str.split(":"); -// String modId = parts[0]; -// String name = parts[1]; -// return GameRegistry.findBlock(modId, name); -// } -// -// public static Item getItemForString(String str) -// { -// String[] parts = str.split(":"); -// String modId = parts[0]; -// String name = parts[1]; -// return GameRegistry.findItem(modId, name); -// } -// -// public boolean canHandleBlock(Block block) -// { -// return block == harvestBlock; -// } -// -// public int getHarvestMeta() -// { -// return harvestMeta; -// } -// -// @Override -// public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) -// { -// if (!this.canHandleBlock(block) || block.getMetaFromState(state) != this.getHarvestMeta()) -// { -// return false; -// } -// -// world.destroyBlock(pos, true); -// -// world.setBlockState(pos, harvestBlock.getStateFromMeta(resetMeta), 3); -// -// return true; -// } -//} +package WayofTime.alchemicalWizardry.common.harvest; + +import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; +import cpw.mods.fml.common.registry.GameRegistry; +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.world.World; + +public class GenericPamSeedlessFruitHarvestHandler implements IHarvestHandler +{ + public Block harvestBlock; + public int harvestMeta; + public int resetMeta; + + public GenericPamSeedlessFruitHarvestHandler(String block, int harvestMeta, int resetMeta) + { + this.harvestBlock = getBlockForString(block); + this.harvestMeta = harvestMeta; + this.resetMeta = resetMeta; + } + + public boolean isHarvesterValid() + { + return harvestBlock != null; + } + + public static Block getBlockForString(String str) + { + String[] parts = str.split(":"); + String modId = parts[0]; + String name = parts[1]; + return GameRegistry.findBlock(modId, name); + } + + public static Item getItemForString(String str) + { + String[] parts = str.split(":"); + String modId = parts[0]; + String name = parts[1]; + return GameRegistry.findItem(modId, name); + } + + public boolean canHandleBlock(Block block) + { + return block == harvestBlock; + } + + public int getHarvestMeta(Block block) + { + return harvestMeta; + } + + @Override + public boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta) + { + if (!this.canHandleBlock(block) || meta != this.getHarvestMeta(block)) + { + return false; + } + + world.func_147480_a(xCoord, yCoord, zCoord, true); + + world.setBlock(xCoord, yCoord, zCoord, harvestBlock, resetMeta, 3); + + return true; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericSeededHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericSeededHarvestHandler.java index ff07bdf0..0fbd69e1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericSeededHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GenericSeededHarvestHandler.java @@ -1,138 +1,137 @@ -//package WayofTime.alchemicalWizardry.common.harvest; -// -//import java.util.List; -// -//import net.minecraft.block.Block; -//import net.minecraft.block.state.IBlockState; -//import net.minecraft.entity.item.EntityItem; -//import net.minecraft.item.Item; -//import net.minecraft.item.ItemStack; -//import net.minecraft.util.BlockPos; -//import net.minecraft.world.World; -//import net.minecraftforge.common.IPlantable; -//import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; -//import cpw.mods.fml.common.registry.GameRegistry; -// -//public class GenericSeededHarvestHandler implements IHarvestHandler -//{ -// public Block harvestBlock; -// public int harvestMeta; -// public IPlantable harvestSeed; -// -// public GenericSeededHarvestHandler(String block, int meta, String seed) -// { -// harvestBlock = getBlockForString(block); -// harvestMeta = meta; -// Item testSeed = getItemForString(seed); -// if (testSeed instanceof IPlantable) -// { -// harvestSeed = (IPlantable) testSeed; -// } else -// { -// harvestSeed = null; -// } -// } -// -// public boolean isHarvesterValid() -// { -// return harvestBlock != null && harvestSeed != null; -// } -// -// public static Block getBlockForString(String str) -// { -// String[] parts = str.split(":"); -// String modId = parts[0]; -// String name = parts[1]; -// return GameRegistry.findBlock(modId, name); -// } -// -// public static Item getItemForString(String str) -// { -// String[] parts = str.split(":"); -// String modId = parts[0]; -// String name = parts[1]; -// return GameRegistry.findItem(modId, name); -// } -// -// public boolean canHandleBlock(Block block) -// { -// return block == harvestBlock; -// } -// -// public int getHarvestMeta() -// { -// return harvestMeta; -// } -// -// @Override -// public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) -// { -// if (!this.canHandleBlock(block) || block.getMetaFromState(state) != this.getHarvestMeta()) -// { -// return false; -// } -// -// IPlantable seed = this.getSeedItem(block); -// -// if (seed == null) -// { -// world.destroyBlock(pos, true); -// -// return true; -// } else -// { -// int fortune = 0; -// -// List<ItemStack> list = block.getDrops(world, pos, state, fortune); -// boolean foundAndRemovedSeed = false; -// -// for (ItemStack stack : list) -// { -// if (stack == null) -// { -// continue; -// } -// -// Item item = stack.getItem(); -// if (item == seed) -// { -// int itemSize = stack.stackSize; -// if (itemSize > 1) -// { -// stack.stackSize--; -// foundAndRemovedSeed = true; -// break; -// } else if (itemSize == 1) -// { -// list.remove(stack); -// foundAndRemovedSeed = true; -// break; -// } -// } -// } -// -// if (foundAndRemovedSeed) -// { -// IBlockState plantState = seed.getPlant(world, pos); -// -// world.destroyBlock(pos, false); -// -// world.setBlockState(pos, plantState, 3); -// -// for (ItemStack stack : list) -// { -// EntityItem itemEnt = new EntityItem(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, stack); -// -// world.spawnEntityInWorld(itemEnt); -// } -// } -// -// return false; -// } -// } -// -// public IPlantable getSeedItem(Block block) -// { -// return harvestSeed; -// } -//} +package WayofTime.alchemicalWizardry.common.harvest; + +import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; +import cpw.mods.fml.common.registry.GameRegistry; +import net.minecraft.block.Block; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.common.IPlantable; + +import java.util.List; + +public class GenericSeededHarvestHandler implements IHarvestHandler +{ + public Block harvestBlock; + public int harvestMeta; + public IPlantable harvestSeed; + + public GenericSeededHarvestHandler(String block, int meta, String seed) + { + harvestBlock = getBlockForString(block); + harvestMeta = meta; + Item testSeed = getItemForString(seed); + if (testSeed instanceof IPlantable) + { + harvestSeed = (IPlantable) testSeed; + } else + { + harvestSeed = null; + } + } + + public boolean isHarvesterValid() + { + return harvestBlock != null && harvestSeed != null; + } + + public static Block getBlockForString(String str) + { + String[] parts = str.split(":"); + String modId = parts[0]; + String name = parts[1]; + return GameRegistry.findBlock(modId, name); + } + + public static Item getItemForString(String str) + { + String[] parts = str.split(":"); + String modId = parts[0]; + String name = parts[1]; + return GameRegistry.findItem(modId, name); + } + + public boolean canHandleBlock(Block block) + { + return block == harvestBlock; + } + + public int getHarvestMeta(Block block) + { + return harvestMeta; + } + + @Override + public boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta) + { + if (!this.canHandleBlock(block) || meta != this.getHarvestMeta(block)) + { + return false; + } + + IPlantable seed = this.getSeedItem(block); + + if (seed == null) + { + world.func_147480_a(xCoord, yCoord, zCoord, true); + + return true; + } else + { + int fortune = 0; + + List<ItemStack> list = block.getDrops(world, xCoord, yCoord, zCoord, meta, fortune); + boolean foundAndRemovedSeed = false; + + for (ItemStack stack : list) + { + if (stack == null) + { + continue; + } + + Item item = stack.getItem(); + if (item == seed) + { + int itemSize = stack.stackSize; + if (itemSize > 1) + { + stack.stackSize--; + foundAndRemovedSeed = true; + break; + } else if (itemSize == 1) + { + list.remove(stack); + foundAndRemovedSeed = true; + break; + } + } + } + + if (foundAndRemovedSeed) + { + int plantMeta = seed.getPlantMetadata(world, xCoord, yCoord, zCoord); + Block plantBlock = seed.getPlant(world, xCoord, yCoord, zCoord); + + world.func_147480_a(xCoord, yCoord, zCoord, false); + + world.setBlock(xCoord, yCoord, zCoord, plantBlock, plantMeta, 3); + + for (ItemStack stack : list) + { + EntityItem itemEnt = new EntityItem(world, xCoord, yCoord, zCoord, stack); + + world.spawnEntityInWorld(itemEnt); + } + } + + return false; + } + } + + public IPlantable getSeedItem(Block block) + { + return harvestSeed; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GourdHarvestHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GourdHarvestHandler.java index 911968d0..485005d4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GourdHarvestHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/GourdHarvestHandler.java @@ -1,11 +1,9 @@ package WayofTime.alchemicalWizardry.common.harvest; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; public class GourdHarvestHandler implements IHarvestHandler { @@ -15,13 +13,13 @@ public class GourdHarvestHandler implements IHarvestHandler } @Override - public boolean harvestAndPlant(World world, BlockPos pos, Block block, IBlockState state) + public boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta) { if (!this.canHandleBlock(block)) { return false; } - world.destroyBlock(pos, true); + world.func_147480_a(xCoord, yCoord, zCoord, true); return true; } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/PamHarvestCompatRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/PamHarvestCompatRegistry.java index d9b9244f..30b4df24 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/harvest/PamHarvestCompatRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/harvest/PamHarvestCompatRegistry.java @@ -1,125 +1,125 @@ -//package WayofTime.alchemicalWizardry.common.harvest; -// -//import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; -// -//public class PamHarvestCompatRegistry -//{ -// public static void registerPamHandlers() -// { -// registerSeededHandler("blackberry", 7); -// registerSeededHandler("blueberry", 7); -// registerSeededHandler("candleberry", 7); -// registerSeededHandler("raspberry", 7); -// registerSeededHandler("strawberry", 7); -// registerSeededHandler("cactusfruit", 7); -// registerSeededHandler("asparagus", 7); -// registerSeededHandler("barley", 7); -// registerSeededHandler("oats", 7); -// registerSeededHandler("rye", 7); -// registerSeededHandler("corn", 7); -// registerSeededHandler("bambooshoot", 7); -// registerSeededHandler("cantaloupe", 7); -// registerSeededHandler("cucumber", 7); -// registerSeededHandler("windersquash", 7); -// registerSeededHandler("zucchini", 7); -// registerSeededHandler("beat", 7); -// registerSeededHandler("onion", 7); -// registerSeededHandler("parsnip", 7); -// registerSeededHandler("peanut", 7); -// registerSeededHandler("radish", 7); -// registerSeededHandler("rutabaga", 7); -// registerSeededHandler("sweetpotato", 7); -// registerSeededHandler("turnip", 7); -// registerSeededHandler("rhubarb", 7); -// registerSeededHandler("celery", 7); -// registerSeededHandler("garlic", 7); -// registerSeededHandler("ginger", 7); -// registerSeededHandler("spiceleaf", 7); -// registerSeededHandler("tealeaf", 7); -// registerSeededHandler("coffeebean", 7); -// registerSeededHandler("mustardseeds", 7); -// registerSeededHandler("brocolli", 7); -// registerSeededHandler("cauliflower", 7); -// registerSeededHandler("leek", 7); -// registerSeededHandler("lettuce", 7); -// registerSeededHandler("scallion", 7); -// registerSeededHandler("artichoke", 7); -// registerSeededHandler("brusselsprout", 7); -// registerSeededHandler("cabbage", 7); -// registerSeededHandler("whitemushroom", 7); -// registerSeededHandler("bean", 7); -// registerSeededHandler("soybean", 7); -// registerSeededHandler("bellpepper", 7); -// registerSeededHandler("chili", 7); -// registerSeededHandler("eggplant", 7); -// registerSeededHandler("pamokra", 7); -// registerSeededHandler("peas", 7); -// registerSeededHandler("tomato", 7); -// registerSeededHandler("cotton", 7); -// registerSeededHandler("pineapple", 7); -// registerSeededHandler("grape", 7); -// registerSeededHandler("kiwi", 7); -// registerSeededHandler("cranberry", 7); -// registerSeededHandler("rice", 7); -// registerSeededHandler("seaweed", 7); -// -// registerFruitHandler("apple", 7, 0); -// registerFruitHandler("Almond", 7, 0); -// registerFruitHandler("Apricot", 7, 0); -// registerFruitHandler("Avocado", 7, 0); -// registerFruitHandler("Banana", 7, 0); -// registerFruitHandler("Cashew", 7, 0); -// registerFruitHandler("Cherry", 7, 0); -// registerFruitHandler("Chestnut", 7, 0); -// registerFruitHandler("Cinnamon", 7, 0); -// registerFruitHandler("Coconut", 7, 0); -// registerFruitHandler("Date", 7, 0); -// registerFruitHandler("Dragonfruit", 7, 0); -// registerFruitHandler("Durian", 7, 0); -// registerFruitHandler("Fig", 7, 0); -// registerFruitHandler("Grapefruit", 7, 0); -// registerFruitHandler("Lemon", 7, 0); -// registerFruitHandler("Lime", 7, 0); -// registerFruitHandler("Maple", 7, 0); -// registerFruitHandler("Mango", 7, 0); -// registerFruitHandler("Nutmeg", 7, 0); -// registerFruitHandler("Olive", 7, 0); -// registerFruitHandler("Orange", 7, 0); -// registerFruitHandler("Papaya", 7, 0); -// registerFruitHandler("Paperbark", 7, 0); -// registerFruitHandler("Peach", 7, 0); -// registerFruitHandler("Pear", 7, 0); -// registerFruitHandler("Pecan", 7, 0); -// registerFruitHandler("Peppercorn", 7, 0); -// registerFruitHandler("Persimmon", 7, 0); -// registerFruitHandler("Pistachio", 7, 0); -// registerFruitHandler("Plum", 7, 0); -// registerFruitHandler("Pomegranate", 7, 0); -// registerFruitHandler("Starfruit", 7, 0); -// registerFruitHandler("Vanillabean", 7, 0); -// registerFruitHandler("Walnut", 7, 0); -// } -// -// public static void registerSeededHandler(String name, int meta) -// { -// String block = "harvestcraft:pam" + name + "Crop"; -// String seed = "harvestcraft:" + name + "Item"; -// -// GenericSeededHarvestHandler handler = new GenericSeededHarvestHandler(block, meta, seed); -// if (handler.isHarvesterValid()) -// { -// HarvestRegistry.registerHarvestHandler(handler); -// } -// } -// -// public static void registerFruitHandler(String name, int harvestMeta, int resetMeta) -// { -// String block = "harvestcraft:pam" + name; -// -// GenericPamSeedlessFruitHarvestHandler handler = new GenericPamSeedlessFruitHarvestHandler(block, harvestMeta, resetMeta); -// if (handler.isHarvesterValid()) -// { -// HarvestRegistry.registerHarvestHandler(handler); -// } -// } -//} +package WayofTime.alchemicalWizardry.common.harvest; + +import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; + +public class PamHarvestCompatRegistry +{ + public static void registerPamHandlers() + { + registerSeededHandler("blackberry", 7); + registerSeededHandler("blueberry", 7); + registerSeededHandler("candleberry", 7); + registerSeededHandler("raspberry", 7); + registerSeededHandler("strawberry", 7); + registerSeededHandler("cactusfruit", 7); + registerSeededHandler("asparagus", 7); + registerSeededHandler("barley", 7); + registerSeededHandler("oats", 7); + registerSeededHandler("rye", 7); + registerSeededHandler("corn", 7); + registerSeededHandler("bambooshoot", 7); + registerSeededHandler("cantaloupe", 7); + registerSeededHandler("cucumber", 7); + registerSeededHandler("windersquash", 7); + registerSeededHandler("zucchini", 7); + registerSeededHandler("beat", 7); + registerSeededHandler("onion", 7); + registerSeededHandler("parsnip", 7); + registerSeededHandler("peanut", 7); + registerSeededHandler("radish", 7); + registerSeededHandler("rutabaga", 7); + registerSeededHandler("sweetpotato", 7); + registerSeededHandler("turnip", 7); + registerSeededHandler("rhubarb", 7); + registerSeededHandler("celery", 7); + registerSeededHandler("garlic", 7); + registerSeededHandler("ginger", 7); + registerSeededHandler("spiceleaf", 7); + registerSeededHandler("tealeaf", 7); + registerSeededHandler("coffeebean", 7); + registerSeededHandler("mustardseeds", 7); + registerSeededHandler("brocolli", 7); + registerSeededHandler("cauliflower", 7); + registerSeededHandler("leek", 7); + registerSeededHandler("lettuce", 7); + registerSeededHandler("scallion", 7); + registerSeededHandler("artichoke", 7); + registerSeededHandler("brusselsprout", 7); + registerSeededHandler("cabbage", 7); + registerSeededHandler("whitemushroom", 7); + registerSeededHandler("bean", 7); + registerSeededHandler("soybean", 7); + registerSeededHandler("bellpepper", 7); + registerSeededHandler("chili", 7); + registerSeededHandler("eggplant", 7); + registerSeededHandler("pamokra", 7); + registerSeededHandler("peas", 7); + registerSeededHandler("tomato", 7); + registerSeededHandler("cotton", 7); + registerSeededHandler("pineapple", 7); + registerSeededHandler("grape", 7); + registerSeededHandler("kiwi", 7); + registerSeededHandler("cranberry", 7); + registerSeededHandler("rice", 7); + registerSeededHandler("seaweed", 7); + + registerFruitHandler("apple", 7, 0); + registerFruitHandler("Almond", 7, 0); + registerFruitHandler("Apricot", 7, 0); + registerFruitHandler("Avocado", 7, 0); + registerFruitHandler("Banana", 7, 0); + registerFruitHandler("Cashew", 7, 0); + registerFruitHandler("Cherry", 7, 0); + registerFruitHandler("Chestnut", 7, 0); + registerFruitHandler("Cinnamon", 7, 0); + registerFruitHandler("Coconut", 7, 0); + registerFruitHandler("Date", 7, 0); + registerFruitHandler("Dragonfruit", 7, 0); + registerFruitHandler("Durian", 7, 0); + registerFruitHandler("Fig", 7, 0); + registerFruitHandler("Grapefruit", 7, 0); + registerFruitHandler("Lemon", 7, 0); + registerFruitHandler("Lime", 7, 0); + registerFruitHandler("Maple", 7, 0); + registerFruitHandler("Mango", 7, 0); + registerFruitHandler("Nutmeg", 7, 0); + registerFruitHandler("Olive", 7, 0); + registerFruitHandler("Orange", 7, 0); + registerFruitHandler("Papaya", 7, 0); + registerFruitHandler("Paperbark", 7, 0); + registerFruitHandler("Peach", 7, 0); + registerFruitHandler("Pear", 7, 0); + registerFruitHandler("Pecan", 7, 0); + registerFruitHandler("Peppercorn", 7, 0); + registerFruitHandler("Persimmon", 7, 0); + registerFruitHandler("Pistachio", 7, 0); + registerFruitHandler("Plum", 7, 0); + registerFruitHandler("Pomegranate", 7, 0); + registerFruitHandler("Starfruit", 7, 0); + registerFruitHandler("Vanillabean", 7, 0); + registerFruitHandler("Walnut", 7, 0); + } + + public static void registerSeededHandler(String name, int meta) + { + String block = "harvestcraft:pam" + name + "Crop"; + String seed = "harvestcraft:" + name + "Item"; + + GenericSeededHarvestHandler handler = new GenericSeededHarvestHandler(block, meta, seed); + if (handler.isHarvesterValid()) + { + HarvestRegistry.registerHarvestHandler(handler); + } + } + + public static void registerFruitHandler(String name, int harvestMeta, int resetMeta) + { + String block = "harvestcraft:pam" + name; + + GenericPamSeedlessFruitHarvestHandler handler = new GenericPamSeedlessFruitHarvestHandler(block, harvestMeta, resetMeta); + if (handler.isHarvesterValid()) + { + HarvestRegistry.registerHarvestHandler(handler); + } + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/AWBaseItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/AWBaseItems.java new file mode 100644 index 00000000..2960e5ee --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/AWBaseItems.java @@ -0,0 +1,45 @@ +package WayofTime.alchemicalWizardry.common.items; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; + +import java.util.List; + +public class AWBaseItems extends Item +{ + public AWBaseItems() + { + super(); + setMaxStackSize(64); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + } + + public void registerIcons(IIconRegister iconRegister) + { + if (this.equals(ModItems.blankSlate)) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BlankSlate"); + } else if (this.equals(ModItems.reinforcedSlate)) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:ReinforcedSlate"); + } else if (this.equals(ModItems.imbuedSlate)) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:InfusedSlate"); + } else if (this.equals(ModItems.demonicSlate)) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DemonSlate"); + } + } + + @Override + public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) + { + par3List.add(StatCollector.translateToLocal("tooltip.infusedstone.desc1")); + par3List.add(StatCollector.translateToLocal("tooltip.infusedstone.desc2")); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java index f38bce26..75354585 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ActivationCrystal.java @@ -1,34 +1,51 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - import org.lwjgl.input.Keyboard; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +import java.util.List; -public class ActivationCrystal extends BindableItems +public class ActivationCrystal extends EnergyItems { - private final String[] ACTIVATION_CRYSTAL_NAMES = new String[]{"weak", "awakened", "creative"}; + private static final String[] ACTIVATION_CRYSTAL_NAMES = new String[]{"Weak", "Awakened", "Creative"}; + + @SideOnly(Side.CLIENT) + private IIcon[] icons; public ActivationCrystal() { super(); this.maxStackSize = 1; setEnergyUsed(100); + this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); this.hasSubtypes = true; } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + icons = new IIcon[ACTIVATION_CRYSTAL_NAMES.length]; + + for (int i = 0; i < ACTIVATION_CRYSTAL_NAMES.length; ++i) + { + icons[i] = iconRegister.registerIcon("AlchemicalWizardry:" + "activationCrystal" + ACTIVATION_CRYSTAL_NAMES[i]); + } + } + @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { @@ -85,7 +102,7 @@ public class ActivationCrystal extends BindableItems @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); + EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); return par1ItemStack; } @@ -99,7 +116,15 @@ public class ActivationCrystal extends BindableItems { //This is what will do all the localisation things on the alchemy components so you dont have to set it :D int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ACTIVATION_CRYSTAL_NAMES.length - 1); - return (getUnlocalizedName() + "_" + ACTIVATION_CRYSTAL_NAMES[meta]); + return ("" + "item.activationCrystal" + ACTIVATION_CRYSTAL_NAMES[meta]); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int meta) + { + int j = MathHelper.clamp_int(meta, 0, ACTIVATION_CRYSTAL_NAMES.length - 1); + return icons[j]; } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/AirScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/AirScribeTool.java index 6934b94d..612ee865 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/AirScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/AirScribeTool.java @@ -1,9 +1,20 @@ package WayofTime.alchemicalWizardry.common.items; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + public class AirScribeTool extends ScribeTool { public AirScribeTool() { super(4); } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:AirScribeTool"); + } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ApprenticeBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ApprenticeBloodOrb.java index bef0d188..ac3aa56c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ApprenticeBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ApprenticeBloodOrb.java @@ -1,10 +1,21 @@ package WayofTime.alchemicalWizardry.common.items; -public class ApprenticeBloodOrb extends Orb +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + +public class ApprenticeBloodOrb extends EnergyBattery { public ApprenticeBloodOrb(int damage) { super(damage); orbLevel = 2; } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:ApprenticeBloodOrb"); + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java index 01a53cd3..065781e3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ArchmageBloodOrb.java @@ -1,10 +1,21 @@ package WayofTime.alchemicalWizardry.common.items; -public class ArchmageBloodOrb extends Orb +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + +public class ArchmageBloodOrb extends EnergyBattery { public ArchmageBloodOrb(int damage) { super(damage); orbLevel = 5; } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:ArchmageBloodOrb"); + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java index 5c9ffbd4..8c3fe83b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ArmourInhibitor.java @@ -1,98 +1,148 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -public class ArmourInhibitor extends BindableItems +import java.util.List; + +public class ArmourInhibitor extends EnergyItems { + @SideOnly(Side.CLIENT) + private IIcon activeIcon; + @SideOnly(Side.CLIENT) + private IIcon passiveIcon; + private int tickDelay = 200; + public ArmourInhibitor() { super(); this.maxStackSize = 1; setEnergyUsed(0); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) + public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { - list.add(StatCollector.translateToLocal("tooltip.armorinhibitor.desc1")); - list.add(StatCollector.translateToLocal("tooltip.armorinhibitor.desc2")); + par3List.add(StatCollector.translateToLocal("tooltip.armorinhibitor.desc1")); + par3List.add(StatCollector.translateToLocal("tooltip.armorinhibitor.desc2")); - if (!(stack.getTagCompound() == null)) + if (!(par1ItemStack.getTagCompound() == null)) { - if (stack.getTagCompound().getBoolean("isActive")) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { - list.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); + par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else { - list.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); + par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); } - list.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + stack.getTagCompound().getString("ownerName")); + par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); } } @Override - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { - int tickDelay = 200; - - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) - { - return stack; - } + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:ArmourInhibitor_deactivated"); + this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:ArmourInhibitor_activated"); + this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:ArmourInhibitor_deactivated"); + } + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) + { if (stack.getTagCompound() == null) { stack.setTagCompound(new NBTTagCompound()); } NBTTagCompound tag = stack.getTagCompound(); + + if (tag.getBoolean("isActive")) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) + { + if (par1 == 1) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + + @Override + public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + { + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + { + return par1ItemStack; + } + + if (par1ItemStack.getTagCompound() == null) + { + par1ItemStack.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound tag = par1ItemStack.getTagCompound(); tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); if (tag.getBoolean("isActive")) { - stack.setItemDamage(1); - tag.setInteger("worldTimeDelay", (int) (world.getWorldTime() - 1) % tickDelay); + par1ItemStack.setItemDamage(1); + tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay); } else { - stack.setItemDamage(stack.getMaxDamage()); + par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); } - return stack; + return par1ItemStack; } @Override - public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) + public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) { - if (!(entity instanceof EntityPlayer)) + if (!(par3Entity instanceof EntityPlayer)) { return; } - EntityPlayer player = (EntityPlayer) entity; + EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; - if (stack.getTagCompound() == null) + if (par1ItemStack.getTagCompound() == null) { - stack.setTagCompound(new NBTTagCompound()); + par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (stack.getTagCompound().getBoolean("isActive")) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { -// if (world.getWorldTime() % tickDelay == stack.getTagCompound().getInteger("worldTimeDelay")) + if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) { } //TODO Do stuff - player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 2, 0, true, false)); + par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 2, 0)); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BaseItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BaseItems.java deleted file mode 100644 index 943734d1..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BaseItems.java +++ /dev/null @@ -1,23 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; - -public class BaseItems extends Item -{ - public BaseItems() - { - super(); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.infusedstone.desc1")); - par3List.add(StatCollector.translateToLocal("tooltip.infusedstone.desc2")); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java index c0cbf1e6..885b7d07 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BlankSpell.java @@ -1,89 +1,100 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellTable; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; -public class BlankSpell extends BindableItems +import java.util.List; + +public class BlankSpell extends EnergyItems { public BlankSpell() { super(); this.setMaxStackSize(1); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { - list.add(StatCollector.translateToLocal("tooltip.blankspell.desc")); + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BlankSpell"); + } - if (!(stack.getTagCompound() == null)) + @Override + public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) + { + par3List.add(StatCollector.translateToLocal("tooltip.blankspell.desc")); + + if (!(par1ItemStack.getTagCompound() == null)) { - NBTTagCompound itemTag = stack.getTagCompound(); + NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - if (!stack.getTagCompound().getString("ownerName").equals("")) + if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) { - list.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + stack.getTagCompound().getString("ownerName")); + par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); } - list.add(StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + itemTag.getInteger("xCoord") + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord")); - list.add(StatCollector.translateToLocal("tooltip.alchemy.dimension") + " " + getDimensionID(stack)); + par3List.add(StatCollector.translateToLocal("tooltip.alchemy.coords") + " " + itemTag.getInteger("xCoord") + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord")); + par3List.add(StatCollector.translateToLocal("tooltip.alchemy.dimension") + " " + getDimensionID(par1ItemStack)); } } @Override - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) + public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { - return stack; + return par1ItemStack; } - if (!world.isRemote) + if (!par2World.isRemote) { - World newWorld = DimensionManager.getWorld(getDimensionID(stack)); + World world = DimensionManager.getWorld(getDimensionID(par1ItemStack)); - if (newWorld != null) + if (world != null) { - NBTTagCompound itemTag = stack.getTagCompound(); - TileEntity tileEntity = newWorld.getTileEntity(new BlockPos(itemTag.getInteger("xCoord"), itemTag.getInteger("yCoord"), itemTag.getInteger("zCoord"))); + NBTTagCompound itemTag = par1ItemStack.getTagCompound(); + TileEntity tileEntity = world.getTileEntity(itemTag.getInteger("xCoord"), itemTag.getInteger("yCoord"), itemTag.getInteger("zCoord")); - if (tileEntity instanceof TESpellTable) + if (tileEntity instanceof TEHomHeart) { - TESpellTable homHeart = (TESpellTable) tileEntity; + TEHomHeart homHeart = (TEHomHeart) tileEntity; - if (homHeart.canCastSpell()) + if (homHeart.canCastSpell(par1ItemStack, par2World, par3EntityPlayer)) { - if(BindableItems.syphonBatteries(stack, player, homHeart.getCostForSpell())) + if(EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, homHeart.getCostForSpell())) { - BindableItems.syphonBatteries(stack, player, homHeart.castSpell(stack, world, player)); + EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, homHeart.castSpell(par1ItemStack, par2World, par3EntityPlayer)); } } else { - return stack; + return par1ItemStack; } } else { - return stack; + return par1ItemStack; } } else { - return stack; + return par1ItemStack; } } else { - return stack; + return par1ItemStack; } - world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - return stack; + par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); + return par1ItemStack; } public int getDimensionID(ItemStack itemStack) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BloodShard.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BloodShard.java index 1c1adf9e..82d93df7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BloodShard.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BloodShard.java @@ -1,17 +1,39 @@ package WayofTime.alchemicalWizardry.common.items; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; public class BloodShard extends Item implements ArmourUpgrade { public BloodShard() { super(); + this.maxStackSize = 64; + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + if (this.equals(ModItems.weakBloodShard)) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WeakBloodShard"); + return; + } + + if (this.equals(ModItems.demonBloodShard)) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DemonBloodShard"); + } } public int getBloodShardLevel() @@ -28,7 +50,9 @@ public class BloodShard extends Item implements ArmourUpgrade } @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {} + public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) + { + } @Override public boolean isUpgrade() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java index cbeefaef..bd32d14d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java @@ -1,10 +1,11 @@ package WayofTime.alchemicalWizardry.common.items; +import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.BlockLeavesBase; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -12,11 +13,11 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemAxe; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; +import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; +import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import net.minecraftforge.common.ForgeHooks; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.common.ItemType; @@ -24,18 +25,26 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import com.google.common.collect.HashMultiset; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BoundAxe extends ItemAxe implements IBindable { public float efficiencyOnProperMaterial = 12.0F; public float damageVsEntity; + @SideOnly(Side.CLIENT) + private IIcon activeIcon; + @SideOnly(Side.CLIENT) + private IIcon passiveIcon; private int energyUsed; public BoundAxe() { super(AlchemicalWizardry.bloodBoundToolMaterial); - setMaxStackSize(1); + this.maxStackSize = 1; this.efficiencyOnProperMaterial = 12.0F; this.damageVsEntity = 5; + setCreativeTab(AlchemicalWizardry.tabBloodMagic); setEnergyUsed(5); } @@ -72,21 +81,54 @@ public class BoundAxe extends ItemAxe implements IBindable } @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World world, EntityPlayer par3EntityPlayer) + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundAxe_activated"); + this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundAxe_activated"); + this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) + { + if (stack.getTagCompound() == null) + { + stack.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound tag = stack.getTagCompound(); + + if (tag.getBoolean("isActive")) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + + @Override + public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + { + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); - par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (world.getWorldTime() - 1) % 200); + par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); return par1ItemStack; } - - if (world.isRemote) + + if (par2World.isRemote) { return par1ItemStack; } - if (!getActivated(par1ItemStack) || SpellHelper.isFakePlayer(world, par3EntityPlayer)) + if (!getActivated(par1ItemStack) || SpellHelper.isFakePlayer(par2World, par3EntityPlayer)) + { + return par1ItemStack; + } + + if (AlchemicalWizardry.disableBoundToolsRightClick) { return par1ItemStack; } @@ -96,12 +138,15 @@ public class BoundAxe extends ItemAxe implements IBindable return par1ItemStack; } - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 10000)) + if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 10000)) { return par1ItemStack; } - BlockPos pos = par3EntityPlayer.getPosition(); + Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer); + int posX = (int) (blockVec.xCoord); + int posY = (int) (blockVec.yCoord); + int posZ = (int) (blockVec.zCoord); boolean silkTouch = EnchantmentHelper.getSilkTouchModifier(par3EntityPlayer); int fortuneLvl = EnchantmentHelper.getFortuneModifier(par3EntityPlayer); @@ -113,22 +158,21 @@ public class BoundAxe extends ItemAxe implements IBindable { for (int k = -5; k <= 5; k++) { - BlockPos newPos = pos.add(i, j, k); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); + Block block = par2World.getBlock(posX + i, posY + j, posZ + k); + int meta = par2World.getBlockMetadata(posX + i, posY + j, posZ + k); if (block != null) { - float str = getStrVsBlock(par1ItemStack, block); + float str = func_150893_a(par1ItemStack, block); - if (str > 1.1f || block instanceof BlockLeavesBase && world.canMineBlockBody(par3EntityPlayer, newPos)) + if (str > 1.1f || block instanceof BlockLeavesBase && par2World.canMineBlock(par3EntityPlayer, posX + i, posY + j, posZ + k)) { - if (silkTouch && block.canSilkHarvest(world, newPos, state, par3EntityPlayer)) + if (silkTouch && block.canSilkHarvest(par2World, par3EntityPlayer, posX + i, posY + j, posZ + k, meta)) { - dropMultiset.add(new ItemType(block, block.getMetaFromState(state))); + dropMultiset.add(new ItemType(block, meta)); } else { - List<ItemStack> itemDropList = block.getDrops(world, newPos, state, fortuneLvl); + ArrayList<ItemStack> itemDropList = block.getDrops(par2World, posX + i, posY + j, posZ + k, meta, fortuneLvl); if (itemDropList != null) { @@ -137,20 +181,20 @@ public class BoundAxe extends ItemAxe implements IBindable } } - world.setBlockToAir(newPos); + par2World.setBlockToAir(posX + i, posY + j, posZ + k); } } } } } - BoundPickaxe.dropMultisetStacks(dropMultiset, world, pos.getX(), pos.getY() + par3EntityPlayer.getEyeHeight(), pos.getZ()); + BoundPickaxe.dropMultisetStacks(dropMultiset, par2World, posX, posY + par3EntityPlayer.getEyeHeight(), posZ); return par1ItemStack; } @Override - public void onUpdate(ItemStack par1ItemStack, World world, Entity par3Entity, int par4, boolean par5) + public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) { if (!(par3Entity instanceof EntityPlayer)) { @@ -163,11 +207,11 @@ public class BoundAxe extends ItemAxe implements IBindable { par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (world.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) + if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 20)) + if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 20)) { this.setActivated(par1ItemStack, false); } @@ -177,14 +221,28 @@ public class BoundAxe extends ItemAxe implements IBindable par1ItemStack.setItemDamage(0); } - public void setActivated(ItemStack stack, boolean newActivated) + public void setActivated(ItemStack par1ItemStack, boolean newActivated) { - stack.setItemDamage(newActivated ? 1 : 0); + NBTTagCompound itemTag = par1ItemStack.getTagCompound(); + + if (itemTag == null) + { + par1ItemStack.setTagCompound(new NBTTagCompound()); + } + + itemTag.setBoolean("isActive", newActivated); } - public boolean getActivated(ItemStack stack) + public boolean getActivated(ItemStack par1ItemStack) { - return stack.getItemDamage() == 1; + if (!par1ItemStack.hasTagCompound()) + { + par1ItemStack.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound itemTag = par1ItemStack.getTagCompound(); + + return itemTag.getBoolean("isActive"); } /** @@ -192,17 +250,16 @@ public class BoundAxe extends ItemAxe implements IBindable * sword */ @Override - public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) + public float func_150893_a(ItemStack par1ItemStack, Block par2Block) { if (!getActivated(par1ItemStack)) { return 0.0F; } - return super.getStrVsBlock(par1ItemStack, par2Block); + return super.func_150893_a(par1ItemStack, par2Block); } - @Override /** * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise * the damage on the stack. @@ -212,13 +269,13 @@ public class BoundAxe extends ItemAxe implements IBindable return getActivated(par1ItemStack); } - public boolean onBlockDestroyed(ItemStack par1ItemStack, World world, Block par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase) + public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, Block par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase) { return true; } - @Override @SideOnly(Side.CLIENT) + /** * Returns True is the item is renderer in full 3D when hold. */ @@ -240,19 +297,19 @@ public class BoundAxe extends ItemAxe implements IBindable * FORGE: Overridden to allow custom tool effectiveness */ @Override - public float getDigSpeed(ItemStack stack, IBlockState state) + public float getDigSpeed(ItemStack stack, Block block, int meta) { if (!getActivated(stack)) { return 0.0F; } - for (String type : getToolClasses(stack)) + if (ForgeHooks.isToolEffective(stack, block, meta)) { - if (state.getBlock().isToolEffective(type, state)) - return efficiencyOnProperMaterial; + return efficiencyOnProperMaterial; } - return super.getDigSpeed(stack, state); + + return func_150893_a(stack, block); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java index 70d8bc36..cae100b1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java @@ -1,9 +1,10 @@ package WayofTime.alchemicalWizardry.common.items; +import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -12,11 +13,11 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; +import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; +import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import net.minecraftforge.common.ForgeHooks; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.common.ItemType; @@ -25,19 +26,27 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import com.google.common.collect.HashMultiset; import com.google.common.collect.Multiset; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BoundPickaxe extends ItemPickaxe implements IBindable { public float efficiencyOnProperMaterial = 12.0F; public float damageVsEntity; + @SideOnly(Side.CLIENT) + private IIcon activeIcon; + @SideOnly(Side.CLIENT) + private IIcon passiveIcon; private int energyUsed; public BoundPickaxe() { super(AlchemicalWizardry.bloodBoundToolMaterial); - setMaxStackSize(1); + this.maxStackSize = 1; this.efficiencyOnProperMaterial = 12.0F; this.damageVsEntity = 5; + setCreativeTab(AlchemicalWizardry.tabBloodMagic); this.setEnergyUsed(5); } @@ -52,14 +61,14 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable } @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) + public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { par3List.add(StatCollector.translateToLocal("tooltip.boundpickaxe.desc1")); par3List.add(StatCollector.translateToLocal("tooltip.boundpickaxe.desc2")); - if (!(stack.getTagCompound() == null)) + if (!(par1ItemStack.getTagCompound() == null)) { - if (stack.getTagCompound().getBoolean("isActive")) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -67,44 +76,80 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated")); } - if (!stack.getTagCompound().getString("ownerName").equals("")) + if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + stack.getTagCompound().getString("ownerName")); + par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); } } } @Override - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer par3EntityPlayer) + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { - if (!BindableItems.checkAndSetItemOwner(stack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundPickaxe_activated"); + this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundPickaxe_activated"); + this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) + { + if (stack.getTagCompound() == null) { - this.setActivated(stack, !getActivated(stack)); - stack.getTagCompound().setInteger("worldTimeDelay", (int) (world.getWorldTime() - 1) % 200); - return stack; - } - - if (world.isRemote) - { - return stack; + stack.setTagCompound(new NBTTagCompound()); } - if (!getActivated(stack) || SpellHelper.isFakePlayer(world, par3EntityPlayer)) + NBTTagCompound tag = stack.getTagCompound(); + + if (tag.getBoolean("isActive")) { - return stack; + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + + @Override + public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + { + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + { + this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); + par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); + return par1ItemStack; + } + + if (par2World.isRemote) + { + return par1ItemStack; + } + + if (!getActivated(par1ItemStack) || SpellHelper.isFakePlayer(par2World, par3EntityPlayer)) + { + return par1ItemStack; + } + + if (AlchemicalWizardry.disableBoundToolsRightClick) + { + return par1ItemStack; } if (par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionInhibit)) { - return stack; + return par1ItemStack; } - if(!BindableItems.syphonBatteries(stack, par3EntityPlayer, 10000)) + if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 10000)) { - return stack; + return par1ItemStack; } - BlockPos pos = par3EntityPlayer.getPosition(); + Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer); + int posX = (int) (blockVec.xCoord); + int posY = (int) (blockVec.yCoord); + int posZ = (int) (blockVec.zCoord); boolean silkTouch = EnchantmentHelper.getSilkTouchModifier(par3EntityPlayer); int fortuneLvl = EnchantmentHelper.getFortuneModifier(par3EntityPlayer); @@ -112,44 +157,43 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable for (int i = -5; i <= 5; i++) { - for (int j = 0; j <= 10; j++) + for (int j = -5; j <= 5; j++) { for (int k = -5; k <= 5; k++) { - BlockPos newPos = pos.add(i, j, k); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); + Block block = par2World.getBlock(posX + i, posY + j, posZ + k); + int meta = par2World.getBlockMetadata(posX + i, posY + j, posZ + k); - if (block != null) + if (block != null && block.getBlockHardness(par2World, posX + i, posY + j, posZ + k) != -1) { - float str = getStrVsBlock(stack, block); + float str = func_150893_a(par1ItemStack, block); - if (str > 1.1f && world.canMineBlockBody(par3EntityPlayer, newPos)) + if (str > 1.1f && par2World.canMineBlock(par3EntityPlayer, posX + i, posY + j, posZ + k)) { - if (silkTouch && block.canSilkHarvest(world, newPos, state, par3EntityPlayer)) + if (silkTouch && block.canSilkHarvest(par2World, par3EntityPlayer, posX + i, posY + j, posZ + k, meta)) { - dropMultiset.add(new ItemType(block, block.getMetaFromState(state))); + dropMultiset.add(new ItemType(block, meta)); } else { - List<ItemStack> itemDropList = block.getDrops(world, newPos, state, fortuneLvl); + ArrayList<ItemStack> itemDropList = block.getDrops(par2World, posX + i, posY + j, posZ + k, meta, fortuneLvl); if (itemDropList != null) { - for (ItemStack stacky : itemDropList) - dropMultiset.add(ItemType.fromStack(stacky), stacky.stackSize); + for (ItemStack stack : itemDropList) + dropMultiset.add(ItemType.fromStack(stack), stack.stackSize); } } - world.setBlockToAir(newPos); + par2World.setBlockToAir(posX + i, posY + j, posZ + k); } } } } } - BoundPickaxe.dropMultisetStacks(dropMultiset, world, pos.getX(), pos.getY() + par3EntityPlayer.getEyeHeight(), pos.getZ()); + dropMultisetStacks(dropMultiset, par2World, posX, posY + par3EntityPlayer.getEyeHeight(), posZ); - return stack; + return par1ItemStack; } public static void dropMultisetStacks(Multiset<ItemType> dropMultiset, World world, double x, double y, double z) @@ -173,7 +217,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable } @Override - public void onUpdate(ItemStack stack, World world, Entity par3Entity, int par4, boolean par5) + public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) { if (!(par3Entity instanceof EntityPlayer)) { @@ -182,33 +226,47 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity; - if (stack.getTagCompound() == null) + if (par1ItemStack.getTagCompound() == null) { - stack.setTagCompound(new NBTTagCompound()); + par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (world.getWorldTime() % 200 == stack.getTagCompound().getInteger("worldTimeDelay") && stack.getTagCompound().getBoolean("isActive")) + if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!BindableItems.syphonBatteries(stack, par3EntityPlayer, 20)) + if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 20)) { - this.setActivated(stack, false); + this.setActivated(par1ItemStack, false); } } } - stack.setItemDamage(0); + par1ItemStack.setItemDamage(0); } - public void setActivated(ItemStack stack, boolean newActivated) + public void setActivated(ItemStack par1ItemStack, boolean newActivated) { - stack.setItemDamage(newActivated ? 1 : 0); + NBTTagCompound itemTag = par1ItemStack.getTagCompound(); + + if (itemTag == null) + { + par1ItemStack.setTagCompound(new NBTTagCompound()); + } + + itemTag.setBoolean("isActive", newActivated); } - public boolean getActivated(ItemStack stack) + public boolean getActivated(ItemStack par1ItemStack) { - return stack.getItemDamage() == 1; + if (!par1ItemStack.hasTagCompound()) + { + par1ItemStack.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound itemTag = par1ItemStack.getTagCompound(); + + return itemTag.getBoolean("isActive"); } /** @@ -216,23 +274,34 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable * sword */ @Override - public float getStrVsBlock(ItemStack stack, Block par2Block) //getStrVsBlock + public float func_150893_a(ItemStack par1ItemStack, Block par2Block) //getStrVsBlock { - if (!getActivated(stack)) + if (!getActivated(par1ItemStack)) { return 0.0F; } - return super.getStrVsBlock(stack, par2Block); + return super.func_150893_a(par1ItemStack, par2Block); } /** * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise * the damage on the stack. */ - public boolean hitEntity(ItemStack stack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) + public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) { - return getActivated(stack); + return getActivated(par1ItemStack); + } + + @Override + public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, Block par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase) + { + + if (par7EntityLivingBase instanceof EntityPlayer) + { + EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par7EntityLivingBase, getEnergyUsed()); + } + return true; } @SideOnly(Side.CLIENT) @@ -258,19 +327,19 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable * FORGE: Overridden to allow custom tool effectiveness */ @Override - public float getDigSpeed(ItemStack stack, IBlockState state) + public float getDigSpeed(ItemStack stack, Block block, int meta) { if (!getActivated(stack)) { return 0.0F; } - for (String type : getToolClasses(stack)) + if (ForgeHooks.isToolEffective(stack, block, meta)) { - if (state.getBlock().isToolEffective(type, state)) - return efficiencyOnProperMaterial; + return efficiencyOnProperMaterial; } - return super.getDigSpeed(stack, state); + + return func_150893_a(stack, block); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java index aaa46ea5..bd70d517 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java @@ -1,41 +1,54 @@ package WayofTime.alchemicalWizardry.common.items; +import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemSpade; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; +import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; +import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import net.minecraftforge.common.ForgeHooks; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.common.ItemType; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import com.google.common.collect.HashMultiset; +import com.google.common.collect.Multimap; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class BoundShovel extends ItemSpade implements IBindable { public float efficiencyOnProperMaterial = 12.0F; public float damageVsEntity; + @SideOnly(Side.CLIENT) + private IIcon activeIcon; + @SideOnly(Side.CLIENT) + private IIcon passiveIcon; + private int energyUsed; public BoundShovel() { super(AlchemicalWizardry.bloodBoundToolMaterial); - setMaxStackSize(1); + this.maxStackSize = 1; this.efficiencyOnProperMaterial = 12.0F; this.damageVsEntity = 5; + setCreativeTab(AlchemicalWizardry.tabBloodMagic); setEnergyUsed(5); } @@ -72,36 +85,72 @@ public class BoundShovel extends ItemSpade implements IBindable } @Override - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer par3EntityPlayer) + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { - if (!BindableItems.checkAndSetItemOwner(stack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundShovel_activated"); + this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundShovel_activated"); + this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) + { + if (stack.getTagCompound() == null) { - this.setActivated(stack, !getActivated(stack)); - stack.getTagCompound().setInteger("worldTimeDelay", (int) (world.getWorldTime() - 1) % 200); - return stack; - } - - if (world.isRemote) - { - return stack; + stack.setTagCompound(new NBTTagCompound()); } - if (!getActivated(stack) || SpellHelper.isFakePlayer(world, par3EntityPlayer)) + NBTTagCompound tag = stack.getTagCompound(); + + if (tag.getBoolean("isActive")) { - return stack; + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + + @Override + public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + { + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + { + this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); + par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); + return par1ItemStack; + } + + if (par2World.isRemote) + { + return par1ItemStack; + } + + if (!getActivated(par1ItemStack) || SpellHelper.isFakePlayer(par2World, par3EntityPlayer)) + { + return par1ItemStack; + } + + if (AlchemicalWizardry.disableBoundToolsRightClick) + { + return par1ItemStack; } if (par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionInhibit)) { - return stack; + return par1ItemStack; } - if(!BindableItems.syphonBatteries(stack, par3EntityPlayer, 10000)) + if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 10000)) { - return stack; + return par1ItemStack; } - BlockPos pos = par3EntityPlayer.getPosition(); + Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer); + int posX = (int) (blockVec.xCoord); + int posY = (int) (blockVec.yCoord); + int posZ = (int) (blockVec.zCoord); boolean silkTouch = EnchantmentHelper.getSilkTouchModifier(par3EntityPlayer); int fortuneLvl = EnchantmentHelper.getFortuneModifier(par3EntityPlayer); @@ -113,40 +162,39 @@ public class BoundShovel extends ItemSpade implements IBindable { for (int k = -5; k <= 5; k++) { - BlockPos newPos = pos.add(i, j, k); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); + Block block = par2World.getBlock(posX + i, posY + j, posZ + k); + int meta = par2World.getBlockMetadata(posX + i, posY + j, posZ + k); if (block != null) { - float str = getStrVsBlock(stack, block); + float str = func_150893_a(par1ItemStack, block); - if (str > 1.1f && world.canMineBlockBody(par3EntityPlayer, newPos)) + if (str > 1.1f && par2World.canMineBlock(par3EntityPlayer, posX + i, posY + j, posZ + k)) { - if (silkTouch && block.canSilkHarvest(world, newPos, state, par3EntityPlayer)) + if (silkTouch && block.canSilkHarvest(par2World, par3EntityPlayer, posX + i, posY + j, posZ + k, meta)) { - dropMultiset.add(new ItemType(block, block.getMetaFromState(state))); + dropMultiset.add(new ItemType(block, meta)); } else { - List<ItemStack> itemDropList = block.getDrops(world, newPos, state, fortuneLvl); + ArrayList<ItemStack> itemDropList = block.getDrops(par2World, posX + i, posY + j, posZ + k, meta, fortuneLvl); if (itemDropList != null) { - for (ItemStack stacky : itemDropList) - dropMultiset.add(ItemType.fromStack(stacky), stacky.stackSize); + for (ItemStack stack : itemDropList) + dropMultiset.add(ItemType.fromStack(stack), stack.stackSize); } } - world.setBlockToAir(newPos); + par2World.setBlockToAir(posX + i, posY + j, posZ + k); } } } } } - BoundPickaxe.dropMultisetStacks(dropMultiset, world, pos.getX(), pos.getY() + par3EntityPlayer.getEyeHeight(), pos.getZ()); - - return stack; + BoundPickaxe.dropMultisetStacks(dropMultiset, par2World, posX, posY + par3EntityPlayer.getEyeHeight(), posZ); + + return par1ItemStack; } @Override @@ -167,7 +215,7 @@ public class BoundShovel extends ItemSpade implements IBindable { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 20)) + if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 20)) { this.setActivated(par1ItemStack, false); } @@ -177,14 +225,28 @@ public class BoundShovel extends ItemSpade implements IBindable par1ItemStack.setItemDamage(0); } - public void setActivated(ItemStack stack, boolean newActivated) + public void setActivated(ItemStack par1ItemStack, boolean newActivated) { - stack.setItemDamage(newActivated ? 1 : 0); + NBTTagCompound itemTag = par1ItemStack.getTagCompound(); + + if (itemTag == null) + { + par1ItemStack.setTagCompound(new NBTTagCompound()); + } + + itemTag.setBoolean("isActive", newActivated); } - public boolean getActivated(ItemStack stack) + public boolean getActivated(ItemStack par1ItemStack) { - return stack.getItemDamage() == 1; + if (!par1ItemStack.hasTagCompound()) + { + par1ItemStack.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound itemTag = par1ItemStack.getTagCompound(); + + return itemTag.getBoolean("isActive"); } /** @@ -192,14 +254,14 @@ public class BoundShovel extends ItemSpade implements IBindable * sword */ @Override - public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) + public float func_150893_a(ItemStack par1ItemStack, Block par2Block) { if (!getActivated(par1ItemStack)) { return 0.0F; } - return super.getStrVsBlock(par1ItemStack, par2Block); + return super.func_150893_a(par1ItemStack, par2Block); } /** @@ -234,23 +296,31 @@ public class BoundShovel extends ItemSpade implements IBindable return 30; } + @Override + public Multimap getItemAttributeModifiers() + { + Multimap multimap = super.getItemAttributeModifiers(); + multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Tool modifier", (double) this.damageVsEntity, 0)); + return multimap; + } + /** * FORGE: Overridden to allow custom tool effectiveness */ @Override - public float getDigSpeed(ItemStack stack, IBlockState state) + public float getDigSpeed(ItemStack stack, Block block, int meta) { if (!getActivated(stack)) { return 0.0F; } - for (String type : getToolClasses(stack)) + if (ForgeHooks.isToolEffective(stack, block, meta)) { - if (state.getBlock().isToolEffective(type, state)) - return efficiencyOnProperMaterial; + return efficiencyOnProperMaterial; } - return super.getDigSpeed(stack, state); + + return func_150893_a(stack, block); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/CheatyItem.java similarity index 58% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeOrb.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/CheatyItem.java index 9fa2cb2c..29a842fa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/CheatyItem.java @@ -1,27 +1,39 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; +import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.server.MinecraftServer; -import net.minecraft.util.EnumParticleTypes; +import net.minecraft.util.DamageSource; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.FakePlayer; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -public class CreativeOrb extends Item implements IBindable +import java.util.List; + +public class CheatyItem extends Item implements IBindable { - public CreativeOrb() + public CheatyItem() { super(); setMaxStackSize(1); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:EnergyBattery"); } @Override @@ -41,7 +53,7 @@ public class CreativeOrb extends Item implements IBindable { World world = par3EntityPlayer.worldObj; - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer instanceof FakePlayer) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer instanceof FakePlayer) { return par1ItemStack; } @@ -52,7 +64,7 @@ public class CreativeOrb extends Item implements IBindable double posY = par3EntityPlayer.posY; double posZ = par3EntityPlayer.posZ; world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.getDimensionId(), 4, posX, posY, posZ); + SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 4, posX, posY, posZ); } if (par3EntityPlayer.worldObj.isRemote) @@ -77,6 +89,54 @@ public class CreativeOrb extends Item implements IBindable return par1ItemStack; } + /* + * @return the damage that was not deducted + */ + public int damageItem(ItemStack par1ItemStack, int par2int) + { + if (par2int == 0) + { + return 0; + } + + int before = this.getDamage(par1ItemStack); + this.setDamage(par1ItemStack, this.getDamage(par1ItemStack) + par2int); + return par2int - (this.getDamage(par1ItemStack) - before); + } + + protected void damagePlayer(World world, EntityPlayer player, int damage) + { + if (world != null) + { + double posX = player.posX; + double posY = player.posY; + double posZ = player.posZ; + world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); + float f = 1.0F; + float f1 = f * 0.6F + 0.4F; + float f2 = f * f * 0.7F - 0.5F; + float f3 = f * f * 0.6F - 0.7F; + + for (int l = 0; l < 8; ++l) + { + world.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); + } + } + + if (!player.capabilities.isCreativeMode) + { + for (int i = 0; i < damage; i++) + { + player.setHealth((player.getHealth() - 1)); + } + } + + if (player.getHealth() <= 0) + { + player.inventory.dropAllItems(); + } + } + @Override public ItemStack getContainerItem(ItemStack itemStack) { @@ -113,6 +173,13 @@ public class CreativeOrb extends Item implements IBindable worldSave.setItemData(owner, data); } - return data.currentEssence; + int currentEssence = data.currentEssence; + return (currentEssence); + } + + @Override + public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemStack) + { + return false; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeDagger.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeDagger.java index f962d785..a3074d2a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeDagger.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/CreativeDagger.java @@ -1,18 +1,17 @@ package WayofTime.alchemicalWizardry.common.items; +import WayofTime.alchemicalWizardry.api.event.SacrificeKnifeUsedEvent; +import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.FakePlayer; -import WayofTime.alchemicalWizardry.api.event.SacrificeKnifeUsedEvent; -import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; @@ -21,7 +20,9 @@ public class CreativeDagger extends Item public CreativeDagger() { super(); + setTextureName("AlchemicalWizardry:SacrificialDagger"); setMaxStackSize(1); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); setFull3D(); } @@ -68,7 +69,7 @@ public class CreativeDagger extends Item for (int l = 0; l < 8; ++l) { - world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); + world.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); } if (!world.isRemote && SpellHelper.isFakePlayer(world, player)) @@ -82,8 +83,10 @@ public class CreativeDagger extends Item public void findAndFillAltar(World world, EntityPlayer player, int amount) { - BlockPos pos = player.getPosition(); - IBloodAltar altarEntity = getAltar(world, pos); + int posX = (int) Math.round(player.posX - 0.5f); + int posY = (int) player.posY; + int posZ = (int) Math.round(player.posZ - 0.5f); + IBloodAltar altarEntity = getAltar(world, posX, posY, posZ); if (altarEntity == null) { @@ -94,7 +97,7 @@ public class CreativeDagger extends Item altarEntity.startCycle(); } - public IBloodAltar getAltar(World world, BlockPos pos) + public IBloodAltar getAltar(World world, int x, int y, int z) { TileEntity tileEntity; @@ -104,8 +107,7 @@ public class CreativeDagger extends Item { for (int k = -2; k <= 1; k++) { - BlockPos newPos = pos.add(i, j, k); - tileEntity = world.getTileEntity(newPos); + tileEntity = world.getTileEntity(i + x, k + y, j + z); if(tileEntity instanceof IBloodAltar) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java index 72140cd4..6e6c84d4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.common.items; import java.util.List; -import java.util.UUID; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeModifier; @@ -17,28 +17,39 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.IDemon; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; import com.google.common.collect.Multimap; -public class DaggerOfSacrifice extends BindableItems +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class DaggerOfSacrifice extends EnergyItems { public DaggerOfSacrifice() { super(); - setMaxStackSize(1); + this.maxStackSize = 1; + setCreativeTab(AlchemicalWizardry.tabBloodMagic); setEnergyUsed(100); setFull3D(); setMaxDamage(100); } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DaggerOfSacrifice"); + } + @Override public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) { @@ -84,7 +95,7 @@ public class DaggerOfSacrifice extends BindableItems for (int i = 0; i < 8; i++) { - SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.getDimensionId(), 1, posX, posY, posZ); + SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 1, posX, posY, posZ); } par2EntityLivingBase.setHealth(-1); @@ -107,7 +118,7 @@ public class DaggerOfSacrifice extends BindableItems } @Override - public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) + public float func_150893_a(ItemStack par1ItemStack, Block par2Block) { if (par2Block == Blocks.web) { @@ -126,17 +137,19 @@ public class DaggerOfSacrifice extends BindableItems } @Override - public Multimap getAttributeModifiers(ItemStack itemStack) + public Multimap getItemAttributeModifiers() { - Multimap multimap = super.getAttributeModifiers(itemStack); - multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(4186465, 46565), "Tool modifier", 1.0d, 0)); + Multimap multimap = super.getItemAttributeModifiers(); + multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Tool modifier", 1.0d, 0)); return multimap; } public boolean findAndNotifyAltarOfDemon(World world, EntityLivingBase sacrifice) { - BlockPos pos = sacrifice.getPosition(); - IBloodAltar altarEntity = this.getAltar(world, pos); + int posX = (int) Math.round(sacrifice.posX - 0.5f); + int posY = (int) sacrifice.posY; + int posZ = (int) Math.round(sacrifice.posZ - 0.5f); + IBloodAltar altarEntity = this.getAltar(world, posX, posY, posZ); if (altarEntity == null) { @@ -150,8 +163,10 @@ public class DaggerOfSacrifice extends BindableItems public boolean findAndFillAltar(World world, EntityLivingBase sacrifice, int amount) { - BlockPos pos = sacrifice.getPosition(); - IBloodAltar altarEntity = this.getAltar(world, pos); + int posX = (int) Math.round(sacrifice.posX - 0.5f); + int posY = (int) sacrifice.posY; + int posZ = (int) Math.round(sacrifice.posZ - 0.5f); + IBloodAltar altarEntity = this.getAltar(world, posX, posY, posZ); if (altarEntity == null) { @@ -163,7 +178,7 @@ public class DaggerOfSacrifice extends BindableItems return true; } - public IBloodAltar getAltar(World world, BlockPos pos) + public IBloodAltar getAltar(World world, int x, int y, int z) { TileEntity tileEntity; @@ -173,8 +188,7 @@ public class DaggerOfSacrifice extends BindableItems { for (int k = -2; k <= 1; k++) { - BlockPos newPos = pos.add(i, j, k); - tileEntity = world.getTileEntity(newPos); + tileEntity = world.getTileEntity(i + x, k + y, j + z); if ((tileEntity instanceof IBloodAltar)) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DawnScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DawnScribeTool.java index f54f5615..a0bda137 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DawnScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DawnScribeTool.java @@ -1,9 +1,20 @@ package WayofTime.alchemicalWizardry.common.items; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + public class DawnScribeTool extends ScribeTool { public DawnScribeTool() { super(6); } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DawnScribeTool"); + } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonCrystal.java deleted file mode 100644 index 504d7527..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonCrystal.java +++ /dev/null @@ -1,167 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items; - -import java.util.List; - -import net.minecraft.block.BlockFence; -import net.minecraft.block.state.IBlockState; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.MathHelper; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; - -public class DemonCrystal extends Item -{ - public DemonCrystal() - { - super(); - this.setHasSubtypes(true); - this.setCreativeTab(CreativeTabs.tabMisc); - setMaxStackSize(1); - } - - /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer - */ - @Override - public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (world.isRemote) - { - return true; - } - else if (!playerIn.func_175151_a(pos.offset(side), side, stack)) - { - return false; - } - else - { - IBlockState iblockstate = world.getBlockState(pos); - - pos = pos.offset(side); - double d0 = 0.0D; - - if (side == EnumFacing.UP && iblockstate instanceof BlockFence) - { - d0 = 0.5D; - } - - String demonName = DemonCrystal.getDemonString(stack); - Entity entity = spawnCreature(world, demonName, (double)pos.getX() + 0.5D, (double)pos.getY() + d0, (double)pos.getZ() + 0.5D, stack); - - if (entity != null) - { - if (entity instanceof EntityLivingBase && stack.hasDisplayName()) - { - entity.setCustomNameTag(stack.getDisplayName()); - } - - if (!playerIn.capabilities.isCreativeMode) - { - --stack.stackSize; - } - } - - return true; - } - } - - /** - * Spawns the creature specified by the egg's type in the location specified by the last three parameters. - * Parameters: world, entityID, x, y, z. - */ - public static Entity spawnCreature(World par0World, String par1, double par2, double par4, double par6, ItemStack itemStack) - { - Entity entity = null; - - for (int j = 0; j < 1; ++j) - { - entity = SummoningRegistry.getEntityWithID(par0World, par1); - - if (entity != null) - { - EntityLiving entityliving = (EntityLiving) entity; - entity.setLocationAndAngles(par2, par4, par6, MathHelper.wrapAngleTo180_float(par0World.rand.nextFloat() * 360.0F), 0.0F); - entityliving.rotationYawHead = entityliving.rotationYaw; - entityliving.renderYawOffset = entityliving.rotationYaw; - if (entityliving instanceof EntityDemon) - { - ((EntityDemon) entityliving).func_152115_b(DemonCrystal.getOwnerName(itemStack)); - - if (!DemonCrystal.getOwnerName(itemStack).equals("")) - { - ((EntityDemon) entityliving).setTamed(true); - } - } - - par0World.spawnEntityInWorld(entity); - entityliving.playLivingSound(); - } - } - return entity; - } - - public static void setOwnerName(ItemStack par1ItemStack, String ownerName) - { - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - par1ItemStack.getTagCompound().setString("ownerName", ownerName); - } - - public static String getOwnerName(ItemStack par1ItemStack) - { - if (par1ItemStack.getTagCompound() == null) - { - par1ItemStack.setTagCompound(new NBTTagCompound()); - } - - return par1ItemStack.getTagCompound().getString("ownerName"); - } - - public static void setDemonString(ItemStack itemStack, String demonName) - { - if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - itemStack.getTagCompound().setString("demonName", demonName); - } - - public static String getDemonString(ItemStack itemStack) - { - if (itemStack.getTagCompound() == null) - { - itemStack.setTagCompound(new NBTTagCompound()); - } - - return itemStack.getTagCompound().getString("demonName"); - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) - { - par3List.add(StatCollector.translateToLocal("tooltip.demonplacer.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) - { - if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) - { - par3List.add(StatCollector.translateToLocal("tooltip.owner.demonsowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java new file mode 100644 index 00000000..eeafc65c --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonPlacer.java @@ -0,0 +1,247 @@ +package WayofTime.alchemicalWizardry.common.items; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityList; +import net.minecraft.entity.EntityList.EntityEggInfo; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.Facing; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class DemonPlacer extends Item +{ + public DemonPlacer() + { + super(); + this.setHasSubtypes(true); + this.setCreativeTab(CreativeTabs.tabMisc); + this.maxStackSize = 1; + } + + @SideOnly(Side.CLIENT) + public int getColorFromItemStack(ItemStack par1ItemStack, int par2) + { + EntityEggInfo entityegginfo = (EntityEggInfo) EntityList.entityEggs.get(Integer.valueOf(par1ItemStack.getItemDamage())); + return entityegginfo != null ? (par2 == 0 ? entityegginfo.primaryColor : entityegginfo.secondaryColor) : 16777215; + } + + /** + * Callback for item usage. If the item does something special on right clicking, he will have one of those. Return + * True if something happen and false if it don't. This is for ITEMS, not BLOCKS + */ + public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) + { + if (par3World.isRemote) + { + return true; + } else + { + Block i1 = par3World.getBlock(par4, par5, par6); + par4 += Facing.offsetsXForSide[par7]; + par5 += Facing.offsetsYForSide[par7]; + par6 += Facing.offsetsZForSide[par7]; + double d0 = 0.0D; + + if (par7 == 1 && i1 != null && i1.getRenderType() == 11) + { + d0 = 0.5D; + } + + String demonName = DemonPlacer.getDemonString(par1ItemStack); + Entity entity = spawnCreature(par3World, demonName, (double) par4 + 0.5D, (double) par5 + d0, (double) par6 + 0.5D, par1ItemStack); + + if (entity != null) + { + if (entity instanceof EntityLivingBase && par1ItemStack.hasDisplayName()) + { + ((EntityLiving) entity).setCustomNameTag(par1ItemStack.getDisplayName()); + } + + + + if (!par2EntityPlayer.capabilities.isCreativeMode) + { + --par1ItemStack.stackSize; + } + } + + return true; + } + } + + /** + * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer + */ + public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + { + if (par2World.isRemote) + { + return par1ItemStack; + } else + { + MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, true); + + if (movingobjectposition == null) + { + return par1ItemStack; + } else + { + if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + { + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + + if (!par2World.canMineBlock(par3EntityPlayer, i, j, k)) + { + return par1ItemStack; + } + + if (!par3EntityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, par1ItemStack)) + { + return par1ItemStack; + } + + if (par2World.getBlock(i, j, k).getMaterial() == Material.water) + { + String demonName = DemonPlacer.getDemonString(par1ItemStack); + Entity entity = spawnCreature(par2World, demonName, (double) i, (double) j, (double) k, par1ItemStack); + + if (entity != null) + { + if (entity instanceof EntityLivingBase && par1ItemStack.hasDisplayName()) + { + ((EntityLiving) entity).setCustomNameTag(par1ItemStack.getDisplayName()); + } + + if (!par3EntityPlayer.capabilities.isCreativeMode) + { + --par1ItemStack.stackSize; + } + } + } + } + + return par1ItemStack; + } + } + } + + /** + * Spawns the creature specified by the egg's type in the location specified by the last three parameters. + * Parameters: world, entityID, x, y, z. + */ + public static Entity spawnCreature(World par0World, String par1, double par2, double par4, double par6, ItemStack itemStack) + { + Entity entity = null; + + for (int j = 0; j < 1; ++j) + { + entity = SummoningRegistry.getEntityWithID(par0World, par1); + + if (entity != null && entity instanceof EntityLivingBase) + { + EntityLiving entityliving = (EntityLiving) entity; + entity.setLocationAndAngles(par2, par4, par6, MathHelper.wrapAngleTo180_float(par0World.rand.nextFloat() * 360.0F), 0.0F); + entityliving.rotationYawHead = entityliving.rotationYaw; + entityliving.renderYawOffset = entityliving.rotationYaw; + if (entityliving instanceof EntityDemon) + { + Entity owner = SpellHelper.getPlayerForUsername(DemonPlacer.getOwnerName(itemStack)); + if(owner != null) + { + ((EntityDemon) entityliving).func_152115_b(owner.getPersistentID().toString()); + + if (!DemonPlacer.getOwnerName(itemStack).equals("")) + { + ((EntityDemon) entityliving).setTamed(true); + } + } + } + + par0World.spawnEntityInWorld(entity); + entityliving.playLivingSound(); + } + } + return entity; + } + + public static void setOwnerName(ItemStack par1ItemStack, String ownerName) + { + if (par1ItemStack.getTagCompound() == null) + { + par1ItemStack.setTagCompound(new NBTTagCompound()); + } + + par1ItemStack.getTagCompound().setString("ownerName", ownerName); + } + + public static String getOwnerName(ItemStack par1ItemStack) + { + if (par1ItemStack.getTagCompound() == null) + { + par1ItemStack.setTagCompound(new NBTTagCompound()); + } + + return par1ItemStack.getTagCompound().getString("ownerName"); + } + + public static void setDemonString(ItemStack itemStack, String demonName) + { + if (itemStack.getTagCompound() == null) + { + itemStack.setTagCompound(new NBTTagCompound()); + } + + itemStack.getTagCompound().setString("demonName", demonName); + } + + public static String getDemonString(ItemStack itemStack) + { + if (itemStack.getTagCompound() == null) + { + itemStack.setTagCompound(new NBTTagCompound()); + } + + return itemStack.getTagCompound().getString("demonName"); + } + + @Override + public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) + { + par3List.add(StatCollector.translateToLocal("tooltip.demonplacer.desc")); + + if (!(par1ItemStack.getTagCompound() == null)) + { + if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) + { + par3List.add(StatCollector.translateToLocal("tooltip.owner.demonsowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); + } + } + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DemonPlacer"); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonicTelepositionFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonicTelepositionFocus.java index c4508bc1..799fc38e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonicTelepositionFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DemonicTelepositionFocus.java @@ -1,12 +1,15 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; +import java.util.List; + public class DemonicTelepositionFocus extends TelepositionFocus { public DemonicTelepositionFocus() @@ -14,6 +17,13 @@ public class DemonicTelepositionFocus extends TelepositionFocus super(4); } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DemonicTeleposerFocus"); + } + @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java index 53db87f3..6de25769 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DuskScribeTool.java @@ -1,9 +1,20 @@ package WayofTime.alchemicalWizardry.common.items; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + public class DuskScribeTool extends ScribeTool { public DuskScribeTool() { super(5); } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DuskScribeTool"); + } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EarthScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EarthScribeTool.java index 9a33f1e8..824d3925 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EarthScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EarthScribeTool.java @@ -1,9 +1,20 @@ package WayofTime.alchemicalWizardry.common.items; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + public class EarthScribeTool extends ScribeTool { public EarthScribeTool() { super(3); } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:EarthScribeTool"); + } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/Orb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java similarity index 83% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/Orb.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java index 42a6a3b1..3f12eb8e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/Orb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBattery.java @@ -1,35 +1,46 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.server.MinecraftServer; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; -public class Orb extends Item implements ArmourUpgrade, IBindable, IBloodOrb +import java.util.List; + +public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBloodOrb { private int maxEssence; protected int orbLevel; - public Orb(int damage) + public EnergyBattery(int damage) { super(); setMaxStackSize(1); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); maxEssence = damage; orbLevel = 1; } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:EnergyBattery"); + } + @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { @@ -40,10 +51,9 @@ public class Orb extends Item implements ArmourUpgrade, IBindable, IBloodOrb } } - @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) { return par1ItemStack; } @@ -56,7 +66,7 @@ public class Orb extends Item implements ArmourUpgrade, IBindable, IBloodOrb double posY = par3EntityPlayer.posY; double posZ = par3EntityPlayer.posZ; world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.getDimensionId(), 4, posX, posY, posZ); + SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 4, posX, posY, posZ); } NBTTagCompound itemTag = par1ItemStack.getTagCompound(); @@ -81,7 +91,7 @@ public class Orb extends Item implements ArmourUpgrade, IBindable, IBloodOrb } SoulNetworkHandler.addCurrentEssenceToMaximum(itemTag.getString("ownerName"), 200, this.getMaxEssence()); - BindableItems.hurtPlayer(par3EntityPlayer, 200); + EnergyItems.hurtPlayer(par3EntityPlayer, 200); return par1ItemStack; } @@ -115,7 +125,7 @@ public class Orb extends Item implements ArmourUpgrade, IBindable, IBloodOrb for (int l = 0; l < 8; ++l) { - world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); + world.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); } } @@ -144,7 +154,9 @@ public class Orb extends Item implements ArmourUpgrade, IBindable, IBloodOrb } @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {} + public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) + { + } @Override public boolean isUpgrade() @@ -198,4 +210,10 @@ public class Orb extends Item implements ArmourUpgrade, IBindable, IBloodOrb return data.currentEssence; } + + @Override + public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemStack) + { + return false; + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java index 13b03ab3..c5fd3364 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBazooka.java @@ -1,36 +1,74 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaMainProjectile; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaMainProjectile; -public class EnergyBazooka extends BindableItems +import java.util.List; + +public class EnergyBazooka extends EnergyItems { + @SideOnly(Side.CLIENT) + private IIcon activeIcon; + @SideOnly(Side.CLIENT) + private IIcon passiveIcon; private int damage; public EnergyBazooka() { super(); setMaxStackSize(1); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); setFull3D(); setMaxDamage(250); this.setEnergyUsed(20000); damage = 12; } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:EnergyBazooka_activated"); + this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:EnergyBazooka_activated"); + this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) + { + if (stack.getTagCompound() == null) + { + stack.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound tag = stack.getTagCompound(); + + if (tag.getBoolean("isActive")) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { final int maxDelay = 150; - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100); @@ -98,7 +136,7 @@ public class EnergyBazooka extends BindableItems { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 50)) + if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 50)) { this.setActivated(par1ItemStack, false); } @@ -130,14 +168,28 @@ public class EnergyBazooka extends BindableItems } } - public void setActivated(ItemStack stack, boolean newActivated) + public void setActivated(ItemStack par1ItemStack, boolean newActivated) { - stack.setItemDamage(newActivated ? 1 : 0); + NBTTagCompound itemTag = par1ItemStack.getTagCompound(); + + if (itemTag == null) + { + par1ItemStack.setTagCompound(new NBTTagCompound()); + } + + itemTag.setBoolean("isActive", newActivated); } - public boolean getActivated(ItemStack stack) + public boolean getActivated(ItemStack par1ItemStack) { - return stack.getItemDamage() == 1; + NBTTagCompound itemTag = par1ItemStack.getTagCompound(); + + if (itemTag == null) + { + par1ItemStack.setTagCompound(new NBTTagCompound()); + } + + return itemTag.getBoolean("isActive"); } public void setDelay(ItemStack par1ItemStack, int newDelay) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlaster.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlast.java similarity index 67% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlaster.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlast.java index 6f896545..03023a79 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlaster.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyBlast.java @@ -1,35 +1,74 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; -public class EnergyBlaster extends BindableItems +import java.util.List; + +public class EnergyBlast extends EnergyItems { + @SideOnly(Side.CLIENT) + private IIcon activeIcon; + @SideOnly(Side.CLIENT) + private IIcon passiveIcon; private int damage; - public EnergyBlaster() + public EnergyBlast() { super(); setMaxStackSize(1); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + setUnlocalizedName("energyBlaster"); setFull3D(); setMaxDamage(250); this.setEnergyUsed(150); damage = 12; } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:EnergyBlaster_activated"); + this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:EnergyBlaster_activated"); + this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) + { + if (stack.getTagCompound() == null) + { + stack.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound tag = stack.getTagCompound(); + + if (tag.getBoolean("isActive")) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { final int maxDelay = 15; - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100); @@ -89,7 +128,7 @@ public class EnergyBlaster extends BindableItems { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 50)) + if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 50)) { this.setActivated(par1ItemStack, false); } @@ -123,14 +162,28 @@ public class EnergyBlaster extends BindableItems } } - public void setActivated(ItemStack stack, boolean newActivated) + public void setActivated(ItemStack par1ItemStack, boolean newActivated) { - stack.setItemDamage(newActivated ? 1 : 0); + NBTTagCompound itemTag = par1ItemStack.getTagCompound(); + + if (itemTag == null) + { + par1ItemStack.setTagCompound(new NBTTagCompound()); + } + + itemTag.setBoolean("isActive", newActivated); } - public boolean getActivated(ItemStack stack) + public boolean getActivated(ItemStack par1ItemStack) { - return stack.getItemDamage() == 1; + NBTTagCompound itemTag = par1ItemStack.getTagCompound(); + + if (itemTag == null) + { + par1ItemStack.setTagCompound(new NBTTagCompound()); + } + + return itemTag.getBoolean("isActive"); } public void setDelay(ItemStack par1ItemStack, int newDelay) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BindableItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java similarity index 87% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/BindableItems.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java index c0d1bcb8..4b0cecaa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BindableItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.common.items; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; @@ -10,17 +11,16 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.server.MinecraftServer; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; -public class BindableItems extends Item implements IBindable +public class EnergyItems extends Item implements IBindable { private int energyUsed; - public BindableItems() + public EnergyItems() { super(); - setMaxStackSize(1); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } protected void setEnergyUsed(int par1int) @@ -47,7 +47,7 @@ public class BindableItems extends Item implements IBindable float f3 = f * f * 0.6F - 0.7F; for (int l = 0; l < 8; ++l) { - world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); + world.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); } } for (int i = 0; i < damage; i++) @@ -76,7 +76,7 @@ public class BindableItems extends Item implements IBindable double posY = player.posY; double posZ = player.posZ; - SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.getDimensionId(), 4, posX, posY, posZ); + SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 4, posX, posY, posZ); world.playSoundEffect((double) ((float) player.posX + 0.5F), (double) ((float) player.posY + 0.5F), (double) ((float) player.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); } } @@ -115,7 +115,6 @@ public class BindableItems extends Item implements IBindable return false; } - @Deprecated public static boolean canSyphonInContainer(ItemStack ist, int damageToBeDone) { if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) @@ -174,7 +173,6 @@ public class BindableItems extends Item implements IBindable } } - @Deprecated public static boolean syphonAndDamageWhileInContainer(ItemStack ist, EntityPlayer player, int damageToBeDone) { if (!syphonWhileInContainer(ist, damageToBeDone)) @@ -224,6 +222,35 @@ public class BindableItems extends Item implements IBindable return item.getTagCompound().getString("ownerName"); } + @Deprecated + public static void drainPlayerNetwork(EntityPlayer player, int damageToBeDone) + { + String ownerName = SpellHelper.getUsername(player); + + if (MinecraftServer.getServer() == null) + { + return; + } + + World world = MinecraftServer.getServer().worldServers[0]; + LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); + + if (data == null) + { + data = new LifeEssenceNetwork(ownerName); + world.setItemData(ownerName, data); + } + + if (data.currentEssence >= damageToBeDone) + { + data.currentEssence -= damageToBeDone; + data.markDirty(); + } else + { + hurtPlayer(player, damageToBeDone); + } + } + @Deprecated public static int getCurrentEssence(String ownerName) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundBlade.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergySword.java similarity index 67% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/BoundBlade.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/EnergySword.java index 90ab85e9..65477341 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundBlade.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergySword.java @@ -4,6 +4,7 @@ import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -13,20 +14,28 @@ import net.minecraft.item.ItemSword; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; -public class BoundBlade extends ItemSword +public class EnergySword extends ItemSword { + @SideOnly(Side.CLIENT) + private IIcon activeIcon; + @SideOnly(Side.CLIENT) + private IIcon passiveIcon; private int energyUsed; - public BoundBlade() + public EnergySword() { super(AlchemicalWizardry.bloodBoundToolMaterial); - setMaxStackSize(1); + this.maxStackSize = 1; + setCreativeTab(AlchemicalWizardry.tabBloodMagic); setEnergyUsed(50); setFull3D(); setMaxDamage(100); @@ -41,6 +50,34 @@ public class BoundBlade extends ItemSword { return this.energyUsed; } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundSword_activated"); + this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundSword_activated"); + this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) + { + if (stack.getTagCompound() == null) + { + stack.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound tag = stack.getTagCompound(); + + if (tag.getBoolean("isActive")) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } private OmegaParadigm getOmegaParadigmOfWeilder(EntityPlayer player) { @@ -71,7 +108,7 @@ public class BoundBlade extends ItemSword { if (par3EntityLivingBase instanceof EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, (EntityPlayer) par3EntityLivingBase) || !BindableItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3EntityLivingBase, this.getEnergyUsed())) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, (EntityPlayer) par3EntityLivingBase) || !EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3EntityLivingBase, this.getEnergyUsed())) { return false; } @@ -84,7 +121,8 @@ public class BoundBlade extends ItemSword @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + super.onItemRightClick(par1ItemStack, par2World, par3EntityPlayer); + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { this.setActivated(par1ItemStack, !getActivated(par1ItemStack)); par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100); @@ -124,7 +162,7 @@ public class BoundBlade extends ItemSword { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 50)) + if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 50)) { this.setActivated(par1ItemStack, false); } @@ -134,14 +172,28 @@ public class BoundBlade extends ItemSword par1ItemStack.setItemDamage(0); } - public void setActivated(ItemStack stack, boolean newActivated) + public void setActivated(ItemStack par1ItemStack, boolean newActivated) { - stack.setItemDamage(newActivated ? 1 : 0); + NBTTagCompound itemTag = par1ItemStack.getTagCompound(); + + if (itemTag == null) + { + par1ItemStack.setTagCompound(new NBTTagCompound()); + } + + itemTag.setBoolean("isActive", newActivated); } - public boolean getActivated(ItemStack stack) + public boolean getActivated(ItemStack par1ItemStack) { - return stack.getItemDamage() == 1; + NBTTagCompound itemTag = par1ItemStack.getTagCompound(); + + if (itemTag == null) + { + par1ItemStack.setTagCompound(new NBTTagCompound()); + } + + return itemTag.getBoolean("isActive"); } public float func_82803_g() @@ -173,7 +225,7 @@ public class BoundBlade extends ItemSword } @Override - public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) + public float func_150893_a(ItemStack par1ItemStack, Block par2Block) { if (par2Block == Blocks.web) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnhancedTelepositionFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnhancedTelepositionFocus.java index 2b4d1a42..165ecda3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnhancedTelepositionFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnhancedTelepositionFocus.java @@ -1,12 +1,15 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; +import java.util.List; + public class EnhancedTelepositionFocus extends TelepositionFocus { public EnhancedTelepositionFocus() @@ -14,6 +17,13 @@ public class EnhancedTelepositionFocus extends TelepositionFocus super(2); } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:EnhancedTeleposerFocus"); + } + @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/FireScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/FireScribeTool.java index 204cb63e..67420fc2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/FireScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/FireScribeTool.java @@ -1,9 +1,20 @@ package WayofTime.alchemicalWizardry.common.items; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + public class FireScribeTool extends ScribeTool { public FireScribeTool() { super(2); } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:FireScribeTool"); + } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemAlchemyBase.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemAlchemyBase.java index 92019075..bb60ec62 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemAlchemyBase.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemAlchemyBase.java @@ -1,32 +1,50 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - import org.lwjgl.input.Keyboard; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +import java.util.List; public class ItemAlchemyBase extends Item { - private final String[] ITEM_NAMES = new String[]{"offensa", "praesidium", "orbis_terrae", "strengthened_catalyst", "concentrated_catalyst", "fractured_bone", "virtus", "reductus", "potentia"}; + private static final String[] ITEM_NAMES = new String[]{"Offensa", "Praesidium", "OrbisTerrae", "StrengthenedCatalyst", "ConcentratedCatalyst", "FracturedBone", "Virtus", "Reductus", "Potentia"}; + + @SideOnly(Side.CLIENT) + private IIcon[] icons; public ItemAlchemyBase() { super(); + this.maxStackSize = 64; + this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); this.hasSubtypes = true; } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + icons = new IIcon[ITEM_NAMES.length]; + + for (int i = 0; i < ITEM_NAMES.length; ++i) + { + icons[i] = iconRegister.registerIcon("AlchemicalWizardry:" + "baseAlchemyItem" + ITEM_NAMES[i]); + } + } + @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { @@ -64,7 +82,15 @@ public class ItemAlchemyBase extends Item public String getUnlocalizedName(ItemStack itemStack) { int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ITEM_NAMES.length - 1); - return (getUnlocalizedName() + "." + ITEM_NAMES[meta]); + return ("" + "item.bloodMagicAlchemyItem." + ITEM_NAMES[meta]); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int meta) + { + int j = MathHelper.clamp_int(meta, 0, ITEM_NAMES.length - 1); + return icons[j]; } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBlockCrystalBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBlockCrystalBelljar.java index 790362e5..b6452305 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBlockCrystalBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBlockCrystalBelljar.java @@ -3,14 +3,11 @@ package WayofTime.alchemicalWizardry.common.items; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; @@ -27,7 +24,6 @@ public class ItemBlockCrystalBelljar extends ItemBlock this.setMaxStackSize(16); } - @Override public int getMetadata(int par1) { return par1; @@ -81,14 +77,17 @@ public class ItemBlockCrystalBelljar extends ItemBlock } @Override - public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, IBlockState newState) + public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) { - if (!world.setBlockState(pos, newState, 3)) return false; - - IBlockState state = world.getBlockState(pos); - if (state.getBlock() == this.block) + if (!world.setBlock(x, y, z, field_150939_a, metadata, 3)) { - this.block.onBlockPlacedBy(world, pos, state, player, stack); + return false; + } + + if (world.getBlock(x, y, z) == field_150939_a) + { + field_150939_a.onBlockPlacedBy(world, x, y, z, player, stack); + field_150939_a.onPostBlockPlaced(world, x, y, z, metadata); } return true; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodLetterPack.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodLetterPack.java index fa709bfa..dc5354c8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodLetterPack.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodLetterPack.java @@ -2,23 +2,30 @@ package WayofTime.alchemicalWizardry.common.items; import java.util.List; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; +import net.minecraft.util.IIcon; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.IAltarManipulator; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAltarManipulator -{ +{ + @SideOnly(Side.CLIENT) + private IIcon plateIcon; + public int conversionRate = 100; //LP / half heart public float activationPoint = 0.5f; public int tickRate = 20; @@ -27,6 +34,14 @@ public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAl public ItemBloodLetterPack() { super(ArmorMaterial.CHAIN, 0, 1); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodPack"); } @Override @@ -39,6 +54,12 @@ public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAl par3List.add(StatCollector.translateToLocal("tooltip.lp.storedlp") + " " + this.getStoredLP(par1ItemStack)); } } + + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) + { + return this.plateIcon; + } @Override public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) @@ -63,9 +84,11 @@ public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAl { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - BlockPos pos = movingobjectposition.func_178782_a(); + int x = movingobjectposition.blockX; + int y = movingobjectposition.blockY; + int z = movingobjectposition.blockZ; - TileEntity tile = world.getTileEntity(pos); + TileEntity tile = world.getTileEntity(x, y, z); if (!(tile instanceof TEAltar)) { @@ -83,7 +106,7 @@ public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAl amount -= filledAmount; this.setStoredLP(itemStack, amount); - world.markBlockForUpdate(pos); + world.markBlockForUpdate(x, y, z); } } } @@ -138,7 +161,10 @@ public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAl } @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {} + public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) + { + + } @Override public boolean isUpgrade() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java index 00f46b90..7932014c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java @@ -10,9 +10,9 @@ public class ItemBloodRuneBlock extends ItemBlock { super(block); setHasSubtypes(true); + } - @Override public String getUnlocalizedName(ItemStack itemstack) { String name; @@ -20,12 +20,16 @@ public class ItemBloodRuneBlock extends ItemBlock switch (itemstack.getItemDamage()) { case 0: + { name = "blank"; break; + } case 1: + { name = "fill"; break; + } case 2: name = "empty"; @@ -50,7 +54,6 @@ public class ItemBloodRuneBlock extends ItemBlock return getUnlocalizedName() + "." + name; } - @Override public int getMetadata(int par1) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComplexSpellCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComplexSpellCrystal.java index 81550c21..3798a1c7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComplexSpellCrystal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComplexSpellCrystal.java @@ -1,23 +1,34 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.util.StatCollector; +import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; -public class ItemComplexSpellCrystal extends BindableItems +import java.util.List; + +public class ItemComplexSpellCrystal extends EnergyItems { public ItemComplexSpellCrystal() { super(); - setMaxStackSize(1); + this.setMaxStackSize(1); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:ComplexCrystal"); } @Override @@ -42,7 +53,7 @@ public class ItemComplexSpellCrystal extends BindableItems @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -54,7 +65,7 @@ public class ItemComplexSpellCrystal extends BindableItems if (world != null) { NBTTagCompound itemTag = par1ItemStack.getTagCompound(); - TileEntity tileEntity = world.getTileEntity(new BlockPos(itemTag.getInteger("xCoord"), itemTag.getInteger("yCoord"), itemTag.getInteger("zCoord"))); + TileEntity tileEntity = world.getTileEntity(itemTag.getInteger("xCoord"), itemTag.getInteger("yCoord"), itemTag.getInteger("zCoord")); if (tileEntity instanceof TESpellParadigmBlock) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java index 78fd031c..4175c955 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java @@ -1,26 +1,46 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; + +import java.util.List; public class ItemComponents extends Item { - private final String[] ITEM_NAMES = new String[]{"quartz_rod", "empty_core", "magicales_cable", "wood_brace", "stone_brace", "projectile_core", "self_core", "melee_core", "paradigm_back_plate", "output_cable", "flame_core", "icy_core", "gust_core", "earthen_core", "input_cable", "cracked_runic_plate", "runic_plate", "scribed_runic_plate", "default_core", "offensive_core", "defensive_core", "environmental_core", "power_core", "cost_core", "potency_core", "obsidian_brace", "tool_core", "ethereal_slate", "life_shard", "soul_shard", "soul_runic_plate", "life_brace", "ender_shard"}; + private static final String[] ITEM_NAMES = new String[]{"QuartzRod", "EmptyCore", "MagicalesCable", "WoodBrace", "StoneBrace", "ProjectileCore", "SelfCore", "MeleeCore", "ParadigmBackPlate", "OutputCable", "FlameCore", "IcyCore", "GustCore", "EarthenCore", "InputCable", "CrackedRunicPlate", "RunicPlate", "ScribedRunicPlate", "DefaultCore", "OffensiveCore", "DefensiveCore", "EnvironmentalCore", "PowerCore", "CostCore", "PotencyCore", "ObsidianBrace", "ToolCore", "EtherealSlate", "LifeShard", "SoulShard", "SoulRunicPlate", "LifeBrace", "EnderShard"}; + + @SideOnly(Side.CLIENT) + private IIcon[] icons; public ItemComponents() { super(); + this.maxStackSize = 64; + this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); this.hasSubtypes = true; } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + icons = new IIcon[ITEM_NAMES.length]; + + for (int i = 0; i < ITEM_NAMES.length; ++i) + { + icons[i] = iconRegister.registerIcon("AlchemicalWizardry:" + "baseItem" + ITEM_NAMES[i]); + } + } + @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -32,7 +52,15 @@ public class ItemComponents extends Item { //This is what will do all the localisation things on the alchemy components so you dont have to set it :D int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ITEM_NAMES.length - 1); - return (getUnlocalizedName() + "." + ITEM_NAMES[meta]); + return ("" + "item.bloodMagicBaseItem." + ITEM_NAMES[meta]); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int meta) + { + int j = MathHelper.clamp_int(meta, 0, ITEM_NAMES.length - 1); + return icons[j]; } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemCrystalBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemCrystalBlock.java index 8b496da3..75c7ae92 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemCrystalBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemCrystalBlock.java @@ -10,9 +10,9 @@ public class ItemCrystalBlock extends ItemBlock { super(par1); setHasSubtypes(true); + } - @Override public String getUnlocalizedName(ItemStack itemstack) { String name; @@ -20,12 +20,16 @@ public class ItemCrystalBlock extends ItemBlock switch (itemstack.getItemDamage()) { case 0: + { name = "fullCrystal"; break; + } case 1: + { name = "crystalBrick"; break; + } default: name = "broken"; @@ -34,7 +38,6 @@ public class ItemCrystalBlock extends ItemBlock return getUnlocalizedName() + "." + name; } - @Override public int getMetadata(int par1) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/KeyOfBinding.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java similarity index 76% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/KeyOfBinding.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java index 16c07641..3b9c33fb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/KeyOfBinding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemDiabloKey.java @@ -1,7 +1,12 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -11,22 +16,27 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.FakePlayer; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -public class KeyOfBinding extends BindableItems +import java.util.List; + +public class ItemDiabloKey extends EnergyItems { - public KeyOfBinding() + public ItemDiabloKey() { super(); setMaxStackSize(1); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); this.setEnergyUsed(1000); this.hasSubtypes = true; } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DiabloKey"); + } + @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { @@ -40,7 +50,7 @@ public class KeyOfBinding extends BindableItems public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { World world = par3EntityPlayer.worldObj; - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer instanceof FakePlayer || par3EntityPlayer instanceof EntityPlayerMP) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer instanceof FakePlayer || par3EntityPlayer instanceof EntityPlayerMP) { return par1ItemStack; } @@ -51,7 +61,7 @@ public class KeyOfBinding extends BindableItems double posY = par3EntityPlayer.posY; double posZ = par3EntityPlayer.posZ; world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.getDimensionId(), 4, posX, posY, posZ); + SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 4, posX, posY, posZ); } if (!par3EntityPlayer.worldObj.isRemote && !(par3EntityPlayer.getClass().equals(EntityPlayerMP.class))) @@ -83,14 +93,14 @@ public class KeyOfBinding extends BindableItems Item item = itemStack.getItem(); - if (item instanceof KeyOfBinding) + if (item instanceof ItemDiabloKey) { continue; } if (item instanceof IBindable) { - BindableItems.checkAndSetItemOwner(itemStack, ownerName); + EnergyItems.checkAndSetItemOwner(itemStack, ownerName); } } @@ -103,7 +113,7 @@ public class KeyOfBinding extends BindableItems { list.add(new ItemStack(ModItems.itemKeyOfDiablo)); ItemStack boundKey = new ItemStack(ModItems.itemKeyOfDiablo); - BindableItems.checkAndSetItemOwner(boundKey, "Server-wide Soul Network"); + EnergyItems.checkAndSetItemOwner(boundKey, "Server-wide Soul Network"); list.add(boundKey); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemEnchantmentGlyphBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemEnchantmentGlyphBlock.java index 3b1063e1..4dfc459b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemEnchantmentGlyphBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemEnchantmentGlyphBlock.java @@ -19,16 +19,16 @@ public class ItemEnchantmentGlyphBlock extends ItemBlock switch (itemstack.getItemDamage()) { - case 0: - name = "enchantability"; - break; + case 0: + name = "enchantability"; + break; - case 1: - name = "enchantmentLevel"; - break; + case 1: + name = "enchantmentLevel"; + break; - default: - name = "broken"; + default: + name = "broken"; } return getUnlocalizedName() + "." + name; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemIncense.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemIncense.java index 2e48ba20..f906c402 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemIncense.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemIncense.java @@ -2,32 +2,60 @@ package WayofTime.alchemicalWizardry.common.items; import java.util.List; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.util.StatCollector; -import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.oredict.OreDictionary; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; import WayofTime.alchemicalWizardry.api.sacrifice.IIncense; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class ItemIncense extends Item implements IIncense { - private final String[] ITEM_NAMES = new String[]{"wood_ash", "byrrus", "livens", "viridis", "purpura"}; + private static final String[] ITEM_NAMES = new String[]{"Woodash", "Byrrus", "Livens", "Viridis", "Purpura"}; + + @SideOnly(Side.CLIENT) + private IIcon[] icons; public ItemIncense() { super(); + this.maxStackSize = 64; + this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); this.hasSubtypes = true; } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + icons = new IIcon[ITEM_NAMES.length]; + + IIcon baseIcon = iconRegister.registerIcon("AlchemicalWizardry:" + "baseIncenseItem"); + + for (int i = 0; i < ITEM_NAMES.length; ++i) + { + if(this.doesIncenseHaveUniqueTexture(i)) + { + icons[i] = iconRegister.registerIcon("AlchemicalWizardry:" + "baseIncenseItem" + ITEM_NAMES[i]); + }else + { + icons[i] = baseIcon; + } + } + } + @Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { @@ -38,7 +66,15 @@ public class ItemIncense extends Item implements IIncense public String getUnlocalizedName(ItemStack itemStack) { int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ITEM_NAMES.length - 1); - return (getUnlocalizedName() + "." + ITEM_NAMES[meta]); + return ("" + "item.bloodMagicIncenseItem." + ITEM_NAMES[meta]); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int meta) + { + int j = MathHelper.clamp_int(meta, 0, ITEM_NAMES.length - 1); + return icons[j]; } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemMailOrderCatalogue.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemMailOrderCatalogue.java index e2916f15..2e2e07e7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemMailOrderCatalogue.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemMailOrderCatalogue.java @@ -1,19 +1,30 @@ package WayofTime.alchemicalWizardry.common.items; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.entity.mob.MailOrderEntityItem; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class ItemMailOrderCatalogue extends Item { public ItemMailOrderCatalogue() { super(); + this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:MailOrder"); + } + @Override public boolean hasCustomEntity(ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java index a62bb184..d1ca42ce 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDismantler.java @@ -1,26 +1,37 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.Rituals; -import WayofTime.alchemicalWizardry.common.block.BlockRitualStone; +import WayofTime.alchemicalWizardry.common.block.RitualStone; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; -public class ItemRitualDismantler extends BindableItems +import java.util.List; + +public class ItemRitualDismantler extends EnergyItems { public ItemRitualDismantler() { super(); setMaxStackSize(1); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:ritual_dismantler"); } @Override @@ -32,60 +43,48 @@ public class ItemRitualDismantler extends BindableItems } @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10) { - return BindableItems.checkAndSetItemOwner(stack, player) && breakRitualStoneAtMasterStone(stack, player, world, pos); + return EnergyItems.checkAndSetItemOwner(stack, player) && breakRitualStoneAtMasterStone(stack, player, world, x, y, z); } - public boolean breakRitualStoneAtMasterStone(ItemStack stack, EntityPlayer player, World world, BlockPos pos) + public boolean breakRitualStoneAtMasterStone(ItemStack stack, EntityPlayer player, World world, int x, int y, int z) { - ItemStack[] playerInventory = player.inventory.mainInventory; - TileEntity tileEntity = world.getTileEntity(pos); + TileEntity tileEntity = world.getTileEntity(x, y, z); if (tileEntity instanceof TEMasterStone) { TEMasterStone masterStone = (TEMasterStone) tileEntity; int direction = masterStone.getDirection(); - int freeSpace = -1; - List<RitualComponent> ritualList = Rituals.getRitualList(masterStone.getCurrentRitual()); + String ritualName = Rituals.checkValidRitual(world, x, y, z); + List<RitualComponent> ritualList = Rituals.getRitualList(ritualName); if (ritualList == null) { return false; } - for (int i = 0; i < playerInventory.length; i++) - { - if (playerInventory[i] == null) - { - freeSpace = i; - break; - } - } - for (RitualComponent rc : ritualList) { - BlockPos newPos = pos.add(rc.getX(direction), rc.getY(), rc.getZ(direction)); - if (!world.isAirBlock(newPos) && world.getBlockState(newPos).getBlock() instanceof BlockRitualStone) + if (!world.isAirBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)) && world.getBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)) instanceof RitualStone) { - if (freeSpace >= 0) + if (EnergyItems.syphonBatteries(stack, player, getEnergyUsed()) || player.capabilities.isCreativeMode) { - if (BindableItems.syphonBatteries(stack, player, getEnergyUsed()) || player.capabilities.isCreativeMode) + world.setBlockToAir(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)); + EntityItem entityItem = new EntityItem(world, player.posX, player.posY, player.posZ, new ItemStack(ModBlocks.ritualStone)); + if (world.isRemote) { - world.setBlockToAir(newPos); - player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.ritualStone)); - if (world.isRemote) - { - world.playAuxSFX(2005, pos.offsetUp(), 0); - - return true; - } + world.playAuxSFX(2005, x, y + 1, z, 0); + } + else + { + world.spawnEntityInWorld(entityItem); } - - return true; } } } + + return true; } return false; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java index f34e5283..4f6b419c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemRitualDiviner.java @@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.common.items; import java.util.List; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -12,18 +12,15 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.EnumFacing; import net.minecraft.util.IChatComponent; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.items.interfaces.IRitualDiviner; @@ -32,20 +29,30 @@ import WayofTime.alchemicalWizardry.api.rituals.IRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; -public class ItemRitualDiviner extends BindableItems implements IRitualDiviner +public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner { private int maxMetaData; public ItemRitualDiviner() { super(); - setMaxStackSize(1); + this.maxStackSize = 1; setEnergyUsed(100); - setMaxDamage(4); + this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.maxMetaData = 4; this.hasSubtypes = true; } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:RitualDiviner"); + } + @Override public void addInformation(ItemStack stack, EntityPlayer player, List par3List, boolean x) { @@ -159,15 +166,15 @@ public class ItemRitualDiviner extends BindableItems implements IRitualDiviner } @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10) { - if (!BindableItems.checkAndSetItemOwner(stack, player)) return false; + if (!EnergyItems.checkAndSetItemOwner(stack, player)) return false; - if(placeRitualStoneAtMasterStone(stack, player, world, pos)) + if(placeRitualStoneAtMasterStone(stack, player, world, x, y, z)) { - this.setStoredLocation(stack, new Int3(pos)); + this.setStoredLocation(stack, new Int3(x, y, z)); return true; - }else if(!(world.getBlockState(pos).getBlock() instanceof IRitualStone || world.getBlockState(pos).getBlock() instanceof IMasterRitualStone) && !player.isSneaking()) + }else if(!(world.getBlock(x, y, z) instanceof IRitualStone || world.getBlock(x, y, z) instanceof IMasterRitualStone) && !player.isSneaking()) { if(world.isRemote) { @@ -181,12 +188,12 @@ public class ItemRitualDiviner extends BindableItems implements IRitualDiviner return false; } - public boolean placeRitualStoneAtMasterStone(ItemStack stack, EntityPlayer player, World world, BlockPos pos) + public boolean placeRitualStoneAtMasterStone(ItemStack stack, EntityPlayer player, World world, int x, int y, int z) { int direction = this.getDirection(stack); ItemStack[] playerInventory = player.inventory.mainInventory; - TileEntity tileEntity = world.getTileEntity(pos); + TileEntity tileEntity = world.getTileEntity(x, y, z); if (tileEntity instanceof TEMasterStone) { @@ -214,15 +221,13 @@ public class ItemRitualDiviner extends BindableItems implements IRitualDiviner for (RitualComponent rc : ritualList) { - BlockPos newPos = pos.add(rc.getX(direction), rc.getY(), rc.getZ(direction)); - - if (world.isAirBlock(newPos)) + if (world.isAirBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction))) { if (playerInvRitualStoneLocation >= 0 || player.capabilities.isCreativeMode) { if (rc.getStoneType() > this.maxMetaData + this.getMaxRuneDisplacement(stack)) { - world.playAuxSFX(200, newPos.offsetUp(), 0); + world.playAuxSFX(200, x, y + 1, z, 0); return true; } @@ -231,13 +236,13 @@ public class ItemRitualDiviner extends BindableItems implements IRitualDiviner player.inventory.decrStackSize(playerInvRitualStoneLocation, 1); } - if(BindableItems.syphonBatteries(stack, player, getEnergyUsed())) + if(EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) { - world.setBlockState(newPos, ModBlocks.ritualStone.getStateFromMeta(rc.getStoneType()), 3); + world.setBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction), ModBlocks.ritualStone, rc.getStoneType(), 3); if (world.isRemote) { - world.playAuxSFX(2005, newPos.offsetUp(), 0); + world.playAuxSFX(2005, x, y + 1, z, 0); return true; } @@ -247,29 +252,29 @@ public class ItemRitualDiviner extends BindableItems implements IRitualDiviner } } else { - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); + Block block = world.getBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)); if (block == ModBlocks.ritualStone) { - int metadata = block.getMetaFromState(state); + int metadata = world.getBlockMetadata(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)); + if (metadata != rc.getStoneType()) { - if(BindableItems.syphonBatteries(stack, player, getEnergyUsed())) + if(EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) { if (rc.getStoneType() > this.maxMetaData + this.getMaxRuneDisplacement(stack)) { - world.playAuxSFX(200, newPos.offsetUp(), 0); + world.playAuxSFX(200, x, y + 1, z, 0); return true; } - world.setBlockState(newPos, ModBlocks.ritualStone.getStateFromMeta(rc.getStoneType()), 3); + world.setBlockMetadataWithNotify(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction), rc.getStoneType(), 3); return true; } } } else { - world.playAuxSFX(0, newPos.offsetUp(), 0); + world.playAuxSFX(0, x, y + 1, z, 0); return true; } } @@ -290,7 +295,7 @@ public class ItemRitualDiviner extends BindableItems implements IRitualDiviner int y = loc.yCoord; int z = loc.zCoord; - if(!this.placeRitualStoneAtMasterStone(stack, (EntityPlayer)entity, world, new BlockPos(x, y, z))) + if(!this.placeRitualStoneAtMasterStone(stack, (EntityPlayer)entity, world, x, y, z)) { this.voidStoredLocation(stack); } @@ -359,7 +364,7 @@ public class ItemRitualDiviner extends BindableItems implements IRitualDiviner @Override public ItemStack onItemRightClick(ItemStack stack, World par2World, EntityPlayer par3EntityPlayer) { - if (BindableItems.checkAndSetItemOwner(stack, par3EntityPlayer) && par3EntityPlayer.isSneaking()) + if (EnergyItems.checkAndSetItemOwner(stack, par3EntityPlayer) && par3EntityPlayer.isSneaking()) { rotateRituals(par2World,par3EntityPlayer, stack, true); } @@ -374,7 +379,7 @@ public class ItemRitualDiviner extends BindableItems implements IRitualDiviner { EntityPlayer player = (EntityPlayer) entityLiving; - if (!BindableItems.checkAndSetItemOwner(stack, player)) return true; + if (!EnergyItems.checkAndSetItemOwner(stack,player)) return true; if (!player.isSwingInProgress) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEffectBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEffectBlock.java index 8a33e9af..e9ec4502 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEffectBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEffectBlock.java @@ -12,7 +12,6 @@ public class ItemSpellEffectBlock extends ItemBlock setHasSubtypes(true); } - @Override public String getUnlocalizedName(ItemStack itemstack) { String name; @@ -20,12 +19,16 @@ public class ItemSpellEffectBlock extends ItemBlock switch (itemstack.getItemDamage()) { case 0: + { name = "fire"; break; + } case 1: + { name = "ice"; break; + } case 2: name = "wind"; @@ -42,7 +45,6 @@ public class ItemSpellEffectBlock extends ItemBlock return getUnlocalizedName() + "." + name; } - @Override public int getMetadata(int par1) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEnhancementBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEnhancementBlock.java index 0e121a16..5c515c3f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEnhancementBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellEnhancementBlock.java @@ -10,9 +10,9 @@ public class ItemSpellEnhancementBlock extends ItemBlock { super(par1); setHasSubtypes(true); + } - @Override public String getUnlocalizedName(ItemStack itemstack) { String name; @@ -86,7 +86,6 @@ public class ItemSpellEnhancementBlock extends ItemBlock return getUnlocalizedName() + "." + name; } - @Override public int getMetadata(int par1) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellModifierBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellModifierBlock.java index 99cfebc6..44e02d7b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellModifierBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellModifierBlock.java @@ -10,9 +10,9 @@ public class ItemSpellModifierBlock extends ItemBlock { super(par1); setHasSubtypes(true); + } - @Override public String getUnlocalizedName(ItemStack itemstack) { String name; @@ -20,12 +20,16 @@ public class ItemSpellModifierBlock extends ItemBlock switch (itemstack.getItemDamage()) { case 0: + { name = "default"; break; + } case 1: + { name = "offensive"; break; + } case 2: name = "defensive"; @@ -42,7 +46,6 @@ public class ItemSpellModifierBlock extends ItemBlock return getUnlocalizedName() + "." + name; } - @Override public int getMetadata(int par1) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellParadigmBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellParadigmBlock.java index 1868c9dc..2984cdb7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellParadigmBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemSpellParadigmBlock.java @@ -20,12 +20,16 @@ public class ItemSpellParadigmBlock extends ItemBlock switch (itemstack.getItemDamage()) { case 0: + { name = "projectile"; break; + } case 1: + { name = "self"; break; + } case 2: name = "melee"; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemStabilityGlyphBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemStabilityGlyphBlock.java index 45a0b90a..289fe3ec 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemStabilityGlyphBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemStabilityGlyphBlock.java @@ -19,12 +19,12 @@ public class ItemStabilityGlyphBlock extends ItemBlock switch (itemstack.getItemDamage()) { - case 0: - name = "stability1"; - break; + case 0: + name = "stability1"; + break; - default: - name = "broken"; + default: + name = "broken"; } return getUnlocalizedName() + "." + name; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java index 5cac4a71..eec96479 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/LavaCrystal.java @@ -2,44 +2,61 @@ package WayofTime.alchemicalWizardry.common.items; import java.util.List; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.server.MinecraftServer; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import net.minecraft.world.WorldProvider; +import net.minecraftforge.common.DimensionManager; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; -public class LavaCrystal extends BindableItems +public class LavaCrystal extends EnergyItems { public LavaCrystal() { super(); setMaxStackSize(1); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + setUnlocalizedName("lavaCrystal"); setEnergyUsed(25); } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:LavaCrystal"); + } + /* * Used to have the item contain itself. */ @Override public ItemStack getContainerItem(ItemStack itemStack) { - SoulNetworkHandler.syphonFromNetwork(itemStack, this.getEnergyUsed()); - ItemStack copiedStack = itemStack.copy(); - copiedStack.setItemDamage(copiedStack.getItemDamage()); - copiedStack.stackSize = 1; - return copiedStack; + { + syphonWhileInContainer(itemStack, this.getEnergyUsed()); + ItemStack copiedStack = itemStack.copy(); + copiedStack.setItemDamage(copiedStack.getItemDamage()); + copiedStack.stackSize = 1; + return copiedStack; + } } @Override - public boolean hasContainerItem(ItemStack itemStack) + public boolean hasContainerItem() { return true; } public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); + EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); return par1ItemStack; } @@ -66,7 +83,22 @@ public class LavaCrystal extends BindableItems return false; } - if (SoulNetworkHandler.getCurrentEssence(ownerName) >= this.getEnergyUsed()) +// World world = MinecraftServer.getServer().worldServers[0]; + WorldProvider provider = DimensionManager.getProvider(0); + if(provider == null || provider.worldObj == null) + { + return false; + } + World world = provider.worldObj; + LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); + + if (data == null) + { + data = new LifeEssenceNetwork(ownerName); + world.setItemData(ownerName, data); + } + + if (data.currentEssence >= this.getEnergyUsed()) { return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/LifeBucket.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/LifeBucket.java index 7a19f8bd..daaec1d1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/LifeBucket.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/LifeBucket.java @@ -1,6 +1,9 @@ package WayofTime.alchemicalWizardry.common.items; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemBucket; public class LifeBucket extends ItemBucket @@ -9,4 +12,11 @@ public class LifeBucket extends ItemBucket { super(block); } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:LifeBucket"); + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/MagicianBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/MagicianBloodOrb.java index 26795324..737760e4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/MagicianBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/MagicianBloodOrb.java @@ -1,10 +1,21 @@ package WayofTime.alchemicalWizardry.common.items; -public class MagicianBloodOrb extends Orb +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + +public class MagicianBloodOrb extends EnergyBattery { public MagicianBloodOrb(int damage) { super(damage); orbLevel = 3; } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:MagicianBloodOrb"); + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java index f7b15ab0..e82a160d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/MasterBloodOrb.java @@ -1,10 +1,21 @@ package WayofTime.alchemicalWizardry.common.items; -public class MasterBloodOrb extends Orb +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + +public class MasterBloodOrb extends EnergyBattery { public MasterBloodOrb(int damage) { super(damage); orbLevel = 4; } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:MasterBloodOrb"); + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/OrbOfTesting.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/OrbOfTesting.java new file mode 100644 index 00000000..4cd07069 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/OrbOfTesting.java @@ -0,0 +1,45 @@ +package WayofTime.alchemicalWizardry.common.items; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class OrbOfTesting extends EnergyItems +{ + public OrbOfTesting() + { + super(); + setMaxStackSize(1); + setCreativeTab(CreativeTabs.tabMisc); + setUnlocalizedName("orbOfTesting"); + setMaxDamage(100); + setFull3D(); + this.setEnergyUsed(100); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Untitled"); + } + + public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + { + if (!par3EntityPlayer.shouldHeal()) + { + return par1ItemStack; + } + + if (syphonBatteries(par1ItemStack, par3EntityPlayer, this.getEnergyUsed())) + { + par3EntityPlayer.heal(1); + } + + return par1ItemStack; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ReinforcedTelepositionFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ReinforcedTelepositionFocus.java index 90c5f01d..8d83eb3f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ReinforcedTelepositionFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ReinforcedTelepositionFocus.java @@ -1,12 +1,15 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.StatCollector; +import java.util.List; + public class ReinforcedTelepositionFocus extends TelepositionFocus { public ReinforcedTelepositionFocus() @@ -14,6 +17,13 @@ public class ReinforcedTelepositionFocus extends TelepositionFocus super(3); } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:ReinforcedTeleposerFocus"); + } + @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java index 2ad4253e..b40ee311 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java @@ -2,6 +2,7 @@ package WayofTime.alchemicalWizardry.common.items; import java.util.List; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumAction; @@ -9,30 +10,42 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.FakePlayer; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.event.SacrificeKnifeUsedEvent; import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class SacrificialDagger extends Item { public SacrificialDagger() { super(); - setMaxStackSize(1); + this.maxStackSize = 1; + setCreativeTab(AlchemicalWizardry.tabBloodMagic); setFull3D(); } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + if (AlchemicalWizardry.wimpySettings) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); + } else + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SacrificialDagger"); + } + } + @Override public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { @@ -72,7 +85,7 @@ public class SacrificialDagger extends Item @Override public EnumAction getItemUseAction(ItemStack stack) { - return EnumAction.BOW; + return EnumAction.bow; } @Override @@ -119,7 +132,7 @@ public class SacrificialDagger extends Item for (int l = 0; l < 8; ++l) { - world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); + world.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); } if (!world.isRemote && SpellHelper.isFakePlayer(world, player)) @@ -145,8 +158,10 @@ public class SacrificialDagger extends Item public void findAndFillAltar(World world, EntityPlayer player, int amount) { - BlockPos pos = player.getPosition(); - IBloodAltar altarEntity = getAltar(world, pos); + int posX = (int) Math.round(player.posX - 0.5f); + int posY = (int) player.posY; + int posZ = (int) Math.round(player.posZ - 0.5f); + IBloodAltar altarEntity = getAltar(world, posX, posY, posZ); if (altarEntity == null) { @@ -157,7 +172,7 @@ public class SacrificialDagger extends Item altarEntity.startCycle(); } - public IBloodAltar getAltar(World world, BlockPos pos) + public IBloodAltar getAltar(World world, int x, int y, int z) { TileEntity tileEntity; @@ -167,8 +182,7 @@ public class SacrificialDagger extends Item { for (int k = -2; k <= 1; k++) { - BlockPos newPos = pos.add(i, j, k); - tileEntity = world.getTileEntity(newPos); + tileEntity = world.getTileEntity(i + x, k + y, j + z); if(tileEntity instanceof IBloodAltar) { @@ -226,8 +240,8 @@ public class SacrificialDagger extends Item @Override @SideOnly(Side.CLIENT) - public boolean hasEffect(ItemStack stack) + public boolean hasEffect(ItemStack stack, int pass) { - return this.canUseForSacrifice(stack) || super.hasEffect(stack); + return this.canUseForSacrifice(stack) || super.hasEffect(stack, pass); } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ScribeTool.java index 57fd29fc..7714e676 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ScribeTool.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.common.items; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; @@ -7,7 +8,7 @@ import net.minecraft.world.World; import java.util.List; -public class ScribeTool extends BindableItems +public class ScribeTool extends EnergyItems { private int meta; @@ -15,6 +16,7 @@ public class ScribeTool extends BindableItems { super(); setMaxStackSize(1); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); setMaxDamage(10); setEnergyUsed(10); this.meta = inkType; @@ -34,7 +36,7 @@ public class ScribeTool extends BindableItems @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) + if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) { if (par1ItemStack.getItemDamage() > 0) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java index 503643e0..11fdbdf9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/TelepositionFocus.java @@ -1,17 +1,19 @@ package WayofTime.alchemicalWizardry.common.items; -import java.util.List; - +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -public class TelepositionFocus extends BindableItems +import java.util.List; + +public class TelepositionFocus extends EnergyItems { private int focusLevel; @@ -23,6 +25,13 @@ public class TelepositionFocus extends BindableItems this.focusLevel = focusLevel; } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:TeleposerFocus"); + } + @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { @@ -45,7 +54,7 @@ public class TelepositionFocus extends BindableItems @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) + if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) { if (par3EntityPlayer.isSneaking()) { @@ -102,11 +111,6 @@ public class TelepositionFocus extends BindableItems return 0; } } - - public BlockPos getBlockPos(ItemStack stack) - { - return new BlockPos(xCoord(stack), yCoord(stack), zCoord(stack)); - } public int getFocusLevel() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/TranscendentBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/TranscendentBloodOrb.java index d8535662..ecab2b21 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/TranscendentBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/TranscendentBloodOrb.java @@ -1,10 +1,21 @@ package WayofTime.alchemicalWizardry.common.items; -public class TranscendentBloodOrb extends Orb +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + +public class TranscendentBloodOrb extends EnergyBattery { public TranscendentBloodOrb(int damage) { super(damage); orbLevel = 6; } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:TranscendentBloodOrb"); + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java index 06d18615..bec61005 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/WaterScribeTool.java @@ -1,9 +1,22 @@ package WayofTime.alchemicalWizardry.common.items; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + public class WaterScribeTool extends ScribeTool { public WaterScribeTool() { super(1); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WaterScribeTool"); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java index b26cccab..dd609433 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.items.armour; import java.util.List; import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -13,29 +14,40 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.potion.Potion; import net.minecraft.util.DamageSource; +import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.ISpecialArmor; import net.minecraftforge.common.util.Constants; -import net.minecraftforge.fml.common.Optional; -import net.minecraftforge.fml.common.Optional.Interface; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import thaumcraft.api.IGoggles; +import thaumcraft.api.IRunicArmor; +import thaumcraft.api.nodes.IRevealer; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.api.items.interfaces.ILPGauge; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.items.sigil.SigilDivination; import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaArmour; +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.Optional.Interface; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; @Optional.InterfaceList(value = {@Interface(iface = "thaumcraft.api.nodes.IRevealer", modid = "Thaumcraft"), @Interface(iface = "thaumcraft.api.IGoggles", modid = "Thaumcraft"), @Interface(iface = "thaumcraft.api.IRunicArmor", modid = "Thaumcraft")}) -public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialArmor, IBindable, ILPGauge//, IRevealer, IGoggles, IRunicArmor +public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialArmor, IBindable, IRevealer, IGoggles, IRunicArmor, ILPGauge { private static int invSize = 9; @SideOnly(Side.CLIENT) + private IIcon helmetIcon; + @SideOnly(Side.CLIENT) + private IIcon plateIcon; + @SideOnly(Side.CLIENT) + private IIcon leggingsIcon; + @SideOnly(Side.CLIENT) + private IIcon bootsIcon; public static boolean tryComplexRendering = true; @@ -43,6 +55,13 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA { super(ItemArmor.ArmorMaterial.GOLD, 0, armorType); setMaxDamage(1000); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + } + + @Override + public boolean isItemTool(ItemStack stack) + { + return false; } ModelBiped model1 = null; @@ -95,10 +114,10 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA if (((EntityPlayer) entityLiving).getItemInUseDuration() > 0) { EnumAction enumaction = ((EntityPlayer) entityLiving).getItemInUse().getItemUseAction(); - if (enumaction == EnumAction.BLOCK) + if (enumaction == EnumAction.block) { this.model.heldItemRight = 3; - } else if (enumaction == EnumAction.BOW) + } else if (enumaction == EnumAction.bow) { this.model.aimedBow = true; } @@ -114,6 +133,44 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA } } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); + this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundHelmet"); + this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundPlate"); + this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundLeggings"); + this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundBoots"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) + { + if (this.equals(ModItems.boundHelmet)) + { + return this.helmetIcon; + } + + if (this.equals(ModItems.boundPlate)) + { + return this.plateIcon; + } + + if (this.equals(ModItems.boundLeggings)) + { + return this.leggingsIcon; + } + + if (this.equals(ModItems.boundBoots)) + { + return this.bootsIcon; + } + + return this.itemIcon; + } + @Override public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) { @@ -138,7 +195,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA @Override public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { - double armourReduction; + double armourReduction = 0.0; int f = 0; int h = 0; @@ -208,7 +265,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA return 3; } - if (armor.getItem() == ModItems.boundChestplate) + if (armor.getItem() == ModItems.boundPlate) { return 8; } @@ -231,7 +288,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA { if (entity instanceof EntityPlayer) { - BindableItems.checkAndSetItemOwner(stack, (EntityPlayer) entity); + EnergyItems.checkAndSetItemOwner(stack, (EntityPlayer) entity); if (((EntityPlayer) entity).capabilities.isCreativeMode) { @@ -283,7 +340,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA { if (this.getIsInvisible(stack)) { - if (this == ModItems.boundHelmet || this == ModItems.boundChestplate || this == ModItems.boundBoots) + if (this == ModItems.boundHelmet || this == ModItems.boundPlate || this == ModItems.boundBoots) { return "alchemicalwizardry:models/armor/boundArmour_invisible_layer_1.png"; } @@ -295,7 +352,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA } } - if (this == ModItems.boundHelmet || this == ModItems.boundChestplate || this == ModItems.boundBoots) + if (this == ModItems.boundHelmet || this == ModItems.boundPlate || this == ModItems.boundBoots) { return "alchemicalwizardry:models/armor/boundArmour_layer_1.png"; } @@ -312,7 +369,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); + EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); return super.onItemRightClick(par1ItemStack, par2World, par3EntityPlayer); } @@ -338,11 +395,11 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA { if (itemStack.getItemDamage() > 0) { - BindableItems.checkAndSetItemOwner(itemStack, player); + EnergyItems.checkAndSetItemOwner(itemStack, player); if (!player.capabilities.isCreativeMode) { - if(BindableItems.syphonBatteries(itemStack, player, itemStack.getItemDamage() * 75)) + if(EnergyItems.syphonBatteries(itemStack, player, itemStack.getItemDamage() * 75)) { itemStack.setItemDamage(0); } @@ -379,7 +436,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA { if (getUpgradeCostMultiplier(par1ItemStack) > 0.02f) { - BindableItems.syphonBatteries(par1ItemStack, par3Entity, (int) (((ArmourUpgrade) inv[i].getItem()).getEnergyForTenSeconds() * getUpgradeCostMultiplier(par1ItemStack))); + EnergyItems.syphonBatteries(par1ItemStack, par3Entity, (int) (((ArmourUpgrade) inv[i].getItem()).getEnergyForTenSeconds() * getUpgradeCostMultiplier(par1ItemStack))); } } } @@ -441,6 +498,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA if (nextItem == null) { candidateSlot = i; + continue; } } @@ -541,66 +599,66 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA return false; } -// @Optional.Method(modid = "Thaumcraft") -// public boolean hasIRevealer(ItemStack itemStack) -// { -// ItemStack[] inv = getInternalInventory(itemStack); -// -// if (inv == null) -// { -// return false; -// } -// -// for (ItemStack item : inv) -// { -// if (item == null) -// { -// continue; -// } -// -// if (item.getItem() instanceof IRevealer) -// { -// return true; -// } -// } -// -// return false; -// } -// -// @Optional.Method(modid = "Thaumcraft") -// public boolean hasIGoggles(ItemStack itemStack) -// { -// ItemStack[] inv = getInternalInventory(itemStack); -// -// if (inv == null) -// { -// return false; -// } -// -// int blood = getMaxBloodShardLevel(itemStack); -// -// for (ItemStack item : inv) -// { -// if (item == null) -// { -// continue; -// } -// if (item.getItem() instanceof ArmourUpgrade && blood > 0) -// { -// if (item.getItem() instanceof IGoggles) -// { -// return true; -// } -// -// if(((ArmourUpgrade)item.getItem()).isUpgrade()) -// { -// blood--; -// } -// } -// } -// -// return false; -// } + @Optional.Method(modid = "Thaumcraft") + public boolean hasIRevealer(ItemStack itemStack) + { + ItemStack[] inv = getInternalInventory(itemStack); + + if (inv == null) + { + return false; + } + + for (ItemStack item : inv) + { + if (item == null) + { + continue; + } + + if (item.getItem() instanceof IRevealer) + { + return true; + } + } + + return false; + } + + @Optional.Method(modid = "Thaumcraft") + public boolean hasIGoggles(ItemStack itemStack) + { + ItemStack[] inv = getInternalInventory(itemStack); + + if (inv == null) + { + return false; + } + + int blood = getMaxBloodShardLevel(itemStack); + + for (ItemStack item : inv) + { + if (item == null) + { + continue; + } + if (item.getItem() instanceof ArmourUpgrade && blood > 0) + { + if (item.getItem() instanceof IGoggles) + { + return true; + } + + if(((ArmourUpgrade)item.getItem()).isUpgrade()) + { + blood--; + } + } + } + + return false; + } @Override public boolean canSeeLPBar(ItemStack itemStack) @@ -730,75 +788,75 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA tag.setBoolean("invisible", invisible); } -// @Override -// @Optional.Method(modid = "Thaumcraft") -// public boolean showNodes(ItemStack itemstack, EntityLivingBase player) -// { -// return this.hasIRevealer(itemstack); -// } -// -// @Override -// @Optional.Method(modid = "Thaumcraft") -// public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) -// { -// return this.hasIGoggles(itemstack); -// } -// -// @Override -// @Optional.Method(modid = "Thaumcraft") -// public int getRunicCharge(ItemStack itemstack) -// { -// ItemStack[] inv = this.getInternalInventory(itemstack); -// int shardLevel = this.getMaxBloodShardLevel(itemstack); -// int count = 0; -// int harden = 0; -// -// if (inv == null) -// { -// return 0; -// } -// -// for (ItemStack stack : inv) -// { -// if (count >= shardLevel) -// { -// break; -// } -// -// if (stack == null || !(stack.getItem() instanceof ArmourUpgrade)) -// { -// continue; -// } -// -// if (stack.getItem() instanceof ItemArmor && ((ItemArmor) stack.getItem()).armorType != this.armorType) -// { -// continue; -// } -// -// if (stack.hasTagCompound()) -// { -// NBTTagCompound tag = stack.getTagCompound(); -// -// int enchLvl = tag.getByte("RS.HARDEN"); -// -// if (stack.getItem() instanceof IRunicArmor) -// { -// enchLvl += ((IRunicArmor) stack.getItem()).getRunicCharge(stack); -// } -// -// if (enchLvl > 0) -// { -// harden += enchLvl; -// if (((ArmourUpgrade) stack.getItem()).isUpgrade()) -// { -// count += 1; -// } -// } -// } -// } -// -// return harden; -// } + @Override + @Optional.Method(modid = "Thaumcraft") + public boolean showNodes(ItemStack itemstack, EntityLivingBase player) + { + return this.hasIRevealer(itemstack); + } + + @Override + @Optional.Method(modid = "Thaumcraft") + public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) + { + return this.hasIGoggles(itemstack); + } + + @Override + @Optional.Method(modid = "Thaumcraft") + public int getRunicCharge(ItemStack itemstack) + { + ItemStack[] inv = this.getInternalInventory(itemstack); + int shardLevel = this.getMaxBloodShardLevel(itemstack); + int count = 0; + int harden = 0; + + if (inv == null) + { + return 0; + } + + for (ItemStack stack : inv) + { + if (count >= shardLevel) + { + break; + } + + if (stack == null || !(stack.getItem() instanceof ArmourUpgrade)) + { + continue; + } + + if (stack.getItem() instanceof ItemArmor && ((ItemArmor) stack.getItem()).armorType != this.armorType) + { + continue; + } + + if (stack.hasTagCompound()) + { + NBTTagCompound tag = stack.getTagCompound(); + + int enchLvl = tag.getByte("RS.HARDEN"); + + if (stack.getItem() instanceof IRunicArmor) + { + enchLvl += ((IRunicArmor) stack.getItem()).getRunicCharge(stack); + } + + if (enchLvl > 0) + { + harden += enchLvl; + if (((ArmourUpgrade) stack.getItem()).isUpgrade()) + { + count += 1; + } + } + } + } + + return harden; + } @Override public boolean showIngameHUD(World world, ItemStack stack, EntityPlayer player) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java index 14d756b0..1b726b44 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmour.java @@ -20,16 +20,15 @@ import net.minecraft.item.EnumAction; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public abstract class OmegaArmour extends BoundArmour { @@ -40,7 +39,7 @@ public abstract class OmegaArmour extends BoundArmour protected boolean storeYLevel = false; protected boolean storeSeesSky = false; - protected List<Enchantment> illegalEnchantmentList = new LinkedList<Enchantment>(); + protected List<Enchantment> illegalEnchantmentList = new LinkedList(); public float reagentDrainPerDamage = 0.1f; @@ -91,9 +90,10 @@ public abstract class OmegaArmour extends BoundArmour { if(this.storeBiomeID()) { - BlockPos pos = player.getPosition(); + int xCoord = (int) Math.floor(player.posX); + int zCoord = (int) Math.floor(player.posZ); - BiomeGenBase biome = world.getBiomeGenForCoords(pos); + BiomeGenBase biome = world.getBiomeGenForCoords(xCoord, zCoord); if(biome != null) { this.setBiomeIDStored(itemStack, biome.biomeID); @@ -102,7 +102,7 @@ public abstract class OmegaArmour extends BoundArmour if(this.storeDimensionID()) { - this.setDimensionIDStored(itemStack, world.provider.getDimensionId()); + this.setDimensionIDStored(itemStack, world.provider.dimensionId); } if(this.storeYLevel()) @@ -129,7 +129,7 @@ public abstract class OmegaArmour extends BoundArmour { if (!player.capabilities.isCreativeMode) { - if(BindableItems.syphonBatteries(itemStack, player, itemStack.getItemDamage() * 75)) + if(EnergyItems.syphonBatteries(itemStack, player, itemStack.getItemDamage() * 75)) { float reagentAmount = APISpellHelper.getPlayerCurrentReagentAmount(player); @@ -176,7 +176,7 @@ public abstract class OmegaArmour extends BoundArmour } } - Map<Enchantment, Map<Integer, Integer>> map = new HashMap<Enchantment, Map<Integer, Integer>>(); + Map<Enchantment, Map<Integer, Integer>> map = new HashMap(); for(Object obj : enchantList) { @@ -184,7 +184,7 @@ public abstract class OmegaArmour extends BoundArmour if(!map.containsKey(enchantmentdata.enchantmentobj)) { - map.put(enchantmentdata.enchantmentobj, new HashMap<Integer, Integer>()); + map.put(enchantmentdata.enchantmentobj, new HashMap()); } Map<Integer, Integer> numMap = map.get(enchantmentdata.enchantmentobj); @@ -308,8 +308,9 @@ public abstract class OmegaArmour extends BoundArmour } NBTTagCompound tag = omegaTag.getCompoundTag("armour"); - - return ItemStack.loadItemStackFromNBT(tag); + ItemStack armourStack = ItemStack.loadItemStackFromNBT(tag); + + return armourStack; } @Override @@ -375,10 +376,10 @@ public abstract class OmegaArmour extends BoundArmour if (((EntityPlayer) entityLiving).getItemInUseDuration() > 0) { EnumAction enumaction = ((EntityPlayer) entityLiving).getItemInUse().getItemUseAction(); - if (enumaction == EnumAction.BLOCK) + if (enumaction == EnumAction.block) { this.model.heldItemRight = 3; - } else if (enumaction == EnumAction.BOW) + } else if (enumaction == EnumAction.bow) { this.model.aimedBow = true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourEarth.java index 41545359..a60bd254 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourEarth.java @@ -3,19 +3,32 @@ package WayofTime.alchemicalWizardry.common.items.armour; import java.util.UUID; import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import net.minecraft.util.IIcon; +import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaEarth; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class OmegaArmourEarth extends OmegaArmour -{ +{ + @SideOnly(Side.CLIENT) + private IIcon helmetIcon; + @SideOnly(Side.CLIENT) + private IIcon plateIcon; + @SideOnly(Side.CLIENT) + private IIcon leggingsIcon; + @SideOnly(Side.CLIENT) + private IIcon bootsIcon; + public OmegaArmourEarth(int armorType) { super(armorType); @@ -42,6 +55,44 @@ public class OmegaArmourEarth extends OmegaArmour return new ModelOmegaEarth(0.5f, false, false, true, false); } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); + this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaHelmet_earth"); + this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaPlate_earth"); + this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaLeggings_earth"); + this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaBoots_earth"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) + { + if (this.equals(ModItems.boundHelmetEarth)) + { + return this.helmetIcon; + } + + if (this.equals(ModItems.boundPlateEarth)) + { + return this.plateIcon; + } + + if (this.equals(ModItems.boundLeggingsEarth)) + { + return this.leggingsIcon; + } + + if (this.equals(ModItems.boundBootsEarth)) + { + return this.bootsIcon; + } + + return this.itemIcon; + } + @Override public Multimap getAttributeModifiers(ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourFire.java index eabc089b..2f9d6825 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourFire.java @@ -2,22 +2,34 @@ package WayofTime.alchemicalWizardry.common.items.armour; import java.util.UUID; +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; + import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.Entity; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; import net.minecraft.world.biome.BiomeGenBase; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaFire; - -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class OmegaArmourFire extends OmegaArmour -{ +{ + @SideOnly(Side.CLIENT) + private IIcon helmetIcon; + @SideOnly(Side.CLIENT) + private IIcon plateIcon; + @SideOnly(Side.CLIENT) + private IIcon leggingsIcon; + @SideOnly(Side.CLIENT) + private IIcon bootsIcon; + public OmegaArmourFire(int armorType) { super(armorType); @@ -45,6 +57,44 @@ public class OmegaArmourFire extends OmegaArmour return new ModelOmegaFire(0.5f, false, false, true, false); } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); + this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaHelmet_fire"); + this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaPlate_fire"); + this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaLeggings_fire"); + this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaBoots_fire"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) + { + if (this.equals(ModItems.boundHelmetFire)) + { + return this.helmetIcon; + } + + if (this.equals(ModItems.boundPlateFire)) + { + return this.plateIcon; + } + + if (this.equals(ModItems.boundLeggingsFire)) + { + return this.leggingsIcon; + } + + if (this.equals(ModItems.boundBootsFire)) + { + return this.bootsIcon; + } + + return this.itemIcon; + } + @Override public Multimap getAttributeModifiers(ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWater.java index 0ef14b4f..6afb527a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWater.java @@ -2,21 +2,33 @@ package WayofTime.alchemicalWizardry.common.items.armour; import java.util.UUID; +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; import net.minecraft.world.biome.BiomeGenBase; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWater; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - public class OmegaArmourWater extends OmegaArmour -{ +{ + @SideOnly(Side.CLIENT) + private IIcon helmetIcon; + @SideOnly(Side.CLIENT) + private IIcon plateIcon; + @SideOnly(Side.CLIENT) + private IIcon leggingsIcon; + @SideOnly(Side.CLIENT) + private IIcon bootsIcon; + public OmegaArmourWater(int armorType) { super(armorType); @@ -43,6 +55,44 @@ public class OmegaArmourWater extends OmegaArmour return new ModelOmegaWater(0.5f, false, false, true, false); } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); + this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaHelmet_water"); + this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaPlate_water"); + this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaLeggings_water"); + this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaBoots_water"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) + { + if (this.equals(ModItems.boundHelmetWater)) + { + return this.helmetIcon; + } + + if (this.equals(ModItems.boundPlateWater)) + { + return this.plateIcon; + } + + if (this.equals(ModItems.boundLeggingsWater)) + { + return this.leggingsIcon; + } + + if (this.equals(ModItems.boundBootsWater)) + { + return this.bootsIcon; + } + + return this.itemIcon; + } + @Override public Multimap getAttributeModifiers(ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWind.java index 47408e50..1048d1c4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWind.java @@ -3,19 +3,32 @@ package WayofTime.alchemicalWizardry.common.items.armour; import java.util.UUID; import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import net.minecraft.util.IIcon; +import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWind; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class OmegaArmourWind extends OmegaArmour -{ +{ + @SideOnly(Side.CLIENT) + private IIcon helmetIcon; + @SideOnly(Side.CLIENT) + private IIcon plateIcon; + @SideOnly(Side.CLIENT) + private IIcon leggingsIcon; + @SideOnly(Side.CLIENT) + private IIcon bootsIcon; + public OmegaArmourWind(int armorType) { super(armorType); @@ -42,6 +55,44 @@ public class OmegaArmourWind extends OmegaArmour return new ModelOmegaWind(0.5f, false, false, true, false); } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); + this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaHelmet_wind"); + this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaPlate_wind"); + this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaLeggings_wind"); + this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:OmegaBoots_wind"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) + { + if (this.equals(ModItems.boundHelmetWind)) + { + return this.helmetIcon; + } + + if (this.equals(ModItems.boundPlateWind)) + { + return this.plateIcon; + } + + if (this.equals(ModItems.boundLeggingsWind)) + { + return this.leggingsIcon; + } + + if (this.equals(ModItems.boundBootsWind)) + { + return this.bootsIcon; + } + + return this.itemIcon; + } + @Override public Multimap getAttributeModifiers(ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalRouter.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemAttunedCrystal.java similarity index 78% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalRouter.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemAttunedCrystal.java index eaa27a2b..a583a0ee 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalRouter.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemAttunedCrystal.java @@ -1,36 +1,42 @@ package WayofTime.alchemicalWizardry.common.items.energy; -import java.util.LinkedList; -import java.util.List; - +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.api.alchemy.energy.*; +import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; +import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.ChatComponentTranslation; -import net.minecraft.util.EnumFacing; +import net.minecraft.util.IIcon; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; -import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; -import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; +import net.minecraftforge.common.util.ForgeDirection; -public class AlchemicalRouter extends Item implements IReagentManipulator +import java.util.LinkedList; +import java.util.List; + +public class ItemAttunedCrystal extends Item implements IReagentManipulator { - public AlchemicalRouter() + public static final int maxDistance = 6; + + public IIcon crystalBody; + public IIcon crystalLabel; + + public ItemAttunedCrystal() { super(); + this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); this.hasSubtypes = true; - setMaxStackSize(1); + this.maxStackSize = 1; } @Override @@ -72,6 +78,62 @@ public class AlchemicalRouter extends Item implements IReagentManipulator } } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.crystalBody = iconRegister.registerIcon("AlchemicalWizardry:AttunedCrystal1"); + this.crystalLabel = iconRegister.registerIcon("AlchemicalWizardry:AttunedCrystal2"); + } + + @Override + @SideOnly(Side.CLIENT) + public int getColorFromItemStack(ItemStack stack, int pass) + { + switch (pass) + { + case 0: + return 256 * (256 * 255 + 255) + 255; + case 1: + Reagent reagent = this.getReagent(stack); + if (reagent != null) + { + return (reagent.getColourRed() * 256 * 256 + reagent.getColourGreen() * 256 + reagent.getColourBlue()); + } + break; + } + + return 256 * (256 * 255 + 255) + 255; + } + + @Override + @SideOnly(Side.CLIENT) + public boolean requiresMultipleRenderPasses() + { + return true; + } + + @Override + @SideOnly(Side.CLIENT) + public int getRenderPasses(int meta) + { + return 2; + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(ItemStack stack, int pass) + { + switch (pass) + { + case 0: + return this.crystalBody; + case 1: + return this.crystalLabel; + } + return this.itemIcon; + } + @Override public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { @@ -95,9 +157,11 @@ public class AlchemicalRouter extends Item implements IReagentManipulator { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - BlockPos pos = movingobjectposition.func_178782_a(); + int x = movingobjectposition.blockX; + int y = movingobjectposition.blockY; + int z = movingobjectposition.blockZ; - TileEntity tile = world.getTileEntity(pos); + TileEntity tile = world.getTileEntity(x, y, z); if (!(tile instanceof IReagentHandler)) { @@ -108,10 +172,10 @@ public class AlchemicalRouter extends Item implements IReagentManipulator if (player.isSneaking()) { - ReagentContainerInfo[] infos = relay.getContainerInfo(EnumFacing.UP); + ReagentContainerInfo[] infos = relay.getContainerInfo(ForgeDirection.UNKNOWN); if (infos != null) { - List<Reagent> reagentList = new LinkedList<Reagent>(); + List<Reagent> reagentList = new LinkedList(); for (ReagentContainerInfo info : infos) { if (info != null) @@ -159,15 +223,13 @@ public class AlchemicalRouter extends Item implements IReagentManipulator return itemStack; } - final int maxDistance = 6; - - if (dimension != world.provider.getDimensionId() || Math.abs(coords.xCoord - pos.getX()) > maxDistance || Math.abs(coords.yCoord - pos.getY()) > maxDistance || Math.abs(coords.zCoord - pos.getZ()) > maxDistance) + if (dimension != world.provider.dimensionId || Math.abs(coords.xCoord - x) > maxDistance || Math.abs(coords.yCoord - y) > maxDistance || Math.abs(coords.zCoord - z) > maxDistance) { player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.error.toofar")); return itemStack; } - TileEntity pastTile = world.getTileEntity(new BlockPos(coords.xCoord, coords.yCoord, coords.zCoord)); + TileEntity pastTile = world.getTileEntity(coords.xCoord, coords.yCoord, coords.zCoord); if (!(pastTile instanceof TEReagentConduit)) { player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.error.cannotfind")); @@ -185,10 +247,10 @@ public class AlchemicalRouter extends Item implements IReagentManipulator if (player.isSneaking()) { - pastRelay.removeReagentDestinationViaActual(reagent, pos); + pastRelay.removeReagentDestinationViaActual(reagent, x, y, z); } else { - if (pastRelay.addReagentDestinationViaActual(reagent, pos)) + if (pastRelay.addReagentDestinationViaActual(reagent, x, y, z)) { player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("message.attunedcrystal.linked") + " " + reagent.name)); } else @@ -196,13 +258,13 @@ public class AlchemicalRouter extends Item implements IReagentManipulator player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.error.noconnections")); } } - world.markBlockForUpdate(new BlockPos(coords.xCoord, coords.yCoord, coords.zCoord)); + world.markBlockForUpdate(coords.xCoord, coords.yCoord, coords.zCoord); } else { - int dimension = world.provider.getDimensionId(); + int dimension = world.provider.dimensionId; this.setDimension(itemStack, dimension); - this.setCoordinates(itemStack, new Int3(pos)); + this.setCoordinates(itemStack, new Int3(x, y, z)); player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.linking")); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalCleanser.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemDestinationClearer.java similarity index 69% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalCleanser.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemDestinationClearer.java index 985a8f23..d4642a7f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalCleanser.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemDestinationClearer.java @@ -1,25 +1,36 @@ package WayofTime.alchemicalWizardry.common.items.energy; -import java.util.List; - +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; +import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentTranslation; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; -import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; -public class AlchemicalCleanser extends Item implements IReagentManipulator +import java.util.List; + +public class ItemDestinationClearer extends Item implements IReagentManipulator { - public AlchemicalCleanser() + public ItemDestinationClearer() { super(); - setMaxStackSize(1); + this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.maxStackSize = 1; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:TankClearer"); } @Override @@ -46,9 +57,11 @@ public class AlchemicalCleanser extends Item implements IReagentManipulator { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - BlockPos pos = movingobjectposition.func_178782_a(); + int x = movingobjectposition.blockX; + int y = movingobjectposition.blockY; + int z = movingobjectposition.blockZ; - TileEntity tile = world.getTileEntity(pos); + TileEntity tile = world.getTileEntity(x, y, z); if (!(tile instanceof TEReagentConduit)) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalSegmenter.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemTankSegmenter.java similarity index 74% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalSegmenter.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemTankSegmenter.java index fe20f238..83bbbd6b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/AlchemicalSegmenter.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/energy/ItemTankSegmenter.java @@ -1,33 +1,39 @@ package WayofTime.alchemicalWizardry.common.items.energy; -import java.util.LinkedList; -import java.util.List; - +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.*; +import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; -import net.minecraft.util.EnumFacing; +import net.minecraft.util.IIcon; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ISegmentedReagentHandler; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; -import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; +import net.minecraftforge.common.util.ForgeDirection; -public class AlchemicalSegmenter extends Item implements IReagentManipulator +import java.util.LinkedList; +import java.util.List; + +public class ItemTankSegmenter extends Item implements IReagentManipulator { - public AlchemicalSegmenter() + @SideOnly(Side.CLIENT) + public IIcon crystalBody; + @SideOnly(Side.CLIENT) + public IIcon crystalLabel; + + public ItemTankSegmenter() { super(); + this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); this.hasSubtypes = true; - setMaxStackSize(1); + this.maxStackSize = 1; } @Override @@ -58,6 +64,62 @@ public class AlchemicalSegmenter extends Item implements IReagentManipulator } } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.crystalBody = iconRegister.registerIcon("AlchemicalWizardry:TankSegmenter1"); + this.crystalLabel = iconRegister.registerIcon("AlchemicalWizardry:TankSegmenter2"); + } + + @Override + @SideOnly(Side.CLIENT) + public int getColorFromItemStack(ItemStack stack, int pass) + { + switch (pass) + { + case 0: + return 256 * (256 * 255 + 255) + 255; + case 1: + Reagent reagent = this.getReagent(stack); + if (reagent != null) + { + return (reagent.getColourRed() * 256 * 256 + reagent.getColourGreen() * 256 + reagent.getColourBlue()); + } + break; + } + + return 256 * (256 * 255 + 255) + 255; + } + + @Override + @SideOnly(Side.CLIENT) + public boolean requiresMultipleRenderPasses() + { + return true; + } + + @Override + @SideOnly(Side.CLIENT) + public int getRenderPasses(int meta) + { + return 2; + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(ItemStack stack, int pass) + { + switch (pass) + { + case 0: + return this.crystalBody; + case 1: + return this.crystalLabel; + } + return this.itemIcon; + } + @Override public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { @@ -74,8 +136,10 @@ public class AlchemicalSegmenter extends Item implements IReagentManipulator { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - BlockPos pos = movingobjectposition.func_178782_a(); - TileEntity tile = world.getTileEntity(pos); + int x = movingobjectposition.blockX; + int y = movingobjectposition.blockY; + int z = movingobjectposition.blockZ; + TileEntity tile = world.getTileEntity(x, y, z); if (!(tile instanceof ISegmentedReagentHandler)) { return itemStack; @@ -84,7 +148,7 @@ public class AlchemicalSegmenter extends Item implements IReagentManipulator if (player.isSneaking()) { - ReagentContainerInfo[] infos = reagentHandler.getContainerInfo(EnumFacing.UP); + ReagentContainerInfo[] infos = reagentHandler.getContainerInfo(ForgeDirection.UNKNOWN); if (infos != null) { List<Reagent> reagentList = new LinkedList(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/forestry/ItemBloodFrame.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/forestry/ItemBloodFrame.java index 8acc4636..1a10f2da 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/forestry/ItemBloodFrame.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/forestry/ItemBloodFrame.java @@ -1,145 +1,145 @@ -//package WayofTime.alchemicalWizardry.common.items.forestry; -// -//import java.util.List; -// -//import net.minecraft.client.renderer.texture.IIconRegister; -//import net.minecraft.entity.player.EntityPlayer; -//import net.minecraft.item.ItemStack; -//import net.minecraft.util.StatCollector; -//import net.minecraft.world.World; -//import WayofTime.alchemicalWizardry.AlchemicalWizardry; -//import WayofTime.alchemicalWizardry.common.items.EnergyItems; -//import cpw.mods.fml.relauncher.Side; -//import cpw.mods.fml.relauncher.SideOnly; -//import forestry.api.apiculture.IBee; -//import forestry.api.apiculture.IBeeGenome; -//import forestry.api.apiculture.IBeeHousing; -//import forestry.api.apiculture.IHiveFrame; -// -//public class ItemBloodFrame extends EnergyItems implements IHiveFrame -//{ -// public ItemBloodFrame() -// { -// super(); -// this.maxStackSize = 1; -// this.setMaxDamage(10); -// setEnergyUsed(1000); -// setCreativeTab(AlchemicalWizardry.tabBloodMagic); -// } -// -// @Override -// public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) -// { -// par3List.add(StatCollector.translateToLocal("tooltip.bloodframe.desc")); -// -// if (!(par1ItemStack.getTagCompound() == null)) -// { -// par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); -// } -// } -// -// @Override -// @SideOnly(Side.CLIENT) -// public void registerIcons(IIconRegister iconRegister) -// { -// this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodFrame"); -// } -// -// @Override -// public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) -// { -// if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) -// { -// if (par1ItemStack.getItemDamage() > 0) -// { -// if(EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) -// { -// par1ItemStack.setItemDamage(par1ItemStack.getItemDamage() - 1); -// } -// } -// } -// return par1ItemStack; -// } -// -// @Override public float getTerritoryModifier(IBeeGenome genome, float currentModifier) -// { -// // TODO Auto-generated method stub -// return 1; -// } -// -// @Override public float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) -// { -// // TODO Auto-generated method stub -// return 1; -// } -// -// @Override public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) -// { -// // TODO Auto-generated method stub -// return 0.0001f; -// } -// -// @Override public float getProductionModifier(IBeeGenome genome, float currentModifier) -// { -// // TODO Auto-generated method stub -// return 0; -// } -// -// @Override public float getFloweringModifier(IBeeGenome genome, float currentModifier) -// { -// // TODO Auto-generated method stub -// return 1; -// } -// -// @Override public float getGeneticDecay(IBeeGenome genome, float currentModifier) -// { -// // TODO Auto-generated method stub -// return 1; -// } -// -// @Override public boolean isSealed() -// { -// // TODO Auto-generated method stub -// return false; -// } -// -// @Override public boolean isSelfLighted() -// { -// // TODO Auto-generated method stub -// return false; -// } -// -// @Override public boolean isSunlightSimulated() -// { -// // TODO Auto-generated method stub -// return false; -// } -// -// @Override public boolean isHellish() -// { -// // TODO Auto-generated method stub -// return false; -// } -// -// @Override public ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear) -// { -// // TODO Auto-generated method stub -// if(EnergyItems.canSyphonInContainer(frame, getEnergyUsed()*wear)) -// { -// EnergyItems.syphonWhileInContainer(frame, getEnergyUsed()*wear); -// return frame; -// }else -// { -// frame.setItemDamage(frame.getItemDamage() + wear); -// if(frame.getItemDamage()>=frame.getMaxDamage()) -// { -// return null; -// } -// return frame; -// } -// -// } -// -// -// -//} +package WayofTime.alchemicalWizardry.common.items.forestry; + +import java.util.List; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import forestry.api.apiculture.IBee; +import forestry.api.apiculture.IBeeGenome; +import forestry.api.apiculture.IBeeHousing; +import forestry.api.apiculture.IHiveFrame; + +public class ItemBloodFrame extends EnergyItems implements IHiveFrame +{ + public ItemBloodFrame() + { + super(); + this.maxStackSize = 1; + this.setMaxDamage(10); + setEnergyUsed(1000); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + } + + @Override + public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) + { + par3List.add(StatCollector.translateToLocal("tooltip.bloodframe.desc")); + + if (!(par1ItemStack.getTagCompound() == null)) + { + par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); + } + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodFrame"); + } + + @Override + public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + { + if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) + { + if (par1ItemStack.getItemDamage() > 0) + { + if(EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + { + par1ItemStack.setItemDamage(par1ItemStack.getItemDamage() - 1); + } + } + } + return par1ItemStack; + } + + @Override public float getTerritoryModifier(IBeeGenome genome, float currentModifier) + { + // TODO Auto-generated method stub + return 1; + } + + @Override public float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) + { + // TODO Auto-generated method stub + return 1; + } + + @Override public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) + { + // TODO Auto-generated method stub + return 0.0001f; + } + + @Override public float getProductionModifier(IBeeGenome genome, float currentModifier) + { + // TODO Auto-generated method stub + return 0; + } + + @Override public float getFloweringModifier(IBeeGenome genome, float currentModifier) + { + // TODO Auto-generated method stub + return 1; + } + + @Override public float getGeneticDecay(IBeeGenome genome, float currentModifier) + { + // TODO Auto-generated method stub + return 1; + } + + @Override public boolean isSealed() + { + // TODO Auto-generated method stub + return false; + } + + @Override public boolean isSelfLighted() + { + // TODO Auto-generated method stub + return false; + } + + @Override public boolean isSunlightSimulated() + { + // TODO Auto-generated method stub + return false; + } + + @Override public boolean isHellish() + { + // TODO Auto-generated method stub + return false; + } + + @Override public ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear) + { + // TODO Auto-generated method stub + if(EnergyItems.canSyphonInContainer(frame, getEnergyUsed()*wear)) + { + EnergyItems.syphonWhileInContainer(frame, getEnergyUsed()*wear); + return frame; + }else + { + frame.setItemDamage(frame.getItemDamage() + wear); + if(frame.getItemDamage()>=frame.getMaxDamage()) + { + return null; + } + return frame; + } + + } + + + +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java index 013a085a..27ac77f7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper; +import com.google.common.collect.HashMultimap; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.entity.ai.attributes.IAttribute; @@ -23,24 +23,35 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper; -import com.google.common.collect.HashMultimap; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; public class AlchemyFlask extends Item { public AlchemyFlask() { super(); - setMaxDamage(8); - setMaxStackSize(1); + this.setMaxDamage(8); + this.setMaxStackSize(1); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:PotionFlask"); } public static ArrayList<AlchemyPotionHelper> getEffects(ItemStack par1ItemStack) { if (par1ItemStack.hasTagCompound() && par1ItemStack.getTagCompound().hasKey("CustomFlaskEffects")) { - ArrayList<AlchemyPotionHelper> arraylist = new ArrayList<AlchemyPotionHelper>(); + ArrayList<AlchemyPotionHelper> arraylist = new ArrayList(); NBTTagList nbttaglist = par1ItemStack.getTagCompound().getTagList("CustomFlaskEffects", Constants.NBT.TAG_COMPOUND); for (int i = 0; i < nbttaglist.tagCount(); ++i) @@ -61,7 +72,7 @@ public class AlchemyFlask extends Item if (list != null) { - ArrayList<PotionEffect> newList = new ArrayList<PotionEffect>(); + ArrayList<PotionEffect> newList = new ArrayList(); for (AlchemyPotionHelper aph : list) { @@ -138,10 +149,10 @@ public class AlchemyFlask extends Item { if (this.isPotionThrowable(par1ItemStack)) { - return EnumAction.NONE; + return EnumAction.none; } - return EnumAction.DRINK; + return EnumAction.drink; } /** @@ -272,7 +283,7 @@ public class AlchemyFlask extends Item PotionEffect potioneffect = (PotionEffect) iterator.next(); String s = StatCollector.translateToLocal(potioneffect.getEffectName()).trim(); Potion potion = Potion.potionTypes[potioneffect.getPotionID()]; - Map map = potion.getAttributeModifierMap(); + Map map = potion.func_111186_k(); if (map != null && map.size() > 0) { @@ -282,7 +293,7 @@ public class AlchemyFlask extends Item { Entry entry = (Entry) iterator1.next(); AttributeModifier attributemodifier = (AttributeModifier) entry.getValue(); - AttributeModifier attributemodifier1 = new AttributeModifier(attributemodifier.getName(), potion.getAttributeModifierAmount(potioneffect.getAmplifier(), attributemodifier), attributemodifier.getOperation()); + AttributeModifier attributemodifier1 = new AttributeModifier(attributemodifier.getName(), potion.func_111183_a(potioneffect.getAmplifier(), attributemodifier), attributemodifier.getOperation()); hashmultimap.put(((IAttribute) entry.getKey()).getAttributeUnlocalizedName(), attributemodifier1); } } @@ -334,11 +345,11 @@ public class AlchemyFlask extends Item if (d0 > 0.0D) { - par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocalFormatted("attribute.modifier.plus." + attributemodifier2.getOperation(), new Object[]{ItemStack.DECIMALFORMAT.format(d1), StatCollector.translateToLocal("attribute.name." + (String) entry1.getKey())})); + par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocalFormatted("attribute.modifier.plus." + attributemodifier2.getOperation(), new Object[]{ItemStack.field_111284_a.format(d1), StatCollector.translateToLocal("attribute.name." + (String) entry1.getKey())})); } else if (d0 < 0.0D) { d1 *= -1.0D; - par3List.add(EnumChatFormatting.RED + StatCollector.translateToLocalFormatted("attribute.modifier.take." + attributemodifier2.getOperation(), new Object[]{ItemStack.DECIMALFORMAT.format(d1), StatCollector.translateToLocal("attribute.name." + (String) entry1.getKey())})); + par3List.add(EnumChatFormatting.RED + StatCollector.translateToLocalFormatted("attribute.modifier.take." + attributemodifier2.getOperation(), new Object[]{ItemStack.field_111284_a.format(d1), StatCollector.translateToLocal("attribute.name." + (String) entry1.getKey())})); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java index fe205e3d..4f7caa72 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyReagent.java @@ -1,23 +1,82 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import java.util.List; - +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; - import org.lwjgl.input.Keyboard; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +import java.util.List; public class AlchemyReagent extends Item { public AlchemyReagent() { super(); - setMaxStackSize(64); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.setMaxStackSize(64); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + if (this == ModItems.incendium) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Incendium"); + return; + } + if (this == ModItems.magicales) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Magicales"); + return; + } + if (this == ModItems.sanctus) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Sanctus"); + return; + } + if (this == ModItems.aether) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Aether"); + return; + } + if (this == ModItems.simpleCatalyst) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SimpleCatalyst"); + return; + } + if (this == ModItems.crepitous) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Crepitous"); + return; + } + if (this == ModItems.crystallos) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Crystallos"); + return; + } + if (this == ModItems.terrae) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Terrae"); + return; + } + if (this == ModItems.aquasalus) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Aquasalus"); + return; + } + if (this == ModItems.tennebrae) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Tennebrae"); + } } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java index 594fce54..eb7885dd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AverageLengtheningCatalyst.java @@ -1,9 +1,20 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + public class AverageLengtheningCatalyst extends LengtheningCatalyst { public AverageLengtheningCatalyst() { super(2); } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:AverageLengtheningCatalyst"); + } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java index 8f6143b4..1fb50aec 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AveragePowerCatalyst.java @@ -1,9 +1,20 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + public class AveragePowerCatalyst extends PowerCatalyst { public AveragePowerCatalyst() { super(2); } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:AveragePowerCatalyst"); + } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/CombinationalCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/CombinationalCatalyst.java index d61144f7..071d7c9b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/CombinationalCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/CombinationalCatalyst.java @@ -1,12 +1,24 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import net.minecraft.item.Item; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.alchemy.ICombinationalCatalyst; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.Item; public class CombinationalCatalyst extends Item implements ICombinationalCatalyst { public CombinationalCatalyst() { super(); + this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:CombinationalCatalyst"); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java index 4a870991..b4026634 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/EnhancedFillingAgent.java @@ -1,10 +1,16 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + public class EnhancedFillingAgent extends WeakFillingAgent { public EnhancedFillingAgent() { super(); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -35,4 +41,11 @@ public class EnhancedFillingAgent extends WeakFillingAgent } return 0; } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:EnhancedFillingAgent"); + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java index f0e63816..32d0e599 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterLengtheningCatalyst.java @@ -1,9 +1,20 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + public class GreaterLengtheningCatalyst extends LengtheningCatalyst { public GreaterLengtheningCatalyst() { super(3); } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:GreaterLengtheningCatalyst"); + } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java index 779d4d76..56dbe73f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/GreaterPowerCatalyst.java @@ -1,9 +1,20 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + public class GreaterPowerCatalyst extends PowerCatalyst { public GreaterPowerCatalyst() { super(3); } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:GreaterPowerCatalyst"); + } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/LengtheningCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/LengtheningCatalyst.java index 66bf2586..628ff26e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/LengtheningCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/LengtheningCatalyst.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; import WayofTime.alchemicalWizardry.common.ICatalyst; import net.minecraft.entity.player.EntityPlayer; @@ -18,6 +19,7 @@ public class LengtheningCatalyst extends Item implements ICatalyst public LengtheningCatalyst(int catalystStrength) { this.catalystStrength = catalystStrength; + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java index aa78b151..581a4575 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundaneLengtheningCatalyst.java @@ -1,9 +1,20 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + public class MundaneLengtheningCatalyst extends LengtheningCatalyst { public MundaneLengtheningCatalyst() { super(1); } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:MundaneLengtheningCatalyst"); + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java index 958b0013..0a85efbe 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/MundanePowerCatalyst.java @@ -1,9 +1,20 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + public class MundanePowerCatalyst extends PowerCatalyst { public MundanePowerCatalyst() { super(1); } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:MundanePowerCatalyst"); + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/PowerCatalyst.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/PowerCatalyst.java index 967a0d34..fc965408 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/PowerCatalyst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/PowerCatalyst.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; import WayofTime.alchemicalWizardry.common.ICatalyst; import net.minecraft.entity.player.EntityPlayer; @@ -20,6 +21,7 @@ public class PowerCatalyst extends Item implements ICatalyst { super(); this.catalystStrength = catalystStrength; + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java index 8e70f9ea..8c963024 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardBindingAgent.java @@ -1,23 +1,26 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import java.util.List; - +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +import WayofTime.alchemicalWizardry.common.IBindingAgent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; - import org.lwjgl.input.Keyboard; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -import WayofTime.alchemicalWizardry.common.IBindingAgent; +import java.util.List; public class StandardBindingAgent extends Item implements IBindingAgent { public StandardBindingAgent() { super(); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -26,6 +29,13 @@ public class StandardBindingAgent extends Item implements IBindingAgent return (float) Math.pow(0.65, potions); } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:StandardBindingAgent"); + } + @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java index 21854904..c0a93be4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/StandardFillingAgent.java @@ -1,10 +1,16 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + public class StandardFillingAgent extends WeakFillingAgent { public StandardFillingAgent() { super(); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -22,4 +28,11 @@ public class StandardFillingAgent extends WeakFillingAgent return 0; } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:StandardFillingAgent"); + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java index bc755dc1..86c941e5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakBindingAgent.java @@ -1,5 +1,9 @@ package WayofTime.alchemicalWizardry.common.items.potion; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; + public class WeakBindingAgent extends StandardBindingAgent { public WeakBindingAgent() @@ -12,4 +16,11 @@ public class WeakBindingAgent extends StandardBindingAgent { return (float) Math.pow(0.4, potions); } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WeakBindingAgent"); + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java index 8203572a..d65b9e1c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/WeakFillingAgent.java @@ -1,24 +1,27 @@ package WayofTime.alchemicalWizardry.common.items.potion; -import java.util.List; -import java.util.Random; - +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +import WayofTime.alchemicalWizardry.common.IFillingAgent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; - import org.lwjgl.input.Keyboard; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -import WayofTime.alchemicalWizardry.common.IFillingAgent; +import java.util.List; +import java.util.Random; public class WeakFillingAgent extends Item implements IFillingAgent { public WeakFillingAgent() { super(); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -45,6 +48,13 @@ public class WeakFillingAgent extends Item implements IFillingAgent return 0; } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WeakFillingAgent"); + } + @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java index 74ce08b8..5e3250ff 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/InputRoutingFocus.java @@ -1,9 +1,20 @@ package WayofTime.alchemicalWizardry.common.items.routing; +import net.minecraft.client.renderer.texture.IIconRegister; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class InputRoutingFocus extends RoutingFocus { public InputRoutingFocus() { super(); } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:InputRoutingFocus"); + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/OutputRoutingFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/OutputRoutingFocus.java index b8a5f0fc..22965e3d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/OutputRoutingFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/OutputRoutingFocus.java @@ -2,23 +2,30 @@ package WayofTime.alchemicalWizardry.common.items.routing; import java.util.List; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitDefault; import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitGlobal; import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitIgnMeta; import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitMatchNBT; import WayofTime.alchemicalWizardry.common.routing.RoutingFocusLogicLimitModItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class OutputRoutingFocus extends RoutingFocus implements ILimitedRoutingFocus -{ +{ + IIcon modItemIcon; + IIcon ignMetaIcon; + IIcon matchNBTIcon; + IIcon globalIcon; + public OutputRoutingFocus() { super(); @@ -39,28 +46,58 @@ public class OutputRoutingFocus extends RoutingFocus implements ILimitedRoutingF } } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:OutputRoutingFocus"); + this.modItemIcon = iconRegister.registerIcon("AlchemicalWizardry:OutputRoutingFocusModItems"); + this.ignMetaIcon = iconRegister.registerIcon("AlchemicalWizardry:OutputRoutingFocusIgnMeta"); + this.matchNBTIcon = iconRegister.registerIcon("AlchemicalWizardry:OutputRoutingFocusMatchNBT"); + this.globalIcon = iconRegister.registerIcon("AlchemicalWizardry:OutputRoutingFocusGlobal"); + } + + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int damage) + { + switch(damage) + { + case 0: + return this.itemIcon; + case 1: + return this.modItemIcon; + case 2: + return this.ignMetaIcon; + case 3: + return this.matchNBTIcon; + case 4: + return this.globalIcon; + } + return this.itemIcon; + } + @Override public String getUnlocalizedName(ItemStack itemStack) { String addedString = ""; - switch (itemStack.getItemDamage()) + switch(itemStack.getItemDamage()) { - case 0: - addedString = "default"; - break; - case 1: - addedString = "modItem"; - break; - case 2: - addedString = "ignMeta"; - break; - case 3: - addedString = "matchNBT"; - break; - case 4: - addedString = "global"; - break; + case 0: + addedString = "default"; + break; + case 1: + addedString = "modItem"; + break; + case 2: + addedString = "ignMeta"; + break; + case 3: + addedString = "matchNBT"; + break; + case 4: + addedString = "global"; + break; } return super.getUnlocalizedName() + "." + addedString; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/RoutingFocus.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/RoutingFocus.java index cdcc8f61..32e456a7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/RoutingFocus.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/routing/RoutingFocus.java @@ -8,11 +8,10 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; -import net.minecraft.util.EnumFacing; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; @@ -42,18 +41,18 @@ public class RoutingFocus extends Item // // public void cycleDirection(ItemStack itemStack) // { -// EnumFacing dir = this.getSetDirection(itemStack); +// ForgeDirection dir = this.getSetDirection(itemStack); // int direction = dir.ordinal(); // direction++; -// if(direction >= EnumFacing.VALID_DIRECTIONS.length) +// if(direction >= ForgeDirection.VALID_DIRECTIONS.length) // { // direction = 0; // } // -// this.setSetDirection(itemStack, EnumFacing.getOrientation(direction)); +// this.setSetDirection(itemStack, ForgeDirection.getOrientation(direction)); // } - public EnumFacing getSetDirection(ItemStack itemStack) + public ForgeDirection getSetDirection(ItemStack itemStack) { if(!itemStack.hasTagCompound()) { @@ -62,10 +61,10 @@ public class RoutingFocus extends Item NBTTagCompound tag = itemStack.getTagCompound(); - return EnumFacing.getFront(tag.getInteger("direction")); + return ForgeDirection.getOrientation(tag.getInteger("direction")); } - public void setSetDirection(ItemStack itemStack, EnumFacing dir) + public void setSetDirection(ItemStack itemStack, ForgeDirection dir) { if(!itemStack.hasTagCompound()) { @@ -97,14 +96,14 @@ public class RoutingFocus extends Item } @Override - public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { if(world.isRemote) { return false; } - TileEntity tile = world.getTileEntity(pos); + TileEntity tile = world.getTileEntity(x, y, z); if(tile instanceof IInventory) { if(player.isSneaking()) @@ -112,7 +111,7 @@ public class RoutingFocus extends Item if(this instanceof ILimitedRoutingFocus) { int pastAmount = ((ILimitedRoutingFocus)this).getRoutingFocusLimit(stack); - int amount = SpellHelper.getNumberOfItemsInInventory((IInventory)tile, side); + int amount = SpellHelper.getNumberOfItemsInInventory((IInventory)tile, ForgeDirection.getOrientation(side)); if(amount != pastAmount) { ((ILimitedRoutingFocus)this).setRoutingFocusLimit(stack, amount); @@ -121,8 +120,8 @@ public class RoutingFocus extends Item } } - this.setCoordinates(stack, pos); - this.setSetDirection(stack, side); + this.setCoordinates(stack, x, y, z); + this.setSetDirection(stack, ForgeDirection.getOrientation(side)); return true; } @@ -130,7 +129,7 @@ public class RoutingFocus extends Item return true; } - public void setCoordinates(ItemStack itemStack, BlockPos pos) + public void setCoordinates(ItemStack itemStack, int x, int y, int z) { if(!itemStack.hasTagCompound()) { @@ -139,9 +138,9 @@ public class RoutingFocus extends Item NBTTagCompound tag = itemStack.getTagCompound(); - tag.setInteger("xCoord", pos.getX()); - tag.setInteger("yCoord", pos.getY()); - tag.setInteger("zCoord", pos.getZ()); + tag.setInteger("xCoord", x); + tag.setInteger("yCoord", y); + tag.setInteger("zCoord", z); } public int xCoord(ItemStack itemStack) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java index a654b677..78f7b38d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilAir.java @@ -2,6 +2,8 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import java.util.List; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -10,15 +12,19 @@ import net.minecraft.util.Vec3; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; -public class SigilAir extends BindableItems implements ArmourUpgrade, ISigil +public class SigilAir extends EnergyItems implements ArmourUpgrade, ISigil { public SigilAir() { super(); + this.maxStackSize = 1; + //setMaxDamage(1000); setEnergyUsed(50); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -32,10 +38,17 @@ public class SigilAir extends BindableItems implements ArmourUpgrade, ISigil } } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:AirSigil"); + } + @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -62,7 +75,7 @@ public class SigilAir extends BindableItems implements ArmourUpgrade, ISigil if (!par3EntityPlayer.capabilities.isCreativeMode) { - if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { if(!par2World.isRemote) { @@ -108,7 +121,8 @@ public class SigilAir extends BindableItems implements ArmourUpgrade, ISigil } @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) + public void onArmourUpdate(World world, EntityPlayer player, + ItemStack thisItemStack) { // TODO Auto-generated method stub player.fallDistance = 0; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilBloodLight.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilBloodLight.java index 1d3e9845..eeb69c9e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilBloodLight.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilBloodLight.java @@ -3,105 +3,113 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; import WayofTime.alchemicalWizardry.common.entity.projectile.EntityBloodLightProjectile; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; -public class SigilBloodLight extends BindableItems implements IHolding, ArmourUpgrade, ISigil +public class SigilBloodLight extends EnergyItems implements IHolding, ArmourUpgrade, ISigil { public SigilBloodLight() { super(); + this.maxStackSize = 1; setEnergyUsed(10); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override - public void addInformation(ItemStack itemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) + public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { par3List.add(StatCollector.translateToLocal("tooltip.bloodlightsigil.desc")); - if (!(itemStack.getTagCompound() == null)) + if (!(par1ItemStack.getTagCompound() == null)) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + itemStack.getTagCompound().getString("ownerName")); + par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); } } @Override - public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ) + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { - if(!BindableItems.checkAndSetItemOwner(itemStack, player) || !BindableItems.syphonBatteries(itemStack, player, getEnergyUsed())) + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodLightSigil"); + } + + @Override + public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) + { + if(!EnergyItems.checkAndSetItemOwner(par1ItemStack, par2EntityPlayer) || !EnergyItems.syphonBatteries(par1ItemStack, par2EntityPlayer, getEnergyUsed())) { return true; } - if (world.isRemote) + if (par3World.isRemote) { return true; } - IBlockState light = ModBlocks.blockBloodLight.getBlockState().getBaseState(); - - if (side.getIndex() == 0 && world.isAirBlock(blockPos.add(0, -1, 0))) + if (par7 == 0 && par3World.isAirBlock(par4, par5 - 1, par6)) { - world.setBlockState(blockPos.add(0, -1, 0), light); + par3World.setBlock(par4, par5 - 1, par6, ModBlocks.blockBloodLight); } - if (side.getIndex() == 1 && world.isAirBlock(blockPos.add(0, 1, 0))) + if (par7 == 1 && par3World.isAirBlock(par4, par5 + 1, par6)) { - world.setBlockState(blockPos.add(0, 1, 0), light); + par3World.setBlock(par4, par5 + 1, par6, ModBlocks.blockBloodLight); } - if (side.getIndex() == 2 && world.isAirBlock(blockPos.add(0, 0, -1))) + if (par7 == 2 && par3World.isAirBlock(par4, par5, par6 - 1)) { - world.setBlockState(blockPos.add(0, 0, -1), light); + par3World.setBlock(par4, par5, par6 - 1, ModBlocks.blockBloodLight); } - if (side.getIndex() == 3 && world.isAirBlock(blockPos.add(0, 0, 1))) + if (par7 == 3 && par3World.isAirBlock(par4, par5, par6 + 1)) { - world.setBlockState(blockPos.add(0, 0, 1), light); + par3World.setBlock(par4, par5, par6 + 1, ModBlocks.blockBloodLight); } - if (side.getIndex() == 4 && world.isAirBlock(blockPos.add(-1, 0, 0))) + if (par7 == 4 && par3World.isAirBlock(par4 - 1, par5, par6)) { - world.setBlockState(blockPos.add(-1, 0, 0), light); + par3World.setBlock(par4 - 1, par5, par6, ModBlocks.blockBloodLight); } - if (side.getIndex() == 5 && world.isAirBlock(blockPos.add(1, 0, 0))) + if (par7 == 5 && par3World.isAirBlock(par4 + 1, par5, par6)) { - world.setBlockState(blockPos.add(1, 0, 0), light); + par3World.setBlock(par4 + 1, par5, par6, ModBlocks.blockBloodLight); } return true; } @Override - public ItemStack onItemRightClick(ItemStack itemStack, World par2World, EntityPlayer par3EntityPlayer) + public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(itemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { - return itemStack; + return par1ItemStack; } - if (itemStack.getTagCompound() == null) + if (par1ItemStack.getTagCompound() == null) { - itemStack.setTagCompound(new NBTTagCompound()); + par1ItemStack.setTagCompound(new NBTTagCompound()); } - if(!BindableItems.syphonBatteries(itemStack, par3EntityPlayer, getEnergyUsed() * 5)) + if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed() * 5)) { - return itemStack; + return par1ItemStack; } if (!par2World.isRemote) @@ -109,13 +117,13 @@ public class SigilBloodLight extends BindableItems implements IHolding, ArmourUp par2World.spawnEntityInWorld(new EntityBloodLightProjectile(par2World, par3EntityPlayer, 10)); } - return itemStack; + return par1ItemStack; } @Override public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) { - player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 400, 9, true, false)); + player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 400, 9, true)); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilDivination.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilDivination.java index fdda6857..26f59fae 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilDivination.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilDivination.java @@ -4,28 +4,42 @@ import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChatComponentText; -import net.minecraft.util.EnumFacing; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; -public class SigilDivination extends BindableItems implements ArmourUpgrade, IReagentManipulator, IBindable, ISigil +public class SigilDivination extends Item implements ArmourUpgrade, IReagentManipulator, IBindable, ISigil { public SigilDivination() { super(); + this.maxStackSize = 1; + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DivinationSigil"); } @Override @@ -43,14 +57,14 @@ public class SigilDivination extends BindableItems implements ArmourUpgrade, IRe @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); + EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.worldObj.isRemote) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.worldObj.isRemote) { return par1ItemStack; } - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 0)) + if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 0)) { return par1ItemStack; } @@ -75,7 +89,11 @@ public class SigilDivination extends BindableItems implements ArmourUpgrade, IRe { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - TileEntity tile = par2World.getTileEntity(movingobjectposition.func_178782_a()); + int x = movingobjectposition.blockX; + int y = movingobjectposition.blockY; + int z = movingobjectposition.blockZ; + + TileEntity tile = par2World.getTileEntity(x, y, z); if (!(tile instanceof IReagentHandler)) { @@ -86,7 +104,7 @@ public class SigilDivination extends BindableItems implements ArmourUpgrade, IRe IReagentHandler relay = (IReagentHandler) tile; - ReagentContainerInfo[] infoList = relay.getContainerInfo(EnumFacing.DOWN); + ReagentContainerInfo[] infoList = relay.getContainerInfo(ForgeDirection.UNKNOWN); if (infoList != null) { for (ReagentContainerInfo info : infoList) @@ -104,7 +122,10 @@ public class SigilDivination extends BindableItems implements ArmourUpgrade, IRe } @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {} + public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) + { + } + @Override public boolean isUpgrade() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilFluid.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilFluid.java index e15a5a4d..8dbc8541 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilFluid.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilFluid.java @@ -3,22 +3,28 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.MaterialLiquid; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.*; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.*; import java.util.ArrayList; import java.util.List; -public class SigilFluid extends BindableItems implements IFluidContainerItem, ISigil +public class SigilFluid extends Item implements IFluidContainerItem, ISigil { private int capacity = 128 * 1000; private static final int STATE_SYPHON = 0; @@ -33,6 +39,8 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS { super(); this.setMaxDamage(0); + this.setMaxStackSize(1); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -78,6 +86,13 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS } } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WaterSigil"); + } + @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -181,6 +196,7 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS } int range = 5; + float f = 1.0F; boolean flag = true; MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, flag); @@ -191,12 +207,16 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - if (!world.canMineBlockBody(player, movingobjectposition.func_178782_a())) + int x = movingobjectposition.blockX; + int y = movingobjectposition.blockY; + int z = movingobjectposition.blockZ; + + if (!world.canMineBlock(player, x, y, z)) { return container; } - if (!player.func_175151_a(movingobjectposition.func_178782_a(), movingobjectposition.field_178784_b, container)) + if (!player.canPlayerEdit(x, y, z, movingobjectposition.sideHit, container)) { return container; } @@ -214,11 +234,7 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS } } - List<Int3> positionList = new ArrayList<Int3>(); - - int x = movingobjectposition.func_178782_a().getX(); - int y = movingobjectposition.func_178782_a().getY(); - int z = movingobjectposition.func_178782_a().getZ(); + List<Int3> positionList = new ArrayList(); boolList[range][range][range] = true; positionList.add(new Int3(range, range, range)); @@ -238,7 +254,7 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS { if (i - 1 >= 0 && !boolList[i - 1][j][k]) { - Block block = world.getBlockState(new BlockPos(x - range + i - 1, y - range + j, z - range + k)).getBlock(); + Block block = world.getBlock(x - range + i - 1, y - range + j, z - range + k); Fluid fluid = FluidRegistry.lookupFluidForBlock(block); if (fluid != null) @@ -251,7 +267,7 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS if (j - 1 >= 0 && !boolList[i][j - 1][k]) { - Block block = world.getBlockState(new BlockPos(x - range + i, y - range + j - 1, z - range + k)).getBlock(); + Block block = world.getBlock(x - range + i, y - range + j - 1, z - range + k); Fluid fluid = FluidRegistry.lookupFluidForBlock(block); if (fluid != null) @@ -264,7 +280,7 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS if (k - 1 >= 0 && !boolList[i][j][k - 1]) { - Block block = world.getBlockState(new BlockPos(x - range + i, y - range + j, z - range + k - 1)).getBlock(); + Block block = world.getBlock(x - range + i, y - range + j, z - range + k - 1); Fluid fluid = FluidRegistry.lookupFluidForBlock(block); if (fluid != null) @@ -277,7 +293,7 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS if (i + 1 <= 2 * range && !boolList[i + 1][j][k]) { - Block block = world.getBlockState(new BlockPos(x - range + i + 1, y - range + j, z - range + k)).getBlock(); + Block block = world.getBlock(x - range + i + 1, y - range + j, z - range + k); Fluid fluid = FluidRegistry.lookupFluidForBlock(block); if (fluid != null) @@ -290,7 +306,7 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS if (j + 1 <= 2 * range && !boolList[i][j + 1][k]) { - Block block = world.getBlockState(new BlockPos(x - range + i, y - range + j + 1, z - range + k)).getBlock(); + Block block = world.getBlock(x - range + i, y - range + j + 1, z - range + k); Fluid fluid = FluidRegistry.lookupFluidForBlock(block); if (fluid != null) @@ -303,7 +319,7 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS if (k + 1 <= 2 * range && !boolList[i][j][k + 1]) { - Block block = world.getBlockState(new BlockPos(x - range + i, y - range + j, z - range + k + 1)).getBlock(); + Block block = world.getBlock(x - range + i, y - range + j, z - range + k + 1); Fluid fluid = FluidRegistry.lookupFluidForBlock(block); if (fluid != null) @@ -329,10 +345,10 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS { continue; } - if (world.getBlockState(new BlockPos(x + i - range, y + j - range, z + k - range)).getBlock() != null && world.getBlockState(new BlockPos(x + i - range, y + j - range, z + k - range)).getBlock().getMaterial() instanceof MaterialLiquid) + if (world.getBlock(x + i - range, y + j - range, z + k - range) != null && world.getBlock(x + i - range, y + j - range, z + k - range).getMaterial() instanceof MaterialLiquid) { //world.setBlockToAir(x+i-range, y+j-range, z+k-range); - Block block = world.getBlockState(new BlockPos(x + i - range, y + j - range, z + k - range)).getBlock(); + Block block = world.getBlock(x + i - range, y + j - range, z + k - range); if (block == null) { continue; @@ -342,7 +358,7 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS AlchemicalWizardry.logger.info("x: " + (i - range) + " y: " + (j - range) + " z: " + (k - range)); - if (fluid == null || world.getBlockState(new BlockPos(x + i - range, y + j - range, z + k - range)).getBlock().getMetaFromState(world.getBlockState(new BlockPos(x + i - range, y + j - range, z + k - range))) != 0) + if (fluid == null || world.getBlockMetadata(x + i - range, y + j - range, z + k - range) != 0) { continue; } @@ -355,7 +371,8 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS if ((amount > 0 && forceFill) || (amount >= 1000 && !forceFill)) { { - world.setBlockToAir(new BlockPos(x + i - range, y + j - range, z + k - range)); + world.setBlockToAir(x + i - range, y + j - range, z + k - range); + } this.fill(container, new FluidStack(fluid, 1000), true); @@ -370,6 +387,7 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS public ItemStack fillItemFromWorld(ItemStack container, World world, EntityPlayer player, boolean forceFill) { + float f = 1.0F; boolean flag = true; MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, flag); @@ -380,19 +398,23 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - if (!world.canMineBlockBody(player, movingobjectposition.func_178782_a())) + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + + if (!world.canMineBlock(player, i, j, k)) { return container; } - if (!player.func_175151_a(movingobjectposition.func_178782_a(), movingobjectposition.field_178784_b, container)) + if (!player.canPlayerEdit(i, j, k, movingobjectposition.sideHit, container)) { return container; } - if (world.getBlockState(movingobjectposition.func_178782_a()).getBlock() != null && world.getBlockState(movingobjectposition.func_178782_a()).getBlock().getMaterial() instanceof MaterialLiquid) + if (world.getBlock(i, j, k) != null && world.getBlock(i, j, k).getMaterial() instanceof MaterialLiquid) { - Block block = world.getBlockState(movingobjectposition.func_178782_a()).getBlock(); + Block block = world.getBlock(i, j, k); Fluid fluid = FluidRegistry.lookupFluidForBlock(block); if (fluid == null) @@ -408,7 +430,7 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS { if (!player.capabilities.isCreativeMode) { - world.setBlockToAir(movingobjectposition.func_178782_a()); + world.setBlockToAir(i, j, k); } this.fill(container, new FluidStack(fluid, 1000), true); @@ -433,6 +455,12 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS if (simStack != null && simStack.amount >= 1000) { + Block fluidBlock = simStack.getFluid().getBlock(); + + float f = 1.0F; + double d0 = player.prevPosX + (player.posX - player.prevPosX) * (double) f; + double d1 = player.prevPosY + (player.posY - player.prevPosY) * (double) f + 1.62D - (double) player.yOffset; + double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f; boolean flag = false; MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, flag); @@ -443,56 +471,57 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - if (!world.canMineBlockBody(player, movingobjectposition.func_178782_a())) + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + + if (!world.canMineBlock(player, i, j, k)) { return container; } - - int i = movingobjectposition.func_178782_a().getX(); - int j = movingobjectposition.func_178782_a().getY(); - int k = movingobjectposition.func_178782_a().getZ(); - if (movingobjectposition.field_178784_b.getIndex() == 0) + if (movingobjectposition.sideHit == 0) { --j; } - if (movingobjectposition.field_178784_b.getIndex() == 1) + if (movingobjectposition.sideHit == 1) { ++j; } - if (movingobjectposition.field_178784_b.getIndex() == 2) + if (movingobjectposition.sideHit == 2) { --k; } - if (movingobjectposition.field_178784_b.getIndex() == 3) + if (movingobjectposition.sideHit == 3) { ++k; } - if (movingobjectposition.field_178784_b.getIndex() == 4) + if (movingobjectposition.sideHit == 4) { --i; } - if (movingobjectposition.field_178784_b.getIndex() == 5) + if (movingobjectposition.sideHit == 5) { ++i; } - if (!player.func_175151_a(new BlockPos(i, j, k), movingobjectposition.field_178784_b, container)) + if (!player.canPlayerEdit(i, j, k, movingobjectposition.sideHit, container)) { return container; } - if (this.tryPlaceContainedLiquid(world, new BlockPos(i, j, k)) && !player.capabilities.isCreativeMode) + if (this.tryPlaceContainedLiquid(world, fluidBlock, d0, d1, d2, i, j, k) && !player.capabilities.isCreativeMode) { this.drain(container, 1000, true); return container; } + } return container; @@ -502,28 +531,27 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS return container; } - public boolean tryPlaceContainedLiquid(World world, BlockPos blockPos) + public boolean tryPlaceContainedLiquid(World par1World, Block block, double par2, double par4, double par6, int par8, int par9, int par10) { - if (!world.isAirBlock(blockPos) && world.getBlockState(blockPos).getBlock().getMaterial().isSolid()) //TODO Was func_149730_j() so check this! + if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlock(par8, par9, par10).func_149730_j()) { return false; - } else if ((world.getBlockState(blockPos).getBlock().getMaterial() instanceof MaterialLiquid && world.getBlockState(blockPos).getBlock().getMetaFromState(world.getBlockState(blockPos)) == 0)) + } else if ((par1World.getBlock(par8, par9, par10).getMaterial() instanceof MaterialLiquid && (par1World.getBlockMetadata(par8, par9, par10) == 0))) { return false; } else { - Block block = world.getBlockState(blockPos).getBlock(); - if ((block == Blocks.water || block == Blocks.flowing_water) && world.provider.func_177500_n()) + if ((block == Blocks.water || block == Blocks.flowing_water) && par1World.provider.isHellWorld) { - world.playSoundEffect(blockPos.getX() + 0.5D, blockPos.getY() + 0.5D, blockPos.getZ() + 0.5D, "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); + par1World.playSoundEffect(par2 + 0.5D, par4 + 0.5D, par6 + 0.5D, "random.fizz", 0.5F, 2.6F + (par1World.rand.nextFloat() - par1World.rand.nextFloat()) * 0.8F); for (int l = 0; l < 8; ++l) { - world.spawnParticle(EnumParticleTypes.SMOKE_LARGE, (double) blockPos.getX() + Math.random(), (double) blockPos.getY() + Math.random(), (double) blockPos.getZ() + Math.random(), 0.0D, 0.0D, 0.0D); + par1World.spawnParticle("largesmoke", (double) par8 + Math.random(), (double) par9 + Math.random(), (double) par10 + Math.random(), 0.0D, 0.0D, 0.0D); } } else { - world.setBlockState(blockPos, block.getBlockState().getBaseState()); + par1World.setBlock(par8, par9, par10, block, 0, 3); } return true; @@ -550,11 +578,15 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - TileEntity tile = world.getTileEntity(movingobjectposition.func_178782_a()); + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + + TileEntity tile = world.getTileEntity(i, j, k); if (tile instanceof IFluidHandler) { - int amount = ((IFluidHandler) tile).fill(movingobjectposition.field_178784_b, fluid, true); + int amount = ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(movingobjectposition.sideHit), fluid, true); this.drain(container, amount, true); } @@ -577,17 +609,21 @@ public class SigilFluid extends BindableItems implements IFluidContainerItem, IS { if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - TileEntity tile = world.getTileEntity(movingobjectposition.func_178782_a()); + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + + TileEntity tile = world.getTileEntity(i, j, k); if (tile instanceof IFluidHandler) { - FluidStack fluidAmount = ((IFluidHandler) tile).drain(movingobjectposition.field_178784_b, this.getCapacity(container), false); + FluidStack fluidAmount = ((IFluidHandler) tile).drain(ForgeDirection.getOrientation(movingobjectposition.sideHit), this.getCapacity(container), false); int amount = this.fill(container, fluidAmount, false); if (amount > 0) { - ((IFluidHandler) tile).drain(movingobjectposition.field_178784_b, this.getCapacity(container), true); + ((IFluidHandler) tile).drain(ForgeDirection.getOrientation(movingobjectposition.sideHit), this.getCapacity(container), true); this.fill(container, fluidAmount, true); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilHarvest.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilHarvest.java index 3699f4c0..08db2402 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilHarvest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilHarvest.java @@ -3,24 +3,35 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; +import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; -public class SigilHarvest extends SigilToggleable implements IHolding, ArmourUpgrade, ISigil +public class SigilHarvest extends EnergyItems implements IHolding, ArmourUpgrade, ISigil { + @SideOnly(Side.CLIENT) + private IIcon activeIcon; + @SideOnly(Side.CLIENT) + private IIcon passiveIcon; + public SigilHarvest() { super(); + this.maxStackSize = 1; setEnergyUsed(500); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -30,7 +41,7 @@ public class SigilHarvest extends SigilToggleable implements IHolding, ArmourUpg if (!(par1ItemStack.getTagCompound() == null)) { - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -42,10 +53,51 @@ public class SigilHarvest extends SigilToggleable implements IHolding, ArmourUpg } } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:HarvestGoddessSigil_deactivated"); + this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:HarvestGoddessSigil_activated"); + this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:HarvestGoddessSigil_deactivated"); + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) + { + if (stack.getTagCompound() == null) + { + stack.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound tag = stack.getTagCompound(); + + if (tag.getBoolean("isActive")) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) + { + if (par1 == 1) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -56,18 +108,18 @@ public class SigilHarvest extends SigilToggleable implements IHolding, ArmourUpg } NBTTagCompound tag = par1ItemStack.getTagCompound(); - this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); + tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); - if (this.getActivated(par1ItemStack)) + if (tag.getBoolean("isActive")) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); if (!par3EntityPlayer.capabilities.isCreativeMode) { - if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - this.setActivated(par1ItemStack, false); + tag.setBoolean("isActive", false); } } } else @@ -93,7 +145,7 @@ public class SigilHarvest extends SigilToggleable implements IHolding, ArmourUpg par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { int range = 3; int verticalRange = 1; @@ -107,18 +159,18 @@ public class SigilHarvest extends SigilToggleable implements IHolding, ArmourUpg { for (int iy = posY - verticalRange; iy <= posY + verticalRange; iy++) { - HarvestRegistry.harvestBlock(par2World, new BlockPos(ix, iy, iz)); + HarvestRegistry.harvestBlock(par2World, ix, iy, iz); } } } } - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) + if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - this.setActivated(par1ItemStack, false); + par1ItemStack.getTagCompound().setBoolean("isActive", false); } } } @@ -143,7 +195,7 @@ public class SigilHarvest extends SigilToggleable implements IHolding, ArmourUpg { for (int iy = posY - verticalRange; iy <= posY + verticalRange; iy++) { - HarvestRegistry.harvestBlock(world, new BlockPos(ix, iy, iz)); + HarvestRegistry.harvestBlock(world, ix, iy, iz); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilLava.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilLava.java index 58638712..cbc7dc86 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilLava.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilLava.java @@ -5,6 +5,7 @@ import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.inventory.IInventory; @@ -13,16 +14,18 @@ import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.items.Orb; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyBattery; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil { @@ -35,7 +38,16 @@ public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil public SigilLava() { super(Blocks.lava); + this.maxStackSize = 1; setEnergyUsed(1000); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:LavaSigil"); } @Override @@ -68,27 +80,27 @@ public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil } @Override - public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { - if (world.isRemote || !BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (world.isRemote || !EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return false; } - if (!world.canMineBlockBody(player, blockPos)) + if (!world.canMineBlock(player, x, y, z)) { return false; } - TileEntity tile = world.getTileEntity(blockPos); + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof IFluidHandler) { FluidStack fluid = new FluidStack(FluidRegistry.LAVA, 1000); - int amount = ((IFluidHandler) tile).fill(side, fluid, false); + int amount = ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(side), fluid, false); - if (amount > 0 && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) + if (amount > 0 && EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) { - ((IFluidHandler) tile).fill(side, fluid, true); + ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(side), fluid, true); } return false; @@ -99,79 +111,74 @@ public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil } { - int x = blockPos.getX(); - int y = blockPos.getY(); - int z = blockPos.getZ(); - - if (side.getIndex() == 0) + if (side == 0) { --y; } - if (side.getIndex() == 1) + if (side == 1) { ++y; } - if (side.getIndex() == 2) + if (side == 2) { --z; } - if (side.getIndex() == 3) + if (side == 3) { ++z; } - if (side.getIndex() == 4) + if (side == 4) { --x; } - if (side.getIndex() == 5) + if (side == 5) { ++x; } - if (!player.func_175151_a(new BlockPos(x, y, z), side, stack)) + if (!player.canPlayerEdit(x, y, z, side, stack)) { return false; } - if(this.canPlaceContainedLiquid(world, new BlockPos(x, y, z)) && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) + if(this.canPlaceContainedLiquid(world, x, y, z, x, y, z) && EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) { - return this.func_180616_a(world, new BlockPos(x, y, z)); + return this.tryPlaceContainedLiquid(world, x, y, z, x, y, z); } } return false; } - @Override /** * Attempts to place the liquid contained inside the bucket. */ - public boolean func_180616_a(World par1World, BlockPos blockPos) + public boolean tryPlaceContainedLiquid(World par1World, double par2, double par4, double par6, int par8, int par9, int par10) { - if (!par1World.isAirBlock(blockPos) && par1World.getBlockState(blockPos).getBlock().getMaterial().isSolid()) + if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlock(par8, par9, par10).getMaterial().isSolid()) { return false; - } else if ((par1World.getBlockState(blockPos).getBlock() == Blocks.lava || par1World.getBlockState(blockPos).getBlock() == Blocks.flowing_lava) && par1World.getBlockState(blockPos).getBlock().getMetaFromState(par1World.getBlockState(blockPos)) == 0) + } else if ((par1World.getBlock(par8, par9, par10) == Blocks.lava || par1World.getBlock(par8, par9, par10) == Blocks.flowing_lava) && par1World.getBlockMetadata(par8, par9, par10) == 0) { return false; } else { - par1World.setBlockState(blockPos, this.isFull.getBlockState().getBaseState()); + par1World.setBlock(par8, par9, par10, this.isFull, 0, 3); return true; } } - public boolean canPlaceContainedLiquid(World par1World, BlockPos blockPos) + public boolean canPlaceContainedLiquid(World par1World, double par2, double par4, double par6, int par8, int par9, int par10) { - if (!par1World.isAirBlock(blockPos) && par1World.getBlockState(blockPos).getBlock().getMaterial().isSolid()) + if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlock(par8, par9, par10).getMaterial().isSolid()) { return false; - } else if ((par1World.getBlockState(blockPos).getBlock() == Blocks.lava || par1World.getBlockState(blockPos).getBlock() == Blocks.flowing_lava) && par1World.getBlockState(blockPos).getBlock().getMetaFromState(par1World.getBlockState(blockPos)) == 0) + } else if ((par1World.getBlock(par8, par9, par10) == Blocks.lava || par1World.getBlock(par8, par9, par10) == Blocks.flowing_lava) && par1World.getBlockMetadata(par8, par9, par10) == 0) { return false; } else @@ -205,7 +212,7 @@ public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil { continue; } - if (stack.getItem() instanceof Orb && !usedBattery) + if (stack.getItem() instanceof EnergyBattery && !usedBattery) { if (stack.getItemDamage() <= stack.getMaxDamage() - damageToBeDone) { @@ -225,7 +232,7 @@ public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil @Override public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) { - player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 9, true, false)); + player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 9, true)); player.extinguish(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java index 9882d773..7d636c01 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfElementalAffinity.java @@ -1,24 +1,36 @@ package WayofTime.alchemicalWizardry.common.items.sigil; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import java.util.List; -public class SigilOfElementalAffinity extends SigilToggleable implements ISigil +public class SigilOfElementalAffinity extends EnergyItems implements ISigil { + @SideOnly(Side.CLIENT) + private IIcon activeIcon; + @SideOnly(Side.CLIENT) + private IIcon passiveIcon; + public SigilOfElementalAffinity() { super(); + this.maxStackSize = 1; setEnergyUsed(200); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -29,7 +41,7 @@ public class SigilOfElementalAffinity extends SigilToggleable implements ISigil if (!(par1ItemStack.getTagCompound() == null)) { - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -41,10 +53,51 @@ public class SigilOfElementalAffinity extends SigilToggleable implements ISigil } } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfTheFastMiner"); + this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:ElementalSigil_activated"); + this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:ElementalSigil_deactivated"); + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) + { + if (stack.getTagCompound() == null) + { + stack.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound tag = stack.getTagCompound(); + + if (tag.getBoolean("isActive")) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) + { + if (par1 == 1) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -55,14 +108,14 @@ public class SigilOfElementalAffinity extends SigilToggleable implements ISigil } NBTTagCompound tag = par1ItemStack.getTagCompound(); - this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); + tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); - if (this.getActivated(par1ItemStack) && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); - par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 0, true, false)); - par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 0, true, false)); + par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 0, true)); + par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 0, true)); } else { par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); @@ -86,20 +139,20 @@ public class SigilOfElementalAffinity extends SigilToggleable implements ISigil par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { par3EntityPlayer.fallDistance = 0; - par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 0, true, false)); - par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 0, true, false)); + par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 0, true)); + par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 0, true)); } - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) + if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - this.setActivated(par1ItemStack, false); + par1ItemStack.getTagCompound().setBoolean("isActive", false); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfEnderSeverance.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfEnderSeverance.java index ffd3e7a5..5ed0ea63 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfEnderSeverance.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfEnderSeverance.java @@ -3,25 +3,36 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import java.util.List; -public class SigilOfEnderSeverance extends SigilToggleable implements IHolding, ISigil +public class SigilOfEnderSeverance extends EnergyItems implements IHolding, ISigil { + @SideOnly(Side.CLIENT) + private IIcon activeIcon; + @SideOnly(Side.CLIENT) + private IIcon passiveIcon; + public SigilOfEnderSeverance() { super(); + this.maxStackSize = 1; setEnergyUsed(200); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -31,7 +42,7 @@ public class SigilOfEnderSeverance extends SigilToggleable implements IHolding, if (!(par1ItemStack.getTagCompound() == null)) { - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -43,10 +54,51 @@ public class SigilOfEnderSeverance extends SigilToggleable implements IHolding, } } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfSeverance_deactivated"); + this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfSeverance_activated"); + this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfSeverance_deactivated"); + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) + { + if (stack.getTagCompound() == null) + { + stack.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound tag = stack.getTagCompound(); + + if (tag.getBoolean("isActive")) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) + { + if (par1 == 1) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -57,18 +109,18 @@ public class SigilOfEnderSeverance extends SigilToggleable implements IHolding, } NBTTagCompound tag = par1ItemStack.getTagCompound(); - this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); + tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); - if (this.getActivated(par1ItemStack)) + if (tag.getBoolean("isActive")) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); if (!par3EntityPlayer.capabilities.isCreativeMode) { - if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - this.setActivated(par1ItemStack, false); + tag.setBoolean("isActive", false); } } } else @@ -94,7 +146,7 @@ public class SigilOfEnderSeverance extends SigilToggleable implements IHolding, par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { List<Entity> list = SpellHelper.getEntitiesInRange(par2World, par3Entity.posX, par3Entity.posY, par3Entity.posZ, 4.5, 4.5); for (Entity entity : list) @@ -105,15 +157,17 @@ public class SigilOfEnderSeverance extends SigilToggleable implements IHolding, } } } - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) + if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - this.setActivated(par1ItemStack, false); + par1ItemStack.getTagCompound().setBoolean("isActive", false); } } } + + return; } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java index aefe2d9c..f888d5a2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java @@ -1,33 +1,43 @@ package WayofTime.alchemicalWizardry.common.items.sigil; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.common.eventhandler.Event.Result; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; import net.minecraft.block.IGrowable; -import net.minecraft.block.state.IBlockState; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; +import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.IPlantable; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.player.BonemealEvent; -import net.minecraftforge.fml.common.eventhandler.Event; + import java.util.List; -public class SigilOfGrowth extends SigilToggleable implements ArmourUpgrade, ISigil +public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil { + @SideOnly(Side.CLIENT) + private IIcon activeIcon; + @SideOnly(Side.CLIENT) + private IIcon passiveIcon; private int tickDelay = 100; public SigilOfGrowth() { super(); + this.maxStackSize = 1; setEnergyUsed(150); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -38,7 +48,7 @@ public class SigilOfGrowth extends SigilToggleable implements ArmourUpgrade, ISi if (!(par1ItemStack.getTagCompound() == null)) { - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -51,17 +61,58 @@ public class SigilOfGrowth extends SigilToggleable implements ArmourUpgrade, ISi } @Override - public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { - if (BindableItems.checkAndSetItemOwner(stack, playerIn)) - { - if (applyBonemeal(stack, worldIn, pos, playerIn)) - { - BindableItems.syphonBatteries(stack, playerIn, getEnergyUsed()); + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:GrowthSigil_deactivated"); + this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:GrowthSigil_activated"); + this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:GrowthSigil_deactivated"); + } - if (worldIn.isRemote) + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) + { + if (stack.getTagCompound() == null) + { + stack.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound tag = stack.getTagCompound(); + + if (tag.getBoolean("isActive")) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) + { + if (par1 == 1) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + + @Override + public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) + { + if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par2EntityPlayer)) + { + if (applyBonemeal(par1ItemStack, par3World, par4, par5, par6, par2EntityPlayer)) + { + EnergyItems.syphonBatteries(par1ItemStack, par2EntityPlayer, getEnergyUsed()); + + if (par3World.isRemote) { - worldIn.playAuxSFX(2005, pos, 0); + par3World.playAuxSFX(2005, par4, par5, par6, 0); return true; } @@ -74,7 +125,7 @@ public class SigilOfGrowth extends SigilToggleable implements ArmourUpgrade, ISi @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -92,7 +143,7 @@ public class SigilOfGrowth extends SigilToggleable implements ArmourUpgrade, ISi NBTTagCompound tag = par1ItemStack.getTagCompound(); tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); - if (tag.getBoolean("isActive") && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay); @@ -117,13 +168,13 @@ public class SigilOfGrowth extends SigilToggleable implements ArmourUpgrade, ISi par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) { - if(!BindableItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed())) + if(!EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed())) { - this.setActivated(par1ItemStack, false); + par1ItemStack.getTagCompound().setBoolean("isActive", false); } } int range = 3; @@ -138,13 +189,14 @@ public class SigilOfGrowth extends SigilToggleable implements ArmourUpgrade, ISi { for (int iy = posY - verticalRange; iy <= posY + verticalRange; iy++) { - IBlockState block = par2World.getBlockState(new BlockPos(ix, iy, iz)); + Block block = par2World.getBlock(ix, iy, iz); + if (block instanceof IPlantable || block instanceof IGrowable) { if (par2World.rand.nextInt(50) == 0) { - block.getBlock().updateTick(par2World, new BlockPos(ix, iy, iz), block, par2World.rand); + block.updateTick(par2World, ix, iy, iz, par2World.rand); } } } @@ -153,17 +205,17 @@ public class SigilOfGrowth extends SigilToggleable implements ArmourUpgrade, ISi } } - public static boolean applyBonemeal(ItemStack p_179234_0_, World world, BlockPos blockPos, EntityPlayer player) + public static boolean applyBonemeal(ItemStack p_150919_0_, World p_150919_1_, int p_150919_2_, int p_150919_3_, int p_150919_4_, EntityPlayer player) { - IBlockState block = world.getBlockState(blockPos); + Block block = p_150919_1_.getBlock(p_150919_2_, p_150919_3_, p_150919_4_); - BonemealEvent event = new BonemealEvent(player, world, blockPos, block); + BonemealEvent event = new BonemealEvent(player, p_150919_1_, block, p_150919_2_, p_150919_3_, p_150919_4_); if (MinecraftForge.EVENT_BUS.post(event)) { return false; } - if (event.getResult() == Event.Result.ALLOW) + if (event.getResult() == Result.ALLOW) { return true; } @@ -172,14 +224,16 @@ public class SigilOfGrowth extends SigilToggleable implements ArmourUpgrade, ISi { IGrowable igrowable = (IGrowable) block; - if (igrowable.isStillGrowing(world, blockPos, block, world.isRemote)) + if (igrowable.func_149851_a(p_150919_1_, p_150919_2_, p_150919_3_, p_150919_4_, p_150919_1_.isRemote)) { - if (!world.isRemote) + if (!p_150919_1_.isRemote) { - if (igrowable.canUseBonemeal(world, world.rand, blockPos, block)) + if (igrowable.func_149852_a(p_150919_1_, p_150919_1_.rand, p_150919_2_, p_150919_3_, p_150919_4_)) { - igrowable.grow(world, world.rand, blockPos, block); + igrowable.func_149853_b(p_150919_1_, p_150919_1_.rand, p_150919_2_, p_150919_3_, p_150919_4_); } + + } return true; @@ -209,13 +263,13 @@ public class SigilOfGrowth extends SigilToggleable implements ArmourUpgrade, ISi { for (int iy = posY - verticalRange; iy <= posY + verticalRange; iy++) { - IBlockState block = world.getBlockState(new BlockPos(ix, iy, iz)); + Block block = world.getBlock(ix, iy, iz); if (block instanceof IPlantable) { if (world.rand.nextInt(100) == 0) { - block.getBlock().updateTick(world, new BlockPos(ix, iy, iz), block, world.rand); + block.updateTick(world, ix, iy, iz, world.rand); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java index 8ed6ece0..12b772ca 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHaste.java @@ -3,23 +3,34 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import java.util.List; -public class SigilOfHaste extends SigilToggleable implements ArmourUpgrade, ISigil +public class SigilOfHaste extends EnergyItems implements ArmourUpgrade, ISigil { + @SideOnly(Side.CLIENT) + private IIcon activeIcon; + @SideOnly(Side.CLIENT) + private IIcon passiveIcon; + public SigilOfHaste() { super(); + this.maxStackSize = 1; setEnergyUsed(250); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -29,7 +40,7 @@ public class SigilOfHaste extends SigilToggleable implements ArmourUpgrade, ISig if (!(par1ItemStack.getTagCompound() == null)) { - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -41,10 +52,51 @@ public class SigilOfHaste extends SigilToggleable implements ArmourUpgrade, ISig } } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:HasteSigil_deactivated"); + this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:HasteSigil_activated"); + this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:HasteSigil_deactivated"); + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) + { + if (stack.getTagCompound() == null) + { + stack.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound tag = stack.getTagCompound(); + + if (tag.getBoolean("isActive")) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) + { + if (par1 == 1) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -55,9 +107,9 @@ public class SigilOfHaste extends SigilToggleable implements ArmourUpgrade, ISig } NBTTagCompound tag = par1ItemStack.getTagCompound(); - this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); + tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); - if (this.getActivated(par1ItemStack) && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); @@ -85,18 +137,18 @@ public class SigilOfHaste extends SigilToggleable implements ArmourUpgrade, ISig par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { - par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionBoost.id, 3, 1, true, false)); + par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionBoost.id, 3, 1)); } - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) + if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - this.setActivated(par1ItemStack, false); + par1ItemStack.getTagCompound().setBoolean("isActive", false); } } } @@ -110,7 +162,7 @@ public class SigilOfHaste extends SigilToggleable implements ArmourUpgrade, ISig itemStack.setTagCompound(new NBTTagCompound()); } - player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionBoost.id, 3, 1, true, false)); + player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionBoost.id, 3, 1, true)); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java index 737a6079..1e6aa7e4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityXPOrb; @@ -10,20 +11,30 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; -public class SigilOfMagnetism extends SigilToggleable implements ArmourUpgrade, IHolding, ISigil +public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHolding, ISigil { + @SideOnly(Side.CLIENT) + private IIcon activeIcon; + @SideOnly(Side.CLIENT) + private IIcon passiveIcon; private int tickDelay = 300; public SigilOfMagnetism() { super(); + this.maxStackSize = 1; setEnergyUsed(50); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -33,7 +44,7 @@ public class SigilOfMagnetism extends SigilToggleable implements ArmourUpgrade, if (!(par1ItemStack.getTagCompound() == null)) { - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -45,10 +56,51 @@ public class SigilOfMagnetism extends SigilToggleable implements ArmourUpgrade, } } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfMagnetism_deactivated"); + this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfMagnetism_activated"); + this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfMagnetism_deactivated"); + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) + { + if (stack.getTagCompound() == null) + { + stack.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound tag = stack.getTagCompound(); + + if (tag.getBoolean("isActive")) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) + { + if (par1 == 1) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -59,9 +111,9 @@ public class SigilOfMagnetism extends SigilToggleable implements ArmourUpgrade, } NBTTagCompound tag = par1ItemStack.getTagCompound(); - this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); + tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); - if (this.getActivated(par1ItemStack) && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay); @@ -88,13 +140,13 @@ public class SigilOfMagnetism extends SigilToggleable implements ArmourUpgrade, par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) { - if(!BindableItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed())) + if(!EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed())) { - this.setActivated(par1ItemStack, false); + par1ItemStack.getTagCompound().setBoolean("isActive", false); } } @@ -103,8 +155,8 @@ public class SigilOfMagnetism extends SigilToggleable implements ArmourUpgrade, float posX = Math.round(par3Entity.posX); float posY = (float) (par3Entity.posY - par3Entity.getEyeHeight()); float posZ = Math.round(par3Entity.posZ); - List<EntityItem> entities = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range)); - List<EntityXPOrb> xpOrbs = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityXPOrb.class, new AxisAlignedBB(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range)); + List<EntityItem> entities = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range)); + List<EntityXPOrb> xpOrbs = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityXPOrb.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range)); for (EntityItem entity : entities) { @@ -132,8 +184,8 @@ public class SigilOfMagnetism extends SigilToggleable implements ArmourUpgrade, float posX = Math.round(player.posX); float posY = (float) (player.posY - player.getEyeHeight()); float posZ = Math.round(player.posZ); - List<EntityItem> entities = player.worldObj.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range)); - List<EntityXPOrb> xpOrbs = player.worldObj.getEntitiesWithinAABB(EntityXPOrb.class, new AxisAlignedBB(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range)); + List<EntityItem> entities = player.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range)); + List<EntityXPOrb> xpOrbs = player.worldObj.getEntitiesWithinAABB(EntityXPOrb.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range)); for (EntityItem entity : entities) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfSupression.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfSupression.java index 24865997..370ef3af 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfSupression.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfSupression.java @@ -1,32 +1,42 @@ package WayofTime.alchemicalWizardry.common.items.sigil; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer; -import net.minecraft.block.state.IBlockState; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; +import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.util.Vec3; import net.minecraft.world.World; import java.util.List; -public class SigilOfSupression extends SigilToggleable implements ArmourUpgrade, ISigil +public class SigilOfSupression extends EnergyItems implements ArmourUpgrade, ISigil { + @SideOnly(Side.CLIENT) + private IIcon activeIcon; + @SideOnly(Side.CLIENT) + private IIcon passiveIcon; private int radius = 5; private int refresh = 100; public SigilOfSupression() { super(); + this.maxStackSize = 1; setEnergyUsed(400); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -36,7 +46,7 @@ public class SigilOfSupression extends SigilToggleable implements ArmourUpgrade, if (!(par1ItemStack.getTagCompound() == null)) { - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -48,12 +58,53 @@ public class SigilOfSupression extends SigilToggleable implements ArmourUpgrade, } } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfSupression_deactivated"); + activeIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfSupression_activated"); + passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfSupression_deactivated"); + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) + { + if (stack.getTagCompound() == null) + { + stack.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound tag = stack.getTagCompound(); + + if (tag.getBoolean("isActive")) + { + return activeIcon; + } else + { + return passiveIcon; + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) + { + if (par1 == 1) + { + return activeIcon; + } else + { + return passiveIcon; + } + } + @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { int tickDelay = 200; - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || SpellHelper.isFakePlayer(par2World, par3EntityPlayer)) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || SpellHelper.isFakePlayer(par2World, par3EntityPlayer)) { return par1ItemStack; } @@ -69,18 +120,18 @@ public class SigilOfSupression extends SigilToggleable implements ArmourUpgrade, } NBTTagCompound tag = par1ItemStack.getTagCompound(); - this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); + tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); - if (this.getActivated(par1ItemStack)) + if (tag.getBoolean("isActive")) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay); if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - this.setActivated(par1ItemStack, false); + tag.setBoolean("isActive", false); } } } else @@ -111,9 +162,9 @@ public class SigilOfSupression extends SigilToggleable implements ArmourUpgrade, par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (this.getActivated(par1ItemStack) && (!par2World.isRemote)) + if (par1ItemStack.getTagCompound().getBoolean("isActive") && (!par2World.isRemote)) { - Vec3 blockVec = new Vec3((int) Math.round(par3EntityPlayer.posX - 0.5F), par3EntityPlayer.posY, (int) Math.round(par3EntityPlayer.posZ - 0.5F)); + Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer); int x = (int) blockVec.xCoord; int y = (int) blockVec.yCoord; int z = (int) blockVec.zCoord; @@ -129,19 +180,18 @@ public class SigilOfSupression extends SigilToggleable implements ArmourUpgrade, continue; } - BlockPos blockPos = new BlockPos(x + i, y + j, z + k); - IBlockState block = par2World.getBlockState(blockPos); + Block block = par2World.getBlock(x + i, y + j, z + k); - if (SpellHelper.isBlockFluid(block.getBlock())) + if (SpellHelper.isBlockFluid(block)) { - if (par2World.getTileEntity(blockPos) != null) + if (par2World.getTileEntity(x + i, y + j, z + k) != null) { - par2World.setBlockToAir(blockPos); + par2World.setBlockToAir(x + i, y + j, z + k); } - TESpectralContainer.createSpectralBlockAtLocation(par2World, blockPos, refresh); + TESpectralContainer.createSpectralBlockAtLocation(par2World, x + i, y + j, z + k, refresh); } else { - TileEntity tile = par2World.getTileEntity(blockPos); + TileEntity tile = par2World.getTileEntity(x + i, y + j, z + k); if (tile instanceof TESpectralContainer) { ((TESpectralContainer) tile).resetDuration(refresh); @@ -152,13 +202,13 @@ public class SigilOfSupression extends SigilToggleable implements ArmourUpgrade, } } - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) + if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - this.setActivated(par1ItemStack, false); + par1ItemStack.getTagCompound().setBoolean("isActive", false); } } } @@ -167,7 +217,7 @@ public class SigilOfSupression extends SigilToggleable implements ArmourUpgrade, @Override public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) { - Vec3 blockVec = new Vec3((int) Math.round(player.posX - 0.5F), player.posY, (int) Math.round(player.posZ - 0.5F)); + Vec3 blockVec = SpellHelper.getEntityBlockVector(player); int x = (int) blockVec.xCoord; int y = (int) blockVec.yCoord; int z = (int) blockVec.zCoord; @@ -183,19 +233,19 @@ public class SigilOfSupression extends SigilToggleable implements ArmourUpgrade, continue; } - BlockPos blockPos = new BlockPos(x + i, y + j, z + k); - IBlockState block = world.getBlockState(blockPos); + Block block = world.getBlock(x + i, y + j, z + k); - if (SpellHelper.isBlockFluid(block.getBlock())) + + if (SpellHelper.isBlockFluid(block)) { - if (world.getTileEntity(blockPos) != null) + if (world.getTileEntity(x + i, y + j, z + k) != null) { - world.setBlockToAir(blockPos); + world.setBlockToAir(x + i, y + j, z + k); } - TESpectralContainer.createSpectralBlockAtLocation(world, blockPos, refresh); + TESpectralContainer.createSpectralBlockAtLocation(world, x + i, y + j, z + k, refresh); } else { - TileEntity tile = world.getTileEntity(blockPos); + TileEntity tile = world.getTileEntity(x + i, y + j, z + k); if (tile instanceof TESpectralContainer) { ((TESpectralContainer) tile).resetDuration(refresh); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheAssassin.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheAssassin.java index 7397efec..4bfa7e8d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheAssassin.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheAssassin.java @@ -3,30 +3,39 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import net.minecraft.block.state.IBlockState; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.*; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.StatCollector; +import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.EnderTeleportEvent; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; -public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, ISigil +public class SigilOfTheAssassin extends EnergyItems implements ArmourUpgrade, ISigil { public SigilOfTheAssassin() { super(); + this.maxStackSize = 1; setEnergyUsed(100); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -38,6 +47,13 @@ public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, } } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WaterSigil"); + } + @Override public ItemStack getContainerItem(ItemStack itemStack) { @@ -58,16 +74,17 @@ public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, } } - @Override /** * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer */ public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } + + float f = 10.0F; @@ -91,6 +108,7 @@ public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, if(hitEntity instanceof EntityLivingBase) { AlchemicalWizardry.logger.info("It's a living entity!"); + teleportTo(par3EntityPlayer, x, y, z, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ); } @@ -117,18 +135,17 @@ public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, int i = MathHelper.floor_double(entityLiving.posX); int j = MathHelper.floor_double(entityLiving.posY); int k = MathHelper.floor_double(entityLiving.posZ); - BlockPos blockPos = new BlockPos(i, j, k); - IBlockState l; + Block l; - if (!entityLiving.worldObj.isAirBlock(blockPos)) + if (entityLiving.worldObj.blockExists(i, j, k)) { boolean flag1 = false; while (!flag1 && j > 0) { - l = entityLiving.worldObj.getBlockState(blockPos); + l = entityLiving.worldObj.getBlock(i, j - 1, k); - if (l != null && l.getBlock().getMaterial().blocksMovement()) + if (l != null && l.getMaterial().blocksMovement()) { flag1 = true; } else @@ -142,7 +159,7 @@ public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, { SpellTeleport.moveEntityViaTeleport(entityLiving, entityLiving.posX, entityLiving.posY, entityLiving.posZ); - if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.getBoundingBox()).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.getBoundingBox())) + if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.boundingBox)) { flag = true; } @@ -166,7 +183,7 @@ public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, double d7 = d3 + (entityLiving.posX - d3) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; double d8 = d4 + (entityLiving.posY - d4) * d6 + entityLiving.worldObj.rand.nextDouble() * (double) entityLiving.height; double d9 = d5 + (entityLiving.posZ - d5) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; - entityLiving.worldObj.spawnParticle(EnumParticleTypes.PORTAL, d7, d8, d9, (double) f, (double) f1, (double) f2); + entityLiving.worldObj.spawnParticle("portal", d7, d8, d9, (double) f, (double) f1, (double) f2); } return true; } @@ -180,7 +197,7 @@ public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, double d0 = p_77621_2_.prevPosX + (p_77621_2_.posX - p_77621_2_.prevPosX) * (double)f; double d1 = p_77621_2_.prevPosY + (p_77621_2_.posY - p_77621_2_.prevPosY) * (double)f + (double)(p_77621_1_.isRemote ? p_77621_2_.getEyeHeight() - p_77621_2_.getDefaultEyeHeight() : p_77621_2_.getEyeHeight()); // isRemote check to revert changes to ray trace position due to adding the eye height clientside and player yOffset differences double d2 = p_77621_2_.prevPosZ + (p_77621_2_.posZ - p_77621_2_.prevPosZ) * (double)f; - Vec3 vec3 = new Vec3(d0, d1, d2); + Vec3 vec3 = SpellHelper.createVec3(d0, d1, d2); float f3 = MathHelper.cos(-f2 * 0.017453292F - (float)Math.PI); float f4 = MathHelper.sin(-f2 * 0.017453292F - (float)Math.PI); float f5 = -MathHelper.cos(-f1 * 0.017453292F); @@ -188,12 +205,12 @@ public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, float f7 = f4 * f5; float f8 = f3 * f5; double d3 = 500.0D; -// if (p_77621_2_ instanceof EntityPlayerMP) + if (p_77621_2_ instanceof EntityPlayerMP) { // d3 = ((EntityPlayerMP)p_77621_2_).theItemInWorldManager.getBlockReachDistance(); } Vec3 vec31 = vec3.addVector((double)f7 * d3, (double)f6 * d3, (double)f8 * d3); - return p_77621_1_.rayTraceBlocks(vec3, vec31, p_77621_3_, !p_77621_3_, false); + return p_77621_1_.func_147447_a(vec3, vec31, p_77621_3_, !p_77621_3_, false); } // public MovingObjectPosition movingObjectPositiongdsa(WOrld worldObj, int posX, int posY, int posZ) @@ -252,7 +269,7 @@ public class SigilOfTheAssassin extends BindableItems implements ArmourUpgrade, @Override public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) { - player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 9, true, false)); + player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 9, true)); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java index 6b174bcf..00703db4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java @@ -1,30 +1,40 @@ package WayofTime.alchemicalWizardry.common.items.sigil; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock; -import net.minecraft.block.state.IBlockState; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; +import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import java.util.List; -public class SigilOfTheBridge extends SigilToggleable implements ArmourUpgrade, ISigil +public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade, ISigil { + @SideOnly(Side.CLIENT) + private IIcon activeIcon; + @SideOnly(Side.CLIENT) + private IIcon passiveIcon; private int tickDelay = 200; public SigilOfTheBridge() { super(); + this.maxStackSize = 1; setEnergyUsed(100); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -35,7 +45,7 @@ public class SigilOfTheBridge extends SigilToggleable implements ArmourUpgrade, if (!(par1ItemStack.getTagCompound() == null)) { - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -47,10 +57,51 @@ public class SigilOfTheBridge extends SigilToggleable implements ArmourUpgrade, } } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BridgeSigil_deactivated"); + this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:BridgeSigil_activated"); + this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:BridgeSigil_deactivated"); + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) + { + if (stack.getTagCompound() == null) + { + stack.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound tag = stack.getTagCompound(); + + if (tag.getBoolean("isActive")) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) + { + if (par1 == 1) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -61,9 +112,9 @@ public class SigilOfTheBridge extends SigilToggleable implements ArmourUpgrade, } NBTTagCompound tag = par1ItemStack.getTagCompound(); - this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); + tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); - if (this.getActivated(par1ItemStack) && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay); @@ -90,16 +141,16 @@ public class SigilOfTheBridge extends SigilToggleable implements ArmourUpgrade, par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) { - if(BindableItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, this.getLPUsed(par1ItemStack))) + if(EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, this.getLPUsed(par1ItemStack))) { this.setLPUsed(par1ItemStack, 0); }else { - this.setActivated(par1ItemStack, false); + par1ItemStack.getTagCompound().setBoolean("isActive", false); } } if (!par3EntityPlayer.onGround && !par3EntityPlayer.isSneaking()) @@ -130,13 +181,13 @@ public class SigilOfTheBridge extends SigilToggleable implements ArmourUpgrade, for (int iz = posZ - range; iz <= posZ + range; iz++) { { - IBlockState block = par2World.getBlockState(new BlockPos(ix, posY + verticalOffset, iz)); + Block block = par2World.getBlock(ix, posY + verticalOffset, iz); - if (par2World.isAirBlock(new BlockPos(ix, posY + verticalOffset, iz))) + if (par2World.isAirBlock(ix, posY + verticalOffset, iz)) { - par2World.setBlockState(new BlockPos(ix, posY + verticalOffset, iz), ModBlocks.spectralBlock.getDefaultState(), 3); + par2World.setBlock(ix, posY + verticalOffset, iz, ModBlocks.spectralBlock, 0, 3); - TileEntity tile = par2World.getTileEntity(new BlockPos(ix, posY + verticalOffset, iz)); + TileEntity tile = par2World.getTileEntity(ix, posY + verticalOffset, iz); if (tile instanceof TESpectralBlock) { ((TESpectralBlock) tile).setDuration(100); @@ -148,7 +199,7 @@ public class SigilOfTheBridge extends SigilToggleable implements ArmourUpgrade, } } else if (block == ModBlocks.spectralBlock) { - TileEntity tile = par2World.getTileEntity(new BlockPos(ix, posY + verticalOffset, iz)); + TileEntity tile = par2World.getTileEntity(ix, posY + verticalOffset, iz); if (tile instanceof TESpectralBlock) { ((TESpectralBlock) tile).setDuration(100); @@ -201,7 +252,7 @@ public class SigilOfTheBridge extends SigilToggleable implements ArmourUpgrade, } int range = 2; - int verticalOffset = -1; + int verticalOffset = -2; if (player.isSneaking()) { @@ -215,20 +266,20 @@ public class SigilOfTheBridge extends SigilToggleable implements ArmourUpgrade, { for (int iz = posZ - range; iz <= posZ + range; iz++) { - IBlockState block = world.getBlockState(new BlockPos(ix, posY + verticalOffset, iz)); + Block block = world.getBlock(ix, posY + verticalOffset, iz); - if (world.isAirBlock(new BlockPos(ix, posY + verticalOffset, iz))) + if (world.isAirBlock(ix, posY + verticalOffset, iz)) { - world.setBlockState(new BlockPos(ix, posY + verticalOffset, iz), ModBlocks.spectralBlock.getDefaultState(), 3); + world.setBlock(ix, posY + verticalOffset, iz, ModBlocks.spectralBlock, 0, 3); - TileEntity tile = world.getTileEntity(new BlockPos(ix, posY + verticalOffset, iz)); + TileEntity tile = world.getTileEntity(ix, posY + verticalOffset, iz); if (tile instanceof TESpectralBlock) { ((TESpectralBlock) tile).setDuration(100); } } else if (block == ModBlocks.spectralBlock) { - TileEntity tile = world.getTileEntity(new BlockPos(ix, posY + verticalOffset, iz)); + TileEntity tile = world.getTileEntity(ix, posY + verticalOffset, iz); if (tile instanceof TESpectralBlock) { ((TESpectralBlock) tile).setDuration(100); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java index bde22ef7..37755b9f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheFastMiner.java @@ -1,25 +1,37 @@ package WayofTime.alchemicalWizardry.common.items.sigil; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import java.util.List; -public class SigilOfTheFastMiner extends SigilToggleable implements ArmourUpgrade, ISigil +public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade, ISigil { + @SideOnly(Side.CLIENT) + private IIcon activeIcon; + @SideOnly(Side.CLIENT) + private IIcon passiveIcon; + public SigilOfTheFastMiner() { super(); + this.maxStackSize = 1; setEnergyUsed(100); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -29,7 +41,7 @@ public class SigilOfTheFastMiner extends SigilToggleable implements ArmourUpgrad if (!(par1ItemStack.getTagCompound() == null)) { - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -41,10 +53,51 @@ public class SigilOfTheFastMiner extends SigilToggleable implements ArmourUpgrad } } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:MiningSigil_deactivated"); + this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:MiningSigil_activated"); + this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:MiningSigil_deactivated"); + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) + { + if (stack.getTagCompound() == null) + { + stack.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound tag = stack.getTagCompound(); + + if (tag.getBoolean("isActive")) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) + { + if (par1 == 1) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -55,13 +108,13 @@ public class SigilOfTheFastMiner extends SigilToggleable implements ArmourUpgrad } NBTTagCompound tag = par1ItemStack.getTagCompound(); - this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); + tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); - if (this.getActivated(par1ItemStack) && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); - par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2, 1)); + par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2, 1, true)); } else { par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); @@ -85,18 +138,18 @@ public class SigilOfTheFastMiner extends SigilToggleable implements ArmourUpgrad par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { - par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2, 1, true, false)); + par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2, 1, true)); } - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) + if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - this.setActivated(par1ItemStack, false); + par1ItemStack.getTagCompound().setBoolean("isActive", false); } } } @@ -110,7 +163,7 @@ public class SigilOfTheFastMiner extends SigilToggleable implements ArmourUpgrad itemStack.setTagCompound(new NBTTagCompound()); } - player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 3, 1, true, false)); + player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 3, 1, true)); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java index 84b21315..71f8cf0b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfWind.java @@ -1,25 +1,36 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import java.util.List; - +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.BindableItems; -public class SigilOfWind extends SigilToggleable implements ArmourUpgrade, ISigil +import java.util.List; + +public class SigilOfWind extends EnergyItems implements ArmourUpgrade, ISigil { + @SideOnly(Side.CLIENT) + private IIcon activeIcon; + @SideOnly(Side.CLIENT) + private IIcon passiveIcon; + public SigilOfWind() { super(); + this.maxStackSize = 1; setEnergyUsed(250); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -29,7 +40,7 @@ public class SigilOfWind extends SigilToggleable implements ArmourUpgrade, ISigi if (!(par1ItemStack.getTagCompound() == null)) { - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -41,10 +52,51 @@ public class SigilOfWind extends SigilToggleable implements ArmourUpgrade, ISigi } } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WindSigil_deactivated"); + this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:WindSigil_activated"); + this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:WindSigil_deactivated"); + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) + { + if (stack.getTagCompound() == null) + { + stack.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound tag = stack.getTagCompound(); + + if (tag.getBoolean("isActive")) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) + { + if (par1 == 1) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -55,13 +107,13 @@ public class SigilOfWind extends SigilToggleable implements ArmourUpgrade, ISigi } NBTTagCompound tag = par1ItemStack.getTagCompound(); - this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); + tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); - if (this.getActivated(par1ItemStack) && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); - par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 2, 1, true, false)); + par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 2, 1)); } else { par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage()); @@ -85,18 +137,18 @@ public class SigilOfWind extends SigilToggleable implements ArmourUpgrade, ISigi par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { - par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 2, 1, true, false)); + par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 2, 1)); } if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - this.setActivated(par1ItemStack, false); + par1ItemStack.getTagCompound().setBoolean("isActive", false); } } } @@ -110,7 +162,7 @@ public class SigilOfWind extends SigilToggleable implements ArmourUpgrade, ISigi itemStack.setTagCompound(new NBTTagCompound()); } - player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 3, 1, true, false)); + player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 3, 1)); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilCompress.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilPackRat.java similarity index 60% rename from src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilCompress.java rename to src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilPackRat.java index 49fa6114..1014041e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilCompress.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilPackRat.java @@ -3,24 +3,36 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.compress.CompressionRegistry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; -public class SigilCompress extends SigilToggleable implements IHolding, ArmourUpgrade, ISigil +public class SigilPackRat extends EnergyItems implements IHolding, ArmourUpgrade, ISigil { - public SigilCompress() + @SideOnly(Side.CLIENT) + private IIcon activeIcon; + @SideOnly(Side.CLIENT) + private IIcon passiveIcon; + + public SigilPackRat() { super(); + this.maxStackSize = 1; setEnergyUsed(200); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -30,7 +42,7 @@ public class SigilCompress extends SigilToggleable implements IHolding, ArmourUp if (!(par1ItemStack.getTagCompound() == null)) { - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated")); } else @@ -42,10 +54,51 @@ public class SigilCompress extends SigilToggleable implements IHolding, ArmourUp } } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:CompressionSigil_deactivated"); + this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:CompressionSigil_activated"); + this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:CompressionSigil_deactivated"); + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) + { + if (stack.getTagCompound() == null) + { + stack.setTagCompound(new NBTTagCompound()); + } + + NBTTagCompound tag = stack.getTagCompound(); + + if (tag.getBoolean("isActive")) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) + { + if (par1 == 1) + { + return this.activeIcon; + } else + { + return this.passiveIcon; + } + } + @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } @@ -56,18 +109,18 @@ public class SigilCompress extends SigilToggleable implements IHolding, ArmourUp } NBTTagCompound tag = par1ItemStack.getTagCompound(); - this.setActivated(par1ItemStack, !(this.getActivated(par1ItemStack))); + tag.setBoolean("isActive", !(tag.getBoolean("isActive"))); - if (this.getActivated(par1ItemStack)) + if (tag.getBoolean("isActive")) { par1ItemStack.setItemDamage(1); tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200); if (!par3EntityPlayer.capabilities.isCreativeMode) { - if (!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - this.setActivated(par1ItemStack, false); + tag.setBoolean("isActive", false); } } } else @@ -93,7 +146,7 @@ public class SigilCompress extends SigilToggleable implements IHolding, ArmourUp par1ItemStack.setTagCompound(new NBTTagCompound()); } - if (this.getActivated(par1ItemStack)) + if (par1ItemStack.getTagCompound().getBoolean("isActive")) { ItemStack stack = CompressionRegistry.compressInventory(par3EntityPlayer.inventory.mainInventory, par2World); if(stack != null) @@ -102,13 +155,13 @@ public class SigilCompress extends SigilToggleable implements IHolding, ArmourUp par2World.spawnEntityInWorld(entityItem); } } - if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && this.getActivated(par1ItemStack)) + if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive")) { if (!par3EntityPlayer.capabilities.isCreativeMode) { - if(!BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) + if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - this.setActivated(par1ItemStack, false); + par1ItemStack.getTagCompound().setBoolean("isActive", false); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilSeer.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilSeer.java index 66dd0fd4..cdca8941 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilSeer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilSeer.java @@ -1,9 +1,13 @@ package WayofTime.alchemicalWizardry.common.items.sigil; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -18,7 +22,15 @@ public class SigilSeer extends Item implements IHolding, ArmourUpgrade, ISigil public SigilSeer() { super(); - setMaxStackSize(1); + this.maxStackSize = 1; + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SeerSigil"); } @Override @@ -35,7 +47,7 @@ public class SigilSeer extends Item implements IHolding, ArmourUpgrade, ISigil @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.worldObj.isRemote) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.worldObj.isRemote) { return par1ItemStack; } @@ -51,7 +63,10 @@ public class SigilSeer extends Item implements IHolding, ArmourUpgrade, ISigil } @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {} + public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) + { + } + @Override public boolean isUpgrade() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilToggleable.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilToggleable.java deleted file mode 100644 index ae698659..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilToggleable.java +++ /dev/null @@ -1,17 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.sigil; - -import net.minecraft.item.ItemStack; -import WayofTime.alchemicalWizardry.common.items.BindableItems; - -public class SigilToggleable extends BindableItems -{ - public void setActivated(ItemStack stack, boolean newActivated) - { - stack.setItemDamage(newActivated ? 1 : 0); - } - - public boolean getActivated(ItemStack stack) - { - return stack.getItemDamage() == 1; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilVoid.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilVoid.java index 2d9aee04..c62ee182 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilVoid.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilVoid.java @@ -3,28 +3,42 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBucket; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class SigilVoid extends ItemBucket implements ArmourUpgrade, ISigil { + private int isFull; private int energyUsed; public SigilVoid() { super(null); + this.maxStackSize = 1; setEnergyUsed(50); + isFull = 0; + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:VoidSigil"); } @Override @@ -63,74 +77,72 @@ public class SigilVoid extends ItemBucket implements ArmourUpgrade, ISigil } @Override - public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { - if (world.isRemote || !BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (world.isRemote || !EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return false; } - if (!world.canMineBlockBody(player, blockPos)) + float f = 1.0F; + + if (!world.canMineBlock(player, x, y, z)) { return false; } - TileEntity tile = world.getTileEntity(blockPos); + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof IFluidHandler) { - FluidStack amount = ((IFluidHandler) tile).drain(side, 1000, false); + FluidStack amount = ((IFluidHandler) tile).drain(ForgeDirection.getOrientation(side), 1000, false); - if (amount != null && amount.amount > 0 && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) + if (amount != null && amount.amount > 0 && EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) { - ((IFluidHandler) tile).drain(side, 1000, true); + ((IFluidHandler) tile).drain(ForgeDirection.getOrientation(side), 1000, true); return true; } return false; } - int x = blockPos.getX(); - int y = blockPos.getY(); - int z = blockPos.getZ(); - - if (side.getIndex() == 0) + if (side == 0) { --y; } - if (side.getIndex() == 1) + if (side == 1) { ++y; } - if (side.getIndex() == 2) + if (side == 2) { --z; } - if (side.getIndex() == 3) + if (side == 3) { ++z; } - if (side.getIndex() == 4) + if (side == 4) { --x; } - if (side.getIndex() == 5) + if (side == 5) { ++x; } - if (!player.func_175151_a(new BlockPos(x, y, z), side, stack)) //was canPlayerEdit + if (!player.canPlayerEdit(x, y, z, side, stack)) { return false; } - if (SpellHelper.isBlockFluid(world.getBlockState(new BlockPos(x, y, z)).getBlock()) && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) + if (SpellHelper.isBlockFluid(world.getBlock(x, y, z)) && EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) { - world.setBlockToAir(new BlockPos(x, y, z)); + world.setBlockToAir(x, y, z); return true; } @@ -138,17 +150,18 @@ public class SigilVoid extends ItemBucket implements ArmourUpgrade, ISigil return false; } - @Override /** * Attempts to place the liquid contained inside the bucket. */ - public boolean func_180616_a(World world, BlockPos blockPos) //was tryPlaceContainedLiquid + public boolean tryPlaceContainedLiquid(World par1World, double par2, double par4, double par6, int par8, int par9, int par10) { return false; } @Override - public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {} + public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) + { + } @Override public boolean isUpgrade() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilWater.java index 4bf58364..d9bf86a6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilWater.java @@ -5,7 +5,7 @@ import java.util.List; import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; import net.minecraft.block.Block; -import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemBucket; @@ -14,16 +14,17 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil { @@ -33,7 +34,9 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil public SigilWater() { super(Blocks.water); + this.maxStackSize = 1; setEnergyUsed(100); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override @@ -45,6 +48,13 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil } } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WaterSigil"); + } + @Override public ItemStack getContainerItem(ItemStack itemStack) { @@ -62,7 +72,6 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil } } - @Override /** * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer */ @@ -72,27 +81,27 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil } @Override - public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { - if (world.isRemote || !BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (world.isRemote || !EnergyItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) { return false; } - if (!world.canMineBlockBody(player, blockPos)) + if (!world.canMineBlock(player, x, y, z)) { return false; } - TileEntity tile = world.getTileEntity(blockPos); + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof IFluidHandler) { FluidStack fluid = new FluidStack(FluidRegistry.WATER, 1000); - int amount = ((IFluidHandler) tile).fill(side, fluid, false); + int amount = ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(side), fluid, false); - if (amount > 0 && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) + if (amount > 0 && EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) { - ((IFluidHandler) tile).fill(side, fluid, true); + ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(side), fluid, true); } return false; @@ -102,50 +111,48 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil return false; } - int x = blockPos.getX(); - int y = blockPos.getY(); - int z = blockPos.getZ(); { - if (side.getIndex() == 0) + if (side == 0) { --y; } - if (side.getIndex() == 1) + if (side == 1) { ++y; } - if (side.getIndex() == 2) + if (side == 2) { --z; } - if (side.getIndex() == 3) + if (side == 3) { ++z; } - if (side.getIndex() == 4) + if (side == 4) { --x; } - if (side.getIndex() == 5) + if (side == 5) { ++x; } - if (!player.func_175151_a(new BlockPos(x, y, z), side, stack)) // was canPlayerEdit + if (!player.canPlayerEdit(x, y, z, side, stack)) { return false; } - if(this.canPlaceContainedLiquid(world, new BlockPos(x, y, z)) && BindableItems.syphonBatteries(stack, player, getEnergyUsed())) + if(this.canPlaceContainedLiquid(world, x, y, z, x, y, z) && EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) { - return this.func_180616_a(world, new BlockPos(x, y, z)); + return this.tryPlaceContainedLiquid(world, x, y, z, x, y, z); } } + return false; @@ -154,56 +161,40 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil /** * Attempts to place the liquid contained inside the bucket. */ - public boolean func_180616_a(World world, BlockPos blockPos) //was tryPlaceContainedLiquid + public boolean tryPlaceContainedLiquid(World par1World, double par2, double par4, double par6, int par8, int par9, int par10) { - if (this.isFull == Blocks.air) + if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlock(par8, par9, par10).getMaterial().isSolid()) { return false; - } - else + } else if ((par1World.getBlock(par8, par9, par10) == Blocks.water || par1World.getBlock(par8, par9, par10) == Blocks.flowing_water) && par1World.getBlockMetadata(par8, par9, par10) == 0) { - Material material = world.getBlockState(blockPos).getBlock().getMaterial(); - boolean flag = !material.isSolid(); - - if (!world.isAirBlock(blockPos) && !flag) + return false; + } else + { + if (par1World.provider.isHellWorld) { - return false; - } - else + par1World.playSoundEffect(par2 + 0.5D, par4 + 0.5D, par6 + 0.5D, "random.fizz", 0.5F, 2.6F + (par1World.rand.nextFloat() - par1World.rand.nextFloat()) * 0.8F); + + for (int l = 0; l < 8; ++l) + { + par1World.spawnParticle("largesmoke", (double) par8 + Math.random(), (double) par9 + Math.random(), (double) par10 + Math.random(), 0.0D, 0.0D, 0.0D); + } + } else { - if (world.provider.func_177500_n() && this.isFull == Blocks.flowing_water) - { - int i = blockPos.getX(); - int j = blockPos.getY(); - int k = blockPos.getZ(); - world.playSoundEffect((double)((float)i + 0.5F), (double)((float)j + 0.5F), (double)((float)k + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F); - - for (int l = 0; l < 8; ++l) - { - world.spawnParticle(EnumParticleTypes.SMOKE_LARGE, (double)i + Math.random(), (double)j + Math.random(), (double)k + Math.random(), 0.0D, 0.0D, 0.0D, 0); - } - } - else - { - if (!world.isRemote && flag && !material.isLiquid()) - { - world.destroyBlock(blockPos, true); - } - - world.setBlockState(blockPos, this.isFull.getDefaultState(), 3); - } - - return true; + par1World.setBlock(par8, par9, par10, this.isFull, 0, 3); + par1World.markBlockForUpdate(par8, par9, par10); } + + return true; } } - public boolean canPlaceContainedLiquid(World world, BlockPos blockPos) + public boolean canPlaceContainedLiquid(World par1World, double par2, double par4, double par6, int par8, int par9, int par10) { - if (!world.isAirBlock(blockPos) && world.getBlockState(blockPos).getBlock().getMaterial().isSolid()) + if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlock(par8, par9, par10).getMaterial().isSolid()) { return false; - } else if ((world.getBlockState(blockPos).getBlock() == Blocks.water || world.getBlockState(blockPos).getBlock() == Blocks.flowing_water) && world.getBlockState(blockPos).getBlock().getMetaFromState(world.getBlockState(blockPos)) == 0) + } else if ((par1World.getBlock(par8, par9, par10) == Blocks.water || par1World.getBlock(par8, par9, par10) == Blocks.flowing_water) && par1World.getBlockMetadata(par8, par9, par10) == 0) { return false; } else @@ -225,7 +216,7 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil @Override public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) { - player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 9)); + player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 9, true)); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ContainerHolding.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ContainerHolding.java index e4d3afc2..c3d0e651 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ContainerHolding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ContainerHolding.java @@ -1,12 +1,12 @@ package WayofTime.alchemicalWizardry.common.items.sigil.holding; +import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; +import cpw.mods.fml.common.FMLCommonHandler; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.FMLCommonHandler; -import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil; public class ContainerHolding extends Container { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/GuiHolding.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/GuiHolding.java index f47ee663..3abcf197 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/GuiHolding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/GuiHolding.java @@ -1,11 +1,10 @@ package WayofTime.alchemicalWizardry.common.items.sigil.holding; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketHandler.java index f6acf021..6da027bd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketHandler.java @@ -1,8 +1,8 @@ package WayofTime.alchemicalWizardry.common.items.sigil.holding; -import net.minecraftforge.fml.common.network.NetworkRegistry; -import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; -import net.minecraftforge.fml.relauncher.Side; +import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; +import cpw.mods.fml.relauncher.Side; public class HoldingPacketHandler { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketProcessor.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketProcessor.java index dc82e3b1..ad44abdf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketProcessor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/HoldingPacketProcessor.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.common.items.sigil.holding; +import cpw.mods.fml.common.network.simpleimpl.IMessage; +import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; +import cpw.mods.fml.common.network.simpleimpl.MessageContext; import io.netty.buffer.ByteBuf; import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.network.simpleimpl.IMessage; -import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; -import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; public class HoldingPacketProcessor implements IMessage, IMessageHandler<HoldingPacketProcessor, IMessage> { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/InventoryHolding.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/InventoryHolding.java index f894aad9..81d06ae9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/InventoryHolding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/InventoryHolding.java @@ -6,7 +6,6 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.IChatComponent; import java.util.UUID; @@ -137,13 +136,13 @@ public class InventoryHolding implements IInventory } @Override - public String getName() + public String getInventoryName() { return "SigilOfHolding"; } @Override - public boolean hasCustomName() + public boolean hasCustomInventoryName() { return false; } @@ -167,13 +166,13 @@ public class InventoryHolding implements IInventory } @Override - public void openInventory(EntityPlayer player) + public void openInventory() { // NOOP } @Override - public void closeInventory(EntityPlayer player) + public void closeInventory() { // NOOP } @@ -225,7 +224,7 @@ public class InventoryHolding implements IInventory public static boolean hasTag(ItemStack itemStack, String keyName) { - return itemStack != null && itemStack.getTagCompound() != null && itemStack.getTagCompound().hasKey(keyName); + return itemStack != null && itemStack.stackTagCompound != null && itemStack.stackTagCompound.hasKey(keyName); } public static boolean hasUUID(ItemStack itemStack) @@ -247,7 +246,7 @@ public class InventoryHolding implements IInventory private static void initNBTTagCompound(ItemStack itemStack) { - if (itemStack.getTagCompound() == null) + if (itemStack.stackTagCompound == null) { itemStack.setTagCompound(new NBTTagCompound()); } @@ -257,36 +256,6 @@ public class InventoryHolding implements IInventory { initNBTTagCompound(itemStack); - itemStack.getTagCompound().setLong(keyName, keyValue); + itemStack.stackTagCompound.setLong(keyName, keyValue); } - - @Override - public IChatComponent getDisplayName() { - // TODO Auto-generated method stub - return null; - } - - @Override - public int getField(int id) { - // TODO Auto-generated method stub - return 0; - } - - @Override - public void setField(int id, int value) { - // TODO Auto-generated method stub - - } - - @Override - public int getFieldCount() { - // TODO Auto-generated method stub - return 0; - } - - @Override - public void clear() { - // TODO Auto-generated method stub - - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ScrollHelper.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ScrollHelper.java index bb96bf84..f816f868 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ScrollHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/ScrollHelper.java @@ -1,14 +1,14 @@ package WayofTime.alchemicalWizardry.common.items.sigil.holding; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.EntityPlayerSP; +import net.minecraft.client.entity.EntityClientPlayerMP; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.client.event.MouseEvent; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class ScrollHelper @@ -16,7 +16,7 @@ public class ScrollHelper @SubscribeEvent public void onMouseEvent(MouseEvent event) { - EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; + EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer; if (event.dwheel != 0 && player != null && player.isSneaking()) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java index e0eeaecb..2ad813c0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/holding/SigilOfHolding.java @@ -2,20 +2,22 @@ package WayofTime.alchemicalWizardry.common.items.sigil.holding; import java.util.List; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; +import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; -public class SigilOfHolding extends BindableItems +public class SigilOfHolding extends EnergyItems { private static int invSize = 5; @@ -24,25 +26,56 @@ public class SigilOfHolding extends BindableItems public SigilOfHolding() { super(); - setMaxStackSize(1); + this.maxStackSize = 1; + setCreativeTab(AlchemicalWizardry.tabBloodMagic); } @Override - public void addInformation(ItemStack stack, EntityPlayer player, List par3List, boolean par4) + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfHolding"); + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) + { + if (!(stack.getTagCompound() == null)) + { + ItemStack[] inv = getInternalInventory(stack); + + if (inv == null) + { + return this.itemIcon; + } + + ItemStack item = getCurrentSigil(stack); + + if (item != null) + { + return item.getIconIndex(); + } + } + + return this.itemIcon; + } + + @Override + public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { par3List.add(StatCollector.translateToLocal("tooltip.sigilofholding.desc")); - if (!(stack.getTagCompound() == null)) + if (!(par1ItemStack.getTagCompound() == null)) { - par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + stack.getTagCompound().getString("ownerName")); - ItemStack[] inv = getInternalInventory(stack); + par3List.add(StatCollector.translateToLocal("tooltip.owner.currentowner") + " " + par1ItemStack.getTagCompound().getString("ownerName")); + ItemStack[] inv = getInternalInventory(par1ItemStack); if (inv == null) { return; } - int currentSlot = getCurrentItem(stack); + int currentSlot = getCurrentItem(par1ItemStack); ItemStack item = inv[currentSlot]; if (item != null) @@ -61,11 +94,74 @@ public class SigilOfHolding extends BindableItems } @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) + public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) + { + if (checkAndSetItemOwner(par1ItemStack, par2EntityPlayer)) + { + int currentSlot = getCurrentItem(par1ItemStack); + ItemStack[] inv = getInternalInventory(par1ItemStack); + + if (inv == null) + { + return false; + } + + ItemStack itemUsed = inv[currentSlot]; + + if (itemUsed == null) + { + return false; + } + + boolean bool = itemUsed.getItem().onItemUse(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10); + + saveInventory(par1ItemStack, inv); + + return bool; + } + + return false; + } + + @Override + public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + { + if (checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) + { + if (par3EntityPlayer.isSneaking()) + { + InventoryHolding.setUUID(par1ItemStack); + par3EntityPlayer.openGui(AlchemicalWizardry.instance, 3, par3EntityPlayer.worldObj, (int) par3EntityPlayer.posX, (int) par3EntityPlayer.posY, (int) par3EntityPlayer.posZ); + return par1ItemStack; + } + + int currentSlot = getCurrentItem(par1ItemStack); + ItemStack[] inv = getInternalInventory(par1ItemStack); + + if (inv == null) + { + return par1ItemStack; + } + + ItemStack itemUsed = inv[currentSlot]; + + if (itemUsed == null) + { + return par1ItemStack; + } + + itemUsed.getItem().onItemRightClick(itemUsed, par2World, par3EntityPlayer); + saveInventory(par1ItemStack, inv); + } + return par1ItemStack; + } + + @Override + public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { if (checkAndSetItemOwner(stack, player)) { - int currentSlot = getCurrentItem(stack); + int currentSlot = getCurrentItem(stack); ItemStack[] inv = getInternalInventory(stack); if (inv == null) @@ -80,7 +176,7 @@ public class SigilOfHolding extends BindableItems return false; } - boolean bool = itemUsed.getItem().onItemUse(stack, player, world, pos, side, hitX, hitY, hitZ); + boolean bool = itemUsed.getItem().onItemUseFirst(stack, player, world, x, y, z, side, hitX, hitY, hitZ); saveInventory(stack, inv); @@ -90,44 +186,11 @@ public class SigilOfHolding extends BindableItems return false; } - @Override - public ItemStack onItemRightClick(ItemStack stack, World par2World, EntityPlayer par3EntityPlayer) - { - if (checkAndSetItemOwner(stack, par3EntityPlayer)) - { - if (par3EntityPlayer.isSneaking()) - { - InventoryHolding.setUUID(stack); - par3EntityPlayer.openGui(AlchemicalWizardry.instance, 3, par3EntityPlayer.worldObj, (int) par3EntityPlayer.posX, (int) par3EntityPlayer.posY, (int) par3EntityPlayer.posZ); - return stack; - } - - int currentSlot = getCurrentItem(stack); - ItemStack[] inv = getInternalInventory(stack); - - if (inv == null) - { - return stack; - } - - ItemStack itemUsed = inv[currentSlot]; - - if (itemUsed == null) - { - return stack; - } - - itemUsed.getItem().onItemRightClick(itemUsed, par2World, par3EntityPlayer); - saveInventory(stack, inv); - } - return stack; - } - public static int next(int mode) { int index = mode + 1; - if (index >= invSize + 1) + if (index >= invSize) { index = 0; } @@ -149,10 +212,10 @@ public class SigilOfHolding extends BindableItems private static void initModeTag(ItemStack itemStack) { - if (itemStack.getTagCompound() == null) + if (itemStack.stackTagCompound == null) { - itemStack.setTagCompound(new NBTTagCompound()); - itemStack.getTagCompound().setInteger(NBT_CURRENT_SIGIL, invSize); + itemStack.stackTagCompound = new NBTTagCompound(); + itemStack.stackTagCompound.setInteger(NBT_CURRENT_SIGIL, invSize); } } @@ -176,7 +239,7 @@ public class SigilOfHolding extends BindableItems if (itemStack != null && itemStack.getItem() instanceof SigilOfHolding) { initModeTag(itemStack); - int currentSigil = itemStack.getTagCompound().getInteger(NBT_CURRENT_SIGIL); + int currentSigil = itemStack.stackTagCompound.getInteger(NBT_CURRENT_SIGIL); currentSigil = MathHelper.clamp_int(currentSigil, 0, invSize); return currentSigil; } @@ -246,22 +309,22 @@ public class SigilOfHolding extends BindableItems if (itemStack != null && itemStack.getItem() instanceof SigilOfHolding) { initModeTag(itemStack); - itemStack.getTagCompound().setInteger(NBT_CURRENT_SIGIL, mode); + itemStack.stackTagCompound.setInteger(NBT_CURRENT_SIGIL, mode); } } @Override - public void onUpdate(ItemStack stack, World par2World, Entity par3Entity, int par4, boolean par5) + public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) { - if (!(stack.getTagCompound() == null)) + if (!(par1ItemStack.getTagCompound() == null)) { - this.tickInternalInventory(stack, par2World, par3Entity, par4, par5); + this.tickInternalInventory(par1ItemStack, par2World, par3Entity, par4, par5); } } - public void tickInternalInventory(ItemStack stack, World par2World, Entity par3Entity, int par4, boolean par5) + public void tickInternalInventory(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) { - ItemStack[] inv = getInternalInventory(stack); + ItemStack[] inv = getInternalInventory(par1ItemStack); if (inv == null) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/thaumcraft/ItemSanguineArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/thaumcraft/ItemSanguineArmour.java index f044912d..997740d9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/thaumcraft/ItemSanguineArmour.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/thaumcraft/ItemSanguineArmour.java @@ -1,192 +1,192 @@ -//package WayofTime.alchemicalWizardry.common.items.thaumcraft; -// -//import WayofTime.alchemicalWizardry.AlchemicalWizardry; -//import WayofTime.alchemicalWizardry.ModItems; -//import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -//import cpw.mods.fml.relauncher.Side; -//import cpw.mods.fml.relauncher.SideOnly; -//import net.minecraft.client.renderer.texture.IIconRegister; -//import net.minecraft.entity.Entity; -//import net.minecraft.entity.EntityLivingBase; -//import net.minecraft.entity.player.EntityPlayer; -//import net.minecraft.item.ItemArmor; -//import net.minecraft.item.ItemStack; -//import net.minecraft.util.IIcon; -//import net.minecraft.util.StatCollector; -//import net.minecraft.world.World; -//import thaumcraft.api.IGoggles; -//import thaumcraft.api.IRepairable; -//import thaumcraft.api.IRunicArmor; -//import thaumcraft.api.IVisDiscountGear; -//import thaumcraft.api.aspects.Aspect; -//import thaumcraft.api.nodes.IRevealer; -// -//import java.util.List; -// -//public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGoggles, IVisDiscountGear, IRevealer, IRunicArmor, IRepairable -//{ -// @SideOnly(Side.CLIENT) -// private IIcon helmetIcon; -// @SideOnly(Side.CLIENT) -// private IIcon plateIcon; -// @SideOnly(Side.CLIENT) -// private IIcon leggingsIcon; -// @SideOnly(Side.CLIENT) -// private IIcon bootsIcon; -// -// public ItemSanguineArmour(int armorType) -// { -// super(AlchemicalWizardry.sanguineArmourArmourMaterial, 0, armorType); -// setMaxDamage(1000); -// setCreativeTab(AlchemicalWizardry.tabBloodMagic); -// } -// -// @Override -// @SideOnly(Side.CLIENT) -// public void registerIcons(IIconRegister iconRegister) -// { -// this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); -// this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineHelmet"); -// this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguinePlate"); -// this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineLeggings"); -// this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineBoots"); -// } -// -// @SideOnly(Side.CLIENT) -// public IIcon getIconFromDamage(int par1) -// { -// if (this.equals(ModItems.sanguineHelmet)) -// { -// return this.helmetIcon; -// } -// -// if (this.equals(ModItems.sanguineRobe)) -// { -// return this.plateIcon; -// } -// -// if (this.equals(ModItems.sanguinePants)) -// { -// return this.leggingsIcon; -// } -// -// if (this.equals(ModItems.sanguineBoots)) -// { -// return this.bootsIcon; -// } -// -// return this.itemIcon; -// } -// -// @Override -// public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) -// { -// if (this == ModItems.sanguineHelmet) -// { -// return "alchemicalwizardry:models/armor/sanguineArmour_layer_1.png"; -// } -// -// if (this == ModItems.sanguineRobe || this == ModItems.sanguineBoots) -// { -// return "alchemicalwizardry:models/armor/sanguineArmour_layer_1.png"; -// } -// -// if (this == ModItems.sanguinePants) -// { -// return "alchemicalwizardry:models/armor/sanguineArmour_layer_2.png"; -// } else -// { -// return null; -// } -// } -// -// @Override -// public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) -// { -// int discount = 0; -// -// switch (this.armorType) -// { -// case 0: -// discount = 6; -// break; -// case 1: -// discount = 3; -// break; -// case 2: -// discount = 3; -// break; -// case 3: -// discount = 2; -// break; -// } -// -// switch (this.armorType) -// { -// case 0: -// par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc1")); -// break; -// case 1: -// -// case 2: -// -// case 3: -// par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc2")); -// } -// -// par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.visdisc") + " " + discount + "%"); -// } -// -// @Override -// public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) -// { -// return; -// } -// -// @Override -// public boolean isUpgrade() -// { -// return true; -// } -// -// @Override -// public int getEnergyForTenSeconds() -// { -// return 0; -// } -// -// @Override -// public boolean showNodes(ItemStack itemstack, EntityLivingBase player) -// { -// return true; -// } -// -// @Override -// public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) -// { -// switch (this.armorType) -// { -// case 0: -// return 7; -// case 1: -// return 3; -// case 2: -// return 2; -// case 3: -// return 2; -// } -// return 0; -// } -// -// @Override -// public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) -// { -// return true; -// } -// -// @Override -// public int getRunicCharge(ItemStack itemstack) -// { -// return 0; -// } -//} \ No newline at end of file +package WayofTime.alchemicalWizardry.common.items.thaumcraft; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import thaumcraft.api.IGoggles; +import thaumcraft.api.IRepairable; +import thaumcraft.api.IRunicArmor; +import thaumcraft.api.IVisDiscountGear; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.nodes.IRevealer; + +import java.util.List; + +public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGoggles, IVisDiscountGear, IRevealer, IRunicArmor, IRepairable +{ + @SideOnly(Side.CLIENT) + private IIcon helmetIcon; + @SideOnly(Side.CLIENT) + private IIcon plateIcon; + @SideOnly(Side.CLIENT) + private IIcon leggingsIcon; + @SideOnly(Side.CLIENT) + private IIcon bootsIcon; + + public ItemSanguineArmour(int armorType) + { + super(AlchemicalWizardry.sanguineArmourArmourMaterial, 0, armorType); + setMaxDamage(1000); + setCreativeTab(AlchemicalWizardry.tabBloodMagic); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem"); + this.helmetIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineHelmet"); + this.plateIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguinePlate"); + this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineLeggings"); + this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:SanguineBoots"); + } + + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) + { + if (this.equals(ModItems.sanguineHelmet)) + { + return this.helmetIcon; + } + + if (this.equals(ModItems.sanguineRobe)) + { + return this.plateIcon; + } + + if (this.equals(ModItems.sanguinePants)) + { + return this.leggingsIcon; + } + + if (this.equals(ModItems.sanguineBoots)) + { + return this.bootsIcon; + } + + return this.itemIcon; + } + + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) + { + if (this == ModItems.sanguineHelmet) + { + return "alchemicalwizardry:models/armor/sanguineArmour_layer_1.png"; + } + + if (this == ModItems.sanguineRobe || this == ModItems.sanguineBoots) + { + return "alchemicalwizardry:models/armor/sanguineArmour_layer_1.png"; + } + + if (this == ModItems.sanguinePants) + { + return "alchemicalwizardry:models/armor/sanguineArmour_layer_2.png"; + } else + { + return null; + } + } + + @Override + public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) + { + int discount = 0; + + switch (this.armorType) + { + case 0: + discount = 6; + break; + case 1: + discount = 3; + break; + case 2: + discount = 3; + break; + case 3: + discount = 2; + break; + } + + switch (this.armorType) + { + case 0: + par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc1")); + break; + case 1: + + case 2: + + case 3: + par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc2")); + } + + par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.visdisc") + " " + discount + "%"); + } + + @Override + public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) + { + return; + } + + @Override + public boolean isUpgrade() + { + return true; + } + + @Override + public int getEnergyForTenSeconds() + { + return 0; + } + + @Override + public boolean showNodes(ItemStack itemstack, EntityLivingBase player) + { + return true; + } + + @Override + public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) + { + switch (this.armorType) + { + case 0: + return 7; + case 1: + return 3; + case 2: + return 2; + case 3: + return 2; + } + return 0; + } + + @Override + public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) + { + return true; + } + + @Override + public int getRunicCharge(ItemStack itemstack) + { + return 0; + } +} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/IEnchantmentGlyph.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/IEnchantmentGlyph.java index 06c4b2fc..5c189f92 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/IEnchantmentGlyph.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/IEnchantmentGlyph.java @@ -1,11 +1,9 @@ package WayofTime.alchemicalWizardry.common.omega; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; public interface IEnchantmentGlyph extends IStabilityGlyph { - int getEnchantability(World world, BlockPos pos, int meta); - - int getEnchantmentLevel(World world, BlockPos pos, int meta); + public int getEnchantability(World world, int x, int y, int z, int meta); + public int getEnchantmentLevel(World world, int x, int y, int z, int meta); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/IStabilityGlyph.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/IStabilityGlyph.java index 2b826b0f..50252a94 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/IStabilityGlyph.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/IStabilityGlyph.java @@ -1,9 +1,8 @@ package WayofTime.alchemicalWizardry.common.omega; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; public interface IStabilityGlyph { - int getAdditionalStabilityForFaceCount(World world, BlockPos pos, int meta, int faceCount); + public int getAdditionalStabilityForFaceCount(World world, int x, int y, int z, int meta, int faceCount); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigm.java index 3c93d301..c60b30d2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigm.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigm.java @@ -5,7 +5,6 @@ import java.util.Random; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; @@ -48,7 +47,7 @@ public class OmegaParadigm ItemStack leggingsStack = armours[1]; ItemStack bootsStack = armours[0]; - if(helmetStack != null && helmetStack.getItem() == ModItems.boundHelmet && chestStack != null && chestStack.getItem() == ModItems.boundChestplate && leggingsStack != null && leggingsStack.getItem() == ModItems.boundLeggings && bootsStack != null && bootsStack.getItem() == ModItems.boundBoots) + if(helmetStack != null && helmetStack.getItem() == ModItems.boundHelmet && chestStack != null && chestStack.getItem() == ModItems.boundPlate && leggingsStack != null && leggingsStack.getItem() == ModItems.boundLeggings && bootsStack != null && bootsStack.getItem() == ModItems.boundBoots) { long worldSeed = player.worldObj.getSeed(); Random rand = new Random(worldSeed + stability * (affinity + 7) * 94 + 84321*x - 17423*y + 76*z - 1623451*enchantability + 2 * enchantmentLevel); @@ -133,7 +132,7 @@ public class OmegaParadigm } - public boolean getBlockEffectWhileInside(Entity entity, BlockPos blockPos) + public boolean getBlockEffectWhileInside(Entity entity, int x, int y, int z) { return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmEarth.java index bb021201..65283945 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmEarth.java @@ -1,5 +1,7 @@ package WayofTime.alchemicalWizardry.common.omega; +import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; @@ -33,16 +35,22 @@ public class OmegaParadigmEarth extends OmegaParadigm { if(player.posY < 50 && player.getHealth() < player.getMaxHealth()) { - player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, 0, true, false)); + player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, 0, true)); } } if(player.posY > 100) { - player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, 200, 0, true, false)); + player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, 200, 0, true)); } } + @Override + public boolean getBlockEffectWhileInside(Entity entity, int x, int y, int z) + { + return true; + } + @Override public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmFire.java index d4fd272a..4802841f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmFire.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common.omega; import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; @@ -34,28 +35,34 @@ public class OmegaParadigmFire extends OmegaParadigm boolean isInLava = player.isInsideOfMaterial(Material.lava); if(player.isBurning() && player.getHealth() < player.getMaxHealth()) { - player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, isInLava ? 1 : 0, true, false)); + player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, isInLava ? 1 : 0, true)); } if(player.isBurning()) { - player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, isInLava ? 400 : 200, isInLava ? 1 : 0, true, false)); + player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, isInLava ? 400 : 200, isInLava ? 1 : 0, true)); } if(player.isInWater()) { - player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 200, 2, true, false)); - player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 200, 2, true, false)); - player.addPotionEffect(new PotionEffect(Potion.weakness.id, 200, 1, true, false)); + player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 200, 2, true)); + player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 200, 2, true)); + player.addPotionEffect(new PotionEffect(Potion.weakness.id, 200, 1, true)); } } if(player.isBurning()) { - player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 200, 0, true, false)); + player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 200, 0, true)); } } + @Override + public boolean getBlockEffectWhileInside(Entity entity, int x, int y, int z) + { + return true; + } + @Override public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWater.java index 80fda3d3..941f82cd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWater.java @@ -7,7 +7,6 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; @@ -36,24 +35,24 @@ public class OmegaParadigmWater extends OmegaParadigm @Override public void onUpdate(World world, EntityPlayer player, ItemStack stack) { - player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 3, 0, true, false)); - player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionAmphibian.id, 3, 0, true, false)); + player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 3, 0, true)); + player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionAmphibian.id, 3, 0, true)); if(world.getWorldTime() % 100 == 0 && !world.isRemote) { if(player.isInWater() && player.getHealth() < player.getMaxHealth()) { - player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, 0, true, false)); + player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, 0, true)); } } } @Override - public boolean getBlockEffectWhileInside(Entity entity, BlockPos pos) + public boolean getBlockEffectWhileInside(Entity entity, int x, int y, int z) { if(entity instanceof EntityLivingBase) { - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 100, 1, true, false)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 100, 1, true)); } return true; } @@ -75,7 +74,7 @@ public class OmegaParadigmWater extends OmegaParadigm { for(int k=-range; k<=range; k++) { - TEMimicBlock.createMimicBlockAtLocation(world, new BlockPos(x+i, y+j, z+k), 300, Blocks.water.getDefaultState(), ReagentRegistry.aquasalusReagent); + TEMimicBlock.createMimicBlockAtLocation(world, x+i, y+j, z+k, 300, Blocks.water, 0, ReagentRegistry.aquasalusReagent); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWind.java index 67ad78c8..1276863c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaParadigmWind.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.common.omega; +import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; @@ -32,12 +33,18 @@ public class OmegaParadigmWind extends OmegaParadigm { if(world.getWorldTime() % 100 == 0 && !world.isRemote && player.posY > 128 && player.getHealth() < player.getMaxHealth()) { - player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, player.posY > 128 + 64 ? 1 : 0, true, false)); + player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, player.posY > 128 + 64 ? 1 : 0, true)); } player.fallDistance = 0; } + @Override + public boolean getBlockEffectWhileInside(Entity entity, int x, int y, int z) + { + return true; + } + @Override public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaRegistry.java index 0f804337..d8106b55 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaRegistry.java @@ -9,7 +9,7 @@ import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; public class OmegaRegistry { - public static HashMap<Reagent, OmegaParadigm> omegaList = new HashMap<Reagent, OmegaParadigm>(); + public static HashMap<Reagent, OmegaParadigm> omegaList = new HashMap(); public static void registerParadigm(Reagent reagent, OmegaParadigm parad) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureHandler.java index 45561cf9..7289c491 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/omega/OmegaStructureHandler.java @@ -1,9 +1,6 @@ package WayofTime.alchemicalWizardry.common.omega; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.Int3; @@ -17,7 +14,7 @@ public class OmegaStructureHandler return true; } - public static OmegaStructureParameters getStructureStabilityFactor(World world, BlockPos pos, int expLim, Int3 offset) + public static OmegaStructureParameters getStructureStabilityFactor(World world, int x, int y, int z, int expLim, Int3 offset) { int range = expLim; @@ -49,33 +46,107 @@ public class OmegaStructureHandler { if (boolList[i][j][k] == 1) { - BlockPos position = pos.add(i - range, j - range, k - range); - - for(EnumFacing face : EnumFacing.VALUES) - { - int iP = i + face.getFrontOffsetX(); - int jP = j + face.getFrontOffsetY(); - int kP = k + face.getFrontOffsetZ(); - - if(iP >= 0 && iP <= 2 * range && jP >= 0 && jP <= 2 * range && kP >= 0 && kP <= 2 * range && !(boolList[iP][jP][kP] == 1 || boolList[iP][jP][kP] == -1)) - { - BlockPos newPos = position.add(face.getDirectionVec()); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - if (world.isAirBlock(newPos) || block == ModBlocks.blockSpectralContainer) - { - if(iP == 0 && iP == 2 * range && jP == 0 && jP == 2 * range && kP == 0 && kP == 2 * range) - { - return emptyParam; - } - boolList[iP][jP][kP] = 1; - isReady = false; - }else - { - boolList[iP][jP][kP] = -1; - } - } - } + if (i - 1 >= 0 && !(boolList[i - 1][j][k] == 1 || boolList[i - 1][j][k] == -1)) + { + Block block = world.getBlock(x - range + i - 1, y - range + j, z - range + k); + if (world.isAirBlock(x - range + i - 1, y - range + j, z - range + k) || block == ModBlocks.blockSpectralContainer) + { + if(i - 1 == 0) //One of the found air blocks is at the range boundary, and thus the container is incomplete + { + return emptyParam; + } + boolList[i - 1][j][k] = 1; + isReady = false; + }else + { + boolList[i - 1][j][k] = -1; + } + } + + if (j - 1 >= 0 && !(boolList[i][j - 1][k] == 1 || boolList[i][j - 1][k] == -1)) + { + Block block = world.getBlock(x - range + i, y - range + j - 1, z - range + k); + if (world.isAirBlock(x - range + i, y - range + j - 1, z - range + k) || block == ModBlocks.blockSpectralContainer) + { + if(j - 1 == 0) + { + return emptyParam; + } + boolList[i][j - 1][k] = 1; + isReady = false; + }else + { + boolList[i][j - 1][k] = -1; + } + } + + if (k - 1 >= 0 && !(boolList[i][j][k - 1] == 1 || boolList[i][j][k - 1] == -1)) + { + Block block = world.getBlock(x - range + i, y - range + j, z - range + k - 1); + if (world.isAirBlock(x - range + i, y - range + j, z - range + k - 1) || block == ModBlocks.blockSpectralContainer) + { + if(k - 1 == 0) + { + return emptyParam; + } + boolList[i][j][k - 1] = 1; + isReady = false; + }else + { + boolList[i][j][k - 1] = -1; + } + } + + if (i + 1 <= 2 * range && !(boolList[i + 1][j][k] == 1 || boolList[i + 1][j][k] == -1)) + { + Block block = world.getBlock(x - range + i + 1, y - range + j, z - range + k); + if (world.isAirBlock(x - range + i + 1, y - range + j, z - range + k) || block == ModBlocks.blockSpectralContainer) + { + if(i + 1 == range * 2) + { + return emptyParam; + } + boolList[i + 1][j][k] = 1; + isReady = false; + }else + { + boolList[i + 1][j][k] = -1; + } + } + + if (j + 1 <= 2 * range && !(boolList[i][j + 1][k] == 1 || boolList[i][j + 1][k] == -1)) + { + Block block = world.getBlock(x - range + i, y - range + j + 1, z - range + k); + if (world.isAirBlock(x - range + i, y - range + j + 1, z - range + k) || block == ModBlocks.blockSpectralContainer) + { + if(j + 1 == range * 2) + { + return emptyParam; + } + boolList[i][j + 1][k] = 1; + isReady = false; + }else + { + boolList[i][j + 1][k] = -1; + } + } + + if (k + 1 <= 2 * range && !(boolList[i][j][k + 1] == 1 || boolList[i][j][k + 1] == -1)) + { + Block block = world.getBlock(x - range + i, y - range + j, z - range + k + 1); + if (world.isAirBlock(x - range + i, y - range + j, z - range + k + 1) || block == ModBlocks.blockSpectralContainer) + { + if(k + 1 == range * 2) + { + return emptyParam; + } + boolList[i][j][k + 1] = 1; + isReady = false; + }else + { + boolList[i][j][k + 1] = -1; + } + } } } } @@ -129,20 +200,17 @@ public class OmegaStructureHandler indTally++; } - BlockPos newPos = pos.add(i - range, j - range, k - range); - - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - int meta = block.getMetaFromState(state); + Block block = world.getBlock(x - range + i, y - range + j, z - range + k); + int meta = world.getBlockMetadata(x - range + i, y - range + j, z - range + k); if(block instanceof IEnchantmentGlyph) { - tally += ((IEnchantmentGlyph)block).getAdditionalStabilityForFaceCount(world, newPos, meta, indTally); - enchantability += ((IEnchantmentGlyph)block).getEnchantability(world, newPos, meta); - enchantmentLevel += ((IEnchantmentGlyph)block).getEnchantmentLevel(world, newPos, meta); + tally += ((IEnchantmentGlyph)block).getAdditionalStabilityForFaceCount(world, x-range+i, y-range+j, z-range+k, meta, indTally); + enchantability += ((IEnchantmentGlyph)block).getEnchantability(world, x-range+i, y-range+j, z-range+k, meta); + enchantmentLevel += ((IEnchantmentGlyph)block).getEnchantmentLevel(world, x-range+i, y-range+j, z-range+k, meta); }else if(block instanceof IStabilityGlyph) { - tally += ((IStabilityGlyph)block).getAdditionalStabilityForFaceCount(world, newPos, meta, indTally); + tally += ((IStabilityGlyph)block).getAdditionalStabilityForFaceCount(world, x-range+i, y-range+j, z-range+k, meta, indTally); }else { tally += indTally; @@ -154,8 +222,8 @@ public class OmegaStructureHandler return new OmegaStructureParameters(tally, enchantability, enchantmentLevel); } - public static OmegaStructureParameters getStructureStabilityFactor(World world, BlockPos pos, int expLim) + public static OmegaStructureParameters getStructureStabilityFactor(World world, int x, int y, int z, int expLim) { - return getStructureStabilityFactor(world, pos, expLim, new Int3(0, 0, 0)); + return getStructureStabilityFactor(world, x, y, z, expLim, new Int3(0, 0, 0)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBloodMagic.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionAmphibian.java similarity index 53% rename from src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBloodMagic.java rename to src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionAmphibian.java index 4b86628d..1e3afb29 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBloodMagic.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionAmphibian.java @@ -1,13 +1,12 @@ package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; -import net.minecraft.util.ResourceLocation; -public class PotionBloodMagic extends Potion +public class PotionAmphibian extends Potion { - public PotionBloodMagic(int par1, boolean par2, int par3) + public PotionAmphibian(int par1, boolean par2, int par3) { - super(par1, new ResourceLocation("speed"),par2, par3); + super(par1, par2, par3); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBoost.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBoost.java new file mode 100644 index 00000000..132205bb --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionBoost.java @@ -0,0 +1,18 @@ +package WayofTime.alchemicalWizardry.common.potion; + +import net.minecraft.potion.Potion; + +public class PotionBoost extends Potion +{ + public PotionBoost(int par1, boolean par2, int par3) + { + super(par1, par2, par3); + } + + @Override + public Potion setIconIndex(int par1, int par2) + { + super.setIconIndex(par1, par2); + return this; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDeaf.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDeaf.java new file mode 100644 index 00000000..fc46e77b --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDeaf.java @@ -0,0 +1,18 @@ +package WayofTime.alchemicalWizardry.common.potion; + +import net.minecraft.potion.Potion; + +public class PotionDeaf extends Potion +{ + public PotionDeaf(int par1, boolean par2, int par3) + { + super(par1, par2, par3); + } + + @Override + public Potion setIconIndex(int par1, int par2) + { + super.setIconIndex(par1, par2); + return this; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDemonCloak.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDemonCloak.java new file mode 100644 index 00000000..ea2045f4 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDemonCloak.java @@ -0,0 +1,18 @@ +package WayofTime.alchemicalWizardry.common.potion; + +import net.minecraft.potion.Potion; + +public class PotionDemonCloak extends Potion +{ + public PotionDemonCloak(int par1, boolean par2, int par3) + { + super(par1, par2, par3); + } + + @Override + public Potion setIconIndex(int par1, int par2) + { + super.setIconIndex(par1, par2); + return this; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDrowning.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDrowning.java new file mode 100644 index 00000000..87558f26 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionDrowning.java @@ -0,0 +1,18 @@ +package WayofTime.alchemicalWizardry.common.potion; + +import net.minecraft.potion.Potion; + +public class PotionDrowning extends Potion +{ + public PotionDrowning(int par1, boolean par2, int par3) + { + super(par1, par2, par3); + } + + @Override + public Potion setIconIndex(int par1, int par2) + { + super.setIconIndex(par1, par2); + return this; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFeatherFall.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFeatherFall.java new file mode 100644 index 00000000..0c35263b --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFeatherFall.java @@ -0,0 +1,18 @@ +package WayofTime.alchemicalWizardry.common.potion; + +import net.minecraft.potion.Potion; + +public class PotionFeatherFall extends Potion +{ + public PotionFeatherFall(int par1, boolean par2, int par3) + { + super(par1, par2, par3); + } + + @Override + public Potion setIconIndex(int par1, int par2) + { + super.setIconIndex(par1, par2); + return this; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFireFuse.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFireFuse.java new file mode 100644 index 00000000..8fe5d527 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFireFuse.java @@ -0,0 +1,18 @@ +package WayofTime.alchemicalWizardry.common.potion; + +import net.minecraft.potion.Potion; + +public class PotionFireFuse extends Potion +{ + public PotionFireFuse(int par1, boolean par2, int par3) + { + super(par1, par2, par3); + } + + @Override + public Potion setIconIndex(int par1, int par2) + { + super.setIconIndex(par1, par2); + return this; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlameCloak.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlameCloak.java new file mode 100644 index 00000000..46363b11 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlameCloak.java @@ -0,0 +1,18 @@ +package WayofTime.alchemicalWizardry.common.potion; + +import net.minecraft.potion.Potion; + +public class PotionFlameCloak extends Potion +{ + public PotionFlameCloak(int par1, boolean par2, int par3) + { + super(par1, par2, par3); + } + + @Override + public Potion setIconIndex(int par1, int par2) + { + super.setIconIndex(par1, par2); + return this; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlight.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlight.java new file mode 100644 index 00000000..23e93e57 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionFlight.java @@ -0,0 +1,18 @@ +package WayofTime.alchemicalWizardry.common.potion; + +import net.minecraft.potion.Potion; + +public class PotionFlight extends Potion +{ + public PotionFlight(int par1, boolean par2, int par3) + { + super(par1, par2, par3); + } + + @Override + public Potion setIconIndex(int par1, int par2) + { + super.setIconIndex(par1, par2); + return this; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionHeavyHeart.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionHeavyHeart.java new file mode 100644 index 00000000..952fb59c --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionHeavyHeart.java @@ -0,0 +1,18 @@ +package WayofTime.alchemicalWizardry.common.potion; + +import net.minecraft.potion.Potion; + +public class PotionHeavyHeart extends Potion +{ + public PotionHeavyHeart(int par1, boolean par2, int par3) + { + super(par1, par2, par3); + } + + @Override + public Potion setIconIndex(int par1, int par2) + { + super.setIconIndex(par1, par2); + return this; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionIceCloak.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionIceCloak.java new file mode 100644 index 00000000..c2ba716a --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionIceCloak.java @@ -0,0 +1,18 @@ +package WayofTime.alchemicalWizardry.common.potion; + +import net.minecraft.potion.Potion; + +public class PotionIceCloak extends Potion +{ + public PotionIceCloak(int par1, boolean par2, int par3) + { + super(par1, par2, par3); + } + + @Override + public Potion setIconIndex(int par1, int par2) + { + super.setIconIndex(par1, par2); + return this; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionInhibit.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionInhibit.java new file mode 100644 index 00000000..2214e105 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionInhibit.java @@ -0,0 +1,18 @@ +package WayofTime.alchemicalWizardry.common.potion; + +import net.minecraft.potion.Potion; + +public class PotionInhibit extends Potion +{ + public PotionInhibit(int par1, boolean par2, int par3) + { + super(par1, par2, par3); + } + + @Override + public Potion setIconIndex(int par1, int par2) + { + super.setIconIndex(par1, par2); + return this; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionPlanarBinding.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionPlanarBinding.java new file mode 100644 index 00000000..54d6cd72 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionPlanarBinding.java @@ -0,0 +1,18 @@ +package WayofTime.alchemicalWizardry.common.potion; + +import net.minecraft.potion.Potion; + +public class PotionPlanarBinding extends Potion +{ + public PotionPlanarBinding(int par1, boolean par2, int par3) + { + super(par1, par2, par3); + } + + @Override + public Potion setIconIndex(int par1, int par2) + { + super.setIconIndex(par1, par2); + return this; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionProjectileProtect.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionProjectileProtect.java new file mode 100644 index 00000000..317edd54 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionProjectileProtect.java @@ -0,0 +1,18 @@ +package WayofTime.alchemicalWizardry.common.potion; + +import net.minecraft.potion.Potion; + +public class PotionProjectileProtect extends Potion +{ + public PotionProjectileProtect(int par1, boolean par2, int par3) + { + super(par1, par2, par3); + } + + @Override + public Potion setIconIndex(int par1, int par2) + { + super.setIconIndex(par1, par2); + return this; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionReciprocation.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionReciprocation.java new file mode 100644 index 00000000..ddceed0b --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionReciprocation.java @@ -0,0 +1,18 @@ +package WayofTime.alchemicalWizardry.common.potion; + +import net.minecraft.potion.Potion; + +public class PotionReciprocation extends Potion +{ + public PotionReciprocation(int par1, boolean par2, int par3) + { + super(par1, par2, par3); + } + + @Override + public Potion setIconIndex(int par1, int par2) + { + super.setIconIndex(par1, par2); + return this; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulFray.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulFray.java new file mode 100644 index 00000000..304b0307 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulFray.java @@ -0,0 +1,34 @@ +package WayofTime.alchemicalWizardry.common.potion; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; + +import java.util.ArrayList; + +public class PotionSoulFray extends Potion +{ + public PotionSoulFray(int par1, boolean par2, int par3) + { + super(par1, par2, par3); + } + + @Override + public Potion setIconIndex(int par1, int par2) + { + super.setIconIndex(par1, par2); + return this; + } + + @Override + public void performEffect(EntityLivingBase entityLivingBase, int level) + { + entityLivingBase.getActivePotionEffect(this).setCurativeItems(new ArrayList<ItemStack>()); + } + + @Override + public boolean isReady(int duration, int level) + { + return true; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulHarden.java b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulHarden.java new file mode 100644 index 00000000..0ac24694 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulHarden.java @@ -0,0 +1,18 @@ +package WayofTime.alchemicalWizardry.common.potion; + +import net.minecraft.potion.Potion; + +public class PotionSoulHarden extends Potion +{ + public PotionSoulHarden(int par1, boolean par2, int par3) + { + super(par1, par2, par3); + } + + @Override + public Potion setIconIndex(int par1, int par2) + { + super.setIconIndex(par1, par2); + return this; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/AlchemyCircleRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/AlchemyCircleRenderer.java index 29185083..d58f5581 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/AlchemyCircleRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/AlchemyCircleRenderer.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.common.renderer; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; +import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; @@ -47,34 +47,36 @@ public class AlchemyCircleRenderer extends MRSRenderer } GL11.glPushMatrix(); - Tessellator tessellator = Tessellator.getInstance(); + float f1 = 1.0f; + Tessellator tessellator = Tessellator.instance; this.bindTexture(resourceLocation); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_CULL_FACE); + float f2 = 0; + float f3 = -f2 * 0.2F - (float) MathHelper.floor_float(-f2 * 0.1F); // GL11.glEnable(GL11.GL_BLEND); // GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); // GL11.glDepthMask(false); - WorldRenderer wr = tessellator.getWorldRenderer(); - wr.startDrawingQuads(); - wr.func_178961_b(colourRed, colourGreen, colourBlue, colourIntensity); + tessellator.startDrawingQuads(); + tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity); GL11.glTranslated(x + 0.5 + xOffset, y + 0.5 + (yOffset - initialY) * (tile.getRunningTime() / 100d) + initialY, z + 0.5 + zOffset); float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL); GL11.glRotatef(rotationAngle, 0F, 1F, 0F); //Rotate on planar axis -// tessellator.setBrightness(240); + tessellator.setBrightness(240); double finalRadius = (radius) * (tile.getRunningTime() / 100d); - wr.addVertexWithUV(-finalRadius, 0, -finalRadius, 0.0d, 0.0d); - wr.addVertexWithUV(finalRadius, 0, -finalRadius, 1.0d, 0.0d); - wr.addVertexWithUV(finalRadius, 0, finalRadius, 1.0d, 1.0d); - wr.addVertexWithUV(-finalRadius, 0, finalRadius, 0.0d, 1.0d); + tessellator.addVertexWithUV(-finalRadius, 0, -finalRadius, 0.0d, 0.0d); + tessellator.addVertexWithUV(finalRadius, 0, -finalRadius, 1.0d, 0.0d); + tessellator.addVertexWithUV(finalRadius, 0, finalRadius, 1.0d, 1.0d); + tessellator.addVertexWithUV(-finalRadius, 0, finalRadius, 0.0d, 1.0d); tessellator.draw(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/BeamRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/BeamRenderer.java new file mode 100644 index 00000000..06ddafd3 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/BeamRenderer.java @@ -0,0 +1,146 @@ +package WayofTime.alchemicalWizardry.common.renderer; + +import WayofTime.alchemicalWizardry.api.ColourAndCoords; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.texture.TextureManager; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class BeamRenderer +{ + private static final ResourceLocation field_110629_a = new ResourceLocation("textures/entity/beacon_beam.png"); + + public int xInit; + public int yInit; + public int zInit; + + public int xFinal; + public int yFinal; + public int zFinal; + + public int colourRed; + public int colourGreen; + public int colourBlue; + public int colourIntensity; + + public double size; + + public void setInitialPosition(int x, int y, int z) + { + this.xInit = x; + this.yInit = y; + this.zInit = z; + } + + public void setColourAndFinalPosition(ColourAndCoords col) + { + this.colourRed = col.colourRed; + this.colourGreen = col.colourGreen; + this.colourBlue = col.colourBlue; + this.colourIntensity = col.colourIntensity; + + this.xFinal = col.xCoord; + this.yFinal = col.yCoord; + this.zFinal = col.zCoord; + } + + public void setSize(double size) + { + this.size = size; + } + + protected static void bindTexture(ResourceLocation p_147499_1_) + { + TextureManager texturemanager = TileEntityRendererDispatcher.instance.field_147553_e; + + if (texturemanager != null) + { + texturemanager.bindTexture(p_147499_1_); + } + } + + public void render(double d0, double d1, double d2) + { + int xDiff = this.xFinal - this.xInit; + int yDiff = this.yFinal - this.yInit; + int zDiff = this.zFinal - this.zInit; + + float planarAngle = (float) (Math.atan2(-zDiff, xDiff) * 180d / Math.PI); //Radians + float verticalAngle = (float) (Math.atan2(yDiff, Math.sqrt(xDiff * xDiff + zDiff + zDiff)) * 180d / Math.PI); + + float distance = (float) Math.sqrt(xDiff * xDiff + yDiff * yDiff + zDiff * zDiff); //Total distance + + GL11.glPushMatrix(); + float f1 = 1.0f; + Tessellator tessellator = Tessellator.instance; + BeamRenderer.bindTexture(field_110629_a); + GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); + GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_CULL_FACE); + float f2 = 0; + float f3 = -f2 * 0.2F - (float) MathHelper.floor_float(-f2 * 0.1F); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + + + GL11.glDepthMask(false); + + tessellator.startDrawingQuads(); + tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity); + + double inside = -(this.size / 2d); + double outside = 1.0d - (0.50d - this.size / 2d) - 0.5d; + + double d18 = inside; + double d19 = inside; + double d20 = outside; + double d21 = inside; + double d22 = inside; + double d23 = outside; + double d24 = outside; + double d25 = outside; + double d26 = (double) (distance * f1);// + 0.2; + double d27 = 0.0D; + double d28 = 1.0D; + double d29 = (double) (-1.0F + f3); + double d30 = (double) (distance * f1) + d29; + + GL11.glTranslated(d0 + 0.5, d1 + 0.5, d2 + 0.5); + + GL11.glRotatef(planarAngle, 0F, 1F, 0F); //Rotate on planar axis + GL11.glRotatef(verticalAngle, 0F, 0F, 1F); //Rotate vertical axis + //GL11.glRotatef(tileAltar.getWorldObj().getWorldTime()*2f, 1F, 0F, 0F); //Rotate cylindrically + + double offset = 0; + + tessellator.setBrightness(240); + float s = 1F / 16F; + tessellator.addVertexWithUV(d26, d18, d19, d28, d30); + tessellator.addVertexWithUV(offset, d18, d19, d28, d29); + tessellator.addVertexWithUV(offset, d20, d21, d27, d29); + tessellator.addVertexWithUV(d26, d20, d21, d27, d30); + tessellator.addVertexWithUV(d26, d24, d25, d28, d30); + tessellator.addVertexWithUV(offset, d24, d25, d28, d29); + tessellator.addVertexWithUV(offset, d22, d23, d27, d29); + tessellator.addVertexWithUV(d26, d22, d23, d27, d30); + tessellator.addVertexWithUV(d26, d20, d21, d28, d30); + tessellator.addVertexWithUV(offset, d20, d21, d28, d29); + tessellator.addVertexWithUV(offset, d24, d25, d27, d29); + tessellator.addVertexWithUV(d26, d24, d25, d27, d30); + tessellator.addVertexWithUV(d26, d22, d23, d28, d30); + tessellator.addVertexWithUV(offset, d22, d23, d28, d29); + tessellator.addVertexWithUV(offset, d18, d19, d27, d29); + tessellator.addVertexWithUV(d26, d18, d19, d27, d30); + + tessellator.draw(); + GL11.glDepthMask(true); + + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_TEXTURE_2D); + GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); + GL11.glPopMatrix(); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java new file mode 100644 index 00000000..26ace13d --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicCalcinator.java @@ -0,0 +1,420 @@ +package WayofTime.alchemicalWizardry.common.renderer.block; + +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelAlchemicalCalcinator; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; +import cpw.mods.fml.client.FMLClientHandler; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.common.util.ForgeDirection; +import org.lwjgl.opengl.GL11; + +public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer +{ + private final RenderItem customRenderItem; + private ModelAlchemicalCalcinator modelConduit = new ModelAlchemicalCalcinator(); + + private ResourceLocation resourceLocation = new ResourceLocation("alchemicalwizardry:textures/models/Reagent.png"); + + public RenderAlchemicCalcinator() + { + customRenderItem = new RenderItem() + { + @Override + public boolean shouldBob() + { + return false; + } + }; + customRenderItem.setRenderManager(RenderManager.instance); + } + + @Override + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) + { + if (tileEntity instanceof TEAlchemicCalcinator) + { + TEAlchemicCalcinator tileAltar = (TEAlchemicCalcinator) tileEntity; + + GL11.glPushMatrix(); + GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); + ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/AlchemicalCalcinator.png"); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); + GL11.glPushMatrix(); + GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); + this.modelConduit.render(null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + GL11.glPopMatrix(); + GL11.glPopMatrix(); + + GL11.glPushMatrix(); + + if (tileAltar.getStackInSlot(1) != null) + { + float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(1)); + EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj()); + ghostEntityItem.hoverStart = 0.0F; + ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(1)); + float displacement = 0.2F; + + if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) + { + GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.7F, (float) d2 + 0.5F); + } else + { + GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 10.4f / 16.0f, (float) d2 + 0.5F - 0.0625f * 2f); + } + GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); + + if (!(ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock)) + { + GL11.glRotatef(90f, 1.0f, 0.0f, 0.0F); + } + + customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0); + } + + + GL11.glPopMatrix(); + GL11.glPushMatrix(); + + if (tileAltar.getStackInSlot(0) != null) + { + float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0)); + EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj()); + ghostEntityItem.hoverStart = 0.0F; + ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0)); + float displacement = -0.5F; + + if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) + { + GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.7F, (float) d2 + 0.5F); + } else + { + GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 10.4f / 16.0f, (float) d2 + 0.5F - 0.0625f * 2f); + } + GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); + + if (!(ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock)) + { + GL11.glRotatef(90f, 1.0f, 0.0f, 0.0F); + } + + customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0); + } + + GL11.glPopMatrix(); + + + ReagentContainerInfo[] info = tileAltar.getContainerInfo(ForgeDirection.UNKNOWN); + if (info.length >= 1 && info[0] != null) + { + ReagentStack reagentStack = info[0].reagent; + int capacity = info[0].capacity; + if (reagentStack != null && reagentStack.reagent != null) + { + Reagent reagent = reagentStack.reagent; + this.renderTankContents(d0, d1, d2, reagent.getColourRed(), reagent.getColourGreen(), reagent.getColourBlue(), 200 * reagentStack.amount / capacity); + } + } + } + } + + private void renderTankContents(double x, double y, double z, int colourRed, int colourGreen, int colourBlue, int colourIntensity) + { + GL11.glPushMatrix(); + Tessellator tessellator = Tessellator.instance; + this.bindTexture(resourceLocation); + GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); + GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_CULL_FACE); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + + GL11.glDepthMask(false); + + tessellator.startDrawingQuads(); + tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity); + GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5); + tessellator.setBrightness(240); + + double x1 = -7d / 16d; + double x2 = 7d / 16d; + double y1 = 1d / 16d; + double y2 = 5d / 16d; + double z1 = -7d / 16d; + double z2 = 7d / 16d; + + double resx1 = 0.0d; + double resx2 = 0.0d; + double resy1 = 1.0d; + double resy2 = 1.0d; + + tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1); + tessellator.addVertexWithUV(x2, y1, z1, resx2, resy1); + tessellator.addVertexWithUV(x2, y2, z1, resx2, resy2); + tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2); + tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1); + tessellator.addVertexWithUV(x1, y1, z2, resx2, resy1); + tessellator.addVertexWithUV(x1, y2, z2, resx2, resy2); + tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2); + tessellator.addVertexWithUV(x1, y1, z2, resx1, resy1); + tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1); + tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2); + tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2); + tessellator.addVertexWithUV(x2, y1, z1, resx1, resy1); + tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1); + tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2); + tessellator.addVertexWithUV(x2, y2, z1, resx1, resy2); + tessellator.draw(); + + GL11.glDepthMask(true); + + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_TEXTURE_2D); + GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); + GL11.glPopMatrix(); + } + + private float getGhostItemScaleFactor(ItemStack itemStack) + { + float scaleFactor = 1.5F; + + if (itemStack != null) + { + if (itemStack.getItem() instanceof ItemBlock) + { + switch (customRenderItem.getMiniBlockCount(itemStack, (byte) 1)) + { + case 1: + return 0.90F * scaleFactor; + + case 2: + return 0.90F * scaleFactor; + + case 3: + return 0.90F * scaleFactor; + + case 4: + return 0.90F * scaleFactor; + + case 5: + return 0.80F * scaleFactor; + + default: + return 0.90F * scaleFactor; + } + } else + { + switch (customRenderItem.getMiniItemCount(itemStack, (byte) 1)) + { + case 1: + return 0.65F * scaleFactor; + + case 2: + return 0.65F * scaleFactor; + + case 3: + return 0.65F * scaleFactor; + + case 4: + return 0.65F * scaleFactor; + + default: + return 0.65F * scaleFactor; + } + } + } + + return scaleFactor; + } + + private float getXDisplacementForSlot(int slot) + { + switch (slot) + { + case 0: + return 0.0f; + + case 1: + return -0.375f; + + case 2: + return -0.125f; + + case 3: + return 0.3125f; + + case 4: + return 0.3125f; + + case 5: + return -0.125f; + + default: + return 0.0f; + } + } + + private float getYDisplacementForSlot(int slot) + { + switch (slot) + { + case 0: + return 0.4f; + + case 1: + return -0.35f; + + case 6: + return 0.4f; + + default: + return -0.35f; + } + } + + private float getZDisplacementForSlot(int slot) + { + switch (slot) + { + case 0: + return 0.0f; + + case 1: + return 0.0f; + + case 2: + return 0.375f; + + case 3: + return 0.25f; + + case 4: + return -0.25f; + + case 5: + return -0.375f; + + default: + return 0.0f; + } + } + + private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection) + { + if (ghostItemStack != null) + { + if (ghostItemStack.getItem() instanceof ItemBlock) + { + switch (forgeDirection) + { + case DOWN: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 2.7F, (float) z + 0.5F); + return; + } + + case UP: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.25F, (float) z + 0.5F); + return; + } + + case NORTH: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.7F); + return; + } + + case SOUTH: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.3F); + return; + } + + case EAST: + { + GL11.glTranslatef((float) x + 0.3F, (float) y + 0.5F, (float) z + 0.5F); + return; + } + + case WEST: + { + GL11.glTranslatef((float) x + 0.70F, (float) y + 0.5F, (float) z + 0.5F); + return; + } + + case UNKNOWN: + { + return; + } + + default: + { + + } + } + } else + { + switch (forgeDirection) + { + case DOWN: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.6F, (float) z + 0.5F); + return; + } + + case UP: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.20F, (float) z + 0.5F); + return; + } + + case NORTH: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.7F); + return; + } + + case SOUTH: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.3F); + return; + } + + case EAST: + { + GL11.glTranslatef((float) x + 0.3F, (float) y + 0.4F, (float) z + 0.5F); + return; + } + + case WEST: + { + GL11.glTranslatef((float) x + 0.70F, (float) y + 0.4F, (float) z + 0.5F); + return; + } + + case UNKNOWN: + { + return; + } + + default: + { + + } + } + } + } + } +} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicalCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicalCalcinator.java deleted file mode 100644 index defed192..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAlchemicalCalcinator.java +++ /dev/null @@ -1,201 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block; - -import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelAlchemicalCalcinator; - -public class RenderAlchemicalCalcinator extends TileEntitySpecialRenderer -{ - private final RenderItem customRenderItem; - private ModelAlchemicalCalcinator modelConduit = new ModelAlchemicalCalcinator(); - - private ResourceLocation resourceLocation = new ResourceLocation("alchemicalwizardry:textures/models/Reagent.png"); - - public RenderAlchemicalCalcinator() - { - customRenderItem = Minecraft.getMinecraft().getRenderItem(); - } - - @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) - { - if (tileEntity instanceof TEAlchemicalCalcinator) - { - TEAlchemicalCalcinator tileAltar = (TEAlchemicalCalcinator) tileEntity; - - GL11.glPushMatrix(); - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); - ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/AlchemicalCalcinator.png"); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); - GL11.glPushMatrix(); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelConduit.render(null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - - GL11.glPushMatrix(); - - if (tileAltar.getStackInSlot(1) != null) - { - float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(1)); - EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld()); - ghostEntityItem.hoverStart = 0.0F; - ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(1)); - float displacement = 0.2F; - - if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) - { - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.7F, (float) d2 + 0.5F); - } else - { - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 10.4f / 16.0f, (float) d2 + 0.5F - 0.0625f * 2f); - } - GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); - - if (!(ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock)) - { - GL11.glRotatef(90f, 1.0f, 0.0f, 0.0F); - } - - customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel - } - - - GL11.glPopMatrix(); - GL11.glPushMatrix(); - - if (tileAltar.getStackInSlot(0) != null) - { - float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0)); - EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld()); - ghostEntityItem.hoverStart = 0.0F; - ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0)); - float displacement = -0.5F; - - if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) - { - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.7F, (float) d2 + 0.5F); - } else - { - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 10.4f / 16.0f, (float) d2 + 0.5F - 0.0625f * 2f); - } - GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); - - if (!(ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock)) - { - GL11.glRotatef(90f, 1.0f, 0.0f, 0.0F); - } - - customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel - } - - GL11.glPopMatrix(); - - - ReagentContainerInfo[] info = tileAltar.getContainerInfo(EnumFacing.UP); - if (info.length >= 1 && info[0] != null) - { - ReagentStack reagentStack = info[0].reagent; - int capacity = info[0].capacity; - if (reagentStack != null && reagentStack.reagent != null) - { - Reagent reagent = reagentStack.reagent; - this.renderTankContents(d0, d1, d2, reagent.getColourRed(), reagent.getColourGreen(), reagent.getColourBlue(), 200 * reagentStack.amount / capacity); - } - } - } - } - - private void renderTankContents(double x, double y, double z, int colourRed, int colourGreen, int colourBlue, int colourIntensity) - { - GL11.glPushMatrix(); - Tessellator tessellator = Tessellator.getInstance(); - this.bindTexture(resourceLocation); - GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); - GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_CULL_FACE); - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - - GL11.glDepthMask(false); - - WorldRenderer wr = tessellator.getWorldRenderer(); - wr.startDrawingQuads(); - wr.func_178961_b(colourRed, colourGreen, colourBlue, colourIntensity); //setCoulourRGBA - GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5); - wr.func_178963_b(240); //setBrightness - - double x1 = -7d / 16d; - double x2 = 7d / 16d; - double y1 = 1d / 16d; - double y2 = 5d / 16d; - double z1 = -7d / 16d; - double z2 = 7d / 16d; - - double resx1 = 0.0d; - double resx2 = 0.0d; - double resy1 = 1.0d; - double resy2 = 1.0d; - - wr.addVertexWithUV(x1, y1, z1, resx1, resy1); - wr.addVertexWithUV(x2, y1, z1, resx2, resy1); - wr.addVertexWithUV(x2, y2, z1, resx2, resy2); - wr.addVertexWithUV(x1, y2, z1, resx1, resy2); - wr.addVertexWithUV(x1, y1, z1, resx1, resy1); - wr.addVertexWithUV(x1, y1, z2, resx2, resy1); - wr.addVertexWithUV(x1, y2, z2, resx2, resy2); - wr.addVertexWithUV(x1, y2, z1, resx1, resy2); - wr.addVertexWithUV(x1, y1, z2, resx1, resy1); - wr.addVertexWithUV(x2, y1, z2, resx2, resy1); - wr.addVertexWithUV(x2, y2, z2, resx2, resy2); - wr.addVertexWithUV(x1, y2, z2, resx1, resy2); - wr.addVertexWithUV(x2, y1, z1, resx1, resy1); - wr.addVertexWithUV(x2, y1, z2, resx2, resy1); - wr.addVertexWithUV(x2, y2, z2, resx2, resy2); - wr.addVertexWithUV(x2, y2, z1, resx1, resy2); - tessellator.draw(); - - GL11.glDepthMask(true); - - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_TEXTURE_2D); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - GL11.glPopMatrix(); - } - - private float getGhostItemScaleFactor(ItemStack itemStack) - { - float scaleFactor = 1.5F; - - if (itemStack != null) - { - if (itemStack.getItem() instanceof ItemBlock) - { - return 0.90F * scaleFactor; - } else - { - return 0.65F * scaleFactor; - } - } - - return scaleFactor; - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAltar.java deleted file mode 100644 index 6f1294a2..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderAltar.java +++ /dev/null @@ -1,80 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; - -public class RenderAltar extends TileEntitySpecialRenderer -{ - private ModelBloodAltar modelBloodAltar = new ModelBloodAltar(); - private final RenderItem customRenderItem; - - public RenderAltar() - { - customRenderItem = Minecraft.getMinecraft().getRenderItem(); - } - - @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) - { - modelBloodAltar.renderBloodAltar((TEAltar) tileEntity, d0, d1, d2); - modelBloodAltar.renderBloodLevel((TEAltar) tileEntity, d0, d1, d2); - - if (tileEntity instanceof TEAltar) - { - TEAltar tileAltar = (TEAltar) tileEntity; - GL11.glPushMatrix(); - - if (tileAltar.getStackInSlot(0) != null) - { - float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0)); - float rotationAngle = Minecraft.getMinecraft().gameSettings.fancyGraphics ? (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL) : 0; - EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld()); - ghostEntityItem.hoverStart = 0.0F; - ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0)); - float displacement = 0.2F; - - if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) - { - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.7F, (float) d2 + 0.5F); - } else - { - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.6F, (float) d2 + 0.5F); - } - GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); - GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F); - customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel - } - - GL11.glPopMatrix(); - } - } - - private float getGhostItemScaleFactor(ItemStack itemStack) - { - float scaleFactor = 1.0F; - - if (itemStack != null) - { - if (itemStack.getItem() instanceof ItemBlock) - { - return 0.9f; - } else - { - return 0.65f; - } - } - - return scaleFactor; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderChemistrySet.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderChemistrySet.java deleted file mode 100644 index cc3aa790..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderChemistrySet.java +++ /dev/null @@ -1,166 +0,0 @@ -package WayofTime.alchemicalWizardry.common.renderer.block; - -import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - -import WayofTime.alchemicalWizardry.common.renderer.model.ModelChemistrySet; - -public class RenderChemistrySet extends TileEntitySpecialRenderer -{ - private ModelChemistrySet modelChemistrySet = new ModelChemistrySet(); - private final RenderItem customRenderItem; - - public RenderChemistrySet() - { - customRenderItem = Minecraft.getMinecraft().getRenderItem(); - } - - @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int a) - { - if (tileEntity instanceof TEChemistrySet) - { - TEChemistrySet tileAltar = (TEChemistrySet) tileEntity; - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPushMatrix(); - GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); - ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/WritingTable.png"); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); - GL11.glPushMatrix(); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelChemistrySet.render(null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - - for (int i = 1; i <= 6; i++) - { - GL11.glPushMatrix(); - GL11.glEnable(GL11.GL_LIGHTING); - if (tileAltar.getStackInSlot(i) != null) - { - float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(i)); - float rotationAngle = Minecraft.getMinecraft().gameSettings.fancyGraphics ? (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL) : 0; - EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld()); - ghostEntityItem.hoverStart = 0.0F; - ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(i)); - float displacementX = getXDisplacementForSlot(i); - float displacementY = getYDisplacementForSlot(i); - float displacementZ = getZDisplacementForSlot(i); - - if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) - { - GL11.glTranslatef((float) d0 + 0.5F + displacementX, (float) d1 + displacementY + 0.7F, (float) d2 + 0.5F + displacementZ); - } else - { - GL11.glTranslatef((float) d0 + 0.5F + displacementX, (float) d1 + displacementY + 0.6F, (float) d2 + 0.5F + displacementZ); - } - GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); - GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F); - customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel - } - - GL11.glPopMatrix(); - } - } - } - - private float getGhostItemScaleFactor(ItemStack itemStack) - { - float scaleFactor = 0.8F; - - if (itemStack != null) - { - if (itemStack.getItem() instanceof ItemBlock) - { - return 0.9f * scaleFactor; - } else - { - return 0.65F * scaleFactor; - } - } - - return scaleFactor; - } - - private float getXDisplacementForSlot(int slot) - { - switch (slot) - { - case 0: - return 0.0f; - - case 1: - return -0.375f; - - case 2: - return -0.125f; - - case 3: - return 0.3125f; - - case 4: - return 0.3125f; - - case 5: - return -0.125f; - - default: - return 0.0f; - } - } - - private float getYDisplacementForSlot(int slot) - { - switch (slot) - { - case 0: - return 0.4f; - - case 1: - return -0.35f; - - case 6: - return 0.4f; - - default: - return -0.35f; - } - } - - private float getZDisplacementForSlot(int slot) - { - switch (slot) - { - case 0: - return 0.0f; - - case 1: - return 0.0f; - - case 2: - return 0.375f; - - case 3: - return 0.25f; - - case 4: - return -0.25f; - - case 5: - return -0.375f; - - default: - return 0.0f; - } - } -} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java index 2eb6d20a..07a1ffd8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderConduit.java @@ -1,21 +1,20 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - import WayofTime.alchemicalWizardry.common.renderer.model.ModelConduit; import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; +import cpw.mods.fml.client.FMLClientHandler; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; public class RenderConduit extends TileEntitySpecialRenderer { private ModelConduit modelConduit = new ModelConduit(); @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { if (tileEntity instanceof TEConduit) { @@ -26,7 +25,7 @@ public class RenderConduit extends TileEntitySpecialRenderer FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelConduit.render(null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileConduit.getInputDirection(), tileConduit.getOutputDirection()); + this.modelConduit.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileConduit.getInputDirection(), tileConduit.getOutputDirection()); GL11.glPopMatrix(); GL11.glPopMatrix(); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java index 2330212b..b37b9391 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderCrystalBelljar.java @@ -1,20 +1,18 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import WayofTime.alchemicalWizardry.common.renderer.model.ModelCrystalBelljar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; +import cpw.mods.fml.client.FMLClientHandler; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.common.util.ForgeDirection; +import org.lwjgl.opengl.GL11; public class RenderCrystalBelljar extends TileEntitySpecialRenderer { @@ -22,12 +20,13 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer private ResourceLocation resourceLocation = new ResourceLocation("alchemicalwizardry:textures/models/Reagent.png"); + @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { - if (tileEntity instanceof TEBelljar) + if (tileEntity instanceof TEBellJar) { - TEBelljar tileAltar = (TEBelljar) tileEntity; + TEBellJar tileAltar = (TEBellJar) tileEntity; GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/CrystalBelljar.png"); @@ -38,7 +37,7 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer GL11.glPopMatrix(); GL11.glPopMatrix(); - ReagentContainerInfo[] info = tileAltar.getContainerInfo(EnumFacing.UP); + ReagentContainerInfo[] info = tileAltar.getContainerInfo(ForgeDirection.UNKNOWN); if (info.length >= 1 && info[0] != null) { ReagentStack reagentStack = info[0].reagent; @@ -55,20 +54,22 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer private void renderTankContents(double x, double y, double z, int colourRed, int colourGreen, int colourBlue, int colourIntensity) { GL11.glPushMatrix(); - Tessellator tessellator = Tessellator.getInstance(); + float f1 = 1.0f; + Tessellator tessellator = Tessellator.instance; this.bindTexture(resourceLocation); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_CULL_FACE); + float f2 = 0; + float f3 = -f2 * 0.2F - (float) MathHelper.floor_float(-f2 * 0.1F); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glDepthMask(false); - WorldRenderer wr = tessellator.getWorldRenderer(); - wr.startDrawingQuads(); - wr.func_178961_b(colourRed, colourGreen, colourBlue, colourIntensity); //setColourRGBA + tessellator.startDrawingQuads(); + tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity); GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5); - wr.func_178963_b(240); //setBrightness + tessellator.setBrightness(240); double x1 = -4d / 16d; double x2 = 4d / 16d; @@ -82,26 +83,26 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer double resy1 = 1.0d; double resy2 = 1.0d; - wr.addVertexWithUV(x1, y1, z1, resx1, resy1); - wr.addVertexWithUV(x2, y1, z1, resx2, resy1); - wr.addVertexWithUV(x2, y2, z1, resx2, resy2); - wr.addVertexWithUV(x1, y2, z1, resx1, resy2); - wr.addVertexWithUV(x1, y1, z1, resx1, resy1); - wr.addVertexWithUV(x1, y1, z2, resx2, resy1); - wr.addVertexWithUV(x1, y2, z2, resx2, resy2); - wr.addVertexWithUV(x1, y2, z1, resx1, resy2); - wr.addVertexWithUV(x1, y1, z2, resx1, resy1); - wr.addVertexWithUV(x2, y1, z2, resx2, resy1); - wr.addVertexWithUV(x2, y2, z2, resx2, resy2); - wr.addVertexWithUV(x1, y2, z2, resx1, resy2); - wr.addVertexWithUV(x2, y1, z1, resx1, resy1); - wr.addVertexWithUV(x2, y1, z2, resx2, resy1); - wr.addVertexWithUV(x2, y2, z2, resx2, resy2); - wr.addVertexWithUV(x2, y2, z1, resx1, resy2); - wr.addVertexWithUV(x1, y2, z1, resx1, resy1); - wr.addVertexWithUV(x2, y2, z1, resx2, resy1); - wr.addVertexWithUV(x2, y2, z2, resx2, resy2); - wr.addVertexWithUV(x1, y2, z2, resx1, resy2); + tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1); + tessellator.addVertexWithUV(x2, y1, z1, resx2, resy1); + tessellator.addVertexWithUV(x2, y2, z1, resx2, resy2); + tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2); + tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1); + tessellator.addVertexWithUV(x1, y1, z2, resx2, resy1); + tessellator.addVertexWithUV(x1, y2, z2, resx2, resy2); + tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2); + tessellator.addVertexWithUV(x1, y1, z2, resx1, resy1); + tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1); + tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2); + tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2); + tessellator.addVertexWithUV(x2, y1, z1, resx1, resy1); + tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1); + tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2); + tessellator.addVertexWithUV(x2, y2, z1, resx1, resy2); + tessellator.addVertexWithUV(x1, y2, z1, resx1, resy1); + tessellator.addVertexWithUV(x2, y2, z1, resx2, resy1); + tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2); + tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2); tessellator.draw(); GL11.glDepthMask(true); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderMasterStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderMasterStone.java index 8ef4f8ff..968ddf3e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderMasterStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderMasterStone.java @@ -1,15 +1,15 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; import WayofTime.alchemicalWizardry.api.renderer.MRSRenderer; import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; public class RenderMasterStone extends TileEntitySpecialRenderer { @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { if (tileEntity instanceof TEMasterStone) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java index 21e05777..b5319f98 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPedestal.java @@ -1,20 +1,19 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import net.minecraft.client.Minecraft; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelPedestal; +import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; +import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - +import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelPedestal; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; - public class RenderPedestal extends TileEntitySpecialRenderer { private ModelPedestal modelPedestal = new ModelPedestal(); @@ -22,11 +21,19 @@ public class RenderPedestal extends TileEntitySpecialRenderer public RenderPedestal() { - customRenderItem = Minecraft.getMinecraft().getRenderItem(); + customRenderItem = new RenderItem() + { + @Override + public boolean shouldBob() + { + return false; + } + }; + customRenderItem.setRenderManager(RenderManager.instance); } @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { if (tileEntity instanceof TEPedestal) { @@ -46,7 +53,7 @@ public class RenderPedestal extends TileEntitySpecialRenderer { float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0)); float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL); - EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld()); + EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj()); ghostEntityItem.hoverStart = 0.0F; ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0)); float displacement = 0.2F; @@ -60,7 +67,7 @@ public class RenderPedestal extends TileEntitySpecialRenderer } GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F); - customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel + customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0); } GL11.glPopMatrix(); @@ -85,13 +92,156 @@ public class RenderPedestal extends TileEntitySpecialRenderer { if (itemStack.getItem() instanceof ItemBlock) { - return 0.9f; + switch (customRenderItem.getMiniBlockCount(itemStack, (byte) 1)) + { + case 1: + return 0.90F; + + case 2: + return 0.90F; + + case 3: + return 0.90F; + + case 4: + return 0.90F; + + case 5: + return 0.80F; + + default: + return 0.90F; + } } else { - return 0.65f; + switch (customRenderItem.getMiniItemCount(itemStack, (byte) 1)) + { + case 1: + return 0.65F; + + case 2: + return 0.65F; + + case 3: + return 0.65F; + + case 4: + return 0.65F; + + default: + return 0.65F; + } } } return scaleFactor; } + + private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection) + { + if (ghostItemStack != null) + { + if (ghostItemStack.getItem() instanceof ItemBlock) + { + switch (forgeDirection) + { + case DOWN: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 2.7F, (float) z + 0.5F); + return; + } + + case UP: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.25F, (float) z + 0.5F); + return; + } + + case NORTH: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.7F); + return; + } + + case SOUTH: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.3F); + return; + } + + case EAST: + { + GL11.glTranslatef((float) x + 0.3F, (float) y + 0.5F, (float) z + 0.5F); + return; + } + + case WEST: + { + GL11.glTranslatef((float) x + 0.70F, (float) y + 0.5F, (float) z + 0.5F); + return; + } + + case UNKNOWN: + { + return; + } + + default: + { + + } + } + } else + { + switch (forgeDirection) + { + case DOWN: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.6F, (float) z + 0.5F); + return; + } + + case UP: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.20F, (float) z + 0.5F); + return; + } + + case NORTH: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.7F); + return; + } + + case SOUTH: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.3F); + return; + } + + case EAST: + { + GL11.glTranslatef((float) x + 0.3F, (float) y + 0.4F, (float) z + 0.5F); + return; + } + + case WEST: + { + GL11.glTranslatef((float) x + 0.70F, (float) y + 0.4F, (float) z + 0.5F); + return; + } + + case UNKNOWN: + { + return; + } + + default: + { + + } + } + } + } + } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java index 759c6e97..a8a867e4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderPlinth.java @@ -1,20 +1,19 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import net.minecraft.client.Minecraft; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelPlinth; +import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; +import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - +import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelPlinth; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; - public class RenderPlinth extends TileEntitySpecialRenderer { private ModelPlinth modelPlinth = new ModelPlinth(); @@ -22,11 +21,19 @@ public class RenderPlinth extends TileEntitySpecialRenderer public RenderPlinth() { - customRenderItem = Minecraft.getMinecraft().getRenderItem(); + customRenderItem = new RenderItem() + { + @Override + public boolean shouldBob() + { + return false; + } + }; + customRenderItem.setRenderManager(RenderManager.instance); } @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { if (tileEntity instanceof TEPlinth) { @@ -45,7 +52,7 @@ public class RenderPlinth extends TileEntitySpecialRenderer if (tileAltar.getStackInSlot(0) != null) { float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0)); - EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorld()); + EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj()); ghostEntityItem.hoverStart = 0.0F; ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0)); float displacement = 0.2F; @@ -64,7 +71,7 @@ public class RenderPlinth extends TileEntitySpecialRenderer GL11.glRotatef(90f, 1.0f, 0.0f, 0.0F); } - customRenderItem.func_175043_b(ghostEntityItem.getEntityItem()); //renderItemModel + customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0); } GL11.glPopMatrix(); @@ -79,13 +86,156 @@ public class RenderPlinth extends TileEntitySpecialRenderer { if (itemStack.getItem() instanceof ItemBlock) { - return 0.9f * scaleFactor; + switch (customRenderItem.getMiniBlockCount(itemStack, (byte) 1)) + { + case 1: + return 0.90F * scaleFactor / 2; + + case 2: + return 0.90F * scaleFactor / 2; + + case 3: + return 0.90F * scaleFactor / 2; + + case 4: + return 0.90F * scaleFactor / 2; + + case 5: + return 0.80F * scaleFactor / 2; + + default: + return 0.90F * scaleFactor / 2; + } } else { - return 0.65f * scaleFactor; + switch (customRenderItem.getMiniItemCount(itemStack, (byte) 1)) + { + case 1: + return 0.65F * scaleFactor; + + case 2: + return 0.65F * scaleFactor; + + case 3: + return 0.65F * scaleFactor; + + case 4: + return 0.65F * scaleFactor; + + default: + return 0.65F * scaleFactor; + } } } return scaleFactor; } + + private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection) + { + if (ghostItemStack != null) + { + if (ghostItemStack.getItem() instanceof ItemBlock) + { + switch (forgeDirection) + { + case DOWN: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 2.7F, (float) z + 0.5F); + return; + } + + case UP: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.25F, (float) z + 0.5F); + return; + } + + case NORTH: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.7F); + return; + } + + case SOUTH: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.3F); + return; + } + + case EAST: + { + GL11.glTranslatef((float) x + 0.3F, (float) y + 0.5F, (float) z + 0.5F); + return; + } + + case WEST: + { + GL11.glTranslatef((float) x + 0.70F, (float) y + 0.5F, (float) z + 0.5F); + return; + } + + case UNKNOWN: + { + return; + } + + default: + { + + } + } + } else + { + switch (forgeDirection) + { + case DOWN: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.6F, (float) z + 0.5F); + return; + } + + case UP: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.20F, (float) z + 0.5F); + return; + } + + case NORTH: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.7F); + return; + } + + case SOUTH: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.3F); + return; + } + + case EAST: + { + GL11.glTranslatef((float) x + 0.3F, (float) y + 0.4F, (float) z + 0.5F); + return; + } + + case WEST: + { + GL11.glTranslatef((float) x + 0.70F, (float) y + 0.4F, (float) z + 0.5F); + return; + } + + case UNKNOWN: + { + return; + } + + default: + { + + } + } + } + } + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderReagentConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderReagentConduit.java index 6fbd6266..3ab80b7e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderReagentConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderReagentConduit.java @@ -1,34 +1,29 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; + +import org.lwjgl.opengl.GL11; public class RenderReagentConduit extends TileEntitySpecialRenderer { private static final ResourceLocation field_110629_a = new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"); @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { if (tileEntity instanceof TEReagentConduit) { int renderCount = ((TEReagentConduit) tileEntity).renderCount; - BlockPos pos = tileEntity.getPos(); - float key1 = (pos.getX() * 54f - pos.getY() * 38.72f + pos.getZ() * 10.432f); - float key2 = (pos.getX() * 21.43f - pos.getY() * 9.96f + pos.getZ() * 12.8f); + float key1 = (tileEntity.xCoord * 54f - tileEntity.yCoord * 38.72f + tileEntity.zCoord * 10.432f); + float key2 = (tileEntity.xCoord * 21.43f - tileEntity.yCoord * 9.96f + tileEntity.zCoord * 12.8f); Int3 colourMap = ((TEReagentConduit) tileEntity).getColour(); GL11.glPushMatrix(); - Tessellator tessellator = Tessellator.getInstance(); - WorldRenderer wr = tessellator.getWorldRenderer(); + Tessellator tessellator = Tessellator.instance; this.bindTexture(field_110629_a); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); @@ -37,17 +32,17 @@ public class RenderReagentConduit extends TileEntitySpecialRenderer GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glDepthMask(false); - wr.startDrawingQuads(); - wr.func_178961_b(colourMap.xCoord, colourMap.yCoord, colourMap.zCoord, 200); + tessellator.startDrawingQuads(); + tessellator.setColorRGBA(colourMap.xCoord, colourMap.yCoord, colourMap.zCoord, 200); GL11.glTranslated(d0 + 0.5, d1 + 0.5, d2 + 0.5); - GL11.glRotatef(tileEntity.getWorld().getWorldTime() / 3.0f, 0F, 1F, 0F); //Rotate on planar axis + GL11.glRotatef(tileEntity.getWorldObj().getWorldTime() / 3.0f, 0F, 1F, 0F); //Rotate on planar axis GL11.glRotatef(renderCount + key1, 0F, 0F, 1F); //Rotate vertical axis GL11.glRotatef(renderCount * 2f + key2, 1F, 0F, 0F); //Rotate cylindrically - wr.func_178963_b(240); - wr.addVertexWithUV(-0.5d, 0, -0.5d, 0.0d, 0.0d); - wr.addVertexWithUV(0.5d, 0, -0.5d, 1.0d, 0.0d); - wr.addVertexWithUV(0.5d, 0, 0.5d, 1.0d, 1.0d); - wr.addVertexWithUV(-0.5d, 0, 0.5d, 0.0d, 1.0d); + tessellator.setBrightness(240); + tessellator.addVertexWithUV(-0.5d, 0, -0.5d, 0.0d, 0.0d); + tessellator.addVertexWithUV(0.5d, 0, -0.5d, 1.0d, 0.0d); + tessellator.addVertexWithUV(0.5d, 0, 0.5d, 1.0d, 1.0d); + tessellator.addVertexWithUV(-0.5d, 0, 0.5d, 0.0d, 1.0d); tessellator.draw(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEffectBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEffectBlock.java index e1209166..555fb5f7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEffectBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEffectBlock.java @@ -1,21 +1,19 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEffectBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock; +import cpw.mods.fml.client.FMLClientHandler; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; public class RenderSpellEffectBlock extends TileEntitySpecialRenderer { private ModelSpellEffectBlock modelSpellEffectBlock = new ModelSpellEffectBlock(); @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { if (tileEntity instanceof TESpellEffectBlock) { @@ -23,7 +21,7 @@ public class RenderSpellEffectBlock extends TileEntitySpecialRenderer GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); ResourceLocation test; - int meta = tileEntity.getBlockMetadata(); + int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); String resource = tileSpellBlock.getResourceLocationForMeta(meta); test = new ResourceLocation(resource); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEnhancementBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEnhancementBlock.java index d07bf185..2f2d0ff3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEnhancementBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEnhancementBlock.java @@ -1,21 +1,19 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEnhancementBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; +import cpw.mods.fml.client.FMLClientHandler; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; public class RenderSpellEnhancementBlock extends TileEntitySpecialRenderer { private ModelSpellEnhancementBlock modelSpellEnhancementBlock = new ModelSpellEnhancementBlock(); @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { if (tileEntity instanceof TESpellEnhancementBlock) { @@ -23,7 +21,7 @@ public class RenderSpellEnhancementBlock extends TileEntitySpecialRenderer GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); ResourceLocation test; - int meta = tileEntity.getBlockMetadata(); + int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); String resource = tileSpellBlock.getResourceLocationForMeta(meta); test = new ResourceLocation(resource); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellModifierBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellModifierBlock.java index 84264019..0a972266 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellModifierBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellModifierBlock.java @@ -1,21 +1,19 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellModifierBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; +import cpw.mods.fml.client.FMLClientHandler; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; public class RenderSpellModifierBlock extends TileEntitySpecialRenderer { private ModelSpellModifierBlock modelSpellModifierBlock = new ModelSpellModifierBlock(); @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { if (tileEntity instanceof TESpellModifierBlock) { @@ -23,7 +21,7 @@ public class RenderSpellModifierBlock extends TileEntitySpecialRenderer GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); ResourceLocation test; - int meta = tileEntity.getBlockMetadata(); + int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); String resource = tileSpellBlock.getResourceLocationForMeta(meta); test = new ResourceLocation(resource); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellParadigmBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellParadigmBlock.java index df39cd1e..ca0f9336 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellParadigmBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellParadigmBlock.java @@ -1,21 +1,19 @@ package WayofTime.alchemicalWizardry.common.renderer.block; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; - -import org.lwjgl.opengl.GL11; - import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellParadigmBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; +import cpw.mods.fml.client.FMLClientHandler; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; public class RenderSpellParadigmBlock extends TileEntitySpecialRenderer { private ModelSpellParadigmBlock modelSpellParadigmBlock = new ModelSpellParadigmBlock(); @Override - public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i) + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { if (tileEntity instanceof TESpellParadigmBlock) { @@ -23,7 +21,7 @@ public class RenderSpellParadigmBlock extends TileEntitySpecialRenderer GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); ResourceLocation test; - int meta = tileEntity.getBlockMetadata(); + int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); String resource = tileSpellBlock.getResourceLocationForMeta(meta); test = new ResourceLocation(resource); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java new file mode 100644 index 00000000..c9f36674 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/RenderWritingTable.java @@ -0,0 +1,318 @@ +package WayofTime.alchemicalWizardry.common.renderer.block; + +import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import cpw.mods.fml.client.FMLClientHandler; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.common.util.ForgeDirection; + +import org.lwjgl.opengl.GL11; + +public class RenderWritingTable extends TileEntitySpecialRenderer +{ + private ModelWritingTable modelWritingTable = new ModelWritingTable(); + private final RenderItem customRenderItem; + + public RenderWritingTable() + { + customRenderItem = new RenderItem() + { + @Override + public boolean shouldBob() + { + return false; + } + }; + customRenderItem.setRenderManager(RenderManager.instance); + } + + @Override + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) + { + if (tileEntity instanceof TEWritingTable) + { + TEWritingTable tileAltar = (TEWritingTable) tileEntity; + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glPushMatrix(); + GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); + ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/WritingTable.png"); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); + GL11.glPushMatrix(); + GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); + this.modelWritingTable.render(null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); + GL11.glPopMatrix(); + GL11.glPopMatrix(); + + for (int i = 1; i <= 6; i++) + { + GL11.glPushMatrix(); + GL11.glEnable(GL11.GL_LIGHTING); + if (tileAltar.getStackInSlot(i) != null) + { + float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(i)); + float rotationAngle = Minecraft.getMinecraft().gameSettings.fancyGraphics ? (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL) : 0; + EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj()); + ghostEntityItem.hoverStart = 0.0F; + ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(i)); + float displacementX = getXDisplacementForSlot(i); + float displacementY = getYDisplacementForSlot(i); + float displacementZ = getZDisplacementForSlot(i); + + if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) + { + GL11.glTranslatef((float) d0 + 0.5F + displacementX, (float) d1 + displacementY + 0.7F, (float) d2 + 0.5F + displacementZ); + } else + { + GL11.glTranslatef((float) d0 + 0.5F + displacementX, (float) d1 + displacementY + 0.6F, (float) d2 + 0.5F + displacementZ); + } + GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); + GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F); + customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0); + } + + GL11.glPopMatrix(); + } + } + } + + private float getGhostItemScaleFactor(ItemStack itemStack) + { + float scaleFactor = 0.8F; + + if (itemStack != null) + { + if (itemStack.getItem() instanceof ItemBlock) + { + switch (customRenderItem.getMiniBlockCount(itemStack, (byte) 1)) + { + case 1: + return 0.90F * scaleFactor; + + case 2: + return 0.90F * scaleFactor; + + case 3: + return 0.90F * scaleFactor; + + case 4: + return 0.90F * scaleFactor; + + case 5: + return 0.80F * scaleFactor; + + default: + return 0.90F * scaleFactor; + } + } else + { + switch (customRenderItem.getMiniItemCount(itemStack, (byte) 1)) + { + case 1: + return 0.65F * scaleFactor; + + case 2: + return 0.65F * scaleFactor; + + case 3: + return 0.65F * scaleFactor; + + case 4: + return 0.65F * scaleFactor; + + default: + return 0.65F * scaleFactor; + } + } + } + + return scaleFactor; + } + + private float getXDisplacementForSlot(int slot) + { + switch (slot) + { + case 0: + return 0.0f; + + case 1: + return -0.375f; + + case 2: + return -0.125f; + + case 3: + return 0.3125f; + + case 4: + return 0.3125f; + + case 5: + return -0.125f; + + default: + return 0.0f; + } + } + + private float getYDisplacementForSlot(int slot) + { + switch (slot) + { + case 0: + return 0.4f; + + case 1: + return -0.35f; + + case 6: + return 0.4f; + + default: + return -0.35f; + } + } + + private float getZDisplacementForSlot(int slot) + { + switch (slot) + { + case 0: + return 0.0f; + + case 1: + return 0.0f; + + case 2: + return 0.375f; + + case 3: + return 0.25f; + + case 4: + return -0.25f; + + case 5: + return -0.375f; + + default: + return 0.0f; + } + } + + private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection) + { + if (ghostItemStack != null) + { + if (ghostItemStack.getItem() instanceof ItemBlock) + { + switch (forgeDirection) + { + case DOWN: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 2.7F, (float) z + 0.5F); + return; + } + + case UP: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.25F, (float) z + 0.5F); + return; + } + + case NORTH: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.7F); + return; + } + + case SOUTH: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.3F); + return; + } + + case EAST: + { + GL11.glTranslatef((float) x + 0.3F, (float) y + 0.5F, (float) z + 0.5F); + return; + } + + case WEST: + { + GL11.glTranslatef((float) x + 0.70F, (float) y + 0.5F, (float) z + 0.5F); + return; + } + + case UNKNOWN: + { + return; + } + + default: + { + + } + } + } else + { + switch (forgeDirection) + { + case DOWN: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.6F, (float) z + 0.5F); + return; + } + + case UP: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.20F, (float) z + 0.5F); + return; + } + + case NORTH: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.7F); + return; + } + + case SOUTH: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.3F); + return; + } + + case EAST: + { + GL11.glTranslatef((float) x + 0.3F, (float) y + 0.4F, (float) z + 0.5F); + return; + } + + case WEST: + { + GL11.glTranslatef((float) x + 0.70F, (float) y + 0.4F, (float) z + 0.5F); + return; + } + + case UNKNOWN: + { + return; + } + + default: + { + + } + } + } + } + } +} \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java new file mode 100644 index 00000000..054e1201 --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/TEAltarRenderer.java @@ -0,0 +1,232 @@ +package WayofTime.alchemicalWizardry.common.renderer.block; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; + +import org.lwjgl.opengl.GL11; + +import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; + +public class TEAltarRenderer extends TileEntitySpecialRenderer +{ + private ModelBloodAltar modelBloodAltar = new ModelBloodAltar(); + private final RenderItem customRenderItem; + + public TEAltarRenderer() + { + customRenderItem = new RenderItem() + { + @Override + public boolean shouldBob() + { + return false; + } + }; + customRenderItem.setRenderManager(RenderManager.instance); + } + + @Override + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) + { + modelBloodAltar.renderBloodAltar((TEAltar) tileEntity, d0, d1, d2); + modelBloodAltar.renderBloodLevel((TEAltar) tileEntity, d0, d1, d2); + + if (tileEntity instanceof TEAltar) + { + TEAltar tileAltar = (TEAltar) tileEntity; + GL11.glPushMatrix(); + + if (tileAltar.getStackInSlot(0) != null) + { + float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0)); + float rotationAngle = Minecraft.getMinecraft().gameSettings.fancyGraphics ? (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL) : 0; + EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj()); + ghostEntityItem.hoverStart = 0.0F; + ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0)); + float displacement = 0.2F; + + if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) + { + GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.7F, (float) d2 + 0.5F); + } else + { + GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.6F, (float) d2 + 0.5F); + } + GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); + GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F); + customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0); + } + + GL11.glPopMatrix(); + } + } + + private float getGhostItemScaleFactor(ItemStack itemStack) + { + float scaleFactor = 1.0F; + + if (itemStack != null) + { + if (itemStack.getItem() instanceof ItemBlock) + { + switch (customRenderItem.getMiniBlockCount(itemStack, (byte) 1)) + { + case 1: + return 0.90F; + + case 2: + return 0.90F; + + case 3: + return 0.90F; + + case 4: + return 0.90F; + + case 5: + return 0.80F; + + default: + return 0.90F; + } + } else + { + switch (customRenderItem.getMiniItemCount(itemStack, (byte) 1)) + { + case 1: + return 0.65F; + + case 2: + return 0.65F; + + case 3: + return 0.65F; + + case 4: + return 0.65F; + + default: + return 0.65F; + } + } + } + + return scaleFactor; + } + + private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection) + { + if (ghostItemStack != null) + { + if (ghostItemStack.getItem() instanceof ItemBlock) + { + switch (forgeDirection) + { + case DOWN: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 2.7F, (float) z + 0.5F); + return; + } + + case UP: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.25F, (float) z + 0.5F); + return; + } + + case NORTH: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.7F); + return; + } + + case SOUTH: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.3F); + return; + } + + case EAST: + { + GL11.glTranslatef((float) x + 0.3F, (float) y + 0.5F, (float) z + 0.5F); + return; + } + + case WEST: + { + GL11.glTranslatef((float) x + 0.70F, (float) y + 0.5F, (float) z + 0.5F); + return; + } + + case UNKNOWN: + { + return; + } + + default: + { + return; + } + } + } else + { + switch (forgeDirection) + { + case DOWN: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.6F, (float) z + 0.5F); + return; + } + + case UP: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.20F, (float) z + 0.5F); + return; + } + + case NORTH: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.7F); + return; + } + + case SOUTH: + { + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.3F); + return; + } + + case EAST: + { + GL11.glTranslatef((float) x + 0.3F, (float) y + 0.4F, (float) z + 0.5F); + return; + } + + case WEST: + { + GL11.glTranslatef((float) x + 0.70F, (float) y + 0.4F, (float) z + 0.5F); + return; + } + + case UNKNOWN: + { + return; + } + + default: + { + return; + } + } + } + } + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAlchemicalCalcinatorItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAlchemicalCalcinatorItemRenderer.java index 48ec3a48..22c6c645 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAlchemicalCalcinatorItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAlchemicalCalcinatorItemRenderer.java @@ -1,19 +1,21 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.fml.client.FMLClientHandler; import org.lwjgl.opengl.GL11; import WayofTime.alchemicalWizardry.common.renderer.model.ModelAlchemicalCalcinator; +import cpw.mods.fml.client.FMLClientHandler; public class TEAlchemicalCalcinatorItemRenderer implements IItemRenderer { private ModelAlchemicalCalcinator modelConduit = new ModelAlchemicalCalcinator(); - private void renderConduitItem(ItemStack item, float translateX, float translateY, float translateZ) + private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef(translateX + 0.5F, translateY + 1.5F, translateZ + 0.5F); @@ -26,6 +28,7 @@ public class TEAlchemicalCalcinatorItemRenderer implements IItemRenderer GL11.glPopMatrix(); } + /** * IItemRenderer implementation * */ @@ -61,16 +64,16 @@ public class TEAlchemicalCalcinatorItemRenderer implements IItemRenderer switch (type) { case ENTITY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); + renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); break; case EQUIPPED: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); + renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); break; case EQUIPPED_FIRST_PERSON: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); + renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); break; case INVENTORY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); + renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); break; default: } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAltarItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAltarItemRenderer.java index dd3385fe..df81d2d7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAltarItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEAltarItemRenderer.java @@ -1,14 +1,13 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar; +import cpw.mods.fml.client.FMLClientHandler; +import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.fml.client.FMLClientHandler; - import org.lwjgl.opengl.GL11; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar; - public class TEAltarItemRenderer implements IItemRenderer { private ModelBloodAltar modelBloodAltar; @@ -37,16 +36,16 @@ public class TEAltarItemRenderer implements IItemRenderer switch (type) { case ENTITY: - renderBloodAltar(item, 0, 0, 0, scale); + renderBloodAltar((RenderBlocks) data[0], item, 0, 0, 0, scale); break; case EQUIPPED: - renderBloodAltar(item, 0, 0, 0.5f, scale); + renderBloodAltar((RenderBlocks) data[0], item, 0, 0, 0.5f, scale); break; case EQUIPPED_FIRST_PERSON: - renderBloodAltar(item, +0.5f, 0.5f, +0.5f, scale); + renderBloodAltar((RenderBlocks) data[0], item, +0.5f, 0.5f, +0.5f, scale); break; case INVENTORY: - renderBloodAltar(item, -0.5f, -0.75f, -0.5f, scale); + renderBloodAltar((RenderBlocks) data[0], item, -0.5f, -0.75f, -0.5f, scale); break; default: @@ -54,7 +53,7 @@ public class TEAltarItemRenderer implements IItemRenderer } } - private void renderBloodAltar(ItemStack item, float x, float y, float z, float scale) + private void renderBloodAltar(RenderBlocks render, ItemStack item, float x, float y, float z, float scale) { GL11.glPushMatrix(); GL11.glTranslatef(x, y, z); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java index 4c35bb2c..b9826145 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEBellJarItemRenderer.java @@ -1,12 +1,12 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; +import net.minecraft.client.renderer.ItemRenderer; +import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.fml.client.FMLClientHandler; import org.lwjgl.opengl.GL11; @@ -14,15 +14,17 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import WayofTime.alchemicalWizardry.common.renderer.model.ModelCrystalBelljar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; +import cpw.mods.fml.client.FMLClientHandler; public class TEBellJarItemRenderer implements IItemRenderer { + ItemRenderer d; private ModelCrystalBelljar modelConduit = new ModelCrystalBelljar(); private ResourceLocation mainResource = new ResourceLocation("alchemicalwizardry:textures/models/CrystalBelljar.png"); private ResourceLocation resourceLocation = new ResourceLocation("alchemicalwizardry:textures/models/Reagent.png"); - private void renderConduitItem(ItemStack item, float translateX, float translateY, float translateZ) + private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F); @@ -33,7 +35,7 @@ public class TEBellJarItemRenderer implements IItemRenderer GL11.glPopMatrix(); GL11.glPopMatrix(); - ReagentContainerInfo[] info = TEBelljar.getContainerInfoFromItem(item); + ReagentContainerInfo[] info = TEBellJar.getContainerInfoFromItem(item); if (info.length >= 1 && info[0] != null) { ReagentStack reagentStack = info[0].reagent; @@ -65,7 +67,7 @@ public class TEBellJarItemRenderer implements IItemRenderer private void renderTankContents(double x, double y, double z, int colourRed, int colourGreen, int colourBlue, int colourIntensity) { GL11.glPushMatrix(); - Tessellator tessellator = Tessellator.getInstance(); + Tessellator tessellator = Tessellator.instance; FMLClientHandler.instance().getClient().renderEngine.bindTexture(resourceLocation); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); @@ -77,13 +79,12 @@ public class TEBellJarItemRenderer implements IItemRenderer GL11.glDepthMask(false); - WorldRenderer wr = tessellator.getWorldRenderer(); - wr.startDrawingQuads(); - wr.func_178961_b(colourRed, colourGreen, colourBlue, colourIntensity); + tessellator.startDrawingQuads(); + tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity); GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5); - wr.func_178963_b(240); + tessellator.setBrightness(240); double x1 = -4d / 16d; double x2 = 4d / 16d; @@ -97,26 +98,26 @@ public class TEBellJarItemRenderer implements IItemRenderer double resy1 = 1.0d; double resy2 = 1.0d; - wr.addVertexWithUV(x1, y1, z1, resx1, resy1); - wr.addVertexWithUV(x2, y1, z1, resx2, resy1); - wr.addVertexWithUV(x2, y2, z1, resx2, resy2); - wr.addVertexWithUV(x1, y2, z1, resx1, resy2); - wr.addVertexWithUV(x1, y1, z1, resx1, resy1); - wr.addVertexWithUV(x1, y1, z2, resx2, resy1); - wr.addVertexWithUV(x1, y2, z2, resx2, resy2); - wr.addVertexWithUV(x1, y2, z1, resx1, resy2); - wr.addVertexWithUV(x1, y1, z2, resx1, resy1); - wr.addVertexWithUV(x2, y1, z2, resx2, resy1); - wr.addVertexWithUV(x2, y2, z2, resx2, resy2); - wr.addVertexWithUV(x1, y2, z2, resx1, resy2); - wr.addVertexWithUV(x2, y1, z1, resx1, resy1); - wr.addVertexWithUV(x2, y1, z2, resx2, resy1); - wr.addVertexWithUV(x2, y2, z2, resx2, resy2); - wr.addVertexWithUV(x2, y2, z1, resx1, resy2); - wr.addVertexWithUV(x1, y2, z1, resx1, resy1); - wr.addVertexWithUV(x2, y2, z1, resx2, resy1); - wr.addVertexWithUV(x2, y2, z2, resx2, resy2); - wr.addVertexWithUV(x1, y2, z2, resx1, resy2); + tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1); + tessellator.addVertexWithUV(x2, y1, z1, resx2, resy1); + tessellator.addVertexWithUV(x2, y2, z1, resx2, resy2); + tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2); + tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1); + tessellator.addVertexWithUV(x1, y1, z2, resx2, resy1); + tessellator.addVertexWithUV(x1, y2, z2, resx2, resy2); + tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2); + tessellator.addVertexWithUV(x1, y1, z2, resx1, resy1); + tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1); + tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2); + tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2); + tessellator.addVertexWithUV(x2, y1, z1, resx1, resy1); + tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1); + tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2); + tessellator.addVertexWithUV(x2, y2, z1, resx1, resy2); + tessellator.addVertexWithUV(x1, y2, z1, resx1, resy1); + tessellator.addVertexWithUV(x2, y2, z1, resx2, resy1); + tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2); + tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2); tessellator.draw(); GL11.glDepthMask(true); @@ -163,16 +164,16 @@ public class TEBellJarItemRenderer implements IItemRenderer switch (type) { case ENTITY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); + renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); break; case EQUIPPED: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); + renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); break; case EQUIPPED_FIRST_PERSON: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); + renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); break; case INVENTORY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); + renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); break; default: } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEConduitItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEConduitItemRenderer.java index 6044f3dd..e0e4a79d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEConduitItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEConduitItemRenderer.java @@ -1,22 +1,22 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; +import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.fml.client.FMLClientHandler; +import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; import WayofTime.alchemicalWizardry.common.renderer.model.ModelConduit; +import cpw.mods.fml.client.FMLClientHandler; -@SuppressWarnings("deprecation") public class TEConduitItemRenderer implements IItemRenderer { private ModelConduit modelConduit = new ModelConduit(); - private void renderConduitItem(ItemStack item, float translateX, float translateY, float translateZ) + private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F); @@ -24,7 +24,7 @@ public class TEConduitItemRenderer implements IItemRenderer FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelConduit.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, EnumFacing.DOWN, EnumFacing.UP); + this.modelConduit.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP); GL11.glPopMatrix(); GL11.glPopMatrix(); } @@ -65,16 +65,16 @@ public class TEConduitItemRenderer implements IItemRenderer switch (type) { case ENTITY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); + renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); break; case EQUIPPED: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); + renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); break; case EQUIPPED_FIRST_PERSON: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); + renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); break; case INVENTORY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); + renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); break; default: } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEffectBlockItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEffectBlockItemRenderer.java index a6d25c4a..9f481de1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEffectBlockItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEffectBlockItemRenderer.java @@ -1,21 +1,22 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; +import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.fml.client.FMLClientHandler; +import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEffectBlock; +import cpw.mods.fml.client.FMLClientHandler; public class TESpellEffectBlockItemRenderer implements IItemRenderer { private ModelSpellEffectBlock modelSpellBlock = new ModelSpellEffectBlock(); - private void renderConduitItem(ItemStack item, float translateX, float translateY, float translateZ) + private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F); @@ -24,7 +25,7 @@ public class TESpellEffectBlockItemRenderer implements IItemRenderer FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, EnumFacing.DOWN, EnumFacing.UP); + this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP); GL11.glPopMatrix(); GL11.glPopMatrix(); } @@ -65,16 +66,16 @@ public class TESpellEffectBlockItemRenderer implements IItemRenderer switch (type) { case ENTITY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); + renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); break; case EQUIPPED: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); + renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); break; case EQUIPPED_FIRST_PERSON: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); + renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); break; case INVENTORY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); + renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); break; default: } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEnhancementBlockItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEnhancementBlockItemRenderer.java index c0c48ed0..0fbd6e01 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEnhancementBlockItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEnhancementBlockItemRenderer.java @@ -1,21 +1,22 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; +import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.fml.client.FMLClientHandler; +import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEnhancementBlock; +import cpw.mods.fml.client.FMLClientHandler; public class TESpellEnhancementBlockItemRenderer implements IItemRenderer { private ModelSpellEnhancementBlock modelSpellBlock = new ModelSpellEnhancementBlock(); - private void renderConduitItem(ItemStack item, float translateX, float translateY, float translateZ) + private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F); @@ -24,7 +25,7 @@ public class TESpellEnhancementBlockItemRenderer implements IItemRenderer FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, EnumFacing.DOWN, EnumFacing.UP); + this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP); GL11.glPopMatrix(); GL11.glPopMatrix(); } @@ -65,16 +66,16 @@ public class TESpellEnhancementBlockItemRenderer implements IItemRenderer switch (type) { case ENTITY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); + renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); break; case EQUIPPED: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); + renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); break; case EQUIPPED_FIRST_PERSON: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); + renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); break; case INVENTORY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); + renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); break; default: } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellModifierBlockItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellModifierBlockItemRenderer.java index 3ea9c791..7fc7dc63 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellModifierBlockItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellModifierBlockItemRenderer.java @@ -1,21 +1,22 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; +import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.fml.client.FMLClientHandler; +import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellModifierBlock; +import cpw.mods.fml.client.FMLClientHandler; public class TESpellModifierBlockItemRenderer implements IItemRenderer { private ModelSpellModifierBlock modelSpellBlock = new ModelSpellModifierBlock(); - private void renderConduitItem(ItemStack item, float translateX, float translateY, float translateZ) + private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F); @@ -24,7 +25,7 @@ public class TESpellModifierBlockItemRenderer implements IItemRenderer FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, EnumFacing.DOWN, EnumFacing.UP); + this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP); GL11.glPopMatrix(); GL11.glPopMatrix(); } @@ -65,16 +66,16 @@ public class TESpellModifierBlockItemRenderer implements IItemRenderer switch (type) { case ENTITY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); + renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); break; case EQUIPPED: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); + renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); break; case EQUIPPED_FIRST_PERSON: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); + renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); break; case INVENTORY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); + renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); break; default: } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellParadigmBlockItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellParadigmBlockItemRenderer.java index 2dc201ba..8bf4da84 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellParadigmBlockItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellParadigmBlockItemRenderer.java @@ -1,21 +1,22 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; +import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.fml.client.FMLClientHandler; +import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellParadigmBlock; +import cpw.mods.fml.client.FMLClientHandler; public class TESpellParadigmBlockItemRenderer implements IItemRenderer { private ModelSpellParadigmBlock modelSpellBlock = new ModelSpellParadigmBlock(); - private void renderConduitItem(ItemStack item, float translateX, float translateY, float translateZ) + private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) { GL11.glPushMatrix(); GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F); @@ -23,7 +24,7 @@ public class TESpellParadigmBlockItemRenderer implements IItemRenderer FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, EnumFacing.DOWN, EnumFacing.UP); + this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP); GL11.glPopMatrix(); GL11.glPopMatrix(); } @@ -64,16 +65,16 @@ public class TESpellParadigmBlockItemRenderer implements IItemRenderer switch (type) { case ENTITY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); + renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); break; case EQUIPPED: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); + renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); break; case EQUIPPED_FIRST_PERSON: - renderConduitItem(item, -0.4f, 0.50f, 0.35f); + renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f); break; case INVENTORY: - renderConduitItem(item, -0.5f, -0.5f, -0.5f); + renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f); break; default: } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEChemistrySetItemRenderer.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEWritingTableItemRenderer.java similarity index 85% rename from src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEChemistrySetItemRenderer.java rename to src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEWritingTableItemRenderer.java index 2292f83b..b618b248 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEChemistrySetItemRenderer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TEWritingTableItemRenderer.java @@ -1,22 +1,20 @@ package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable; +import cpw.mods.fml.client.FMLClientHandler; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.fml.client.FMLClientHandler; - import org.lwjgl.opengl.GL11; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelChemistrySet; - -public class TEChemistrySetItemRenderer implements IItemRenderer +public class TEWritingTableItemRenderer implements IItemRenderer { - private ModelChemistrySet model; + private ModelWritingTable model; - public TEChemistrySetItemRenderer() + public TEWritingTableItemRenderer() { - model = new ModelChemistrySet(); + model = new ModelWritingTable(); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBileDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBileDemon.java index a44fb4c3..6e7674a3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBileDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBileDemon.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; import WayofTime.alchemicalWizardry.common.entity.mob.EntityBileDemon; -import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; @@ -13,7 +12,7 @@ public class RenderBileDemon extends RenderLiving public RenderBileDemon(ModelBase par1ModelBase, float par2) { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); + super(par1ModelBase, par2); } public ResourceLocation func_110832_a(EntityBileDemon par1EntityBileDemon) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBoulderFist.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBoulderFist.java index 4b3f1691..8ff9516f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBoulderFist.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderBoulderFist.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; import WayofTime.alchemicalWizardry.common.entity.mob.EntityBoulderFist; -import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; @@ -13,7 +12,7 @@ public class RenderBoulderFist extends RenderLiving public RenderBoulderFist(ModelBase par1ModelBase, float par2) { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); + super(par1ModelBase, par2); } public ResourceLocation func_110832_a(EntityBoulderFist par1EntityBoulderFist) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderElemental.java index 82ae9f1a..91d92f8d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderElemental.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; import WayofTime.alchemicalWizardry.common.entity.mob.*; -import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; @@ -18,7 +17,7 @@ public class RenderElemental extends RenderLiving public RenderElemental(ModelBase par1ModelBase, float par2) { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); + super(par1ModelBase, par2); } public ResourceLocation func_110832_a(EntityElemental par1EntityElemental) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java index adc58c3d..24c69cf9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java @@ -1,13 +1,12 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; -import net.minecraft.client.Minecraft; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityFallenAngel; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFallenAngel; @SideOnly(Side.CLIENT) public class RenderFallenAngel extends RenderLiving @@ -16,7 +15,7 @@ public class RenderFallenAngel extends RenderLiving public RenderFallenAngel(ModelBase par1ModelBase, float par2) { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); + super(par1ModelBase, par2); } public ResourceLocation func_110832_a(EntityFallenAngel par1EntityFallenAngel) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderIceDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderIceDemon.java index 92ea947a..4b36e492 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderIceDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderIceDemon.java @@ -1,11 +1,10 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; -import net.minecraft.client.Minecraft; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon; public class RenderIceDemon extends RenderLiving { @@ -13,7 +12,7 @@ public class RenderIceDemon extends RenderLiving public RenderIceDemon(ModelBase par1ModelBase, float par2) { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); + super(par1ModelBase, par2); } public ResourceLocation func_110832_a(EntityIceDemon par1EntityIceDemon) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderLowerGuardian.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderLowerGuardian.java index 7407e47f..a1c39675 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderLowerGuardian.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderLowerGuardian.java @@ -1,11 +1,10 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; -import net.minecraft.client.Minecraft; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; public class RenderLowerGuardian extends RenderLiving { @@ -13,7 +12,7 @@ public class RenderLowerGuardian extends RenderLiving public RenderLowerGuardian(ModelBase par1ModelBase, float par2) { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); + super(par1ModelBase, par2); } public ResourceLocation func_110832_a(EntityLowerGuardian par1EntityLowerGuardian) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGrunt.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGrunt.java index e975edee..284f6f4d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGrunt.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGrunt.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; -import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; @@ -21,7 +20,7 @@ public class RenderMinorDemonGrunt extends RenderLiving public RenderMinorDemonGrunt(ModelBase par1ModelBase, float par2) { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); + super(par1ModelBase, par2); } public ResourceLocation func_110832_a(EntityMinorDemonGrunt entity) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGruntGuardian.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGruntGuardian.java index ba52f114..a2a70bb3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGruntGuardian.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderMinorDemonGruntGuardian.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; -import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; @@ -21,7 +20,7 @@ public class RenderMinorDemonGruntGuardian extends RenderLiving public RenderMinorDemonGruntGuardian(ModelBase par1ModelBase, float par2) { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); + super(par1ModelBase, par2); } public ResourceLocation func_110832_a(EntityMinorDemonGruntGuardian entity) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderShade.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderShade.java index b3d4a844..afd4f230 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderShade.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderShade.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; import WayofTime.alchemicalWizardry.common.entity.mob.EntityShade; -import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; @@ -13,7 +12,7 @@ public class RenderShade extends RenderLiving public RenderShade(ModelBase par1ModelBase, float par2) { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); + super(par1ModelBase, par2); } public ResourceLocation func_110832_a(EntityShade par1EntityShade) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderSmallEarthGolem.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderSmallEarthGolem.java index 42b70f01..3e87ac76 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderSmallEarthGolem.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderSmallEarthGolem.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem; -import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; @@ -13,7 +12,7 @@ public class RenderSmallEarthGolem extends RenderLiving public RenderSmallEarthGolem(ModelBase par1ModelBase, float par2) { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); + super(par1ModelBase, par2); } public ResourceLocation func_110832_a(EntitySmallEarthGolem par1EntitySmallEarthGolem) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderWingedFireDemon.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderWingedFireDemon.java index af809551..8a385f76 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderWingedFireDemon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/mob/RenderWingedFireDemon.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.common.renderer.mob; import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon; -import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; @@ -13,7 +12,7 @@ public class RenderWingedFireDemon extends RenderLiving public RenderWingedFireDemon(ModelBase par1ModelBase, float par2) { - super(Minecraft.getMinecraft().getRenderManager(), par1ModelBase, par2); + super(par1ModelBase, par2); } public ResourceLocation func_110832_a(EntityWingedFireDemon par1EntityWingedFireDemon) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java index 82a9d3b7..b8a1679f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelBloodAltar.java @@ -2,31 +2,32 @@ package WayofTime.alchemicalWizardry.common.renderer.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.client.FMLClientHandler; +import net.minecraftforge.client.model.AdvancedModelLoader; +import net.minecraftforge.client.model.IModelCustom; import org.lwjgl.opengl.GL11; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; +import cpw.mods.fml.client.FMLClientHandler; public class ModelBloodAltar extends ModelBase { private static final ResourceLocation altar_texture = new ResourceLocation("alchemicalwizardry:textures/models/altar.png"); -// private IModelCustom modelBloodAltar; + private IModelCustom modelBloodAltar; public ModelBloodAltar() { -// modelBloodAltar = AdvancedModelLoader.loadModel(new ResourceLocation("alchemicalwizardry:models/bloodaltar-fixeUV.obj")); + modelBloodAltar = AdvancedModelLoader.loadModel(new ResourceLocation("alchemicalwizardry:models/bloodaltar-fixeUV.obj")); } public void renderBloodAltar() { -// modelBloodAltar.renderAll(); + modelBloodAltar.renderAll(); } public void renderBloodAltar(TEAltar altar, double x, double y, double z) @@ -56,22 +57,21 @@ public class ModelBloodAltar extends ModelBase GL11.glPopMatrix(); } - public void renderBloodLevel(TextureAtlasSprite icon) + public void renderBloodLevel(IIcon icon) { - Tessellator tessellator = Tessellator.getInstance(); - WorldRenderer wr = tessellator.getWorldRenderer(); + Tessellator tessellator = Tessellator.instance; double minU = (double) icon.getInterpolatedU(0); double maxU = (double) icon.getInterpolatedU(16); double minV = (double) icon.getInterpolatedV(0); double maxV = (double) icon.getInterpolatedV(16); - wr.startDrawingQuads(); - wr.func_178980_d(0, 1, 0); //setNormal - wr.addVertexWithUV(1, 0, 1, maxU, maxV); - wr.addVertexWithUV(1, 0, 0, maxU, minV); - wr.addVertexWithUV(0, 0, 0, minU, minV); - wr.addVertexWithUV(0, 0, 1, minU, maxV); + tessellator.startDrawingQuads(); + tessellator.setNormal(0, 1, 0); + tessellator.addVertexWithUV(1, 0, 1, maxU, maxV); + tessellator.addVertexWithUV(1, 0, 0, maxU, minV); + tessellator.addVertexWithUV(0, 0, 0, minU, minV); + tessellator.addVertexWithUV(0, 0, 1, minU, maxV); tessellator.draw(); } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelConduit.java index 83f3ddc8..a6a510c4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelConduit.java @@ -9,7 +9,7 @@ package WayofTime.alchemicalWizardry.common.renderer.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -import net.minecraft.util.EnumFacing; +import net.minecraftforge.common.util.ForgeDirection; public class ModelConduit extends ModelBase { @@ -147,7 +147,7 @@ public class ModelConduit extends ModelBase setRotation(spacer8, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, EnumFacing input, EnumFacing output) + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelElemental.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelElemental.java index 25cb2814..10ce54be 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelElemental.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelElemental.java @@ -3,7 +3,6 @@ package WayofTime.alchemicalWizardry.common.renderer.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -import net.minecraft.entity.monster.EntityBlaze; import net.minecraft.world.World; public class ModelElemental extends ModelBase @@ -71,11 +70,10 @@ public class ModelElemental extends ModelBase return; } - int ratio = 20; - float rot = (entity.worldObj.getWorldTime() % ratio) / ratio; - Shape1.rotateAngleX = f / 5; - Shape2.rotateAngleZ = f / 5; - Shape3.rotateAngleY = f / 5; - EntityBlaze d; + float ratio = 0.1f; + float rot = (entity.worldObj.getWorldTime() + f) * ratio; + Shape1.rotateAngleX = rot; + Shape2.rotateAngleZ = rot; + Shape3.rotateAngleY = rot; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEffectBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEffectBlock.java index fcf03321..d816ae3d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEffectBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEffectBlock.java @@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.common.renderer.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -import net.minecraft.util.EnumFacing; +import net.minecraftforge.common.util.ForgeDirection; public class ModelSpellEffectBlock extends ModelBase { @@ -184,7 +184,7 @@ public class ModelSpellEffectBlock extends ModelBase setRotation(outputSpacer4, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, EnumFacing input, EnumFacing output) + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEnhancementBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEnhancementBlock.java index 19e20c45..e83b4084 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEnhancementBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellEnhancementBlock.java @@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.common.renderer.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -import net.minecraft.util.EnumFacing; +import net.minecraftforge.common.util.ForgeDirection; public class ModelSpellEnhancementBlock extends ModelBase @@ -185,7 +185,7 @@ public class ModelSpellEnhancementBlock extends ModelBase setRotation(outputSecond, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, EnumFacing input, EnumFacing output) + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellModifierBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellModifierBlock.java index 28faaf7e..a879889b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellModifierBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellModifierBlock.java @@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.common.renderer.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -import net.minecraft.util.EnumFacing; +import net.minecraftforge.common.util.ForgeDirection; public class ModelSpellModifierBlock extends ModelBase { @@ -149,7 +149,7 @@ public class ModelSpellModifierBlock extends ModelBase setRotation(output4, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, EnumFacing input, EnumFacing output) + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellParadigmBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellParadigmBlock.java index 4053b60b..9fd4d551 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellParadigmBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelSpellParadigmBlock.java @@ -10,7 +10,7 @@ package WayofTime.alchemicalWizardry.common.renderer.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -import net.minecraft.util.EnumFacing; +import net.minecraftforge.common.util.ForgeDirection; public class ModelSpellParadigmBlock extends ModelBase { @@ -100,7 +100,7 @@ public class ModelSpellParadigmBlock extends ModelBase setRotation(Shape5, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, EnumFacing input, EnumFacing output) + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelChemistrySet.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelWritingTable.java similarity index 98% rename from src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelChemistrySet.java rename to src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelWritingTable.java index 2dfc6c8f..15dede34 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelChemistrySet.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/model/ModelWritingTable.java @@ -4,7 +4,7 @@ import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -public class ModelChemistrySet extends ModelBase +public class ModelWritingTable extends ModelBase { //fields ModelRenderer base; @@ -21,7 +21,7 @@ public class ModelChemistrySet extends ModelBase ModelRenderer input3; ModelRenderer Shape1; - public ModelChemistrySet() + public ModelWritingTable() { textureWidth = 64; textureHeight = 64; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java index 826cec70..fce17323 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBazookaMainProjectile.java @@ -1,30 +1,22 @@ package WayofTime.alchemicalWizardry.common.renderer.projectile; -import net.minecraft.client.Minecraft; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelEnergyBazookaMainProjectile; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; - import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelEnergyBazookaMainProjectile; - public class RenderEnergyBazookaMainProjectile extends Render { - public RenderEnergyBazookaMainProjectile() - { - super(Minecraft.getMinecraft().getRenderManager()); - } - - public ModelBase model = new ModelEnergyBazookaMainProjectile(); + public ModelBase model = new ModelEnergyBazookaMainProjectile(); private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/EnergyBazookaMainProjectile.png"); + private float scale = 1.0f; @Override public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1) { - float scale = 1.0f; GL11.glPushMatrix(); GL11.glTranslatef((float) d0, (float) d1, (float) d2); GL11.glEnable(GL12.GL_RESCALE_NORMAL); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBlastProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBlastProjectile.java index 53228e59..d0e067e1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBlastProjectile.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderEnergyBlastProjectile.java @@ -1,52 +1,35 @@ package WayofTime.alchemicalWizardry.common.renderer.projectile; -import net.minecraft.client.Minecraft; +import WayofTime.alchemicalWizardry.common.entity.projectile.*; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.entity.IProjectile; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.LightningBoltProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile; -import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile; - @SideOnly(Side.CLIENT) public class RenderEnergyBlastProjectile extends Render { - public RenderEnergyBlastProjectile() - { - super(Minecraft.getMinecraft().getRenderManager()); - } - - public void doRenderEnergyBlastProjectile(Entity entityShot, double par2, double par4, double par6, float par8, float par9) + public void doRenderEnergyBlastProjectile(Entity entityShot, double par2, double par4, double par6, float par8, float par9) { GL11.glPushMatrix(); GL11.glTranslatef((float) par2, (float) par4, (float) par6); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glScalef(0.1F, 0.1F, 0.1F); this.bindTexture(this.getEntityTexture(entityShot)); - Tessellator var12 = Tessellator.getInstance(); + Tessellator var12 = Tessellator.instance; GL11.glRotatef(180.0F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F); GL11.glRotatef(-renderManager.playerViewX, 1.0F, 0.0F, 0.0F); - WorldRenderer wr = var12.getWorldRenderer(); - wr.startDrawingQuads(); - wr.func_178980_d(0.0F, 1.0F, 0.0F); //SetNormal - wr.addVertexWithUV(-0.5F, -0.25F, 0.0D, 0, 1); - wr.addVertexWithUV(0.5F, -0.25F, 0.0D, 1, 1); - wr.addVertexWithUV(0.5F, 0.75F, 0.0D, 1, 0); - wr.addVertexWithUV(-0.5F, 0.75F, 0.0D, 0, 0); + var12.startDrawingQuads(); + var12.setNormal(0.0F, 1.0F, 0.0F); + var12.addVertexWithUV(-0.5F, -0.25F, 0.0D, 0, 1); + var12.addVertexWithUV(0.5F, -0.25F, 0.0D, 1, 1); + var12.addVertexWithUV(0.5F, 0.75F, 0.0D, 1, 0); + var12.addVertexWithUV(-0.5F, 0.75F, 0.0D, 0, 0); var12.draw(); GL11.glDisable(GL12.GL_RESCALE_NORMAL); GL11.glPopMatrix(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderFireProjectile.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderFireProjectile.java new file mode 100644 index 00000000..cda739fe --- /dev/null +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderFireProjectile.java @@ -0,0 +1,41 @@ +package WayofTime.alchemicalWizardry.common.renderer.projectile; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +@SideOnly(Side.CLIENT) +public class RenderFireProjectile +{ +// public void doRenderProjectile(FireProjectile entityShot, double par2, double par4, double par6, float par8, float par9) +// { +// GL11.glPushMatrix(); +// GL11.glTranslatef((float)par2, (float)par4, (float)par6); +// GL11.glEnable(GL12.GL_RESCALE_NORMAL); +// GL11.glScalef(0.1F, 0.1F, 0.1F); +// this.func_110776_a(this.func_110775_a(entityShot)); +// Tessellator var12 = Tessellator.instance; +// GL11.glRotatef(180.0F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F); +// GL11.glRotatef(-renderManager.playerViewX, 1.0F, 0.0F, 0.0F); +// var12.startDrawingQuads(); +// var12.setNormal(0.0F, 1.0F, 0.0F); +// var12.addVertexWithUV(-0.5F, -0.25F, 0.0D, 0, 1); +// var12.addVertexWithUV(0.5F, -0.25F, 0.0D, 1, 1); +// var12.addVertexWithUV(0.5F, 0.75F, 0.0D, 1, 0); +// var12.addVertexWithUV(-0.5F, 0.75F, 0.0D, 0, 0); +// var12.draw(); +// GL11.glDisable(GL12.GL_RESCALE_NORMAL); +// GL11.glPopMatrix(); +// } +// +// @Override +// public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) +// { +// this.doRenderProjectile((FireProjectile)par1Entity, par2, par4, par6, par8, par9); +// } +// +// @Override +// protected ResourceLocation func_110775_a(Entity entity) +// { +// return new ResourceLocation("alchemicalwizardry:/textures/entities/fireProjectile.png"); +// } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java index f33d1178..95c6bd49 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/renderer/projectile/RenderMeteor.java @@ -1,31 +1,22 @@ package WayofTime.alchemicalWizardry.common.renderer.projectile; -import net.minecraft.client.Minecraft; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelMeteor; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; - import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelMeteor; - public class RenderMeteor extends Render { - public RenderMeteor() - { - super(Minecraft.getMinecraft().getRenderManager()); - // TODO Auto-generated constructor stub - } - - public ModelBase model = new ModelMeteor(); + public ModelBase model = new ModelMeteor(); private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/Meteor.png"); + private float scale = 1.0f; @Override public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1) { - float scale = 1.0f; GL11.glPushMatrix(); GL11.glTranslatef((float) d0, (float) d1, (float) d2); GL11.glEnable(GL12.GL_RESCALE_NORMAL); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/LocalStorageAlphaPact.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/LocalStorageAlphaPact.java index a63baace..2c762aa9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/LocalStorageAlphaPact.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/LocalStorageAlphaPact.java @@ -1,25 +1,25 @@ -//package WayofTime.alchemicalWizardry.common.rituals; -// -//import java.util.HashSet; -//import java.util.Set; -// -//import WayofTime.alchemicalWizardry.api.Int3; -//import WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage; -//import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; -// -//public class LocalStorageAlphaPact extends LocalRitualStorage -//{ -// public static Set<IHoardDemon> hoardList = new HashSet(); -// -// public void thrallDemon(IHoardDemon demon) -// { -// if(demon instanceof IHoardDemon) -// { -// boolean enthrall = ((IHoardDemon) demon).thrallDemon(new Int3(this.xCoord, this.yCoord, this.zCoord)); -// if(enthrall) -// { -// this.hoardList.add((IHoardDemon)demon); -// } -// } -// } -//} +package WayofTime.alchemicalWizardry.common.rituals; + +import java.util.HashSet; +import java.util.Set; + +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage; +import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; + +public class LocalStorageAlphaPact extends LocalRitualStorage +{ + public static Set<IHoardDemon> hoardList = new HashSet(); + + public void thrallDemon(IHoardDemon demon) + { + if(demon instanceof IHoardDemon) + { + boolean enthrall = ((IHoardDemon) demon).thrallDemon(new Int3(this.xCoord, this.yCoord, this.zCoord)); + if(enthrall) + { + this.hoardList.add((IHoardDemon)demon); + } + } + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAlphaPact.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAlphaPact.java index 6fafc94c..4ce93209 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAlphaPact.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAlphaPact.java @@ -1,178 +1,179 @@ -//package WayofTime.alchemicalWizardry.common.rituals; -// -//import java.util.ArrayList; -//import java.util.List; -//import java.util.Random; -// -//import net.minecraft.block.Block; -//import net.minecraft.entity.EntityLivingBase; -//import net.minecraft.util.BlockPos; -//import net.minecraft.util.MathHelper; -//import net.minecraft.world.World; -//import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -//import WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage; -//import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -//import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -//import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -//import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGrunt; -//import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; -// -//public class RitualEffectAlphaPact extends RitualEffect -//{ -// Random rand = new Random(); -// -// @Override -// public void performEffect(IMasterRitualStone ritualStone) -// { -// String owner = ritualStone.getOwner(); -// -// int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); -// World world = ritualStone.getWorldObj(); -// BlockPos pos = ritualStone.getPosition(); -// -// if (world.getWorldTime() % 20 != 0) -// { -// return; -// } -// -// LocalRitualStorage stor = ritualStone.getLocalStorage(); -// if(stor instanceof LocalStorageAlphaPact) -// { -// LocalStorageAlphaPact storage = (LocalStorageAlphaPact)stor; -// -// Object[] demonList = storage.hoardList.toArray(); -// -// for(Object demon : demonList) -// { -// if(demon instanceof EntityLivingBase) -// { -// if(!((EntityLivingBase) demon).isEntityAlive()) -// { -// System.out.println(storage.hoardList.remove(demon)); -// } -// } -// } -// -// System.out.println("Hi!"); -// -// int summons = 0; -// -// int horizontalRange = 25; -// int verticalRange = 20; -// -// if(storage.hoardList.isEmpty()) -// { -// IHoardDemon demon = this.getRandomDemonForStage(world, x, y, z, horizontalRange, verticalRange); -// if(demon instanceof EntityLivingBase) -// { -// world.spawnEntityInWorld((EntityLivingBase)demon); -// storage.thrallDemon(demon); -// } -// }else -// { -// } -// } -// } -// -// public IHoardDemon getRandomDemonForStage(World world, int x, int y, int z, int horizontalRange, int verticalRange) -// { -// EntityLivingBase entityLiving = new EntityMinorDemonGrunt(world); -// -// boolean isGood = false; -// for(int n=0; n<100; n++) -// { -// double newX = x + (rand.nextInt(horizontalRange) - horizontalRange) + 0.5; -// double newY = y + (double) (rand.nextInt((int) verticalRange)); -// double newZ = z + (rand.nextInt(horizontalRange) - horizontalRange) + 0.5; -// -// entityLiving.posX = newX; -// entityLiving.posY = newY; -// entityLiving.posZ = newZ; -// -// int i = MathHelper.floor_double(entityLiving.posX); -// int j = MathHelper.floor_double(entityLiving.posY); -// int k = MathHelper.floor_double(entityLiving.posZ); -// Block l; -// -// if (entityLiving.worldObj.blockExists(i, j, k)) -// { -// boolean flag1 = false; -// -// while (!flag1 && j > 0) -// { -// l = entityLiving.worldObj.getBlock(i, j - 1, k); -// -// if (l != null && l.getMaterial().blocksMovement()) -// { -// flag1 = true; -// } else -// { -// --entityLiving.posY; -// --j; -// } -// } -// } -// -// if(entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.boundingBox)) -// { -// entityLiving.setPositionAndUpdate(newX, newY, newZ); -// isGood = true; -// } -// } -// -// if(isGood = false) -// { -// return null; -// } -// -// return (IHoardDemon)entityLiving; -// } -// -// public int spawnMoreDemons(LocalStorageAlphaPact storage) -// { -// return 5; -// } -// -// @Override -// public int getCostPerRefresh() -// { -// return 1; -// } -// -// public LocalRitualStorage getNewLocalStorage() -// { -// return new LocalStorageAlphaPact(); -// } -// -// @Override -// public List<RitualComponent> getRitualComponentList() -// { -// ArrayList<RitualComponent> omegaRitual = new ArrayList(); -// -// this.addCornerRunes(omegaRitual, 1, 0, RitualComponent.BLANK); -// this.addOffsetRunes(omegaRitual, 2, 1, 0, RitualComponent.FIRE); -// this.addParallelRunes(omegaRitual, 4, 0, RitualComponent.WATER); -// this.addParallelRunes(omegaRitual, 5, 0, RitualComponent.EARTH); -// this.addCornerRunes(omegaRitual, 4, 0, RitualComponent.AIR); -// this.addOffsetRunes(omegaRitual, 3, 4, 0, RitualComponent.AIR); -// this.addParallelRunes(omegaRitual, 5, 1, RitualComponent.WATER); -// this.addParallelRunes(omegaRitual, 5, 2, RitualComponent.EARTH); -// this.addParallelRunes(omegaRitual, 4, 3, RitualComponent.WATER); -// this.addParallelRunes(omegaRitual, 4, 4, RitualComponent.WATER); -// this.addParallelRunes(omegaRitual, 3, 5, RitualComponent.BLANK); -// this.addParallelRunes(omegaRitual, 2, 5, RitualComponent.FIRE); -// this.addParallelRunes(omegaRitual, 1, 5, RitualComponent.DUSK); -// this.addOffsetRunes(omegaRitual, 5, 3, 1, RitualComponent.WATER); -// this.addOffsetRunes(omegaRitual, 6, 3, 1, RitualComponent.DUSK); -// this.addOffsetRunes(omegaRitual, 6, 4, 1, RitualComponent.FIRE); -// this.addOffsetRunes(omegaRitual, 6, 5, 1, RitualComponent.BLANK); -// this.addCornerRunes(omegaRitual, 4, 2, RitualComponent.FIRE); -// this.addCornerRunes(omegaRitual, 4, 3, RitualComponent.AIR); -// this.addCornerRunes(omegaRitual, 4, 4, RitualComponent.AIR); -// this.addOffsetRunes(omegaRitual, 4, 3, 2, RitualComponent.BLANK); -// this.addCornerRunes(omegaRitual, 3, 5, RitualComponent.EARTH); -// this.addOffsetRunes(omegaRitual, 2, 3, 5, RitualComponent.AIR); -// -// return omegaRitual; -// } -//} +package WayofTime.alchemicalWizardry.common.rituals; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGrunt; +import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; + +public class RitualEffectAlphaPact extends RitualEffect +{ + Random rand = new Random(); + + @Override + public void performEffect(IMasterRitualStone ritualStone) + { + String owner = ritualStone.getOwner(); + + int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); + + if (world.getWorldTime() % 20 != 0) + { + return; + } + + LocalRitualStorage stor = ritualStone.getLocalStorage(); + if(stor instanceof LocalStorageAlphaPact) + { + LocalStorageAlphaPact storage = (LocalStorageAlphaPact)stor; + + Object[] demonList = storage.hoardList.toArray(); + + for(Object demon : demonList) + { + if(demon instanceof EntityLivingBase) + { + if(!((EntityLivingBase) demon).isEntityAlive()) + { + System.out.println(storage.hoardList.remove(demon)); + } + } + } + + System.out.println("Hi!"); + + int summons = 0; + + int horizontalRange = 25; + int verticalRange = 20; + + if(storage.hoardList.isEmpty()) + { + IHoardDemon demon = this.getRandomDemonForStage(world, x, y, z, horizontalRange, verticalRange); + if(demon instanceof EntityLivingBase) + { + world.spawnEntityInWorld((EntityLivingBase)demon); + storage.thrallDemon(demon); + } + }else + { + } + } + } + + public IHoardDemon getRandomDemonForStage(World world, int x, int y, int z, int horizontalRange, int verticalRange) + { + EntityLivingBase entityLiving = new EntityMinorDemonGrunt(world); + + boolean isGood = false; + for(int n=0; n<100; n++) + { + double newX = x + (rand.nextInt(horizontalRange) - horizontalRange) + 0.5; + double newY = y + (double) (rand.nextInt((int) verticalRange)); + double newZ = z + (rand.nextInt(horizontalRange) - horizontalRange) + 0.5; + + entityLiving.posX = newX; + entityLiving.posY = newY; + entityLiving.posZ = newZ; + + int i = MathHelper.floor_double(entityLiving.posX); + int j = MathHelper.floor_double(entityLiving.posY); + int k = MathHelper.floor_double(entityLiving.posZ); + Block l; + + if (entityLiving.worldObj.blockExists(i, j, k)) + { + boolean flag1 = false; + + while (!flag1 && j > 0) + { + l = entityLiving.worldObj.getBlock(i, j - 1, k); + + if (l != null && l.getMaterial().blocksMovement()) + { + flag1 = true; + } else + { + --entityLiving.posY; + --j; + } + } + } + + if(entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.boundingBox)) + { + entityLiving.setPositionAndUpdate(newX, newY, newZ); + isGood = true; + } + } + + if(isGood = false) + { + return null; + } + + return (IHoardDemon)entityLiving; + } + + public int spawnMoreDemons(LocalStorageAlphaPact storage) + { + return 5; + } + + @Override + public int getCostPerRefresh() + { + return 1; + } + + public LocalRitualStorage getNewLocalStorage() + { + return new LocalStorageAlphaPact(); + } + + @Override + public List<RitualComponent> getRitualComponentList() + { + ArrayList<RitualComponent> omegaRitual = new ArrayList(); + + this.addCornerRunes(omegaRitual, 1, 0, RitualComponent.BLANK); + this.addOffsetRunes(omegaRitual, 2, 1, 0, RitualComponent.FIRE); + this.addParallelRunes(omegaRitual, 4, 0, RitualComponent.WATER); + this.addParallelRunes(omegaRitual, 5, 0, RitualComponent.EARTH); + this.addCornerRunes(omegaRitual, 4, 0, RitualComponent.AIR); + this.addOffsetRunes(omegaRitual, 3, 4, 0, RitualComponent.AIR); + this.addParallelRunes(omegaRitual, 5, 1, RitualComponent.WATER); + this.addParallelRunes(omegaRitual, 5, 2, RitualComponent.EARTH); + this.addParallelRunes(omegaRitual, 4, 3, RitualComponent.WATER); + this.addParallelRunes(omegaRitual, 4, 4, RitualComponent.WATER); + this.addParallelRunes(omegaRitual, 3, 5, RitualComponent.BLANK); + this.addParallelRunes(omegaRitual, 2, 5, RitualComponent.FIRE); + this.addParallelRunes(omegaRitual, 1, 5, RitualComponent.DUSK); + this.addOffsetRunes(omegaRitual, 5, 3, 1, RitualComponent.WATER); + this.addOffsetRunes(omegaRitual, 6, 3, 1, RitualComponent.DUSK); + this.addOffsetRunes(omegaRitual, 6, 4, 1, RitualComponent.FIRE); + this.addOffsetRunes(omegaRitual, 6, 5, 1, RitualComponent.BLANK); + this.addCornerRunes(omegaRitual, 4, 2, RitualComponent.FIRE); + this.addCornerRunes(omegaRitual, 4, 3, RitualComponent.AIR); + this.addCornerRunes(omegaRitual, 4, 4, RitualComponent.AIR); + this.addOffsetRunes(omegaRitual, 4, 3, 2, RitualComponent.BLANK); + this.addCornerRunes(omegaRitual, 3, 5, RitualComponent.EARTH); + this.addOffsetRunes(omegaRitual, 2, 3, 5, RitualComponent.AIR); + + return omegaRitual; + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java index a9068614..865a5f14 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAnimalGrowth.java @@ -1,21 +1,20 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.ArrayList; -import java.util.List; - +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; + +import java.util.ArrayList; +import java.util.List; public class RitualEffectAnimalGrowth extends RitualEffect { @@ -29,8 +28,10 @@ public class RitualEffectAnimalGrowth extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); if (world.getWorldTime() % 20 != 0) { @@ -39,7 +40,7 @@ public class RitualEffectAnimalGrowth extends RitualEffect double range = 2; - AxisAlignedBB axisalignedbb = new AxisAlignedBB(pos.offsetUp(), pos.add(1, 3, 1)).expand(range, 0, range); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 3), (double) (z + 1)).expand(range, 0, range); List<EntityAgeable> list = world.getEntitiesWithinAABB(EntityAgeable.class, axisalignedbb); int entityCount = 0; @@ -79,14 +80,14 @@ public class RitualEffectAnimalGrowth extends RitualEffect if (hasVirtus && SoulNetworkHandler.canSyphonFromOnlyNetwork(owner, breedingCost)) { List<EntityAnimal> animalList = world.getEntitiesWithinAABB(EntityAnimal.class, axisalignedbb); - TileEntity tile = world.getTileEntity(pos.offsetUp()); + TileEntity tile = world.getTileEntity(x, y + 1, z); IInventory inventory = null; if (tile instanceof IInventory) { inventory = (IInventory) tile; } else { - tile = world.getTileEntity(pos.offsetDown()); + tile = world.getTileEntity(x, y - 1, z); if (tile instanceof IInventory) { inventory = (IInventory) tile; @@ -112,7 +113,7 @@ public class RitualEffectAnimalGrowth extends RitualEffect if (stack != null && entityAnimal.isBreedingItem(stack)) { inventory.decrStackSize(i, 1); - entityAnimal.setInLove(null); + entityAnimal.func_146082_f(null); this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, true); SoulNetworkHandler.syphonFromNetwork(owner, breedingCost); break; @@ -133,7 +134,7 @@ public class RitualEffectAnimalGrowth extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> animalGrowthRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> animalGrowthRitual = new ArrayList(); animalGrowthRitual.add(new RitualComponent(0, 0, 2, RitualComponent.DUSK)); animalGrowthRitual.add(new RitualComponent(2, 0, 0, RitualComponent.DUSK)); animalGrowthRitual.add(new RitualComponent(0, 0, -2, RitualComponent.DUSK)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java index f1878498..f222840d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectApiaryOverclock.java @@ -1,19 +1,18 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.server.MinecraftServer; +import net.minecraft.world.World; + +import java.util.ArrayList; +import java.util.List; public class RitualEffectApiaryOverclock extends RitualEffect { @@ -31,8 +30,10 @@ public class RitualEffectApiaryOverclock extends RitualEffect } int currentEssence = data.currentEssence; - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); if (currentEssence < this.getCostPerRefresh()) @@ -57,7 +58,7 @@ public class RitualEffectApiaryOverclock extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> apiaryRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> apiaryRitual = new ArrayList(); apiaryRitual.add(new RitualComponent(1, 0, 0, RitualComponent.DUSK)); apiaryRitual.add(new RitualComponent(1, 0, 1, RitualComponent.DUSK)); apiaryRitual.add(new RitualComponent(1, 0, -1, RitualComponent.DUSK)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java index c8406e13..e3581192 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java @@ -7,9 +7,8 @@ import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.oredict.OreDictionary; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; @@ -18,7 +17,7 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; +import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; public class RitualEffectAutoAlchemy extends RitualEffect { @@ -32,8 +31,10 @@ public class RitualEffectAutoAlchemy extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); if (currentEssence < this.getCostPerRefresh() * 6) { @@ -44,8 +45,8 @@ public class RitualEffectAutoAlchemy extends RitualEffect int flag = 0; - TileEntity topEntity = world.getTileEntity(pos.offsetUp()); - if (!(topEntity instanceof IBloodAltar)) + TileEntity topEntity = world.getTileEntity(x, y + 1, z); + if (!(topEntity instanceof IBloodAltar) || !(topEntity instanceof IBloodAltar)) { return; } @@ -60,73 +61,73 @@ public class RitualEffectAutoAlchemy extends RitualEffect ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(targetStack); if (recipe != null) { - TEChemistrySet alchemyEntity; + TEWritingTable alchemyEntity; IInventory outputInv = null; IInventory inputInv1 = null; IInventory inputInv2 = null; - TileEntity northEntity = world.getTileEntity(pos.offsetNorth()); - TileEntity southEntity = world.getTileEntity(pos.offsetSouth()); - TileEntity eastEntity = world.getTileEntity(pos.offsetEast()); - TileEntity westEntity = world.getTileEntity(pos.offsetWest()); + TileEntity northEntity = world.getTileEntity(x, y, z - 1); + TileEntity southEntity = world.getTileEntity(x, y, z + 1); + TileEntity eastEntity = world.getTileEntity(x + 1, y, z); + TileEntity westEntity = world.getTileEntity(x - 1, y, z); - if (northEntity instanceof TEChemistrySet) + if (northEntity instanceof TEWritingTable) { - alchemyEntity = (TEChemistrySet) northEntity; - if (southEntity instanceof IInventory && !(southEntity instanceof TEChemistrySet)) + alchemyEntity = (TEWritingTable) northEntity; + if (southEntity instanceof IInventory && !(southEntity instanceof TEWritingTable)) { outputInv = (IInventory) southEntity; } - if (eastEntity instanceof IInventory && !(eastEntity instanceof TEChemistrySet)) + if (eastEntity instanceof IInventory && !(eastEntity instanceof TEWritingTable)) { inputInv1 = (IInventory) eastEntity; } - if (westEntity instanceof IInventory && !(westEntity instanceof TEChemistrySet)) + if (westEntity instanceof IInventory && !(westEntity instanceof TEWritingTable)) { inputInv2 = (IInventory) westEntity; } - } else if (southEntity instanceof TEChemistrySet) + } else if (southEntity instanceof TEWritingTable) { - alchemyEntity = (TEChemistrySet) southEntity; - if (northEntity instanceof IInventory) + alchemyEntity = (TEWritingTable) southEntity; + if (northEntity instanceof IInventory && !(northEntity instanceof TEWritingTable)) { outputInv = (IInventory) northEntity; } - if (eastEntity instanceof IInventory && !(eastEntity instanceof TEChemistrySet)) + if (eastEntity instanceof IInventory && !(eastEntity instanceof TEWritingTable)) { inputInv1 = (IInventory) eastEntity; } - if (westEntity instanceof IInventory && !(westEntity instanceof TEChemistrySet)) + if (westEntity instanceof IInventory && !(westEntity instanceof TEWritingTable)) { inputInv2 = (IInventory) westEntity; } - } else if (eastEntity instanceof TEChemistrySet) + } else if (eastEntity instanceof TEWritingTable) { - alchemyEntity = (TEChemistrySet) eastEntity; - if (westEntity instanceof IInventory && !(westEntity instanceof TEChemistrySet)) + alchemyEntity = (TEWritingTable) eastEntity; + if (westEntity instanceof IInventory && !(westEntity instanceof TEWritingTable)) { outputInv = (IInventory) westEntity; } - if (northEntity instanceof IInventory) + if (northEntity instanceof IInventory && !(northEntity instanceof TEWritingTable)) { inputInv1 = (IInventory) northEntity; } - if (southEntity instanceof IInventory) + if (southEntity instanceof IInventory && !(southEntity instanceof TEWritingTable)) { inputInv2 = (IInventory) southEntity; } - } else if (westEntity instanceof TEChemistrySet) + } else if (westEntity instanceof TEWritingTable) { - alchemyEntity = (TEChemistrySet) westEntity; - if (eastEntity instanceof IInventory) + alchemyEntity = (TEWritingTable) westEntity; + if (eastEntity instanceof IInventory && !(eastEntity instanceof TEWritingTable)) { outputInv = (IInventory) eastEntity; } - if (northEntity instanceof IInventory) + if (northEntity instanceof IInventory && !(northEntity instanceof TEWritingTable)) { inputInv1 = (IInventory) northEntity; } - if (southEntity instanceof IInventory) + if (southEntity instanceof IInventory && !(southEntity instanceof TEWritingTable)) { inputInv2 = (IInventory) southEntity; } @@ -135,7 +136,7 @@ public class RitualEffectAutoAlchemy extends RitualEffect return; } - if (hasPotentia) + if (alchemyEntity != null && hasPotentia) { alchemyEntity.setAccelerationTime(5); if (alchemyEntity.isWorking()) @@ -239,6 +240,7 @@ public class RitualEffectAutoAlchemy extends RitualEffect break; } } + continue; } } @@ -270,7 +272,7 @@ public class RitualEffectAutoAlchemy extends RitualEffect continue; } - if(!inputInv1.isItemValidForSlot(j, curItem) || (inputInv1 instanceof ISidedInventory && !((ISidedInventory) inputInv1).canExtractItem(j, curItem, EnumFacing.DOWN))) + if(!inputInv1.isItemValidForSlot(j, curItem) || (inputInv1 instanceof ISidedInventory && !((ISidedInventory) inputInv1).canExtractItem(j, curItem, ForgeDirection.DOWN.ordinal()))) { continue; } @@ -384,11 +386,10 @@ public class RitualEffectAutoAlchemy extends RitualEffect if (flag > 0) { - for(EnumFacing face : EnumFacing.HORIZONTALS) - { - world.markBlockForUpdate(pos.offset(face)); - } - + world.markBlockForUpdate(x, y, z + 1); + world.markBlockForUpdate(x, y, z - 1); + world.markBlockForUpdate(x + 1, y, z); + world.markBlockForUpdate(x - 1, y, z); SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * flag); } } @@ -403,7 +404,7 @@ public class RitualEffectAutoAlchemy extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> autoAlchemyRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> autoAlchemyRitual = new ArrayList(); autoAlchemyRitual.add(new RitualComponent(1, 0, 1, RitualComponent.DUSK)); autoAlchemyRitual.add(new RitualComponent(1, 0, -1, RitualComponent.DUSK)); autoAlchemyRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.DUSK)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java index 5416441b..afa50b54 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBinding.java @@ -1,9 +1,11 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - +import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -11,14 +13,11 @@ import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; public class RitualEffectBinding extends RitualEffect { @@ -28,8 +27,10 @@ public class RitualEffectBinding extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); if (currentEssence < this.getCostPerRefresh()) { @@ -46,7 +47,7 @@ public class RitualEffectBinding extends RitualEffect if (ritualStone.getVar1() == 0) { int d0 = 0; - AxisAlignedBB axisalignedbb = new AxisAlignedBB(pos.offsetUp(), pos.add(1, 2, 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 2), (double) (z + 1)).expand(d0, d0, d0); List list = world.getEntitiesWithinAABB(EntityItem.class, axisalignedbb); Iterator iterator = list.iterator(); EntityItem item; @@ -66,7 +67,7 @@ public class RitualEffectBinding extends RitualEffect { ritualStone.setVar1(BindingRegistry.getIndexForItem(itemStack) + 1); itemStack.stackSize--; - world.addWeatherEffect(new EntityLightningBolt(world, pos.getX(), pos.getY() + 1, pos.getZ())); + world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z)); ritualStone.setCooldown(ritualStone.getCooldown() - 1); if(itemStack.stackSize <= 0) { @@ -77,7 +78,7 @@ public class RitualEffectBinding extends RitualEffect if (world.rand.nextInt(10) == 0) { - SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, world.provider.getDimensionId(), 1, pos); + SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 1, x, y, z); } } @@ -90,8 +91,40 @@ public class RitualEffectBinding extends RitualEffect { int lightningPoint = world.rand.nextInt(8); - BlockPos newPos = getPositionForLightning(pos, lightningPoint); - world.addWeatherEffect(new EntityLightningBolt(world, newPos.getX(), newPos.getY(), newPos.getZ())); + switch (lightningPoint) + { + case 0: + world.addWeatherEffect(new EntityLightningBolt(world, x + 4, y + 3, z)); + break; + + case 1: + world.addWeatherEffect(new EntityLightningBolt(world, x - 4, y + 3, z)); + break; + + case 2: + world.addWeatherEffect(new EntityLightningBolt(world, x, y + 3, z + 4)); + break; + + case 3: + world.addWeatherEffect(new EntityLightningBolt(world, x, y + 3, z - 4)); + break; + + case 4: + world.addWeatherEffect(new EntityLightningBolt(world, x + 3, y + 3, z + 3)); + break; + + case 5: + world.addWeatherEffect(new EntityLightningBolt(world, x - 3, y + 3, z + 3)); + break; + + case 6: + world.addWeatherEffect(new EntityLightningBolt(world, x + 3, y + 3, z - 3)); + break; + + case 7: + world.addWeatherEffect(new EntityLightningBolt(world, x - 3, y + 3, z - 3)); + break; + } } if (ritualStone.getCooldown() <= 0) @@ -101,7 +134,7 @@ public class RitualEffectBinding extends RitualEffect if (spawnedItem != null) { - EntityItem newItem = new EntityItem(world, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, spawnedItem.copy()); + EntityItem newItem = new EntityItem(world, x + 0.5, y + 1, z + 0.5, spawnedItem.copy()); world.spawnEntityInWorld(newItem); } @@ -111,39 +144,6 @@ public class RitualEffectBinding extends RitualEffect } } - public BlockPos getPositionForLightning(BlockPos pos, int lightning) - { - switch (lightning) - { - case 0: - return pos.add(4, 3, 0); - - case 1: - return pos.add(-4, 3, 0); - - case 2: - return pos.add(0, 3, 4); - - case 3: - return pos.add(0, 3, -4); - - case 4: - return pos.add(3, 3, 3); - - case 5: - return pos.add(-3, 3, 3); - - case 6: - return pos.add(-3, 3, -3); - - case 7: - return pos.add(3, 3, -3); - - default: - return pos.add(0, 3, 0); - } - } - @Override public int getCostPerRefresh() { @@ -159,7 +159,7 @@ public class RitualEffectBinding extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> boundSoulRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> boundSoulRitual = new ArrayList(); boundSoulRitual.add(new RitualComponent(3, 0, 0, 2)); boundSoulRitual.add(new RitualComponent(-3, 0, 0, 2)); boundSoulRitual.add(new RitualComponent(0, 0, 3, 2)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java index a113d896..399ee3e5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectBiomeChanger.java @@ -1,10 +1,13 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.ArrayList; -import java.util.List; - +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -15,18 +18,12 @@ import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.chunk.Chunk; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; + +import java.util.ArrayList; +import java.util.List; public class RitualEffectBiomeChanger extends RitualEffect { @@ -36,16 +33,17 @@ public class RitualEffectBiomeChanger extends RitualEffect String owner = ritualStone.getOwner(); int cooldown = ritualStone.getCooldown(); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); if (cooldown > 0) { ritualStone.setCooldown(cooldown - 1); if (world.rand.nextInt(15) == 0) { - world.addWeatherEffect(new EntityLightningBolt(world, pos.getX() - 1 + world.rand.nextInt(3), pos.getY() + 1, pos.getZ() - 1 + world.rand.nextInt(3))); + world.addWeatherEffect(new EntityLightningBolt(world, x - 1 + world.rand.nextInt(3), y + 1, z - 1 + world.rand.nextInt(3))); } return; @@ -91,25 +89,49 @@ public class RitualEffectBiomeChanger extends RitualEffect { if (boolList[i][j]) { - BlockPos position = pos.add(i - range, 1, j - range); - - for(EnumFacing face : EnumFacing.HORIZONTALS) - { - int iP = i + face.getFrontOffsetX(); - int jP = j + face.getFrontOffsetY(); - - if(iP >= 0 && iP <= 2 * range && jP >= 0 && jP <= 2 * range && !boolList[iP][jP]) - { - BlockPos newPos = position.add(face.getDirectionVec()); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - if (!ModBlocks.largeBloodStoneBrick.equals(block) && !ModBlocks.bloodStoneBrick.equals(block)) - { - boolList[iP][jP] = true; - isReady = false; - } - } - } + if (i - 1 >= 0 && !boolList[i - 1][j]) + { + Block block = world.getBlock(x - range + i - 1, y + 1, z - range + j); + + if (!ModBlocks.largeBloodStoneBrick.equals(block) && !ModBlocks.bloodStoneBrick.equals(block)) + { + boolList[i - 1][j] = true; + isReady = false; + } + } + + if (j - 1 >= 0 && !boolList[i][j - 1]) + { + Block block = world.getBlock(x - range + i, y + 1, z - range + j - 1); + + if (!ModBlocks.largeBloodStoneBrick.equals(block) && !ModBlocks.bloodStoneBrick.equals(block)) + { + boolList[i][j - 1] = true; + isReady = false; + } + } + + if (i + 1 <= 2 * range && !boolList[i + 1][j]) + { + Block block = world.getBlock(x - range + i + 1, y + 1, z - range + j); + + if (!ModBlocks.largeBloodStoneBrick.equals(block) && !ModBlocks.bloodStoneBrick.equals(block)) + { + boolList[i + 1][j] = true; + isReady = false; + } + } + + if (j + 1 <= 2 * range && !boolList[i][j + 1]) + { + Block block = world.getBlock(x - range + i, y + 1, z - range + j + 1); + + if (!ModBlocks.largeBloodStoneBrick.equals(block) && !ModBlocks.bloodStoneBrick.equals(block)) + { + boolList[i][j + 1] = true; + isReady = false; + } + } } } } @@ -129,8 +151,7 @@ public class RitualEffectBiomeChanger extends RitualEffect } boolean isItemConsumed = false; - BlockPos newPos = pos.add(i, 0, j); - TileEntity tileEntity = world.getTileEntity(newPos); + TileEntity tileEntity = world.getTileEntity(x + i, y, z + j); if (!(tileEntity instanceof TEPlinth)) { @@ -148,7 +169,7 @@ public class RitualEffectBiomeChanger extends RitualEffect { if (itemTest instanceof ItemBlock) { - Block item = ((ItemBlock) itemTest).getBlock(); + Block item = ((ItemBlock) itemTest).field_150939_a; if (item == (Blocks.sand)) { humidity -= 0.1f; @@ -209,12 +230,14 @@ public class RitualEffectBiomeChanger extends RitualEffect if (isItemConsumed) { tilePlinth.setInventorySlotContents(0, null); - world.markBlockForUpdate(newPos); - world.addWeatherEffect(new EntityLightningBolt(world, newPos.getX(), newPos.getY() + 1, newPos.getZ())); + world.markBlockForUpdate(x + i, y, z + j); + world.addWeatherEffect(new EntityLightningBolt(world, x + i, y + 1, z + j)); } } } + boolean wantsSnow = false; + boolean wantsRain = true; int biomeID = 1; BiomeGenBase[] biomeList = BiomeGenBase.getBiomeGenArray(); int iteration = 0; @@ -246,11 +269,10 @@ public class RitualEffectBiomeChanger extends RitualEffect { if (boolList[i][j]) { - BlockPos newPos = pos.add(i - range, 0, j - range); - Chunk chunk = world.getChunkFromBlockCoords(newPos); + Chunk chunk = world.getChunkFromBlockCoords(x - range + i, z - range + j); byte[] byteArray = chunk.getBiomeArray(); - int moduX = (newPos.getX()) % 16; - int moduZ = (newPos.getZ()) % 16; + int moduX = (x - range + i) % 16; + int moduZ = (z - range + j) % 16; if (moduX < 0) { @@ -288,7 +310,7 @@ public class RitualEffectBiomeChanger extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> biomeChangerRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> biomeChangerRitual = new ArrayList(); biomeChangerRitual.add(new RitualComponent(1, 0, -2, RitualComponent.AIR)); biomeChangerRitual.add(new RitualComponent(1, 0, -3, RitualComponent.AIR)); biomeChangerRitual.add(new RitualComponent(2, 0, -1, RitualComponent.AIR)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java index bdd237f6..1a6b225a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectContainment.java @@ -1,16 +1,5 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.ReflectionHelper; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -18,6 +7,16 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.ReflectionHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; + +import java.util.ArrayList; +import java.util.List; public class RitualEffectContainment extends RitualEffect { @@ -32,8 +31,10 @@ public class RitualEffectContainment extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); if (currentEssence < this.getCostPerRefresh()) { @@ -41,9 +42,10 @@ public class RitualEffectContainment extends RitualEffect } else { int d0 = 5; - List<Entity> entityList = SpellHelper.getEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, d0, d0); + List<Entity> entityList = SpellHelper.getEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, d0, d0); boolean flag = false; boolean hasCrepitous = this.canDrainReagent(ritualStone, ReagentRegistry.crepitousReagent, crepitousDrain, false); + boolean hasTerrae = this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false); boolean hasMagicales = this.canDrainReagent(ritualStone, ReagentRegistry.magicalesReagent, magicalesDrain, false); for (Entity entity : entityList) @@ -61,9 +63,9 @@ public class RitualEffectContainment extends RitualEffect } - double xDif = livingEntity.posX - (pos.getX() + 0.5); - double yDif = livingEntity.posY - (pos.getY() + 3); - double zDif = livingEntity.posZ - (pos.getZ() + 0.5); + double xDif = livingEntity.posX - (x + 0.5); + double yDif = livingEntity.posY - (y + 3); + double zDif = livingEntity.posZ - (z + 0.5); livingEntity.motionX = -0.05 * xDif; livingEntity.motionY = -0.05 * yDif; livingEntity.motionZ = -0.05 * zDif; @@ -107,7 +109,7 @@ public class RitualEffectContainment extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> containmentRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> containmentRitual = new ArrayList(); containmentRitual.add(new RitualComponent(1, 0, 0, 3)); containmentRitual.add(new RitualComponent(-1, 0, 0, 3)); containmentRitual.add(new RitualComponent(0, 0, 1, 3)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java index 5b5a623b..889bed90 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrafting.java @@ -15,9 +15,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.oredict.OreDictionary; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; @@ -41,8 +40,10 @@ public class RitualEffectCrafting extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); @@ -92,13 +93,13 @@ public class RitualEffectCrafting extends RitualEffect { int gridSpace = (i+1)*3 + (j+1); - Int3 position = this.getSlotPositionForDirection(gridSpace, direction); - TileEntity inv = world.getTileEntity(pos.add(position.xCoord, position.yCoord, position.zCoord)); + Int3 pos = this.getSlotPositionForDirection(gridSpace, direction); + TileEntity inv = world.getTileEntity(x + pos.xCoord, y + pos.yCoord, z + pos.zCoord); if(inv instanceof IInventory) { if(((IInventory) inv).getSizeInventory() <= slotDesignation || !((IInventory) inv).isItemValidForSlot(slotDesignation, ((IInventory) inv).getStackInSlot(slotDesignation))) { - + continue; }else { ItemStack invStack = ((IInventory) inv).getStackInSlot(slotDesignation); @@ -131,12 +132,12 @@ public class RitualEffectCrafting extends RitualEffect IInventory outputInv = null; - List<IInventory> invList = new ArrayList<IInventory>(); + List<IInventory> invList = new ArrayList(); - TileEntity northEntity = world.getTileEntity(pos.add(0, -1, -2)); - TileEntity southEntity = world.getTileEntity(pos.add(0, -1, 2)); - TileEntity eastEntity = world.getTileEntity(pos.add(2, -1, 0)); - TileEntity westEntity = world.getTileEntity(pos.add(-2, -1, 0)); + TileEntity northEntity = world.getTileEntity(x, y-1, z - 2); + TileEntity southEntity = world.getTileEntity(x, y-1, z + 2); + TileEntity eastEntity = world.getTileEntity(x + 2, y-1, z); + TileEntity westEntity = world.getTileEntity(x - 2, y-1, z); switch(direction) { @@ -239,7 +240,7 @@ public class RitualEffectCrafting extends RitualEffect if (outputInv != null) { - if(!(!limitToSingleStack ? SpellHelper.canInsertStackFullyIntoInventory(returnStack, outputInv, EnumFacing.DOWN) : SpellHelper.canInsertStackFullyIntoInventory(returnStack, outputInv, EnumFacing.DOWN, true, returnStack.getMaxStackSize()))) + if(!(!limitToSingleStack ? SpellHelper.canInsertStackFullyIntoInventory(returnStack, outputInv, ForgeDirection.DOWN) : SpellHelper.canInsertStackFullyIntoInventory(returnStack, outputInv, ForgeDirection.DOWN, true, returnStack.getMaxStackSize()))) { tag.setBoolean("didLastCraftFail", true); return; @@ -250,7 +251,7 @@ public class RitualEffectCrafting extends RitualEffect invList.add(outputInv); } - Map<Integer, Map<Integer, Integer>> syphonMap = new HashMap<Integer, Map<Integer, Integer>>(); //Inventory, Slot, how much claimed + Map<Integer, Map<Integer, Integer>> syphonMap = new HashMap(); //Inventory, Slot, how much claimed for(int n = 0; n < recipe.length; n++) //Look for the correct items { @@ -299,7 +300,7 @@ public class RitualEffectCrafting extends RitualEffect Map<Integer, Integer> slotMap = syphonMap.get(i); if(slotMap == null) { - slotMap = new HashMap<Integer, Integer>(); + slotMap = new HashMap(); syphonMap.put(i, slotMap); } @@ -331,7 +332,7 @@ public class RitualEffectCrafting extends RitualEffect /* The recipe is valid and the items have been found */ - SpellHelper.insertStackIntoInventory(CraftingManager.getInstance().findMatchingRecipe(inventory, world), outputInv, EnumFacing.DOWN); + SpellHelper.insertStackIntoInventory(CraftingManager.getInstance().findMatchingRecipe(inventory, world), outputInv, ForgeDirection.DOWN); for(Entry<Integer, Map<Integer, Integer>> entry1 : syphonMap.entrySet()) { @@ -366,10 +367,10 @@ public class RitualEffectCrafting extends RitualEffect this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, true); } - world.markBlockForUpdate(pos.add(0, 1, 2)); - world.markBlockForUpdate(pos.add(0, 1, -2)); - world.markBlockForUpdate(pos.add(2, 1, 0)); - world.markBlockForUpdate(pos.add(-2, 1, 0)); + world.markBlockForUpdate(x, y-1, z + 2); + world.markBlockForUpdate(x, y-1, z - 2); + world.markBlockForUpdate(x + 2, y-1, z); + world.markBlockForUpdate(x - 2, y-1, z); // long endTime = System.nanoTime(); // @@ -389,7 +390,7 @@ public class RitualEffectCrafting extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> autoCraftingRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> autoCraftingRitual = new ArrayList(); this.addCornerRunes(autoCraftingRitual, 1, 1, RitualComponent.EARTH); this.addParallelRunes(autoCraftingRitual, 1, 1, RitualComponent.EARTH); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java index 7d461d57..9440dc1d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java @@ -4,7 +4,6 @@ import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityItem; import net.minecraft.init.Blocks; import net.minecraft.inventory.IInventory; @@ -12,9 +11,8 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -37,15 +35,17 @@ public class RitualEffectCrushing extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); if (world.getWorldTime() % 10 != 5) { return; } - TileEntity tile = world.getTileEntity(pos.offsetUp()); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); + TileEntity tile = world.getTileEntity(x, y + 1, z); IInventory tileEntity; if (tile instanceof IInventory) @@ -82,6 +82,7 @@ public class RitualEffectCrushing extends RitualEffect boolean hasVirtus = this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false); boolean hasIncendium = this.canDrainReagent(ritualStone, ReagentRegistry.incendiumReagent, incendiumDrain, false); + boolean isSilkTouch = hasCrystallos; int fortuneLevel = 0; if (hasOrbisTerrae) { @@ -107,32 +108,30 @@ public class RitualEffectCrushing extends RitualEffect { for (int k = -1; k <= 1; k++) { - BlockPos newPos = pos.add(i, j, k); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - - if(block.getBlockHardness(world, newPos) == -1) + Block block = world.getBlock(x + i, y + j, z + k); + int meta = world.getBlockMetadata(x + i, y + j, z + k); + if(block.getBlockHardness(world, x + i, y + j, z + k) == -1) { continue; } - if (!world.isAirBlock(newPos)) + if (block != null && !world.isAirBlock(x + i, y + j, z + k)) { if ((block.equals(ModBlocks.ritualStone) || block.equals(ModBlocks.blockMasterStone)) || SpellHelper.isBlockFluid(block)) { continue; } - if (hasCrystallos && block.canSilkHarvest(world, newPos, state, null)) + if (isSilkTouch && block.canSilkHarvest(world, null, x + i, y + j, z + k, meta)) { - ItemStack item = new ItemStack(block, 1, block.getMetaFromState(state)); - ItemStack copyStack = ItemStack.copyItemStack(item); + ItemStack item = new ItemStack(block, 1, meta); + ItemStack copyStack = item.copyItemStack(item); - SpellHelper.insertStackIntoInventory(copyStack, tileEntity, EnumFacing.DOWN); + SpellHelper.insertStackIntoInventory(copyStack, tileEntity, ForgeDirection.DOWN); if (copyStack.stackSize > 0) { - world.spawnEntityInWorld(new EntityItem(world, pos.getX() + 0.5, pos.getY() + 2, pos.getZ() + 0.5, copyStack)); + world.spawnEntityInWorld(new EntityItem(world, x + 0.4, y + 2, z + 0.5, copyStack)); } if (hasCrystallos) @@ -141,7 +140,7 @@ public class RitualEffectCrushing extends RitualEffect } } else { - List<ItemStack> itemDropList = block.getDrops(world, newPos, state, fortuneLevel); + ArrayList<ItemStack> itemDropList = block.getDrops(world, x + i, y + j, z + k, meta, fortuneLevel); if (itemDropList != null) { @@ -150,7 +149,7 @@ public class RitualEffectCrushing extends RitualEffect for (ItemStack item : itemDropList) { hasIncendium = hasIncendium && this.canDrainReagent(ritualStone, ReagentRegistry.incendiumReagent, incendiumDrain, false); - ItemStack copyStack = ItemStack.copyItemStack(item); + ItemStack copyStack = item.copyItemStack(item); if (this.usesIncendium(copyStack)) { @@ -158,10 +157,10 @@ public class RitualEffectCrushing extends RitualEffect this.canDrainReagent(ritualStone, ReagentRegistry.incendiumReagent, incendiumDrain, true); } - SpellHelper.insertStackIntoInventory(copyStack, tileEntity, EnumFacing.DOWN); + SpellHelper.insertStackIntoInventory(copyStack, tileEntity, ForgeDirection.DOWN); if (copyStack.stackSize > 0) { - world.spawnEntityInWorld(new EntityItem(world, pos.getX() + 0.5, pos.getY() + 2, pos.getZ() + 0.5, copyStack)); + world.spawnEntityInWorld(new EntityItem(world, x + 0.4, y + 2, z + 0.5, copyStack)); } } @@ -179,8 +178,8 @@ public class RitualEffectCrushing extends RitualEffect } } } - world.setBlockToAir(newPos); - world.playSoundEffect(newPos.getX(), newPos.getY(), newPos.getZ(), "mob.endermen.portal", 1.0F, 1.0F); + world.setBlockToAir(x + i, y + j, z + k); + world.playSoundEffect(x + i, y + j, z + k, "mob.endermen.portal", 1.0F, 1.0F); SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); @@ -199,12 +198,15 @@ public class RitualEffectCrushing extends RitualEffect Item item = stack.getItem(); if (item instanceof ItemBlock) { - Block block = ((ItemBlock) item).getBlock(); + Block block = ((ItemBlock) item).field_150939_a; if (block == Blocks.cobblestone || block == Blocks.stone) { return true; } + } else + { + } } return false; @@ -220,7 +222,7 @@ public class RitualEffectCrushing extends RitualEffect Item item = stack.getItem(); if (item instanceof ItemBlock) { - Block block = ((ItemBlock) item).getBlock(); + Block block = ((ItemBlock) item).field_150939_a; if (hasIncendium) { @@ -229,6 +231,9 @@ public class RitualEffectCrushing extends RitualEffect copyStack = new ItemStack(Blocks.netherrack, stackSize, 0); } } + } else + { + } return copyStack; @@ -236,6 +241,65 @@ public class RitualEffectCrushing extends RitualEffect return stack; } + public boolean isSilkTouch(World world, int x, int y, int z) + { + int index = 0; + for (int i = -2; i <= 2; i++) + { + for (int j = -2; j <= 2; j++) + { + int index1 = Math.abs(i); + int index2 = Math.abs(j); + + if ((index1 == 2 && (index2 == 2 || index2 == 1)) || (index1 == 1 && index2 == 2)) + { + Block block = world.getBlock(x + i, y + 1, z + j); + if (block == Blocks.gold_block) + { + index++; + } + } + } + } + + return index >= 12; + } + + public int getFortuneLevel(World world, int x, int y, int z) + { + int index = 0; + for (int i = -2; i <= 2; i++) + { + for (int j = -2; j <= 2; j++) + { + int index1 = Math.abs(i); + int index2 = Math.abs(j); + + if ((index1 == 2 && (index2 == 2 || index2 == 1)) || (index1 == 1 && index2 == 2)) + { + Block block = world.getBlock(x + i, y + 1, z + j); + if (block == Blocks.emerald_block || block == Blocks.diamond_block) + { + index++; + } + } + } + } + + if (index >= 12) + { + return 3; + } else if (index >= 8) + { + return 2; + } else if (index >= 4) + { + return 1; + } + + return 0; + } + @Override public int getCostPerRefresh() { @@ -245,7 +309,7 @@ public class RitualEffectCrushing extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> crushingRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> crushingRitual = new ArrayList(); crushingRitual.add(new RitualComponent(0, 0, 1, RitualComponent.EARTH)); crushingRitual.add(new RitualComponent(1, 0, 0, RitualComponent.EARTH)); crushingRitual.add(new RitualComponent(0, 0, -1, RitualComponent.EARTH)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java index 2674b0ce..c083863d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectDemonPortal.java @@ -4,12 +4,10 @@ import java.util.ArrayList; import java.util.List; import java.util.Random; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentTranslation; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.ModBlocks; @@ -22,6 +20,7 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; public class RitualEffectDemonPortal extends RitualEffect { @@ -37,8 +36,10 @@ public class RitualEffectDemonPortal extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); if (currentEssence < this.getCostPerRefresh()) { @@ -67,7 +68,7 @@ public class RitualEffectDemonPortal extends RitualEffect { if(rand.nextInt(10) == 0) { - this.createRandomLightning(world, pos.getX(), pos.getY(), pos.getZ()); + this.createRandomLightning(world, x, y, z); } reagentAmount += drainAmount; @@ -81,9 +82,9 @@ public class RitualEffectDemonPortal extends RitualEffect if(reagentsFulfilled && checkCreatePortal(ritualStone)) { - world.setBlockState(pos.offsetUp(), ModBlocks.blockDemonPortal.getDefaultState()); + world.setBlock(x, y+1, z, ModBlocks.blockDemonPortal); - TEDemonPortal portal = (TEDemonPortal) world.getTileEntity(pos.offsetUp()); + TEDemonPortal portal = (TEDemonPortal) world.getTileEntity(x, y + 1, z); portal.start(); ritualStone.setActive(false); @@ -95,12 +96,11 @@ public class RitualEffectDemonPortal extends RitualEffect public boolean checkCreatePortal(IMasterRitualStone ritualStone) { - BlockPos pos = ritualStone.getPosition(); - TileEntity entity = ritualStone.getWorldObj().getTileEntity(pos.offsetUp()); + TileEntity entity = ritualStone.getWorld().getTileEntity(ritualStone.getXCoord(), ritualStone.getYCoord() + 1, ritualStone.getZCoord()); if(entity instanceof IBloodAltar) { IBloodAltar altar = (IBloodAltar)entity; - if(altar.hasDemonBlood() && ritualStone.getWorldObj().isAirBlock(pos.offsetUp(2))) + if(altar.hasDemonBlood() && ritualStone.getWorld().isAirBlock(ritualStone.getXCoord(), ritualStone.getYCoord() + 2, ritualStone.getZCoord())) { return true; } @@ -132,11 +132,13 @@ public class RitualEffectDemonPortal extends RitualEffect public boolean checkJars(IMasterRitualStone ritualStone) { - BlockPos position = ritualStone.getPosition(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); for(Int3 pos : jarLocations) { - if(!(ritualStone.getWorldObj().getTileEntity(position.add(pos.xCoord, pos.yCoord, pos.zCoord)) instanceof TEBelljar)) + if(!(ritualStone.getWorld().getTileEntity(x + pos.xCoord, y + pos.yCoord, z + pos.zCoord) instanceof TEBellJar)) { return false; } @@ -148,7 +150,7 @@ public class RitualEffectDemonPortal extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> demonRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> demonRitual = new ArrayList(); this.addParallelRunes(demonRitual, 3, 0, RitualComponent.FIRE); this.addParallelRunes(demonRitual, 5, 0, RitualComponent.FIRE); this.addCornerRunes(demonRitual, 2, 0, RitualComponent.AIR); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java index bdb47c52..5e82d851 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java @@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.common.rituals; import java.util.ArrayList; import java.util.List; -import net.minecraft.block.state.IBlockState; +import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemBlock; @@ -12,8 +12,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -30,10 +28,12 @@ public class RitualEffectEllipsoid extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); - TileEntity tile = world.getTileEntity(pos.offsetUp()); + TileEntity tile = world.getTileEntity(x, y + 1, z); if (!(tile instanceof IInventory) || ((IInventory) tile).getSizeInventory() < 3) { @@ -62,7 +62,7 @@ public class RitualEffectEllipsoid extends RitualEffect entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); } else { - tile = world.getTileEntity(pos.offsetDown()); + tile = world.getTileEntity(x, y-1, z); if(!(tile instanceof IInventory)) { return; @@ -115,7 +115,7 @@ public class RitualEffectEllipsoid extends RitualEffect while(j <= ySize) { - if(pos.getY() + j < 0) + if(y + j < 0) { j++; continue; @@ -144,29 +144,36 @@ public class RitualEffectEllipsoid extends RitualEffect count--; - BlockPos newPos = pos.add(i, j, k); - - if (!world.isAirBlock(newPos)) + Block block = world.getBlock(x + i, y + j, z + k); + + if (!block.isAir(world, x + i, y + j, z + k)) { k++; continue; } else { //This is pulled from the ItemBlock's placing calls - int newState = placedBlock.getMetadata(stack.getMetadata()); - IBlockState iblockstate1 = placedBlock.block.onBlockPlaced(world, newPos, EnumFacing.UP, 0, 0, 0, newState, null); + int i1 = placedBlock.getMetadata(stack.getItemDamage()); + int j1 = placedBlock.field_150939_a.onBlockPlaced(world, x + i, y + j, z + k, 0, 0, 0, 0, i1); - if (placedBlock.placeBlockAt(stack, null, world, pos, EnumFacing.UP, 0, 0, 0, iblockstate1)) + if (placedBlock.placeBlockAt(stack, null, world, x + i, y + j, z + k, 0, 0, 0, 0, j1)) { - world.playSoundEffect((double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), placedBlock.block.stepSound.getPlaceSound(), (placedBlock.block.stepSound.getVolume() + 1.0F) / 2.0F, placedBlock.block.stepSound.getFrequency() * 0.8F); + world.playSoundEffect((double)(x + i + 0.5F), (double)(y + j + 0.5F), (double)(z + k + 0.5F), placedBlock.field_150939_a.stepSound.func_150496_b(), (placedBlock.field_150939_a.stepSound.getVolume() + 1.0F) / 2.0F, placedBlock.field_150939_a.stepSound.getPitch() * 0.8F); --stack.stackSize; + if(stack.stackSize <= 0) + { + inv.setInventorySlotContents(slot, null); + } + + this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); + + incrementNext = true; + SoulNetworkHandler.syphonFromNetwork(owner, cost); + } - this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); - - incrementNext = true; - SoulNetworkHandler.syphonFromNetwork(owner, cost); - +// world.setBlock(x + i, y + j, z + k, Blocks.stone); + k++; } } @@ -192,7 +199,7 @@ public class RitualEffectEllipsoid extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> ellipsoidRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> ellipsoidRitual = new ArrayList(); ellipsoidRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.DUSK)); ellipsoidRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.DUSK)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java index 53c81bba..5c447a02 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java @@ -1,23 +1,20 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; + +import java.util.ArrayList; +import java.util.List; public class RitualEffectEvaporation extends RitualEffect { @@ -27,8 +24,10 @@ public class RitualEffectEvaporation extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); if (currentEssence < 0) { @@ -42,8 +41,7 @@ public class RitualEffectEvaporation extends RitualEffect entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); } else { - IBlockState state1 = world.getBlockState(pos.offsetDown()); - Block block1 = state1.getBlock(); + Block block1 = world.getBlock(x, y - 1, z); int range = this.getRadiusForModifierBlock(block1); boolean[][][] boolList = new boolean[range * 2 + 1][range * 2 + 1][range * 2 + 1]; @@ -74,26 +72,65 @@ public class RitualEffectEvaporation extends RitualEffect { if (boolList[i][j][k]) { - BlockPos position = pos.add(i - range, j - range, k - range); - - for(EnumFacing face : EnumFacing.VALUES) - { - int iP = i + face.getFrontOffsetX(); - int jP = j + face.getFrontOffsetY(); - int kP = k + face.getFrontOffsetZ(); - - if(iP >= 0 && iP <= 2 * range && jP >= 0 && jP <= 2 * range && kP >= 0 && kP <= 2 * range && !boolList[iP][jP][kP]) - { - BlockPos newPos = position.add(face.getDirectionVec()); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - if (world.isAirBlock(newPos) || block == ModBlocks.blockSpectralContainer) - { - boolList[iP][jP][kP] = true; - isReady = false; - } - } - } + if (i - 1 >= 0 && !boolList[i - 1][j][k]) + { + Block block = world.getBlock(x - range + i - 1, y - range + j, z - range + k); + if (world.isAirBlock(x - range + i - 1, y - range + j, z - range + k) || block == ModBlocks.blockSpectralContainer) + { + boolList[i - 1][j][k] = true; + isReady = false; + } + } + + if (j - 1 >= 0 && !boolList[i][j - 1][k]) + { + Block block = world.getBlock(x - range + i, y - range + j - 1, z - range + k); + if (world.isAirBlock(x - range + i, y - range + j - 1, z - range + k) || block == ModBlocks.blockSpectralContainer) + { + boolList[i][j - 1][k] = true; + isReady = false; + } + } + + if (k - 1 >= 0 && !boolList[i][j][k - 1]) + { + Block block = world.getBlock(x - range + i, y - range + j, z - range + k - 1); + if (world.isAirBlock(x - range + i, y - range + j, z - range + k - 1) || block == ModBlocks.blockSpectralContainer) + { + boolList[i][j][k - 1] = true; + isReady = false; + } + } + + if (i + 1 <= 2 * range && !boolList[i + 1][j][k]) + { + Block block = world.getBlock(x - range + i + 1, y - range + j, z - range + k); + if (world.isAirBlock(x - range + i + 1, y - range + j, z - range + k) || block == ModBlocks.blockSpectralContainer) + { + boolList[i + 1][j][k] = true; + isReady = false; + } + } + + if (j + 1 <= 2 * range && !boolList[i][j + 1][k]) + { + Block block = world.getBlock(x - range + i, y - range + j + 1, z - range + k); + if (world.isAirBlock(x - range + i, y - range + j + 1, z - range + k) || block == ModBlocks.blockSpectralContainer) + { + boolList[i][j + 1][k] = true; + isReady = false; + } + } + + if (k + 1 <= 2 * range && !boolList[i][j][k + 1]) + { + Block block = world.getBlock(x - range + i, y - range + j, z - range + k + 1); + if (world.isAirBlock(x - range + i, y - range + j, z - range + k + 1) || block == ModBlocks.blockSpectralContainer) + { + boolList[i][j][k + 1] = true; + isReady = false; + } + } } } } @@ -111,13 +148,11 @@ public class RitualEffectEvaporation extends RitualEffect continue; } - BlockPos newPos = pos.add(i - range, j - range, k - range); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); + Block block = world.getBlock(x + i - range, y + j - range, z + k - range); if (block == ModBlocks.blockSpectralContainer) { - world.setBlockToAir(newPos); + world.setBlockToAir(x + i - range, y + j - range, z + k - range); } } } @@ -138,7 +173,7 @@ public class RitualEffectEvaporation extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> ellipsoidRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> ellipsoidRitual = new ArrayList(); ellipsoidRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.DUSK)); ellipsoidRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.DUSK)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java index 0ee1c57e..0452a29e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectExpulsion.java @@ -1,32 +1,30 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.living.EnderTeleportEvent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport; +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.living.EnderTeleportEvent; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; public class RitualEffectExpulsion extends RitualEffect { @@ -40,8 +38,10 @@ public class RitualEffectExpulsion extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); if (currentEssence < this.getCostPerRefresh()) { @@ -53,10 +53,10 @@ public class RitualEffectExpulsion extends RitualEffect int teleportDistance = hasVirtus ? 300 : 100; int range = hasPotentia ? 50 : 25; - List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, range, range); + List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range); boolean flag = false; - TileEntity tile = world.getTileEntity(pos.offsetUp()); + TileEntity tile = world.getTileEntity(x, y + 1, z); IInventory inventoryTile = null; if (tile instanceof IInventory) { @@ -78,7 +78,7 @@ public class RitualEffectExpulsion extends RitualEffect for (int i = 0; i < inventoryTile.getSizeInventory(); i++) { ItemStack stack = inventoryTile.getStackInSlot(i); - if (stack != null && stack.getItem() instanceof IBindable && BindableItems.getOwnerName(stack).equals(playerString)) + if (stack != null && stack.getItem() instanceof IBindable && EnergyItems.getOwnerName(stack).equals(playerString)) { test = true; } @@ -117,7 +117,7 @@ public class RitualEffectExpulsion extends RitualEffect int teleportDistance = hasVirtus ? 300 : 100; int range = hasPotentia ? 50 : 25; - List<EntityLivingBase> livingList = SpellHelper.getLivingEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, range, range); + List<EntityLivingBase> livingList = SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range); boolean flag = false; for (EntityLivingBase livingEntity : livingList) @@ -162,14 +162,14 @@ public class RitualEffectExpulsion extends RitualEffect double z = entityLiving.posZ; Random rand = new Random(); double d0 = x + (rand.nextDouble() - 0.5D) * distance; - double d1 = y + (rand.nextInt((int) distance) - (distance) / 2); + double d1 = y + (double) (rand.nextInt((int) distance) - (distance) / 2); double d2 = z + (rand.nextDouble() - 0.5D) * distance; int i = 0; while (!teleportTo(entityLiving, d0, d1, d2, x, y, z) && i < 100) { d0 = x + (rand.nextDouble() - 0.5D) * distance; - d1 = y + (rand.nextInt((int) distance) - (distance) / 2); + d1 = y + (double) (rand.nextInt((int) distance) - (distance) / 2); d2 = z + (rand.nextDouble() - 0.5D) * distance; i++; } @@ -191,24 +191,23 @@ public class RitualEffectExpulsion extends RitualEffect return false; } + double d3 = lastX; + double d4 = lastY; + double d5 = lastZ; SpellTeleport.moveEntityViaTeleport(entityLiving, event.targetX, event.targetY, event.targetZ); boolean flag = false; - - int i = MathHelper.floor_double(entityLiving.posX); int j = MathHelper.floor_double(entityLiving.posY); int k = MathHelper.floor_double(entityLiving.posZ); int l; -// if (entityLiving.worldObj.blockExists(i, j, k)) + if (entityLiving.worldObj.blockExists(i, j, k)) { boolean flag1 = false; while (!flag1 && j > 0) { - BlockPos newPos = new BlockPos(i, j - 1, k); - IBlockState state = entityLiving.worldObj.getBlockState(newPos); - Block block = state.getBlock(); + Block block = entityLiving.worldObj.getBlock(i, j - 1, k); if (block != null && block.getMaterial().blocksMovement()) { @@ -224,7 +223,7 @@ public class RitualEffectExpulsion extends RitualEffect { SpellTeleport.moveEntityViaTeleport(entityLiving, entityLiving.posX, entityLiving.posY, entityLiving.posZ); - if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.getBoundingBox()).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.getBoundingBox())) + if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.boundingBox)) { flag = true; } @@ -233,7 +232,7 @@ public class RitualEffectExpulsion extends RitualEffect if (!flag) { - SpellTeleport.moveEntityViaTeleport(entityLiving, lastX, lastY, lastZ); + SpellTeleport.moveEntityViaTeleport(entityLiving, d3, d4, d5); return false; } else { @@ -245,10 +244,10 @@ public class RitualEffectExpulsion extends RitualEffect float f = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; float f1 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; float f2 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; - double d7 = lastX + (entityLiving.posX - lastX) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; - double d8 = lastY + (entityLiving.posY - lastY) * d6 + entityLiving.worldObj.rand.nextDouble() * (double) entityLiving.height; - double d9 = lastZ + (entityLiving.posZ - lastZ) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; - entityLiving.worldObj.spawnParticle(EnumParticleTypes.PORTAL, d7, d8, d9, (double) f, (double) f1, (double) f2); + double d7 = d3 + (entityLiving.posX - d3) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; + double d8 = d4 + (entityLiving.posY - d4) * d6 + entityLiving.worldObj.rand.nextDouble() * (double) entityLiving.height; + double d9 = d5 + (entityLiving.posZ - d5) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; + entityLiving.worldObj.spawnParticle("portal", d7, d8, d9, (double) f, (double) f1, (double) f2); } return true; } @@ -258,7 +257,7 @@ public class RitualEffectExpulsion extends RitualEffect { if (entityLiving instanceof EntityPlayer) { - if (entityLiving instanceof EntityPlayerMP) + if (entityLiving != null && entityLiving instanceof EntityPlayerMP) { EntityPlayerMP entityplayermp = (EntityPlayerMP) entityLiving; @@ -270,7 +269,7 @@ public class RitualEffectExpulsion extends RitualEffect { if (entityLiving.isRiding()) { - entityLiving.mountEntity(null); + entityLiving.mountEntity((Entity) null); } entityLiving.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ); } @@ -285,7 +284,7 @@ public class RitualEffectExpulsion extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> expulsionRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> expulsionRitual = new ArrayList(); expulsionRitual.add(new RitualComponent(2, 0, 2, RitualComponent.EARTH)); expulsionRitual.add(new RitualComponent(2, 0, 1, RitualComponent.EARTH)); expulsionRitual.add(new RitualComponent(1, 0, 2, RitualComponent.EARTH)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java index 6b8faa20..a72bc0af 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredEarth.java @@ -1,18 +1,17 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.effect.EntityLightningBolt; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; + +import java.util.ArrayList; +import java.util.List; public class RitualEffectFeatheredEarth extends RitualEffect //Nullifies all fall damage in the area of effect { @@ -28,15 +27,13 @@ public class RitualEffectFeatheredEarth extends RitualEffect //Nullifies all fal String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); if (ritualStone.getCooldown() > 0) { - int x = pos.getX(); - int y = pos.getY(); - int z = pos.getZ(); - world.addWeatherEffect(new EntityLightningBolt(world, x + 4, y + 5, z + 4)); world.addWeatherEffect(new EntityLightningBolt(world, x + 4, y + 5, z - 4)); world.addWeatherEffect(new EntityLightningBolt(world, x - 4, y + 5, z - 4)); @@ -50,11 +47,14 @@ public class RitualEffectFeatheredEarth extends RitualEffect //Nullifies all fal int range = this.getHorizontalRangeForReagent(hasTerrae, hasOrbisTerrae); int verticalRange = hasAether ? 60 : 30; - List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(pos, pos.add(1, 1, 1)).expand(range, verticalRange, range)); + List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1).expand(range, verticalRange, range)); int entityCount = 0; boolean flag = false; - entityCount += entities.size(); + for (EntityLivingBase entity : entities) + { + entityCount++; + } if (currentEssence < this.getCostPerRefresh() * entityCount) { @@ -102,7 +102,7 @@ public class RitualEffectFeatheredEarth extends RitualEffect //Nullifies all fal @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> featheredEarthRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> featheredEarthRitual = new ArrayList(); featheredEarthRitual.add(new RitualComponent(1, 0, 0, RitualComponent.DUSK)); featheredEarthRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.DUSK)); featheredEarthRitual.add(new RitualComponent(0, 0, 1, RitualComponent.DUSK)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java index 39c0e4e7..35df70c8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFeatheredKnife.java @@ -8,7 +8,6 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -29,8 +28,10 @@ public class RitualEffectFeatheredKnife extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); @@ -50,10 +51,9 @@ public class RitualEffectFeatheredKnife extends RitualEffect { for (int k = -10; k <= 10; k++) { - BlockPos newPos = pos.add(i, k, j); - if (world.getTileEntity(newPos) instanceof IBloodAltar) + if (world.getTileEntity(x + i, y + k, z + j) instanceof IBloodAltar) { - tileAltar = (IBloodAltar) world.getTileEntity(newPos); + tileAltar = (IBloodAltar) world.getTileEntity(x + i, y + k, z + j); testFlag = true; } } @@ -69,9 +69,10 @@ public class RitualEffectFeatheredKnife extends RitualEffect double range = hasReductus ? 8 : 15; double vertRange = hasReductus ? 8 : 20; - List<EntityPlayer> list = SpellHelper.getPlayersInRange(world, pos.getX(), pos.getY(), pos.getZ(), range, vertRange); + List<EntityPlayer> list = SpellHelper.getPlayersInRange(world, x + 0.5, y + 0.5, z + 0.5, range, vertRange); int entityCount = 0; + boolean flag = false; if (currentEssence < this.getCostPerRefresh() * list.size()) { @@ -135,7 +136,7 @@ public class RitualEffectFeatheredKnife extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> featheredKnifeRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> featheredKnifeRitual = new ArrayList(); featheredKnifeRitual.add(new RitualComponent(1, 0, 0, RitualComponent.DUSK)); featheredKnifeRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.DUSK)); featheredKnifeRitual.add(new RitualComponent(0, 0, 1, RitualComponent.DUSK)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java index 177d7a7e..705eaf1d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFlight.java @@ -10,7 +10,6 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -28,14 +27,16 @@ public class RitualEffectFlight extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); int range = 20; - int verticalRange = 70; - AxisAlignedBB axis = new AxisAlignedBB(pos, pos.add(1, 1, 1)).expand(range, verticalRange, range); -// axis.maxY = 256; -// axis.minY = 0; + int verticalRange = 30; + AxisAlignedBB axis = AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1).expand(range, verticalRange, range); + axis.maxY = 256; + axis.minY = 0; List<EntityPlayer> entities = world.getEntitiesWithinAABB(EntityPlayer.class, axis); int entityCount = 0; @@ -95,7 +96,7 @@ public class RitualEffectFlight extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> flightRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> flightRitual = new ArrayList(); flightRitual.add(new RitualComponent(1, 0, 0, RitualComponent.DUSK)); flightRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.DUSK)); flightRitual.add(new RitualComponent(0, 0, 1, RitualComponent.DUSK)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java index 2d967606..84bfdd01 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectFullStomach.java @@ -9,7 +9,6 @@ import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.util.FoodStats; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -27,8 +26,10 @@ public class RitualEffectFullStomach extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); if (world.getWorldTime() % 20 != 0) { @@ -38,7 +39,7 @@ public class RitualEffectFullStomach extends RitualEffect double horizRange = 16; double vertRange = 16; - List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, horizRange, vertRange); + List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, x + 0.5, y + 0.5, z + 0.5, horizRange, vertRange); if (playerList == null) { @@ -50,14 +51,14 @@ public class RitualEffectFullStomach extends RitualEffect SoulNetworkHandler.causeNauseaToPlayer(owner); } else { - TileEntity tile = world.getTileEntity(pos.offsetUp()); + TileEntity tile = world.getTileEntity(x, y + 1, z); IInventory inventory = null; if (tile instanceof IInventory) { inventory = (IInventory) tile; } else { - tile = world.getTileEntity(pos.offsetDown()); + tile = world.getTileEntity(x, y - 1, z); if (tile instanceof IInventory) { inventory = (IInventory) tile; @@ -81,8 +82,8 @@ public class RitualEffectFullStomach extends RitualEffect { ItemFood foodItem = (ItemFood) stack.getItem(); - int regularHeal = foodItem.getHealAmount(stack); - float saturatedHeal = foodItem.getSaturationModifier(stack) * regularHeal * 2.0f; + int regularHeal = foodItem.func_150905_g(stack); + float saturatedHeal = foodItem.func_150906_h(stack) * regularHeal * 2.0f; if (saturatedHeal + satLevel <= 20) { @@ -113,7 +114,7 @@ public class RitualEffectFullStomach extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> fullRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> fullRitual = new ArrayList(); fullRitual.add(new RitualComponent(0, 0, 3, RitualComponent.FIRE)); fullRitual.add(new RitualComponent(0, 0, -3, RitualComponent.FIRE)); fullRitual.add(new RitualComponent(3, 0, 0, RitualComponent.FIRE)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java index 3ec289cd..58288c92 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java @@ -1,20 +1,18 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.IGrowable; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.common.IPlantable; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraftforge.common.IPlantable; +import net.minecraft.block.IGrowable; + +import java.util.ArrayList; +import java.util.List; public class RitualEffectGrowth extends RitualEffect { @@ -29,8 +27,10 @@ public class RitualEffectGrowth extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); if (currentEssence < this.getCostPerRefresh() * 9) { @@ -56,8 +56,7 @@ public class RitualEffectGrowth extends RitualEffect { if (this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, false)) { - BlockPos newPos = pos.add(i, 1, j); - if (SpellHelper.hydrateSoil(world, newPos)) + if (SpellHelper.hydrateSoil(world, x + i, y + 1, z + j)) { this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, true); } @@ -73,15 +72,13 @@ public class RitualEffectGrowth extends RitualEffect { for (int j = -range; j <= range; j++) { - BlockPos newPos = pos.add(i, 2, j); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); + Block block = world.getBlock(x + i, y + 2, z + j); if (block instanceof IPlantable || block instanceof IGrowable) { { - SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, world.provider.getDimensionId(), 3, pos); - block.updateTick(world, newPos, state, world.rand); + SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 3, x, y, z); + block.updateTick(world, x + i, y + 2, z + j, world.rand); flag++; } } @@ -111,7 +108,7 @@ public class RitualEffectGrowth extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> growthRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> growthRitual = new ArrayList(); growthRitual.add(new RitualComponent(1, 0, 0, 1)); growthRitual.add(new RitualComponent(-1, 0, 0, 1)); growthRitual.add(new RitualComponent(0, 0, 1, 1)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java index 55307e88..02803953 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java @@ -1,22 +1,20 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; + +import java.util.ArrayList; +import java.util.List; public class RitualEffectHarvest extends RitualEffect { @@ -26,9 +24,10 @@ public class RitualEffectHarvest extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); int maxCount = 100; if (currentEssence < this.getCostPerRefresh() * maxCount) @@ -48,8 +47,7 @@ public class RitualEffectHarvest extends RitualEffect return; } - IBlockState state = world.getBlockState(pos.offsetDown()); - Block block = state.getBlock(); + Block block = world.getBlock(x, y - 1, z); int flag = 0; int range = this.getRadiusForModifierBlock(block); int vertRange = 4; @@ -60,7 +58,7 @@ public class RitualEffectHarvest extends RitualEffect { for (int k = -range; k <= range; k++) { - if (HarvestRegistry.harvestBlock(world, pos.add(i, j, k)) && flag < maxCount) + if (HarvestRegistry.harvestBlock(world, x + i, y + j, z + k) && flag < maxCount) { flag++; } @@ -109,7 +107,7 @@ public class RitualEffectHarvest extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> harvestRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> harvestRitual = new ArrayList(); harvestRitual.add(new RitualComponent(1, 0, 1, RitualComponent.DUSK)); harvestRitual.add(new RitualComponent(1, 0, -1, RitualComponent.DUSK)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java index 8a39075a..c8e45fbe 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java @@ -1,20 +1,19 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; + +import java.util.ArrayList; +import java.util.List; public class RitualEffectHealing extends RitualEffect { @@ -28,8 +27,10 @@ public class RitualEffectHealing extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); int timeDelay = 50; @@ -43,8 +44,9 @@ public class RitualEffectHealing extends RitualEffect int range = 15 * (hasPraesidium ? 3 : 1); int vertRange = 15 * (hasPraesidium ? 3 : 1); - List<EntityLivingBase> list = SpellHelper.getLivingEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, range, vertRange); + List<EntityLivingBase> list = SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, vertRange); int entityCount = 0; + boolean flag = false; for (EntityLivingBase livingEntity : list) { @@ -82,7 +84,7 @@ public class RitualEffectHealing extends RitualEffect if (livingEntity.getHealth() + 0.1f < livingEntity.getMaxHealth()) { PotionEffect effect = livingEntity.getActivePotionEffect(Potion.regeneration); - if (effect == null || (effect.getAmplifier() <= potency && effect.getDuration() <= timeDelay)) + if (effect == null || (effect != null && effect.getAmplifier() <= potency && effect.getDuration() <= timeDelay)) { if (!hasVirtus || (this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false))) { @@ -128,7 +130,7 @@ public class RitualEffectHealing extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> healingRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> healingRitual = new ArrayList(); healingRitual.add(new RitualComponent(4, 0, 0, RitualComponent.AIR)); healingRitual.add(new RitualComponent(5, 0, -1, RitualComponent.AIR)); healingRitual.add(new RitualComponent(5, 0, 1, RitualComponent.AIR)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java index 6a6253dd..0a1b9711 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectInterdiction.java @@ -10,7 +10,6 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -27,8 +26,10 @@ public class RitualEffectInterdiction extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); if (currentEssence < this.getCostPerRefresh()) { @@ -37,7 +38,7 @@ public class RitualEffectInterdiction extends RitualEffect { int d0 = 5; - List<EntityLivingBase> list = SpellHelper.getLivingEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, d0, d0); + List<EntityLivingBase> list = SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, d0, d0); boolean flag = false; boolean hasOffensa = this.canDrainReagent(ritualStone, ReagentRegistry.magicalesReagent, magicalesDrain, false); @@ -47,9 +48,9 @@ public class RitualEffectInterdiction extends RitualEffect { if (!((!hasOffensa && entityLiving instanceof EntityPlayer) && (SpellHelper.getUsername((EntityPlayer) entityLiving).equals(owner)))) { - double xDif = entityLiving.posX - (pos.getX() - 0.5); - double yDif = entityLiving.posY - ((pos.getY() - 0.5) + 1); - double zDif = entityLiving.posZ - (pos.getZ() - 0.5); + double xDif = entityLiving.posX - x; + double yDif = entityLiving.posY - (y + 1); + double zDif = entityLiving.posZ - z; entityLiving.motionX = 0.1 * xDif; entityLiving.motionY = 0.1 * yDif; entityLiving.motionZ = 0.1 * zDif; @@ -77,7 +78,7 @@ public class RitualEffectInterdiction extends RitualEffect int horizontalRadius = 5; int verticalRadius = 5; - List<EntityItem> itemList = world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(pos, pos.add(1, 1, 1)).expand(horizontalRadius, verticalRadius, horizontalRadius)); + List<EntityItem> itemList = world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1).expand(horizontalRadius, verticalRadius, horizontalRadius)); if (itemList != null) { @@ -85,9 +86,9 @@ public class RitualEffectInterdiction extends RitualEffect for (EntityItem entity : itemList) { - double xDif = entity.posX - (pos.getX() - 0.5); - double yDif = entity.posY - ((pos.getY() - 0.5) + 1); - double zDif = entity.posZ - (pos.getZ() - 0.5); + double xDif = entity.posX - x; + double yDif = entity.posY - (y + 1); + double zDif = entity.posZ - z; entity.motionX = 0.1 * xDif; entity.motionY = 0.1 * yDif; entity.motionZ = 0.1 * zDif; @@ -123,7 +124,7 @@ public class RitualEffectInterdiction extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> interdictionRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> interdictionRitual = new ArrayList(); interdictionRitual.add(new RitualComponent(1, 0, 0, 4)); interdictionRitual.add(new RitualComponent(-1, 0, 0, 4)); interdictionRitual.add(new RitualComponent(0, 0, 1, 4)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java index ab737d9b..f8dca42f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java @@ -1,46 +1,55 @@ package WayofTime.alchemicalWizardry.common.rituals; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.Random; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.RoutingFocusParadigm; import WayofTime.alchemicalWizardry.api.RoutingFocusPosAndFacing; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.items.routing.InputRoutingFocus; import WayofTime.alchemicalWizardry.common.items.routing.OutputRoutingFocus; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class RitualEffectItemRouting extends RitualEffect { + Random rand = new Random(); + @Override public void performEffect(IMasterRitualStone ritualStone) { String owner = ritualStone.getOwner(); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); if (world.getWorldTime() % 20 != 0) { return; } - List<IInventory> outputList = new ArrayList<IInventory>(); + Map<Int3, IInventory> tileMap = new HashMap(); + + List<IInventory> outputList = new ArrayList(); for(int i=0; i<4; i++) //Check output foci chests, return if none available { Int3 outputFocusChest = this.getOutputBufferChestLocation(i); - BlockPos newPos = pos.add(outputFocusChest.xCoord, outputFocusChest.yCoord, outputFocusChest.zCoord); - TileEntity outputFocusInv = world.getTileEntity(newPos); + TileEntity outputFocusInv = world.getTileEntity(x + outputFocusChest.xCoord, y + outputFocusChest.yCoord, z + outputFocusChest.zCoord); if(outputFocusInv instanceof IInventory) { outputList.add((IInventory)outputFocusInv); @@ -55,12 +64,12 @@ public class RitualEffectItemRouting extends RitualEffect for(IInventory outputFocusInventory : outputList) { { - OutputRoutingFocus outputFocus; + OutputRoutingFocus outputFocus;; RoutingFocusParadigm parad = new RoutingFocusParadigm(); TileEntity outputChest = null; //Destination - EnumFacing inputDirection; + ForgeDirection inputDirection; { IInventory outputChestInventory = null; @@ -100,9 +109,9 @@ public class RitualEffectItemRouting extends RitualEffect continue; } inputDirection = posAndFacing.facing; - if(outputChest == null || !posAndFacing.location.equals(new Int3(outputChest.getPos()))) + if(outputChest == null || !posAndFacing.location.equals(new Int3(outputChest.xCoord, outputChest.yCoord, outputChest.zCoord))) { - outputChest = world.getTileEntity(new BlockPos(posAndFacing.location.xCoord, posAndFacing.location.yCoord, posAndFacing.location.zCoord)); + outputChest = world.getTileEntity(posAndFacing.location.xCoord, posAndFacing.location.yCoord, posAndFacing.location.zCoord); if(outputChest instanceof IInventory) { outputChestInventory = (IInventory)outputChest; @@ -115,7 +124,7 @@ public class RitualEffectItemRouting extends RitualEffect for(int i=0; i<4; i++) { Int3 inputFocusChest = this.getInputBufferChestLocation(i); - TileEntity inputFocusInv = world.getTileEntity(pos.add(inputFocusChest.xCoord, inputFocusChest.yCoord, inputFocusChest.zCoord)); + TileEntity inputFocusInv = world.getTileEntity(x + inputFocusChest.xCoord, y + inputFocusChest.yCoord, z + inputFocusChest.zCoord); if(inputFocusInv instanceof IInventory) { for(int ji=0; ji<((IInventory) inputFocusInv).getSizeInventory(); ji++) //Iterate through foci inventory @@ -124,15 +133,15 @@ public class RitualEffectItemRouting extends RitualEffect if(inputFocusStack != null && inputFocusStack.getItem() instanceof InputRoutingFocus) { InputRoutingFocus inputFocus = (InputRoutingFocus)inputFocusStack.getItem(); - TileEntity inputChest = world.getTileEntity(new BlockPos(inputFocus.xCoord(inputFocusStack), inputFocus.yCoord(inputFocusStack), inputFocus.zCoord(inputFocusStack))); + TileEntity inputChest = world.getTileEntity(inputFocus.xCoord(inputFocusStack), inputFocus.yCoord(inputFocusStack), inputFocus.zCoord(inputFocusStack)); if(inputChest instanceof IInventory) { IInventory inputChestInventory = (IInventory)inputChest; - EnumFacing syphonDirection = inputFocus.getSetDirection(inputFocusStack); + ForgeDirection syphonDirection = inputFocus.getSetDirection(inputFocusStack); boolean[] canSyphonList = new boolean[inputChestInventory.getSizeInventory()]; if(inputChest instanceof ISidedInventory) { - int[] validSlots = ((ISidedInventory) inputChest).getSlotsForFace(syphonDirection); + int[] validSlots = ((ISidedInventory) inputChest).getAccessibleSlotsFromSide(syphonDirection.ordinal()); for(int in : validSlots) { canSyphonList[in] = true; @@ -150,7 +159,7 @@ public class RitualEffectItemRouting extends RitualEffect if(canSyphonList[ni]) { ItemStack syphonedStack = inputChestInventory.getStackInSlot(ni); //Has a syphoned item linked, next need to find a destination - if(syphonedStack == null || (inputChestInventory instanceof ISidedInventory && !((ISidedInventory)inputChestInventory).canExtractItem(ni, syphonedStack, syphonDirection))) + if(syphonedStack == null || (inputChestInventory instanceof ISidedInventory && !((ISidedInventory)inputChestInventory).canExtractItem(ni, syphonedStack, syphonDirection.ordinal()))) { continue; } @@ -159,7 +168,7 @@ public class RitualEffectItemRouting extends RitualEffect if(parad.doesItemMatch(keyStack, syphonedStack)) { - ItemStack newStack; + ItemStack newStack = null; if(parad.maximumAmount <= 0) { newStack = SpellHelper.insertStackIntoInventory(syphonedStack, outputChestInventory, inputDirection); @@ -172,7 +181,9 @@ public class RitualEffectItemRouting extends RitualEffect continue; } - if(newStack.stackSize <= 0) + int numberSyphoned = size - newStack.stackSize; + + if(newStack != null && newStack.stackSize <= 0) { size = newStack.stackSize; newStack = null; @@ -235,7 +246,7 @@ public class RitualEffectItemRouting extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> omegaRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> omegaRitual = new ArrayList(); this.addCornerRunes(omegaRitual, 1, 0, RitualComponent.BLANK); this.addOffsetRunes(omegaRitual, 2, 1, 0, RitualComponent.FIRE); @@ -245,4 +256,6 @@ public class RitualEffectItemRouting extends RitualEffect return omegaRitual; } + + } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java index 0e5112be..5f0c57cf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemSuction.java @@ -7,9 +7,8 @@ import net.minecraft.entity.item.EntityItem; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; @@ -21,16 +20,20 @@ public class RitualEffectItemSuction extends RitualEffect { public static final int reductusDrain = 1; + public static final int timeDelayMin = 60; + @Override public void performEffect(IMasterRitualStone ritualStone) { String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); - - TileEntity tile = world.getTileEntity(pos.offsetUp()); + World world = ritualStone.getWorld(); + + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); + TileEntity tile = world.getTileEntity(x, y + 1, z); IInventory tileEntity; if (tile instanceof IInventory) @@ -51,7 +54,7 @@ public class RitualEffectItemSuction extends RitualEffect SoulNetworkHandler.causeNauseaToPlayer(owner); } else { - List<EntityItem> itemDropList = SpellHelper.getItemsInRange(world, pos.getX() + 0.5f, pos.getY() + 0.5f, pos.getZ() + 0.5f, 10, 10); + List<EntityItem> itemDropList = SpellHelper.getItemsInRange(world, x + 0.5f, y + 0.5f, z + 0.5f, 10, 10); boolean hasReductus = this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); @@ -59,17 +62,20 @@ public class RitualEffectItemSuction extends RitualEffect if (itemDropList != null) { + int invSize = tileEntity.getSizeInventory(); + for (EntityItem itemEntity : itemDropList) { -// hasReductus = hasReductus && this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); -// if (hasReductus && itemEntity.age < this.timeDelayMin) -// { -// continue; -// } + hasReductus = hasReductus && this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false); + if (hasReductus && itemEntity.age < this.timeDelayMin) + { + continue; + } + ItemStack item = itemEntity.getEntityItem(); ItemStack copyStack = itemEntity.getEntityItem().copy(); int pastAmount = copyStack.stackSize; - ItemStack newStack = SpellHelper.insertStackIntoInventory(copyStack, tileEntity, EnumFacing.DOWN); + ItemStack newStack = SpellHelper.insertStackIntoInventory(copyStack, tileEntity, ForgeDirection.DOWN); if (newStack != null && newStack.stackSize < pastAmount) { @@ -95,6 +101,7 @@ public class RitualEffectItemSuction extends RitualEffect if (count > 0) { SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * Math.min(count, 100)); + return; } } } @@ -108,7 +115,7 @@ public class RitualEffectItemSuction extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> suctionRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> suctionRitual = new ArrayList(); suctionRitual.add(new RitualComponent(2, 0, 0, RitualComponent.AIR)); suctionRitual.add(new RitualComponent(-2, 0, 0, RitualComponent.AIR)); suctionRitual.add(new RitualComponent(0, 0, 2, RitualComponent.AIR)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java index bd77b632..4c6dc431 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectJumping.java @@ -10,7 +10,6 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -18,8 +17,8 @@ import java.util.List; public class RitualEffectJumping extends RitualEffect { - public final int aetherDrain = 10; - public final int terraeDrain = 10; + public static final int aetherDrain = 10; + public static final int terraeDrain = 10; @Override public void performEffect(IMasterRitualStone ritualStone) @@ -27,11 +26,13 @@ public class RitualEffectJumping extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); double range = 0.5; - List<EntityLivingBase> livingList = SpellHelper.getLivingEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 1.5, pos.getZ() + 0.5, range, range); + List<EntityLivingBase> livingList = SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 1.5, z + 0.5, range, range); if (currentEssence < this.getCostPerRefresh() * livingList.size()) { @@ -98,7 +99,7 @@ public class RitualEffectJumping extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> jumpingRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> jumpingRitual = new ArrayList(); for (int i = -1; i <= 1; i++) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java index 030ab73a..8826b267 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLava.java @@ -1,21 +1,5 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -24,6 +8,20 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.block.BlockSpectralContainer; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.potion.PotionEffect; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidHandler; + +import java.util.ArrayList; +import java.util.List; public class RitualEffectLava extends RitualEffect { @@ -39,8 +37,11 @@ public class RitualEffectLava extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); + if (this.canDrainReagent(ritualStone, ReagentRegistry.offensaReagent, offensaDrain, false) && SoulNetworkHandler.canSyphonFromOnlyNetwork(owner, fireFuseCost)) { @@ -48,7 +49,7 @@ public class RitualEffectLava extends RitualEffect boolean drainReductus = world.getWorldTime() % 100 == 0; int range = 5; - List<EntityLivingBase> entityList = SpellHelper.getLivingEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, range, range); + List<EntityLivingBase> entityList = SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range); EntityPlayer player = SpellHelper.getPlayerForUsername(owner); for (EntityLivingBase entity : entityList) @@ -75,11 +76,9 @@ public class RitualEffectLava extends RitualEffect } } - BlockPos newPos = pos.offsetUp(); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); + Block block = world.getBlock(x, y + 1, z); - if (world.isAirBlock(newPos) && !(block instanceof BlockSpectralContainer)) + if (world.isAirBlock(x, y + 1, z) && !(block instanceof BlockSpectralContainer)) { if (currentEssence < this.getCostPerRefresh()) { @@ -88,10 +87,10 @@ public class RitualEffectLava extends RitualEffect { for (int i = 0; i < 10; i++) { - SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, world.provider.getDimensionId(), 3, pos); + SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 3, x, y, z); } - world.setBlockState(newPos, Blocks.lava.getDefaultState()); + world.setBlock(x, y + 1, z, Blocks.lava, 0, 3); SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); } } else @@ -101,13 +100,13 @@ public class RitualEffectLava extends RitualEffect { return; } - TileEntity tile = world.getTileEntity(newPos); + TileEntity tile = world.getTileEntity(x, y + 1, z); if (tile instanceof IFluidHandler) { - int amount = ((IFluidHandler) tile).fill(EnumFacing.DOWN, new FluidStack(FluidRegistry.LAVA, 1000), false); + int amount = ((IFluidHandler) tile).fill(ForgeDirection.DOWN, new FluidStack(FluidRegistry.LAVA, 1000), false); if (amount >= 1000) { - ((IFluidHandler) tile).fill(EnumFacing.DOWN, new FluidStack(FluidRegistry.LAVA, 1000), true); + ((IFluidHandler) tile).fill(ForgeDirection.DOWN, new FluidStack(FluidRegistry.LAVA, 1000), true); this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true); @@ -115,6 +114,8 @@ public class RitualEffectLava extends RitualEffect } } } + + } @Override @@ -126,7 +127,7 @@ public class RitualEffectLava extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> lavaRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> lavaRitual = new ArrayList(); lavaRitual.add(new RitualComponent(1, 0, 0, 2)); lavaRitual.add(new RitualComponent(-1, 0, 0, 2)); lavaRitual.add(new RitualComponent(0, 0, 1, 2)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java index 2774c4fb..baa711cd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLeap.java @@ -10,7 +10,6 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -30,12 +29,14 @@ public class RitualEffectLeap extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); double range = 2.0; - List<EntityLivingBase> livingList = SpellHelper.getLivingEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, range, range); + List<EntityLivingBase> livingList = SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range); if (livingList == null) { @@ -208,7 +209,7 @@ public class RitualEffectLeap extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> leapingRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> leapingRitual = new ArrayList(); leapingRitual.add(new RitualComponent(0, 0, -2, RitualComponent.DUSK)); leapingRitual.add(new RitualComponent(1, 0, -1, RitualComponent.AIR)); leapingRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.AIR)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java index da3b7397..23f39955 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectLifeConduit.java @@ -4,9 +4,8 @@ import java.util.ArrayList; import java.util.List; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; import WayofTime.alchemicalWizardry.AlchemicalWizardry; @@ -25,8 +24,10 @@ public class RitualEffectLifeConduit extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); IBloodAltar tileAltar = null; boolean testFlag = false; @@ -37,10 +38,9 @@ public class RitualEffectLifeConduit extends RitualEffect { for (int k = -10; k <= 10; k++) { - BlockPos newPos = pos.add(i, j, k); - if (world.getTileEntity(newPos) instanceof IBloodAltar) + if (world.getTileEntity(x + i, y + k, z + j) instanceof IBloodAltar) { - tileAltar = (IBloodAltar) world.getTileEntity(newPos); + tileAltar = (IBloodAltar) world.getTileEntity(x + i, y + k, z + j); testFlag = true; } } @@ -61,7 +61,7 @@ public class RitualEffectLifeConduit extends RitualEffect int vertRange = 20; EntityPlayer entityOwner = null; - List<EntityPlayer> list = SpellHelper.getPlayersInRange(world, pos.getX(), pos.getY(), pos.getZ(), d0, vertRange); + List<EntityPlayer> list = SpellHelper.getPlayersInRange(world, x, y, z, d0, vertRange); for (EntityPlayer player : list) { @@ -76,10 +76,10 @@ public class RitualEffectLifeConduit extends RitualEffect return; } - int fillAmount = Math.min(currentEssence / 2, ((IFluidHandler)tileAltar).fill(EnumFacing.UP, new FluidStack(AlchemicalWizardry.lifeEssenceFluid, 10000), false)); + int fillAmount = Math.min(currentEssence / 2, ((IFluidHandler)tileAltar).fill(ForgeDirection.UP, new FluidStack(AlchemicalWizardry.lifeEssenceFluid, 10000), false)); { - ((IFluidHandler)tileAltar).fill(EnumFacing.UP, new FluidStack(AlchemicalWizardry.lifeEssenceFluid, fillAmount), true); + ((IFluidHandler)tileAltar).fill(ForgeDirection.UP, new FluidStack(AlchemicalWizardry.lifeEssenceFluid, fillAmount), true); if (entityOwner.getHealth() > 2.0f && fillAmount != 0) { entityOwner.setHealth(2.0f); @@ -97,7 +97,7 @@ public class RitualEffectLifeConduit extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> conduitRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> conduitRitual = new ArrayList(); conduitRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.FIRE)); conduitRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.FIRE)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java index 8aed0a4c..dd099f52 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectMagnetic.java @@ -8,11 +8,9 @@ import java.util.Map; import net.minecraft.block.Block; import net.minecraft.block.BlockOre; import net.minecraft.block.BlockRedstoneOre; -import net.minecraft.block.state.IBlockState; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.oredict.OreDictionary; import WayofTime.alchemicalWizardry.api.Int3; @@ -68,8 +66,10 @@ public class RitualEffectMagnetic extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); @@ -88,7 +88,9 @@ public class RitualEffectMagnetic extends RitualEffect SoulNetworkHandler.causeNauseaToPlayer(owner); } else { - BlockPos posRep = null; + int xRep = 0; + int yRep = 0; + int zRep = 0; boolean replace = false; outer: @@ -98,10 +100,11 @@ public class RitualEffectMagnetic extends RitualEffect { for (int k = -1; k <= 1; k++) { - BlockPos newPos = pos.add(i, j, k); - if ((!replace) && world.isAirBlock(newPos)) + if ((!replace) && world.isAirBlock(x + i, y + j, z + k)) { - posRep = newPos; + xRep = x + i; + yRep = y + j; + zRep = z + k; replace = true; break outer; } @@ -113,7 +116,7 @@ public class RitualEffectMagnetic extends RitualEffect { Int3 lastPos = this.getLastPosition(ritualStone.getCustomRitualTag()); - int j = pos.getY() - 1; + int j = y - 1; int i = 0; int k = 0; @@ -130,14 +133,13 @@ public class RitualEffectMagnetic extends RitualEffect { while(k <= radius) { - BlockPos newPos = new BlockPos(pos.getX() + i, j, pos.getZ() + k); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); + Block block = world.getBlock(x + i, j, z + k); + int meta = world.getBlockMetadata(x + i, j, z + k); - if (isBlockOre(block, block.getMetaFromState(state))) + if (isBlockOre(block, meta)) { //Allow swapping code. This means the searched block is an ore. - BlockTeleposer.swapBlocks(this, world, world, newPos, posRep); + BlockTeleposer.swapBlocks(this, world, world, x + i, j, z + k, xRep, yRep, zRep); SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); if (hasPotentia) @@ -170,8 +172,9 @@ public class RitualEffectMagnetic extends RitualEffect return; } - j = pos.getY() - 1; + j = y - 1; this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); + return; } } } @@ -203,7 +206,7 @@ public class RitualEffectMagnetic extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> magneticRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> magneticRitual = new ArrayList(); magneticRitual.add(new RitualComponent(1, 0, 1, RitualComponent.EARTH)); magneticRitual.add(new RitualComponent(1, 0, -1, RitualComponent.EARTH)); magneticRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.EARTH)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java index 363e5d6f..15abe3e3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaStalling.java @@ -6,7 +6,6 @@ import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityBeacon; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -26,24 +25,26 @@ public class RitualEffectOmegaStalling extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); if (world.getWorldTime() % 20 != 0) { return; } - TileEntity tile = world.getTileEntity(pos.offsetUp(5)); + TileEntity tile = world.getTileEntity(x, y + 5, z); if(tile instanceof TileEntityBeacon) { - int levels = ((TileEntityBeacon) tile).getField(0); + int levels = ((TileEntityBeacon) tile).getLevels(); if(levels >= 4) { int horizontalRadius = 100; int verticalRadius = 100; - List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, horizontalRadius, verticalRadius); + List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, x + 0.5, y + 0.5, z + 0.5, horizontalRadius, verticalRadius); for(EntityPlayer player : playerList) { @@ -72,7 +73,7 @@ public class RitualEffectOmegaStalling extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> omegaRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> omegaRitual = new ArrayList(); this.addCornerRunes(omegaRitual, 1, 0, RitualComponent.FIRE); this.addOffsetRunes(omegaRitual, 2, 1, 0, RitualComponent.DUSK); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java index 1092ad61..2fe3fd4f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectOmegaTest.java @@ -10,9 +10,8 @@ import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; @@ -41,15 +40,17 @@ public class RitualEffectOmegaTest extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); if (world.getWorldTime() % 200 != 0) { return; } - OmegaStructureParameters param = OmegaStructureHandler.getStructureStabilityFactor(world, pos, 5, new Int3(0,1,0)); + OmegaStructureParameters param = OmegaStructureHandler.getStructureStabilityFactor(world, x, y, z, 5, new Int3(0,1,0)); int stab = param.stability; int enchantability = param.enchantability; int enchantmentLevel = param.enchantmentLevel; @@ -63,20 +64,19 @@ public class RitualEffectOmegaTest extends RitualEffect double range = 0.5; - List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, pos.getX() + 0.5, pos.getY() + 1.5, pos.getZ() + 0.5, range, range); + List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, x + 0.5, y + 1.5, z + 0.5, range, range); Reagent reagent = null; - Map<Reagent, Integer> reagentMap = new HashMap<Reagent, Integer>(); + Map<Reagent, Integer> reagentMap = new HashMap(); for(int i=0; i<4; i++) { Int3 jarLoc = this.getJarLocation(i); - BlockPos newPos = pos.add(jarLoc.xCoord, jarLoc.yCoord, jarLoc.zCoord); - TileEntity tile = world.getTileEntity(newPos); + TileEntity tile = world.getTileEntity(x + jarLoc.xCoord, y + jarLoc.yCoord, z + jarLoc.zCoord); if(tile instanceof IReagentHandler) { IReagentHandler container = (IReagentHandler)tile; - ReagentContainerInfo[] containerInfoArray = container.getContainerInfo(EnumFacing.UP); + ReagentContainerInfo[] containerInfoArray = container.getContainerInfo(ForgeDirection.UP); if(containerInfoArray == null) { continue; @@ -123,7 +123,7 @@ public class RitualEffectOmegaTest extends RitualEffect for(EntityPlayer player : playerList) { OmegaParadigm waterParadigm = OmegaRegistry.getParadigmForReagent(reagent); - if(waterParadigm != null && waterParadigm.convertPlayerArmour(player, pos.getX(), pos.getY(), pos.getZ(), stab, affinity, enchantability, enchantmentLevel)) + if(waterParadigm != null && waterParadigm.convertPlayerArmour(player, x, y, z, stab, affinity, enchantability, enchantmentLevel)) { APISpellHelper.setPlayerCurrentReagentAmount(player, tickDuration); APISpellHelper.setPlayerMaxReagentAmount(player, tickDuration); @@ -133,7 +133,7 @@ public class RitualEffectOmegaTest extends RitualEffect if(!isTesting) { - int drainLeft = drainTotal; + int drainLeft = this.drainTotal; for(int i = 0; i < 4; i++) { if(drainLeft <= 0) @@ -141,17 +141,16 @@ public class RitualEffectOmegaTest extends RitualEffect break; } Int3 jarLoc = this.getJarLocation(i); - BlockPos newPos = pos.add(jarLoc.xCoord, jarLoc.yCoord, jarLoc.zCoord); - TileEntity tile = world.getTileEntity(newPos); + TileEntity tile = world.getTileEntity(x + jarLoc.xCoord, y + jarLoc.yCoord, z + jarLoc.zCoord); if(tile instanceof IReagentHandler) { IReagentHandler container = (IReagentHandler)tile; - ReagentStack drained = container.drain(EnumFacing.UP, new ReagentStack(reagent, drainLeft), true); + ReagentStack drained = container.drain(ForgeDirection.UP, new ReagentStack(reagent, drainLeft), true); if(drained != null) { drainLeft -= drained.amount; - world.markBlockForUpdate(newPos); - world.addWeatherEffect(new EntityLightningBolt(world, newPos.getX(), newPos.getY(), newPos.getZ())); + world.markBlockForUpdate(x + jarLoc.xCoord, y + jarLoc.yCoord, z + jarLoc.zCoord); + world.addWeatherEffect(new EntityLightningBolt(world, x + jarLoc.xCoord, y + jarLoc.yCoord, z + jarLoc.zCoord)); } } } @@ -173,7 +172,7 @@ public class RitualEffectOmegaTest extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> omegaRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> omegaRitual = new ArrayList(); this.addCornerRunes(omegaRitual, 1, 0, RitualComponent.DUSK); this.addCornerRunes(omegaRitual, 2, 0, RitualComponent.DUSK); this.addCornerRunes(omegaRitual, 3, 0, RitualComponent.BLANK); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java index 5cb2deda..396b7779 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSpawnWard.java @@ -1,17 +1,16 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks; import WayofTime.alchemicalWizardry.common.CoordAndRange; +import net.minecraft.world.World; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; public class RitualEffectSpawnWard extends RitualEffect { @@ -21,8 +20,10 @@ public class RitualEffectSpawnWard extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); if (currentEssence < this.getCostPerRefresh()) { @@ -32,38 +33,42 @@ public class RitualEffectSpawnWard extends RitualEffect int horizRange = 32; int vertRange = 32; - int dimension = world.provider.getDimensionId(); + int dimension = world.provider.dimensionId; - if (AlchemicalWizardryEventHooks.respawnMap.containsKey(dimension)) + if (AlchemicalWizardryEventHooks.respawnMap.containsKey(new Integer(dimension))) { - List<CoordAndRange> list = AlchemicalWizardryEventHooks.respawnMap.get(dimension); + List<CoordAndRange> list = AlchemicalWizardryEventHooks.respawnMap.get(new Integer(dimension)); if (list != null) { - if (!list.contains(new CoordAndRange(pos, horizRange, vertRange))) + if (!list.contains(new CoordAndRange(x, y, z, horizRange, vertRange))) { + boolean hasFoundAndRemoved = false; for (CoordAndRange coords : list) { - BlockPos locationPos = coords.getPos(); + int xLocation = coords.xCoord; + int yLocation = coords.yCoord; + int zLocation = coords.zCoord; - if (locationPos.equals(pos)) + if (xLocation == x && yLocation == y && zLocation == z) { list.remove(coords); + hasFoundAndRemoved = true; break; } } - list.add(new CoordAndRange(pos, horizRange, vertRange)); + list.add(new CoordAndRange(x, y, z, horizRange, vertRange)); } } else { - list = new LinkedList<CoordAndRange>(); - list.add(new CoordAndRange(pos, horizRange, vertRange)); - AlchemicalWizardryEventHooks.respawnMap.put(dimension, list); + list = new LinkedList(); + list.add(new CoordAndRange(x, y, z, horizRange, vertRange)); + AlchemicalWizardryEventHooks.respawnMap.put(new Integer(dimension), list); } } else { - List<CoordAndRange> list = new LinkedList<CoordAndRange>(); - list.add(new CoordAndRange(pos, horizRange, vertRange)); - AlchemicalWizardryEventHooks.respawnMap.put(dimension, list); + List<CoordAndRange> list = new LinkedList(); + list.add(new CoordAndRange(x, y, z, horizRange, vertRange)); + AlchemicalWizardryEventHooks.respawnMap.put(new Integer(dimension), list); } @@ -80,7 +85,7 @@ public class RitualEffectSpawnWard extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> wardRitualRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> wardRitualRitual = new ArrayList(); for (int i = 2; i <= 4; i++) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSphereCreator.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSphereCreator.java index 49d79db6..7761f005 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSphereCreator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSphereCreator.java @@ -4,13 +4,11 @@ import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; @@ -33,8 +31,10 @@ public class RitualEffectSphereCreator extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); // boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false); @@ -48,7 +48,7 @@ public class RitualEffectSphereCreator extends RitualEffect SoulNetworkHandler.causeNauseaToPlayer(owner); } else { - TileEntity tile = world.getTileEntity(pos.offsetUp()); + TileEntity tile = world.getTileEntity(x, y+1, z); if(!(tile instanceof IInventory)) { return; @@ -107,8 +107,8 @@ public class RitualEffectSphereCreator extends RitualEffect k = Math.min(radius, Math.max(-radius, lastPos.zCoord)); } - int yP = negYOffset; - int yN = -negYOffset; + int yP = y + negYOffset; + int yN = y - negYOffset; boolean incrementNext = false; @@ -131,25 +131,21 @@ public class RitualEffectSphereCreator extends RitualEffect return; } - BlockPos pPos = pos.add(i, j + yP, k); - BlockPos nPos = pos.add(i, j + yN, k); - - IBlockState state = world.getBlockState(pPos); - Block blk = state.getBlock(); + Block blk = world.getBlock(x + i, yP + j, z + k); - if (world.isAirBlock(nPos) || (!world.isAirBlock(pPos) && !SpellHelper.isBlockFluid(blk))) + if (world.isAirBlock(x + i, yN + j, z + k) || (!world.isAirBlock(x + i, yP + j, z + k) && !SpellHelper.isBlockFluid(blk))) { k++; continue; } - if(BlockTeleposer.swapBlocks(this, world, world, nPos, pPos, false, 2)) + if(BlockTeleposer.swapBlocks(this, world, world, x + i, yN + j, z + k, x + i, yP + j, z + k, false, 2)) { SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); if(this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true)) { - world.setBlockState(nPos, Blocks.dirt.getDefaultState(), 2); + world.setBlock(x + i, yN + j, z + k, Blocks.dirt, 0, 2); } } @@ -170,6 +166,8 @@ public class RitualEffectSphereCreator extends RitualEffect ritualStone.setActive(false); this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k)); + return; + } } @@ -201,7 +199,7 @@ public class RitualEffectSphereCreator extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> magneticRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> magneticRitual = new ArrayList(); magneticRitual.add(new RitualComponent(1, 0, 1, RitualComponent.EARTH)); magneticRitual.add(new RitualComponent(1, 0, -1, RitualComponent.EARTH)); magneticRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.EARTH)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java index 48969c77..94f769d6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonMeteor.java @@ -13,7 +13,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -27,8 +26,10 @@ public class RitualEffectSummonMeteor extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); if (ritualStone.getCooldown() > 0) { @@ -47,7 +48,7 @@ public class RitualEffectSummonMeteor extends RitualEffect entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); } else { - List<EntityItem> entities = world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(pos.offsetUp(), pos.add(1, 2, 1))); + List<EntityItem> entities = world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(x, y + 1, z, x + 1, y + 2, z + 1)); if (entities == null) { @@ -59,7 +60,7 @@ public class RitualEffectSummonMeteor extends RitualEffect if (entityItem != null && MeteorRegistry.isValidParadigmItem(entityItem.getEntityItem())) { int meteorID = MeteorRegistry.getParadigmIDForItem(entityItem.getEntityItem()); - EntityMeteor meteor = new EntityMeteor(world, pos.getX() + 0.5f, 257, pos.getZ() + 0.5f, meteorID); + EntityMeteor meteor = new EntityMeteor(world, x + 0.5f, 257, z + 0.5f, meteorID); meteor.motionY = -1.0f; if (this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, 1000, true)) @@ -103,7 +104,7 @@ public class RitualEffectSummonMeteor extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> meteorRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> meteorRitual = new ArrayList(); meteorRitual.add(new RitualComponent(2, 0, 0, RitualComponent.FIRE)); meteorRitual.add(new RitualComponent(-2, 0, 0, RitualComponent.FIRE)); meteorRitual.add(new RitualComponent(0, 0, 2, RitualComponent.FIRE)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSupression.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSupression.java index dc3150e8..c04b4a2a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSupression.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSupression.java @@ -1,16 +1,5 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; @@ -18,6 +7,15 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +import java.util.ArrayList; +import java.util.List; public class RitualEffectSupression extends RitualEffect { @@ -30,11 +28,12 @@ public class RitualEffectSupression extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); - IBlockState stateish = world.getBlockState(pos.offsetDown()); - Block blockish = stateish.getBlock(); + Block blockish = world.getBlock(x, y - 1, z); boolean hasAquasalus = this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, false); boolean hasAether = this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false); @@ -75,19 +74,16 @@ public class RitualEffectSupression extends RitualEffect { continue; } - - BlockPos newPos = pos.add(i, j, k); - IBlockState state = world.getBlockState(newPos); - - Block block = state.getBlock(); + + Block block = world.getBlock(x + i, y + j, z + k); if (SpellHelper.isBlockFluid(block)) { - TESpectralContainer.createSpectralBlockAtLocation(world, newPos, 3 * masterRadius); + TESpectralContainer.createSpectralBlockAtLocation(world, x + i, y + j, z + k, 3 * masterRadius); } else { - TileEntity tile = world.getTileEntity(newPos); + TileEntity tile = world.getTileEntity(x + i, y + j, z + k); if (tile instanceof TESpectralContainer) { ((TESpectralContainer) tile).resetDuration(3 * masterRadius); @@ -123,7 +119,7 @@ public class RitualEffectSupression extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> supressionRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> supressionRitual = new ArrayList(); supressionRitual.add(new RitualComponent(2, 0, 2, RitualComponent.WATER)); supressionRitual.add(new RitualComponent(2, 0, -2, RitualComponent.WATER)); supressionRitual.add(new RitualComponent(-2, 0, 2, RitualComponent.WATER)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java index 18badc5d..8193dbf4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectUnbinding.java @@ -9,14 +9,13 @@ import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -33,8 +32,10 @@ public class RitualEffectUnbinding extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); if (currentEssence < this.getCostPerRefresh()) { @@ -42,17 +43,13 @@ public class RitualEffectUnbinding extends RitualEffect } else { int d0 = 0; - AxisAlignedBB axisalignedbb = new AxisAlignedBB(pos, pos.add(1, 1, 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 2), (double) (z + 1)).expand(d0, d0, d0); List list = world.getEntitiesWithinAABB(EntityItem.class, axisalignedbb); Iterator iterator = list.iterator(); EntityItem item; boolean drain = false; - int x = pos.getX(); - int y = pos.getY(); - int z = pos.getZ(); - while (iterator.hasNext()) { item = (EntityItem) iterator.next(); @@ -66,14 +63,14 @@ public class RitualEffectUnbinding extends RitualEffect boolean hasSanctus = this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false); if (hasSanctus) { - if (itemStack.getItem() instanceof IBindable && !BindableItems.getOwnerName(itemStack).equals("")) + if (itemStack.getItem() instanceof IBindable && !EnergyItems.getOwnerName(itemStack).equals("")) { world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z - 5)); world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z + 5)); world.addWeatherEffect(new EntityLightningBolt(world, x - 5, y + 1, z)); world.addWeatherEffect(new EntityLightningBolt(world, x + 5, y + 1, z)); - BindableItems.setItemOwner(itemStack, ""); + EnergyItems.setItemOwner(itemStack, ""); this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true); drain = true; ritualStone.setActive(false); @@ -84,7 +81,7 @@ public class RitualEffectUnbinding extends RitualEffect if (itemStack.getItem() == ModItems.boundHelmet) { ritualStone.setVar1(5); - } else if (itemStack.getItem() == ModItems.boundChestplate) + } else if (itemStack.getItem() == ModItems.boundPlate) { ritualStone.setVar1(8); } else if (itemStack.getItem() == ModItems.boundLeggings) @@ -145,7 +142,7 @@ public class RitualEffectUnbinding extends RitualEffect if (world.rand.nextInt(10) == 0) { - SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, world.provider.getDimensionId(), 1, pos); + SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 1, x, y, z); } } @@ -166,7 +163,7 @@ public class RitualEffectUnbinding extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> unbindingRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> unbindingRitual = new ArrayList(); unbindingRitual.add(new RitualComponent(-2, 0, 0, 4)); unbindingRitual.add(new RitualComponent(2, 0, 0, 4)); unbindingRitual.add(new RitualComponent(0, 0, 2, 4)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectVeilOfEvil.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectVeilOfEvil.java index b1efd0e2..f8dc5c70 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectVeilOfEvil.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectVeilOfEvil.java @@ -6,7 +6,6 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks; import WayofTime.alchemicalWizardry.common.CoordAndRange; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import java.util.ArrayList; @@ -21,8 +20,10 @@ public class RitualEffectVeilOfEvil extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); if (currentEssence < this.getCostPerRefresh()) { @@ -32,40 +33,42 @@ public class RitualEffectVeilOfEvil extends RitualEffect int horizRange = 32; int vertRange = 32; - int dimension = world.provider.getDimensionId(); + int dimension = world.provider.dimensionId; - if (AlchemicalWizardryEventHooks.forceSpawnMap.containsKey(dimension)) + if (AlchemicalWizardryEventHooks.forceSpawnMap.containsKey(new Integer(dimension))) { - List<CoordAndRange> list = AlchemicalWizardryEventHooks.forceSpawnMap.get(dimension); + List<CoordAndRange> list = AlchemicalWizardryEventHooks.forceSpawnMap.get(new Integer(dimension)); if (list != null) { - if (!list.contains(new CoordAndRange(pos, horizRange, vertRange))) + if (!list.contains(new CoordAndRange(x, y, z, horizRange, vertRange))) { boolean hasFoundAndRemoved = false; for (CoordAndRange coords : list) { - BlockPos locationPos = coords.getPos(); + int xLocation = coords.xCoord; + int yLocation = coords.yCoord; + int zLocation = coords.zCoord; - if (locationPos.equals(pos)) + if (xLocation == x && yLocation == y && zLocation == z) { list.remove(coords); hasFoundAndRemoved = true; break; } } - list.add(new CoordAndRange(pos, horizRange, vertRange)); + list.add(new CoordAndRange(x, y, z, horizRange, vertRange)); } } else { - list = new LinkedList<CoordAndRange>(); - list.add(new CoordAndRange(pos, horizRange, vertRange)); - AlchemicalWizardryEventHooks.forceSpawnMap.put(dimension, list); + list = new LinkedList(); + list.add(new CoordAndRange(x, y, z, horizRange, vertRange)); + AlchemicalWizardryEventHooks.forceSpawnMap.put(new Integer(dimension), list); } } else { - List<CoordAndRange> list = new LinkedList<CoordAndRange>(); - list.add(new CoordAndRange(pos, horizRange, vertRange)); - AlchemicalWizardryEventHooks.forceSpawnMap.put(dimension, list); + List<CoordAndRange> list = new LinkedList(); + list.add(new CoordAndRange(x, y, z, horizRange, vertRange)); + AlchemicalWizardryEventHooks.forceSpawnMap.put(new Integer(dimension), list); } @@ -82,7 +85,7 @@ public class RitualEffectVeilOfEvil extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> veilRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> veilRitual = new ArrayList(); veilRitual.add(new RitualComponent(1, 0, 2, RitualComponent.DUSK)); veilRitual.add(new RitualComponent(2, 0, 1, RitualComponent.DUSK)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java index 87e19084..95e68c3e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWater.java @@ -1,22 +1,5 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.potion.PotionEffect; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -25,6 +8,21 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.block.BlockSpectralContainer; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.potion.PotionEffect; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidHandler; + +import java.util.ArrayList; +import java.util.List; public class RitualEffectWater extends RitualEffect { @@ -39,8 +37,10 @@ public class RitualEffectWater extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); boolean hasCrystallos = this.canDrainReagent(ritualStone, ReagentRegistry.crystallosReagent, crystallosDrain, false); boolean hasAquasalus = this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, false); @@ -57,8 +57,7 @@ public class RitualEffectWater extends RitualEffect { for (int k = -hydrationRange; k <= hydrationRange; k++) { - BlockPos newPos = pos.add(i, j, k); - if (SpellHelper.hydrateSoil(world, newPos)) + if (SpellHelper.hydrateSoil(world, x + i, y + j, z + k)) { this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, true); } @@ -73,7 +72,7 @@ public class RitualEffectWater extends RitualEffect boolean drainReductus = world.getWorldTime() % 100 == 0; int range = 10; - List<Entity> list = SpellHelper.getEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, range, range); + List<Entity> list = SpellHelper.getEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range); for (Entity entity : list) { if (entity instanceof EntityLivingBase) @@ -107,11 +106,9 @@ public class RitualEffectWater extends RitualEffect } } - BlockPos newPos = pos.offsetUp(); - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); + Block block = world.getBlock(x, y + 1, z); - if (world.isAirBlock(newPos) && !(block instanceof BlockSpectralContainer)) + if (world.isAirBlock(x, y + 1, z) && !(block instanceof BlockSpectralContainer)) { if (currentEssence < this.getCostPerRefresh()) { @@ -120,10 +117,10 @@ public class RitualEffectWater extends RitualEffect { for (int i = 0; i < 10; i++) { - SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, world.provider.getDimensionId(), 3, pos); + SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 3, x, y, z); } - world.setBlockState(newPos, Blocks.water.getDefaultState()); + world.setBlock(x, y + 1, z, Blocks.water, 0, 3); SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh()); } } else @@ -133,13 +130,13 @@ public class RitualEffectWater extends RitualEffect { return; } - TileEntity tile = world.getTileEntity(newPos); + TileEntity tile = world.getTileEntity(x, y + 1, z); if (tile instanceof IFluidHandler) { - int amount = ((IFluidHandler) tile).fill(EnumFacing.DOWN, new FluidStack(FluidRegistry.WATER, 1000), false); + int amount = ((IFluidHandler) tile).fill(ForgeDirection.DOWN, new FluidStack(FluidRegistry.WATER, 1000), false); if (amount >= 1000) { - ((IFluidHandler) tile).fill(EnumFacing.DOWN, new FluidStack(FluidRegistry.WATER, 1000), true); + ((IFluidHandler) tile).fill(ForgeDirection.DOWN, new FluidStack(FluidRegistry.WATER, 1000), true); this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true); @@ -162,13 +159,12 @@ public class RitualEffectWater extends RitualEffect if (hasCrystallos) { boolean success = false; - newPos = pos.add(i, j, k); - if (!world.isAirBlock(newPos) && SpellHelper.freezeWaterBlock(world, newPos)) + if (!world.isAirBlock(x + i, y + j, z + k) && SpellHelper.freezeWaterBlock(world, x + i, y + j, z + k)) { success = true; } else { - if (world.rand.nextInt(100) == 0 && world.isSideSolid(newPos, EnumFacing.UP)) + if (world.rand.nextInt(100) == 0 && world.isSideSolid(x + i, y + j - 1, z + k, ForgeDirection.UP)) { success = true; } @@ -193,7 +189,7 @@ public class RitualEffectWater extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> waterRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> waterRitual = new ArrayList(); waterRitual.add(new RitualComponent(-1, 0, 1, 1)); waterRitual.add(new RitualComponent(-1, 0, -1, 1)); waterRitual.add(new RitualComponent(1, 0, -1, 1)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java index 365e40b7..f7ef0e5b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java @@ -1,14 +1,5 @@ package WayofTime.alchemicalWizardry.common.rituals; -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; @@ -16,6 +7,14 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; + +import java.util.ArrayList; +import java.util.List; public class RitualEffectWellOfSuffering extends RitualEffect { @@ -32,10 +31,12 @@ public class RitualEffectWellOfSuffering extends RitualEffect String owner = ritualStone.getOwner(); int currentEssence = SoulNetworkHandler.getCurrentEssence(owner); - World world = ritualStone.getWorldObj(); - BlockPos pos = ritualStone.getPosition(); + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); - if (world.getWorldTime() % timeDelay != 0) + if (world.getWorldTime() % this.timeDelay != 0) { return; } @@ -49,10 +50,9 @@ public class RitualEffectWellOfSuffering extends RitualEffect { for (int k = -10; k <= 10; k++) { - BlockPos newPos = pos.add(i, j, k); - if (world.getTileEntity(newPos) instanceof IBloodAltar) + if (world.getTileEntity(x + i, y + k, z + j) instanceof IBloodAltar) { - tileAltar = (IBloodAltar) world.getTileEntity(newPos); + tileAltar = (IBloodAltar) world.getTileEntity(x + i, y + k, z + j); testFlag = true; } } @@ -68,7 +68,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect int d0 = 10; int vertRange = hasPotentia ? 20 : 10; - AxisAlignedBB axisalignedbb = new AxisAlignedBB(pos, pos.add(1, 1, 1)).expand(d0, vertRange, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) x, (double) y, (double) z, (double) (x + 1), (double) (y + 1), (double) (z + 1)).expand(d0, vertRange, d0); List<EntityLivingBase> list = world.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); int entityCount = 0; @@ -95,7 +95,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect entityCount++; - tileAltar.sacrificialDaggerCall(amount * (hasTennebrae ? 2 : 1) * (hasOffensa ? 2 : 1), true); + tileAltar.sacrificialDaggerCall(this.amount * (hasTennebrae ? 2 : 1) * (hasOffensa ? 2 : 1), true); } } @@ -117,7 +117,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect @Override public List<RitualComponent> getRitualComponentList() { - ArrayList<RitualComponent> wellOfSufferingRitual = new ArrayList<RitualComponent>(); + ArrayList<RitualComponent> wellOfSufferingRitual = new ArrayList(); wellOfSufferingRitual.add(new RitualComponent(1, 0, 1, RitualComponent.FIRE)); wellOfSufferingRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.FIRE)); wellOfSufferingRitual.add(new RitualComponent(1, 0, -1, RitualComponent.FIRE)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicIgnMeta.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicIgnMeta.java index 2dd2077b..7fb2f489 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicIgnMeta.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicIgnMeta.java @@ -8,6 +8,6 @@ public class RoutingFocusLogicIgnMeta extends RoutingFocusLogic @Override public boolean getDefaultMatch(ItemStack keyStack, ItemStack checkedStack) { - return keyStack != null && checkedStack != null && keyStack.getItem() == checkedStack.getItem(); + return (keyStack != null ? checkedStack != null && keyStack.getItem() == checkedStack.getItem() : false); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimit.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimit.java index ad1aed90..26fb3495 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicLimit.java @@ -5,7 +5,6 @@ import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; public class RoutingFocusLogicLimit extends RoutingFocusLogic implements ILimitingLogic { - @Override public int getRoutingLimit() { return 0; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicModItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicModItems.java index c5f9d035..dd37a1ac 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicModItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/routing/RoutingFocusLogicModItems.java @@ -2,8 +2,8 @@ package WayofTime.alchemicalWizardry.common.routing; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.registry.GameData; import WayofTime.alchemicalWizardry.api.RoutingFocusLogic; +import cpw.mods.fml.common.registry.GameData; public class RoutingFocusLogicModItems extends RoutingFocusLogic { @@ -22,7 +22,7 @@ public class RoutingFocusLogicModItems extends RoutingFocusLogic public String getModID(Item itm) { - String str = (String) GameData.getItemRegistry().getNameForObject(itm); + String str = GameData.getItemRegistry().getNameForObject(itm); if(!str.isEmpty()) { String[] strs = str.split(":"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifier.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifier.java deleted file mode 100644 index 36754656..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifier.java +++ /dev/null @@ -1,21 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex; - -public class SpellModifier -{ - public static final int DEFAULT = 0; - public static final int OFFENSIVE = 1; - public static final int DEFENSIVE = 2; - public static final int ENVIRONMENTAL = 3; - - private int modifier; - - protected SpellModifier(int modifier) - { - this.modifier = modifier; - } - - public int getModifier() - { - return this.modifier; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefault.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefault.java deleted file mode 100644 index 771ca1ce..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefault.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex; - -public class SpellModifierDefault extends SpellModifier -{ - public SpellModifierDefault() - { - super(SpellModifier.DEFAULT); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefensive.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefensive.java deleted file mode 100644 index 29d89007..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierDefensive.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex; - -public class SpellModifierDefensive extends SpellModifier -{ - public SpellModifierDefensive() - { - super(SpellModifier.DEFENSIVE); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierEnvironmental.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierEnvironmental.java deleted file mode 100644 index f805dfca..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierEnvironmental.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex; - -public class SpellModifierEnvironmental extends SpellModifier -{ - public SpellModifierEnvironmental() - { - super(SpellModifier.ENVIRONMENTAL); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierOffensive.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierOffensive.java deleted file mode 100644 index 5d956e3f..00000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/SpellModifierOffensive.java +++ /dev/null @@ -1,9 +0,0 @@ -package WayofTime.alchemicalWizardry.common.spell.complex; - -public class SpellModifierOffensive extends SpellModifier -{ - public SpellModifierOffensive() - { - super(SpellModifier.OFFENSIVE); - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java index 7e040efe..e11b898e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect; +import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Random; @@ -7,7 +8,6 @@ import java.util.regex.Pattern; import net.minecraft.block.Block; import net.minecraft.block.BlockLiquid; -import net.minecraft.block.state.IBlockState; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentProtection; import net.minecraft.entity.Entity; @@ -34,16 +34,14 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; import net.minecraft.server.management.ServerConfigurationManager; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumParticleTypes; +import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraft.world.WorldServer; import net.minecraftforge.common.util.FakePlayer; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.IFluidBlock; -import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.oredict.OreDictionary; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles; @@ -53,34 +51,39 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.spell.APISpellHelper; import WayofTime.alchemicalWizardry.common.NewPacketHandler; import WayofTime.alchemicalWizardry.common.items.sigil.SigilDivination; +import cpw.mods.fml.common.FMLCommonHandler; -public class SpellHelper extends APISpellHelper +public class SpellHelper { public static Random rand = new Random(); public static final double root2 = Math.sqrt(2); public static boolean canEntityBeSeen(Entity entity, Entity entity2) { - return entity.worldObj.rayTraceBlocks(new Vec3(entity.posX, entity.posY, entity.posZ), new Vec3(entity2.posX, entity2.posY, entity2.posZ), false) == null; + return entity.worldObj.rayTraceBlocks(SpellHelper.createVec3(entity.posX, entity.posY, entity.posZ), SpellHelper.createVec3(entity2.posX, entity2.posY, entity2.posZ), false) == null; + } + + public static Vec3 createVec3(double x, double y, double z) + { + return APISpellHelper.createVec3(x, y, z); } - public static void smeltBlockInWorld(World world, BlockPos pos) + public static void smeltBlockInWorld(World world, int posX, int posY, int posZ) { - FurnaceRecipes recipes = FurnaceRecipes.instance(); + FurnaceRecipes recipes = FurnaceRecipes.smelting(); - IBlockState state = world.getBlockState(pos); - Block block = state.getBlock(); + Block block = world.getBlock(posX, posY, posZ); if (block == null) { return; } - int meta = block.getMetaFromState(state); - + int meta = world.getBlockMetadata(posX, posY, posZ); + ItemStack smeltedStack = recipes.getSmeltingResult(new ItemStack(block, 1, meta)); if (smeltedStack != null && smeltedStack.getItem() instanceof ItemBlock) { - world.setBlockState(pos, ((ItemBlock) (smeltedStack.getItem())).block.getStateFromMeta(smeltedStack.getItemDamage()), 3); + world.setBlock(posX, posY, posZ, ((ItemBlock) (smeltedStack.getItem())).field_150939_a, smeltedStack.getItemDamage(), 3); } } @@ -139,22 +142,22 @@ public class SpellHelper extends APISpellHelper public static List<Entity> getEntitiesInRange(World world, double posX, double posY, double posZ, double horizontalRadius, double verticalRadius) { - return world.getEntitiesWithinAABB(Entity.class, new AxisAlignedBB(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius)); + return world.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius)); } public static List<EntityLivingBase> getLivingEntitiesInRange(World world, double posX, double posY, double posZ, double horizontalRadius, double verticalRadius) { - return world.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius)); + return world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius)); } public static List<EntityItem> getItemsInRange(World world, double posX, double posY, double posZ, double horizontalRadius, double verticalRadius) { - return world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius)); + return world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius)); } public static List<EntityPlayer> getPlayersInRange(World world, double posX, double posY, double posZ, double horizontalRadius, double verticalRadius) { - return world.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius)); + return world.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius)); } public static double gaussian(double d) @@ -162,54 +165,62 @@ public class SpellHelper extends APISpellHelper return d * ((rand.nextFloat() - 0.5D)); } - public static EnumFacing getDirectionForLookVector(Vec3 lookVec) + public static Vec3 getEntityBlockVector(Entity entity) + { + int posX = (int) Math.round(entity.posX - 0.5f); + int posY = (int) entity.posY; + int posZ = (int) Math.round(entity.posZ - 0.5f); + + return entity.getLookVec().createVectorHelper(posX, posY, posZ); + } + + public static ForgeDirection getDirectionForLookVector(Vec3 lookVec) { double distance = lookVec.lengthVector(); if (lookVec.yCoord > distance * 0.9) { - return EnumFacing.UP; + return ForgeDirection.UP; } if (lookVec.yCoord < distance * -0.9) { - return EnumFacing.DOWN; + return ForgeDirection.DOWN; } return getCompassDirectionForLookVector(lookVec); } - public static EnumFacing getCompassDirectionForLookVector(Vec3 lookVec) + public static ForgeDirection getCompassDirectionForLookVector(Vec3 lookVec) { double radius = Math.sqrt(Math.pow(lookVec.xCoord, 2) + Math.pow(lookVec.zCoord, 2)); if (lookVec.zCoord > radius * 1 / root2) { - return EnumFacing.SOUTH; + return ForgeDirection.SOUTH; } if (lookVec.zCoord < -radius * 1 / root2) { - return EnumFacing.NORTH; + return ForgeDirection.NORTH; } if (lookVec.xCoord > radius * 1 / root2) { - return EnumFacing.EAST; + return ForgeDirection.EAST; } if (lookVec.xCoord < -radius * 1 / root2) { - return EnumFacing.WEST; + return ForgeDirection.WEST; } - return EnumFacing.EAST; + return ForgeDirection.EAST; } - public static boolean freezeWaterBlock(World world, BlockPos pos) + public static boolean freezeWaterBlock(World world, int posX, int posY, int posZ) { - IBlockState state = world.getBlockState(pos); - Block block = state.getBlock(); + Block block = world.getBlock(posX, posY, posZ); if (block == Blocks.water || block == Blocks.flowing_water) { - world.setBlockState(pos, Blocks.ice.getDefaultState()); + world.setBlock(posX, posY, posZ, Blocks.ice); return true; } @@ -226,11 +237,11 @@ public class SpellHelper extends APISpellHelper return SoulNetworkHandler.getPlayerForUsername(str); } - public static void sendParticleToPlayer(EntityPlayer player, EnumParticleTypes type, double xCoord, double yCoord, double zCoord, double xVel, double yVel, double zVel) + public static void sendParticleToPlayer(EntityPlayer player, String str, double xCoord, double yCoord, double zCoord, double xVel, double yVel, double zVel) { if (player instanceof EntityPlayerMP) { - NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getParticlePacket(type, xCoord, yCoord, zCoord, xVel, yVel, zVel), (EntityPlayerMP) player); + NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getParticlePacket(str, xCoord, yCoord, zCoord, xVel, yVel, zVel), (EntityPlayerMP) player); } } @@ -239,13 +250,13 @@ public class SpellHelper extends APISpellHelper switch (index) { case 1: - SpellHelper.sendParticleToPlayer(player, EnumParticleTypes.SPELL_MOB, xCoord + 0.5D + rand.nextGaussian() / 8, yCoord + 1.1D, zCoord + 0.5D + rand.nextGaussian() / 8, 0.5117D, 0.0117D, 0.0117D); + SpellHelper.sendParticleToPlayer(player, "mobSpell", xCoord + 0.5D + rand.nextGaussian() / 8, yCoord + 1.1D, zCoord + 0.5D + rand.nextGaussian() / 8, 0.5117D, 0.0117D, 0.0117D); break; case 2: - SpellHelper.sendParticleToPlayer(player, EnumParticleTypes.REDSTONE, xCoord + 0.5D + rand.nextGaussian() / 8, yCoord + 1.1D, zCoord + 0.5D + rand.nextGaussian() / 8, 0.82D, 0.941D, 0.91D); + SpellHelper.sendParticleToPlayer(player, "reddust", xCoord + 0.5D + rand.nextGaussian() / 8, yCoord + 1.1D, zCoord + 0.5D + rand.nextGaussian() / 8, 0.82D, 0.941D, 0.91D); break; case 3: - SpellHelper.sendParticleToPlayer(player, EnumParticleTypes.SPELL_MOB, xCoord + 0.5D + rand.nextGaussian() / 8, yCoord + 1.1D, zCoord + 0.5D + rand.nextGaussian() / 8, 1.0D, 0.371D, 0.371D); + SpellHelper.sendParticleToPlayer(player, "mobSpell", xCoord + 0.5D + rand.nextGaussian() / 8, yCoord + 1.1D, zCoord + 0.5D + rand.nextGaussian() / 8, 1.0D, 0.371D, 0.371D); break; case 4: float f = 1.0F; @@ -255,13 +266,13 @@ public class SpellHelper extends APISpellHelper for (int l = 0; l < 8; ++l) { - SpellHelper.sendParticleToPlayer(player, EnumParticleTypes.REDSTONE, xCoord + Math.random() - Math.random(), yCoord + Math.random() - Math.random(), zCoord + Math.random() - Math.random(), f1, f2, f3); + SpellHelper.sendParticleToPlayer(player, "reddust", xCoord + Math.random() - Math.random(), yCoord + Math.random() - Math.random(), zCoord + Math.random() - Math.random(), f1, f2, f3); } break; } } - public static void sendParticleToAllAround(World world, double xPos, double yPos, double zPos, int radius, int dimension, EnumParticleTypes type, double xCoord, double yCoord, double zCoord, double xVel, double yVel, double zVel) + public static void sendParticleToAllAround(World world, double xPos, double yPos, double zPos, int radius, int dimension, String str, double xCoord, double yCoord, double zCoord, double xVel, double yVel, double zVel) { List<EntityPlayer> entities = SpellHelper.getPlayersInRange(world, xPos, yPos, zPos, radius, radius); @@ -272,7 +283,7 @@ public class SpellHelper extends APISpellHelper for (EntityPlayer player : entities) { - SpellHelper.sendParticleToPlayer(player, type, xCoord, yCoord, zCoord, xVel, yVel, zVel); + SpellHelper.sendParticleToPlayer(player, str, xCoord, yCoord, zCoord, xVel, yVel, zVel); } } @@ -290,12 +301,7 @@ public class SpellHelper extends APISpellHelper SpellHelper.sendIndexedParticleToPlayer(player, index, xCoord, yCoord, zCoord); } } - - public static void sendIndexedParticleToAllAround(World world, BlockPos pos1, int radius, int dimension, int index, BlockPos coordPos) - { - sendIndexedParticleToAllAround(world, pos1.getX(), pos1.getY(), pos1.getZ(), radius, dimension, index, coordPos.getX(), coordPos.getY(), coordPos.getZ()); - } - + public static void setPlayerSpeedFromServer(EntityPlayer player, double motionX, double motionY, double motionZ) { if (player instanceof EntityPlayerMP) @@ -315,20 +321,19 @@ public class SpellHelper extends APISpellHelper return player instanceof FakePlayer || FAKE_PLAYER_PATTERN.matcher(SpellHelper.getUsername(player)).matches(); } - public static void smashBlock(World world, BlockPos pos) + public static void smashBlock(World world, int posX, int posY, int posZ) { - IBlockState state = world.getBlockState(pos); - Block block = state.getBlock(); + Block block = world.getBlock(posX, posY, posZ); if (block == Blocks.stone) { - world.setBlockState(pos, Blocks.cobblestone.getDefaultState()); + world.setBlock(posX, posY, posZ, Blocks.cobblestone); } else if (block == Blocks.cobblestone) { - world.setBlockState(pos, Blocks.gravel.getDefaultState()); + world.setBlock(posX, posY, posZ, Blocks.gravel); } else if (block == Blocks.gravel) { - world.setBlockState(pos, Blocks.sand.getDefaultState()); + world.setBlock(posX, posY, posZ, Blocks.sand); } } @@ -337,60 +342,69 @@ public class SpellHelper extends APISpellHelper return block instanceof IFluidBlock || block instanceof BlockLiquid; } - public static void evaporateWaterBlock(World world, BlockPos pos) + public static void evaporateWaterBlock(World world, int posX, int posY, int posZ) { - IBlockState state = world.getBlockState(pos); - Block block = state.getBlock(); + Block block = world.getBlock(posX, posY, posZ); if (block == Blocks.water || block == Blocks.flowing_water) { - world.setBlockToAir(pos); + world.setBlockToAir(posX, posY, posZ); } } public static ItemStack getDustForOre(ItemStack item) { - int [] oreIds = OreDictionary.getOreIDs(item); - - for(int id : oreIds) - { - String oreName = OreDictionary.getOreName(id); - - if (oreName.contains("ore")) + String oreName = OreDictionary.getOreName(OreDictionary.getOreID(item)); + + if (oreName.contains("ore")) + { + String lowercaseOre = oreName.toLowerCase(); + boolean isAllowed = false; + + for (String str : AlchemicalWizardry.allowedCrushedOresArray) { - String lowercaseOre = oreName.toLowerCase(); - boolean isAllowed = false; + String testStr = str.toLowerCase(); - for (String str : AlchemicalWizardry.allowedCrushedOresArray) + if (lowercaseOre.contains(testStr)) { - String testStr = str.toLowerCase(); - - if (lowercaseOre.contains(testStr)) - { - isAllowed = true; - break; - } - } - - if (!isAllowed) - { - return null; - } - - String dustName = oreName.replace("ore", "dust"); - - List<ItemStack> items = OreDictionary.getOres(dustName); - - if (items != null && items.size() >= 1) - { - return (items.get(0).copy()); + isAllowed = true; + break; } } - } + + if (!isAllowed) + { + return null; + } + + String dustName = oreName.replace("ore", "dust"); + + ArrayList<ItemStack> items = OreDictionary.getOres(dustName); + + if (items != null && items.size() >= 1) + { + return (items.get(0).copy()); + } + } return null; } + public static List<ItemStack> getItemsFromBlock(World world, Block block, int x, int y, int z, int meta, boolean silkTouch, int fortune) + { + return APISpellHelper.getItemsFromBlock(world, block, x, y, z, meta, silkTouch, fortune); + } + + public static void spawnItemListInWorld(List<ItemStack> items, World world, float x, float y, float z) + { + APISpellHelper.spawnItemListInWorld(items, world, x, y, z); + } + + public static MovingObjectPosition raytraceFromEntity(World world, Entity player, boolean par3, double range) + { + return APISpellHelper.raytraceFromEntity(world, player, par3, range); + } + public static String getNumeralForInt(int num) { switch (num) @@ -509,7 +523,7 @@ public class SpellHelper extends APISpellHelper return returned; } - public static ItemStack insertStackIntoInventory(ItemStack stack, IInventory inventory, EnumFacing dir) + public static ItemStack insertStackIntoInventory(ItemStack stack, IInventory inventory, ForgeDirection dir) { if (stack == null) { @@ -520,10 +534,10 @@ public class SpellHelper extends APISpellHelper if(inventory instanceof ISidedInventory) { - int[] array = ((ISidedInventory)inventory).getSlotsForFace(dir); + int[] array = ((ISidedInventory)inventory).getAccessibleSlotsFromSide(dir.ordinal()); for(int in : array) { - canBeInserted[in] = inventory.isItemValidForSlot(in, stack) && ((ISidedInventory)inventory).canInsertItem(in, stack, dir); + canBeInserted[in] = inventory.isItemValidForSlot(in, stack) && ((ISidedInventory)inventory).canInsertItem(in, stack, dir.ordinal()); } }else { @@ -554,12 +568,12 @@ public class SpellHelper extends APISpellHelper } - public static boolean canInsertStackFullyIntoInventory(ItemStack stack, IInventory inventory, EnumFacing dir) + public static boolean canInsertStackFullyIntoInventory(ItemStack stack, IInventory inventory, ForgeDirection dir) { return canInsertStackFullyIntoInventory(stack, inventory, dir, false, 0); } - public static boolean canInsertStackFullyIntoInventory(ItemStack stack, IInventory inventory, EnumFacing dir, boolean fillToLimit, int limit) + public static boolean canInsertStackFullyIntoInventory(ItemStack stack, IInventory inventory, ForgeDirection dir, boolean fillToLimit, int limit) { if (stack == null) { @@ -572,10 +586,10 @@ public class SpellHelper extends APISpellHelper if(inventory instanceof ISidedInventory) { - int[] array = ((ISidedInventory)inventory).getSlotsForFace(dir); + int[] array = ((ISidedInventory)inventory).getAccessibleSlotsFromSide(dir.ordinal()); for(int in : array) { - canBeInserted[in] = inventory.isItemValidForSlot(in, stack) && ((ISidedInventory)inventory).canInsertItem(in, stack, dir); + canBeInserted[in] = inventory.isItemValidForSlot(in, stack) && ((ISidedInventory)inventory).canInsertItem(in, stack, dir.ordinal()); } }else { @@ -639,7 +653,7 @@ public class SpellHelper extends APISpellHelper return false; } - public static ItemStack insertStackIntoInventory(ItemStack stack, IInventory inventory, EnumFacing dir, int limit) + public static ItemStack insertStackIntoInventory(ItemStack stack, IInventory inventory, ForgeDirection dir, int limit) { if (stack == null) { @@ -650,10 +664,10 @@ public class SpellHelper extends APISpellHelper if(inventory instanceof ISidedInventory) { - int[] array = ((ISidedInventory)inventory).getSlotsForFace(dir); + int[] array = ((ISidedInventory)inventory).getAccessibleSlotsFromSide(dir.ordinal()); for(int in : array) { - canBeInserted[in] = ((ISidedInventory)inventory).canInsertItem(in, stack, dir); + canBeInserted[in] = ((ISidedInventory)inventory).canInsertItem(in, stack, dir.ordinal()); } }else { @@ -711,13 +725,13 @@ public class SpellHelper extends APISpellHelper return stack; } - public static int getNumberOfItemsInInventory(IInventory inventory, EnumFacing dir) + public static int getNumberOfItemsInInventory(IInventory inventory, ForgeDirection dir) { boolean[] canBeInserted = new boolean[inventory.getSizeInventory()]; if(inventory instanceof ISidedInventory) { - int[] array = ((ISidedInventory)inventory).getSlotsForFace(dir); + int[] array = ((ISidedInventory)inventory).getAccessibleSlotsFromSide(dir.ordinal()); for(int in : array) { canBeInserted[in] = true; @@ -748,13 +762,12 @@ public class SpellHelper extends APISpellHelper return amountOfItems; } - public static boolean hydrateSoil(World world, BlockPos pos) + public static boolean hydrateSoil(World world, int x, int y, int z) { - IBlockState state = world.getBlockState(pos); - Block block = state.getBlock(); - if (block == Blocks.dirt || block == Blocks.grass || (block == Blocks.farmland && block.getMetaFromState(state) == 0)) + Block block = world.getBlock(x, y, z); + if (block == Blocks.dirt || block == Blocks.grass || (block == Blocks.farmland && world.getBlockMetadata(x, y, z) == 0)) { - world.setBlockState(pos, Blocks.farmland.getStateFromMeta(7), 2); + world.setBlock(x, y, z, Blocks.farmland, 15, 2); return true; } @@ -813,8 +826,8 @@ public class SpellHelper extends APISpellHelper ServerConfigurationManager config = player.mcServer.getConfigurationManager(); oldWorld.playSoundEffect(player.posX, player.posY, player.posZ, "mob.endermen.portal", 1.0F, 1.0F); player.closeScreen(); - player.dimension = newWorldServer.provider.getDimensionId(); - player.playerNetServerHandler.sendPacket(new S07PacketRespawn(player.dimension, player.worldObj.getDifficulty(), newWorldServer.getWorldInfo().getTerrainType(), player.theItemInWorldManager.getGameType())); + player.dimension = newWorldServer.provider.dimensionId; + player.playerNetServerHandler.sendPacket(new S07PacketRespawn(player.dimension, player.worldObj.difficultySetting, newWorldServer.getWorldInfo().getTerrainType(), player.theItemInWorldManager.getGameType())); oldWorldServer.removeEntity(player); player.isDead = false; player.setLocationAndAngles(d, e, f, player.rotationYaw, player.rotationPitch); @@ -834,7 +847,7 @@ public class SpellHelper extends APISpellHelper player.playerNetServerHandler.sendPacket(new S1DPacketEntityEffect(player.getEntityId(), potion.next())); } player.playerNetServerHandler.sendPacket(new S1FPacketSetExperience(player.experience, player.experienceTotal, player.experienceLevel)); - FMLCommonHandler.instance().firePlayerChangedDimensionEvent(player, oldWorldServer.provider.getDimensionId(), player.dimension); + FMLCommonHandler.instance().firePlayerChangedDimensionEvent(player, oldWorldServer.provider.dimensionId, player.dimension); player.timeUntilPortal = 150; } player.worldObj.theProfiler.endSection(); @@ -914,7 +927,7 @@ public class SpellHelper extends APISpellHelper public static float applySpecialProtection(EntityLivingBase entity, DamageSource source, float damage) { - ItemStack[] armour = entity.getInventory(); + ItemStack[] armour = entity.getLastActiveItems(); if(armour == null) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefaultEarth.java index fca0705a..81f24122 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefaultEarth.java @@ -17,7 +17,6 @@ public class CSEMeleeDefaultEarth extends ComplexSpellEffect public CSEMeleeDefaultEarth(int power, int cost, int potency) { this(); - this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefensiveEarth.java index c9e0954d..53aae894 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeDefensiveEarth.java @@ -17,7 +17,6 @@ public class CSEMeleeDefensiveEarth extends ComplexSpellEffect public CSEMeleeDefensiveEarth(int power, int cost, int potency) { this(); - this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeEnvironmentalEarth.java index 35a00764..dc558fb7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeEnvironmentalEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeEnvironmentalEarth.java @@ -17,7 +17,6 @@ public class CSEMeleeEnvironmentalEarth extends ComplexSpellEffect public CSEMeleeEnvironmentalEarth(int power, int cost, int potency) { this(); - this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeOffensiveEarth.java index 9e294bb3..9b9b2409 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEMeleeOffensiveEarth.java @@ -17,7 +17,6 @@ public class CSEMeleeOffensiveEarth extends ComplexSpellEffect public CSEMeleeOffensiveEarth(int power, int cost, int potency) { this(); - this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefaultEarth.java index 3f99eea3..60226c72 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileDefaultEarth.java @@ -17,7 +17,6 @@ public class CSEProjectileDefaultEarth extends ComplexSpellEffect public CSEProjectileDefaultEarth(int power, int cost, int potency) { this(); - this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileEnvironmentalEarth.java index cec867cd..ec1362a6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileEnvironmentalEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileEnvironmentalEarth.java @@ -17,7 +17,6 @@ public class CSEProjectileEnvironmentalEarth extends ComplexSpellEffect public CSEProjectileEnvironmentalEarth(int power, int cost, int potency) { this(); - this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileOffensiveEarth.java index 139c88bb..6ff81d50 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEProjectileOffensiveEarth.java @@ -17,7 +17,6 @@ public class CSEProjectileOffensiveEarth extends ComplexSpellEffect public CSEProjectileOffensiveEarth(int power, int cost, int potency) { this(); - this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefaultEarth.java index fd767c1b..424be92e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefaultEarth.java @@ -17,7 +17,6 @@ public class CSESelfDefaultEarth extends ComplexSpellEffect public CSESelfDefaultEarth(int power, int cost, int potency) { this(); - this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefensiveEarth.java index 64700185..90794fc8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfDefensiveEarth.java @@ -17,7 +17,6 @@ public class CSESelfDefensiveEarth extends ComplexSpellEffect public CSESelfDefensiveEarth(int power, int cost, int potency) { this(); - this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfOffensiveEarth.java index 3eb7bf79..51312610 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSESelfOffensiveEarth.java @@ -17,7 +17,6 @@ public class CSESelfOffensiveEarth extends ComplexSpellEffect public CSESelfOffensiveEarth(int power, int cost, int potency) { this(); - this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefaultEarth.java index 0b38fa7b..ef1dd1b4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolDefaultEarth.java @@ -29,10 +29,8 @@ public class CSEToolDefaultEarth extends ComplexSpellEffect { String toolClass = "pickaxe"; - float digSpeed = 7.0f; - switch (this.powerEnhancement) { case 1: @@ -52,10 +50,8 @@ public class CSEToolDefaultEarth extends ComplexSpellEffect break; } - ((SpellParadigmTool)parad).setDigSpeed(toolClass, digSpeed); - int hlvl = this.potencyEnhancement + 2; ((SpellParadigmTool)parad).setHarvestLevel(toolClass, hlvl); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolEnvironmentalEarth.java index 376db588..1536fbff 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolEnvironmentalEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolEnvironmentalEarth.java @@ -17,7 +17,6 @@ public class CSEToolEnvironmentalEarth extends ComplexSpellEffect public CSEToolEnvironmentalEarth(int power, int cost, int potency) { this(); - this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolOffensiveEarth.java index 02f1cf6b..9b7e0c84 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/earth/CSEToolOffensiveEarth.java @@ -17,7 +17,6 @@ public class CSEToolOffensiveEarth extends ComplexSpellEffect public CSEToolOffensiveEarth(int power, int cost, int potency) { this(); - this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeEnvironmentalIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeEnvironmentalIce.java index c1ff2fe0..807d79f8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeEnvironmentalIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/ice/CSEMeleeEnvironmentalIce.java @@ -41,6 +41,6 @@ public class CSEMeleeEnvironmentalIce extends ComplexSpellEffect @Override public int getCostOfEffect() { - return (int) (20 * (0.5 * potencyEnhancement + 1) * (0 * powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); + return (int) (20 * (0.5 * potencyEnhancement + 1) * 1 * Math.pow(0.85, costEnhancement)); //where the lone 1 is: (0 * potencyEnhancement + 1) } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefaultWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefaultWind.java index f47960e9..e39030de 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefaultWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEMeleeDefaultWind.java @@ -17,7 +17,6 @@ public class CSEMeleeDefaultWind extends ComplexSpellEffect public CSEMeleeDefaultWind(int power, int cost, int potency) { this(); - this.powerEnhancement = power; this.costEnhancement = cost; this.potencyEnhancement = potency; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefensiveWind.java index 2381fda5..15f1be6e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/cse/wind/CSEProjectileDefensiveWind.java @@ -40,6 +40,6 @@ public class CSEProjectileDefensiveWind extends ComplexSpellEffect @Override public int getCostOfEffect() { - return (int) (100 * (this.potencyEnhancement + 1)); + return (100 * (this.potencyEnhancement + 1)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefaultEarth.java index cf4ed985..7ca0d401 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefaultEarth.java @@ -1,12 +1,10 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; +import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityFallingBlock; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; public class MeleeDefaultEarth extends MeleeSpellCenteredWorldEffect { @@ -17,7 +15,7 @@ public class MeleeDefaultEarth extends MeleeSpellCenteredWorldEffect } @Override - public void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos) + public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ) { int radius = this.potencyUpgrades; @@ -27,18 +25,17 @@ public class MeleeDefaultEarth extends MeleeSpellCenteredWorldEffect { for (int k = -radius; k <= radius; k++) { - BlockPos newPos = pos.add(i, j, k); - if (!world.isAirBlock(newPos) && world.getTileEntity(newPos) == null) + if (!world.isAirBlock(posX + i, posY + j, posZ + k) && world.getTileEntity(posX + i, posY + j, posZ + k) == null) { - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); + Block block = world.getBlock(posX + i, posY + j, posZ + k); - if (block.getBlockHardness(world, newPos) == -1) + if (block.getBlockHardness(world, posX + i, posY + j, posZ + k) == -1) { continue; } + int meta = world.getBlockMetadata(posX + i, posY + j, posZ + k); - EntityFallingBlock entity = new EntityFallingBlock(world, newPos.getX() + 0.5f, newPos.getY() + 0.5f, newPos.getZ() + 0.5f, state); + EntityFallingBlock entity = new EntityFallingBlock(world, posX + i + 0.5f, posY + j + 0.5f, posZ + k + 0.5f, block, meta); world.spawnEntityInWorld(entity); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefensiveEarth.java index e470be7c..d82ca011 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefensiveEarth.java @@ -1,12 +1,11 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; public class MeleeDefensiveEarth extends MeleeSpellCenteredWorldEffect { @@ -17,21 +16,21 @@ public class MeleeDefensiveEarth extends MeleeSpellCenteredWorldEffect } @Override - public void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos) + public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ) { - EnumFacing dir = SpellHelper.getDirectionForLookVector(player.getLook(1)); + ForgeDirection dir = SpellHelper.getDirectionForLookVector(player.getLook(1)); int vertRadius = (int) (2 + 1.0f / 2.0f * Math.pow(this.potencyUpgrades, 2) + 1.0f / 2.0f * this.potencyUpgrades); int horizRadius = this.potencyUpgrades + 1; - int xOff = dir.getFrontOffsetX(); - int zOff = dir.getFrontOffsetZ(); + int xOff = dir.offsetX; + int zOff = dir.offsetZ; for (int i = -horizRadius; i <= horizRadius; i++) { for (int j = 0; j < vertRadius; j++) { - BlockTeleposer.swapBlocks(this, world, world, pos.add(i * zOff, j, i * xOff), pos.add(i * zOff, j - vertRadius, i * xOff)); + BlockTeleposer.swapBlocks(this, world, world, posX + i * zOff, posY + j, posZ + i * xOff, posX + i * zOff, posY + j - vertRadius, posZ + i * xOff); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeEnvironmentalEarth.java index f80a0e70..32291181 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeEnvironmentalEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeEnvironmentalEarth.java @@ -1,14 +1,11 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; +import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class MeleeEnvironmentalEarth extends MeleeSpellCenteredWorldEffect { @@ -19,7 +16,7 @@ public class MeleeEnvironmentalEarth extends MeleeSpellCenteredWorldEffect } @Override - public void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos) + public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ) { int radius = this.potencyUpgrades; @@ -29,21 +26,18 @@ public class MeleeEnvironmentalEarth extends MeleeSpellCenteredWorldEffect { for (int k = -radius; k <= radius; k++) { - BlockPos newPos = pos.add(i, j, k); - if (!world.isAirBlock(newPos) && world.getTileEntity(newPos) == null) + if (!world.isAirBlock(posX + i, posY + j, posZ + k) && world.getTileEntity(posX + i, posY + j, posZ + k) == null) { - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - ItemStack stack = new ItemStack(block, 1, block.getMetaFromState(state)); + ItemStack stack = new ItemStack(world.getBlock(posX + i, posY + j, posZ + k), 1, world.getBlockMetadata(posX + i, posY + j, posZ + k)); ItemStack dustStack = SpellHelper.getDustForOre(stack); if (dustStack != null) { - dustStack.stackSize = 3; - world.spawnEntityInWorld(new EntityItem(world, newPos.getX() + 0.5, newPos.getY() + 0.5, newPos.getZ() + 0.5, dustStack)); + dustStack.stackSize *= 3; + world.spawnEntityInWorld(new EntityItem(world, posX, posY, posZ, dustStack)); - world.setBlockToAir(newPos); + world.setBlockToAir(posX + i, posY + j, posZ + k); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeOffensiveEarth.java index 990a81fd..d13ab19c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeOffensiveEarth.java @@ -1,10 +1,9 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.World; public class MeleeOffensiveEarth extends MeleeSpellCenteredWorldEffect { @@ -15,7 +14,7 @@ public class MeleeOffensiveEarth extends MeleeSpellCenteredWorldEffect } @Override - public void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos) + public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ) { int radius = this.potencyUpgrades; @@ -25,8 +24,7 @@ public class MeleeOffensiveEarth extends MeleeSpellCenteredWorldEffect { for (int k = -radius; k <= radius; k++) { - BlockPos newPos = pos.add(i, j, k); - SpellHelper.smashBlock(world, newPos); + SpellHelper.smashBlock(world, posX + i, posY + j, posZ + k); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefaultEarth.java index d28c5343..8437f6d8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefaultEarth.java @@ -1,13 +1,11 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; public class ProjectileDefaultEarth extends ProjectileImpactEffect { @@ -24,32 +22,34 @@ public class ProjectileDefaultEarth extends ProjectileImpactEffect @Override public void onTileImpact(World world, MovingObjectPosition mop) { - BlockPos pos = mop.func_178782_a(); - int horizRange = (int) (0.5 * (this.powerUpgrades) + 1); int vertRange = (int) (0.5 * (this.powerUpgrades) + 1); + int posX = mop.blockX; + int posY = mop.blockY; + int posZ = mop.blockZ; + for (int i = -horizRange; i <= horizRange; i++) { for (int j = -vertRange; j <= vertRange; j++) { for (int k = -horizRange; k <= horizRange; k++) { - BlockPos newPos = pos.add(i, j, k); - if (!world.isAirBlock(newPos)) + if (!world.isAirBlock(posX + i, posY + j, posZ + k)) { - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - if (block == null || block.getBlockHardness(world, newPos) == -1 || SpellHelper.isBlockFluid(block)) + Block block = world.getBlock(posX + i, posY + j, posZ + k); + if (block == null || block.getBlockHardness(world, posX + i, posY + j, posZ + k) == -1 || SpellHelper.isBlockFluid(block)) { continue; } //block.breakBlock(world, posX+i, posY+j, posZ+k, block.blockID, world.getBlockMetadata(posX+i, posY+j, posZ+k)); //world.destroyBlock(posX+i, posY+j, posZ+k, true); - world.destroyBlock(newPos, false); + world.func_147480_a(posX + i, posY + j, posZ + k, false); } } } } + } + } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefensiveEarth.java index 1c888f85..e2d53a60 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefensiveEarth.java @@ -1,13 +1,11 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; public class ProjectileDefensiveEarth extends ProjectileImpactEffect { @@ -24,10 +22,12 @@ public class ProjectileDefensiveEarth extends ProjectileImpactEffect @Override public void onTileImpact(World world, MovingObjectPosition mop) { - BlockPos pos = mop.func_178782_a(); + int horizRange = this.powerUpgrades; + int vertRange = this.potencyUpgrades; - int horizRange = (int) (this.powerUpgrades); - int vertRange = (int) (this.potencyUpgrades); + int posX = mop.blockX; + int posY = mop.blockY; + int posZ = mop.blockZ; for (int i = -horizRange; i <= horizRange; i++) { @@ -35,12 +35,10 @@ public class ProjectileDefensiveEarth extends ProjectileImpactEffect { for (int k = -horizRange; k <= horizRange; k++) { - BlockPos newPos = pos.add(i, j, k); - if (!world.isAirBlock(newPos)) + if (!world.isAirBlock(posX + i, posY + j, posZ + k)) { - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - if (block == null || block.getBlockHardness(world, newPos) == -1) + Block block = world.getBlock(posX + i, posY + j, posZ + k); + if (block == null || block.getBlockHardness(world, posX + i, posY + j, posZ + k) == -1) { continue; } @@ -48,7 +46,7 @@ public class ProjectileDefensiveEarth extends ProjectileImpactEffect //world.destroyBlock(posX+i, posY+j, posZ+k, true); if (world.rand.nextFloat() < 0.6f) { - SpellHelper.smashBlock(world, newPos); + SpellHelper.smashBlock(world, posX + i, posY + j, posZ + k); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileEnvironmentalEarth.java index 7a28612c..721edd40 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileEnvironmentalEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileEnvironmentalEarth.java @@ -1,15 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; import WayofTime.alchemicalWizardry.api.spell.ProjectileUpdateEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; public class ProjectileEnvironmentalEarth extends ProjectileUpdateEffect { @@ -21,12 +20,16 @@ public class ProjectileEnvironmentalEarth extends ProjectileUpdateEffect @Override public void onUpdateEffect(Entity projectile) { - BlockPos pos = projectile.getPosition(); + Vec3 posVec = SpellHelper.getEntityBlockVector(projectile); int horizRange = this.powerUpgrades + 1; int vertRange = (int) (0.5 * (this.powerUpgrades + 1)); int maxBlocks = (int) (2 * Math.pow(3.47, this.potencyUpgrades)); + int posX = (int) (posVec.xCoord); + int posY = (int) (posVec.yCoord); + int posZ = (int) (posVec.zCoord); + World worldObj = projectile.worldObj; if (projectile instanceof EntitySpellProjectile) @@ -44,25 +47,24 @@ public class ProjectileEnvironmentalEarth extends ProjectileUpdateEffect { for (int k = -horizRange; k <= horizRange; k++) { - BlockPos newPos = pos.add(i, j, k); - if (!worldObj.isAirBlock(newPos) && blocksBroken < maxBlocks) + if (!worldObj.isAirBlock(posX + i, posY + j, posZ + k) && blocksBroken < maxBlocks) { - IBlockState state = worldObj.getBlockState(newPos); - Block block = state.getBlock(); - if (block == null || block.getBlockHardness(worldObj, newPos) == -1 || SpellHelper.isBlockFluid(block)) + Block block = worldObj.getBlock(posX + i, posY + j, posZ + k); + int meta = worldObj.getBlockMetadata(posX + i, posY + j, posZ + k); + if (block == null || block.getBlockHardness(worldObj, posX + i, posY + j, posZ + k) == -1 || SpellHelper.isBlockFluid(block)) { continue; } - if (((EntitySpellProjectile) projectile).getIsSilkTouch() && block.canSilkHarvest(worldObj, newPos, state, ((EntitySpellProjectile) projectile).shootingEntity)) + if (((EntitySpellProjectile) projectile).getIsSilkTouch() && block.canSilkHarvest(worldObj, ((EntitySpellProjectile) projectile).shootingEntity, posX + i, posY + j, posZ + k, meta)) { - ItemStack stack = new ItemStack(block, 1, block.getMetaFromState(state)); - EntityItem itemEntity = new EntityItem(worldObj, newPos.getX() + 0.5, newPos.getY() + 0.5, newPos.getZ() + 0.5, stack); + ItemStack stack = new ItemStack(block, 1, meta); + EntityItem itemEntity = new EntityItem(worldObj, posX + i + 0.5, posY + j + 0.5, posZ + k + 0.5, stack); worldObj.spawnEntityInWorld(itemEntity); - worldObj.setBlockToAir(newPos); + worldObj.setBlockToAir(posX + i, posY + j, posZ + k); } else { - worldObj.destroyBlock(newPos, true); + worldObj.func_147480_a(posX + i, posY + j, posZ + k, true); } blocksBroken++; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileOffensiveEarth.java index 8693f628..67b2d424 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileOffensiveEarth.java @@ -1,13 +1,13 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; public class ProjectileOffensiveEarth extends ProjectileImpactEffect { @@ -19,10 +19,14 @@ public class ProjectileOffensiveEarth extends ProjectileImpactEffect @Override public void onEntityImpact(Entity mop, Entity proj) { - int horizRange = (int) (this.powerUpgrades); - int vertDepth = (int) (3 * this.potencyUpgrades + 1); + int horizRange = this.powerUpgrades; + int vertDepth = 3 * this.potencyUpgrades + 1; - BlockPos pos = proj.getPosition(); + Vec3 blockVector = SpellHelper.getEntityBlockVector(mop); + + int posX = (int) (blockVector.xCoord); + int posY = (int) (blockVector.yCoord); + int posZ = (int) (blockVector.zCoord); World world = mop.worldObj; @@ -32,18 +36,16 @@ public class ProjectileOffensiveEarth extends ProjectileImpactEffect { for (int k = -horizRange; k <= horizRange; k++) { - BlockPos newPos = pos.add(i, j, k); - if (!world.isAirBlock(newPos)) + if (!world.isAirBlock(posX + i, posY + j, posZ + k)) { - IBlockState state = world.getBlockState(newPos); - Block block = state.getBlock(); - if (block == null || block.getBlockHardness(world, newPos) == -1) + Block block = world.getBlock(posX + i, posY + j, posZ + k); + if (block == null || block.getBlockHardness(world, posX + i, posY + j, posZ + k) == -1) { continue; } if (block == Blocks.stone || block == Blocks.cobblestone || block == Blocks.sand || block == Blocks.gravel || block == Blocks.grass || block == Blocks.dirt) { - world.setBlockToAir(newPos); + world.setBlockToAir(posX + i, posY + j, posZ + k); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefaultEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefaultEarth.java index 78396edb..53b038c0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefaultEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefaultEarth.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; public class SelfDefaultEarth extends SelfSpellEffect { @@ -21,24 +21,26 @@ public class SelfDefaultEarth extends SelfSpellEffect int horizRadius = this.powerUpgrades; int vertRange = 5 + 10 * this.potencyUpgrades; - BlockPos pos = player.getPosition().offsetDown(); + Vec3 blockVec = SpellHelper.getEntityBlockVector(player); + + int posX = (int) (blockVec.xCoord); + int posY = (int) (blockVec.yCoord) - 1; + int posZ = (int) (blockVec.zCoord); for (int i = -horizRadius; i <= horizRadius; i++) { for (int k = -horizRadius; k <= horizRadius; k++) { - BlockPos newPos = pos.add(i, 0, k); - if (!world.isAirBlock(newPos)) + if (!world.isAirBlock(posX + i, posY, posZ + k)) { continue; } for (int j = -1; j >= -vertRange; j--) { - BlockPos newNewPos = newPos.add(0, j, 0); - if (!world.isAirBlock(newNewPos) && !SpellHelper.isBlockFluid(world.getBlockState(newNewPos).getBlock())) + if (!world.isAirBlock(posX + i, posY + j, posZ + k) && !SpellHelper.isBlockFluid(world.getBlock(posX + i, posY + j, posZ + k))) { - BlockTeleposer.swapBlocks(this, world, world,newPos, newNewPos); + BlockTeleposer.swapBlocks(this, world, world, posX + i, posY, posZ + k, posX + i, posY + j, posZ + k); break; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefensiveEarth.java index 9b71bef4..cc3892b1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfDefensiveEarth.java @@ -21,7 +21,7 @@ public class SelfDefensiveEarth extends SelfSpellEffect int pot = 2 * this.potencyUpgrades + 1; int duration = 20 * 60 * (this.powerUpgrades + 1); - player.addPotionEffect(new PotionEffect(Potion.field_180152_w.id, duration, pot)); + player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, duration, pot)); player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, duration, pot)); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfOffensiveEarth.java index fc3397d2..c43ed78b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/SelfOffensiveEarth.java @@ -1,14 +1,13 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; public class SelfOffensiveEarth extends SelfSpellEffect { - public SelfOffensiveEarth(int power, int potency, int cost) { super(power, potency, cost); @@ -20,7 +19,11 @@ public class SelfOffensiveEarth extends SelfSpellEffect int horizRadius = this.powerUpgrades; int vertRadius = this.potencyUpgrades + 1; - BlockPos pos = player.getPosition(); + Vec3 blockVec = SpellHelper.getEntityBlockVector(player); + + int posX = (int) (blockVec.xCoord); + int posY = (int) (blockVec.yCoord); + int posZ = (int) (blockVec.zCoord); for (int i = -horizRadius; i <= horizRadius; i++) { @@ -28,10 +31,9 @@ public class SelfOffensiveEarth extends SelfSpellEffect { for (int k = -horizRadius; k <= horizRadius; k++) { - BlockPos newPos = pos.add(i, j, k); if (world.rand.nextFloat() < 0.7f) { - SpellHelper.smashBlock(world, newPos); + SpellHelper.smashBlock(world, posX + i, posY + j, posZ + k); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolEnvironmentalEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolEnvironmentalEarth.java index e7a34b6b..cd62fd34 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolEnvironmentalEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolEnvironmentalEarth.java @@ -1,13 +1,12 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.DigAreaEffect; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; public class ToolEnvironmentalEarth extends DigAreaEffect { @@ -24,11 +23,13 @@ public class ToolEnvironmentalEarth extends DigAreaEffect return 0; } - BlockPos pos = blockPos.func_178782_a(); - EnumFacing sidehit = blockPos.field_178784_b; + int x = blockPos.blockX; + int y = blockPos.blockY; + int z = blockPos.blockZ; + ForgeDirection sidehit = ForgeDirection.getOrientation(blockPos.sideHit); - int radius = 2; - int depth = 5; + int radius = this.powerUpgrades; + int depth = 2 * this.potencyUpgrades + 1; depth--; @@ -69,14 +70,13 @@ public class ToolEnvironmentalEarth extends DigAreaEffect default: } - for (int i = -negX; i <= posX; i++) + for (int xPos = x - negX; xPos <= x + posX; xPos++) { - for (int j = -negY; j <= posY; j++) + for (int yPos = y - negY; yPos <= y + posY; yPos++) { - for (int k = -negZ; k <= posZ; k++) + for (int zPos = z - negZ; zPos <= z + posZ; zPos++) { - BlockPos newPos = pos.add(i, j, k); - itemTool.onBlockStartBreak(container, newPos, player); + this.breakBlock(container, world, player, blockHardness, xPos, yPos, zPos, itemTool); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolOffensiveEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolOffensiveEarth.java index 61130c47..7ad0c879 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolOffensiveEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ToolOffensiveEarth.java @@ -1,6 +1,5 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; - import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.ItemManipulator; import net.minecraft.block.Block; import net.minecraft.init.Blocks; @@ -10,18 +9,15 @@ import net.minecraft.item.ItemStack; import java.util.LinkedList; import java.util.List; - public class ToolOffensiveEarth extends ItemManipulator { public static Block[] mundaneList = new Block[]{Blocks.stone, Blocks.cobblestone, Blocks.sand, Blocks.gravel, Blocks.netherrack, Blocks.dirt}; - public ToolOffensiveEarth(int power, int potency, int cost) { super(power, potency, cost); } - @Override public List<ItemStack> handleItemsOnBlockBroken(ItemStack toolStack, List<ItemStack> itemList) { @@ -29,7 +25,7 @@ public class ToolOffensiveEarth extends ItemManipulator for (ItemStack stack : itemList) { - if (stack != null && stack.getItem() instanceof ItemBlock && !this.isMundaneBlock(((ItemBlock) stack.getItem()).getBlock())) + if (stack != null && stack.getItem() instanceof ItemBlock && !this.isMundaneBlock(((ItemBlock) stack.getItem()).field_150939_a)) { newList.add(stack); } @@ -49,7 +45,6 @@ public class ToolOffensiveEarth extends ItemManipulator } } - return false; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeDefensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeDefensiveFire.java index 873c2998..30ae1449 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeDefensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeDefensiveFire.java @@ -1,12 +1,12 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.MeleeSpellWorldEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; public class MeleeDefensiveFire extends MeleeSpellWorldEffect { @@ -18,15 +18,19 @@ public class MeleeDefensiveFire extends MeleeSpellWorldEffect @Override public void onWorldEffect(World world, EntityPlayer entityPlayer) { - EnumFacing look = SpellHelper.getCompassDirectionForLookVector(entityPlayer.getLookVec()); + ForgeDirection look = SpellHelper.getCompassDirectionForLookVector(entityPlayer.getLookVec()); int width = this.potencyUpgrades + 1; int length = 5 * this.powerUpgrades + 3; - int xOffset = look.getFrontOffsetX(); - int zOffset = look.getFrontOffsetZ(); + int xOffset = look.offsetX; + int zOffset = look.offsetZ; - BlockPos pos = entityPlayer.getPosition().add(look.getDirectionVec()); + Vec3 lookVec = SpellHelper.getEntityBlockVector(entityPlayer); + + int xStart = (int) (lookVec.xCoord) + 1 * xOffset; + int zStart = (int) (lookVec.zCoord) + 1 * zOffset; + int yStart = (int) (lookVec.yCoord) - 1; for (int i = -width; i <= width; i++) { @@ -34,10 +38,9 @@ public class MeleeDefensiveFire extends MeleeSpellWorldEffect { for (int k = 0; k < 3; k++) { - BlockPos newPos = pos.add(i * (zOffset) + j * (xOffset), k, i * (xOffset) + j * (zOffset)); - if (world.isAirBlock(newPos)) + if (world.isAirBlock(xStart + i * (zOffset) + j * (xOffset), yStart + k, zStart + i * (xOffset) + j * (zOffset))) { - world.setBlockState(newPos, Blocks.fire.getDefaultState()); + world.setBlock(xStart + i * (zOffset) + j * (xOffset), yStart + k, zStart + i * (xOffset) + j * (zOffset), Blocks.fire); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeEnvironmentalFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeEnvironmentalFire.java index 865b33c1..9ef25810 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeEnvironmentalFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/MeleeEnvironmentalFire.java @@ -1,10 +1,9 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.World; public class MeleeEnvironmentalFire extends MeleeSpellCenteredWorldEffect { @@ -15,7 +14,7 @@ public class MeleeEnvironmentalFire extends MeleeSpellCenteredWorldEffect } @Override - public void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos) + public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ) { int radius = this.potencyUpgrades; @@ -25,8 +24,7 @@ public class MeleeEnvironmentalFire extends MeleeSpellCenteredWorldEffect { for (int k = -radius; k <= radius; k++) { - BlockPos newPos = pos.add(i, j, k); - SpellHelper.evaporateWaterBlock(world, newPos); + SpellHelper.evaporateWaterBlock(world, posX + i, posY + j, posZ + k); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefaultFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefaultFire.java index a9e6800d..0f1316a3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefaultFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefaultFire.java @@ -1,11 +1,12 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; public class ProjectileDefaultFire extends ProjectileImpactEffect { @@ -17,8 +18,11 @@ public class ProjectileDefaultFire extends ProjectileImpactEffect @Override public void onEntityImpact(Entity mop, Entity proj) { - BlockPos pos = proj.getPosition(); - + Vec3 blockVec = SpellHelper.getEntityBlockVector(mop); + + int x = (int) (blockVec.xCoord); + int y = (int) (blockVec.yCoord); + int z = (int) (blockVec.zCoord); World world = mop.worldObj; int horizRange = 0; @@ -30,11 +34,9 @@ public class ProjectileDefaultFire extends ProjectileImpactEffect { for (int k = -horizRange; k <= horizRange; k++) { - BlockPos newPos = pos.add(i, j, k); - - if (world.isAirBlock(newPos)) + if (world.isAirBlock(x + i, y + j, z + k)) { - world.setBlockState(newPos, Blocks.fire.getDefaultState()); + world.setBlock(x + i, y + j, z + k, Blocks.fire); } } } @@ -44,8 +46,10 @@ public class ProjectileDefaultFire extends ProjectileImpactEffect @Override public void onTileImpact(World world, MovingObjectPosition mop) { - BlockPos pos = mop.func_178782_a(); - + int x = mop.blockX; + int y = mop.blockY; + int z = mop.blockZ; + int horizRange = 0; int vertRange = 0; @@ -55,11 +59,9 @@ public class ProjectileDefaultFire extends ProjectileImpactEffect { for (int k = -horizRange; k <= horizRange; k++) { - BlockPos newPos = pos.add(i, j, k); - - if (world.isAirBlock(newPos)) + if (world.isAirBlock(x + i, y + j, z + k)) { - world.setBlockState(newPos, Blocks.fire.getDefaultState()); + world.setBlock(x + i, y + j, z + k, Blocks.fire); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefensiveFire.java index d727b1ac..ddaa2fcf 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileDefensiveFire.java @@ -1,11 +1,10 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import net.minecraft.entity.Entity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.Entity; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; public class ProjectileDefensiveFire extends ProjectileImpactEffect { @@ -23,10 +22,12 @@ public class ProjectileDefensiveFire extends ProjectileImpactEffect @Override public void onTileImpact(World world, MovingObjectPosition mop) { - int horizRange = (int) ((this.powerUpgrades)); - int vertRange = (int) ((this.powerUpgrades)); + int horizRange = this.powerUpgrades; + int vertRange = this.powerUpgrades; - BlockPos pos = mop.func_178782_a(); + int posX = mop.blockX; + int posY = mop.blockY; + int posZ = mop.blockZ; for (int i = -horizRange; i <= horizRange; i++) { @@ -34,11 +35,9 @@ public class ProjectileDefensiveFire extends ProjectileImpactEffect { for (int k = -horizRange; k <= horizRange; k++) { - BlockPos newPos = pos.add(i, j, k); - - if (!world.isAirBlock(newPos)) + if (!world.isAirBlock(posX + i, posY + j, posZ + k)) { - SpellHelper.smeltBlockInWorld(world, newPos); + SpellHelper.smeltBlockInWorld(world, posX + i, posY + j, posZ + k); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileEnvironmentalFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileEnvironmentalFire.java index d4eb74d9..dea915b5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileEnvironmentalFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileEnvironmentalFire.java @@ -1,10 +1,10 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import net.minecraft.entity.Entity; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.ProjectileUpdateEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.Entity; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; public class ProjectileEnvironmentalFire extends ProjectileUpdateEffect { @@ -16,11 +16,15 @@ public class ProjectileEnvironmentalFire extends ProjectileUpdateEffect @Override public void onUpdateEffect(Entity projectile) { - BlockPos pos = projectile.getPosition(); + Vec3 posVec = SpellHelper.getEntityBlockVector(projectile); int horizRange = this.powerUpgrades + 1; int vertRange = (int) (0.5 * (this.powerUpgrades + 1)); + int posX = (int) (posVec.xCoord); + int posY = (int) (posVec.yCoord); + int posZ = (int) (posVec.zCoord); + World worldObj = projectile.worldObj; for (int i = -horizRange; i <= horizRange; i++) @@ -29,11 +33,9 @@ public class ProjectileEnvironmentalFire extends ProjectileUpdateEffect { for (int k = -horizRange; k <= horizRange; k++) { - BlockPos newPos = pos.add(i, j, k); - - if (!worldObj.isAirBlock(newPos)) + if (!worldObj.isAirBlock(posX + i, posY + j, posZ + k)) { - SpellHelper.evaporateWaterBlock(worldObj, newPos); + SpellHelper.evaporateWaterBlock(worldObj, posX + i, posY + j, posZ + k); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileOffensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileOffensiveFire.java index e3525364..ed95e428 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileOffensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ProjectileOffensiveFire.java @@ -1,11 +1,12 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; public class ProjectileOffensiveFire extends ProjectileImpactEffect { @@ -17,10 +18,14 @@ public class ProjectileOffensiveFire extends ProjectileImpactEffect @Override public void onEntityImpact(Entity mop, Entity proj) { - int horizRange = (int) (this.powerUpgrades); - int vertDepth = (int) (3 * this.potencyUpgrades + 1); + int horizRange = this.powerUpgrades; + int vertDepth = 3 * this.potencyUpgrades + 1; - BlockPos pos = proj.getPosition(); + Vec3 blockVector = SpellHelper.getEntityBlockVector(mop); + + int posX = (int) (blockVector.xCoord); + int posY = (int) (blockVector.yCoord); + int posZ = (int) (blockVector.zCoord); World world = mop.worldObj; @@ -30,10 +35,9 @@ public class ProjectileOffensiveFire extends ProjectileImpactEffect { for (int k = -horizRange; k <= horizRange; k++) { - BlockPos newPos = pos.add(i, j, k); - if (world.isAirBlock(newPos)) + if (world.isAirBlock(posX + i, posY + j, posZ + k)) { - world.setBlockState(newPos, Blocks.flowing_lava.getStateFromMeta(7)); + world.setBlock(posX + i, posY + j, posZ + k, Blocks.flowing_lava, 7, 3); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfDefensiveFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfDefensiveFire.java index 4a10521d..f0826849 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfDefensiveFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfDefensiveFire.java @@ -1,10 +1,11 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; +import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; +import net.minecraft.util.Vec3; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; public class SelfDefensiveFire extends SelfSpellEffect { @@ -17,10 +18,14 @@ public class SelfDefensiveFire extends SelfSpellEffect @Override public void onSelfUse(World world, EntityPlayer player) { - int horizRange = (int) (this.powerUpgrades); - int vertDepth = (int) (3 * this.potencyUpgrades + 1); + int horizRange = this.powerUpgrades; + int vertDepth = 3 * this.potencyUpgrades + 1; - BlockPos pos = player.getPosition(); + Vec3 blockVector = SpellHelper.getEntityBlockVector(player); + + int posX = (int) (blockVector.xCoord); + int posY = (int) (blockVector.yCoord); + int posZ = (int) (blockVector.zCoord); for (int i = -horizRange; i <= horizRange; i++) { @@ -28,11 +33,9 @@ public class SelfDefensiveFire extends SelfSpellEffect { for (int k = -horizRange; k <= horizRange; k++) { - BlockPos newPos = pos.add(i, j, k); - - if (world.isAirBlock(newPos)) + if (world.isAirBlock(posX + i, posY + j, posZ + k)) { - world.setBlockState(newPos, Blocks.flowing_lava.getStateFromMeta(7)); + world.setBlock(posX + i, posY + j, posZ + k, Blocks.flowing_lava, 7, 3); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfEnvironmentalFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfEnvironmentalFire.java index 004548f8..e933e17d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfEnvironmentalFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/SelfEnvironmentalFire.java @@ -1,11 +1,10 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; public class SelfEnvironmentalFire extends SelfSpellEffect { @@ -17,7 +16,9 @@ public class SelfEnvironmentalFire extends SelfSpellEffect @Override public void onSelfUse(World world, EntityPlayer player) { - BlockPos pos = player.getPosition(); + int posX = (int) Math.round(player.posX - 0.5f); + int posY = (int) player.posY; + int posZ = (int) Math.round(player.posZ - 0.5f); int powRadius = this.powerUpgrades; int potRadius = this.potencyUpgrades - 1; @@ -28,11 +29,9 @@ public class SelfEnvironmentalFire extends SelfSpellEffect { for (int k = -powRadius; k <= powRadius; k++) { - BlockPos newPos = pos.add(i, j, k); - - if (world.isAirBlock(newPos)) + if (world.isAirBlock(posX + i, posY + j, posZ + k)) { - world.setBlockState(newPos, Blocks.fire.getDefaultState()); + world.setBlock(posX + i, posY + j, posZ + k, Blocks.fire); } } @@ -45,11 +44,9 @@ public class SelfEnvironmentalFire extends SelfSpellEffect { for (int k = -potRadius; k <= potRadius; k++) { - BlockPos newPos = pos.add(i, j, k); - - if (!world.isAirBlock(newPos)) + if (!world.isAirBlock(posX + i, posY + j, posZ + k)) { - SpellHelper.smeltBlockInWorld(world, newPos); + SpellHelper.smeltBlockInWorld(world, posX + i, posY + j, posZ + k); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolDefaultFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolDefaultFire.java index fbae06d1..c6d7478b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolDefaultFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolDefaultFire.java @@ -20,7 +20,7 @@ public class ToolDefaultFire extends ItemManipulator LinkedList<ItemStack> newList = new LinkedList(); for (ItemStack item : itemList) { - ItemStack newItem = FurnaceRecipes.instance().getSmeltingResult(item); + ItemStack newItem = FurnaceRecipes.smelting().getSmeltingResult(item); if (newItem != null) { newList.add(newItem); @@ -32,4 +32,5 @@ public class ToolDefaultFire extends ItemManipulator return newList; } + } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolEnvironmentalFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolEnvironmentalFire.java index 68d1dd9c..518ccc2d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolEnvironmentalFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/fire/ToolEnvironmentalFire.java @@ -1,16 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire; -import java.util.Random; - +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.OnBreakBlockEffect; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.OnBreakBlockEffect; +import net.minecraftforge.common.util.ForgeDirection; + +import java.util.Random; public class ToolEnvironmentalFire extends OnBreakBlockEffect { @@ -20,7 +18,7 @@ public class ToolEnvironmentalFire extends OnBreakBlockEffect } @Override - public int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, IBlockState state, BlockPos pos, EnumFacing sideBroken) + public int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, int meta, int x, int y, int z, ForgeDirection sideBroken) { int amount = 0; int cost = (int) (250 * (1 - 0.1f * powerUpgrades) * Math.pow(0.85, costUpgrades)); @@ -33,13 +31,11 @@ public class ToolEnvironmentalFire extends OnBreakBlockEffect { for (int k = -radius; k <= radius; k++) { - BlockPos newPos = pos.add(i - sideBroken.getFrontOffsetX(), j, k - sideBroken.getFrontOffsetZ()); - IBlockState newState = world.getBlockState(newPos); - Block blockAffected = newState.getBlock(); + Block blockAffected = world.getBlock(x + i - sideBroken.offsetX, y + j, z + k - sideBroken.offsetZ); if ((new Random().nextFloat() <= chance) && (blockAffected == Blocks.gravel || blockAffected == Blocks.stone || blockAffected == Blocks.cobblestone)) { - world.setBlockState(newPos, Blocks.lava.getDefaultState()); + world.setBlock(x + i - sideBroken.offsetX, y + j, z + k - sideBroken.offsetZ, Blocks.lava); amount += cost; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefaultIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefaultIce.java index b375331a..cd546753 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefaultIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefaultIce.java @@ -7,7 +7,6 @@ import net.minecraft.world.World; public class MeleeDefaultIce extends ExtrapolatedMeleeEntityEffect { - public MeleeDefaultIce(int power, int potency, int cost) { super(power, potency, cost); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefensiveIce.java index a581cf56..0eb02f85 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeDefensiveIce.java @@ -1,12 +1,12 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.MeleeSpellWorldEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; public class MeleeDefensiveIce extends MeleeSpellWorldEffect { @@ -18,30 +18,29 @@ public class MeleeDefensiveIce extends MeleeSpellWorldEffect @Override public void onWorldEffect(World world, EntityPlayer entityPlayer) { - EnumFacing look = SpellHelper.getCompassDirectionForLookVector(entityPlayer.getLookVec()); + ForgeDirection look = SpellHelper.getCompassDirectionForLookVector(entityPlayer.getLookVec()); int width = this.powerUpgrades; int height = this.powerUpgrades + 2; - int xOffset = look.getFrontOffsetX(); - int zOffset = look.getFrontOffsetZ(); + int xOffset = look.offsetX; + int zOffset = look.offsetZ; int range = this.potencyUpgrades + 1; - BlockPos pos = entityPlayer.getPosition(); + Vec3 lookVec = SpellHelper.getEntityBlockVector(entityPlayer); - int xStart = pos.getX() + range * xOffset; - int zStart = pos.getZ() + range * zOffset; - int yStart = pos.getY(); + int xStart = (int) (lookVec.xCoord) + range * xOffset; + int zStart = (int) (lookVec.zCoord) + range * zOffset; + int yStart = (int) (lookVec.yCoord); for (int i = -width; i <= width; i++) { for (int j = 0; j < height; j++) { - BlockPos newPos = new BlockPos(xStart + i * (zOffset), yStart + j, zStart + i * (xOffset)); - if (world.isAirBlock(newPos)) + if (world.isAirBlock(xStart + i * (zOffset), yStart + j, zStart + i * (xOffset))) { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); + world.setBlock(xStart + i * (zOffset), yStart + j, zStart + i * (xOffset), Blocks.ice); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeOffensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeOffensiveIce.java index c8e99587..3245ba16 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeOffensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/MeleeOffensiveIce.java @@ -1,11 +1,12 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; +import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; +import net.minecraft.util.Vec3; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.spell.ExtrapolatedMeleeEntityEffect; public class MeleeOffensiveIce extends ExtrapolatedMeleeEntityEffect { @@ -20,19 +21,19 @@ public class MeleeOffensiveIce extends ExtrapolatedMeleeEntityEffect @Override protected boolean entityEffect(World world, Entity entity, EntityPlayer entityPlayer) { - BlockPos pos = entityPlayer.getPosition(); + Vec3 blockVector = SpellHelper.getEntityBlockVector(entity); + int posX = (int) (blockVector.xCoord); + int posY = (int) (blockVector.yCoord); + int posZ = (int) (blockVector.zCoord); - double yVel = 1 * (0.3 * this.powerUpgrades + 0.90); - - entity.motionY = yVel; + entity.motionY = 1 * (0.3 * this.powerUpgrades + 0.90); for (int i = 0; i < 2; i++) { - BlockPos newPos = pos.offsetUp(i); - if (world.isAirBlock(newPos)) + if (world.isAirBlock(posX, posY + i, posZ)) { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); + world.setBlock(posX, posY + i, posZ, Blocks.ice); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefaultIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefaultIce.java index cf730254..1f4c7831 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefaultIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefaultIce.java @@ -1,12 +1,11 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; +import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; +import net.minecraftforge.common.util.ForgeDirection; public class ProjectileDefaultIce extends ProjectileImpactEffect { @@ -18,21 +17,21 @@ public class ProjectileDefaultIce extends ProjectileImpactEffect @Override public void onEntityImpact(Entity mop, Entity proj) { - return; + } @Override public void onTileImpact(World world, MovingObjectPosition mop) { - int horizRadius = this.powerUpgrades + 1; - int vertRadius = this.potencyUpgrades; + ForgeDirection sideHit = ForgeDirection.getOrientation(mop.sideHit); - EnumFacing sideHit = mop.field_178784_b; + int posX = mop.blockX + sideHit.offsetX; + int posY = mop.blockY + sideHit.offsetY; + int posZ = mop.blockZ + sideHit.offsetZ; - BlockPos newPos = mop.func_178782_a().add(sideHit.getDirectionVec()); - if (world.isAirBlock(newPos)) + if (world.isAirBlock(posX, posY, posZ)) { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); + world.setBlock(posX, posY, posZ, Blocks.ice); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefensiveIce.java index 5c51fe35..655439e3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileDefensiveIce.java @@ -4,7 +4,6 @@ import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -18,7 +17,7 @@ public class ProjectileDefensiveIce extends ProjectileImpactEffect @Override public void onEntityImpact(Entity mop, Entity proj) { - return; + } @Override @@ -26,8 +25,10 @@ public class ProjectileDefensiveIce extends ProjectileImpactEffect { int horizRadius = this.powerUpgrades + 1; int vertRadius = this.potencyUpgrades; - - BlockPos pos = mop.func_178782_a(); + + int posX = mop.blockX; + int posY = mop.blockY; + int posZ = mop.blockZ; for (int i = -horizRadius; i <= horizRadius; i++) { @@ -35,12 +36,11 @@ public class ProjectileDefensiveIce extends ProjectileImpactEffect { for (int j = -vertRadius; j <= vertRadius; j++) { - BlockPos newPos = pos.add(i, j, k); - SpellHelper.freezeWaterBlock(world, newPos); + SpellHelper.freezeWaterBlock(world, posX + i, posY + j, posZ + k); - if (world.isAirBlock(newPos) && !world.isAirBlock(newPos.offsetDown())) + if (world.isAirBlock(posX + i, posY + j, posZ + k) && !world.isAirBlock(posX + i, posY + j - 1, posZ + k)) { - world.setBlockState(newPos, Blocks.snow.getDefaultState()); + world.setBlock(posX + i, posY + j, posZ + k, Blocks.snow); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileEnvironmentalIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileEnvironmentalIce.java index 1b689f0b..ad7a3ab6 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileEnvironmentalIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileEnvironmentalIce.java @@ -1,9 +1,9 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import net.minecraft.entity.Entity; -import net.minecraft.util.BlockPos; import WayofTime.alchemicalWizardry.api.spell.ProjectileUpdateEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.Entity; +import net.minecraft.util.Vec3; public class ProjectileEnvironmentalIce extends ProjectileUpdateEffect { @@ -16,18 +16,22 @@ public class ProjectileEnvironmentalIce extends ProjectileUpdateEffect @Override public void onUpdateEffect(Entity projectile) { - BlockPos pos = projectile.getPosition(); - + Vec3 posVec = SpellHelper.getEntityBlockVector(projectile); + int horizRange = this.powerUpgrades + 1; int vertRange = this.potencyUpgrades + 1; + int posX = (int) (posVec.xCoord); + int posY = (int) (posVec.yCoord); + int posZ = (int) (posVec.zCoord); + for (int i = -horizRange; i <= horizRange; i++) { for (int j = -vertRange; j <= vertRange; j++) { for (int k = -horizRange; k <= horizRange; k++) { - SpellHelper.freezeWaterBlock(projectile.worldObj, pos.add(i, j, k)); + SpellHelper.freezeWaterBlock(projectile.worldObj, posX + i, posY + j, posZ + k); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileOffensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileOffensiveIce.java index 97d47967..ce770091 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileOffensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ProjectileOffensiveIce.java @@ -27,6 +27,6 @@ public class ProjectileOffensiveIce extends ProjectileImpactEffect @Override public void onTileImpact(World world, MovingObjectPosition mop) { - return; + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfDefaultIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfDefaultIce.java index 7861cc43..8361a4f0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfDefaultIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfDefaultIce.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; public class SelfDefaultIce extends SelfSpellEffect { @@ -17,17 +17,20 @@ public class SelfDefaultIce extends SelfSpellEffect @Override public void onSelfUse(World world, EntityPlayer player) { - BlockPos pos = player.getPosition(); + Vec3 blockVector = SpellHelper.getEntityBlockVector(player); + + int posX = (int) (blockVector.xCoord); + int posY = (int) (blockVector.yCoord); + int posZ = (int) (blockVector.zCoord); double yVel = 1 * (0.4 * this.powerUpgrades + 0.75); SpellHelper.setPlayerSpeedFromServer(player, player.motionX, yVel, player.motionZ); for (int i = 0; i < 2; i++) { - BlockPos newPos = pos.add(0, i, 0); - if (world.isAirBlock(newPos)) + if (world.isAirBlock(posX, posY + i, posZ)) { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); + world.setBlock(posX, posY + i, posZ, Blocks.ice); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfEnvironmentalIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfEnvironmentalIce.java index 2e73b07e..871fbc0a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfEnvironmentalIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/SelfEnvironmentalIce.java @@ -1,12 +1,12 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.api.spell.SelfSpellEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; public class SelfEnvironmentalIce extends SelfSpellEffect { @@ -18,24 +18,27 @@ public class SelfEnvironmentalIce extends SelfSpellEffect @Override public void onSelfUse(World world, EntityPlayer player) { - EnumFacing look = SpellHelper.getCompassDirectionForLookVector(player.getLookVec()); + ForgeDirection look = SpellHelper.getCompassDirectionForLookVector(player.getLookVec()); int width = this.potencyUpgrades + 1; int length = 5 * this.powerUpgrades + 3; - int xOffset = look.getFrontOffsetX(); - int zOffset = look.getFrontOffsetZ(); + int xOffset = look.offsetX; + int zOffset = look.offsetZ; - BlockPos pos = player.getPosition(); + Vec3 lookVec = SpellHelper.getEntityBlockVector(player); + + int xStart = (int) (lookVec.xCoord); + int zStart = (int) (lookVec.zCoord); + int yStart = (int) (lookVec.yCoord) - 1; for (int i = -width; i <= width; i++) { for (int j = 0; j < length; j++) { - BlockPos newPos = pos.add(i * (zOffset) + j * (xOffset), 0, i * (xOffset) + j * (zOffset)); - if (world.isAirBlock(newPos)) + if (world.isAirBlock(xStart + i * (zOffset) + j * (xOffset), yStart, zStart + i * (xOffset) + j * (zOffset))) { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); + world.setBlock(xStart + i * (zOffset) + j * (xOffset), yStart, zStart + i * (xOffset) + j * (zOffset), Blocks.ice); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefaultIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefaultIce.java index e9eeb811..a4aa47e7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefaultIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefaultIce.java @@ -1,13 +1,11 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; - import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.LeftClickEffect; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; - public class ToolDefaultIce extends LeftClickEffect { public ToolDefaultIce(int power, int potency, int cost) @@ -15,16 +13,13 @@ public class ToolDefaultIce extends LeftClickEffect super(power, potency, cost); } - @Override public int onLeftClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder) { int duration = 200; - attacked.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, duration, this.powerUpgrades)); - return 0; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefensiveIce.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefensiveIce.java index 7c4edbfe..37070d7c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefensiveIce.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/ice/ToolDefensiveIce.java @@ -1,18 +1,18 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.SummonToolEffect; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; +import net.minecraft.util.Vec3; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.SummonToolEffect; +import net.minecraftforge.common.util.ForgeDirection; + +import java.util.List; public class ToolDefensiveIce extends SummonToolEffect { @@ -36,19 +36,22 @@ public class ToolDefensiveIce extends SummonToolEffect } } - BlockPos pos = entity.getPosition(); + Vec3 blockVec = SpellHelper.getEntityBlockVector(entity); - for (int x = -horizRadius; x <= horizRadius; x++) + int x = (int) (blockVec.xCoord); + int y = (int) (blockVec.yCoord); + int z = (int) (blockVec.zCoord); + + for (int posX = x - horizRadius; posX <= x + horizRadius; posX++) { - for (int y = -vertRadius; y <= vertRadius; y++) + for (int posY = y - vertRadius; posY <= y + vertRadius; posY++) { - for (int z = -horizRadius; z <= horizRadius; z++) + for (int posZ = z - horizRadius; posZ <= z + horizRadius; posZ++) { - BlockPos newPos = pos.add(x, y, z); - SpellHelper.freezeWaterBlock(world, newPos); - if (world.isSideSolid(newPos, EnumFacing.UP) && world.isAirBlock(newPos.offsetUp())) + SpellHelper.freezeWaterBlock(world, posX, posY, posZ); + if (world.isSideSolid(posX, posY, posZ, ForgeDirection.UP) && world.isAirBlock(posX, posY + 1, posZ)) { - world.setBlockState(newPos.offsetUp(), Blocks.snow_layer.getDefaultState()); + world.setBlock(posX, posY + 1, posZ, Blocks.snow_layer); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaEffect.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaEffect.java index 39f11169..eac176c4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaEffect.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaEffect.java @@ -1,14 +1,17 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; import WayofTime.alchemicalWizardry.api.spell.IDigAreaEffect; +import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +import java.util.List; public class DigAreaEffect implements IDigAreaEffect { @@ -31,10 +34,9 @@ public class DigAreaEffect implements IDigAreaEffect return 0; } - int x = blockPos.func_178782_a().getX(); //BlockPos - int y = blockPos.func_178782_a().getY(); - int z = blockPos.func_178782_a().getZ(); - EnumFacing sidehit = blockPos.field_178784_b; + int x = blockPos.blockX; + int y = blockPos.blockY; + int z = blockPos.blockZ; for (int xPos = x - 1; xPos <= x + 1; xPos++) { @@ -42,15 +44,85 @@ public class DigAreaEffect implements IDigAreaEffect { for (int zPos = z - 1; zPos <= z + 1; zPos++) { - BlockPos newPos = new BlockPos(xPos, yPos, zPos); - ModItems.customTool.onBlockStartBreak(container, newPos, player); + this.breakBlock(container, world, player, blockHardness, xPos, yPos, zPos, itemTool); } } } return 0; } - + + public void breakBlock(ItemStack container, World world, EntityPlayer player, float blockHardness, int x, int y, int z, ItemSpellMultiTool itemTool) + { + int hlvl = -1; + Block localBlock = world.getBlock(x, y, z); + int localMeta = world.getBlockMetadata(x, y, z); + String toolClass = localBlock.getHarvestTool(localMeta); + if (toolClass != null && itemTool.getHarvestLevel(container, toolClass) != -1) + hlvl = localBlock.getHarvestLevel(localMeta); + int toolLevel = itemTool.getHarvestLevel(container, toolClass); + + float localHardness = localBlock == null ? Float.MAX_VALUE : localBlock.getBlockHardness(world, x, y, z); + + if (hlvl <= toolLevel && localHardness - this.getHardnessDifference() <= blockHardness) + { + boolean cancelHarvest = false; + + if (!cancelHarvest) + { + if (localBlock != null && !(localHardness < 0)) + { + boolean isEffective = false; + + String localToolClass = itemTool.getToolClassForMaterial(localBlock.getMaterial()); + + if (localToolClass != null && itemTool.getHarvestLevel(container, toolClass) >= localBlock.getHarvestLevel(localMeta)) + { + isEffective = true; + } + + if (localBlock.getMaterial().isToolNotRequired()) + { + isEffective = true; + } + + if (!player.capabilities.isCreativeMode) + { + if (isEffective) + { + if (localBlock.removedByPlayer(world, player, x, y, z)) + { + localBlock.onBlockDestroyedByPlayer(world, x, y, z, localMeta); + } + localBlock.onBlockHarvested(world, x, y, z, localMeta, player); + if (localHardness > 0f) + itemTool.onBlockDestroyed(container, world, localBlock, x, y, z, player); + + List<ItemStack> items = SpellHelper.getItemsFromBlock(world, localBlock, x, y, z, localMeta, itemTool.getSilkTouch(container), itemTool.getFortuneLevel(container)); + + SpellParadigmTool parad = itemTool.loadParadigmFromStack(container); + items = parad.handleItemList(container, items); + + if (!world.isRemote) + { + SpellHelper.spawnItemListInWorld(items, world, x + 0.5f, y + 0.5f, z + 0.5f); + } + + world.func_147479_m(x, y, z); + } else + { + } + + } else + { + world.setBlockToAir(x, y, z); + world.func_147479_m(x, y, z); + } + } + } + } + } + public float getHardnessDifference() { return 1.5f; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaTunnel.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaTunnel.java index a946d755..ce304d09 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaTunnel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/DigAreaTunnel.java @@ -6,14 +6,13 @@ import java.util.Random; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class DigAreaTunnel extends DigAreaEffect { @@ -34,17 +33,19 @@ public class DigAreaTunnel extends DigAreaEffect List<Vec3> vectorLine = new LinkedList(); - double initialX = blockPos.func_178782_a().getX(); - double initialY = blockPos.func_178782_a().getY(); - double initialZ = blockPos.func_178782_a().getZ(); - EnumFacing sidehit = blockPos.field_178784_b; - EnumFacing opposite = sidehit.getOpposite(); + double initialX = blockPos.blockX; + double initialY = blockPos.blockY; + double initialZ = blockPos.blockZ; + ForgeDirection sidehit = ForgeDirection.getOrientation(blockPos.sideHit); + ForgeDirection opposite = sidehit.getOpposite(); + + AlchemicalWizardry.logger.info(opposite.toString()); double initialLength = this.getRandomVectorLength(); - Vec3 initialVector = new Vec3(opposite.getFrontOffsetX() * initialLength, opposite.getFrontOffsetY() * initialLength, opposite.getFrontOffsetZ() * initialLength); + Vec3 initialVector = SpellHelper.createVec3(opposite.offsetX * initialLength, opposite.offsetY * initialLength, opposite.offsetZ * initialLength); - Vec3 lastVec = new Vec3(initialVector.xCoord, initialVector.yCoord, initialVector.zCoord); + Vec3 lastVec = SpellHelper.createVec3(initialVector.xCoord, initialVector.yCoord, initialVector.zCoord); vectorLine.add(initialVector); double currentLength = lastVec.lengthVector(); @@ -64,7 +65,9 @@ public class DigAreaTunnel extends DigAreaEffect double length = Math.min(this.getRandomVectorLength(), totalLength - currentLength); - tempVec = new Vec3(tempVec.xCoord * length, tempVec.yCoord * length, tempVec.zCoord * length); + tempVec.xCoord = tempVec.xCoord * length; + tempVec.yCoord = tempVec.yCoord * length; + tempVec.zCoord = tempVec.zCoord * length; vectorLine.add(tempVec); @@ -119,7 +122,6 @@ public class DigAreaTunnel extends DigAreaEffect public void destroySphereOfMundane(World world, double x, double y, double z, int radius) { - BlockPos pos = new BlockPos(MathHelper.floor_double(x), MathHelper.floor_double(y), MathHelper.floor_double(z)); for (int i = -radius; i <= radius; i++) { for (int j = -radius; j <= radius; j++) @@ -131,27 +133,29 @@ public class DigAreaTunnel extends DigAreaEffect continue; } - BlockPos newPos = pos.add(i, j, k); + int newX = (int) (i + x + 0.5); + int newY = (int) (j + y + 0.5); + int newZ = (int) (k + z + 0.5); - this.destroyMunadeAt(world, newPos); + this.destroyMunadeAt(world, newX, newY, newZ); } } } } - public void destroyMunadeAt(World world, BlockPos pos) + public void destroyMunadeAt(World world, int x, int y, int z) { - world.setBlockToAir(pos); + world.setBlockToAir(x, y, z); } public void travelVector(Vec3 vector, World world, double x, double y, double z) { double vecLength = vector.lengthVector(); AlchemicalWizardry.logger.info(vecLength); - Vec3 normVec = new Vec3(vector.xCoord, vector.yCoord, vector.zCoord); + Vec3 normVec = SpellHelper.createVec3(vector.xCoord, vector.yCoord, vector.zCoord); normVec = normVec.normalize(); - Vec3 prevVec = new Vec3(0, 0, 0); + Vec3 prevVec = SpellHelper.createVec3(0, 0, 0); double distanceTravelled = 0; while (distanceTravelled < vecLength) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/RightClickTunnel.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/RightClickTunnel.java index 8051d264..6d53b912 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/RightClickTunnel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/tool/RightClickTunnel.java @@ -6,12 +6,11 @@ import java.util.Random; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class RightClickTunnel extends RightClickEffect { @@ -36,17 +35,17 @@ public class RightClickTunnel extends RightClickEffect List<Vec3> vectorLine = new LinkedList(); - double initialX = mop.func_178782_a().getX(); - double initialY = mop.func_178782_a().getY(); - double initialZ = mop.func_178782_a().getZ(); - EnumFacing sidehit = mop.field_178784_b; - EnumFacing opposite = sidehit.getOpposite(); + double initialX = mop.blockX; + double initialY = mop.blockY; + double initialZ = mop.blockZ; + ForgeDirection sidehit = ForgeDirection.getOrientation(mop.sideHit); + ForgeDirection opposite = sidehit.getOpposite(); double initialLength = this.getRandomVectorLength(); - Vec3 initialVector = new Vec3(opposite.getFrontOffsetX() * initialLength, opposite.getFrontOffsetY() * initialLength, opposite.getFrontOffsetZ() * initialLength); + Vec3 initialVector = SpellHelper.createVec3(opposite.offsetX * initialLength, opposite.offsetY * initialLength, opposite.offsetZ * initialLength); - Vec3 lastVec = new Vec3(initialVector.xCoord, initialVector.yCoord, initialVector.zCoord); + Vec3 lastVec = SpellHelper.createVec3(initialVector.xCoord, initialVector.yCoord, initialVector.zCoord); vectorLine.add(initialVector); double currentLength = lastVec.lengthVector(); @@ -65,8 +64,10 @@ public class RightClickTunnel extends RightClickEffect tempVec = tempVec.normalize(); double length = Math.min(this.getRandomVectorLength(), totalLength - currentLength); - - tempVec = new Vec3(tempVec.xCoord * length, tempVec.yCoord * length, tempVec.zCoord * length); + + tempVec.xCoord = tempVec.xCoord * length; + tempVec.yCoord = tempVec.yCoord * length; + tempVec.zCoord = tempVec.zCoord * length; vectorLine.add(tempVec); @@ -127,7 +128,6 @@ public class RightClickTunnel extends RightClickEffect public void destroySphereOfMundane(World world, double x, double y, double z, int radius) { - BlockPos pos = new BlockPos(MathHelper.floor_double(x), MathHelper.floor_double(y), MathHelper.floor_double(z)); for (int i = -radius; i <= radius; i++) { for (int j = -radius; j <= radius; j++) @@ -139,27 +139,29 @@ public class RightClickTunnel extends RightClickEffect continue; } - BlockPos newPos = pos.add(i, j, k); + int newX = (int) (i + x + 0.5); + int newY = (int) (j + y + 0.5); + int newZ = (int) (k + z + 0.5); - this.destroyMunadeAt(world, newPos); + this.destroyMunadeAt(world, newX, newY, newZ); } } } } - public void destroyMunadeAt(World world, BlockPos pos) + public void destroyMunadeAt(World world, int x, int y, int z) { - world.setBlockToAir(pos); + world.setBlockToAir(x, y, z); } public void travelVector(Vec3 vector, World world, double x, double y, double z) { double vecLength = vector.lengthVector(); - Vec3 normVec = new Vec3(vector.xCoord, vector.yCoord, vector.zCoord); + Vec3 normVec = SpellHelper.createVec3(vector.xCoord, vector.yCoord, vector.zCoord); normVec = normVec.normalize(); - Vec3 prevVec = new Vec3(0, 0, 0); + Vec3 prevVec = SpellHelper.createVec3(0, 0, 0); double distanceTravelled = 0; while (distanceTravelled < vecLength) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeEnvironmentalWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeEnvironmentalWind.java index 36d9c5c6..ddd90274 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeEnvironmentalWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/MeleeEnvironmentalWind.java @@ -1,14 +1,13 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; -import java.util.List; - +import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.spell.MeleeSpellCenteredWorldEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + +import java.util.List; public class MeleeEnvironmentalWind extends MeleeSpellCenteredWorldEffect { @@ -19,18 +18,18 @@ public class MeleeEnvironmentalWind extends MeleeSpellCenteredWorldEffect } @Override - public void onCenteredWorldEffect(EntityPlayer player, World world, BlockPos pos) + public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ) { int radius = 5 * this.potencyUpgrades + 3; - List<Entity> entities = SpellHelper.getEntitiesInRange(world, pos.getX(), pos.getY(), pos.getZ(), radius, radius); + List<Entity> entities = SpellHelper.getEntitiesInRange(world, posX, posY, posZ, radius, radius); for (Entity entity : entities) { if (entity instanceof EntityItem) { - ((EntityItem) entity).setPickupDelay(0); - entity.onCollideWithPlayer((EntityPlayer) player); + ((EntityItem) entity).delayBeforeCanPickup = 0; + entity.onCollideWithPlayer(player); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileDefaultWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileDefaultWind.java index 862b7193..111028dd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileDefaultWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileDefaultWind.java @@ -15,16 +15,13 @@ public class ProjectileDefaultWind extends ProjectileImpactEffect @Override public void onEntityImpact(Entity mop, Entity proj) { - float wantedYVel = (float) ((0.5) * (0.5 * this.potencyUpgrades + 1)); - mop.motionX = proj.motionX; - mop.motionY = mop.motionY += wantedYVel; mop.motionZ = proj.motionZ; } @Override public void onTileImpact(World world, MovingObjectPosition mop) { - return; + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileEnvironmentalWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileEnvironmentalWind.java index a647f34c..e9d53d3d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileEnvironmentalWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileEnvironmentalWind.java @@ -1,14 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; -import java.util.List; - +import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; +import WayofTime.alchemicalWizardry.api.spell.ProjectileUpdateEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile; -import WayofTime.alchemicalWizardry.api.spell.ProjectileUpdateEffect; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + +import java.util.List; public class ProjectileEnvironmentalWind extends ProjectileUpdateEffect { @@ -37,12 +37,14 @@ public class ProjectileEnvironmentalWind extends ProjectileUpdateEffect { if (entity instanceof EntityItem) { - ((EntityItem) entity).setPickupDelay(0); + ((EntityItem) entity).delayBeforeCanPickup = 0; entity.onCollideWithPlayer((EntityPlayer) shooter); } } } } } + + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileOffensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileOffensiveWind.java index 35f1aaf4..691f8cdd 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileOffensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ProjectileOffensiveWind.java @@ -1,6 +1,7 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.potion.PotionEffect; import net.minecraft.util.MovingObjectPosition; @@ -10,7 +11,6 @@ import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect; public class ProjectileOffensiveWind extends ProjectileImpactEffect { - public ProjectileOffensiveWind(int power, int potency, int cost) { super(power, potency, cost); @@ -21,13 +21,13 @@ public class ProjectileOffensiveWind extends ProjectileImpactEffect { if (mop instanceof EntityLivingBase) { - ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, (int) (100 * (2 * this.powerUpgrades + 1) * (1 / (this.potencyUpgrades + 1))), this.potencyUpgrades)); + ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, (100 * (2 * this.powerUpgrades + 1) * (1 / (this.potencyUpgrades + 1))), this.potencyUpgrades)); } } @Override public void onTileImpact(World world, MovingObjectPosition mop) { - return; + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolDefensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolDefensiveWind.java index 15745deb..261209b5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolDefensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolDefensiveWind.java @@ -7,7 +7,6 @@ import net.minecraft.util.Vec3; public class ToolDefensiveWind extends LeftClickEffect { - public ToolDefensiveWind(int power, int potency, int cost) { super(power, potency, cost); @@ -17,8 +16,8 @@ public class ToolDefensiveWind extends LeftClickEffect public int onLeftClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder) { Vec3 vec = weilder.getLookVec(); - vec = vec.subtract(0, vec.yCoord, 0); - vec = vec.normalize(); + vec.yCoord = 0; + vec.normalize(); float velocity = 0.5f * (1 + this.powerUpgrades * 0.8f); float ratio = 0.1f + 0.3f * this.potencyUpgrades; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolEnvironmentalWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolEnvironmentalWind.java index 7a1d461a..b325fc36 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolEnvironmentalWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolEnvironmentalWind.java @@ -1,17 +1,15 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind; -import java.util.List; - +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.OnBreakBlockEffect; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.OnBreakBlockEffect; +import net.minecraftforge.common.util.ForgeDirection; + +import java.util.List; public class ToolEnvironmentalWind extends OnBreakBlockEffect { @@ -21,23 +19,21 @@ public class ToolEnvironmentalWind extends OnBreakBlockEffect } @Override - public int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, IBlockState state, BlockPos pos, EnumFacing sideBroken) + public int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, int meta, int x, int y, int z, ForgeDirection sideBroken) { double vertRange = 0.5 + (this.powerUpgrades * this.powerUpgrades + this.powerUpgrades) / 2; - double horizRange = vertRange; - List<EntityItem> itemList = SpellHelper.getItemsInRange(world, pos.getX() + 0.5f, pos.getY() + 0.5f, pos.getZ() + 0.5f, horizRange, vertRange); + List<EntityItem> itemList = SpellHelper.getItemsInRange(world, x + 0.5f, y + 0.5f, z + 0.5f, vertRange, vertRange); for (EntityItem entity : itemList) { if (!world.isRemote) { - entity.setPickupDelay(0); + entity.delayBeforeCanPickup = 0; entity.onCollideWithPlayer(player); } } return 0; } - } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolOffensiveWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolOffensiveWind.java index 07be3f79..df508e7d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolOffensiveWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/wind/ToolOffensiveWind.java @@ -16,7 +16,7 @@ public class ToolOffensiveWind extends LeftClickEffect @Override public int onLeftClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder) { - attacked.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, (int) (100 * (2 * this.powerUpgrades + 1) * (1 / (this.potencyUpgrades + 1))), this.potencyUpgrades)); + attacked.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, (100 * (2 * this.powerUpgrades + 1) * (1 / (this.potencyUpgrades + 1))), this.potencyUpgrades)); return (int) (100 * (0.5 * this.potencyUpgrades + 1) * (this.powerUpgrades + 1) * Math.pow(0.85, costUpgrades)); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellComponent.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellComponent.java index 41cfcaab..d4b7e0bb 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellComponent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/HomSpellComponent.java @@ -6,7 +6,6 @@ public class HomSpellComponent { public HomSpell spell; public ItemStack item; - public int blockID; public HomSpellComponent(ItemStack item, HomSpell spell) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/ISimpleSpell.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/ISimpleSpell.java index 77a8799d..01c70978 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/ISimpleSpell.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/ISimpleSpell.java @@ -6,11 +6,11 @@ import net.minecraft.world.World; public interface ISimpleSpell { - public abstract ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); + ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); - public abstract ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); + ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); - public abstract ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); + ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); - public abstract ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); + ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java index e4c6f282..94d6bf35 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellEarthBender.java @@ -1,18 +1,15 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import java.util.Random; - -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import net.minecraft.block.state.IBlockState; +import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile; -import WayofTime.alchemicalWizardry.common.items.BindableItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + +import java.util.Random; public class SpellEarthBender extends HomSpell { @@ -25,132 +22,133 @@ public class SpellEarthBender extends HomSpell } @Override - public ItemStack onOffensiveRangedRightClick(ItemStack stack, World world, EntityPlayer player) + public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { - return stack; + return par1ItemStack; } - if (!player.capabilities.isCreativeMode) + if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveRangedEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } - world.spawnEntityInWorld(new MudProjectile(world, player, 8, false)); - world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - return stack; + par2World.spawnEntityInWorld(new MudProjectile(par2World, par3EntityPlayer, 8, false)); + par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); + return par1ItemStack; } @Override - public ItemStack onOffensiveMeleeRightClick(ItemStack stack, World world, EntityPlayer player) + public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { - return stack; + return par1ItemStack; } - if (!player.capabilities.isCreativeMode) + if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveMeleeEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } - if (!world.isRemote) + if (!par2World.isRemote) { for (int i = -1; i <= 1; i++) { for (int j = -1; j <= 1; j++) { - world.spawnEntityInWorld(new MudProjectile(world, player, 3, 3, player.posX, player.posY + player.getEyeHeight(), player.posZ, player.rotationYaw + i * 10F, player.rotationPitch + j * 5F, true)); + par2World.spawnEntityInWorld(new MudProjectile(par2World, par3EntityPlayer, 3, 3, par3EntityPlayer.posX, par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight(), par3EntityPlayer.posZ, par3EntityPlayer.rotationYaw + i * 10F, par3EntityPlayer.rotationPitch + j * 5F, true)); } } } - return stack; + return par1ItemStack; } @Override - public ItemStack onDefensiveRightClick(ItemStack stack, World world, EntityPlayer player) + public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { - return stack; + return par1ItemStack; } - if (!player.capabilities.isCreativeMode) + if (!par3EntityPlayer.capabilities.isCreativeMode) { - SoulNetworkHandler.syphonAndDamageFromNetwork(stack, player, this.getDefensiveEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); } - double xCoord = player.posX; - double yCoord = player.posY; - double zCoord = player.posZ; + double xCoord = par3EntityPlayer.posX; + double yCoord = par3EntityPlayer.posY; + double zCoord = par3EntityPlayer.posZ; int posX = (int) xCoord; int posY = (int) yCoord; int posZ = (int) zCoord; - BlockPos pos = player.getPosition(); - IBlockState blockID = Blocks.stone.getDefaultState(); + Block blockID = Blocks.stone; - if (world.isAirBlock(pos.offsetUp(3))) + if (par2World.isAirBlock(posX, posY + 3, posZ)) { - world.setBlockState(pos.offsetUp(3), Blocks.glass.getDefaultState()); + par2World.setBlock(posX, posY + 3, posZ, Blocks.glass); } for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { - if (world.isAirBlock(new BlockPos(posX + i - 1, posY + j, posZ - 2))) + if (par2World.isAirBlock(posX + i - 1, posY + j, posZ - 2)) { - world.setBlockState(new BlockPos(posX + i - 1, posY + j, posZ - 2), blockID); + par2World.setBlock(posX + i - 1, posY + j, posZ - 2, blockID); } - if (world.isAirBlock(new BlockPos(posX + 2, posY + j, posZ - 1 + i))) + if (par2World.isAirBlock(posX + 2, posY + j, posZ - 1 + i)) { - world.setBlockState(new BlockPos(posX + 2, posY + j, posZ - 1 + i), blockID); + par2World.setBlock(posX + 2, posY + j, posZ - 1 + i, blockID); } - if (world.isAirBlock(new BlockPos(posX - i + 1, posY + j, posZ + 2))) + if (par2World.isAirBlock(posX - i + 1, posY + j, posZ + 2)) { - world.setBlockState(new BlockPos(posX - i + 1, posY + j, posZ + 2), blockID); + par2World.setBlock(posX - i + 1, posY + j, posZ + 2, blockID); } - if (world.isAirBlock(new BlockPos(posX - 2, posY + j, posZ + 1 - i))) + if (par2World.isAirBlock(posX - 2, posY + j, posZ + 1 - i)) { - world.setBlockState(new BlockPos(posX - 2, posY + j, posZ + 1 - i), blockID); + par2World.setBlock(posX - 2, posY + j, posZ + 1 - i, blockID); } - if (world.isAirBlock(new BlockPos(posX - 1 + i, posY + 3, posZ - 1 + j))) { - world.setBlockState(new BlockPos(posX - 1 + i, posY + 3, posZ - 1 + j), blockID); + if (par2World.isAirBlock(posX - 1 + i, posY + 3, posZ - 1 + j)) + { + par2World.setBlock(posX - 1 + i, posY + 3, posZ - 1 + j, blockID); + } } } } for (int i = 0; i < 20; i++) { - SpellHelper.sendParticleToAllAround(world, xCoord, yCoord, zCoord, 30, world.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); } - return stack; + return par1ItemStack; } @Override - public ItemStack onEnvironmentalRightClick(ItemStack stack, World world, EntityPlayer player) + public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { - return stack; + return par1ItemStack; } - if (!player.capabilities.isCreativeMode) + if (!par3EntityPlayer.capabilities.isCreativeMode) { - SoulNetworkHandler.syphonAndDamageFromNetwork(stack, player, this.getEnvironmentalEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); } int range = 3; - if (!world.isRemote) + if (!par2World.isRemote) { for (int i = -range; i <= range; i++) { @@ -158,17 +156,16 @@ public class SpellEarthBender extends HomSpell { for (int k = -range; k <= range; k++) { - BlockPos pos = player.getPosition().add(i, j, k); - if (world.getBlockState(pos).getBlock() == Blocks.water || world.getBlockState(pos).getBlock() == Blocks.flowing_water) + if (par2World.getBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k) == Blocks.water || par2World.getBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k) == Blocks.flowing_water) { - int x = world.rand.nextInt(2); + int x = par2World.rand.nextInt(2); if (x == 0) { - world.setBlockState(pos, Blocks.sand.getDefaultState()); + par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k, Blocks.sand); } else { - world.setBlockState(pos, Blocks.dirt.getDefaultState()); + par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k, Blocks.dirt); } } } @@ -176,15 +173,15 @@ public class SpellEarthBender extends HomSpell } } - double xCoord = player.posX; - double yCoord = player.posY; - double zCoord = player.posZ; + double xCoord = par3EntityPlayer.posX; + double yCoord = par3EntityPlayer.posY; + double zCoord = par3EntityPlayer.posZ; for (int i = 0; i < 16; i++) { - SpellHelper.sendParticleToAllAround(world, xCoord, yCoord, zCoord, 30, world.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); } - return stack; + return par1ItemStack; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellExplosions.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellExplosions.java index e5c4a333..4bf48cf2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellExplosions.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellExplosions.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.common.spell.simple; import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -21,14 +21,14 @@ public class SpellExplosions extends HomSpell @Override public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); @@ -44,14 +44,14 @@ public class SpellExplosions extends HomSpell @Override public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } int distance = 4; @@ -64,14 +64,14 @@ public class SpellExplosions extends HomSpell @Override public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); } int distance = 4; @@ -82,14 +82,14 @@ public class SpellExplosions extends HomSpell @Override public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); } int radius = 3; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java index f8b23fdc..7e030d91 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFireBurst.java @@ -1,19 +1,18 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import java.util.Iterator; -import java.util.List; -import java.util.Random; - +import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile; -import WayofTime.alchemicalWizardry.common.items.BindableItems; + +import java.util.Iterator; +import java.util.List; +import java.util.Random; public class SpellFireBurst extends HomSpell { @@ -26,75 +25,75 @@ public class SpellFireBurst extends HomSpell } @Override - public ItemStack onOffensiveRangedRightClick(ItemStack stack, World world, EntityPlayer player) + public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { - return stack; + return par1ItemStack; } - if (!player.capabilities.isCreativeMode) + if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveRangedEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } - world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); + par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - if (!world.isRemote) + if (!par2World.isRemote) { - FireProjectile proj = new FireProjectile(world, player, 7); - world.spawnEntityInWorld(proj); + FireProjectile proj = new FireProjectile(par2World, par3EntityPlayer, 7); + par2World.spawnEntityInWorld(proj); } - return stack; + return par1ItemStack; } @Override - public ItemStack onOffensiveMeleeRightClick(ItemStack stack, World world, EntityPlayer player) + public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { - return stack; + return par1ItemStack; } - if (!player.capabilities.isCreativeMode) + if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveMeleeEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } - world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); + par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - if (!world.isRemote) + if (!par2World.isRemote) { for (int i = -1; i <= 1; i++) { for (int j = -1; j <= 1; j++) { - world.spawnEntityInWorld(new FireProjectile(world, player, 8, 2, player.posX, player.posY + player.getEyeHeight(), player.posZ, player.rotationYaw + i * 10F, player.rotationPitch + j * 10F)); + par2World.spawnEntityInWorld(new FireProjectile(par2World, par3EntityPlayer, 8, 2, par3EntityPlayer.posX, par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight(), par3EntityPlayer.posZ, par3EntityPlayer.rotationYaw + i * 10F, par3EntityPlayer.rotationPitch + j * 10F)); } } } - return stack; + return par1ItemStack; } @Override - public ItemStack onDefensiveRightClick(ItemStack stack, World world, EntityPlayer player) + public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { - return stack; + return par1ItemStack; } - if (!player.capabilities.isCreativeMode) + if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getDefensiveEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); } - world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); + par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); int d0 = 2; - AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) player.posX, (double) player.posY, (double) player.posZ, (double) (player.posX + 1), (double) (player.posY + 2), (double) (player.posZ + 1)).expand(d0, d0, d0); - List list = player.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (par3EntityPlayer.posX + 1), (par3EntityPlayer.posY + 2), (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); + List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); while (iterator.hasNext()) @@ -103,7 +102,7 @@ public class SpellFireBurst extends HomSpell if (entityLiving instanceof EntityPlayer) { - if (entityLiving.equals(player)) + if (entityLiving.equals(par3EntityPlayer)) { continue; } @@ -112,24 +111,23 @@ public class SpellFireBurst extends HomSpell entityLiving.setFire(100); entityLiving.attackEntityFrom(DamageSource.inFire, 2); } - return stack; + return par1ItemStack; } @Override - public ItemStack onEnvironmentalRightClick(ItemStack stack, World world, EntityPlayer player) + public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { - return stack; + return par1ItemStack; } - if (!player.capabilities.isCreativeMode) + if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getEnvironmentalEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); } - world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - World worldObj = world; + par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); for (int i = -1; i <= 1; i++) { @@ -137,18 +135,17 @@ public class SpellFireBurst extends HomSpell { for (int k = -1; k <= 1; k++) { - BlockPos pos = player.getPosition().add(i, k, k); - if (worldObj.isAirBlock(pos)) + if (par2World.isAirBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k)) { - if (worldObj.rand.nextFloat() < 0.8F) + if (par2World.rand.nextFloat() < 0.8F) { - worldObj.setBlockState(pos, Blocks.fire.getDefaultState()); + par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k, Blocks.fire); } } } } } - return stack; + return par1ItemStack; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java index 10cf5ccb..8d3e8873 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellFrozenWater.java @@ -1,15 +1,14 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import java.util.Random; - -import net.minecraft.block.state.IBlockState; +import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile; -import WayofTime.alchemicalWizardry.common.items.BindableItems; + +import java.util.Random; public class SpellFrozenWater extends HomSpell { @@ -22,63 +21,60 @@ public class SpellFrozenWater extends HomSpell } @Override - public ItemStack onOffensiveRangedRightClick(ItemStack stack, World world, EntityPlayer player) + public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { - return stack; + return par1ItemStack; } - if (!player.capabilities.isCreativeMode) + if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveRangedEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } - world.playSoundAtEntity(player, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); + par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - if (!world.isRemote) + if (!par2World.isRemote) { - world.spawnEntityInWorld(new IceProjectile(world, player, 6)); + par2World.spawnEntityInWorld(new IceProjectile(par2World, par3EntityPlayer, 6)); } - return stack; + return par1ItemStack; } @Override - public ItemStack onOffensiveMeleeRightClick(ItemStack stack, World world, EntityPlayer player) + public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { - return stack; + return par1ItemStack; } - if (!player.capabilities.isCreativeMode) + if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(stack, player, this.getOffensiveMeleeEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } for (int i = -2; i <= 2; i++) { - world.spawnEntityInWorld(new IceProjectile(world, player, 6, 2, player.posX, player.posY + player.getEyeHeight(), player.posZ, player.rotationYaw + i * 5F, player.rotationPitch)); + par2World.spawnEntityInWorld(new IceProjectile(par2World, par3EntityPlayer, 6, 2, par3EntityPlayer.posX, par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight(), par3EntityPlayer.posZ, par3EntityPlayer.rotationYaw + i * 5F, par3EntityPlayer.rotationPitch)); } - return stack; + return par1ItemStack; } @Override - public ItemStack onDefensiveRightClick(ItemStack stack, World world, EntityPlayer player) + public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!player.capabilities.isCreativeMode) + if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(stack, player, getDefensiveEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, getDefensiveEnergy()); } - float yaw = player.rotationYaw; - float pitch = player.rotationPitch; + float yaw = par3EntityPlayer.rotationYaw; + float pitch = par3EntityPlayer.rotationPitch; int range = 2; - - BlockPos pos = player.getPosition(); - BlockPos newPos = pos; if (pitch > 40F) { @@ -86,32 +82,28 @@ public class SpellFrozenWater extends HomSpell { for (int j = -range; j <= range; j++) { - newPos = pos.add(i, -1, j); - - if (world.isAirBlock(newPos)) + if (par2World.isAirBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY - 1, (int) par3EntityPlayer.posZ + j)) { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); + par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY - 1, (int) par3EntityPlayer.posZ + j, Blocks.ice); } } } - return stack; + return par1ItemStack; } else if (pitch < -40F) { for (int i = -range; i <= range; i++) { for (int j = -range; j <= range; j++) { - newPos = pos.add(i, 3, j); - - if (world.isAirBlock(newPos)) + if (par2World.isAirBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + 3, (int) par3EntityPlayer.posZ + j)) { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); + par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + 3, (int) par3EntityPlayer.posZ + j, Blocks.ice); } } } - return stack; + return par1ItemStack; } if ((yaw >= 315 && yaw < 360) || (yaw >= 0 && yaw < 45)) @@ -120,11 +112,9 @@ public class SpellFrozenWater extends HomSpell { for (int j = 0; j < range * 2 + 1; j++) { - newPos = pos.add(i, j, 2); - - if (world.isAirBlock(newPos)) + if (par2World.isAirBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + 2)) { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); + par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + 2, Blocks.ice); } } } @@ -134,11 +124,9 @@ public class SpellFrozenWater extends HomSpell { for (int j = 0; j < range * 2 + 1; j++) { - newPos = pos.add(-2, j, i); - - if (world.isAirBlock(newPos)) + if (par2World.isAirBlock((int) par3EntityPlayer.posX - 2, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + i)) { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); + par2World.setBlock((int) par3EntityPlayer.posX - 2, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + i, Blocks.ice); } } } @@ -148,11 +136,9 @@ public class SpellFrozenWater extends HomSpell { for (int j = 0; j < range * 2 + 1; j++) { - newPos = pos.add(i, j, -2); - - if (world.isAirBlock(newPos)) + if (par2World.isAirBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ - 2)) { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); + par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ - 2, Blocks.ice); } } } @@ -162,31 +148,26 @@ public class SpellFrozenWater extends HomSpell { for (int j = 0; j < range * 2 + 1; j++) { - newPos = pos.add(2, j, i); - - if (world.isAirBlock(newPos)) + if (par2World.isAirBlock((int) par3EntityPlayer.posX + 2, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + i)) { - world.setBlockState(newPos, Blocks.ice.getDefaultState()); + par2World.setBlock((int) par3EntityPlayer.posX + 2, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + i, Blocks.ice); } } } } - return stack; + return par1ItemStack; } @Override - public ItemStack onEnvironmentalRightClick(ItemStack stack, World world, EntityPlayer player) + public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(stack, player) || player.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { - return stack; + return par1ItemStack; } int radius = 3; - int posX = (int) player.posX; - int posY = (int) player.posY; - int posZ = (int) player.posZ; for (int i = -radius; i <= radius; i++) { @@ -194,16 +175,14 @@ public class SpellFrozenWater extends HomSpell { for (int k = -radius; k <= radius; k++) { - BlockPos pos = player.getPosition().add(i, j, k); - - IBlockState state = world.getBlockState(pos); - if (state.getBlock() == Blocks.water || state.getBlock() == Blocks.flowing_water) + Block block = par2World.getBlock((int) par3EntityPlayer.posX + i - 1, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k); + if (block == Blocks.water || block == Blocks.flowing_water) { - world.setBlockState(pos, Blocks.ice.getDefaultState()); + par2World.setBlock((int) par3EntityPlayer.posX + i - 1, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k, Blocks.ice); } } } } - return stack; + return par1ItemStack; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java index f837d538..3102ba88 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellHolyBlast.java @@ -1,14 +1,13 @@ package WayofTime.alchemicalWizardry.common.spell.simple; import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; import java.util.Iterator; @@ -28,14 +27,14 @@ public class SpellHolyBlast extends HomSpell @Override public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); @@ -51,14 +50,14 @@ public class SpellHolyBlast extends HomSpell @Override public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } int distance = 2; @@ -68,7 +67,7 @@ public class SpellHolyBlast extends HomSpell double yCoord = par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance; double zCoord = par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance; float d0 = 0.5f; - AxisAlignedBB axisalignedbb = new AxisAlignedBB(par3EntityPlayer.posX - 0.5 + Math.sin(yaw) * Math.cos(pitch) * (-distance), par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance, par3EntityPlayer.posZ - 0.5 + Math.cos(yaw) * Math.cos(pitch) * distance, par3EntityPlayer.posX + Math.sin(yaw) * Math.cos(pitch) * (-distance) + 0.5, par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance + 1, par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance + 0.5).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX - 0.5 + Math.sin(yaw) * Math.cos(pitch) * (-distance), par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance, par3EntityPlayer.posZ - 0.5 + Math.cos(yaw) * Math.cos(pitch) * distance, par3EntityPlayer.posX + Math.sin(yaw) * Math.cos(pitch) * (-distance) + 0.5, par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance + 1, par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance + 0.5).expand(d0, d0, d0); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); @@ -97,7 +96,7 @@ public class SpellHolyBlast extends HomSpell for (int i = 0; i < 5; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F); } return par1ItemStack; @@ -106,14 +105,14 @@ public class SpellHolyBlast extends HomSpell @Override public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); } if (!par2World.isRemote) @@ -130,18 +129,18 @@ public class SpellHolyBlast extends HomSpell @Override public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); } int d0 = 3; - AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (par3EntityPlayer.posX + 1), (par3EntityPlayer.posY + 2), (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); @@ -173,7 +172,7 @@ public class SpellHolyBlast extends HomSpell for (int i = 0; i < 20; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F); } return par1ItemStack; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java index e2f4cb5c..7dac5a82 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellLightningBolt.java @@ -1,12 +1,11 @@ package WayofTime.alchemicalWizardry.common.spell.simple; import WayofTime.alchemicalWizardry.common.entity.projectile.LightningBoltProjectile; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; import java.util.Random; @@ -24,14 +23,14 @@ public class SpellLightningBolt extends HomSpell @Override public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); @@ -48,14 +47,14 @@ public class SpellLightningBolt extends HomSpell public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { //TODO Make it work better...? - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } double xCoord = par3EntityPlayer.posX; @@ -73,7 +72,7 @@ public class SpellLightningBolt extends HomSpell for (int i = 0; i < 5; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F); } return par1ItemStack; @@ -82,14 +81,14 @@ public class SpellLightningBolt extends HomSpell @Override public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); } double xCoord = par3EntityPlayer.posX; @@ -103,7 +102,7 @@ public class SpellLightningBolt extends HomSpell for (int i = 0; i < 8; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F); } return par1ItemStack; @@ -112,14 +111,14 @@ public class SpellLightningBolt extends HomSpell @Override public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); } if (!par2World.isRemote) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java index a4158eaf..d588fcbe 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellTeleport.java @@ -1,29 +1,26 @@ package WayofTime.alchemicalWizardry.common.spell.simple; +import WayofTime.alchemicalWizardry.common.entity.projectile.TeleportProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.living.EnderTeleportEvent; + import java.util.Iterator; import java.util.List; import java.util.Random; -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.monster.EntityEnderman; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.living.EnderTeleportEvent; -import WayofTime.alchemicalWizardry.common.entity.projectile.TeleportProjectile; -import WayofTime.alchemicalWizardry.common.items.BindableItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - public class SpellTeleport extends HomSpell { - public static Random itemRand = new Random(); + Random itemRand = new Random(); public SpellTeleport() { @@ -34,33 +31,32 @@ public class SpellTeleport extends HomSpell @Override public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.spawnEntityInWorld(new TeleportProjectile(par2World, par3EntityPlayer, 8, true)); par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - EntityEnderman g; return par1ItemStack; } @Override public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } par2World.spawnEntityInWorld(new TeleportProjectile(par2World, par3EntityPlayer, 8, false)); @@ -70,14 +66,14 @@ public class SpellTeleport extends HomSpell @Override public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); } double xCoord = par3EntityPlayer.posX; @@ -87,7 +83,7 @@ public class SpellTeleport extends HomSpell for (int i = 0; i < 20; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.PORTAL, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, itemRand.nextFloat(), itemRand.nextFloat(), itemRand.nextFloat()); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "portal", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, itemRand.nextFloat(), itemRand.nextFloat(), itemRand.nextFloat()); } return par1ItemStack; @@ -96,20 +92,20 @@ public class SpellTeleport extends HomSpell @Override public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); } if (!par2World.isRemote) { int d0 = 3; - AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (par3EntityPlayer.posX + 1), (par3EntityPlayer.posY + 2), (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); @@ -134,7 +130,7 @@ public class SpellTeleport extends HomSpell for (int i = 0; i < 32; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.PORTAL, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, itemRand.nextFloat(), itemRand.nextFloat(), itemRand.nextFloat()); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "portal", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, itemRand.nextFloat(), itemRand.nextFloat(), itemRand.nextFloat()); } return par1ItemStack; @@ -147,14 +143,14 @@ public class SpellTeleport extends HomSpell double z = entityLiving.posZ; Random rand = new Random(); double d0 = x + (rand.nextDouble() - 0.5D) * distance; - double d1 = y + (double) (rand.nextInt((int) distance) - (distance) / 2); + double d1 = y + (rand.nextInt((int) distance) - (distance) / 2); double d2 = z + (rand.nextDouble() - 0.5D) * distance; int i = 0; while (!SpellTeleport.teleportTo(entityLiving, d0, d1, d2, x, y, z) && i < 100) { d0 = x + (rand.nextDouble() - 0.5D) * distance; - d1 = y + (double) (rand.nextInt((int) distance) - (distance) / 2); + d1 = y + (rand.nextInt((int) distance) - (distance) / 2); d2 = z + (rand.nextDouble() - 0.5D) * distance; i++; } @@ -169,42 +165,43 @@ public class SpellTeleport extends HomSpell private static boolean teleportTo(EntityLivingBase entityLiving, double par1, double par3, double par5, double lastX, double lastY, double lastZ) { - net.minecraftforge.event.entity.living.EnderTeleportEvent event = new net.minecraftforge.event.entity.living.EnderTeleportEvent(entityLiving, par1, par3, par5, 0); - if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) return false; - double d3 = entityLiving.posX; - double d4 = entityLiving.posY; - double d5 = entityLiving.posZ; - entityLiving.posX = event.targetX; - entityLiving.posY = event.targetY; - entityLiving.posZ = event.targetZ; - boolean flag = false; - BlockPos blockpos = new BlockPos(entityLiving.posX, entityLiving.posY, entityLiving.posZ); + EnderTeleportEvent event = new EnderTeleportEvent(entityLiving, par1, par3, par5, 0); - if (entityLiving.worldObj.isBlockLoaded(blockpos)) + if (MinecraftForge.EVENT_BUS.post(event)) + { + return false; + } + + SpellTeleport.moveEntityViaTeleport(entityLiving, event.targetX, event.targetY, event.targetZ); + boolean flag = false; + int i = MathHelper.floor_double(entityLiving.posX); + int j = MathHelper.floor_double(entityLiving.posY); + int k = MathHelper.floor_double(entityLiving.posZ); + Block l; + + if (entityLiving.worldObj.blockExists(i, j, k)) { boolean flag1 = false; - while (!flag1 && blockpos.getY() > 0) + while (!flag1 && j > 0) { - BlockPos blockpos1 = blockpos.offsetDown(); - Block block = entityLiving.worldObj.getBlockState(blockpos1).getBlock(); + l = entityLiving.worldObj.getBlock(i, j - 1, k); - if (block.getMaterial().blocksMovement()) + if (l != null && l.getMaterial().blocksMovement()) { flag1 = true; - } - else + } else { --entityLiving.posY; - blockpos = blockpos1; + --j; } } if (flag1) { - entityLiving.setPositionAndUpdate(entityLiving.posX, entityLiving.posY, entityLiving.posZ); + SpellTeleport.moveEntityViaTeleport(entityLiving, entityLiving.posX, entityLiving.posY, entityLiving.posZ); - if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.getEntityBoundingBox()).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.getEntityBoundingBox())) + if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.boundingBox)) { flag = true; } @@ -213,27 +210,23 @@ public class SpellTeleport extends HomSpell if (!flag) { - entityLiving.setPosition(d3, d4, d5); + SpellTeleport.moveEntityViaTeleport(entityLiving, lastX, lastY, lastZ); return false; - } - else + } else { short short1 = 128; - for (int i = 0; i < short1; ++i) + for (j = 0; j < short1; ++j) { - double d9 = (double)i / ((double)short1 - 1.0D); - float f = (itemRand.nextFloat() - 0.5F) * 0.2F; - float f1 = (itemRand.nextFloat() - 0.5F) * 0.2F; - float f2 = (itemRand.nextFloat() - 0.5F) * 0.2F; - double d6 = d3 + (entityLiving.posX - d3) * d9 + (itemRand.nextDouble() - 0.5D) * (double)entityLiving.width * 2.0D; - double d7 = d4 + (entityLiving.posY - d4) * d9 + itemRand.nextDouble() * (double)entityLiving.height; - double d8 = d5 + (entityLiving.posZ - d5) * d9 + (itemRand.nextDouble() - 0.5D) * (double)entityLiving.width * 2.0D; - entityLiving.worldObj.spawnParticle(EnumParticleTypes.PORTAL, d6, d7, d8, (double)f, (double)f1, (double)f2, new int[0]); + double d6 = (double) j / ((double) short1 - 1.0D); + float f = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; + float f1 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; + float f2 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; + double d7 = lastX + (entityLiving.posX - lastX) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; + double d8 = lastY + (entityLiving.posY - lastY) * d6 + entityLiving.worldObj.rand.nextDouble() * (double) entityLiving.height; + double d9 = lastZ + (entityLiving.posZ - lastZ) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; + entityLiving.worldObj.spawnParticle("portal", d7, d8, d9, (double) f, (double) f1, (double) f2); } - - entityLiving.worldObj.playSoundEffect(d3, d4, d5, "mob.endermen.portal", 1.0F, 1.0F); - entityLiving.playSound("mob.endermen.portal", 1.0F, 1.0F); return true; } } @@ -253,7 +246,7 @@ public class SpellTeleport extends HomSpell { if (entityLiving.isRiding()) { - entityLiving.mountEntity((Entity) null); + entityLiving.mountEntity(null); } entityLiving.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java index 054538fe..3b9bc15c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWateryGrave.java @@ -1,23 +1,21 @@ package WayofTime.alchemicalWizardry.common.spell.simple; -import java.util.Iterator; -import java.util.List; -import java.util.Random; - +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile; -import WayofTime.alchemicalWizardry.common.items.BindableItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; + +import java.util.Iterator; +import java.util.List; +import java.util.Random; public class SpellWateryGrave extends HomSpell { @@ -32,14 +30,14 @@ public class SpellWateryGrave extends HomSpell @Override public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.spawnEntityInWorld(new WaterProjectile(par2World, par3EntityPlayer, 8)); @@ -50,14 +48,14 @@ public class SpellWateryGrave extends HomSpell @Override public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } if (!par2World.isRemote) @@ -77,18 +75,18 @@ public class SpellWateryGrave extends HomSpell @Override public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); } int d0 = 3; - AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (par3EntityPlayer.posX + 1), (par3EntityPlayer.posY + 2), (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); @@ -121,7 +119,7 @@ public class SpellWateryGrave extends HomSpell for (int i = 0; i < 20; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); } return par1ItemStack; @@ -130,14 +128,14 @@ public class SpellWateryGrave extends HomSpell @Override public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); } int range = 2; @@ -148,10 +146,9 @@ public class SpellWateryGrave extends HomSpell { for (int j = -range; j <= range; j++) { - BlockPos newPos = new BlockPos((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY, (int) par3EntityPlayer.posZ + j); - if (par2World.isAirBlock(newPos)) + if (par2World.isAirBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY, (int) par3EntityPlayer.posZ + j)) { - par2World.setBlockState(newPos, Blocks.water.getDefaultState()); + par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY, (int) par3EntityPlayer.posZ + j, Blocks.water); } } } @@ -163,7 +160,7 @@ public class SpellWateryGrave extends HomSpell for (int i = 0; i < 16; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); } return par1ItemStack; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java index 2bbfd322..3541359a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/spell/simple/SpellWindGust.java @@ -1,13 +1,12 @@ package WayofTime.alchemicalWizardry.common.spell.simple; import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile; -import WayofTime.alchemicalWizardry.common.items.BindableItems; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.Vec3; import net.minecraft.world.World; @@ -28,14 +27,14 @@ public class SpellWindGust extends HomSpell @Override public ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveRangedEnergy()); } par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); @@ -51,14 +50,14 @@ public class SpellWindGust extends HomSpell @Override public ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getOffensiveMeleeEnergy()); } int distance = 3; @@ -68,7 +67,7 @@ public class SpellWindGust extends HomSpell double yCoord = par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance; double zCoord = par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance; float d0 = 0.5f; - AxisAlignedBB axisalignedbb = new AxisAlignedBB(par3EntityPlayer.posX - 0.5 + Math.sin(yaw) * Math.cos(pitch) * (-distance), par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance, par3EntityPlayer.posZ - 0.5 + Math.cos(yaw) * Math.cos(pitch) * distance, par3EntityPlayer.posX + Math.sin(yaw) * Math.cos(pitch) * (-distance) + 0.5, par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance + 1, par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance + 0.5).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX - 0.5 + Math.sin(yaw) * Math.cos(pitch) * (-distance), par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance, par3EntityPlayer.posZ - 0.5 + Math.cos(yaw) * Math.cos(pitch) * distance, par3EntityPlayer.posX + Math.sin(yaw) * Math.cos(pitch) * (-distance) + 0.5, par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance + 1, par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance + 0.5).expand(d0, d0, d0); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); @@ -89,7 +88,7 @@ public class SpellWindGust extends HomSpell } for (int i = 0; i < 5; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); } return par1ItemStack; @@ -98,17 +97,16 @@ public class SpellWindGust extends HomSpell @Override public ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); } - - int distance = 3; + double yaw = par3EntityPlayer.rotationYaw / 180 * Math.PI; double pitch = par3EntityPlayer.rotationPitch / 180 * Math.PI; double wantedVelocity = 5; @@ -128,7 +126,7 @@ public class SpellWindGust extends HomSpell for (int i = 0; i < 8; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); } return par1ItemStack; @@ -137,18 +135,18 @@ public class SpellWindGust extends HomSpell @Override public ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) + if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) { return par1ItemStack; } if (!par3EntityPlayer.capabilities.isCreativeMode) { - BindableItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); + EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getEnvironmentalEnergy()); } int d0 = 3; - AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (par3EntityPlayer.posX + 1), (par3EntityPlayer.posY + 2), (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator = list.iterator(); double xCoord = par3EntityPlayer.posX; @@ -179,7 +177,7 @@ public class SpellWindGust extends HomSpell } for (int i = 0; i < 20; i++) { - SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.getDimensionId(), EnumParticleTypes.SPELL_MOB, xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); + SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F); } return par1ItemStack; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java index 65423c95..c324adf8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorParadigm.java @@ -7,8 +7,6 @@ import java.util.Random; import net.minecraft.init.Blocks; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; @@ -38,8 +36,8 @@ public class MeteorParadigm } } - public void createMeteorImpact(World world, BlockPos pos, boolean[] flags) - { + public void createMeteorImpact(World world, int x, int y, int z, boolean[] flags) + { boolean hasTerrae = false; boolean hasOrbisTerrae = false; boolean hasCrystallos = false; @@ -68,7 +66,7 @@ public class MeteorParadigm chance += 100; } - world.createExplosion(null, pos.getX(), pos.getY(), pos.getZ(), newRadius * 4, AlchemicalWizardry.doMeteorsDestroyBlocks); + world.createExplosion(null, x, y, z, newRadius * 4, AlchemicalWizardry.doMeteorsDestroyBlocks); float iceChance = hasCrystallos ? 1 : 0; float soulChance = hasIncendium ? 1 : 0; @@ -87,9 +85,7 @@ public class MeteorParadigm continue; } - BlockPos newPos = pos.add(i, j, k); - - if (!world.isAirBlock(newPos)) + if (!world.isAirBlock(x + i, y + j, z + k)) { continue; } @@ -111,12 +107,12 @@ public class MeteorParadigm ItemStack blockStack = mpc.getValidBlockParadigm(); if(blockStack != null && blockStack.getItem() instanceof ItemBlock) { - ((ItemBlock)blockStack.getItem()).placeBlockAt(blockStack, null, world, newPos, EnumFacing.DOWN, 0, 0, 0, ((ItemBlock)blockStack.getItem()).block.getStateFromMeta(blockStack.getItemDamage())); - world.markBlockForUpdate(newPos); + ((ItemBlock)blockStack.getItem()).placeBlockAt(blockStack, null, world, x + i, y + j, z + k, 0, 0, 0, 0, blockStack.getItemDamage()); + world.markBlockForUpdate(x + i, y + j, z + k); hasPlacedBlock = true; break; } -// world.setBlock(newPos, Block.getBlockById(Item.getIdFromItem(blockStack.getItem())), blockStack.getItemDamage(), 3); +// world.setBlock(x + i, y + j, z + k, Block.getBlockById(Item.getIdFromItem(blockStack.getItem())), blockStack.getItemDamage(), 3); // hasPlacedBlock = true; // break; } @@ -128,7 +124,7 @@ public class MeteorParadigm if (randChance < iceChance) { - world.setBlockState(newPos, Blocks.ice.getDefaultState(), 3); + world.setBlock(x + i, y + j, z + k, Blocks.ice, 0, 3); } else { randChance -= iceChance; @@ -138,13 +134,13 @@ public class MeteorParadigm switch (rand.nextInt(3)) { case 0: - world.setBlockState(newPos, Blocks.soul_sand.getDefaultState(), 3); + world.setBlock(x + i, y + j, z + k, Blocks.soul_sand, 0, 3); break; case 1: - world.setBlockState(newPos, Blocks.glowstone.getDefaultState(), 3); + world.setBlock(x + i, y + j, z + k, Blocks.glowstone, 0, 3); break; case 2: - world.setBlockState(newPos, Blocks.netherrack.getDefaultState(), 3); + world.setBlock(x + i, y + j, z + k, Blocks.netherrack, 0, 3); break; } } else @@ -153,12 +149,12 @@ public class MeteorParadigm if (randChance < obsidChance) { - world.setBlockState(newPos, Blocks.obsidian.getDefaultState(), 3); + world.setBlock(x + i, y + j, z + k, Blocks.obsidian, 0, 3); } else { randChance -= obsidChance; - world.setBlockState(newPos, Blocks.stone.getDefaultState(), 3); + world.setBlock(x + i, y + j, z + k, Blocks.stone, 0, 3); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java index 1ed03f73..7deedd38 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/MeteorRegistry.java @@ -1,13 +1,12 @@ package WayofTime.alchemicalWizardry.common.summoning.meteor; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.oredict.OreDictionary; + import java.util.ArrayList; import java.util.List; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; - public class MeteorRegistry { public static List<MeteorParadigm> paradigmList = new ArrayList(); @@ -27,11 +26,11 @@ public class MeteorRegistry } } - public static void createMeteorImpact(World world, BlockPos pos, int paradigmID, boolean[] flags) + public static void createMeteorImpact(World world, int x, int y, int z, int paradigmID, boolean[] flags) { if (paradigmID < paradigmList.size()) { - paradigmList.get(paradigmID).createMeteorImpact(world, pos, flags); + paradigmList.get(paradigmID).createMeteorImpact(world, x, y, z, flags); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/thread/GAPIChecker.java b/src/main/java/WayofTime/alchemicalWizardry/common/thread/GAPIChecker.java index fa7bda35..70d02550 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/thread/GAPIChecker.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/thread/GAPIChecker.java @@ -1,26 +1,20 @@ package WayofTime.alchemicalWizardry.common.thread; -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.TickEvent; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.*; + +import java.io.*; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.IChatComponent; -import net.minecraft.util.StatCollector; -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.common.Loader; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.TickEvent; -import net.minecraftforge.fml.relauncher.FMLInjectionData; - public class GAPIChecker { public static boolean doneChecking = false; @@ -35,7 +29,7 @@ public class GAPIChecker public void init() { FMLCommonHandler.instance().bus().register(this); - File mcDir = (File)FMLInjectionData.data()[6]; + File mcDir = (File)cpw.mods.fml.relauncher.FMLInjectionData.data()[6]; this.modsDir = new File(mcDir, "mods"); @@ -109,7 +103,7 @@ public class GAPIChecker if (event.phase == TickEvent.Phase.END && Minecraft.getMinecraft().thePlayer != null && !triedToWarnPlayer) { EntityPlayer player = Minecraft.getMinecraft().thePlayer; - IChatComponent component = IChatComponent.Serializer.jsonToComponent(StatCollector.translateToLocal("bm.versioning.getGAPI")); + IChatComponent component = IChatComponent.Serializer.func_150699_a(StatCollector.translateToLocal("bm.versioning.getGAPI")); player.addChatComponentMessage(component); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/thread/ThreadDownloadGAPI.java b/src/main/java/WayofTime/alchemicalWizardry/common/thread/ThreadDownloadGAPI.java index 67965eeb..cafaf35d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/thread/ThreadDownloadGAPI.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/thread/ThreadDownloadGAPI.java @@ -35,7 +35,7 @@ public class ThreadDownloadGAPI extends Thread { try { - IChatComponent component = IChatComponent.Serializer.jsonToComponent(String.format(StatCollector.translateToLocal("bm.versioning.startingDownload"), fileName)); + IChatComponent component = IChatComponent.Serializer.func_150699_a(String.format(StatCollector.translateToLocal("bm.versioning.startingDownload"), fileName)); if (Minecraft.getMinecraft().thePlayer != null) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicalCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicCalcinator.java similarity index 86% rename from src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicalCalcinator.java rename to src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicCalcinator.java index b406f3dc..d5891819 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicalCalcinator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicCalcinator.java @@ -1,5 +1,12 @@ package WayofTime.alchemicalWizardry.common.tileEntity; +import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; +import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; @@ -8,28 +15,19 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.network.NetworkManager; import net.minecraft.network.Packet; import net.minecraft.network.play.server.S35PacketUpdateTileEntity; -import net.minecraft.server.gui.IUpdatePlayerListBox; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.IChatComponent; import net.minecraftforge.common.util.Constants; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraftforge.common.util.ForgeDirection; -public class TEAlchemicalCalcinator extends TEReagentConduit implements IInventory, IUpdatePlayerListBox +public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory { protected ItemStack[] inv; protected ReagentContainer bufferTank = new ReagentContainer(Reagent.REAGENT_SIZE * 2); protected int bufferTransferRate = 20; - private int progress; + public int progress; - public TEAlchemicalCalcinator() + public TEAlchemicCalcinator() { super(1, Reagent.REAGENT_SIZE * 4); this.inv = new ItemStack[2]; @@ -99,9 +97,9 @@ public class TEAlchemicalCalcinator extends TEReagentConduit implements IInvento } @Override - public void update() + public void updateEntity() { - super.update(); + super.updateEntity(); if (!worldObj.isRemote) { @@ -113,12 +111,12 @@ public class TEAlchemicalCalcinator extends TEReagentConduit implements IInvento public void moveBufferToMain() { ReagentStack amountStack = this.bufferTank.drain(bufferTransferRate, false); - int drainAmount = this.fill(EnumFacing.UP, amountStack, false); + int drainAmount = this.fill(ForgeDirection.UNKNOWN, amountStack, false); if (drainAmount > 0) { ReagentStack drainedStack = this.bufferTank.drain(drainAmount, true); - this.fill(EnumFacing.UP, drainedStack, true); + this.fill(ForgeDirection.UNKNOWN, drainedStack, true); } } @@ -127,7 +125,6 @@ public class TEAlchemicalCalcinator extends TEReagentConduit implements IInvento int lpPerTick = 10; int ticksPerReagent = 200; ItemStack reagentItemStack = this.getStackInSlot(1); - if (reagentItemStack == null) { progress = 0; @@ -161,7 +158,7 @@ public class TEAlchemicalCalcinator extends TEReagentConduit implements IInvento if (worldObj.getWorldTime() % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); + SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); } if (progress >= ticksPerReagent) @@ -255,14 +252,14 @@ public class TEAlchemicalCalcinator extends TEReagentConduit implements IInvento { NBTTagCompound nbttagcompound = new NBTTagCompound(); writeClientNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(pos, -999, nbttagcompound); + return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, -999, nbttagcompound); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) { super.onDataPacket(net, packet); - readClientNBT(packet.getNbtCompound()); + readClientNBT(packet.func_148857_g()); } @Override @@ -287,7 +284,7 @@ public class TEAlchemicalCalcinator extends TEReagentConduit implements IInvento stack.stackSize = getInventoryStackLimit(); } - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } @Override @@ -336,23 +333,27 @@ public class TEAlchemicalCalcinator extends TEReagentConduit implements IInvento @Override public boolean isUseableByPlayer(EntityPlayer player) { - return worldObj.getTileEntity(pos) == this && pos.distanceSqToCenter(player.posX, player.posY, player.posZ) < 64; + return worldObj.getTileEntity(xCoord, yCoord, zCoord) == this && player.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) < 64; } @Override - public void openInventory(EntityPlayer player) {} + public void openInventory() + { + } @Override - public void closeInventory(EntityPlayer player) {} + public void closeInventory() + { + } @Override - public String getName() + public String getInventoryName() { return "AlchemicCalcinator"; } @Override - public boolean hasCustomName() + public boolean hasCustomInventoryName() { return false; } @@ -364,37 +365,13 @@ public class TEAlchemicalCalcinator extends TEReagentConduit implements IInvento } @Override - public int fill(EnumFacing from, ReagentStack resource, boolean doFill) + public int fill(ForgeDirection from, ReagentStack resource, boolean doFill) { if (doFill && !worldObj.isRemote) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } return super.fill(from, resource, doFill); } - - @Override - public IChatComponent getDisplayName() - { - return null; - } - - @Override - public int getField(int id) - { - return 0; - } - - @Override - public void setField(int id, int value) {} - - @Override - public int getFieldCount() - { - return 0; - } - - @Override - public void clear() {} } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java index ff3cc550..91d80544 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java @@ -3,7 +3,6 @@ package WayofTime.alchemicalWizardry.common.tileEntity; import java.util.List; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -11,13 +10,11 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.Packet; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; -import net.minecraft.server.gui.IUpdatePlayerListBox; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.ChatComponentTranslation; -import net.minecraft.util.EnumFacing; import net.minecraft.util.StatCollector; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidEvent; @@ -37,7 +34,7 @@ import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.AltarUpgradeCompone import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, IBloodAltar, IUpdatePlayerListBox +public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, IBloodAltar { public static final int sizeInv = 1; @@ -106,6 +103,11 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I return filledAmount; } + + public int getRSPowerOutput() + { + return 5; + } public void addToDemonBloodDuration(int dur) { @@ -244,7 +246,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I } @Override - public String getName() + public String getInventoryName() { return "TEAltar"; } @@ -337,7 +339,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I return 0; } - if (resource.getFluid() != (new FluidStack(AlchemicalWizardry.lifeEssenceFluid, 1)).getFluid()) + if (resource.getFluidID() != (new FluidStack(AlchemicalWizardry.lifeEssenceFluid, 1)).getFluidID()) { return 0; } @@ -362,7 +364,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I fluidInput = new FluidStack(resource, Math.min(bufferCapacity, resource.amount)); if (tile != null) { - FluidEvent.fireEvent(new FluidEvent.FluidFillingEvent(fluidInput, tile.getWorld(), tile.getPos(), this, fluidInput.amount)); + FluidEvent.fireEvent(new FluidEvent.FluidFillingEvent(fluidInput, tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord, this)); } return fluidInput.amount; @@ -386,7 +388,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I if (tile != null) { - FluidEvent.fireEvent(new FluidEvent.FluidFillingEvent(fluidInput, tile.getWorld(), tile.getPos(), this, fluidInput.amount)); + FluidEvent.fireEvent(new FluidEvent.FluidFillingEvent(fluidInput, tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord, this)); } return filled; @@ -420,7 +422,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I if (this != null) { - FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(fluidOutput, this.worldObj, this.pos, this, fluidOutput.amount)); + FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(fluidOutput, this.worldObj, this.xCoord, this.yCoord, this.zCoord, this)); } } @@ -431,7 +433,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I if (worldObj != null) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } return stack; @@ -439,13 +441,13 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I //Logic for the actual block is under here @Override - public void update() + public void updateEntity() { this.decrementDemonBlood(); if(this.hasDemonBlood() && !worldObj.isRemote) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); + SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); } if (this.lockdownDuration > 0) @@ -461,18 +463,23 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I if (!worldObj.isRemote && worldObj.getWorldTime() % 20 == 0) { { - for(EnumFacing facing : EnumFacing.VALUES) - { - BlockPos newPos = pos.offset(facing); - IBlockState state = worldObj.getBlockState(newPos); - Block block = state.getBlock(); - block.onNeighborBlockChange(worldObj, newPos, state, this.getBlockType()); - } + Block block = worldObj.getBlock(xCoord + 1, yCoord, zCoord); + block.onNeighborBlockChange(worldObj, xCoord + 1, yCoord, zCoord, block); + block = worldObj.getBlock(xCoord - 1, yCoord, zCoord); + block.onNeighborBlockChange(worldObj, xCoord - 1, yCoord, zCoord, block); + block = worldObj.getBlock(xCoord, yCoord + 1, zCoord); + block.onNeighborBlockChange(worldObj, xCoord, yCoord + 1, zCoord, block); + block = worldObj.getBlock(xCoord, yCoord - 1, zCoord); + block.onNeighborBlockChange(worldObj, xCoord, yCoord - 1, zCoord, block); + block = worldObj.getBlock(xCoord, yCoord, zCoord + 1); + block.onNeighborBlockChange(worldObj, xCoord, yCoord, zCoord + 1, block); + block = worldObj.getBlock(xCoord, yCoord, zCoord - 1); + block.onNeighborBlockChange(worldObj, xCoord, yCoord, zCoord - 1, block); } if (AlchemicalWizardry.lockdownAltar) { - List<EntityPlayer> list = SpellHelper.getPlayersInRange(worldObj, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 15, 15); + List<EntityPlayer> list = SpellHelper.getPlayersInRange(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, 15, 15); for (EntityPlayer player : list) { PotionEffect regenEffect = player.getActivePotionEffect(Potion.regeneration); @@ -504,8 +511,8 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I if(worldObj.getWorldTime() % Math.max(20 - this.accelerationUpgrades, 1) == 0) { int syphonMax = (int) (20 * this.dislocationMultiplier); - int fluidInputted; - int fluidOutputted; + int fluidInputted = 0; + int fluidOutputted = 0; fluidInputted = Math.min(syphonMax, -this.fluid.amount + capacity); fluidInputted = Math.min(this.fluidInput.amount, fluidInputted); this.fluid.amount += fluidInputted; @@ -559,7 +566,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I if (worldTime % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); + SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); } if (progress >= liquidRequired * stackSize) @@ -576,7 +583,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I for (int i = 0; i < 8; i++) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos.getX(), pos.getY(), pos.getZ(), 20, worldObj.provider.getDimensionId(), 4, pos.getX() + 0.5f, pos.getY() + 1.0f, pos.getZ() + 0.5f); + SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 4, xCoord + 0.5f, yCoord + 1.0f, zCoord + 0.5f); } this.isActive = false; } @@ -586,7 +593,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I if (worldTime % 2 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 2, pos); + SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 2, xCoord, yCoord, zCoord); } } } else @@ -623,13 +630,13 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I if (worldTime % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 3, pos); + SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 3, xCoord, yCoord, zCoord); } } } if (worldObj != null) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } } @@ -683,9 +690,9 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I } } - FluidStack flMain = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, fluidData[1]); //First parameter was fluidData[0] --Checking to see if this will cause issues or not - FluidStack flIn = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, fluidData[3]); //" " - FluidStack flOut = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, fluidData[5]); //" " + FluidStack flMain = new FluidStack(fluidData[0], fluidData[1]); + FluidStack flIn = new FluidStack(fluidData[2], fluidData[3]); + FluidStack flOut = new FluidStack(fluidData[4], fluidData[5]); this.setMainFluid(flMain); this.setInputFluid(flIn); @@ -721,7 +728,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I { if (worldObj != null) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } this.checkAndSetAltar(); @@ -753,7 +760,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I public void checkAndSetAltar() { boolean checkUpgrade = true; - int upgradeState = UpgradedAltars.isAltarValid(worldObj, pos); + int upgradeState = UpgradedAltars.isAltarValid(worldObj, xCoord, yCoord, zCoord); if (upgradeState <= 1) { @@ -770,7 +777,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I return; } - AltarUpgradeComponent upgrades = UpgradedAltars.getUpgrades(worldObj, pos, upgradeState); + AltarUpgradeComponent upgrades = UpgradedAltars.getUpgrades(worldObj, xCoord, yCoord, zCoord, upgradeState); if (upgrades == null) { @@ -816,7 +823,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I this.fluidInput.amount = this.bufferCapacity; } - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } @Override @@ -826,7 +833,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I } @Override - public int fill(EnumFacing from, FluidStack resource, boolean doFill) + public int fill(ForgeDirection from, FluidStack resource, boolean doFill) { //TODO if (resource == null) @@ -844,7 +851,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I } @Override - public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain) + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) { if (resource == null) { @@ -860,26 +867,26 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I } @Override - public FluidStack drain(EnumFacing from, int maxEmpty, boolean doDrain) + public FluidStack drain(ForgeDirection from, int maxEmpty, boolean doDrain) { return this.drain(maxEmpty, doDrain); } @Override - public boolean canFill(EnumFacing from, Fluid fluid) + public boolean canFill(ForgeDirection from, Fluid fluid) { //I changed this, since fluidstack != fluid... :p dunno if it was a accident? so you might wanna check this return this.fluidInput != null && this.fluid.getFluid().equals(fluidInput.getFluid()); } @Override - public boolean canDrain(EnumFacing from, Fluid fluid) + public boolean canDrain(ForgeDirection from, Fluid fluid) { return true; } @Override - public FluidTankInfo[] getTankInfo(EnumFacing from) + public FluidTankInfo[] getTankInfo(ForgeDirection from) { FluidTank compositeTank = new FluidTank(capacity); compositeTank.setFluid(fluid); @@ -926,7 +933,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I public void sendChatInfoToPlayer(EntityPlayer player) { player.addChatMessage(new ChatComponentTranslation(String.format("message.altar.currentessence"), this.fluid.amount)); - player.addChatMessage(new ChatComponentTranslation(String.format("message.altar.currenttier"), UpgradedAltars.isAltarValid(worldObj, pos))); + player.addChatMessage(new ChatComponentTranslation(String.format("message.altar.currenttier"), UpgradedAltars.isAltarValid(worldObj, xCoord, yCoord, zCoord))); player.addChatMessage(new ChatComponentTranslation(String.format("message.altar.capacity"), this.getCapacity())); } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBelljar.java index fe0767a0..1126762a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBelljar.java @@ -1,22 +1,19 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraftforge.common.util.Constants; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; +import net.minecraft.block.Block; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraftforge.common.util.Constants; -public class TEBelljar extends TEReagentConduit +public class TEBellJar extends TEReagentConduit { - public TEBelljar() + public TEBellJar() { super(1, 16000); this.maxConnextions = 1; @@ -39,7 +36,7 @@ public class TEBelljar extends TEReagentConduit public static ReagentContainerInfo[] getContainerInfoFromItem(ItemStack stack) { - if (stack != null && stack.getItem() instanceof ItemBlock && ModBlocks.blockCrystalBelljar == ((ItemBlock) stack.getItem()).getBlock()) + if (stack != null && stack.getItem() instanceof ItemBlock && ModBlocks.blockCrystalBelljar == ((ItemBlock) stack.getItem()).field_150939_a) { NBTTagCompound tag = stack.getTagCompound(); if (tag != null) @@ -101,19 +98,24 @@ public class TEBelljar extends TEReagentConduit } @Override - public void update() + public void updateEntity() { - super.update(); - + super.updateEntity(); + if (hasChanged == 1) { - for(EnumFacing facing : EnumFacing.VALUES) - { - BlockPos newPos = pos.offset(facing); - IBlockState state = worldObj.getBlockState(newPos); - Block block = state.getBlock(); - block.onNeighborBlockChange(worldObj, newPos, state, this.getBlockType()); - } + Block block = worldObj.getBlock(xCoord + 1, yCoord, zCoord); + block.onNeighborBlockChange(worldObj, xCoord + 1, yCoord, zCoord, block); + block = worldObj.getBlock(xCoord - 1, yCoord, zCoord); + block.onNeighborBlockChange(worldObj, xCoord - 1, yCoord, zCoord, block); + block = worldObj.getBlock(xCoord, yCoord + 1, zCoord); + block.onNeighborBlockChange(worldObj, xCoord, yCoord + 1, zCoord, block); + block = worldObj.getBlock(xCoord, yCoord - 1, zCoord); + block.onNeighborBlockChange(worldObj, xCoord, yCoord - 1, zCoord, block); + block = worldObj.getBlock(xCoord, yCoord, zCoord + 1); + block.onNeighborBlockChange(worldObj, xCoord, yCoord, zCoord + 1, block); + block = worldObj.getBlock(xCoord, yCoord, zCoord - 1); + block.onNeighborBlockChange(worldObj, xCoord, yCoord, zCoord - 1, block); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java index ed90c954..3c09f67a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java @@ -17,9 +17,16 @@ public class TEConduit extends TESpellBlock super.writeToNBT(par1NBTTagCompound); } + //Logic for the actual block is under here @Override - protected void applySpellChange(SpellParadigm parad) + public void updateEntity() { } + + @Override + protected void applySpellChange(SpellParadigm parad) + { + return; + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java index 1b4f449c..eae4f507 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java @@ -4,7 +4,6 @@ import java.util.List; import java.util.Random; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -12,33 +11,31 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.network.NetworkManager; import net.minecraft.network.Packet; import net.minecraft.network.play.server.S35PacketUpdateTileEntity; -import net.minecraft.server.gui.IUpdatePlayerListBox; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumParticleTypes; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; import WayofTime.alchemicalWizardry.api.sacrifice.IIncense; import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -public class TECrucible extends TEInventory implements IUpdatePlayerListBox +public class TECrucible extends TEInventory { - private float rColour; - private float gColour; - private float bColour; - - private int ticksRemaining = 0; - private int minValue = 0; - private int maxValue = 0; - private float incrementValue = 0; + private int radius = 5; - private int state = 0; //0 is when it gives off gray particles, 1 is when it gives off white particles (player can't use this incense anymore), 2 is the normal colour of the incense, 3 means no particles (it is out) + public float rColour; + public float gColour; + public float bColour; + + public int ticksRemaining = 0; + public int minValue = 0; + public int maxValue = 0; + public float incrementValue = 0; + + public int state = 0; //0 is when it gives off gray particles, 1 is when it gives off white particles (player can't use this incense anymore), 2 is the normal colour of the incense, 3 means no particles (it is out) public TECrucible() { super(1); - float f = 1.0F; + float f = (float) 1.0F; float f1 = f * 0.6F + 0.4F; float f2 = f * f * 0.7F - 0.5F; float f3 = f * f * 0.6F - 0.7F; @@ -48,18 +45,17 @@ public class TECrucible extends TEInventory implements IUpdatePlayerListBox } @Override - public void update() + public void updateEntity() { - int radius = 5; - - if (worldObj.isRemote) return; - + if(worldObj.isRemote) + return; + boolean stateChanged = false; - if (ticksRemaining <= 0) + if(ticksRemaining <= 0) { ItemStack stack = this.getStackInSlot(0); - if (stack != null && stack.getItem() instanceof IIncense) + if(stack != null && stack.getItem() instanceof IIncense) { IIncense incense = (IIncense)stack.getItem(); @@ -85,7 +81,7 @@ public class TECrucible extends TEInventory implements IUpdatePlayerListBox if(ticksRemaining > 0) { - List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(worldObj, pos.getX(), pos.getY(), pos.getZ(), radius, radius); + List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, radius, radius); if(playerList != null && !playerList.isEmpty()) { @@ -118,7 +114,7 @@ public class TECrucible extends TEInventory implements IUpdatePlayerListBox if(state != 0) { state = 0; - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); updateNeighbors(); } } @@ -127,14 +123,14 @@ public class TECrucible extends TEInventory implements IUpdatePlayerListBox if(state != 0) { state = 0; - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); updateNeighbors(); } } if(stateChanged) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); updateNeighbors(); } @@ -142,30 +138,35 @@ public class TECrucible extends TEInventory implements IUpdatePlayerListBox private void updateNeighbors() { - for(EnumFacing facing : EnumFacing.VALUES) - { - BlockPos newPos = pos.offset(facing); - IBlockState state = worldObj.getBlockState(newPos); - Block block = state.getBlock(); - block.onNeighborBlockChange(worldObj, newPos, state, this.getBlockType()); - } + Block block = worldObj.getBlock(xCoord + 1, yCoord, zCoord); + block.onNeighborBlockChange(worldObj, xCoord + 1, yCoord, zCoord, block); + block = worldObj.getBlock(xCoord - 1, yCoord, zCoord); + block.onNeighborBlockChange(worldObj, xCoord - 1, yCoord, zCoord, block); + block = worldObj.getBlock(xCoord, yCoord + 1, zCoord); + block.onNeighborBlockChange(worldObj, xCoord, yCoord + 1, zCoord, block); + block = worldObj.getBlock(xCoord, yCoord - 1, zCoord); + block.onNeighborBlockChange(worldObj, xCoord, yCoord - 1, zCoord, block); + block = worldObj.getBlock(xCoord, yCoord, zCoord + 1); + block.onNeighborBlockChange(worldObj, xCoord, yCoord, zCoord + 1, block); + block = worldObj.getBlock(xCoord, yCoord, zCoord - 1); + block.onNeighborBlockChange(worldObj, xCoord, yCoord, zCoord - 1, block); } - public void spawnClientParticle(World world, BlockPos blockPos, Random rand) + public void spawnClientParticle(World world, int x, int y, int z, Random rand) { switch(state) { case 0: - world.spawnParticle(EnumParticleTypes.REDSTONE, blockPos.getX() + 0.5D + rand.nextGaussian() / 8, blockPos.getY() + 0.7D, blockPos.getZ() + 0.5D + rand.nextGaussian() / 8, 0.15, 0.15, 0.15); + world.spawnParticle("reddust", x + 0.5D + rand.nextGaussian() / 8, y + 0.7D, z + 0.5D + rand.nextGaussian() / 8, 0.15, 0.15, 0.15); break; case 1: - world.spawnParticle(EnumParticleTypes.REDSTONE, blockPos.getX() + 0.5D + rand.nextGaussian() / 8, blockPos.getY() + 0.7D, blockPos.getZ() + 0.5D + rand.nextGaussian() / 8, 1.0, 1.0, 1.0); + world.spawnParticle("reddust", x + 0.5D + rand.nextGaussian() / 8, y + 0.7D, z + 0.5D + rand.nextGaussian() / 8, 1.0, 1.0, 1.0); break; case 2: - world.spawnParticle(EnumParticleTypes.REDSTONE, blockPos.getX() + 0.5D + rand.nextGaussian() / 8, blockPos.getY() + 0.7D, blockPos.getZ() + 0.5D + rand.nextGaussian() / 8, rColour, gColour, bColour); - world.spawnParticle(EnumParticleTypes.FLAME, blockPos.getX() + 0.5D + rand.nextGaussian() / 32, blockPos.getY() + 0.7D, blockPos.getZ() + 0.5D + rand.nextGaussian() / 32, 0, 0.02, 0); + world.spawnParticle("reddust", x + 0.5D + rand.nextGaussian() / 8, y + 0.7D, z + 0.5D + rand.nextGaussian() / 8, rColour, gColour, bColour); + world.spawnParticle("flame", x + 0.5D + rand.nextGaussian() / 32, y + 0.7D, z + 0.5D + rand.nextGaussian() / 32, 0, 0.02, 0); break; case 3: @@ -247,18 +248,18 @@ public class TECrucible extends TEInventory implements IUpdatePlayerListBox { NBTTagCompound nbttagcompound = new NBTTagCompound(); writeClientNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(pos, 90210, nbttagcompound); + return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 90210, nbttagcompound); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) { super.onDataPacket(net, packet); - readClientNBT(packet.getNbtCompound()); + readClientNBT(packet.func_148857_g()); } @Override - public String getName() + public String getInventoryName() { return "TECrucible"; } @@ -266,7 +267,7 @@ public class TECrucible extends TEInventory implements IUpdatePlayerListBox @Override public boolean isItemValidForSlot(int slot, ItemStack stack) { - return stack != null && stack.getItem() instanceof IIncense; + return stack != null ? stack.getItem() instanceof IIncense : false; } public int getRSPowerOutput() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java similarity index 55% rename from src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellTable.java rename to src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java index d90314d9..2a8c0e79 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java @@ -4,14 +4,13 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntitySkull; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.common.spell.simple.HomSpell; import WayofTime.alchemicalWizardry.common.spell.simple.HomSpellRegistry; -public class TESpellTable extends TileEntity +public class TEHomHeart extends TileEntity { - public boolean canCastSpell() + public boolean canCastSpell(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { return true; } @@ -72,25 +71,73 @@ public class TESpellTable extends TileEntity public HomSpell getSpell() { - for(EnumFacing face : EnumFacing.HORIZONTALS) - { - TileEntity tileEntity = worldObj.getTileEntity(pos.offset(face)); + TileEntity tileEntity = worldObj.getTileEntity(xCoord - 1, yCoord, zCoord); - if (tileEntity instanceof TEAltar) + if (tileEntity instanceof TEAltar) + { + ItemStack itemStack = ((TEAltar) tileEntity).getStackInSlot(0); + + if (itemStack != null) { - ItemStack itemStack = ((TEAltar) tileEntity).getStackInSlot(0); + HomSpell spell = HomSpellRegistry.getSpellForItemStack(itemStack); - if (itemStack != null) + if (spell != null) { - HomSpell spell = HomSpellRegistry.getSpellForItemStack(itemStack); - - if (spell != null) - { - return spell; - } + return spell; } } - } + } + + tileEntity = worldObj.getTileEntity(xCoord + 1, yCoord, zCoord); + + if (tileEntity instanceof TEAltar) + { + ItemStack itemStack = ((TEAltar) tileEntity).getStackInSlot(0); + + if (itemStack != null) + { + HomSpell spell = HomSpellRegistry.getSpellForItemStack(itemStack); + + if (spell != null) + { + return spell; + } + } + } + + tileEntity = worldObj.getTileEntity(xCoord, yCoord, zCoord - 1); + + if (tileEntity instanceof TEAltar) + { + ItemStack itemStack = ((TEAltar) tileEntity).getStackInSlot(0); + + if (itemStack != null) + { + HomSpell spell = HomSpellRegistry.getSpellForItemStack(itemStack); + + if (spell != null) + { + return spell; + } + } + } + + tileEntity = worldObj.getTileEntity(xCoord, yCoord, zCoord + 1); + + if (tileEntity instanceof TEAltar) + { + ItemStack itemStack = ((TEAltar) tileEntity).getStackInSlot(0); + + if (itemStack != null) + { + HomSpell spell = HomSpellRegistry.getSpellForItemStack(itemStack); + + if (spell != null) + { + return spell; + } + } + } return null; } @@ -99,11 +146,11 @@ public class TESpellTable extends TileEntity { //TODO change so that it works with a Tile Entity for a custom head or whatnot - TileEntity tileEntity = worldObj.getTileEntity(pos.offsetUp()); + TileEntity tileEntity = worldObj.getTileEntity(xCoord, yCoord + 1, zCoord); if (tileEntity instanceof TileEntitySkull) { - int skullType = ((TileEntitySkull) tileEntity).getSkullType(); + int skullType = ((TileEntitySkull) tileEntity).func_145904_a(); switch (skullType) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEInventory.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEInventory.java index ec5ccc86..6d28ea18 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEInventory.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEInventory.java @@ -6,7 +6,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IChatComponent; import net.minecraftforge.common.util.Constants; /** @@ -66,16 +65,16 @@ public abstract class TEInventory extends TileEntity implements IInventory public void setInventorySlotContents(int slot, ItemStack stack) { inv[slot] = stack; - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); if (stack != null && stack.stackSize > getInventoryStackLimit()) stack.stackSize = getInventoryStackLimit(); } @Override - public abstract String getName(); + public abstract String getInventoryName(); @Override - public boolean hasCustomName() + public boolean hasCustomInventoryName() { return false; } @@ -89,17 +88,17 @@ public abstract class TEInventory extends TileEntity implements IInventory @Override public boolean isUseableByPlayer(EntityPlayer player) { - return worldObj.getTileEntity(this.pos) == this - && player.getDistanceSqToCenter(pos) < 64; + return worldObj.getTileEntity(xCoord, yCoord, zCoord) == this + && player.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) < 64; } @Override - public void openInventory(EntityPlayer player) + public void openInventory() { } @Override - public void closeInventory(EntityPlayer player) + public void closeInventory() { } @@ -148,28 +147,4 @@ public abstract class TEInventory extends TileEntity implements IInventory { inv = new ItemStack[inv.length]; } - - @Override - public int getField(int id) { - // TODO Auto-generated method stub - return 0; - } - - @Override - public void setField(int id, int value) { - // TODO Auto-generated method stub - - } - - @Override - public int getFieldCount() { - // TODO Auto-generated method stub - return 0; - } - - @Override - public IChatComponent getDisplayName() { - // TODO Auto-generated method stub - return null; - } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java index 01d78af0..a4f56112 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java @@ -11,16 +11,14 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.network.NetworkManager; import net.minecraft.network.Packet; import net.minecraft.network.play.server.S35PacketUpdateTileEntity; -import net.minecraft.server.gui.IUpdatePlayerListBox; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentTranslation; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.Constants; -import net.minecraftforge.fml.common.eventhandler.Event; +import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; @@ -33,8 +31,9 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualBreakMethod; import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.common.eventhandler.Event; -public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUpdatePlayerListBox +public class TEMasterStone extends TileEntity implements IMasterRitualStone { private String currentRitualString; private boolean isActive; @@ -56,7 +55,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp public TEMasterStone() { tanks = new ReagentContainer[]{new ReagentContainer(1000), new ReagentContainer(1000), new ReagentContainer(1000)}; - this.attunedTankMap = new HashMap<Reagent, Integer>(); + this.attunedTankMap = new HashMap(); isActive = false; owner = ""; @@ -152,7 +151,9 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp { newStorage.readFromNBT(localStorageTag); storage = newStorage; - storage.setLocation(pos); + storage.xCoord = xCoord; + storage.yCoord = yCoord; + storage.zCoord = zCoord; } } @@ -214,7 +215,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp return; } - String testRitual = Rituals.checkValidRitual(world, pos); + String testRitual = Rituals.checkValidRitual(world, xCoord, yCoord, zCoord); if (testRitual.equals("")) { @@ -270,7 +271,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp for (int i = 0; i < 12; i++) { - SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, worldObj.provider.getDimensionId(), 1, pos); + SpellHelper.sendIndexedParticleToAllAround(world, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); } }else { @@ -290,11 +291,11 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp var1 = 0; currentRitualString = testRitual; storage = Rituals.getLocalStorage(currentRitualString); - storage.setLocation(pos); + storage.setLocation(new Int3(xCoord, yCoord, zCoord)); isActive = true; isRunning = true; - direction = Rituals.getDirectionOfRitual(world, pos, testRitual); - worldObj.markBlockForUpdate(pos); + direction = Rituals.getDirectionOfRitual(world, xCoord, yCoord, zCoord, testRitual); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } public void setOwner(String owner) @@ -313,7 +314,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp } @Override - public void update() + public void updateEntity() { if (isRunning && runningTime < 100) { @@ -337,26 +338,26 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp if (worldTime % 100 == 0) { - boolean testRunes = Rituals.checkDirectionOfRitualValid(worldObj, pos, currentRitualString, direction); - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); + boolean testRunes = Rituals.checkDirectionOfRitualValid(worldObj, xCoord, yCoord, zCoord, currentRitualString, direction); + SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); if (!testRunes) { Rituals.onRitualBroken(this, currentRitualString, RitualBreakMethod.BREAK_STONE); isActive = false; currentRitualString = ""; - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); return; } } - if (worldObj.getStrongPower(pos) > 0) + if (worldObj.getBlockPowerInput(xCoord, yCoord, zCoord) > 0) { if (isRunning) { Rituals.onRitualBroken(this, this.currentRitualString, RitualBreakMethod.REDSTONE); isRunning = false; - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } return; @@ -365,14 +366,14 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp if (!isRunning) { isRunning = true; - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } } - performRitual(worldObj, pos, currentRitualString); + performRitual(worldObj, xCoord, yCoord, zCoord, currentRitualString); } - public void performRitual(World world, BlockPos pos, String currentRitualString) + public void performRitual(World world, int x, int y, int z, String currentRitualString) { Rituals.performEffect(this, currentRitualString); } @@ -407,7 +408,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp Rituals.onRitualBroken(this, this.currentRitualString, RitualBreakMethod.DEACTIVATE); this.isActive = active; this.isRunning = active; - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } public int getDirection() @@ -416,15 +417,27 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp } @Override - public World getWorldObj() + public World getWorld() { - return this.getWorld(); + return this.getWorldObj(); } @Override - public BlockPos getPosition() + public int getXCoord() { - return this.getPos(); + return xCoord; + } + + @Override + public int getYCoord() + { + return yCoord; + } + + @Override + public int getZCoord() + { + return zCoord; } public String getCurrentRitual() @@ -442,29 +455,30 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp { NBTTagCompound nbttagcompound = new NBTTagCompound(); writeClientNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(pos, -999, nbttagcompound); + return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, -999, nbttagcompound); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) { super.onDataPacket(net, packet); - readClientNBT(packet.getNbtCompound()); + readClientNBT(packet.func_148857_g()); } public AxisAlignedBB getRenderBoundingBox() { - double renderExtension = 1.0d; - return new AxisAlignedBB(pos.add(-renderExtension, -renderExtension, -renderExtension), pos.add(1 + renderExtension, 1 + renderExtension, 1 + renderExtension)); + double renderExtention = 1.0d; + AxisAlignedBB bb = AxisAlignedBB.getBoundingBox(xCoord - renderExtention, yCoord - renderExtention, zCoord - renderExtention, xCoord + 1 + renderExtention, yCoord + 1 + renderExtention, zCoord + 1 + renderExtention); + return bb; } /* ISegmentedReagentHandler */ @Override - public int fill(EnumFacing from, ReagentStack resource, boolean doFill) + public int fill(ForgeDirection from, ReagentStack resource, boolean doFill) { if (doFill) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } int totalFill = 0; @@ -531,7 +545,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp } @Override - public ReagentStack drain(EnumFacing from, ReagentStack resource, boolean doDrain) + public ReagentStack drain(ForgeDirection from, ReagentStack resource, boolean doDrain) { if (resource == null) { @@ -540,7 +554,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp if (doDrain) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } int maxDrain = resource.amount; @@ -569,7 +583,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp /* Only returns the amount from the first available tank */ @Override - public ReagentStack drain(EnumFacing from, int maxDrain, boolean doDrain) + public ReagentStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { for (int i = 0; i < tanks.length; i++) { @@ -578,7 +592,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp { if (doDrain) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } return stack; @@ -589,19 +603,19 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp } @Override - public boolean canFill(EnumFacing from, Reagent reagent) + public boolean canFill(ForgeDirection from, Reagent reagent) { return true; } @Override - public boolean canDrain(EnumFacing from, Reagent reagent) + public boolean canDrain(ForgeDirection from, Reagent reagent) { return true; } @Override - public ReagentContainerInfo[] getContainerInfo(EnumFacing from) + public ReagentContainerInfo[] getContainerInfo(ForgeDirection from) { ReagentContainerInfo[] info = new ReagentContainerInfo[this.getNumberOfTanks()]; for (int i = 0; i < this.getNumberOfTanks(); i++) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java index d059a92e..465cec69 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java @@ -1,7 +1,6 @@ package WayofTime.alchemicalWizardry.common.tileEntity; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; @@ -10,9 +9,7 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.network.NetworkManager; import net.minecraft.network.Packet; import net.minecraft.network.play.server.S35PacketUpdateTileEntity; -import net.minecraft.server.gui.IUpdatePlayerListBox; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; import WayofTime.alchemicalWizardry.ModBlocks; @@ -21,7 +18,7 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm; import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; -public class TEMimicBlock extends TileEntity implements IUpdatePlayerListBox +public class TEMimicBlock extends TileEntity { private ItemStack[] inv; public Reagent reagent; @@ -40,14 +37,14 @@ public class TEMimicBlock extends TileEntity implements IUpdatePlayerListBox { NBTTagCompound nbttagcompound = new NBTTagCompound(); writeToNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(pos, -999, nbttagcompound); + return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, -999, nbttagcompound); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) { super.onDataPacket(net, packet); - readFromNBT(packet.getNbtCompound()); + readFromNBT(packet.func_148857_g()); } @Override @@ -94,8 +91,10 @@ public class TEMimicBlock extends TileEntity implements IUpdatePlayerListBox } @Override - public void update() + public void updateEntity() { + super.updateEntity(); + this.ticksRemaining--; if (this.ticksRemaining <= 0) @@ -104,35 +103,34 @@ public class TEMimicBlock extends TileEntity implements IUpdatePlayerListBox } } - public static boolean createMimicBlockAtLocation(World world, BlockPos pos, int duration, IBlockState state, Reagent reagent) + public static boolean createMimicBlockAtLocation(World world, int x, int y, int z, int duration, Block block, int meta, Reagent reagent) { - Block block = state.getBlock(); if (block == null) { return false; } - TileEntity tileEntity = world.getTileEntity(pos); + TileEntity tileEntity = world.getTileEntity(x, y, z); - if (tileEntity == null && world.isAirBlock(pos)) + if (tileEntity == null && world.isAirBlock(x, y, z)) { - ItemStack item = new ItemStack(block, 1, block.getMetaFromState(state)); + ItemStack item = new ItemStack(block, 1, meta); - world.setBlockState(pos, ModBlocks.blockMimic.getDefaultState()); - TileEntity tile = world.getTileEntity(pos); + world.setBlock(x, y, z, ModBlocks.blockMimic); + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof TEMimicBlock) { ((TEMimicBlock) tile).setContainedItem(item); ((TEMimicBlock) tile).setDuration(duration); ((TEMimicBlock) tile).reagent = reagent; - world.markBlockForUpdate(pos); + world.markBlockForUpdate(x, y, z); return true; } }else { if(tileEntity instanceof TEMimicBlock) { - if(((TEMimicBlock) tileEntity).getBlock() == block) + if(((TEMimicBlock) tileEntity).getBlock() == block && ((TEMimicBlock) tileEntity).getMetaOfMimic() == meta) { ((TEMimicBlock) tileEntity).ticksRemaining = Math.max(duration, ((TEMimicBlock) tileEntity).ticksRemaining); } @@ -183,7 +181,7 @@ public class TEMimicBlock extends TileEntity implements IUpdatePlayerListBox // // } else { - this.worldObj.setBlockToAir(pos); + this.worldObj.setBlockToAir(xCoord, yCoord, zCoord); } } @@ -194,8 +192,7 @@ public class TEMimicBlock extends TileEntity implements IUpdatePlayerListBox { if (item.getItem() instanceof ItemBlock) { - Block block = ((ItemBlock) item.getItem()).getBlock(); - return block; + return ((ItemBlock) item.getItem()).field_150939_a; } } return null; @@ -212,25 +209,14 @@ public class TEMimicBlock extends TileEntity implements IUpdatePlayerListBox return 0; } - public IBlockState getStateOfMimic() - { - Block block = this.getBlock(); - if(block == null) - { - return null; - } - - return block.getStateFromMeta(getMetaOfMimic()); - } - - public boolean getBlockEffectWhileInside(Entity entity, BlockPos blockPos) + public boolean getBlockEffectWhileInside(Entity entity, int x, int y, int z) { if(reagent != null) { OmegaParadigm paradigm = OmegaRegistry.getParadigmForReagent(reagent); if(paradigm != null) { - return paradigm.getBlockEffectWhileInside(entity, blockPos); + return paradigm.getBlockEffectWhileInside(entity, x, y, z); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEOrientable.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEOrientable.java index 160bf6a7..4029c2fa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEOrientable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEOrientable.java @@ -1,64 +1,64 @@ package WayofTime.alchemicalWizardry.common.tileEntity; +import WayofTime.alchemicalWizardry.common.NewPacketHandler; +import WayofTime.alchemicalWizardry.common.block.IOrientable; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import WayofTime.alchemicalWizardry.common.NewPacketHandler; -import WayofTime.alchemicalWizardry.common.block.IOrientable; +import net.minecraftforge.common.util.ForgeDirection; public class TEOrientable extends TileEntity implements IOrientable { - protected EnumFacing inputFace; - protected EnumFacing outputFace; + protected ForgeDirection inputFace; + protected ForgeDirection outputFace; public TEOrientable() { - this.inputFace = EnumFacing.DOWN; - this.outputFace = EnumFacing.UP; + this.inputFace = ForgeDirection.DOWN; + this.outputFace = ForgeDirection.UP; } @Override public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); - this.setInputDirection(EnumFacing.getFront(par1NBTTagCompound.getInteger("inputFace"))); - this.setOutputDirection(EnumFacing.getFront(par1NBTTagCompound.getInteger("outputFace"))); + this.setInputDirection(ForgeDirection.getOrientation(par1NBTTagCompound.getInteger("inputFace"))); + this.setOutputDirection(ForgeDirection.getOrientation(par1NBTTagCompound.getInteger("outputFace"))); } @Override public void writeToNBT(NBTTagCompound par1NBTTagCompound) { super.writeToNBT(par1NBTTagCompound); - par1NBTTagCompound.setInteger("inputFace", TEOrientable.getIntForEnumFacing(this.getInputDirection())); - par1NBTTagCompound.setInteger("outputFace", TEOrientable.getIntForEnumFacing(this.getOutputDirection())); + par1NBTTagCompound.setInteger("inputFace", TEOrientable.getIntForForgeDirection(this.getInputDirection())); + par1NBTTagCompound.setInteger("outputFace", TEOrientable.getIntForForgeDirection(this.getOutputDirection())); } @Override - public EnumFacing getInputDirection() + public ForgeDirection getInputDirection() { return this.inputFace; } @Override - public EnumFacing getOutputDirection() + public ForgeDirection getOutputDirection() { return this.outputFace; } @Override - public void setInputDirection(EnumFacing direction) + public void setInputDirection(ForgeDirection direction) { this.inputFace = direction; } @Override - public void setOutputDirection(EnumFacing direction) + public void setOutputDirection(ForgeDirection direction) { this.outputFace = direction; } - public static int getIntForEnumFacing(EnumFacing direction) + public static int getIntForForgeDirection(ForgeDirection direction) { switch (direction) { @@ -92,7 +92,7 @@ public class TEOrientable extends TileEntity implements IOrientable } - public boolean isSideRendered(EnumFacing side) + public boolean isSideRendered(ForgeDirection side) { if (side.equals(this.getInputDirection()) || side.equals(this.getOutputDirection())) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java index 7b664d7f..ff2d1875 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java @@ -46,7 +46,7 @@ public class TEPedestal extends TEInventory } @Override - public String getName() + public String getInventoryName() { return "TEPedestal"; } @@ -57,6 +57,13 @@ public class TEPedestal extends TEInventory return 1; } + //Logic for the actual block is under here + @Override + public void updateEntity() + { + super.updateEntity(); + } + public void setActive() { isActive = false; @@ -127,12 +134,13 @@ public class TEPedestal extends TEInventory public void onItemDeletion() { - worldObj.addWeatherEffect(new EntityLightningBolt(worldObj, pos.getX(), pos.getY(), pos.getZ())); - worldObj.markBlockForUpdate(pos); + worldObj.addWeatherEffect(new EntityLightningBolt(worldObj, xCoord, yCoord, zCoord)); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); for (int i = 0; i < 16; i++) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 2, pos); + SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 2, xCoord, yCoord, zCoord); } } + } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java index 05be629f..8ad6d782 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java @@ -10,9 +10,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.network.Packet; -import net.minecraft.server.gui.IUpdatePlayerListBox; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraftforge.common.util.Constants; import net.minecraftforge.oredict.OreDictionary; import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry; @@ -20,9 +18,9 @@ import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistryCompo import WayofTime.alchemicalWizardry.common.IDemon; import WayofTime.alchemicalWizardry.common.NewPacketHandler; import WayofTime.alchemicalWizardry.common.PlinthComponent; -import WayofTime.alchemicalWizardry.common.items.Orb; +import WayofTime.alchemicalWizardry.common.items.EnergyBattery; -public class TEPlinth extends TEInventory implements IUpdatePlayerListBox +public class TEPlinth extends TEInventory { public static final int sizeInv = 1; @@ -36,7 +34,7 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox private int progressInterval; private int progress; - public static List<PlinthComponent> pedestalPositions = new ArrayList<PlinthComponent>(); + public static List<PlinthComponent> pedestalPositions = new ArrayList(); public TEPlinth() { @@ -151,7 +149,7 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox } @Override - public String getName() + public String getInventoryName() { return "TEPlinth"; } @@ -164,8 +162,10 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox //Logic for the actual block is under here @Override - public void update() + public void updateEntity() { + super.updateEntity(); + if (worldObj.isRemote) { return; @@ -173,9 +173,9 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox if (!isActive()) { - if (getStackInSlot(0) != null && getStackInSlot(0).getItem() instanceof Orb) + if (getStackInSlot(0) != null && getStackInSlot(0).getItem() instanceof EnergyBattery) { - int bloodOrbLevel = ((Orb) getStackInSlot(0).getItem()).getOrbLevel(); + int bloodOrbLevel = ((EnergyBattery) getStackInSlot(0).getItem()).getOrbLevel(); if (SummoningRegistry.isRecipeValid(bloodOrbLevel, composeItemsForRingAndParadigm(1, true), composeItemsForRingAndParadigm(2, true), composeItemsForRingAndParadigm(3, true))) { @@ -203,7 +203,7 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox } } else { - if (getStackInSlot(0) != null && getStackInSlot(0).getItem() instanceof Orb) + if (getStackInSlot(0) != null && getStackInSlot(0).getItem() instanceof EnergyBattery) { if (progress % progressInterval == 0) { @@ -246,12 +246,12 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox if (progress >= progressInterval * 18) { - int bloodOrbLevel = ((Orb) getStackInSlot(0).getItem()).getOrbLevel(); + int bloodOrbLevel = ((EnergyBattery) getStackInSlot(0).getItem()).getOrbLevel(); EntityLivingBase entity = SummoningRegistry.getEntity(worldObj, bloodOrbLevel, ring1Inv, ring2Inv, ring3Inv); if (entity != null) { - entity.setPosition(pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5); + entity.setPosition(xCoord + 0.5, yCoord + 1, zCoord + 0.5); worldObj.spawnEntityInWorld(entity); if (entity instanceof IDemon) @@ -266,7 +266,7 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox if (worldObj != null) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } } } @@ -284,13 +284,12 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox { if (i < 6 && pc.getRing() == ring) { - BlockPos newPos = pos.add(pc.xOffset, pc.yOffset, pc.zOffset); - TileEntity tileEntity = worldObj.getTileEntity(newPos); + TileEntity tileEntity = worldObj.getTileEntity(xCoord + pc.xOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); if (tileEntity instanceof TEPedestal) { ((TEPedestal) tileEntity).setInventorySlotContents(0, null); - worldObj.markBlockForUpdate(newPos); + worldObj.markBlockForUpdate(xCoord + pc.xOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); i++; } } @@ -303,13 +302,12 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox { if (i < 6 && pc.getRing() == ring) { - BlockPos newPos = pos.add(pc.zOffset, pc.yOffset, pc.xOffset); - TileEntity tileEntity = worldObj.getTileEntity(newPos); + TileEntity tileEntity = worldObj.getTileEntity(xCoord + pc.zOffset, yCoord + pc.yOffset, zCoord + pc.xOffset); if (tileEntity instanceof TEPedestal) { ((TEPedestal) tileEntity).setInventorySlotContents(0, null); - worldObj.markBlockForUpdate(newPos); + worldObj.markBlockForUpdate(xCoord + pc.zOffset, yCoord + pc.yOffset, zCoord + pc.xOffset); i++; } } @@ -332,8 +330,7 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox { if (i < 6 && pc.getRing() == ring) { - BlockPos newPos = pos.add(pc.xOffset, pc.yOffset, pc.zOffset); - TileEntity tileEntity = worldObj.getTileEntity(newPos); + TileEntity tileEntity = worldObj.getTileEntity(xCoord + pc.xOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); if (tileEntity instanceof TEPedestal) { @@ -368,7 +365,7 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox ((TEPedestal) tileEntity).setInventorySlotContents(0, null); } ((TEPedestal) tileEntity).onItemDeletion(); - worldObj.markBlockForUpdate(newPos); + worldObj.markBlockForUpdate(xCoord + pc.xOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); return true; } } @@ -385,8 +382,7 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox { if (i < 6 && pc.getRing() == ring) { - BlockPos newPos = pos.add(pc.zOffset, pc.yOffset, pc.xOffset); - TileEntity tileEntity = worldObj.getTileEntity(newPos); + TileEntity tileEntity = worldObj.getTileEntity(xCoord + pc.zOffset, yCoord + pc.yOffset, zCoord + pc.xOffset); if (tileEntity instanceof TEPedestal) { @@ -417,7 +413,7 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox { ((TEPedestal) tileEntity).decrStackSize(0, 1); ((TEPedestal) tileEntity).onItemDeletion(); - worldObj.markBlockForUpdate(newPos); + worldObj.markBlockForUpdate(xCoord + pc.zOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); return true; } } @@ -443,8 +439,7 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox { if (i < 6 && pc.getRing() == ring) { - BlockPos newPos = pos.add(pc.xOffset, pc.yOffset, pc.zOffset); - TileEntity tileEntity = worldObj.getTileEntity(newPos); + TileEntity tileEntity = worldObj.getTileEntity(xCoord + pc.xOffset, yCoord + pc.yOffset, zCoord + pc.zOffset); if (tileEntity instanceof TEPedestal) { @@ -461,8 +456,7 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox { if (i < 6 && pc.getRing() == ring) { - BlockPos newPos = pos.add(pc.zOffset, pc.yOffset, pc.xOffset); - TileEntity tileEntity = worldObj.getTileEntity(newPos); + TileEntity tileEntity = worldObj.getTileEntity(xCoord + pc.zOffset, yCoord + pc.yOffset, zCoord + pc.xOffset); if (tileEntity instanceof TEPedestal) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java index fc59f70b..6efd07e2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java @@ -1,11 +1,12 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - +import WayofTime.alchemicalWizardry.api.ColourAndCoords; +import WayofTime.alchemicalWizardry.api.Int3; +import WayofTime.alchemicalWizardry.api.alchemy.energy.*; +import WayofTime.alchemicalWizardry.common.entity.projectile.EntityParticleBeam; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; @@ -13,25 +14,18 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.network.NetworkManager; import net.minecraft.network.Packet; import net.minecraft.network.play.server.S35PacketUpdateTileEntity; -import net.minecraft.server.gui.IUpdatePlayerListBox; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; +import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import WayofTime.alchemicalWizardry.api.ColourAndCoords; -import WayofTime.alchemicalWizardry.api.Int3; -import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler; -import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; -import WayofTime.alchemicalWizardry.api.alchemy.energy.TileSegmentedReagentHandler; -import WayofTime.alchemicalWizardry.common.entity.projectile.EntityParticleBeam; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import net.minecraftforge.common.util.ForgeDirection; -public class TEReagentConduit extends TileSegmentedReagentHandler implements IUpdatePlayerListBox +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +public class TEReagentConduit extends TileSegmentedReagentHandler { public List<ColourAndCoords> destinationList; //These are offsets public Map<Reagent, List<Int3>> reagentTargetList; @@ -54,9 +48,9 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp { super(numberOfTanks, size); - destinationList = new LinkedList<ColourAndCoords>(); - reagentTargetList = new HashMap<Reagent, List<Int3>>(); - reagentTankDesignationList = new HashMap<Reagent, Integer>(); + destinationList = new LinkedList(); + reagentTargetList = new HashMap(); + reagentTankDesignationList = new HashMap(); } public Int3 getColour() @@ -163,7 +157,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp NBTTagList tagList = tag.getTagList("destinationList", Constants.NBT.TAG_COMPOUND); - destinationList = new LinkedList<ColourAndCoords>(); + destinationList = new LinkedList(); for (int i = 0; i < tagList.tagCount(); i++) { @@ -172,7 +166,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp destinationList.add(ColourAndCoords.readFromNBT(savedTag)); } - reagentTargetList = new HashMap<Reagent, List<Int3>>(); + reagentTargetList = new HashMap(); NBTTagList reagentTagList = tag.getTagList("reagentTargetList", Constants.NBT.TAG_COMPOUND); @@ -182,7 +176,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp Reagent reagent = ReagentRegistry.getReagentForKey(savedTag.getString("reagent")); - List<Int3> coordList = new LinkedList<Int3>(); + List<Int3> coordList = new LinkedList(); NBTTagList coordinateList = savedTag.getTagList("coordinateList", Constants.NBT.TAG_COMPOUND); @@ -194,7 +188,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp reagentTargetList.put(reagent, coordList); } - reagentTankDesignationList = new HashMap<Reagent, Integer>(); + reagentTankDesignationList = new HashMap(); NBTTagList tankDesignationList = tag.getTagList("tankDesignationList", Constants.NBT.TAG_COMPOUND); @@ -202,7 +196,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp { NBTTagCompound savedTag = tankDesignationList.getCompoundTagAt(i); - this.reagentTankDesignationList.put(ReagentRegistry.getReagentForKey(savedTag.getString("reagent")), savedTag.getInteger("integer")); + this.reagentTankDesignationList.put(ReagentRegistry.getReagentForKey(savedTag.getString("reagent")), new Integer(savedTag.getInteger("integer"))); } } @@ -210,7 +204,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp { NBTTagList tagList = tag.getTagList("destinationList", Constants.NBT.TAG_COMPOUND); - destinationList = new LinkedList<ColourAndCoords>(); + destinationList = new LinkedList(); for (int i = 0; i < tagList.tagCount(); i++) { @@ -259,7 +253,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp } @Override - public void update() + public void updateEntity() { if (!worldObj.isRemote) { @@ -276,7 +270,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp this.updateColourList(); } - if (affectedByRedstone && worldObj.isBlockPowered(pos)) //isBlockBeingIndirectlyPowered() + if (affectedByRedstone && worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)) { return; } @@ -292,7 +286,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp break; } - ReagentStack maxDrainAmount = this.drain(EnumFacing.UP, new ReagentStack(entry.getKey(), this.tickRate - totalTransfered), false); + ReagentStack maxDrainAmount = this.drain(ForgeDirection.UNKNOWN, new ReagentStack(entry.getKey(), this.tickRate - totalTransfered), false); if (maxDrainAmount == null) { @@ -306,25 +300,28 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp continue; } - BlockPos newPos = pos.add(coord.xCoord, coord.yCoord, coord.zCoord); + int x = xCoord + coord.xCoord; + int y = yCoord + coord.yCoord; + int z = zCoord + coord.zCoord; - TileEntity tile = worldObj.getTileEntity(newPos); + TileEntity tile = worldObj.getTileEntity(x, y, z); if (tile instanceof IReagentHandler) { - int amount = Math.min(((IReagentHandler) tile).fill(EnumFacing.UP, maxDrainAmount, false), amountLeft); + int amount = Math.min(((IReagentHandler) tile).fill(ForgeDirection.UNKNOWN, maxDrainAmount, false), amountLeft); if (amount > 0) { + amountLeft -= amount; totalTransfered += amount; - ReagentStack stack = this.drain(EnumFacing.UP, new ReagentStack(entry.getKey(), amount), true); - ((IReagentHandler) tile).fill(EnumFacing.UP, stack, true); + ReagentStack stack = this.drain(ForgeDirection.UNKNOWN, new ReagentStack(entry.getKey(), amount), true); + ((IReagentHandler) tile).fill(ForgeDirection.UNKNOWN, stack, true); } } } } } else { - if (affectedByRedstone && worldObj.isBlockPowered(pos)) + if (affectedByRedstone && worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)) { return; } @@ -340,26 +337,27 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp } } + @SideOnly(Side.CLIENT) public void sendPlayerStuffs() { Minecraft mc = Minecraft.getMinecraft(); EntityPlayer player = mc.thePlayer; + World world = mc.theWorld; if (SpellHelper.canPlayerSeeAlchemy(player)) { for (ColourAndCoords colourSet : this.destinationList) { - BlockPos newPos = pos.add(colourSet.xCoord, colourSet.yCoord, colourSet.zCoord); - if (!(worldObj.getTileEntity(newPos) instanceof IReagentHandler)) + if (!(worldObj.getTileEntity(xCoord + colourSet.xCoord, yCoord + colourSet.yCoord, zCoord + colourSet.zCoord) instanceof IReagentHandler)) { continue; } - EntityParticleBeam beam = new EntityParticleBeam(worldObj, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5); + EntityParticleBeam beam = new EntityParticleBeam(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5); double velocity = Math.sqrt(Math.pow(colourSet.xCoord, 2) + Math.pow(colourSet.yCoord, 2) + Math.pow(colourSet.zCoord, 2)); double wantedVel = 0.3d; beam.setVelocity(wantedVel * colourSet.xCoord / velocity, wantedVel * colourSet.yCoord / velocity, wantedVel * colourSet.zCoord / velocity); beam.setColour(colourSet.colourRed / 255f, colourSet.colourGreen / 255f, colourSet.colourBlue / 255f); - beam.setDestination(pos.getX() + colourSet.xCoord, pos.getY() + colourSet.yCoord, pos.getZ() + colourSet.zCoord); + beam.setDestination(xCoord + colourSet.xCoord, yCoord + colourSet.yCoord, zCoord + colourSet.zCoord); worldObj.spawnEntityInWorld(beam); } } @@ -377,13 +375,13 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp if (newList != null && !newList.equals(destinationList)) { this.destinationList = newList; - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } } public List<ColourAndCoords> compileListForReagentTargets(Map<Reagent, List<Int3>> map) { - List<ColourAndCoords> list = new LinkedList<ColourAndCoords>(); + List<ColourAndCoords> list = new LinkedList(); for (Entry<Reagent, List<Int3>> entry : map.entrySet()) { @@ -423,7 +421,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp public boolean addDestinationViaActual(int red, int green, int blue, int intensity, int x, int y, int z) { - return this.addDestinationViaOffset(red, green, blue, intensity, x - pos.getX(), y - pos.getY(), z - pos.getZ()); + return this.addDestinationViaOffset(red, green, blue, intensity, x - this.xCoord, y - this.yCoord, z - this.zCoord); } @Override @@ -431,14 +429,14 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp { NBTTagCompound nbttagcompound = new NBTTagCompound(); writeClientNBT(nbttagcompound); - return new S35PacketUpdateTileEntity(pos, 90210, nbttagcompound); + return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 90210, nbttagcompound); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) { super.onDataPacket(net, packet); - readClientNBT(packet.getNbtCompound()); + readClientNBT(packet.func_148857_g()); } public boolean addReagentDestinationViaOffset(Reagent reagent, int xOffset, int yOffset, int zOffset) @@ -471,7 +469,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp List<Int3> coordList = this.reagentTargetList.get(reagent); if (coordList == null) { - List<Int3> newCoordList = new LinkedList<Int3>(); + List<Int3> newCoordList = new LinkedList(); newCoordList.add(newCoord); this.reagentTargetList.put(reagent, newCoordList); } else @@ -482,7 +480,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp return true; } else { - List<Int3> newCoordList = new LinkedList<Int3>(); + List<Int3> newCoordList = new LinkedList(); newCoordList.add(newCoord); this.reagentTargetList.put(reagent, newCoordList); @@ -492,7 +490,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp public boolean addReagentDestinationViaActual(Reagent reagent, int x, int y, int z) { - return (this.addReagentDestinationViaOffset(reagent, x - pos.getX(), y - pos.getY(), z - pos.getZ())); + return (this.addReagentDestinationViaOffset(reagent, x - xCoord, y - yCoord, z - zCoord)); } public boolean removeReagentDestinationViaOffset(Reagent reagent, int xOffset, int yOffset, int zOffset) @@ -512,15 +510,15 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp public boolean removeReagentDestinationViaActual(Reagent reagent, int x, int y, int z) { - return this.removeReagentDestinationViaOffset(reagent, x - pos.getX(), y - pos.getY(), z - pos.getZ()); + return this.removeReagentDestinationViaOffset(reagent, x - xCoord, y - yCoord, z - zCoord); } @Override - public int fill(EnumFacing from, ReagentStack resource, boolean doFill) + public int fill(ForgeDirection from, ReagentStack resource, boolean doFill) { if (doFill && !worldObj.isRemote) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); hasChanged = 2; } @@ -528,24 +526,14 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp } @Override - public ReagentStack drain(EnumFacing from, ReagentStack resource, boolean doDrain) + public ReagentStack drain(ForgeDirection from, ReagentStack resource, boolean doDrain) { if (doDrain && !worldObj.isRemote) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); hasChanged = 2; } return super.drain(from, resource, doDrain); } - - public void removeReagentDestinationViaActual(Reagent reagent, BlockPos pos) - { - this.removeReagentDestinationViaActual(reagent, pos.getX(), pos.getY(), pos.getZ()); - } - - public boolean addReagentDestinationViaActual(Reagent reagent, BlockPos pos) - { - return addReagentDestinationViaActual(reagent, pos.getX(), pos.getY(), pos.getZ()); - } } \ No newline at end of file diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java index 82cd940e..b1aa3e94 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java @@ -1,26 +1,24 @@ package WayofTime.alchemicalWizardry.common.tileEntity; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.common.demonVillage.BuildingSchematic; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; + import java.io.FileWriter; import java.io.IOException; import java.io.Writer; import java.util.Random; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.common.demonVillage.BuildingSchematic; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; - public class TESchematicSaver extends TileEntity { public Block targetBlock = ModBlocks.largeBloodStoneBrick; - public void rightClickBlock() + public void rightClickBlock(EntityPlayer player, int side) { BuildingSchematic schematic = new BuildingSchematic(); @@ -37,15 +35,14 @@ public class TESchematicSaver extends TileEntity { for (int k = -negZ + 1; k <= posZ - 1; k++) { - BlockPos newPos = pos.add(i, j, k); - IBlockState state = worldObj.getBlockState(newPos); - Block block = state.getBlock(); - int meta = block.getMetaFromState(state); + int meta = worldObj.getBlockMetadata(xCoord + i, yCoord + j, zCoord + k); + Block block = worldObj.getBlock(xCoord + i, yCoord + j, zCoord + k); - if (!block.isAir(worldObj, newPos)) + if (!block.isAir(worldObj, xCoord + i, yCoord + j, zCoord + k)) { schematic.addBlockWithMeta(block, meta, i, j, k); } + } } @@ -73,7 +70,7 @@ public class TESchematicSaver extends TileEntity int i = 1; while (i < 100) { - if (targetBlock == (worldObj.getBlockState(pos.add(0, i, 0)).getBlock())) + if (targetBlock == (worldObj.getBlock(xCoord, yCoord + i, zCoord))) { return i; } @@ -88,7 +85,7 @@ public class TESchematicSaver extends TileEntity int i = 1; while (i < 100) { - if (targetBlock == (worldObj.getBlockState(pos.add(0, -i, 0)).getBlock())) + if (targetBlock == (worldObj.getBlock(xCoord, yCoord - i, zCoord))) { return i; } @@ -103,7 +100,7 @@ public class TESchematicSaver extends TileEntity int i = 1; while (i < 100) { - if (targetBlock == (worldObj.getBlockState(pos.add(i, 0, 0)).getBlock())) + if (targetBlock == (worldObj.getBlock(xCoord + i, yCoord, zCoord))) { return i; } @@ -118,7 +115,7 @@ public class TESchematicSaver extends TileEntity int i = 1; while (i < 100) { - if (targetBlock == (worldObj.getBlockState(pos.add(-i, 0, 0)).getBlock())) + if (targetBlock == (worldObj.getBlock(xCoord - i, yCoord, zCoord))) { return i; } @@ -133,7 +130,7 @@ public class TESchematicSaver extends TileEntity int i = 1; while (i < 100) { - if (targetBlock == (worldObj.getBlockState(pos.add(0, 0, i)).getBlock())) + if (targetBlock == (worldObj.getBlock(xCoord, yCoord, zCoord + i))) { return i; } @@ -148,7 +145,7 @@ public class TESchematicSaver extends TileEntity int i = 1; while (i < 100) { - if (targetBlock == (worldObj.getBlockState(pos.add(0, 0, -i)).getBlock())) + if (targetBlock == (worldObj.getBlock(xCoord, yCoord, zCoord - i))) { return i; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESocket.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESocket.java index 2dab8da8..faa72994 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESocket.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESocket.java @@ -45,7 +45,7 @@ public class TESocket extends TEInventory } @Override - public String getName() + public String getInventoryName() { return "TESocket"; } @@ -56,6 +56,13 @@ public class TESocket extends TEInventory return 1; } + //Logic for the actual block is under here + @Override + public void updateEntity() + { + super.updateEntity(); + } + public void setActive() { isActive = false; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralBlock.java index 56ddd107..22e637c3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralBlock.java @@ -1,13 +1,11 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.server.gui.IUpdatePlayerListBox; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; import WayofTime.alchemicalWizardry.ModBlocks; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; -public class TESpectralBlock extends TileEntity implements IUpdatePlayerListBox +public class TESpectralBlock extends TileEntity { private int ticksRemaining; @@ -33,30 +31,31 @@ public class TESpectralBlock extends TileEntity implements IUpdatePlayerListBox } @Override - public void update() + public void updateEntity() { - if (worldObj.isRemote) + super.updateEntity(); + +// if (worldObj.isRemote) { - return; +// return; } this.ticksRemaining--; if (this.ticksRemaining <= 0) { - worldObj.setBlockToAir(pos); + worldObj.setBlockToAir(xCoord, yCoord, zCoord); } } - public static boolean createSpectralBlockAtLocation(World world, BlockPos pos, int duration) + public static boolean createSpectralBlockAtLocation(World world, int x, int y, int z, int duration) { - if (!world.isAirBlock(pos)) + if (!world.isAirBlock(x, y, z)) { return false; } - - world.setBlockState(pos, ModBlocks.spectralBlock.getDefaultState()); - TileEntity tile = world.getTileEntity(pos); + world.setBlock(x, y, z, ModBlocks.spectralBlock); + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof TESpectralBlock) { ((TESpectralBlock) tile).setDuration(duration); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralContainer.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralContainer.java index 5936d83f..1ee0076c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralContainer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralContainer.java @@ -1,20 +1,17 @@ package WayofTime.alchemicalWizardry.common.tileEntity; +import WayofTime.alchemicalWizardry.ModBlocks; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import net.minecraft.server.gui.IUpdatePlayerListBox; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; import net.minecraftforge.fluids.IFluidBlock; -import WayofTime.alchemicalWizardry.ModBlocks; -public class TESpectralContainer extends TileEntity implements IUpdatePlayerListBox +public class TESpectralContainer extends TileEntity { private ItemStack[] inv; @@ -69,8 +66,10 @@ public class TESpectralContainer extends TileEntity implements IUpdatePlayerList } @Override - public void update() + public void updateEntity() { + super.updateEntity(); + this.ticksRemaining--; if (this.ticksRemaining <= 0) @@ -79,23 +78,22 @@ public class TESpectralContainer extends TileEntity implements IUpdatePlayerList } } - public static boolean createSpectralBlockAtLocation(World world, BlockPos pos, int duration) + public static boolean createSpectralBlockAtLocation(World world, int x, int y, int z, int duration) { - IBlockState state = world.getBlockState(pos); - Block block = state.getBlock(); + Block block = world.getBlock(x, y, z); if (block == null) { return false; } - if (world.getTileEntity(pos) == null || block instanceof IFluidBlock) + if (world.getTileEntity(x, y, z) == null || block instanceof IFluidBlock) { - int meta = block.getMetaFromState(state); + int meta = world.getBlockMetadata(x, y, z); ItemStack item = new ItemStack(block, 1, meta); - world.setBlockState(pos, ModBlocks.blockSpectralContainer.getDefaultState()); - TileEntity tile = world.getTileEntity(pos); + world.setBlock(x, y, z, ModBlocks.blockSpectralContainer); + TileEntity tile = world.getTileEntity(x, y, z); if (tile instanceof TESpectralContainer) { ((TESpectralContainer) tile).setContainedItem(item); @@ -132,18 +130,18 @@ public class TESpectralContainer extends TileEntity implements IUpdatePlayerList { if (item.getItem() instanceof ItemBlock) { - Block block = ((ItemBlock) item.getItem()).getBlock(); + Block block = ((ItemBlock) item.getItem()).field_150939_a; int meta = item.getItemDamage(); if (block != null) { - this.worldObj.setBlockState(pos, block.getStateFromMeta(meta), 6); + this.worldObj.setBlock(xCoord, yCoord, zCoord, block, meta, 6); } } } else { - this.worldObj.setBlockToAir(pos); + this.worldObj.setBlockToAir(xCoord, yCoord, zCoord); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java index 278c943a..5e38781c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java @@ -1,9 +1,9 @@ package WayofTime.alchemicalWizardry.common.tileEntity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; import WayofTime.alchemicalWizardry.api.tile.ISpellTile; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; public abstract class TESpellBlock extends TEOrientable implements ISpellTile { @@ -23,9 +23,12 @@ public abstract class TESpellBlock extends TEOrientable implements ISpellTile public TESpellBlock getTileAtOutput() { - EnumFacing output = this.getOutputDirection(); + ForgeDirection output = this.getOutputDirection(); + int xOffset = output.offsetX; + int yOffset = output.offsetY; + int zOffset = output.offsetZ; - TileEntity tile = worldObj.getTileEntity(pos.add(output.getDirectionVec())); + TileEntity tile = worldObj.getTileEntity(xCoord + xOffset, yCoord + yOffset, zCoord + zOffset); if (tile instanceof TESpellBlock && ((TESpellBlock) tile).canInputRecieveOutput(output)) { @@ -41,7 +44,7 @@ public abstract class TESpellBlock extends TEOrientable implements ISpellTile } @Override - public boolean canInputRecieveOutput(EnumFacing output) + public boolean canInputRecieveOutput(ForgeDirection output) { return this.canInputRecieve() && this.getInputDirection().getOpposite() == output; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEffectBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEffectBlock.java index da988b1a..28f3f504 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEffectBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEffectBlock.java @@ -14,7 +14,7 @@ public class TESpellEffectBlock extends TESpellBlock public SpellEffect getSpellEffect() { - int meta = this.getBlockMetadata(); + int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); switch (meta) { case 0: diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEnhancementBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEnhancementBlock.java index 13aaf122..2682d67b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEnhancementBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellEnhancementBlock.java @@ -37,7 +37,7 @@ public class TESpellEnhancementBlock extends TESpellBlock public SpellEnhancement getSpellEnhancement() { - int meta = this.getBlockMetadata(); + int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); switch (meta) { case 0: @@ -64,7 +64,7 @@ public class TESpellEnhancementBlock extends TESpellBlock public int getLimit() { - int meta = this.getBlockMetadata(); + int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); switch (meta) { case 0: @@ -103,7 +103,7 @@ public class TESpellEnhancementBlock extends TESpellBlock public int enhancementType() //0 is power, 1 is cost, 2 is potency { - int meta = this.getBlockMetadata(); + int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); switch (meta) { case 0: diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellModifierBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellModifierBlock.java index b1a3e1fa..06787e48 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellModifierBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellModifierBlock.java @@ -13,7 +13,7 @@ public class TESpellModifierBlock extends TESpellBlock public ComplexSpellModifier getSpellModifier() { - int meta = this.getBlockMetadata(); + int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); switch (meta) { case 0: diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java index c60c5ebc..21f12faa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java @@ -2,8 +2,8 @@ package WayofTime.alchemicalWizardry.common.tileEntity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.spell.SpellParadigm; import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; @@ -15,7 +15,7 @@ public class TESpellParadigmBlock extends TESpellBlock implements ISpellParadigm { public SpellParadigm getSpellParadigm() { - int meta = this.getBlockMetadata(); + int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); switch (meta) { case 0: @@ -31,7 +31,10 @@ public class TESpellParadigmBlock extends TESpellBlock implements ISpellParadigm } @Override - protected void applySpellChange(SpellParadigm parad) {} + protected void applySpellChange(SpellParadigm parad) + { + + } public boolean canInputRecieve() { @@ -65,11 +68,14 @@ public class TESpellParadigmBlock extends TESpellBlock implements ISpellParadigm } @Override - public void setInputDirection(EnumFacing direction) {} + public void setInputDirection(ForgeDirection direction) + { + + } @Override - public EnumFacing getInputDirection() + public ForgeDirection getInputDirection() { - return EnumFacing.WEST; + return ForgeDirection.UNKNOWN; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java index 018f3244..e9ae36df 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java @@ -9,16 +9,15 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.Packet; -import net.minecraft.server.gui.IUpdatePlayerListBox; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.common.NewPacketHandler; import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -public class TETeleposer extends TEInventory implements IUpdatePlayerListBox +public class TETeleposer extends TEInventory { public static final int sizeInv = 1; @@ -60,7 +59,7 @@ public class TETeleposer extends TEInventory implements IUpdatePlayerListBox } @Override - public String getName() + public String getInventoryName() { return "TETeleposer"; } @@ -73,14 +72,16 @@ public class TETeleposer extends TEInventory implements IUpdatePlayerListBox //Logic for the actual block is under here @Override - public void update() + public void updateEntity() { + super.updateEntity(); + if (worldObj.isRemote) { return; } - int currentInput = worldObj.getStrongPower(pos); + int currentInput = worldObj.getBlockPowerInput(xCoord, yCoord, zCoord); if (previousInput == 0 && currentInput != 0) { @@ -92,20 +93,18 @@ public class TETeleposer extends TEInventory implements IUpdatePlayerListBox int xf = focusItem.xCoord(focus); int yf = focusItem.yCoord(focus); int zf = focusItem.zCoord(focus); - BlockPos posF = focusItem.getBlockPos(focus); - World worldF = focusItem.getWorld(focus); - int damage = (int) (0.5f * Math.sqrt(pos.distanceSq(posF))); + int damage = (int) (0.5f * Math.sqrt((xCoord - xf) * (xCoord - xf) + (yCoord - yf + 1) * (yCoord - yf + 1) + (zCoord - zf) * (zCoord - zf))); int focusLevel = focusItem.getFocusLevel(); int transportCount = 0; int entityCount = 0; - if (worldF != null && worldF.getTileEntity(posF) instanceof TETeleposer && !worldF.getTileEntity(posF).equals(this)) + if (worldF != null && worldF.getTileEntity(xf, yf, zf) instanceof TETeleposer && !worldF.getTileEntity(xf, yf, zf).equals(this)) { //Prime the teleportation int d0 = focusLevel - 1; - AxisAlignedBB axisalignedbb1 = new AxisAlignedBB(pos.add(0, 1, 0), pos.add(1, 2, 1)).expand(d0, d0, d0); -// axisalignedbb1.maxY = Math.min((double) this.worldObj.getHeight(), pos.getY() + 2 + d0 + d0); + AxisAlignedBB axisalignedbb1 = AxisAlignedBB.getBoundingBox((double) this.xCoord-0.5, (double) this.yCoord + d0 + 0.5, (double) this.zCoord-0.5, (double) (this.xCoord + 0.5), (double) (this.yCoord + 1.5 + d0), (double) (this.zCoord + 0.5)).expand(d0, d0, d0); + axisalignedbb1.maxY = Math.min((double) this.worldObj.getHeight(), this.yCoord + 2 + d0 + d0); List list1 = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb1); Iterator iterator1 = list1.iterator(); EntityLivingBase entityplayer1; @@ -116,7 +115,7 @@ public class TETeleposer extends TEInventory implements IUpdatePlayerListBox entityCount++; } - AxisAlignedBB axisalignedbb2 = new AxisAlignedBB(xf-0.5, yf + d0 + 0.5, zf-0.5, xf + 0.5, yf + 1.5 + d0, zf+0.5).expand(d0, d0, d0); + AxisAlignedBB axisalignedbb2 = AxisAlignedBB.getBoundingBox(xf-0.5, yf + d0 + 0.5, zf-0.5, xf + 0.5, yf + 1.5 + d0, zf+0.5).expand(d0, d0, d0); List list2 = worldF.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb2); Iterator iterator2 = list2.iterator(); EntityLivingBase entityplayer2; @@ -127,7 +126,7 @@ public class TETeleposer extends TEInventory implements IUpdatePlayerListBox entityCount++; } - if (SoulNetworkHandler.canSyphonInContainer(focus, damage * (focusLevel * 2 - 1) * (focusLevel * 2 - 1) * (focusLevel * 2 - 1) + damage * entityCount)) + if (EnergyItems.canSyphonInContainer(focus, damage * (focusLevel * 2 - 1) * (focusLevel * 2 - 1) * (focusLevel * 2 - 1) + damage * entityCount)) { for (int k = 0; k <= (focusLevel * 2 - 2); k++) for (int i = -(focusLevel - 1); i <= (focusLevel - 1); i++) @@ -135,7 +134,7 @@ public class TETeleposer extends TEInventory implements IUpdatePlayerListBox for (int j = -(focusLevel - 1); j <= (focusLevel - 1); j++) { { - if (BlockTeleposer.swapBlocks(this, worldObj, worldF, pos.add(i, 1 + k, j), posF.add(i, 1 + k, j))) + if (BlockTeleposer.swapBlocks(this, worldObj, worldF, xCoord + i, yCoord + 1 + k, zCoord + j, xf + i, yf + 1 + k, zf + j)) { transportCount++; } @@ -148,7 +147,7 @@ public class TETeleposer extends TEInventory implements IUpdatePlayerListBox entityCount = 0; } - SoulNetworkHandler.syphonFromNetworkWhileInContainer(focus, damage * transportCount + damage * entityCount); + SoulNetworkHandler.syphonFromNetwork(focus, damage * transportCount + damage * entityCount); //Teleport if (worldF.equals(worldObj)) @@ -160,14 +159,14 @@ public class TETeleposer extends TEInventory implements IUpdatePlayerListBox { entityplayer1 = (EntityLivingBase) iterator1.next(); entityplayer1.worldObj = worldF; - entityplayer1.setPositionAndUpdate(entityplayer1.posX - pos.getX() + xf, entityplayer1.posY - pos.getY() + yf, entityplayer1.posZ - pos.getZ() + zf); + entityplayer1.setPositionAndUpdate(entityplayer1.posX - this.xCoord + xf, entityplayer1.posY - this.yCoord + yf, entityplayer1.posZ - this.zCoord + zf); } while (iterator2.hasNext()) { entityplayer2 = (EntityLivingBase) iterator2.next(); entityplayer2.worldObj = worldF; - entityplayer2.setPositionAndUpdate(entityplayer2.posX + pos.getX() - xf, entityplayer2.posY + pos.getY() - yf, entityplayer2.posZ + pos.getZ() - zf); + entityplayer2.setPositionAndUpdate(entityplayer2.posX + this.xCoord - xf, entityplayer2.posY + this.yCoord - yf, entityplayer2.posZ + this.zCoord - zf); } }else { @@ -177,17 +176,17 @@ public class TETeleposer extends TEInventory implements IUpdatePlayerListBox while (iterator1.hasNext()) { entityplayer1 = (EntityLivingBase) iterator1.next(); - SpellHelper.teleportEntityToDim(worldObj, worldF.provider.getDimensionId(), entityplayer1.posX - pos.getX() + xf, entityplayer1.posY - pos.getY() + yf, entityplayer1.posZ - pos.getZ() + zf, entityplayer1); + SpellHelper.teleportEntityToDim(worldObj, worldF.provider.dimensionId, entityplayer1.posX - this.xCoord + xf, entityplayer1.posY - this.yCoord + yf, entityplayer1.posZ - this.zCoord + zf, entityplayer1); // entityplayer1.worldObj = worldF; -// entityplayer1.setPositionAndUpdate(entityplayer1.posX - pos.getX() + xf, entityplayer1.posY - pos.getY() + yf, entityplayer1.posZ - pos.getZ() + zf); +// entityplayer1.setPositionAndUpdate(entityplayer1.posX - this.xCoord + xf, entityplayer1.posY - this.yCoord + yf, entityplayer1.posZ - this.zCoord + zf); } while (iterator2.hasNext()) { entityplayer2 = (EntityLivingBase) iterator2.next(); - SpellHelper.teleportEntityToDim(worldF, worldObj.provider.getDimensionId(), entityplayer2.posX + pos.getX() - xf, entityplayer2.posY + pos.getY() - yf, entityplayer2.posZ + pos.getZ() - zf, entityplayer2); + SpellHelper.teleportEntityToDim(worldF, worldObj.provider.dimensionId, entityplayer2.posX + this.xCoord - xf, entityplayer2.posY + this.yCoord - yf, entityplayer2.posZ + this.zCoord - zf, entityplayer2); // entityplayer2.worldObj = worldF; -// entityplayer2.setPositionAndUpdate(entityplayer2.posX + pos.getX() - xf, entityplayer2.posY + pos.getY() - yf, entityplayer2.posZ + pos.getZ() - zf); +// entityplayer2.setPositionAndUpdate(entityplayer2.posX + this.xCoord - xf, entityplayer2.posY + this.yCoord - yf, entityplayer2.posZ + this.zCoord - zf); } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEChemistrySet.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java similarity index 88% rename from src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEChemistrySet.java rename to src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java index 502c3f75..101950d1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEChemistrySet.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java @@ -5,8 +5,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.server.gui.IUpdatePlayerListBox; -import net.minecraft.util.EnumFacing; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.oredict.OreDictionary; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler; @@ -23,7 +22,7 @@ import WayofTime.alchemicalWizardry.common.alchemy.ICombinationalCatalyst; import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpdatePlayerListBox +public class TEWritingTable extends TEInventory implements ISidedInventory { public static final int sizeInv = 7; @@ -32,7 +31,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd private int accelerationTime; - public TEChemistrySet() + public TEWritingTable() { super(sizeInv); } @@ -60,7 +59,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd } @Override - public String getName() + public String getInventoryName() { return "aw.TEWritingTable"; } @@ -180,7 +179,13 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd public boolean containsCombinationCatalyst() { - return getCombinationCatalystPosition() != -1; + if (getCombinationCatalystPosition() != -1) + { + return true; + } else + { + return false; + } } public int getCombinationCatalystPosition() @@ -293,7 +298,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd } @Override - public void update() + public void updateEntity() { int progressNeeded = 100; long worldTime = worldObj.getWorldTime(); @@ -317,7 +322,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldTime % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); + SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); } if (progress >= progressNeeded) @@ -332,7 +337,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldObj != null) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } return; @@ -348,7 +353,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldObj != null) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } return; @@ -369,7 +374,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldObj != null) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } } } @@ -381,7 +386,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldTime % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); + SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); } if (progress >= progressNeeded) @@ -396,7 +401,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldObj != null) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } return; @@ -412,7 +417,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldObj != null) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } return; @@ -424,7 +429,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd this.setInventorySlotContents(6, flaskStack); } else { - worldObj.createExplosion(null, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, 2, false); + worldObj.createExplosion(null, xCoord + 0.5, yCoord + 1, zCoord + 0.5, 2, false); } this.decrStackSize(this.getPotionFlaskPosition(), 1); @@ -434,7 +439,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldObj != null) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } } } @@ -447,7 +452,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldTime % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); + SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); } if (progress >= progressNeeded) @@ -461,7 +466,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldObj != null) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } return; @@ -474,7 +479,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldObj != null) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } } } @@ -486,7 +491,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldTime % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); + SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); } if (progress >= progressNeeded) @@ -500,7 +505,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldObj != null) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } return; @@ -515,7 +520,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldObj != null) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } } } @@ -528,7 +533,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldTime % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); + SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); } if (progress >= progressNeeded) @@ -542,7 +547,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldObj != null) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } return; @@ -559,7 +564,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldObj != null) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } } } @@ -579,7 +584,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldObj != null) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } } @@ -594,7 +599,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldTime % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); + SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); } progress += acceleration; @@ -615,14 +620,14 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldObj != null) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } } } else if (getStackInSlot(6).getItem() == getResultingItemStack().getItem() && getResultingItemStack().stackSize <= (getStackInSlot(6).getMaxStackSize() - getStackInSlot(6).stackSize)) { if (worldTime % 4 == 0) { - SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); + SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); } if (!SoulNetworkHandler.syphonFromNetworkWhileInContainer(getStackInSlot(0), amountUsed * acceleration)) @@ -650,7 +655,7 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd if (worldObj != null) { - worldObj.markBlockForUpdate(pos); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } } } @@ -732,25 +737,26 @@ public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpd } @Override - public int[] getSlotsForFace(EnumFacing facing) + public int[] getAccessibleSlotsFromSide(int side) { - switch(facing) + ForgeDirection dir = ForgeDirection.getOrientation(side); + switch(dir) { - case DOWN: - return new int[]{6}; - default: - return new int[]{0, 1, 2, 3, 4, 5}; + case DOWN: + return new int[]{6}; + default: + return new int[]{0, 1, 2, 3, 4, 5}; } } @Override - public boolean canInsertItem(int slot, ItemStack stack, EnumFacing facing) + public boolean canInsertItem(int slot, ItemStack stack, int side) { return slot != 6; } @Override - public boolean canExtractItem(int slot, ItemStack stack, EnumFacing facing) + public boolean canExtractItem(int slot, ItemStack stack, int side) { return slot == 6; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java index 23bc01cc..647f43e7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.common.tileEntity.container; import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; +import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; @@ -10,9 +10,9 @@ import net.minecraft.item.ItemStack; public class ContainerWritingTable extends Container { - protected TEChemistrySet tileEntity; + protected TEWritingTable tileEntity; - public ContainerWritingTable(InventoryPlayer inventoryPlayer, TEChemistrySet te) + public ContainerWritingTable(InventoryPlayer inventoryPlayer, TEWritingTable te) { tileEntity = te; addSlotToContainer(new Slot(tileEntity, 0, 152, 110)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java index 8245881e..135de81b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java @@ -2,16 +2,15 @@ package WayofTime.alchemicalWizardry.common.tileEntity.gui; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; import net.minecraft.world.World; -import net.minecraftforge.fml.common.network.IGuiHandler; import WayofTime.alchemicalWizardry.common.items.sigil.holding.ContainerHolding; import WayofTime.alchemicalWizardry.common.items.sigil.holding.GuiHolding; import WayofTime.alchemicalWizardry.common.items.sigil.holding.InventoryHolding; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; -import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; +import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerTeleposer; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable; +import cpw.mods.fml.common.network.IGuiHandler; public class GuiHandler implements IGuiHandler { @@ -20,20 +19,19 @@ public class GuiHandler implements IGuiHandler public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { TileEntity tileEntity; - BlockPos pos = new BlockPos(x, y, z); switch (id) { case 0: - tileEntity = world.getTileEntity(pos); + tileEntity = world.getTileEntity(x, y, z); - if (tileEntity instanceof TEChemistrySet) + if (tileEntity instanceof TEWritingTable) { - return new ContainerWritingTable(player.inventory, (TEChemistrySet) tileEntity); + return new ContainerWritingTable(player.inventory, (TEWritingTable) tileEntity); } case 1: - tileEntity = world.getTileEntity(pos); + tileEntity = world.getTileEntity(x, y, z); if (tileEntity instanceof TETeleposer) { @@ -52,22 +50,21 @@ public class GuiHandler implements IGuiHandler public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { TileEntity tileEntity; - BlockPos pos = new BlockPos(x, y, z); - + switch (id) { case 0: - tileEntity = world.getTileEntity(pos); + tileEntity = world.getTileEntity(x, y, z); - if (tileEntity instanceof TEChemistrySet) + if (tileEntity instanceof TEWritingTable) { - return new GuiChemistrySet(player.inventory, (TEChemistrySet) tileEntity); + return new GuiWritingTable(player.inventory, (TEWritingTable) tileEntity); } break; case 1: - tileEntity = world.getTileEntity(pos); + tileEntity = world.getTileEntity(x, y, z); if (tileEntity instanceof TETeleposer) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiChemistrySet.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java similarity index 87% rename from src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiChemistrySet.java rename to src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java index e1a05602..a0c1baba 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiChemistrySet.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java @@ -7,12 +7,12 @@ import net.minecraft.util.StatCollector; import org.lwjgl.opengl.GL11; -import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; +import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable; -public class GuiChemistrySet extends GuiContainer +public class GuiWritingTable extends GuiContainer { - public GuiChemistrySet(InventoryPlayer inventoryPlayer, TEChemistrySet tileEntity) + public GuiWritingTable(InventoryPlayer inventoryPlayer, TEWritingTable tileEntity) { super(new ContainerWritingTable(inventoryPlayer, tileEntity)); xSize = 176; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Alchemy.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Alchemy.java index 1cf2a2a3..68ae82e1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Alchemy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Alchemy.java @@ -1,126 +1,131 @@ -//package WayofTime.alchemicalWizardry.common.tweaker; -// -//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; -//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStacks; -//import net.minecraft.item.ItemStack; -//import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe; -//import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -// -///** -// * MineTweaker3 Alchemy Recipe Handler by joshie * -// */ -//@ZenClass("mods.bloodmagic.Alchemy") -//public class Alchemy -//{ -// @ZenMethod -// public static void addRecipe(IItemStack output, IItemStack[] input, int tier, int lp) { -// MineTweakerAPI.apply(new Add(new AlchemyRecipe(toStack(output), (int) (((double) lp) / 100), toStacks(input), tier))); -// } -// -// private static class Add implements IUndoableAction -// { -// private final AlchemyRecipe recipe; -// -// public Add(AlchemyRecipe recipe) -// { -// this.recipe = recipe; -// } -// -// @Override -// public void apply() -// { -// AlchemyRecipeRegistry.recipes.add(recipe); -// } -// -// @Override -// public boolean canUndo() -// { -// return AlchemyRecipeRegistry.recipes != null; -// } -// -// @Override -// public void undo() -// { -// AlchemyRecipeRegistry.recipes.remove(recipe); -// } -// -// @Override -// public String describe() -// { -// return "Adding Alchemy Recipe for " + ((AlchemyRecipe) recipe).getResult().getDisplayName(); -// } -// -// @Override -// public String describeUndo() -// { -// return "Removing Alchemy Recipe for " + ((AlchemyRecipe) recipe).getResult().getDisplayName(); -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -// -// @ZenMethod -// public static void removeRecipe(IItemStack output) { -// MineTweakerAPI.apply(new Remove(toStack(output))); -// } -// -// private static class Remove implements IUndoableAction -// { -// private final ItemStack output; -// private AlchemyRecipe recipe; -// -// public Remove(ItemStack output) -// { -// this.output = output; -// } -// -// @Override -// public void apply() -// { -// for (AlchemyRecipe r : AlchemyRecipeRegistry.recipes) -// { -// if (r.getResult() != null && r.getResult().isItemEqual(output)) -// { -// recipe = r; -// break; -// } -// } -// -// AlchemyRecipeRegistry.recipes.remove(recipe); -// } -// -// @Override -// public boolean canUndo() -// { -// return AlchemyRecipeRegistry.recipes != null && recipe != null; -// } -// -// @Override -// public void undo() -// { -// AlchemyRecipeRegistry.recipes.add(recipe); -// } -// -// @Override -// public String describe() -// { -// return "Removing Alchemy Recipe for " + output.getDisplayName(); -// } -// -// @Override -// public String describeUndo() -// { -// return "Restoring Alchemy Recipe for " + output.getDisplayName(); -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -//} +package WayofTime.alchemicalWizardry.common.tweaker; + +import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; +import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStacks; +import minetweaker.IUndoableAction; +import minetweaker.MineTweakerAPI; +import minetweaker.api.item.IItemStack; +import net.minecraft.item.ItemStack; +import stanhebben.zenscript.annotations.ZenClass; +import stanhebben.zenscript.annotations.ZenMethod; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; + +/** + * MineTweaker3 Alchemy Recipe Handler by joshie * + */ +@ZenClass("mods.bloodmagic.Alchemy") +public class Alchemy +{ + @ZenMethod + public static void addRecipe(IItemStack output, IItemStack[] input, int tier, int lp) { + MineTweakerAPI.apply(new Add(new AlchemyRecipe(toStack(output), (int) (((double) lp) / 100), toStacks(input), tier))); + } + + private static class Add implements IUndoableAction + { + private final AlchemyRecipe recipe; + + public Add(AlchemyRecipe recipe) + { + this.recipe = recipe; + } + + @Override + public void apply() + { + AlchemyRecipeRegistry.recipes.add(recipe); + } + + @Override + public boolean canUndo() + { + return AlchemyRecipeRegistry.recipes != null; + } + + @Override + public void undo() + { + AlchemyRecipeRegistry.recipes.remove(recipe); + } + + @Override + public String describe() + { + return "Adding Alchemy Recipe for " + ((AlchemyRecipe) recipe).getResult().getDisplayName(); + } + + @Override + public String describeUndo() + { + return "Removing Alchemy Recipe for " + ((AlchemyRecipe) recipe).getResult().getDisplayName(); + } + + @Override + public Object getOverrideKey() + { + return null; + } + } + + @ZenMethod + public static void removeRecipe(IItemStack output) { + MineTweakerAPI.apply(new Remove(toStack(output))); + } + + private static class Remove implements IUndoableAction + { + private final ItemStack output; + private AlchemyRecipe recipe; + + public Remove(ItemStack output) + { + this.output = output; + } + + @Override + public void apply() + { + for (AlchemyRecipe r : AlchemyRecipeRegistry.recipes) + { + if (r.getResult() != null && r.getResult().isItemEqual(output)) + { + recipe = r; + break; + } + } + + AlchemyRecipeRegistry.recipes.remove(recipe); + } + + @Override + public boolean canUndo() + { + return AlchemyRecipeRegistry.recipes != null && recipe != null; + } + + @Override + public void undo() + { + AlchemyRecipeRegistry.recipes.add(recipe); + } + + @Override + public String describe() + { + return "Removing Alchemy Recipe for " + output.getDisplayName(); + } + + @Override + public String describeUndo() + { + return "Restoring Alchemy Recipe for " + output.getDisplayName(); + } + + @Override + public Object getOverrideKey() + { + return null; + } + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Binding.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Binding.java index 01384dc6..5f5eac4f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Binding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Binding.java @@ -1,130 +1,130 @@ -//package WayofTime.alchemicalWizardry.common.tweaker; -// -//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; -//import minetweaker.IUndoableAction; -//import minetweaker.MineTweakerAPI; -//import minetweaker.api.item.IItemStack; -//import net.minecraft.item.ItemStack; -//import stanhebben.zenscript.annotations.ZenClass; -//import stanhebben.zenscript.annotations.ZenMethod; -//import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe; -//import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; -// -///** -// * MineTweaker3 Binding Recipe Handler by joshie * -// */ -//@ZenClass("mods.bloodmagic.Binding") -//public class Binding -//{ -// @ZenMethod -// public static void addRecipe(IItemStack input, IItemStack output) { -// MineTweakerAPI.apply(new Add(new BindingRecipe(toStack(output), toStack(input)))); -// } -// -// private static class Add implements IUndoableAction -// { -// private final BindingRecipe recipe; -// -// public Add(BindingRecipe recipe) -// { -// this.recipe = recipe; -// } -// -// @Override -// public void apply() -// { -// BindingRegistry.bindingRecipes.add(recipe); -// } -// -// @Override -// public boolean canUndo() -// { -// return BindingRegistry.bindingRecipes != null; -// } -// -// @Override -// public void undo() -// { -// BindingRegistry.bindingRecipes.remove(recipe); -// } -// -// @Override -// public String describe() -// { -// return "Adding Binding Recipe for " + ((BindingRecipe) recipe).getResult().getDisplayName(); -// } -// -// @Override -// public String describeUndo() -// { -// return "Removing Binding Recipe for " + ((BindingRecipe) recipe).getResult().getDisplayName(); -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -// -// @ZenMethod -// public static void removeRecipe(IItemStack output) { -// MineTweakerAPI.apply(new Remove(toStack(output))); -// } -// -// private static class Remove implements IUndoableAction -// { -// private final ItemStack output; -// private BindingRecipe recipe; -// -// public Remove(ItemStack output) -// { -// this.output = output; -// } -// -// @Override -// public void apply() -// { -// for (BindingRecipe r : BindingRegistry.bindingRecipes) -// { -// if (r.getResult() != null && r.getResult().isItemEqual(output)) -// { -// recipe = r; -// break; -// } -// } -// -// BindingRegistry.bindingRecipes.remove(recipe); -// } -// -// @Override -// public boolean canUndo() -// { -// return BindingRegistry.bindingRecipes != null && recipe != null; -// } -// -// @Override -// public void undo() -// { -// BindingRegistry.bindingRecipes.add(recipe); -// } -// -// @Override -// public String describe() -// { -// return "Removing Binding Recipe for " + output.getDisplayName(); -// } -// -// @Override -// public String describeUndo() -// { -// return "Restoring Binding Recipe for " + output.getDisplayName(); -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -//} +package WayofTime.alchemicalWizardry.common.tweaker; + +import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; +import minetweaker.IUndoableAction; +import minetweaker.MineTweakerAPI; +import minetweaker.api.item.IItemStack; +import net.minecraft.item.ItemStack; +import stanhebben.zenscript.annotations.ZenClass; +import stanhebben.zenscript.annotations.ZenMethod; +import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe; +import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; + +/** + * MineTweaker3 Binding Recipe Handler by joshie * + */ +@ZenClass("mods.bloodmagic.Binding") +public class Binding +{ + @ZenMethod + public static void addRecipe(IItemStack input, IItemStack output) { + MineTweakerAPI.apply(new Add(new BindingRecipe(toStack(output), toStack(input)))); + } + + private static class Add implements IUndoableAction + { + private final BindingRecipe recipe; + + public Add(BindingRecipe recipe) + { + this.recipe = recipe; + } + + @Override + public void apply() + { + BindingRegistry.bindingRecipes.add(recipe); + } + + @Override + public boolean canUndo() + { + return BindingRegistry.bindingRecipes != null; + } + + @Override + public void undo() + { + BindingRegistry.bindingRecipes.remove(recipe); + } + + @Override + public String describe() + { + return "Adding Binding Recipe for " + ((BindingRecipe) recipe).getResult().getDisplayName(); + } + + @Override + public String describeUndo() + { + return "Removing Binding Recipe for " + ((BindingRecipe) recipe).getResult().getDisplayName(); + } + + @Override + public Object getOverrideKey() + { + return null; + } + } + + @ZenMethod + public static void removeRecipe(IItemStack output) { + MineTweakerAPI.apply(new Remove(toStack(output))); + } + + private static class Remove implements IUndoableAction + { + private final ItemStack output; + private BindingRecipe recipe; + + public Remove(ItemStack output) + { + this.output = output; + } + + @Override + public void apply() + { + for (BindingRecipe r : BindingRegistry.bindingRecipes) + { + if (r.getResult() != null && r.getResult().isItemEqual(output)) + { + recipe = r; + break; + } + } + + BindingRegistry.bindingRecipes.remove(recipe); + } + + @Override + public boolean canUndo() + { + return BindingRegistry.bindingRecipes != null && recipe != null; + } + + @Override + public void undo() + { + BindingRegistry.bindingRecipes.add(recipe); + } + + @Override + public String describe() + { + return "Removing Binding Recipe for " + output.getDisplayName(); + } + + @Override + public String describeUndo() + { + return "Restoring Binding Recipe for " + output.getDisplayName(); + } + + @Override + public Object getOverrideKey() + { + return null; + } + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodAltar.java index 9ca40713..e1b7d3f7 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodAltar.java @@ -1,133 +1,133 @@ -//package WayofTime.alchemicalWizardry.common.tweaker; -// -//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; -//import minetweaker.IUndoableAction; -//import minetweaker.MineTweakerAPI; -//import minetweaker.api.item.IItemStack; -//import net.minecraft.item.ItemStack; -//import stanhebben.zenscript.annotations.Optional; -//import stanhebben.zenscript.annotations.ZenClass; -//import stanhebben.zenscript.annotations.ZenMethod; -//import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; -//import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; -// -///** -// * MineTweaker3 Blood Altar Recipe Handler by joshie * -// */ -//@ZenClass("mods.bloodmagic.Altar") -//public class BloodAltar -//{ -// @ZenMethod -// public static void addRecipe(IItemStack output, IItemStack input, int tier, int lp, @Optional int consume, @Optional int drain) { -// consume = consume > 0 ? consume : 20; -// drain = drain > 0 ? drain : 20; -// MineTweakerAPI.apply(new Add(new AltarRecipe(toStack(output), toStack(input), tier, lp, consume, drain, false))); -// } -// -// private static class Add implements IUndoableAction -// { -// private final AltarRecipe recipe; -// -// public Add(AltarRecipe recipe) -// { -// this.recipe = recipe; -// } -// -// @Override -// public void apply() -// { -// AltarRecipeRegistry.altarRecipes.add(recipe); -// } -// -// @Override -// public boolean canUndo() -// { -// return AltarRecipeRegistry.altarRecipes != null; -// } -// -// @Override -// public void undo() -// { -// AltarRecipeRegistry.altarRecipes.remove(recipe); -// } -// -// @Override -// public String describe() -// { -// return "Adding Blood Altar Recipe for " + ((AltarRecipe) recipe).getResult().getDisplayName(); -// } -// -// @Override -// public String describeUndo() -// { -// return "Removing Blood Altar Recipe for " + ((AltarRecipe) recipe).getResult().getDisplayName(); -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -// -// @ZenMethod -// public static void removeRecipe(IItemStack output) { -// MineTweakerAPI.apply(new Remove(toStack(output))); -// } -// -// private static class Remove implements IUndoableAction -// { -// private final ItemStack output; -// private AltarRecipe recipe; -// -// public Remove(ItemStack output) -// { -// this.output = output; -// } -// -// @Override -// public void apply() -// { -// for (AltarRecipe r : AltarRecipeRegistry.altarRecipes) -// { -// if (r.getResult() != null && r.getResult().isItemEqual(output)) -// { -// recipe = r; -// break; -// } -// } -// -// AltarRecipeRegistry.altarRecipes.remove(recipe); -// } -// -// @Override -// public boolean canUndo() -// { -// return AltarRecipeRegistry.altarRecipes != null && recipe != null; -// } -// -// @Override -// public void undo() -// { -// AltarRecipeRegistry.altarRecipes.add(recipe); -// } -// -// @Override -// public String describe() -// { -// return "Removing Blood Altar Recipe for " + output.getDisplayName(); -// } -// -// @Override -// public String describeUndo() -// { -// return "Restoring Blood Altar Recipe for " + output.getDisplayName(); -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -//} +package WayofTime.alchemicalWizardry.common.tweaker; + +import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; +import minetweaker.IUndoableAction; +import minetweaker.MineTweakerAPI; +import minetweaker.api.item.IItemStack; +import net.minecraft.item.ItemStack; +import stanhebben.zenscript.annotations.Optional; +import stanhebben.zenscript.annotations.ZenClass; +import stanhebben.zenscript.annotations.ZenMethod; +import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; +import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; + +/** + * MineTweaker3 Blood Altar Recipe Handler by joshie * + */ +@ZenClass("mods.bloodmagic.Altar") +public class BloodAltar +{ + @ZenMethod + public static void addRecipe(IItemStack output, IItemStack input, int tier, int lp, @Optional int consume, @Optional int drain) { + consume = consume > 0 ? consume : 20; + drain = drain > 0 ? drain : 20; + MineTweakerAPI.apply(new Add(new AltarRecipe(toStack(output), toStack(input), tier, lp, consume, drain, false))); + } + + private static class Add implements IUndoableAction + { + private final AltarRecipe recipe; + + public Add(AltarRecipe recipe) + { + this.recipe = recipe; + } + + @Override + public void apply() + { + AltarRecipeRegistry.altarRecipes.add(recipe); + } + + @Override + public boolean canUndo() + { + return AltarRecipeRegistry.altarRecipes != null; + } + + @Override + public void undo() + { + AltarRecipeRegistry.altarRecipes.remove(recipe); + } + + @Override + public String describe() + { + return "Adding Blood Altar Recipe for " + ((AltarRecipe) recipe).getResult().getDisplayName(); + } + + @Override + public String describeUndo() + { + return "Removing Blood Altar Recipe for " + ((AltarRecipe) recipe).getResult().getDisplayName(); + } + + @Override + public Object getOverrideKey() + { + return null; + } + } + + @ZenMethod + public static void removeRecipe(IItemStack output) { + MineTweakerAPI.apply(new Remove(toStack(output))); + } + + private static class Remove implements IUndoableAction + { + private final ItemStack output; + private AltarRecipe recipe; + + public Remove(ItemStack output) + { + this.output = output; + } + + @Override + public void apply() + { + for (AltarRecipe r : AltarRecipeRegistry.altarRecipes) + { + if (r.getResult() != null && r.getResult().isItemEqual(output)) + { + recipe = r; + break; + } + } + + AltarRecipeRegistry.altarRecipes.remove(recipe); + } + + @Override + public boolean canUndo() + { + return AltarRecipeRegistry.altarRecipes != null && recipe != null; + } + + @Override + public void undo() + { + AltarRecipeRegistry.altarRecipes.add(recipe); + } + + @Override + public String describe() + { + return "Removing Blood Altar Recipe for " + output.getDisplayName(); + } + + @Override + public String describeUndo() + { + return "Restoring Blood Altar Recipe for " + output.getDisplayName(); + } + + @Override + public Object getOverrideKey() + { + return null; + } + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodOrb.java index b3af37db..3997fd74 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodOrb.java @@ -1,147 +1,147 @@ -//package WayofTime.alchemicalWizardry.common.tweaker; -// -//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toObjects; -//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toShapedObjects; -//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; -// -//import java.util.List; -// -//import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; -//import minetweaker.IUndoableAction; -//import minetweaker.MineTweakerAPI; -//import minetweaker.api.item.IIngredient; -//import minetweaker.api.item.IItemStack; -//import net.minecraft.item.ItemStack; -//import net.minecraft.item.crafting.CraftingManager; -//import net.minecraft.item.crafting.IRecipe; -//import stanhebben.zenscript.annotations.ZenClass; -//import stanhebben.zenscript.annotations.ZenMethod; -//import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; -// -///** -// * MineTweaker3 Blood Orb Recipe Handler by joshie * -// */ -//@ZenClass("mods.bloodmagic.BloodOrb") -//public class BloodOrb -//{ -// @ZenMethod -// public static void addShaped(IItemStack output, IIngredient[][] ingredients) -// { -// MineTweakerAPI.apply(new Add(false, toStack(output), toShapedObjects(ingredients))); -// } -// -// @ZenMethod -// public static void addShapeless(IItemStack output, IIngredient[] ingredients) -// { -// MineTweakerAPI.apply(new Add(true, toStack(output), toObjects(ingredients))); -// } -// -// private static class Add implements IUndoableAction { -// private IRecipe iRecipe; -// private final boolean isShapeless; -// private final ItemStack output; -// private final Object[] recipe; -// -// public Add(boolean isShapeless, ItemStack output, Object... recipe) -// { -// this.isShapeless = isShapeless; -// this.output = output; -// this.recipe = recipe; -// } -// -// @Override -// public void apply() -// { -// if (isShapeless) iRecipe = new ShapelessBloodOrbRecipe(output, recipe); -// else iRecipe = new ShapedBloodOrbRecipe(output, recipe); -// CraftingManager.getInstance().getRecipeList().add(iRecipe); -// } -// -// @Override -// public boolean canUndo() -// { -// return CraftingManager.getInstance().getRecipeList() != null; -// } -// -// @Override -// public void undo() -// { -// CraftingManager.getInstance().getRecipeList().remove(iRecipe); -// } -// -// @Override -// public String describe() { -// return "Adding Blood Orb Recipe for " + output.getDisplayName(); -// } -// -// @Override -// public String describeUndo() -// { -// return "Removing Blood Orb Recipe for " + output.getDisplayName(); -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -// -// @ZenMethod -// public static void removeRecipe(IItemStack output) { -// MineTweakerAPI.apply(new Remove(toStack(output))); -// } -// -// private static class Remove implements IUndoableAction { -// private final ItemStack output; -// private IRecipe iRecipe; -// -// public Remove(ItemStack output) -// { -// this.output = output; -// } -// -// @Override -// public void apply() -// { -// for (IRecipe r : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) -// { -// if((r instanceof ShapedBloodOrbRecipe || r instanceof ShapelessBloodOrbRecipe) && r.getRecipeOutput() != null && r.getRecipeOutput().isItemEqual(output)) { -// iRecipe = r; -// break; -// } -// } -// -// CraftingManager.getInstance().getRecipeList().remove(iRecipe); -// } -// -// @Override -// public boolean canUndo() -// { -// return CraftingManager.getInstance().getRecipeList() != null && iRecipe != null; -// } -// -// @Override -// public void undo() -// { -// CraftingManager.getInstance().getRecipeList().add(iRecipe); -// } -// -// @Override -// public String describe() { -// return "Removing Blood Orb Recipe for " + output.getDisplayName(); -// } -// -// @Override -// public String describeUndo() -// { -// return "Restoring Blood Orb Recipe for " + output.getDisplayName(); -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -//} +package WayofTime.alchemicalWizardry.common.tweaker; + +import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toObjects; +import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toShapedObjects; +import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; + +import java.util.List; + +import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; +import minetweaker.IUndoableAction; +import minetweaker.MineTweakerAPI; +import minetweaker.api.item.IIngredient; +import minetweaker.api.item.IItemStack; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.item.crafting.IRecipe; +import stanhebben.zenscript.annotations.ZenClass; +import stanhebben.zenscript.annotations.ZenMethod; +import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; + +/** + * MineTweaker3 Blood Orb Recipe Handler by joshie * + */ +@ZenClass("mods.bloodmagic.BloodOrb") +public class BloodOrb +{ + @ZenMethod + public static void addShaped(IItemStack output, IIngredient[][] ingredients) + { + MineTweakerAPI.apply(new Add(false, toStack(output), toShapedObjects(ingredients))); + } + + @ZenMethod + public static void addShapeless(IItemStack output, IIngredient[] ingredients) + { + MineTweakerAPI.apply(new Add(true, toStack(output), toObjects(ingredients))); + } + + private static class Add implements IUndoableAction { + private IRecipe iRecipe; + private final boolean isShapeless; + private final ItemStack output; + private final Object[] recipe; + + public Add(boolean isShapeless, ItemStack output, Object... recipe) + { + this.isShapeless = isShapeless; + this.output = output; + this.recipe = recipe; + } + + @Override + public void apply() + { + if (isShapeless) iRecipe = new ShapelessBloodOrbRecipe(output, recipe); + else iRecipe = new ShapedBloodOrbRecipe(output, recipe); + CraftingManager.getInstance().getRecipeList().add(iRecipe); + } + + @Override + public boolean canUndo() + { + return CraftingManager.getInstance().getRecipeList() != null; + } + + @Override + public void undo() + { + CraftingManager.getInstance().getRecipeList().remove(iRecipe); + } + + @Override + public String describe() { + return "Adding Blood Orb Recipe for " + output.getDisplayName(); + } + + @Override + public String describeUndo() + { + return "Removing Blood Orb Recipe for " + output.getDisplayName(); + } + + @Override + public Object getOverrideKey() + { + return null; + } + } + + @ZenMethod + public static void removeRecipe(IItemStack output) { + MineTweakerAPI.apply(new Remove(toStack(output))); + } + + private static class Remove implements IUndoableAction { + private final ItemStack output; + private IRecipe iRecipe; + + public Remove(ItemStack output) + { + this.output = output; + } + + @Override + public void apply() + { + for (IRecipe r : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) + { + if((r instanceof ShapedBloodOrbRecipe || r instanceof ShapelessBloodOrbRecipe) && r.getRecipeOutput() != null && r.getRecipeOutput().isItemEqual(output)) { + iRecipe = r; + break; + } + } + + CraftingManager.getInstance().getRecipeList().remove(iRecipe); + } + + @Override + public boolean canUndo() + { + return CraftingManager.getInstance().getRecipeList() != null && iRecipe != null; + } + + @Override + public void undo() + { + CraftingManager.getInstance().getRecipeList().add(iRecipe); + } + + @Override + public String describe() { + return "Removing Blood Orb Recipe for " + output.getDisplayName(); + } + + @Override + public String describeUndo() + { + return "Restoring Blood Orb Recipe for " + output.getDisplayName(); + } + + @Override + public Object getOverrideKey() + { + return null; + } + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java index 68a52b6a..84263c3e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java @@ -1,139 +1,139 @@ -//package WayofTime.alchemicalWizardry.common.tweaker; -// -//import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm; -//import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; -//import minetweaker.IUndoableAction; -//import minetweaker.MineTweakerAPI; -//import minetweaker.api.item.IItemStack; -//import net.minecraft.item.ItemStack; -//import net.minecraftforge.oredict.OreDictionary; -//import stanhebben.zenscript.annotations.ZenClass; -//import stanhebben.zenscript.annotations.ZenMethod; -// -//import java.util.Iterator; -// -//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; -// -///** -// * MineTweaker3 Falling Tower Paradigm Handler by hilburn * -// */ -//@ZenClass("mods.bloodmagic.FallingTower") -//public class FallingTower -//{ -// @ZenMethod -// public static void addFocus(IItemStack stack, int radius, String[] components) -// { -// MineTweakerAPI.apply(new Add(toStack(stack),radius, components)); -// } -// -// @ZenMethod -// public static void addFocus(IItemStack stack, int radius, String components) -// { -// MineTweakerAPI.apply(new Add(toStack(stack),radius, components.split("\\s*,\\s*"))); -// } -// -// @ZenMethod -// public static void removeFocus(IItemStack output) { -// MineTweakerAPI.apply(new Remove(toStack(output))); -// } -// -// private static class Add implements IUndoableAction -// { -// private MeteorParadigm paradigm; -// -// public Add(ItemStack stack, int radius, String[] components) -// { -// paradigm = new MeteorParadigm(stack,radius); -// paradigm.parseStringArray(components); -// } -// -// @Override -// public void apply() -// { -// MeteorRegistry.registerMeteorParadigm(paradigm); -// } -// -// @Override -// public boolean canUndo() -// { -// return MeteorRegistry.paradigmList!= null; -// } -// -// @Override -// public void undo() -// { -// MeteorRegistry.paradigmList.remove(paradigm); -// } -// -// @Override -// public String describe() { -// return "Adding Falling Tower Focus for " + paradigm.focusStack.getDisplayName(); -// } -// -// @Override -// public String describeUndo() -// { -// return "Removing Falling Tower Focus for " + paradigm.focusStack.getDisplayName(); -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -// -// private static class Remove implements IUndoableAction { -// private final ItemStack focus; -// private MeteorParadigm paradigm; -// -// public Remove(ItemStack focus) -// { -// this.focus = focus; -// } -// -// @Override -// public void apply() -// { -// for (Iterator<MeteorParadigm> itr = MeteorRegistry.paradigmList.iterator(); itr.hasNext();) -// { -// MeteorParadigm paradigm = itr.next(); -// if (OreDictionary.itemMatches(paradigm.focusStack,focus,false)) -// { -// this.paradigm = paradigm; -// itr.remove(); -// break; -// } -// } -// } -// -// @Override -// public boolean canUndo() -// { -// return MeteorRegistry.paradigmList!= null && paradigm != null; -// } -// -// @Override -// public void undo() -// { -// MeteorRegistry.paradigmList.add(paradigm); -// } -// -// @Override -// public String describe() { -// return "Removing Falling Tower Focus for " + focus.getDisplayName(); -// } -// -// @Override -// public String describeUndo() -// { -// return "Restoring Falling Tower Focus for " + focus.getDisplayName(); -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -//} +package WayofTime.alchemicalWizardry.common.tweaker; + +import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm; +import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; +import minetweaker.IUndoableAction; +import minetweaker.MineTweakerAPI; +import minetweaker.api.item.IItemStack; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; +import stanhebben.zenscript.annotations.ZenClass; +import stanhebben.zenscript.annotations.ZenMethod; + +import java.util.Iterator; + +import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; + +/** + * MineTweaker3 Falling Tower Paradigm Handler by hilburn * + */ +@ZenClass("mods.bloodmagic.FallingTower") +public class FallingTower +{ + @ZenMethod + public static void addFocus(IItemStack stack, int radius, String[] components) + { + MineTweakerAPI.apply(new Add(toStack(stack),radius, components)); + } + + @ZenMethod + public static void addFocus(IItemStack stack, int radius, String components) + { + MineTweakerAPI.apply(new Add(toStack(stack),radius, components.split("\\s*,\\s*"))); + } + + @ZenMethod + public static void removeFocus(IItemStack output) { + MineTweakerAPI.apply(new Remove(toStack(output))); + } + + private static class Add implements IUndoableAction + { + private MeteorParadigm paradigm; + + public Add(ItemStack stack, int radius, String[] components) + { + paradigm = new MeteorParadigm(stack,radius); + paradigm.parseStringArray(components); + } + + @Override + public void apply() + { + MeteorRegistry.registerMeteorParadigm(paradigm); + } + + @Override + public boolean canUndo() + { + return MeteorRegistry.paradigmList!= null; + } + + @Override + public void undo() + { + MeteorRegistry.paradigmList.remove(paradigm); + } + + @Override + public String describe() { + return "Adding Falling Tower Focus for " + paradigm.focusStack.getDisplayName(); + } + + @Override + public String describeUndo() + { + return "Removing Falling Tower Focus for " + paradigm.focusStack.getDisplayName(); + } + + @Override + public Object getOverrideKey() + { + return null; + } + } + + private static class Remove implements IUndoableAction { + private final ItemStack focus; + private MeteorParadigm paradigm; + + public Remove(ItemStack focus) + { + this.focus = focus; + } + + @Override + public void apply() + { + for (Iterator<MeteorParadigm> itr = MeteorRegistry.paradigmList.iterator(); itr.hasNext();) + { + MeteorParadigm paradigm = itr.next(); + if (OreDictionary.itemMatches(paradigm.focusStack,focus,false)) + { + this.paradigm = paradigm; + itr.remove(); + break; + } + } + } + + @Override + public boolean canUndo() + { + return MeteorRegistry.paradigmList!= null && paradigm != null; + } + + @Override + public void undo() + { + MeteorRegistry.paradigmList.add(paradigm); + } + + @Override + public String describe() { + return "Removing Falling Tower Focus for " + focus.getDisplayName(); + } + + @Override + public String describeUndo() + { + return "Restoring Falling Tower Focus for " + focus.getDisplayName(); + } + + @Override + public Object getOverrideKey() + { + return null; + } + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/HarvestMoon.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/HarvestMoon.java index 222f8acf..7dc4d07b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/HarvestMoon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/HarvestMoon.java @@ -1,90 +1,90 @@ -//package WayofTime.alchemicalWizardry.common.tweaker; -// -//import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; -//import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; -//import WayofTime.alchemicalWizardry.common.harvest.GenericItemStackHarvestHandler; -//import minetweaker.IUndoableAction; -//import minetweaker.MineTweakerAPI; -//import minetweaker.api.item.IItemStack; -//import net.minecraft.block.Block; -//import net.minecraft.init.Blocks; -//import net.minecraft.item.ItemStack; -//import net.minecraftforge.common.IPlantable; -//import stanhebben.zenscript.annotations.ZenClass; -//import stanhebben.zenscript.annotations.ZenMethod; -// -///** -// * MineTweaker3 Harvest Moon Handler by hilburn * -// */ -//@ZenClass("mods.bloodmagic.HarvestMoon") -//public class HarvestMoon -//{ -// -// @ZenMethod -// public static void addHarvestable(IItemStack block, IItemStack seed) -// { -// addHarvestable(block,block.getDamage(),seed); -// } -// -// @ZenMethod -// public static void addHarvestable(IItemStack block, int meta, IItemStack seed) -// { -// ItemStack seedStack = MTHelper.toStack(seed); -// Block plantBlock = Block.getBlockFromItem(MTHelper.toStack(block).getItem()); -// if (!(plantBlock==null || plantBlock== Blocks.air || seedStack==null || !(seedStack.getItem() instanceof IPlantable))) -// { -// MineTweakerAPI.apply(new Add(plantBlock, meta, seedStack)); -// } -// else -// { -// throw new IllegalArgumentException("Invalid Harvest Block or Seed"); -// } -// } -// -// private static class Add implements IUndoableAction -// { -// private IHarvestHandler handler; -// private String name; -// -// public Add(Block block, int meta, ItemStack seed) -// { -// handler = new GenericItemStackHarvestHandler(block,meta,seed); -// name = seed.getDisplayName(); -// } -// -// @Override -// public void apply() -// { -// HarvestRegistry.registerHarvestHandler(handler); -// } -// -// @Override -// public boolean canUndo() -// { -// return HarvestRegistry.handlerList!=null; -// } -// -// @Override -// public void undo() -// { -// HarvestRegistry.handlerList.remove(handler); -// } -// -// @Override -// public String describe() { -// return "Adding Harvest Moon Support for " + name; -// } -// -// @Override -// public String describeUndo() -// { -// return "Removing Harvest Moon Support for " + name; -// } -// -// @Override -// public Object getOverrideKey() -// { -// return null; -// } -// } -//} +package WayofTime.alchemicalWizardry.common.tweaker; + +import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; +import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; +import WayofTime.alchemicalWizardry.common.harvest.GenericItemStackHarvestHandler; +import minetweaker.IUndoableAction; +import minetweaker.MineTweakerAPI; +import minetweaker.api.item.IItemStack; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.IPlantable; +import stanhebben.zenscript.annotations.ZenClass; +import stanhebben.zenscript.annotations.ZenMethod; + +/** + * MineTweaker3 Harvest Moon Handler by hilburn * + */ +@ZenClass("mods.bloodmagic.HarvestMoon") +public class HarvestMoon +{ + + @ZenMethod + public static void addHarvestable(IItemStack block, IItemStack seed) + { + addHarvestable(block,block.getDamage(),seed); + } + + @ZenMethod + public static void addHarvestable(IItemStack block, int meta, IItemStack seed) + { + ItemStack seedStack = MTHelper.toStack(seed); + Block plantBlock = Block.getBlockFromItem(MTHelper.toStack(block).getItem()); + if (!(plantBlock==null || plantBlock== Blocks.air || seedStack==null || !(seedStack.getItem() instanceof IPlantable))) + { + MineTweakerAPI.apply(new Add(plantBlock, meta, seedStack)); + } + else + { + throw new IllegalArgumentException("Invalid Harvest Block or Seed"); + } + } + + private static class Add implements IUndoableAction + { + private IHarvestHandler handler; + private String name; + + public Add(Block block, int meta, ItemStack seed) + { + handler = new GenericItemStackHarvestHandler(block,meta,seed); + name = seed.getDisplayName(); + } + + @Override + public void apply() + { + HarvestRegistry.registerHarvestHandler(handler); + } + + @Override + public boolean canUndo() + { + return HarvestRegistry.handlerList!=null; + } + + @Override + public void undo() + { + HarvestRegistry.handlerList.remove(handler); + } + + @Override + public String describe() { + return "Adding Harvest Moon Support for " + name; + } + + @Override + public String describeUndo() + { + return "Removing Harvest Moon Support for " + name; + } + + @Override + public Object getOverrideKey() + { + return null; + } + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MTHelper.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MTHelper.java index d16df05e..019bc5f3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MTHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MTHelper.java @@ -1,82 +1,82 @@ -//package WayofTime.alchemicalWizardry.common.tweaker; -// -//import static minetweaker.api.minecraft.MineTweakerMC.getItemStack; -// -//import java.util.ArrayList; -// -//import minetweaker.api.item.IIngredient; -//import minetweaker.api.item.IItemStack; -//import minetweaker.api.oredict.IOreDictEntry; -//import net.minecraft.item.ItemStack; -// -///** -// * MineTweaker3 Helper by joshie * -// */ -//public class MTHelper { -// public static ItemStack toStack(IItemStack iStack) { -// return getItemStack(iStack); -// } -// -// public static ItemStack[] toStacks(IItemStack[] iStack) { -// if (iStack == null) return null; -// else { -// ItemStack[] output = new ItemStack[iStack.length]; -// for (int i = 0; i < iStack.length; i++) { -// output[i] = toStack(iStack[i]); -// } -// -// return output; -// } -// } -// -// public static Object toObject(IIngredient iStack) { -// if (iStack == null) return null; -// else { -// if (iStack instanceof IOreDictEntry) { -// return toString((IOreDictEntry) iStack); -// } else if (iStack instanceof IItemStack) { -// return getItemStack((IItemStack) iStack); -// } else return null; -// } -// } -// -// public static Object[] toObjects(IIngredient[] ingredient) { -// if (ingredient == null) return null; -// else { -// Object[] output = new Object[ingredient.length]; -// for (int i = 0; i < ingredient.length; i++) { -// if (ingredient[i] != null) { -// output[i] = toObject(ingredient[i]); -// } else output[i] = ""; -// } -// -// return output; -// } -// } -// -// public static Object[] toShapedObjects(IIngredient[][] ingredients) { -// if (ingredients == null) return null; -// else { -// ArrayList prep = new ArrayList(); -// prep.add("abc"); -// prep.add("def"); -// prep.add("ghi"); -// char[][] map = new char[][] { { 'a', 'b', 'c' }, { 'd', 'e', 'f' }, { 'g', 'h', 'i' } }; -// for (int x = 0; x < ingredients.length; x++) { -// if (ingredients[x] != null) { -// for (int y = 0; y < ingredients[x].length; y++) { -// if (ingredients[x][y] != null && x < map.length && y < map[x].length) { -// prep.add(map[x][y]); -// prep.add(toObject(ingredients[x][y])); -// } -// } -// } -// } -// return prep.toArray(); -// } -// } -// -// public static String toString(IOreDictEntry entry) { -// return ((IOreDictEntry) entry).getName(); -// } -//} +package WayofTime.alchemicalWizardry.common.tweaker; + +import static minetweaker.api.minecraft.MineTweakerMC.getItemStack; + +import java.util.ArrayList; + +import minetweaker.api.item.IIngredient; +import minetweaker.api.item.IItemStack; +import minetweaker.api.oredict.IOreDictEntry; +import net.minecraft.item.ItemStack; + +/** + * MineTweaker3 Helper by joshie * + */ +public class MTHelper { + public static ItemStack toStack(IItemStack iStack) { + return getItemStack(iStack); + } + + public static ItemStack[] toStacks(IItemStack[] iStack) { + if (iStack == null) return null; + else { + ItemStack[] output = new ItemStack[iStack.length]; + for (int i = 0; i < iStack.length; i++) { + output[i] = toStack(iStack[i]); + } + + return output; + } + } + + public static Object toObject(IIngredient iStack) { + if (iStack == null) return null; + else { + if (iStack instanceof IOreDictEntry) { + return toString((IOreDictEntry) iStack); + } else if (iStack instanceof IItemStack) { + return getItemStack((IItemStack) iStack); + } else return null; + } + } + + public static Object[] toObjects(IIngredient[] ingredient) { + if (ingredient == null) return null; + else { + Object[] output = new Object[ingredient.length]; + for (int i = 0; i < ingredient.length; i++) { + if (ingredient[i] != null) { + output[i] = toObject(ingredient[i]); + } else output[i] = ""; + } + + return output; + } + } + + public static Object[] toShapedObjects(IIngredient[][] ingredients) { + if (ingredients == null) return null; + else { + ArrayList prep = new ArrayList(); + prep.add("abc"); + prep.add("def"); + prep.add("ghi"); + char[][] map = new char[][] { { 'a', 'b', 'c' }, { 'd', 'e', 'f' }, { 'g', 'h', 'i' } }; + for (int x = 0; x < ingredients.length; x++) { + if (ingredients[x] != null) { + for (int y = 0; y < ingredients[x].length; y++) { + if (ingredients[x][y] != null && x < map.length && y < map[x].length) { + prep.add(map[x][y]); + prep.add(toObject(ingredients[x][y])); + } + } + } + } + return prep.toArray(); + } + } + + public static String toString(IOreDictEntry entry) { + return ((IOreDictEntry) entry).getName(); + } +} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MineTweakerIntegration.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MineTweakerIntegration.java index ae6d45ab..e95af3f9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MineTweakerIntegration.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MineTweakerIntegration.java @@ -1,19 +1,19 @@ -//package WayofTime.alchemicalWizardry.common.tweaker; -// -//import minetweaker.MineTweakerAPI; -// -///** -// * MineTweaker3 Integration by joshie * -// */ -//public class MineTweakerIntegration -//{ -// public static void register() -// { -// MineTweakerAPI.registerClass(Alchemy.class); -// MineTweakerAPI.registerClass(Binding.class); -// MineTweakerAPI.registerClass(BloodAltar.class); -// MineTweakerAPI.registerClass(BloodOrb.class); -// MineTweakerAPI.registerClass(FallingTower.class); -// MineTweakerAPI.registerClass(HarvestMoon.class); -// } -//} +package WayofTime.alchemicalWizardry.common.tweaker; + +import minetweaker.MineTweakerAPI; + +/** + * MineTweaker3 Integration by joshie * + */ +public class MineTweakerIntegration +{ + public static void register() + { + MineTweakerAPI.registerClass(Alchemy.class); + MineTweakerAPI.registerClass(Binding.class); + MineTweakerAPI.registerClass(BloodAltar.class); + MineTweakerAPI.registerClass(BloodOrb.class); + MineTweakerAPI.registerClass(FallingTower.class); + MineTweakerAPI.registerClass(HarvestMoon.class); + } +} diff --git a/src/main/resources/assets/alchemicalwizardry/blockstates/base_rune.json b/src/main/resources/assets/alchemicalwizardry/blockstates/base_rune.json deleted file mode 100644 index 75063334..00000000 --- a/src/main/resources/assets/alchemicalwizardry/blockstates/base_rune.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "textures": { - "all": "alchemicalwizardry:blocks/BlankRune" - }, - "model": "cube_all", - "uvlock": true - }, - "variants": { - "rune": { - 0: { - "textures": { - "all": "alchemicalwizardry:blocks/AltarCapacityRune" - } - }, - 1: { - "textures": { - "all": "alchemicalwizardry:blocks/AltarCapacityRune" - } - }, - 2: { - "textures": { - "all": "alchemicalwizardry:blocks/DislocationRune" - } - }, - 3: { - "textures": { - "all": "alchemicalwizardry:blocks/OrbCapacityRune" - } - }, - 4: { - "textures": { - "all": "alchemicalwizardry:blocks/BetterCapacityRune" - } - }, - 5: { - "textures": { - "all": "alchemicalwizardry:blocks/AccelerationRune" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/alchemicalwizardry/blockstates/soul_armour_forge.json b/src/main/resources/assets/alchemicalwizardry/blockstates/soul_armour_forge.json deleted file mode 100644 index e2dcb2d7..00000000 --- a/src/main/resources/assets/alchemicalwizardry/blockstates/soul_armour_forge.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variants": { - "normal": { "model": "alchemicalwizardry:soul_armour_forge" } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang b/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang index d8485d0e..47e8fca7 100644 --- a/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang +++ b/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang @@ -1,247 +1,247 @@ #Block Localization -tile.altar.name=Blood Altar -tile.blood_rune.blank.name=Blood Rune -tile.blood_rune.fill.name=Rune of Augmented Capacity -tile.blood_rune.empty.name=Rune of Dislocation -tile.blood_rune.orb.name=Rune of the Orb -tile.blood_rune.betterCapacity.name=Rune of Superior Capacity -tile.blood_rune.acceleration.name=Rune of Acceleration -tile.speed_rune.name=Speed Rune -tile.efficiency_rune.name=Efficiency Rune -tile.sacrifice_rune.name=Rune of Sacrifice -tile.self_sacrifice_rune.name=Rune of Self-Sacrifice -tile.ritual_stone.name=Ritual Stone -tile.master_ritual_stone.name=Master Ritual Stone -tile.filled_socket.name=Filled Socket -tile.imperfect_ritual_stone.name=Imperfect Ritual Stone -tile.soul_armour_forge.name=Soul Armour Forge -tile.empty_socket.name=Empty Socket -tile.bloodstone_brick.name=Bloodstone Brick -tile.large_bloodstone_brick.name=Large Bloodstone Brick -tile.chemistry_set.name=Alchemical Chemistry Set -tile.spell_table.name=Spell Table -tile.pedestal.name=Arcane Pedestal -tile.plinth.name=Arcane Plinth -tile.teleposer.name=Teleposer -tile.spell_conduit.name=Spell Conduit -tile.spell_paradigm.projectile.name=Particle Generator -tile.spell_paradigm.self.name=Self Augmentator -tile.spell_paradigm.melee.name=Melee Aggregator -tile.spell_paradigm.tool.name=Tool Forger -tile.spell_enhancement.power1.name=Unstable Spell Empowerer -tile.spell_enhancement.power2.name=Standard Spell Empowerer -tile.spell_enhancement.power3.name=Reinforced Spell Empowerer -tile.spell_enhancement.power4.name=Imbued Spell Empowerer -tile.spell_enhancement.power5.name=Demonic Spell Empowerer -tile.spell_enhancement.cost1.name=Unstable Spell Dampener -tile.spell_enhancement.cost2.name=Standard Spell Dampener -tile.spell_enhancement.cost3.name=Reinforced Spell Dampener -tile.spell_enhancement.cost4.name=Imbued Spell Dampener -tile.spell_enhancement.cost5.name=Demonic Spell Dampener -tile.spell_enhancement.potency1.name=Unstable Spell Augmentor -tile.spell_enhancement.potency2.name=Standard Spell Augmentor -tile.spell_enhancement.potency3.name=Reinforced Spell Augmentor -tile.spell_enhancement.potency4.name=Imbued Spell Augmentor -tile.spell_enhancement.potency5.name=Demonic Spell Augmentor -tile.spell_modifier.default.name=Default Spell Modifier -tile.spell_modifier.offensive.name=Offensive Spell Modifier -tile.spell_modifier.defensive.name=Defensive Spell Modifier -tile.spell_modifier.environmental.name=Environmental Spell Modifier -tile.spell_effect.fire.name=Crucible of Fire -tile.spell_effect.ice.name=Ice Maker -tile.spell_effect.wind.name=Wind Generator -tile.spell_effect.earth.name=Earth Former -tile.alchemical_calcinator.name=Alchemical Calcinator -tile.crystal_belljar.name=Crystal Belljar -tile.reagent_conduit.name=Alchemy Relay -tile.life_essence.name=Life Essence -tile.crystal_block.fullCrystal.name=Crystal Cluster -tile.crystal_block.crystalBrick.name=Crystal Cluster Brick -tile.demon_portal.name=Demon Portal -tile.demon_chest.name=Demon's Chest -tile.enchantment_glyph.enchantability.name=Glyph of the Adept Enchanter -tile.enchantment_glyph.enchantmentLevel.name=Glyph of Arcane Potential -tile.stability_glyph.stability1.name=Glyph of Rigid Stability -tile.schematic_saver.name=Schematic Saver -tile.mimic_block.name=Mimic Block -tile.spectral_container.name=Spectral Container -tile.blood_light.name=Blood Light -tile.spectral_block.name=Spectral Block -tile.incense_crucible.name=Incense Crucible +tile.bloodAltar.name=Blood Altar +tile.bloodRune.blank.name=Blood Rune +tile.bloodRune.fill.name=Rune of Augmented Capacity +tile.bloodRune.empty.name=Rune of Dislocation +tile.bloodRune.orb.name=Rune of the Orb +tile.bloodRune.betterCapacity.name=Rune of Superior Capacity +tile.bloodRune.acceleration.name=Rune of Acceleration +tile.speedRune.name=Speed Rune +tile.efficiencyRune.name=Efficiency Rune +tile.runeOfSacrifice.name=Rune of Sacrifice +tile.runeOfSelfSacrifice.name=Rune of Self-Sacrifice +tile.ritualStone.name=Ritual Stone +tile.blockMasterStone.name=Master Ritual Stone +tile.bloodSocket.name=Filled Socket +tile.imperfectRitualStone.name=Imperfect Ritual Stone +tile.armourForge.name=Soul Armour Forge +tile.emptySocket.name=Empty Socket +tile.bloodStoneBrick.name=Bloodstone Brick +tile.largeBloodStoneBrick.name=Large Bloodstone Brick +tile.blockWritingTable.name=Alchemic Chemistry Set +tile.blockHomHeart.name=Spell Table +tile.bloodPedestal.name=Arcane Pedestal +tile.bloodPlinth.name=Arcane Plinth +tile.bloodTeleposer.name=Teleposer +tile.blockConduit.name=Spell Conduit +tile.blockSpellParadigm.projectile.name=Particle Generator +tile.blockSpellParadigm.self.name=Self Augmentator +tile.blockSpellParadigm.melee.name=Melee Aggregator +tile.blockSpellParadigm.tool.name=Tool Forger +tile.blockSpellEnhancement.power1.name=Unstable Spell Empowerer +tile.blockSpellEnhancement.power2.name=Standard Spell Empowerer +tile.blockSpellEnhancement.power3.name=Reinforced Spell Empowerer +tile.blockSpellEnhancement.power4.name=Imbued Spell Empowerer +tile.blockSpellEnhancement.power5.name=Demonic Spell Empowerer +tile.blockSpellEnhancement.cost1.name=Unstable Spell Dampener +tile.blockSpellEnhancement.cost2.name=Standard Spell Dampener +tile.blockSpellEnhancement.cost3.name=Reinforced Spell Dampener +tile.blockSpellEnhancement.cost4.name=Imbued Spell Dampener +tile.blockSpellEnhancement.cost5.name=Demonic Spell Dampener +tile.blockSpellEnhancement.potency1.name=Unstable Spell Augmentor +tile.blockSpellEnhancement.potency2.name=Standard Spell Augmentor +tile.blockSpellEnhancement.potency3.name=Reinforced Spell Augmentor +tile.blockSpellEnhancement.potency4.name=Imbued Spell Augmentor +tile.blockSpellEnhancement.potency5.name=Demonic Spell Augmentor +tile.blockSpellModifier.default.name=Default Spell Modifier +tile.blockSpellModifier.offensive.name=Offensive Spell Modifier +tile.blockSpellModifier.defensive.name=Defensive Spell Modifier +tile.blockSpellModifier.environmental.name=Environmental Spell Modifier +tile.blockSpellEffect.fire.name=Crucible of Fire +tile.blockSpellEffect.ice.name=Ice Maker +tile.blockSpellEffect.wind.name=Wind Generator +tile.blockSpellEffect.earth.name=Earth Former +tile.alchemicCalcinator.name=Alchemic Calcinator +tile.crystalBelljar.name=Crystal Belljar +tile.blockReagentConduit.name=Alchemy Relay +tile.lifeEssenceFluidBlock.name=Life Essence +tile.crystalBlock.fullCrystal.name=Crystal Cluster +tile.crystalBlock.crystalBrick.name=Crystal Cluster Brick +tile.demonPortal.name=Demon Portal +tile.demonChest.name=Demon's Chest +tile.enchantmentGlyph.enchantability.name=Glyph of the Adept Enchanter +tile.enchantmentGlyph.enchantmentLevel.name=Glyph of Arcane Potential +tile.stabilityGlyph.stability1.name=Glyph of Rigid Stability +tile.schematicSaver.name=Schematic Saver +tile.blockMimic.name=Mimic Block +tile.blockSpectralContainer.name=Spectral Container +tile.blockBloodLightSource.name=Blood Light +tile.spectralBlock.name=Spectral Block +tile.blockCrucible.name=Incense Crucible #Item Localization -item.weak_blood_orb.name=Weak Blood Orb -item.apprentice_blood_orb.name=Apprentice Blood Orb -item.magician_blood_orb.name=Magician's Blood Orb -item.master_blood_orb.name=Master Blood Orb -item.archmage_blood_orb.name=Archmage's Blood Orb -item.energy_blast.name=Energy Blaster -item.energy_sword.name=Bound Blade -item.lava_crystal.name=Lava Crystal -item.water_sigil.name=Water Sigil -item.lava_sigil.name=Lava Sigil -item.void_sigil.name=Void Sigil -item.blank_slate.name=Blank Slate -item.reinforced_slate.name=Reinforced Slate -item.sacrificial_dagger.name=Sacrificial Knife -item.dagger_of_sacrifice.name=Dagger of Sacrifice -item.air_sigil.name=Air Sigil -item.sigil_of_the_fast_miner.name=Sigil of the Fast Miner -item.sigil_of_elemental_affinity.name=Sigil of Elemental Affinity -item.sigil_of_haste.name=Sigil of Haste -item.sigil_of_holding.name=Sigil of Holding -item.divination_sigil.name=Divination Sigil -item.water_scribe_tool.name=Elemental Inscription Tool: Water -item.fire_scribe_tool.name=Elemental Inscription Tool: Fire -item.earth_scribe_tool.name=Elemental Inscription Tool: Earth -item.air_scribe_tool.name=Elemental Inscription Tool: Air -item.dusk_scribe_tool.name=Elemental Inscription Tool: Dusk -item.activation_crystal_weak.name=Weak Activation Crystal -item.activation_crystal_awakened.name=Awakened Activation Crystal -item.activation_crystal_creative.name=Creative Activation Crystal -item.bound_pickaxe.name=Bound Pickaxe -item.bound_axe.name=Bound Axe -item.bound_shovel.name=Bound Shovel -item.bound_helmet.name=Bound Helmet -item.bound_chestplate.name=Bound Chestplate -item.bound_leggings.name=Bound Leggings -item.bound_boots.name=Bound Boots -item.weak_blood_shard.name=Weak Blood Shard -item.growth_sigil.name=Sigil of the Green Grove -item.blank_spell.name=Unbound Crystal -item.alchemy_flask.name=Potion Flask -item.standard_binding_agent.name=Standard Binding Agent -item.mundane_power_catalyst.name=Mundane Power Catalyst -item.average_power_catalyst.name=Average Power Catalyst -item.greater_power_catalyst.name=Greater Power Catalyst -item.mundane_lengthening_catalyst.name=Mundane Lengthening Catalyst -item.average_lengthening_catalyst.name=Average Lengthening Catalyst -item.greater_lengthening_catalyst.name=Greater Lengthening Catalyst +item.weakBloodOrb.name=Weak Blood Orb +item.apprenticeBloodOrb.name=Apprentice Blood Orb +item.magicianBloodOrb.name=Magician's Blood Orb +item.masterBloodOrb.name=Master Blood Orb +item.archmageBloodOrb.name=Archmage's Blood Orb +item.energyBlast.name=Energy Blaster +item.energySword.name=Bound Blade +item.lavaCrystal.name=Lava Crystal +item.waterSigil.name=Water Sigil +item.lavaSigil.name=Lava Sigil +item.voidSigil.name=Void Sigil +item.blankSlate.name=Blank Slate +item.reinforcedSlate.name=Reinforced Slate +item.sacrificialDagger.name=Sacrificial Knife +item.daggerOfSacrifice.name=Dagger of Sacrifice +item.airSigil.name=Air Sigil +item.sigilOfTheFastMiner.name=Sigil of the Fast Miner +item.sigilOfElementalAffinity.name=Sigil of Elemental Affinity +item.sigilOfHaste.name=Sigil of Haste +item.sigilOfHolding.name=Sigil of Holding +item.divinationSigil.name=Divination Sigil +item.waterScribeTool.name=Elemental Inscription Tool: Water +item.fireScribeTool.name=Elemental Inscription Tool: Fire +item.earthScribeTool.name=Elemental Inscription Tool: Earth +item.airScribeTool.name=Elemental Inscription Tool: Air +item.duskScribeTool.name=Elemental Inscription Tool: Dusk +item.activationCrystalWeak.name=Weak Activation Crystal +item.activationCrystalAwakened.name=Awakened Activation Crystal +item.activationCrystalCreative.name=Creative Activation Crystal +item.boundPickaxe.name=Bound Pickaxe +item.boundAxe.name=Bound Axe +item.boundShovel.name=Bound Shovel +item.boundHelmet.name=Bound Helmet +item.boundPlate.name=Bound Plate +item.boundLeggings.name=Bound Leggings +item.boundBoots.name=Bound Boots +item.weakBloodShard.name=Weak Blood Shard +item.growthSigil.name=Sigil of the Green Grove +item.blankSpell.name=Unbound Crystal +item.alchemyFlask.name=Potion Flask +item.standardBindingAgent.name=Standard Binding Agent +item.mundanePowerCatalyst.name=Mundane Power Catalyst +item.averagePowerCatalyst.name=Average Power Catalyst +item.greaterPowerCatalyst.name=Greater Power Catalyst +item.mundaneLengtheningCatalyst.name=Mundane Lengthening Catalyst +item.averageLengtheningCatalyst.name=Average Lengthening Catalyst +item.greaterLengtheningCatalyst.name=Greater Lengthening Catalyst item.incendium.name=Incendium item.magicales.name=Magicales item.sanctus.name=Sanctus item.aether.name=Aether -item.simple_catalyst.name=Simple Catalyst +item.simpleCatalyst.name=Simple Catalyst item.crepitous.name=Crepitous item.crystallos.name=Crystallos item.terrae.name=Terrae item.aquasalus.name=Aquasalus item.tennebrae.name=Tenebrae -item.demon_blood_shard.name=Demon Blood Shard -item.sigil_of_wind.name=Sigil of the Whirlwind -item.teleposition_focus.name=Teleposition Focus -item.enhanced_teleposition_focus.name=Enhanced Teleposition Focus -item.reinforced_teleposition_focus.name=Reinforced Teleposition Focus -item.demonic_teleposition_focus.name=Demonic Teleposition Focus -item.imbued_slate.name=Imbued Slate -item.demonic_slate.name=Demonic Slate -item.sigil_of_the_bridge.name=Sigil of the Phantom Bridge -item.armour_inhibitor.name=Armour Inhibitor -item.creative_orb.name=Orb of Testing -item.weak_filling_agent.name=Weak Filling Agent -item.standard_filling_agent.name=Standard Filling Agent -item.enhanced_filling_agent.name=Enhanced Filling Agent -item.weak_binding_agent.name=Weak Binding Agent -item.ritual_diviner.name=Ritual Diviner -item.ritual_dismantler.name=Ritual Dismantler -item.sigil_of_magnetism.name=Sigil of Magnetism -item.key_of_binding.name=Key of Binding -item.energy_bazooka.name=Energy Bazooka -item.blood_light_sigil.name=Sigil of the Blood Lamp -item.complex_spell_crystal.name=Complex Spell Crystal -item.sigil_of_supression.name=Sigil of Supression -item.sigil_of_ender_severance.name=Sigil of Ender Severance -item.bucket_life.name=Bucket of Life -item.base_items.quartz_rod.name=Quartz Rod -item.base_items.empty_core.name=Empty Core -item.base_items.magicales_cable.name=Magicales Cable -item.base_items.wood_brace.name=Wooden Brace -item.base_items.stone_brace.name=Stone Brace -item.base_items.projectile_core.name=Projectile Core -item.base_items.self_core.name=Self Core -item.base_items.melee_core.name=Melee Core -item.base_items.tool_core.name=Tool Core -item.base_items.paradigm_back_plate.name=Paradigm Plate -item.base_items.output_cable.name=Output Spell Cable -item.base_items.input_cable.name=Input Spell Cable -item.base_items.flame_core.name=Fire Core -item.base_items.icy_core.name=Icy Core -item.base_items.gust_core.name=Gusty Core -item.base_items.earthen_core.name=Earthen Core -item.base_items.cracked_runic_plate.name=Cracked Runic Plate -item.base_items.runic_plate.name=Runic Plate -item.base_items.scribed_runic_plate.name=Imbued Runic Plate -item.base_items.default_core.name=Unattuned Core -item.base_items.offensive_core.name=Offensive Core -item.base_items.defensive_core.name=Defensive Core -item.base_items.environmental_core.name=Environmental Core -item.base_items.power_core.name=Power Core -item.base_items.cost_core.name=Reduction Core -item.base_items.potency_core.name=Potency Core -item.base_items.obsidian_brace.name=Obsidian Brace -item.base_items.ethereal_slate.name=Ethereal Slate -item.base_items.life_shard.name=Life Shard -item.base_items.soul_shard.name=Soul Shard -item.base_items.life_brace.name=Living Brace -item.base_items.soul_runic_plate.name=Soul Runic Plate -item.base_items.ender_shard.name=Ender Shard -item.base_alchemy_items.offensa.name=Offensa -item.base_alchemy_items.praesidium.name=Praesidium -item.base_alchemy_items.orbis_terrae.name=Orbis Terrae -item.base_alchemy_items.strengthened_catalyst.name=Strengthened Catalyst -item.base_alchemy_items.concentrated_catalyst.name=Concentrated Catalyst -item.base_alchemy_items.fractured_bone.name=Fractured Bone -item.base_alchemy_items.virtus.name=Virtus -item.base_alchemy_items.reductus.name=Reductus -item.base_alchemy_items.potentia.name=Potentia -item.sanguine_helmet.name=Sanguine Helmet -item.seer_sigil.name=Sigil of Sight -item.fluid_sigil.name=Sigil of Fluidity -item.multi_tool.name=Dynamic Mace -item.combinational_catalyst.name=Combinational Catalyst -item.sanguine_robe.name=Sanguine Robes -item.sanguine_pants.name=Sanguine Leggings -item.sanguine_boots.name=Sanguine Boots -item.alchemical_router.name=Alchemic Router -item.alchemical_segmenter.name=Alchemic Segmenter -item.alchemical_cleanser.name=Alchemic Cleanser -item.demon_crystal.name=Demon Crystal -item.creative_dagger.name=Creative Sacrificial Knife -item.blood_pack.name=Blood Letter's Pack -item.harvest_sigil.name=Harvest Goddess Sigil -item.compression_sigil.name=Sigil of Compression -item.assassin_sigil.name=Sigil of the Assassin -item.transcendent_blood_orb.name=Transcendent Blood Orb -item.mail_catalogue.name=Mail Order Catalogue -item.input_routing_focus.name=Input Routing Focus -item.output_routing_focus.default.name=Default Output Routing Focus -item.output_routing_focus.modItem.name=Output Routing Focus (ModItem) -item.output_routing_focus.ignMeta.name=Output Routing Focus (Ignore Meta) -item.output_routing_focus.matchNBT.name=Output Routing Focus (MatchNBT) -item.output_routing_focus.global.name=Output Routing Focus (Global) -item.dawn_scribe_tool.name=Elemental Inscription Tool: Dawn -item.bound_helmet_earth.name=Earth Omega Helmet -item.bound_chestplate_earth.name=Earth Omega Chestplate -item.bound_leggings_earth.name=Earth Omega Leggings -item.bound_boots_earth.name=Earth Omega Boots -item.bound_helmet_wind.name=Wind Omega Helmet -item.bound_chestplate_wind.name=Wind Omega Chestplate -item.bound_leggings_wind.name=Wind Omega Leggings -item.bound_boots_wind.name=Wind Omega Boots -item.bound_helmet_fire.name=Fire Omega Helmet -item.bound_chestplate_fire.name=Fire Omega Chestplate -item.bound_leggings_fire.name=Fire Omega Leggings -item.bound_boots_fire.name=Fire Omega Boots -item.bound_helmet_water.name=Water Omega Helmet -item.bound_chestplate_water.name=Water Omega Chestplate -item.bound_leggings_water.name=Water Omega Leggings -item.bound_boots_water.name=Water Omega Boots +item.demonBloodShard.name=Demon Blood Shard +item.sigilOfWind.name=Sigil of the Whirlwind +item.telepositionFocus.name=Teleposition Focus +item.enhancedTelepositionFocus.name=Enhanced Teleposition Focus +item.reinforcedTelepositionFocus.name=Reinforced Teleposition Focus +item.demonicTelepositionFocus.name=Demonic Teleposition Focus +item.imbuedSlate.name=Imbued Slate +item.demonicSlate.name=Demonic Slate +item.sigilOfTheBridge.name=Sigil of the Phantom Bridge +item.armourInhibitor.name=Armour Inhibitor +item.cheatyItem.name=Orb of Testing +item.weakFillingAgent.name=Weak Filling Agent +item.standardFillingAgent.name=Standard Filling Agent +item.enhancedFillingAgent.name=Enhanced Filling Agent +item.weakBindingAgent.name=Weak Binding Agent +item.ritualDiviner.name=Ritual Diviner +item.ritualDismantler.name=Ritual Dismantler +item.sigilOfMagnetism.name=Sigil of Magnetism +item.itemDiabloKey.name=Key of Binding +item.energyBazooka.name=Energy Bazooka +item.bloodLightSigil.name=Sigil of the Blood Lamp +item.itemComplexSpellCrystal.name=Complex Spell Crystal +item.itemSigilOfSupression.name=Sigil of Supression +item.itemSigilOfEnderSeverance.name=Sigil of Ender Severance +item.bucketLife.name=Bucket of Life +item.bloodMagicBaseItem.QuartzRod.name=Quartz Rod +item.bloodMagicBaseItem.EmptyCore.name=Empty Core +item.bloodMagicBaseItem.MagicalesCable.name=Magicales Cable +item.bloodMagicBaseItem.WoodBrace.name=Wooden Brace +item.bloodMagicBaseItem.StoneBrace.name=Stone Brace +item.bloodMagicBaseItem.ProjectileCore.name=Projectile Core +item.bloodMagicBaseItem.SelfCore.name=Self Core +item.bloodMagicBaseItem.MeleeCore.name=Melee Core +item.bloodMagicBaseItem.ToolCore.name=Tool Core +item.bloodMagicBaseItem.ParadigmBackPlate.name=Paradigm Plate +item.bloodMagicBaseItem.OutputCable.name=Output Spell Cable +item.bloodMagicBaseItem.InputCable.name=Input Spell Cable +item.bloodMagicBaseItem.FlameCore.name=Fire Core +item.bloodMagicBaseItem.IcyCore.name=Icy Core +item.bloodMagicBaseItem.GustCore.name=Gusty Core +item.bloodMagicBaseItem.EarthenCore.name=Earthen Core +item.bloodMagicBaseItem.CrackedRunicPlate.name=Cracked Runic Plate +item.bloodMagicBaseItem.RunicPlate.name=Runic Plate +item.bloodMagicBaseItem.ScribedRunicPlate.name=Imbued Runic Plate +item.bloodMagicBaseItem.DefaultCore.name=Unattuned Core +item.bloodMagicBaseItem.OffensiveCore.name=Offensive Core +item.bloodMagicBaseItem.DefensiveCore.name=Defensive Core +item.bloodMagicBaseItem.EnvironmentalCore.name=Environmental Core +item.bloodMagicBaseItem.PowerCore.name=Power Core +item.bloodMagicBaseItem.CostCore.name=Reduction Core +item.bloodMagicBaseItem.PotencyCore.name=Potency Core +item.bloodMagicBaseItem.ObsidianBrace.name=Obsidian Brace +item.bloodMagicBaseItem.EtherealSlate.name=Ethereal Slate +item.bloodMagicBaseItem.LifeShard.name=Life Shard +item.bloodMagicBaseItem.SoulShard.name=Soul Shard +item.bloodMagicBaseItem.LifeBrace.name=Living Brace +item.bloodMagicBaseItem.SoulRunicPlate.name=Soul Runic Plate +item.bloodMagicAlchemyItem.Offensa.name=Offensa +item.bloodMagicAlchemyItem.Praesidium.name=Praesidium +item.bloodMagicAlchemyItem.OrbisTerrae.name=Orbis Terrae +item.bloodMagicAlchemyItem.StrengthenedCatalyst.name=Strengthened Catalyst +item.bloodMagicAlchemyItem.ConcentratedCatalyst.name=Concentrated Catalyst +item.bloodMagicAlchemyItem.FracturedBone.name=Fractured Bone +item.bloodMagicAlchemyItem.Virtus.name=Virtus +item.bloodMagicAlchemyItem.Reductus.name=Reductus +item.bloodMagicAlchemyItem.Potentia.name=Potentia +item.sanguineHelmet.name=Sanguine Helmet +item.itemSeerSigil.name=Sigil of Sight +item.itemFluidSigil.name= +item.multiTool.name=Dynamic Mace +item.itemCombinationalCatalyst.name=Combinational Catalyst +item.sanguineRobe.name=Sanguine Robes +item.sanguinePants.name=Sanguine Leggings +item.sanguineBoots.name=Sanguine Boots +item.itemAttunedCrystal.name=Alchemic Router +item.itemTankSegmenter.name=Alchemic Segmenter +item.destinationClearer.name=Alchemic Cleanser +item.demonPlacer.name=Demon Crystal +item.creativeDagger.name=Creative Sacrificial Knife +item.itemBloodPack.name=Blood Letter's Pack +item.itemHarvestSigil.name=Harvest Goddess Sigil +item.itemCompressionSigil.name=Sigil of Compression +item.itemAssassinSigil.name=Sigil of the Assassin +item.transcendentBloodOrb.name=Transcendent Blood Orb +item.itemMailCatalogue.name=Mail Order Catalogue +item.inputRoutingFocus.name=Input Routing Focus +item.bloodMagicBaseItem.EnderShard.name=Ender Shard +item.outputRoutingFocus.default.name=Default Output Routing Focus +item.outputRoutingFocus.modItem.name=Output Routing Focus (ModItem) +item.outputRoutingFocus.ignMeta.name=Output Routing Focus (Ignore Meta) +item.outputRoutingFocus.matchNBT.name=Output Routing Focus (MatchNBT) +item.outputRoutingFocus.global.name=Output Routing Focus (Global) +item.dawnScribeTool.name=Elemental Inscription Tool: Dawn +item.boundHelmetEarth.name=Earth Omega Helmet +item.boundPlateEarth.name=Earth Omega Plate +item.boundLeggingsEarth.name=Earth Omega Leggings +item.boundBootsEarth.name=Earth Omega Boots +item.boundHelmetWind.name=Wind Omega Helmet +item.boundPlateWind.name=Wind Omega Plate +item.boundLeggingsWind.name=Wind Omega Leggings +item.boundBootsWind.name=Wind Omega Boots +item.boundHelmetFire.name=Fire Omega Helmet +item.boundPlateFire.name=Fire Omega Plate +item.boundLeggingsFire.name=Fire Omega Leggings +item.boundBootsFire.name=Fire Omega Boots +item.boundHelmetWater.name=Water Omega Helmet +item.boundPlateWater.name=Water Omega Plate +item.boundLeggingsWater.name=Water Omega Leggings +item.boundBootsWater.name=Water Omega Boots -item.incense.wood_ash.name=Wood Ash -item.incense.byrrus.name=Byrrus -item.incense.livens.name=Livens -item.incense.viridis.name=Viridis -item.incense.purpura.name=Purpura +item.bloodMagicIncenseItem.Woodash.name=Wood Ash +item.bloodMagicIncenseItem.Byrrus.name=Byrrus +item.bloodMagicIncenseItem.Livens.name=Livens +item.bloodMagicIncenseItem.Viridis.name=Viridis +item.bloodMagicIncenseItem.Purpura.name=Purpura #Creative Tab itemGroup.tabBloodMagic=Blood Magic @@ -328,7 +328,7 @@ tooltip.attunedcrystal.desc1=A tool to tune alchemy tooltip.attunedcrystal.desc2=reagent transmission tooltip.blankspell.desc=Crystal of infinite possibilities. tooltip.bloodframe.desc=Stirs bees into a frenzy. -tooltip.bloodletterpack.desc=This pack really chaffes... +tooltip.bloodletterpack.desc=This pack really chaffs... tooltip.bloodlightsigil.desc=I see a light! tooltip.boundarmor.devprotect=Devilish Protection tooltip.boundaxe.desc=Axe me about my puns! @@ -393,34 +393,34 @@ tooltip.ritualdiviner.ritualtunedto=Ritual tuned to face: tooltip.ritualdiviner.waterstones=Water Stones: tooltip.ritualdiviner.dawnstones=Dawn Stones: tooltip.ritualdiviner.totalStones=Total Stones: -tooltip.dismatler.desc=You could turn this upside down? +tooltip.dismatler.desc=You can turn this upside down? tooltip.sacrificialdagger.desc1=A slight draining feeling tickles your fingers tooltip.sacrificialdagger.desc2=Just a prick of the tooltip.sacrificialdagger.desc3=finger will suffice... tooltip.sanguinearmor.desc1=A pair of goggles imbued with power tooltip.sanguinearmor.desc2=Robes imbued with forbidden power tooltip.sanguinearmor.visdisc=Vis discount: -tooltip._scribe_tool.desc=The writing is on the wall... +tooltip.scribetool.desc=The writing is on the wall... tooltip.seersigil.desc=When seeing all is not enough -tooltip.sigil_ofelementalaffinity.desc1=Perfect for a fire-breathing fish -tooltip.sigil_ofelementalaffinity.desc2=who is afraid of heights! -tooltip.sigil_ofenderseverance.desc=Put those endermen in a Dire situation! -tooltip.sigil_ofgrowth.desc1=Who needs a green thumb when -tooltip.sigil_ofgrowth.desc2=you have a green slate? -tooltip.sigil_ofhaste.desc=One dose of caffeine later... -tooltip.sigil_ofholding.desc=Used to hold several Sigils! -tooltip.sigil_ofmagnetism.desc=I have a very magnetic personality! -tooltip.sigil_ofsupression.desc=Better than telekinesis -tooltip.sigil_oftheassassin.desc=Time to stay stealthy... -tooltip.sigil_ofthebridge.desc1=Activate to create a bridge -tooltip.sigil_ofthebridge.desc2=beneath your feet. -tooltip.sigil_ofthefastminer.desc=Keep going and going and going... -tooltip.sigil_ofwind.desc=Best not to wear a skirt. +tooltip.sigilofelementalaffinity.desc1=Perfect for a fire-breathing fish +tooltip.sigilofelementalaffinity.desc2=who is afraid of heights! +tooltip.sigilofenderseverance.desc=Put those endermen in a Dire situation! +tooltip.sigilofgrowth.desc1=Who needs a green thumb when +tooltip.sigilofgrowth.desc2=you have a green slate? +tooltip.sigilofhaste.desc=One dose of caffeine later... +tooltip.sigilofholding.desc=Used to hold several Sigils! +tooltip.sigilofmagnetism.desc=I have a very magnetic personality! +tooltip.sigilofsupression.desc=Better than telekinesis +tooltip.sigiloftheassassin.desc=Time to stay stealthy... +tooltip.sigilofthebridge.desc1=Activate to create a bridge +tooltip.sigilofthebridge.desc2=beneath your feet. +tooltip.sigilofthefastminer.desc=Keep going and going and going... +tooltip.sigilofwind.desc=Best not to wear a skirt. tooltip.sigil.state.activated=Activated tooltip.sigil.state.deactivated=Deactivated tooltip.tanksegmenter.desc1=Used to designate which tooltip.tanksegmenter.desc2=reagents can go into a container -tooltip._teleposition_focus.desc=An Enderpearl imbued with blood +tooltip.telepositionfocus.desc=An Enderpearl imbued with blood tooltip.voidsigil.desc=Better than a Swiffer! tooltip.watersigil.desc=Infinite water, anyone? tooltip.routingFocus.limit=Limit: @@ -468,9 +468,53 @@ message.routerfocus.limit=Focus' Item Limit set to: #Achievements achievement.alchemicalwizardry:firstPrick=Your First Prick! -achievement.alchemicalwizardry:firstPrick.desc=The first drop of life into the Altar... -achievement.alchemicalwizardry:weakOrb=Faintly Glowing Red... -achievement.alchemicalwizardry:weakOrb.desc=This orb will suffice...for now... +achievement.alchemicalwizardry:firstPrick.desc=Craft a Sacrificial Knife/Orb +achievement.alchemicalwizardry:weakOrb=Faintly Glowing Red +achievement.alchemicalwizardry:weakOrb.desc=Pickup a Weak Blood Orb +achievement.alchemicalwizardry:bloodLettersPack=Gathering More Blood +achievement.alchemicalwizardry:bloodLettersPack.desc=Create a Blood Letter's Pack +achievement.alchemicalwizardry:waterSigil=Infinite Water! +achievement.alchemicalwizardry:waterSigil.desc=Make a Water Sigil with your Weak Blood Orb +achievement.alchemicalwizardry:blankRunes=Stepping Towards Tier 2 +achievement.alchemicalwizardry:blankRunes.desc=Make a couple of Blank Runes +achievement.alchemicalwizardry:apprenticeOrb=Getting Stronger +achievement.alchemicalwizardry:apprenticeOrb.desc=Pickup an Apprentice Orb +achievement.alchemicalwizardry:airSigil=Whoosh! +achievement.alchemicalwizardry:airSigil.desc=Craft an Air Sigil +achievement.alchemicalwizardry:daggerSacrifice=Sacrificing Others +achievement.alchemicalwizardry:daggerSacrifice.desc=Pickup a Dagger of Sacrifice +achievement.alchemicalwizardry:brewingPotions=Alchemical Chemistry +achievement.alchemicalwizardry:brewingPotions.desc=Craft an Alchemical Chemistry set +achievement.alchemicalwizardry:magicianOrb=Even Stronger +achievement.alchemicalwizardry:magicianOrb.desc=Pickup a Magician's Orb +achievement.alchemicalwizardry:sigilHolding=Hold All The Sigils! +achievement.alchemicalwizardry:sigilHolding.desc=Make a Sigil of Holding +achievement.alchemicalwizardry:boundBlade=More Pain +achievement.alchemicalwizardry:boundBlade.desc=Create a Bound Blade from a Ritual of Binding +achievement.alchemicalwizardry:boundArmor=Uncrackable +achievement.alchemicalwizardry:boundArmor.desc=Craft Bound Armor from the Armor Forge +achievement.alchemicalwizardry:complexSpells=Not Quite Hemomancy +achievement.alchemicalwizardry:complexSpells.desc=Pickup a Complex Spell Crystal +achievement.alchemicalwizardry:ritualDiviner=Ritual Making +achievement.alchemicalwizardry:ritualDiviner.desc=Craft a Ritual Diviner +achievement.alchemicalwizardry:masterOrb=Getting Very Strong +achievement.alchemicalwizardry:masterOrb.desc=Pickup a Master Orb +achievement.alchemicalwizardry:demonSpawn=Demon Spawn +achievement.alchemicalwizardry:demonSpawn.desc=Summon and slay a demon/elemental +achievement.alchemicalwizardry:phantomBridgeSigil=Walking In Mid-Air +achievement.alchemicalwizardry:phantomBridgeSigil.desc=Make the Sigil of the Phantom Bridge +achievement.alchemicalwizardry:teleposer=Teleposed! +achievement.alchemicalwizardry:teleposer.desc=Craft a Teleposer +achievement.alchemicalwizardry:suppressionSigil=Suppress! +achievement.alchemicalwizardry:suppressionSigil.desc=Create a Suppression Sigil +achievement.alchemicalwizardry:archmageOrb=Too Strong +achievement.alchemicalwizardry:archmageOrb.desc=Pickup an Archmage Orb +achievement.alchemicalwizardry:energyBazooka=BOOM!!! +achievement.alchemicalwizardry:energyBazooka.desc=Create the all powerful, Energy Bazooka!! +achievement.alchemicalwizardry:demons=Demon Hunter +achievement.alchemicalwizardry:demons.desc=Kill a Demon +achievement.alchemicalwizardry:trancsendentOrb=OVERPOWERED +achievement.alchemicalwizardry:trancsendentOrb.desc=Pickup a Transcendent Blood Orb #G-API Downloading bm.versioning.getGAPI=["[BM] You don't have Guide-API installed! Install it to get it to unlock the book! [",{"text":"Download","color":"red","hoverEvent":{"action":"show_text","value":{"text":"Click this to auto-magically download the latest version","color":"red"}},"clickEvent":{"action":"run_command","value":"/bloodmagic-download-g-api"}},"]"] diff --git a/src/main/resources/assets/alchemicalwizardry/lang/zh_CN.lang b/src/main/resources/assets/alchemicalwizardry/lang/zh_CN.lang index d49998b6..8dfb70c2 100644 --- a/src/main/resources/assets/alchemicalwizardry/lang/zh_CN.lang +++ b/src/main/resources/assets/alchemicalwizardry/lang/zh_CN.lang @@ -51,17 +51,30 @@ tile.blockSpellEffect.fire.name=火焰效应器 tile.blockSpellEffect.ice.name=冰霜效应器 tile.blockSpellEffect.wind.name=风暴效应器 tile.blockSpellEffect.earth.name=尘土效应器 -tile.alchemicCalcinator.name=元素煅烧炉 +tile.alchemicCalcinator.name=炼金煅烧炉 tile.crystalBelljar.name=玻璃钟罩 -tile.blockReagentConduit.name=元素中续器 +tile.blockReagentConduit.name=炼金中续器 tile.lifeEssenceFluidBlock.name=生命本质 +tile.crystalBlock.fullCrystal.name=碎片集晶 +tile.crystalBlock.crystalBrick.name=碎片集晶砖 +tile.demonPortal.name=恶魔传送站 +tile.demonChest.name=恶魔的箱子 +tile.enchantmentGlyph.enchantability.name=图符: 魔咒专家 +tile.enchantmentGlyph.enchantmentLevel.name=图符: 神秘潜能 +tile.stabilityGlyph.stability1.name=图符: 刚硬稳定 +tile.schematicSaver.name=Schematic Saver +tile.blockMimic.name=Mimic Block +tile.blockSpectralContainer.name=Spectral Container +tile.blockBloodLightSource.name=血之光源 +tile.spectralBlock.name=影桥方块 +tile.blockCrucible.name=香炉 #Item Localization item.weakBloodOrb.name=虚弱气血宝珠 item.apprenticeBloodOrb.name=学徒气血宝珠 -item.magicianBloodOrb.name=法师的气血宝珠 +item.magicianBloodOrb.name=法师气血宝珠 item.masterBloodOrb.name=导师气血宝珠 -item.archmageBloodOrb.name=大法师的气血宝珠 +item.archmageBloodOrb.name=贤者气血宝珠 item.energyBlast.name=能源爆破枪 item.energySword.name=约束之剑 item.lavaCrystal.name=熔岩晶体 @@ -83,8 +96,9 @@ item.fireScribeTool.name=元素铭文:火 item.earthScribeTool.name=元素铭文:地 item.airScribeTool.name=元素铭文:风 item.duskScribeTool.name=元素铭文: 幽暗 -item.activationCrystalWeak.name=[低等]激活水晶 +item.activationCrystalWeak.name=[虚弱]激活水晶 item.activationCrystalAwakened.name=[觉醒]激活水晶 +item.activationCrystalCreative.name=[创造模式]激活水晶 item.boundPickaxe.name=约束之镐 item.boundAxe.name=约束之斧 item.boundShovel.name=约束之锹 @@ -165,6 +179,10 @@ item.bloodMagicBaseItem.CostCore.name=代价核心 item.bloodMagicBaseItem.PotencyCore.name=效能核心 item.bloodMagicBaseItem.ObsidianBrace.name=黑曜石支架 item.bloodMagicBaseItem.EtherealSlate.name=悬幽石板 +item.bloodMagicBaseItem.LifeShard.name=生命碎片 +item.bloodMagicBaseItem.SoulShard.name=灵魂碎片 +item.bloodMagicBaseItem.LifeBrace.name=生命支架 +item.bloodMagicBaseItem.SoulRunicPlate.name=灵魂文板 item.bloodMagicAlchemyItem.Offensa.name=攻势粉末 item.bloodMagicAlchemyItem.Praesidium.name=防守粉末 item.bloodMagicAlchemyItem.OrbisTerrae.name=环境粉末 @@ -182,14 +200,48 @@ item.itemCombinationalCatalyst.name=组合催化剂 item.sanguineRobe.name=血红法袍 item.sanguinePants.name=血红护腿 item.sanguineBoots.name=血红靴子 -item.itemAttunedCrystal.name=元素通递仗 -item.itemTankSegmenter.name=元素分配仗 -item.destinationClearer.name=元素清通器 +item.itemAttunedCrystal.name=炼金通递仗 +item.itemTankSegmenter.name=炼金分配仗 +item.destinationClearer.name=炼金清通器 item.demonPlacer.name=恶魔水晶 item.creativeDagger.name=[创造模式]牺牲匕首 item.itemBloodPack.name=血液背包 item.itemHarvestSigil.name=丰收印记 item.itemCompressionSigil.name=压缩印记 +item.itemAssassinSigil.name=刺客印记 +item.transcendentBloodOrb.name=卓越气血宝珠 +item.itemMailCatalogue.name=邮购目录 +item.inputRoutingFocus.name=输入路由核心 +item.bloodMagicBaseItem.EnderShard.name=末影碎片 +item.outputRoutingFocus.default.name=输出路由核心(默认) +item.outputRoutingFocus.modItem.name=输出路由核心(ModItem) +item.outputRoutingFocus.ignMeta.name=输出路由核心(数据值忽视) +item.outputRoutingFocus.matchNBT.name=输出路由核心(NBT匹配) +item.outputRoutingFocus.global.name=输出路由核心(Global) +item.dawnScribeTool.name=元素铭文:破晓 +item.boundHelmetEarth.name=土`欧米伽头盔 +item.boundPlateEarth.name=土`欧米伽胸甲 +item.boundLeggingsEarth.name=土`欧米伽护腿 +item.boundBootsEarth.name=土`欧米伽之靴 +item.boundHelmetWind.name=风`欧米伽头盔 +item.boundPlateWind.name=风`欧米伽胸甲 +item.boundLeggingsWind.name=风`欧米伽护腿 +item.boundBootsWind.name=风`欧米伽之靴 +item.boundHelmetFire.name=火`欧米伽头盔 +item.boundPlateFire.name=火`欧米伽胸甲 +item.boundLeggingsFire.name=火`欧米伽护腿 +item.boundBootsFire.name=火`欧米伽之靴 +item.boundHelmetWater.name=水`欧米伽头盔 +item.boundPlateWater.name=水`欧米伽胸甲 +item.boundLeggingsWater.name=水`欧米伽护腿 +item.boundBootsWater.name=水`欧米伽之靴 + +item.bloodMagicIncenseItem.Woodash.name=木灰粉末 +item.bloodMagicIncenseItem.Byrrus.name=玫香粉末 +item.bloodMagicIncenseItem.Livens.name=晶香粉末 +item.bloodMagicIncenseItem.Viridis.name=翠香粉末 +item.bloodMagicIncenseItem.Purpura.name=紫香粉末 + #Creative Tab itemGroup.tabBloodMagic=血魔法 @@ -199,6 +251,10 @@ bm.string.drain=消耗 bm.string.tier=层数 bm.string.crafting.orb.shaped=特定血宝珠合成 bm.string.crafting.orb.shapeless=不定血宝珠合成 +text.recipe.altar=血之祭坛 +text.recipe.altar.tier=层数: %s +text.recipe.altar.bloodRequired=LP: %s +text.recipe.shapedOrb=合适宝珠合成 #Entities entity.AWWayofTime.EarthElemental.name=土之元素精灵 @@ -215,3 +271,199 @@ entity.AWWayofTime.WingedFireDemon.name=火翼恶魔 entity.AWWayofTime.BileDemon.name=胆汁恶魔 entity.AWWayofTime.LowerGuardian.name=低等守护者 entity.AWWayofTime.FallenAngel.name=堕天使 +entity.AWWayofTime.MinorDemonGruntGuardian.name=格伦魔守卫 +entity.AWWayofTime.MinorDemonGruntGuardianWind.name=风格伦魔守卫 +entity.AWWayofTime.MinorDemonGruntGuardianFire.name=火格伦魔守卫 +entity.AWWayofTime.MinorDemonGruntGuardianIce.name=冰格伦魔守卫 +entity.AWWayofTime.MinorDemonGruntGuardianEarth.name=土格伦魔守卫 +entity.AWWayofTime.MinorDemonGruntWind.name=风格伦魔 +entity.AWWayofTime.MinorDemonGruntFire.name=火格伦魔 +entity.AWWayofTime.MinorDemonGruntIce.name=冰格伦魔 +entity.AWWayofTime.MinorDemonGruntEarth.name=土格伦魔 +entity.AWWayofTime.MinorDemonGrunt.name=格伦魔 + +#Commands +commands.soulnetwork.usage=/soulnetwork <玩家> +commands.bind.usage=/bind <玩家> +commands.bind.success=物品成功绑定! +commands.bind.failed.noPlayer=没有指定玩家 +commands.bind.failed.alreadyBound=物品已经被绑定; 使用 /unbind 来解除绑定 +commands.bind.failed.notBindable=物品无法被绑定 +commands.unbind.usage=/unbind +commands.unbind.success=物品成功解除绑定! +commands.unbind.failed.notBindable=物品无法解除绑定 +commands.soulnetwork.usage=/soulnetwork <玩家> <add|subtract|fill|empty|get> [数量] +commands.soulnetwork.add.success=成功添加 %dLP 到 %s 的灵魂网络! +commands.soulnetwork.subtract.success=成功从 %s 的灵魂网络中减去 %dLP ! +commands.soulnetwork.fill.success=成功填满 %s 的灵魂网络! +commands.soulnetwork.empty.success=成功掏空 %s 的灵魂网络! +commands.soulnetwork.get.success=目前有 %dLP 在 %s 的灵魂网络! +commands.soulnetwork.noPlayer=没有指定玩家 +commands.soulnetwork.noCommand=命令不够详细 +commands.soulnetwork.notACommand=这不是有效的命令 + +#Tooltips +tooltip.activationcrystal.creativeonly=创造模式独有 - 激活任何仪式 +tooltip.activationcrystal.lowlevelrituals=激活低级仪式 +tooltip.activationcrystal.powerfulrituals=激活更多强大的仪式 +tooltip.airsigil.desc=我感觉已经轻盈。。。 +tooltip.alchemy.coords=坐标: +tooltip.alchemy.damage=攻击伤害: +tooltip.alchemy.dimension=绑定世界: +tooltip.alchemy.direction=方向: +tooltip.alchemy.forrecipe=了解配方 +tooltip.alchemy.press=对着物品按 +tooltip.alchemy.recipe=材料: +tooltip.alchemy.ritualid=仪式ID: +tooltip.alchemy.shift=shift +tooltip.alchemy.usedinalchemy=用于炼金术 +tooltip.alchemyflask.caution=警 告: 内部异常 +tooltip.alchemyflask.swigsleft=药水剩余: +tooltip.armorinhibitor.desc1=用来约束一个灵魂的 +tooltip.armorinhibitor.desc2=不自然的能力. +tooltip.attunedcrystal.desc1=一个用于调整 +tooltip.attunedcrystal.desc2=炼金试剂传输的工具 +tooltip.blankspell.desc=拥有无限可能性的水晶. +tooltip.bloodframe.desc=Stirs bees into a frenzy. +tooltip.bloodletterpack.desc=这个背包穿起来真的挺疼... +tooltip.bloodlightsigil.desc=我看见一个光芒! +tooltip.boundarmor.devprotect=邪恶的保护 +tooltip.boundaxe.desc=Axe me 我的双关语! +tooltip.boundpickaxe.desc1=被诅咒的灵魂 +tooltip.boundpickaxe.desc2=不喜欢石头... +tooltip.boundshovel.desc=不, 不是那种类型的铁锹. +tooltip.caution.desc1=注意: 可能会导致 +tooltip.caution.desc2=一个糟糕的一天... +tooltip.cheatyitem.desc1=右键填充网络, +tooltip.cheatyitem.desc2=Shift+右键清空. +tooltip.complexspellcrystal.desc=拥有难以想象能力的水晶 +tooltip.crystalbelljar.contents=当前储存 +tooltip.crystalbelljar.empty=- 空的 +tooltip.demonictelepfocus.desc1=一个强化的核心 +tooltip.demonictelepfocus.desc2=与恶魔气血碎片合成 +tooltip.demonplacer.desc=用来生成恶魔. +tooltip.destclearer.desc1=用于清除一个炼金试剂容器 +tooltip.destclearer.desc2=的连接目标列表 +tooltip.diablokey.desc=绑定其他物品到主人的灵魂网络 +tooltip.divinationsigil.desc1=凝视着灵魂 +tooltip.divinationsigil.desc2=获取当前生命本质的情况 +tooltip.energybazooka.desc=Boom. +tooltip.energybattery.desc=存储原始的生命本质 +tooltip.energyblast.desc1=用于发射 +tooltip.energyblast.desc2=毁灭性的炮弹. +tooltip.enhancedtelepfocus.desc=一个核心在祭坛中进一步加强 +tooltip.fluidsigil.beastmode=野兽模式 +tooltip.fluidsigil.desc=一个对液体有秀丽亲和力的印记 +tooltip.fluidsigil.draintankmode=排水槽模式 +tooltip.fluidsigil.filltankmode=满水槽魔石 +tooltip.fluidsigil.fluidplacementmode=流动模式 +tooltip.fluidsigil.forcesyphonmode=强迫虹吸模式 +tooltip.fluidsigil.syphoningmode=虹吸魔石 +tooltip.harvestsigil.desc=得豆种豆, 得瓜种瓜. +tooltip.infusedstone.desc1=在祭坛中为 +tooltip.infusedstone.desc2=石头输入生命本质 +tooltip.item.iteminslot=集合的印记 +tooltip.item.currentitem=目前印记: +tooltip.lavacrystal.desc1=储存生命 +tooltip.lavacrystal.desc2=去烧炼熔炉中的材料. +tooltip.lavasigil.desc1=接触液体是 +tooltip.lavasigil.desc2=非常不推荐的. +tooltip.lp.storedlp=现储存的LP: +tooltip.mode.creative=创造模式独有 +tooltip.owner.currentowner=当前所有者: +tooltip.owner.demonsowner=恶魔的主人: +tooltip.packratsigil.desc=金刚石般的双手 +tooltip.reagent.selectedreagent=当前选定的炼金试剂: +tooltip.reinforcedtelepfocus.desc1=一个强化的核心 +tooltip.reinforcedtelepfocus.desc2=与恶魔气血碎片合成 +tooltip.ritualdiviner.airstones=空气仪式石: +tooltip.ritualdiviner.blankstones=空白仪式石: +tooltip.ritualdiviner.cannotplace=无法放置幽暗仪式石 +tooltip.ritualdiviner.canplace=可以放置幽暗仪式石 +tooltip.ritualdiviner.canplacedawn=可以放置幽暗和破晓仪式石 +tooltip.ritualdiviner.desc=用于探索新的仪式 +tooltip.ritualdiviner.duskstones=幽暗仪式石: +tooltip.ritualdiviner.earthstones=地之仪式石: +tooltip.ritualdiviner.firestones=火之仪式石: +tooltip.ritualdiviner.moreinfo=按 shift 了解详细信息 +tooltip.ritualdiviner.ritualtunedto=仪式朝向: +tooltip.ritualdiviner.waterstones=水之仪式石: +tooltip.ritualdiviner.dawnstones=破晓仪式石: +tooltip.ritualdiviner.totalStones=仪式石总数: +tooltip.sacrificialdagger.desc1=手指感到一股轻微的排失似的发痒 +tooltip.sacrificialdagger.desc2=只是刺一下, +tooltip.sacrificialdagger.desc3=手指就有能力了... +tooltip.sanguinearmor.desc1=一双充满力量的护目镜 +tooltip.sanguinearmor.desc2=灌入被禁止的力量的长袍 +tooltip.sanguinearmor.visdisc=灵气减免: +tooltip.scribetool.desc=书写是在墙壁上的... +tooltip.seersigil.desc=看到更多总会有所不足 +tooltip.sigilofelementalaffinity.desc1=在火中呼吸的鱼 +tooltip.sigilofelementalaffinity.desc2=是多么的完美! +tooltip.sigilofenderseverance.desc=使末影人遇上一个严峻的形势! +tooltip.sigilofgrowth.desc1=谁需要有特殊的园艺才能, +tooltip.sigilofgrowth.desc2=你有一个绿丛印记吗? +tooltip.sigilofhaste.desc=一剂兴奋剂后... +tooltip.sigilofholding.desc=用来装几个符印! +tooltip.sigilofmagnetism.desc=我有一个非常具有吸引力的人格ww +tooltip.sigilofsupression.desc=比念力更好 +tooltip.sigiloftheassassin.desc=现在该待在阴暗处了... +tooltip.sigilofthebridge.desc1=激活来创造一座幻影桥 +tooltip.sigilofthebridge.desc2=在你的双脚之下. +tooltip.sigilofthefastminer.desc=继续, 继续, 继续... +tooltip.sigilofwind.desc=最好不要穿裙子. +tooltip.sigil.state.activated=已激活 +tooltip.sigil.state.deactivated=停用 +tooltip.tanksegmenter.desc1=用于指定哪种炼金试剂 +tooltip.tanksegmenter.desc2=可以进入容器 +tooltip.telepositionfocus.desc=一个末影珍珠灌输本质 +tooltip.voidsigil.desc=比拖把的更好! +tooltip.watersigil.desc=无限的水, 任何人? +tooltip.routingFocus.limit=限制: +tooltip.routingFocus.desc=一个传送物件的核心 +tooltip.alchemy.usedinincense=用于香炉的精炼熏香粉末 + +#Messages +message.altar.capacity=容量: %s LP +message.altar.consumptionrate=消耗率: +message.altar.currentessence=祭坛目前的生命本质: %s LP +message.altar.currenttier=祭坛目前的层数: %s +message.altar.progress=祭坛的进展: +message.altar.inputtank= 输入槽: %s LP +message.altar.outputtank= 输出槽: %s LP +message.altar.hunger=[BM] 你的高级再生效果使你变得饥饿... +message.attunedcrystal.clearing=清除已保存的容器... +message.attunedcrystal.error.cannotfind=无法找到连接的容器. +message.attunedcrystal.error.noconnections=连接的容器没有剩余线路! +message.attunedcrystal.error.toofar=连接的两个容器离得太远或是不在同个世界. +message.attunedcrystal.linked=容器现在连接完成. 传输: +message.attunedcrystal.linking=连接到选择容器. +message.attunedcrystal.setto=调整水晶设置为: +message.demon.shallfollow=我将会跟随并且保护你! +message.demon.willstay=我会在这待着的, 主人. +message.destinationclearer.cleared=目标列表已清除. +message.divinationsigil.amount=数额: +message.divinationsigil.currentessence=目前的生命本质: +message.divinationsigil.reagent=炼金试剂: +message.masterstone.crystalvibrates=你的水晶弱弱的振动着. +message.masterstone.energyflows=一股能量流经这个仪式! +message.masterstone.nothinghappened=似乎什么都没发生... +message.masterstone.ritualresistyou=仪式似乎在积极的抵抗你! +message.masterstone.somethingstoppedyou=有什么东西使你的路径堵塞... +message.masterstone.youfeelapull=你感到一股拉力, 但没有足够的能量促进其发生. +message.ritual.currentritual=目前仪式: +message.ritual.side.east=东 +message.ritual.side.north=北 +message.ritual.side.south=南 +message.ritual.side.west=西 +message.ritualdemonportal.missingjar=柱子上的玻璃钟罩似乎不够... +message.tanksegmenter.nowhas=容器的槽 +message.tanksegmenter.setto=容器分配设置为: +message.tanksegmenter.tankssetto=槽设置为: +message.routerfocus.limit=核心的物品限制设置为: + +#Achievements +achievement.firstPrick=你第一次的疼痛! +achievement.alchemicalwizardy:firstPrick!.desc=第一滴祭坛中的生命... +achievement.alchemicalwizardry:weakOrb=微弱的红热... +achievement.alchemicalwizardry:weakOrb.desc=这个宝珠应该够了...就目前而言... diff --git a/src/main/resources/assets/alchemicalwizardry/models/block/soul_armour_forge.json b/src/main/resources/assets/alchemicalwizardry/models/block/soul_armour_forge.json deleted file mode 100644 index b455a113..00000000 --- a/src/main/resources/assets/alchemicalwizardry/models/block/soul_armour_forge.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "alchemicalwizardry:blocks/SoulForge" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/alchemicalwizardry/models/item/soul_armour_forge.json b/src/main/resources/assets/alchemicalwizardry/models/item/soul_armour_forge.json deleted file mode 100644 index ca3e1dff..00000000 --- a/src/main/resources/assets/alchemicalwizardry/models/item/soul_armour_forge.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parent":"hemomancy:block/soul_armour_forge", - "display": { - "thirdperson": { - "rotation": [ 10, -45, 170 ], - "translation": [ 0, 1.5, -2.75 ], - "scale": [ 0.375, 0.375, 0.375 ] - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/alchemicalwizardryBooks/books.txt b/src/main/resources/assets/alchemicalwizardryBooks/books.txt new file mode 100644 index 00000000..2fcd1b60 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardryBooks/books.txt @@ -0,0 +1,259 @@ +aw.entry.Magnus.1= +A classic tragic backstory.1= My name is Tiberius. I was a kid when the demons came for my village during The Wars. They ransacked the houses and turned the shacks into splinters, wielding fire and water to blast the land asunder. I woke up to some travelling merchants that were passing by, equipping the warriors who were futily trying to drive off the demons that still clawed the village. I was brought to a village nearby, where a magician +A classic tragic backstory.2=named Magus helped tend to my wounds. The magic that he used was something that I had never seen before - it wasn't Thaumaturgy, nor Alchemy, and it was definitely not Botany. He winked at me once he saw that my eyes were open, holding his finger to his lips. Fast-forward several years, and I have learned almost everything from Master Magus, being his third student ever to master his arts. Against his wishes, I have recorded +A classic tragic backstory.3=my research and put several wards and spells on this book. So welcome, apprentice. I am known as The Architect, and I am a Blood Mage. It took several years of pestering before I managed to convince Magus to teach me. He kept on telling me that, "Magic that uses the life essence of living beings requires patience and preparation in order to master it. One false move, go a little past your natural endurance, and you may find +A classic tragic backstory.4=yourself taking a nice vacation in Tartarus." The thing was, I wanted to go there - I had some unfinished business with the demons. The process that Magus originally constructed required powerful artifacts that he constructed himself, but were rather lacking where teaching was concerned. After studying a bit of alchemy and the process of "Equivalent Exchange," I managed to +A classic tragic backstory.5=construct myself an altar that would transmute items inside of its basin into new powerful forms. The only issue was that it needed a worthy catalyst, and so with a prick of the finger I set the Blood Altar alight! +The Blood Altar.1= +The Blood Altar.1= To start any form of transmutation involving blood, you would need to construct a blood altar and a sacrificial knife, as well as have a solitary diamond in your possession. After placing the blood altar down, Magus advised me to be +The Blood Altar.2=careful as I filled it slowly with my blood, and said that I would need to be really close to the altar (about a metre) for the knife to work. With about 2 buckets of blood in the altar, which Master Magus reminds me is about 10 hearts worth, I placed the diamond inside of the altar by activating it with the diamond in hand. +The Blood Altar.2= The blood dissipated in a cloud of red swirls as I waited for the atoms of the diamond to shift and reform. There were a few moments where the particles turned gray, which meant that the altar was empty and I had to hurry to fill it. After the +The Blood Altar.3=diamond burst in a shower of red particles, what finally sat in the altar was a Weak Blood Orb. +The Soul Network.1= One thing that I initially didn't understand was the overarching connection between the blood orb and myself. When I initially met Magus, I could see many sparkling strands branching off of him, flowing throughout his house and linking with intricate stones and runic drawings. I asked Magus about the strands, but he had no clue what I was talking about. It took three years of thorough research to finally find the answer, and when I +The Soul Network.2=brought my notes to him he was really impressed with what I have found. When you send power into the orb, the energy is transmitted from the strand connecting the orb and into the very soul of the person the orb is bound to. Similarly, and Magus managed to show this effect with several of his rituals, when you use something that drains energy it will drain the energy directly from the soul. The thing is that if you +The Soul Network.3=use an item whose owner has no energy left, the item will instead grab the requisite energy from the user of the item. Directly. From his or her life force. As such, the unit of measurement is called "Life Points," or LP. I experimented with this, and one heart equals 200 LP. I have christened this system to be the "Soul Network," and is used in all branches of Blood Magic indirectly. +Basics of sigils.1= Magus is a master at rituals. His power in the intricate layering of stones and inks is unmatched. The problem is that these rituals are rather... static in nature. Sure, being able to call the bounty of the earth to the surface is all fine and +Basics of sigils.2=dandy, but won't exactly protect you when you are on fire. To this end, I decided to link my soul network to powerful items that I have created. To start, I decided to transmute a piece of smooth stone in the Blood Altar with just 1kLP to create a blank slate. The first thing I did was to arrange the blank slate with some reflective glass and my weak blood orb. Pouring my power into the configuration created a Divination Sigil, +Basics of sigils.3=which I could link to my network and see how much power that my soul network holds. What is more, holding the sigil to the Blood Altar flooded my mind with information, giving me the knowledge about its current tier, capacity, and even how much it was holding. Happy with the sigil, I brought a fresh unbound one to Master Magus for him to use. When I took the divination sigil back in my hands and tried to use it to +Basics of sigils.4=view his network, for some reason I could not gleam any information from him. I don't really see why this is, considering that I used this same method for other people and I saw that they had no power at all, but to gleam actually ... nothing from Magus is strange. +Training, and water sigil.1= I've been training my body, lately. Master Magus told me that in order to extract most of my power, I have to get my mind, soul, and body into as perfect shape as possible. Even though my mind takes time to hone, and my soul requires methods I have yet +Training, and water sigil.2=mastered to strengthen, my body is something I can actively manage. No more cookies for me, apparently, since they have horrible saturation for the work I do. And it's hard to grow cocoa right now, anyways. The temperature is ridiculously high, and with it the humidity is pretty freaking low. Some bright spark of a thaumaturge got it into their head that it would be good to open up the Obelisk to the far north of +Training, and water sigil.3=the village, and because of it a large influx of taint spewed forth from the eldritch tomb. It looks like someone wasn't focusing enough on their sanity training! Thankfully Master Magus decided to head out to the site up north with a few stones and a new vat of ink, saying over his shoulder that he had a new ritual that he'd like to test to fix the problem. In the meantime, I was tasked to create something to +Training, and water sigil.4=fix our water problem. I thought about perhaps cooling the environment around the village in order to condense the water in the air, or perhaps find a way to create rain - neither of which I would be able to accomplish, because I'm sure that either task would take more than the 5 kLP capacity I currently have with my blood orb. So, I had to think small. At my desk, I mixed some dirt into the spare water I +Training, and water sigil.5=had for experimentation and started to paint on one of the blank slates I recently created to layer a bit of a base. Once I was satisfied, I took a bunch of buckets (to be safe in case that what I did would fail) and arranged them around the damp slate and then took my orb from the chest nearby. I then tapped the orb onto the slate, and the water started to boil and swirl out of the surrounding buckets, rushing into the slate! After a quick, +Training, and water sigil.6=bright flash, the new sigil lay steaming on the table in a puddle of water. Thankfully the sigil was what I needed. I could link it to my network and place water wherever I wanted by simply tapping it on the ground. The water was pricy, requiring a full 100 LP for each bucket's worth that I created in the world, but for an infinite supply of water, creeping upwards to 50 full buckets for my puny network was something that I +Training, and water sigil.7=desperately needed. It's just a shame that it started to rain an hour after I created the sigil. +The Lava crystal.1= There was an explosion in the lab today as I was trying to work out a few more artifacts. When I tried to infuse a few buckets of lava with my power, and used some glass to contain the effect, the assembly simply burst into flames and flew me +The Lava crystal.2=across the workshop. I wasn't really hurt, and thankfully my water sigil was used promptly to put out the fires, however it seemed that my experiment failed rather heartily. Apparently I needed just a little bit more time, however, since I got it to work a week after. By combining some glass and obsidian together with a few buckets of lava, and throwing in my blood orb and a diamond to hold it all together, the diamond was +The Lava crystal.3=transmuted into a fiery crystal that seemed to... do nothing at all. I peeked out from behind the blast shield, since by then I learned that playing with lava was not the safest of hobbies, and gingerly linked the crystal to my network. As soon as the pact was completed, I felt a wave of heat emanate from the crystal, and promptly tossed it into a furnace before it could burn my fingers. I was unsuccessful on that front. +The Lava crystal.4=The furnace immediately kindled, and the pork that was sitting in the top slot began to cook quickly. Quickly feeling a wave of nausea, I checked my network out and found that I had nothing left to offer. Once I pulled the blasted thing out of the furnace and stuffed it into a chest, the nausea subsided. So this Lava Crystal could work in any sort of furnace and feed off of the owner's network, but if the network was dry it would +The Lava crystal.5=instead cause the owner to feel a hearty blast of nausea unless removed from the solid fuel-burning machine. Good to know, since now I know of a way to trade my services with the blacksmiths in the village. +Sigil of lava.1= Finally, the day that I have been waiting for the past 7 months has come. The "Hell's Harvest Festival" is a day that the village celebrates the creation of the first portal to the Nether a century ago. It's funny that when I ask the villagers why +Sigil of lava.2=it is that we celebrate the formation of a portal to Hell, they simply laugh and say that I'll see when I finally go in. The portal was located in a vast stone cathedral, a three day's walk from the village on foot. Magus said that he'd meet us there, because he had a few things that he needed to prepare before actually going over to the Nether, but I was curious as to how he'd make it there in time - knowing Master Magus, +Sigil of lava.3=he'd spend a day or two reading up on a new theory for a ritual and forget himself in his works. When we entered the hall, however, Master Magus was there already talking to one of the guards of the unlit portal, stowing away a gem into his pocket. I knew something was up, because I could see a strand connecting the gem in his pocket to both himself and one that trailed off back to the village. Not wanting to be +Sigil of lava.4=distracted, I pulled out my wand (Master Magus insists on all of his apprentices learning of another field of magic, and Thaumaturgy has proved itself useful) and set alight the portal as was the custom of the newest member to the harvest. It seems that the harvest, however, was not exactly a trade. I saw giant stone walls and vast pumps throughout the land, grabbing all of the lava from the great pool below. A large +Sigil of lava.5=collection of bound pigmen walked by, led away by someone in a full set of shining steel armour. Huge machines that processed the lava were emblazoned by the brands of industrialization: Thermal Expansion, BuildCraft, Greg Tech, and many other labels dotted throughout the base of operations. So much for a festival - it seemed that the Conglomeration, the governing body that oversaw all of the villages in the land, saw it fit to turn a +Sigil of lava.6=civilization into a circus. After accepting a few supplies from the farce, I walked back home by myself two days early. There were some things that I wanted to create, but wasting my time there would have been fruitless. Clearing my desk of debris charts of alchemical constructs, I set to work with a vat of magma cream that I brought with me, attempting to combine it with another slate. Casting my orb aside, I fished the lava +Sigil of lava.7=crystal from my chest and combined it with the cream and some fresh buckets of lava - thankfully not from the Nether. Once the light faded, I picked up the new Lava Sigil that lay in front of me. What this sigil does is it siphons energy and uses the properties of the lava crystal to super heat rock, creating a source of lava wherever the wielder touches the ground. So, infinite lava, and infinite fire hazards. +Sigil of lava.8=Unfortunately, it takes about 1 kLP per single use, which is a lot for my network as it stands currently. It looks like I need more power, but seeing that Master Magus is currently enjoying himself at the festival, I'm going to have to find a way to boost the blood altar myself. +Blank runes.1= Of course! Runes! Why didn't I think of this earlier? The power of the altar itself comes from the structure of the components used to create it. The force of the diamond alone is not enough to create stronger materials through transmutation. What I +Blank runes.2=need to do is construct several runes to extend the altar, and thus the altar's power. The only thing that I could do on such short notice is to take several blank slates (I have about 16 left) and quite a bit more stone and combine them with my Weak Blood orb. +Blank runes.2= What came next was the hard part. After I made 8 runes for myself, I sat puzzling over the altar. "How could I extend this thing?" I asked myself. It took a few hours, but when I placed the 8 runes in the ground around +Blank runes.3=the altar in a ring, I felt a strange reverberation in the air. Something felt like it awoke, as if the power in the surrounding environment doubled. Quickly, I grabbed my Divination Sigil and slapped it onto the altar, and focused into it to view the power of the altar. I was pleased to find out that the altar was finally at its second tier, which should open up many more transmutation recipes. The problem now, as I sank slowly +Blank runes.4=into my bed to sleep after the long day, was to find out what I could now do. Although Magus was pleased with the upgraded altar, I was caught in a bind. I couldn't seem to do anything with it that the previous altar could not do. The first thing I did was I placed one of my leftover blank slates into the basin, and it promptly consumed 2 kLP worth of essence as it reinforced the structure. Although this Reinforced +Blank runes.5=Slate was much more durable, this process appeared to make the slate no longer work with creating both the lava and water sigils, as well as making it a waste to use in additional rune creation. +Speed runes.1= I can note, however, that when I combined one of the runes with a few more blank slates and some leftover sugar from the harvest it seemed to augment the altar even further. The sugar had to be laid in a configuration that mimicked a bow and +Speed runes.2=arrow on top of the rune, and by doing so it created what I can dub a Speed Rune. What this rune appeared to do was increase the speed of the altar's processes, both the transmutation rate as well as the speed that a bound orb will consume the essence from the altar, by an additive 20% per rune. This tier doesn't seem perfect, however, since it seems that for the second tier only the four edge runes (not the corners) could be used as +Speed runes.3=upgrade "slots" for the purpose of augmentation of the altar. +A shining green orb.1= The "eureka" moment came when I accidentally dropped a few things on the floor of the lab. When I bent down to phish the items from the floor I noticed that one of the emeralds rolled right up to the altar, almost as if it longed to be inside of its +A shining green orb.2=basin. It occurred to me that if a simple diamond inside the altar created a weak blood orb, perhaps a much rarer gem would make a stronger version! Quickly fetching my knife from the table, I filled up the altar over the course of the day so that I could make sure I didn't mess anything up, and then dropped the emerald into the altar. The speed runes made sure that the transmutation took no time at all! Wow, those +A shining green orb.3=things work fast - I better make a note of removing the runes when I try to create more difficult items inside of the altar, because if I was not prepared it would have chewed through my supply in no time! After a few tantalizing moments waiting, the altar burst in a shower of particles and the new orb sat there, revolving on top of the altar. Master Magus must have heard my shout of exclamation, because he +A shining green orb.4=hurried over from his side of the house and helped me to my feet. Not noticing the pain in my palm from earlier, I reached for the orb and sealed it to my network. Master Magus then helped me to fill up the orb inside of the altar, and when we were done that day I had a total of 25 kLP inside of my network. +The void sigil.1= After resting the rest of the day at the insistence of Magus, I returned to work this morning full of inspiration. While I laid in bed half awake, the thought struck me that so far I had managed to use sigils to create fluid. So why not make +The void sigil.2=one that can remove it? My first attempts with things like glass bottles and bowls failed with all of them working for a brief moment, then returning to their old forms. It was almost lunch time when the thought crossed me that I used buckets for the first two, so why not here? Half an hour, six buckets, a bit of twine and a reinforced slate later I had my first void sigil. +Air sigil.1= While tending to our small farm a few days later, I noticed a bird land on our fence. I turned to face it as it flied off, and had a revelation as I watched how it flew. If I could use magic to create the gust of wind like that made by bird wings, +Air sigil.2=I could fly through the air! After hastily finishing the days' chores, working out details in my head all the while, I rushed to my workstation to start work on what I have now dubbed the "Air Sigil". Using feathers and a Ghast tear as ink on a reinforced slate, I formed a sigil that on use creates a rush of air behind where you face to propel you forward. Flight using this sigil is fast, if a little pricey and hard to control, not like the +Air sigil.3=flight provided by Magus's thaumostatic harness. Also, landing is a bit of a problem as I learned the hard way... +Sigil of Sight.1= I've grown a little annoyed at my divination sigil. While it is able to read the current tier and essence of a blood altar, that is ALL it can read. As a result, my current goal is to improve its design using my new blood orb. So far it is going +Sigil of Sight.2=well. The "Sigil of Sight" is able to read the buffers of the altar to give how much they store, as well as how far along a craft in the altar is and how fast it is using LP. The downside of this upgrade is that it loses the power to read the altar's tier or the users soul network, but so far this is an unavoidable loss. For now I'll settle with what it does now, and might try to improve it further later. +Advanced altar mechanics.1= Even after all this time, I still don't fully understand the blood altar. Sure, I built the thing, but... It is almost like working directly with raw life essence has given it a bit of life of its own. After running a few experiments to try and make my life easier, I've noticed some odd behavior coming from it. First, I tried using some basic piping to extract life essence to store later to use for more pricey +Advanced altar mechanics.2=infusions. As it turns out, the altar doesn't like giving up its essence. I managed to get a bucket of LE out before it seemed to slow to a trickle feed, nothing more the 20LP a second. Further tests show that it has a "Buffer" tank that siphons off LP from the main tank, holding roughly 10% of the main tanks capacity. As I mentioned, it does this very slowly so piping is out of the question for now... A later test shows that it +Advanced altar mechanics.3=also doesn't like essence being piped in, as a similar restriction apples to imputing essence. I will defiantly need to find a way to improve this transfer rate... Another strange phenomenon about the altar is its "Hunger" for life. After the failure of the piping, I tried using a few regeneration potions from the local village to speed up the rate at which I recovered health. A normal or extended potion +Advanced altar mechanics.4=seemed fine, and were very effective for speeding up slate production. But a strengthened regeneration potion caused the altar to have a slight "Hum" about it, and I felt my energy being sapped by something. After talking with Magus about this, we have determined the altar senses the life flowing through us, and the potion makes the altars "Hunger" for this life create a sort of aura that causes you to lose energy akin to hunger. As a +Advanced altar mechanics.5=result of this, regeneration is still effective, but a sizable supply of food is needed for extended use to recover energy. +Sigil of the fast miner.1= I've decided to experiment with passive effects for sigils, since everything so far has been an active effect. While wondering through town looking for supplies, I noticed people cutting wood for a fire and some smashing stones to +Sigil of the fast miner.2=build a small fire pit. I keep coming back to how slow both of them were in my train of thought, then started going over ways to improve the tools. Then it hit me: Why improve the tools when you can improve the person? A few anatomy books and failed tests later, I hand the sigil of the Fast miner(Name pending) and two very tired arms. After activating the sigil, it speeds up muscle movements in the arms allowing you to break blocks +Sigil of the fast miner.3=far faster at a small LP cost every few seconds. I do need to keep reminding myself to turn it off when not in use, but the stinging pain of life essence being taken is always a quick reminder... +Soul Fray.1= Today I pushed myself too far. I've gotten close a few times, but today was the first time I have passed out due to draining too much life essence. Magus was thankfully with me at the time, and moved me to a bed to recover. As I regained my senses, I noticed something odd about my soul network thread: They were thin and looked damaged. As I kept watching my threads, it seemed like they were slowly reforming and repairing +Soul Fray.2=themselves. I mentioned this to Magus, and we theorized that after coming so close to death my soul was still recovering from the shock. I made a sacrifice at the altar to test this, and it seems that this state effects how much life essence a heart is worth quite negatively with it only giving a tenth the normal amount. +Green grove.1= Today Magus showed me his green grove ritual, a way to speed up crops. Unfortunately, it is very static and has a small range, limiting its uses. To amend this, I've been toying with the concepts behind the ritual in an attempt to make +Green grove.2=it more portable. By creating an ink from oak saplings and sugarcane, then inscribing a rune on a reinforced slate I have created the sigil of the green grove. It seems a little slower and more expensive then the ritual form, but it can be carried on your person and acts like bonemeal when used on plants. While I had it active I could barely keep up with our farm, and by the end we needed to give a few of our neighbors some of the excess +Green grove.3=we didn't need. They all accepted it, but with varied degrees of reluctance. +Dagger of sacrifice.1= My work on sigils has slowed for now as I'm reaching the limits of what my little green orb can do after only two weeks. As a result, I have turned my attentions to other aspects such as runes to pass the time. Magus is currently out +Dagger of sacrifice.2=dealing with a large forest fire to the east of us, and the village is in a bit of a lull with nothing planed for several weeks. Right now my task is to slaughter a few chickens Magus brought home from the market to prepare on his return home, and it seems the perfect time to test an idea I've been thinking about for a while... I will not mark it here, just in case it is another false hope. Success! I've managed to +Dagger of sacrifice.3=perfect my idea for a new source of life essence. Before the only option was to cut ourselves to give our own life essence to the altar, but now we have a way to use other living things as a source. Unfortunately, it is a little gruesome and a bit "All or nothing" from them... Regardless, it works! ...I have realized that, in my excitement, I may have forgotten to write down what it is. I call it "The Dagger of Sacrifice", formed in a +Dagger of sacrifice.4=blood altar out of an iron sword and 3K LP. The dagger doesn't deal much in the way of damage. It doesn't need to, as its main purpose is to "Mark" a living thing for the altar which takes care of the rest by forcibly extracting their life essence all at once. Through my tests it seems that your common farm animal's life isn't worth nearly as much as a person, only giving 250LP regardless of where it comes from. While I set about cleaning the +Dagger of sacrifice.5=animals after the tests were done, a common zombie managed to sneak in the door I left open when bringing the chickens down here. As soon as I noticed it, reflexes that were being drilled in by Magus every morning kicked in and I managed to poke it with my dagger before it had a chance to hurt me. At first I thought nothing happened, then it fell to the floor as lifeless as it should have already been. I glanced at the altar, quickly noting that +Dagger of sacrifice.6=a zombie was worth 500LP. Looking over the fallen creature as it started crumbling, I noticed that some of the defenses Magus had set up took there toll on the zombie as it was burned and freshly cut in several areas... Seems that the amount of HP they have is irreverent to the altar, giving the same amount of LP regardless. As I finished preparing the meat to cook after disposing of the zombies ash(Which +Dagger of sacrifice.7=reminds me, I wanted to look up why this happens...), a very dark thought crossed my mind. The knife works by giving life to the altar. The dagger works by taking life forcibly from a target. What would happen if a human was marked by the dagger? I asked this to Magus, after showing him the dagger and telling him everything that happened. "In all honestly, I'm not sure. I have a theory, but I don't really feel like testing it..." I asked him to +Dagger of sacrifice.8=elaborate, so he told me the basics of it. It seemed that source of the life essence mattered with the dagger, since the chicken and zombie gave two different amounts, so depending on the person in question they would be split into one of three groups: Passive, Hostile, and Innocent. The passive would be like the chicken, only giving a little. The hostile would be the bandits, the thieves, the murderers. The ones who gave into evil, and +Dagger of sacrifice.9=now seek to hurt or steal from anyone. The unredeemed, and would probably be like the zombie. The final group were the innocents, anyone who doesn't fall into the first two groups. It was nothing but a guess, but we agreed that using the dagger on an Innocent villager would extract all of their life essence like ours. 2K LP, all at once... We also couldn't work out what would divide the passive from the rest, but it was only a theory so +Dagger of sacrifice.10=we put it to rest. +Runes of Sacrifice.1= Looking at these little speed runes, I have decided to see what else can I make. My goal isn't anything in particular, just improving it in some way. The speed rune was made with powdered sugar, so another type of powder should work... +Runes of Sacrifice.2=Redstone failed, gunpowder failed, glowstone... Glowstone worked. I currently have no idea what it does, all I know is it didn't fall to bits seconds after creating it so that is progress. The altar seems to accept it as a proper rune, so all that is left is to run a few tests in the morning. For now, I am tired and feel a bed calling me... I've run dozens of tests trying to find out what this new rune does, after two +Runes of Sacrifice.3=days of obsessing over this I finally noticed it. It slightly increases the amount of LP self sacrifice gives. When I said slight, I mean one rune increases LP gained by ten percent on an additive rate. For those who don't understand that, it basically adds an additional twenty LP per self sacrifice. If my theory is right, I should be able to make a similar rune for normal sacrifice... What else would the altar respond to? +Runes of Sacrifice.3= Well, if there is anything thaumaturgy and magic in general has taught me, it is that gold is a very good metal for magic. By simply replacing the glowstone in the recipe with gold ingots, a sacrifice rune is formed. It has the same additional +Runes of Sacrifice.4=ten percent addition per rune per sacrifice, meaning the more LP of the mob sacrificed the more LP the runes adds. This has got me thinking... The altar was constructed with both diamond and gold. It seems to resonate with the diamond enough to make the first blood orb, and even a second, so why not try making one out of gold? I'll need to revisit this idea later as a test run showed some reaction to a block of +Runes of Sacrifice.5=solid gold(I didn't ask Magus where he got it, and he doesn't seem forthcoming about these matters), but the altar couldn't cope with the strain needed to shape the block. Before catastrophic failure happened, a few safety precautions Magus and I had built into the altar triggered, stopping the transmutation before... Well, neither of us are really sure what would happen. But Magus said he has dealt with matters of unstable and +Runes of Sacrifice.6=untested magic, and knew most of them end with a crater in the floor(Hence the safety precautions). It has been a few days since the experiment with the gold block. Magus and I have been discussing what to do now, as the altar is getting bigger then the basement. Magus has suggested moving it to some of the lower basement floors, but considering just how large it might be in the future... I finally got him to agree to +Runes of Sacrifice.7=building it behind his home, as long as I helped put up a few wards and spells to keep people away. Currently we're planning out the structure and needed runes for upgrading. The current altar only has eight runes, but what I have planned will more then triple that number to twenty eight. The current limitation we suffer is the strength of the altar itself, as it can only take power from runes adjacent to it. My plan is to use something the +Runes of Sacrifice.8=altar is naturally attuned to as a way to not only increase the range of this effect, but act as a counter balance and stabilizing it to prevent it from becoming uncontrollable. For this to work, the blocks in question must be above the altar and an equal distance apart. We've run several tests and calculations, and have a layout in mind for this upgrade. Four pillars topped with glowstone blocks, twenty runes in sections of five, +Runes of Sacrifice.9=built one block down and two out from the last set of runes. In theory this should provide a huge boost in power to the altar without risking our safety(Well, more then we normally risk it), but until we test full scale I can't be sure. For now, we have a lot of runes to make. After much debate we've decided to invest in the "Self sacrifice" runes, as having a steady supply of mobs will be tricky. But now I face the issue of making +Runes of Sacrifice.10=dozens of reinforced slates... I need to think on this. +The blood letters pack.1= It's so simple! I've discovered a way of obtaining LP for making slates that means I don't wait at the altar all day: The Blood letter's Backpack. Made with a modified leather chest-piece with a blank slate reinforced glass tank, it allows the wearer to gather LP by feeding it into the pack over time. Whenever the wearer has more then five hearts, the pack will drain their life and store it inside up to 10K LP to be +The blood letters pack.2=dumped into an altar later. This pack does have two shortcomings, however. When the life essence is deposited into the altar, runes will have no bonus to the amount added. The second problem is that the altar will only accept LP from the pack when not performing a transmutation. Despite these limitations, it will prove quite valuable for simply allowing me to step away from the altar to do other tasks. This is a simple progress +The blood letters pack.3=update, as it's been a few weeks since I last wrote in this journal. I've been making slow, but steady progress with assembling the slates needed for the runes and we're now halfway through. This isn't the only reason for the lack of entries, as I've been preoccupied with my research thorough thaumaturgy. An old friend of Magus has been visiting and happens to be a well versed thaumaturge, and he has been giving me pointers on how I +The blood letters pack.4=could be doing better while Magus has been preoccupied in his library dealing with a mountain of paperwork. Now that Master Ridden has returned home, I hope to progress farther in making runes in the next few days. +And then there was five.1= Or not, as it seems Fate has other far more interesting plans for us. Today we had a knock on our door while I was making the last of the runes, and after opening it was greeted by three apparent orphans. The two boys in the front looked like they were brothers, or at least close relatives. The girl hiding behind them on the other hand had a very different hair and eye color, so relation was unlikely at best. All of them were +And then there was five.2=covered in dirt, clothing ripped, torn, and patched with various levels of skill. The one on the left had an old sword with a chipped blade on his side, was slightly thinner and taller then the his brother, had a few deep scars that looked recent, long and messy dark brown hair, and was looking at me with a kind poker face. The brother looked more muscled, and was staring at me with a very analytical eyes and a similar poker +And then there was five.3=face, his hair was slightly shorter and lighter then his brother. From what I could see of the girl, she had a simple dress on that was almost caked in dirt and dried mud. The fabric near her elbows was becoming thread bare, and a large rip near the bottom of the dress exposed some of her right leg. Her hair was a light blond, almost pale white color, but the most shocking feature was her eyes... I haven't seen haunted eyes +And then there was five.4=like that in years, and last time it was in a mirror. From the looks of them, all of them hadn't ate anything in days and seemed to have everything they own on their bodies or in the simple packs on their backs. I asked them if there was anything they needed, to which the elder brother said they were looking for master Magus. I called Magus to the door, visitors being a rare thing as it stands with ones who ask for him by name and +And then there was five.5=not clearly mages being rarer still. Five minutes later we all sat in the main room, eating simple sandwiches I had prepared for us all at the request of Magus. Needless to say, this day was not going as expected. Magus spent the next few minutes practically interrogating the elder brother , asking questions on both of our minds. As it turns out the two brothers, Vlad and Demier, use to be caravan traders, eldest a +And then there was five.6=alchemist with basic knowledge of potion brewing, younger with enough mana and training already to cast basic spells. The girl on the other hand had a story all her own. From what the brothers had managed to gather, her village was raided like my own was and she was evidently the sole survivor. What shocked me was when they said she was found wandering the ashs, demons having left hours before without so much as a +And then there was five.7=scratch on her body. Vlad was with the traders when they found her, and he was forced to leave them if he wanted to help the girl named Bella. Their story seemed to win Magus over, as he told them he would try to do what he can for them.. Not long after that, Magus asked me to help him do some shopping for our new guests. On the way to the village, Magus asked me what I thought of the three. "I can't say I believe all their +And then there was five.8=story, but I also don't think their lying. Did you notice the girls eyes? Haven't see a look like that since...". Magus finished for me with "Your own?". I nodded at the dark memories of that time. We continued going over the details of their story, but we agreed that just leaving them in the cold wasn't an option worth considering. We decided to at least try to keep our recent endeavors into blood magic a secret from them, but when push comes to shove I +And then there was five.9=think we might have to let them in on the secret. Magus let out a long sigh. "It's been years since I had to juggle this many apprentices at once. I'm going to need your help training them. But something tell me that we're going to be learning as much from them as they will from us..." I asked him why he felt that way, and he said it was just a gut feeling. I must say I had a similar feeling. Things like this don't happen without reason, and of all +And then there was five.10=mages to come to they stopped at our door, something far easier said then done. An hour later we returned home, both our arms heavy with fabrics, food, and other necessities that we will need to take care of the new apprentices. I watched in amazement as the three ate, trying to make up for days with little food all at once. After that, Magus and I laid the three on various chairs and couches to rest, the +And then there was five.11=strain of travel catching up with them. While Magus dug around looking for a few of his old things that we'd soon need, I started creating some new clothing from enchanted fabric for the three to replace their current worn and ratty clothing. Now that that is done, I should try to get some sleep. Something is telling me tomorrow is going to be quite busy. The Early this morning Magus and I started carving out the earth for the three +And then there was five.12=new bedrooms, since the old ones Magus use to have had since been converted into a storage closet, a alchemy lab, and small study. It didn't take nearly as long as I expected with Magus using a few spells to clear away earth while I went behind using an equal trade foci to transmute it into stone brick before gravity caught on. Once that was done, Magus raised a few walls to separate the space into three rooms and a hallway. +And then there was five.13=Only after that was done did I notice the three children had awoken, and were watching us as we worked. Magus told them that he had some spare furniture in some storerooms they could use, but sadly only knew of one bed. It didn't take long for them to decide Bella got the bed, the brothers would make do with a pillow and a blanket on the floor. After that we spent the rest of the day hunting for then moving furniture to their +And then there was five.14=rooms, building little work areas and libraries for each of them. The following day was more of the same, with the evening filled with helping them find books to read from the grand library. Vlad grabbed as many alchemy books as possible, Demir took a few books on spell casting, and Bella took a Lexica botanica to read through. Later this evening, after the three had retired to their rooms, I sat in the main room with Magus, arms and legs +And then there was five.15=aching from the heavy lifting of the last two days. I told Magus how I thought their rooms should be almost finished, and how I spent the last hour before they retired just answering seemingly endless questions. "I'm sure. I've gone through the same more then once, when I have apprentices new to magic. You were the same, I recall." I opened my mouth to protest, but closed it as I thought back to those days. I decided I probably was as bad as +And then there was five.16=them, and left it at that. It's been just over a week, and the three have settled in nicely. They join Magus and I in morning exorcising, have started studying like true scholars, and have calmed the hungry nodes in their stomachs(Well, Vlad and Bella have. Demir on the other hand is another matter, but I feel he will always be like that.) Unfortunately, like true scholars and mages they've stumbled into places we didn't want them to go. Vlad has +And then there was five.17=created a chemistry set that uses life essence from a blood orb as a fuel source, Demir has turned an old table into a way to use life essence to cast powerful spells, and Bella... She's left me questioning what I know about demons, after taming one and using a blood orb to bind it to her. All three of them have stumbled blindly into blood magic, and now I don't think we'll be able to stop them. Magus and I have agreed to give them a choice +And then there was five.18=in whether they are blood mages or not, but I've seen the light in their eyes... I can't imagine any of them saying no. To seal their dedication to the art, we will have them make blood orbs of their own to use. +The next step: Tier three.1= Even with all the chaos of the last week I've managed to finish the altar construction, and it has been more successful then I predicted. With full access to twenty eight runes, each heart is now worth over seven +The next step: Tier three.2=hundred LP. I've already started prepping to try again with the gold block, having a few instant healing potions at hand. I got a brief glimpse with my sigil of sight, and this transmutation will take twenty five thousand LP to finish, over double what the altar can hold! Writing this down does give me an idea, however.... I'll need to look into it further once I have finished making this. +The next step: Tier three.2= It was close, but I finished the orb today. I was down to the last of my three potions and barely had the strength left to hold the knife, but I pulled through and finished my shiny new blood orb! I've already used it to craft a few things I had made before, +The next step: Tier three.3=and extra lava and air sigil, and it handles it all with such ease! Now that this is finished, I have a small list of ideas to go through... To start off the process, I want a stronger slate. As it stands the reinforced type is cracking under the strain I'm starting to place on it. Well, I got a new slate type when I last upgraded the altar... Let's see if it works again. It does! A reinforced slate in a tier three altar with around five thousand LP +The next step: Tier three.4=makes a new slate... I'll call it an imbued slate for now, and come up with a better name later. +New runes.1= First up to the drawing board: Rune of Capacity. The basic idea is simply to add more room to the altar, so a greater amount of LP can be stored at once to make bulk crafting or difficult crafts easier. Each rune adds 1K to the altar's main tank +New runes.2=capacity, but what is interesting is that the "Buffer" tanks expend as well to a lesser degree. From a few trial tests(My back is starting to hurt from moving runes all day), the buffer tanks are always ten percent of the main tanks size. This will be something to keep in mind later. After helping patch a hole in the wall caused by Demir accidentally unleashing a spell, then helping Vlad dispose of a few failed +New runes.3=alchemical "Experiments", I finally have an hour to myself to work on my ideas for runes. After the success of the last documented attempt, I've been on a bit of a failure streak. I've have runes fail to do anything, crumble to dust, blow up, and one attempt turned into cheese(I asked Magus about this, and said this isn't the first time he's seen that happen to a magical experiment. However he is just as stumped as I am over +New runes.4=why it is always cheese, of all things). Thankfully, I finally found something that doesn't need a blast shield to use or starts growing mold after a while. +New runes.4= Named the dislocation rune, it's only function is to increase the rate the life essence flows into and out of the buffers. Each rune increased the transfer rate by twenty percent per rune, and this effect stack manipulatively. That sounds +New runes.5=great, until you realize the first rune only raises the transfer rate by four LP a second. Needless to say, your going to need around a dozen of these runes before you have any noticeable impact on the transfer rate. While these runes make it possible to automate the creation of slates by storing the life essence outside the altar, you're going to be sacrificing speed, capacity, and generation efficiency for this. +Sigil of Magnetism.1= It's been a few weeks since I last made any headway with my blood magic research, needing to help with the tutoring of the Vlad, Demir and Bella along with my normal duties as a mage. I've had to leave twice this month in order to sort out some +Sigil of Magnetism.2=mess or another, whether is be a helping with a pack of wild wolves or a bad harvest. Today, however, I managed to get some inspiration for a new sigil. When I was in the market buy more food, I noticed two children playing with a rock that was slightly magnetic. They were just running around, seeing what it would stick too and cheering when it did, or seeing how close they could push it to something before it pulled itself closer... That +Sigil of Magnetism.3=is what sparked my idea: A sigil that acts as a magnet, pulling items off the ground closer to you. In theory I could rig the magic on it to apply a similar effect to all items and not just metallic ones... Three hours later, and my sigil is finished. It needs a great deal of mass in the form of four iron blocks, along with the classic gold plating infused into an imbued slate(Drat, I never did work on a better name). This +Sigil of Magnetism.4=sigil needs to be toggled to activate, and while active will draw all nearby items to the user if they have room for it. Simple, but very effective.... +The Phantom Bridge.1= I've been asked to visit a small town to settle a few complaints that have been voiced lately by them, and am currently surprised that a closer bridge isn't one of them. I've had to walk three miles to cross this river, and now must walk another +The Phantom Bridge.2=two tomorrow to reach them. If only I didn't need a bridge, or had thought to grab my air sigil(I still have a bruise from the last landing I had with it, so I wasn't keen on using it again so soon.) Wait... If if I had a bridge that went with me? Better yet, what if I had a bridge that formed under my feet as I walked? Yes, that would be amazing... I'm back home after dealing with a feud over who really owned a cow(Answer: Neither +The Phantom Bridge.3=of them, it wondered into town and they both thought it was one of their own), and have set out my work station to try and capitalize on my idea. I'd want the sigil to place blocks that are phantasmal, only there temporarily before fading into nothing after I leave. For that I'd need a special material... Soul sand might work... Add in a little stone for structuring around an imbued state, then use the orb... Done! Now then, for a +The Phantom Bridge.4=test run... Drat, I left the auto-writing quill running again. It works better then I hoped! The sigil creates a small five by five platform under me, staying at the same elevation as I walk through the air. Not only that, but I've tweaked it so that holding shift lowers the platform by one under you, and the blocks it makes can be easily broken for a quick decent. Not only that, but it will only spawn the blocks if +The Phantom Bridge.5=you are on the ground, jumping or flying will not cause the bridge to reform until you touch solid ground, unless you hold shift forcing it to form under you. And for one final convenience touch, right clicking a phantom block with a block replaces it with that block, making roofs and platforms far easier to build. That should be enough for one night, I'll dub this sigil "The Phantom Bridge" and call it a night. +Sigil of holding.1= Vlad asked me to help him today, requesting my assistance learning the sigils. Part way through he asked if it was ever burdensome having so many on me at once... And I told him it was. Now with a little of his help I've created the +Sigil of holding.2=sigil of holding, and it... Well, it holds other sigils. Shift right clicking with it while another sigil is in your inventory will cause it to absorb that sigil, taking all of it's powers and allowing you to swap between them with a shift right click. Unfortunately, it can't hold that many sigils(Only four) and not every sigil wants be become a part of it. Also, I had to ask Master Magus for help removing sigils from it as it refused to let them go. +Sigil of holding.3=For this task he created the ritual of unbinding, a rather grand looking ritual for such a simple task I must say. +Elemental affinity.1= Demir hurt himself again today with a fire spell that backfired(Well, it worked perfectly if setting the ground around him on fire was the intention). In hopes of stopping further injuries, I have infused the powers of the water, lava, and air sigil +Elemental affinity.2=into an imbued slate. This seems let the sigil act as protective aura around the user, shielding them from drowning, burning, or falling damage at a high over time LP cost. Since I asked Demir to use it he hasn't burned or bruised himself, but did pass out once from a lack of LP to fuel it. Sometimes solving one problem only makes more... But he has been learning, and I've been amazed at what his spells could do. Recently he made a +Elemental affinity.3=long range teleportation spell and a flight spell not unlike the air sigil, but far faster. +Recreating ritual stones.1= +Recreating ritual stones.1= +Recreating ritual stones.2=After a few days of nothing, I turned my attention to the construction of Master Magus's ritual stones. Looking them over, I might be able to replicate their usage and features using reinforced slates and obsidian... Master stone, more complicated then the average ritual stone might be possible if I use my magician's blood orb and four ritual stones to handle the complex nature of it, along with a little more obsidian... +Recreating ritual stones.3=Yes, yes it should be possible to recreate them without sacrificing any usage of them. After asking him how he originally made the elemental scribing tools, I believe I can also replicate the manufacturing of them in the blood altar... But it looks like the dusk inks are too complex for this altar to handle, creating an ink closer to dark gray then midnight black... Perhaps I'll have the power to form them later, for now these four will +Recreating ritual stones.4=work. +Shining a Blood Lamp.1= I had a flash of inspiration today (Quite literally, as watching a few town guards light a replacement torch nearly blinded me from the sudden light). They spend so much on coal and charcoal to fuel those things... What if I had a simple replacement? A +Shining a Blood Lamp.2=near invisible light source that never goes out, can be made almost endlessly, and can easily be carried on your person? Never again would you need to place a torch to light a room, and they can ruin a rooms look(Not to mention the fire hazard they pose, ruining the look even more. "Charred mess" is never in style.). Harnessing the power of glowstone by running a "Current" of LP through it, I can create a sigil that fires +Shining a Blood Lamp.3=a projectile that upon landing forms a stable light source par with that of torch. The only sign of its existence is the light it gives off and faint red particles. While it uses a small amount of LP, the advantage over carrying stacks of torches is enough to justify it. +Bound armor.1= Today Magus gave us a lecture on armors, going over the practical applications(Protection from large pointy sticks shoved in your direction and holding magic to improve the abilities of the wearer), typical construction of armor, and notable armors through the ages (And the very fatal flaws that their owners eventually discovered, much to their short lived dismay). Seeing and reading all this, I feel it is time I +Bound armor.2=take my own try at this art using blood magic. Testing a wide array of materials and structures, I discovered a process to make an almost indestructible metal using a casing filled with life essence with glass hardened with diamonds and reinforced with bright red blood shards(More on their properties later) Magus showed me a while back (Making the prototypes of this armor took longer then you would believe). The +Bound armor.3=process needs the soul of a demon bound to it, but this seems to be a small price to pay. +Bound armor.3= +Bound armor.3= +Bound armor.4=To start, you need to make a "Soul armor forge". This block summons the demon soul and controls the transformation of the "Socket" blocks into proper armor. By placing the filled socket blocks around the soul armor forge in roughly the shape of the armor piece you want with the forge in a gap, you set what it makes. Right clicking the forge will then finish the process, creating the armor piece and binding the demon to the +Bound armor.5=shards inside the armor. You will need to bind the armor to yourself, allowing the armor to drain your network to repair any damage it takes(Another benefit of using blood shards in the creation). After donning the armor(Making a few adjustments, still refining the creation process), I asked Magus to help test just how resistant this armor really is. Several nasty bruises later, we have decided this armor shields +Bound armor.6=the wearer from ninety percent of damage from mundane damage sources. What is interesting is that it also blocks roughly eighty percent of magical damage, meaning many armor piercing methods are far weaker. The metal also doesn't seem to hold enchantments, and the demons inside reacts quite negatively to our attempts to do so. Using the ritual of unbinding, we are able to deconstruct the armor back +Bound armor.7=into the component sockets and anything that was inside them. I mention this because we seem to be able to "Augment" the armor before creation by adding a combination of sigils, blood shard, and an orb. The sigil added to the armor piece(You can add anything to the socket by right clicking with the item in hand) determines the effect, and adds a passive cost to wearing the armor piece. The blood shard lets you add an upgrade, the +Bound armor.8=weak shards we have at our disposal only allow one upgrade but in theory a stronger shard should allow more to be added. Finally, the orb seems to lower the cost of the upgrade. Every sigil seems to have something to do with the normal effect of the sigil, either giving you a passive bonus or having the effect of the sigil happen automatically around you. A few examples are a water sigil making you immune to drowning, the fast miner +Bound armor.9=always active, and a green grove sigil acts around you. +Sanguine armor.1= I've managed to use my new found knowledge of armors and experience making bound armor to try and improve thaumium armor using blood magic. By throwing goggles of reviling or thumium chestplate, leggings, or boots the ritual transform the +Sanguine armor.2=armor into a "Sanguine" version, with a small vis discount and protection par that of pure diamond. What is really interesting is that this armor can be augmented with runic shielding, and then socketed into bound armor in the same fashion as a sigil to pass on the runic shielding, with the bonus that adding the sanguine helm to the bound helm well allow the wearer to see things like aura nodes as if you had goggles on. I should note +Sanguine armor.3=that you can only socket a sanguine armor piece into a same armor type(Helm in the helm, boots in the boots...), and that any vis discount is lost when you do this. +Suppressing the soul.1= Having the armors special effects all the time has become a little bothersome. To deal with this I have managed to create an "Armor Inhibitor" to repress the special effects it offers in the cases they are more bothersome then helpful. +Suppressing the soul.2=Unfortunately, it is a bit all or nothing in this regard. +The ritual diviner.1= It's coming up to the three year anniversary of Magus taking my on as an apprentice. Time seems to have flown by while I've been engrossed in research on applications of blood magic and working with Magus... I should make a gift for Magus +The ritual diviner.2=to as a thank you for these last few years. Considering the complex nature of his rituals, an aid to building them might just be the perfect gift... Ugh... Making a way to build rituals easier proved to be quite the task(And it reminds me of the rule of conservation of effort...), but I finally have it ready in time for the anniversary. While it isn't cheap to craft(Costing the four elemental inks, four diamonds +The ritual diviner.3=and an emerald), I've gone to pains to make it easy to use. Shift right clicking will cycle through a preset list of rituals, and shift right clicking on a block with also rotate the direction the ritual will face(For anything like the ritual of speed, where that matters). Shift left clicking will go through this list in reverse, for those times you accidentally go past the one you want. By normal right clicking on a master ritual stone the +The ritual diviner.4=diviner will take stones out of your inventory, place then in the world and ink them to build the set ritual. To make it clear it is working, it emits green particle effects whenever it places a block successfully. However, it can only place a block in an empty space. Anything at all in the way will stop the process until the obstruction has been removed. It is a small annoyance, but nothing major enough to risk breaking the diviner(Again). +The ritual diviner.5=Magus adores his gift, having rituals faster and easier to build is the one thing he could actually use(That he doesn't already have). The fact it makes anyone who uses rituals lives easier is a just a bonus at this point. As it turns out, he got me a gift as well: A pair of ichorium wand caps, the one thing I had been dreaming about for a long time... +Blood shards.1= Reading through my older entries for inspiration on things to do with our current power(I believe we have started reaching the limit, struggling to stretch what we have as far as it will go) I noticed that I "Might" have forgotten about covering the +Blood shards.2=blood shards like I said I would a few months ago... I'd best start from the top. Blood shards, as Magus has likely stated already, are fragments left behind after vanquishing a hostile mob with a demonic weapon(The Bound sword or Energy Blaster). Upon close inspection, I see small strands that looks shockingly like that of our soul networks... Well, in theory anything with a "Soul" could have a network, but this is a +Blood shards.3=surprise nonetheless. Because of this, the small shards contain a vast pool of energy that our magics should be able to tap into. A rather unfortunate first experiment involving stone showed that this energy can be wielded to create or transform matter(I believe several others have come across similar principles to convert energy into matter using science). I say unfortunate because I was stuck inside the lab's supply +Blood shards.4=closet for a few hours to hide from the rapidly expanding stone as the released energy of the shard grew the stone to thirty two times it's former size, filling the rooms and pushing out the open door and into the hallway. (Further crafting of blood stone was done outside after that...) But regardless, the blood shards potential energy and connection to the soul network is how we manged to form bound armor so easily. +Blood shards.5=Thinking about it... Blood shards might be the answer to our power problems. The last time we needed an upgrade, we used something related to the altar... Perhaps using something related to the soul network is the next step? +The life of a Mage.1= Once more I must make a progress update, as daily life as taken up most of my time these last few weeks. Magus has started offloading some of his work onto us, dealing with small problems and formal matters, bandits and demons, and general mage work. I have been able to do a little work on the altar or blood magic in general over the last few months because of this. Thankfully, we've burned though most of the grunt work that has piled up +The life of a Mage.2=and I now have some time to conduct our research. Magus and I have spent the last week doing the calculations for upgrading the altar, determining that bloodstone should work for the capstone, and now it is just a matter of seeing how many runes we can get away with adding without nasty side effects or it all just blowing up(The other three have placed bets on this, I believe). +The life of a Mage.2= After another few weeks of testing, balancing, and error we have finished the altar upgrade. This new tier adds twenty eight more runes to the altar's structure(Seven on each side, for a grand total of fifty six), and four pillars +The life of a Mage.3=capped with large bloodstone brick(This was the best material we could find that doesn't expire or fall apart. Or, in one memorable case, actively try to kill us). With these additional runes we are projected to be making roughly one thousand three hundred LP for every heart sacrificed, a hefty improvement from our seven hundred from before. Unfortunately more work has come in for us, so once we have the altar built it will +The life of a Mage.4=be some time before we can focus on the hunt for the material for the orb. Current plan is to start with precious materials like before, and work from there. Ah, innovation... Ten percent work, fifteen percent knowledge, five percent patience, seventy percent trying random things to see what happens. More work then expected flooded in at once, and we have been struggling to keep up with it all. Vlad has been +The life of a Mage.5=acting as a healer and doctor trying to deal with a plague that has going around (Caused by a witch-in-training using the wrong vial in a love potion), and has managed to keep it from running wild. Demir has been clearing out known bandit camps, and has enjoyed a chance to test out the spells we've helped him build(Only in the mage guild are bandits considered an endangered species. This is in part due to the average +The life of a Mage.6=intelligence level of said bandits, and thinking that an area where there are people who, sometimes quite literally, shoot fire out of their hands, mouths, and other places(Mostly the apprentice mages, as a joke or party trick that has often gone very wrong) is a great place to set up shop.). Bella meanwhile has been dealing with the demons that have been wondering in, the mage guild acting as a sort of beacon to them due to the +The life of a Mage.7=thinness of the fabric of space here caused by countless magical experiments, both successful and not. Magus and I have been going through a huge pile of letters(Seriously, where are they all coming from, and how do I not notice the pile building up until it flows off the table?) from local villages and mages, ranging from simple questions about an issue or problem to requests for assistance in matters ranging from theft to +The life of a Mage.8=flooding. We've been coordinating these issues, mapping out journeys to deal with as many as possible on one trip. As a reference point for how long it has taken us to deal with it all, dust has gathered on this book since the last time I wrote. Thankfully we've sorted out the letters and referenced the villagers to mages who are closer to them(Much to said mages chagrin), so it should be a while until this +The life of a Mage.9=is an issue again... Thankfully all this time has left me with a few ideas for future projects. +The masters of T4 altars.1= The others have tried countless gems and metals trying to create a new blood orb, all of them either did nothing or created a flawed orb(Cracked or chipped, extremely fragile or incomplete). But last night I had an idea from a dream... +The masters of T4 altars.2=The weak blood shards were once part of a soul network, so what would happen if we tried to reforge it into a whole orb? It is better then any other idea we've had, so I might as well try... Success! While we did burn through several instant health flasks, we now have half a dozen new blood orbs. While we haven't named them yet, they are a true master piece... A Master blood orb, that name has a nice ring to it... I'm getting side tracked +The masters of T4 altars.3=again, but I must remember to suggest this name to the others(It at least is better then the temporary name of "Shiny yellow blood orb"). With this new found power, I might be able to bring to life some of the ideas that have been just out of reach up to this point. The first interesting property of these new orbs has been shown in our bound armor. While lesser orbs simply lower the cost, this orb is able to negate it +The masters of T4 altars.4=entirely! A simple upgrade, but a very useful one... Another altar tier, another slate tier. Dubbed "Demonic" after the insignia that has formed on it's surface, we should be able to put this to some good use... I've also noticed that a demonic slate can be used with a weak blood shard and master orb to "Grow" the shard making four more. Going over my earlier successful experiments, I might be able to tweak a few +The masters of T4 altars.5=concepts used to achieve a new result. I'm starting with the fast miner, and if boosting my arms was this useful then what would happen if I augment my legs? Using cookies, sugar, and some of the normal materials I have created a new sigil. Time for a test run... Two hours(And two very sore legs) later, I've concluded the tests. The "Sigil of Haste" boosts the users leg muscles, allowing you to both run faster and jump higher then +The masters of T4 altars.6=normal. The best part? It seems to stack with the effect of jump boost and speed(Which Vlad was kind enough to brew a potion for testing). Now then, I need a rest after all this... +The sigil of whirlwinds.1= Continuing with my thought process of "Reworking the old", I have used a master orb, demonic slate, two ghast tears, and feathers to reform an air sigil. The "Whirlwind sigil" changes the core property of the air sigil to have the winds not effect the +The sigil of whirlwinds.2=user by propelling them, but instead creates a bubble of wind around them pushing away many forms of projectiles. I should note that not all forms of projectiles can be pushed back by the winds, and it has a tendency to effect your own shots. It isn't perfect, but it is useful enough to have around in a pinch. +The sigil of compression.1= After hearing the local miners complain about always having to stop work because they've run out of space in their packs, I've built "The Sigil of "Compression". While active, the sigil will check your inventory for anything that can be compressed into +The sigil of compression.2=a "Storage" block(A two by two or three by three recipe of that item that can then be crafted back into the item. An example is redstone into redstone block.) and squeezes it together for you. Simple, but extremely effective... I should note I added a few special cases to the sigil, such as glowstone dust to glowstone and a restriction to only compress cobblestone if you have more then a stack. +The Ender severance.1= Bloody endermen... Magus sent me out to try and stock up on ender pearls, but the pests keep warping away from me only to pop up later(And almost always when I don't want them too). It is just after dawn, and I've only managed to bring back six pearls... But maybe that is enough. I recall seeing some research notes on endermen and how they are able to teleport somewhere in the library. It is only an idea, but it might be perfect for +The Ender severance.2=this task... Eureka! After reading through the notes, I worked out how endermen connect to The End as a power source for their teleportation. Using a few ender pearls and eyes of ender, I've completed a sigil that acts as a sort of "Signal blocker". In layman's terms, it disrupts the connection to The End and renders them incapable of any teleportation. Not only that, but it also prevents many forms of magic that +The Ender severance.3=relay in similar methods, such as Demir's spells and the barbaric(But nevertheless effective) act of throwing an ender pearl. From the light, I'd say it is almost sunset. Time for some well deserved payback... +The Teleposer.1= After my research into the basics of teleportation, a thought struck me: As it stands we don't have an established transportation network for mages to use, instead using the long and winding roads or other means of land travel. Sure, a witch might have a few way stones or a broom and a spell caster has a convenient recall spell, but we don't have a dedicated transportation system. Considering how much Magus +The Teleposer.2=and I travel to deal with small matters, and how often mages visit each other it is a surprise no-one has built something like this sooner! After talking with Magus about this, it turns out something like this has been tried before. The main failing point each time was the limited number of people able to use the method established. (A thaumaturge rarely knows how a waystone works and so on.) This has prompted me to create a +The Teleposer.3=means of teleportation that, once properly set up, almost anyone can use if they know how to push a button. Further research into ender pearls is required... After close analysis, I've decided that my first priority should be the improvement of the base ender pearl. As it stands, they are a little too fragile and random for reliable long term transportation. By placing a pearl inside a T4 altar I have been able to +The Teleposer.4=refine it into a focus, stronger and more predictable then the base pearl. I am currently in the middle of creating a mechanism to hold and operate the more complicated bits of the process. My materials for this is mainly gold(A metal that hasn't shown any side effects to the ender energies used), two ender pearls(One input, one output), and the focus itself to handle the conversion. I've managed to finish +The Teleposer.5=building two of the "Transportation of matter across two relative positions devices", or teleposers for short. How they work is simple(-ish): To perform a teleport you need two teleporsers. Next, bind a teleposistion focus to one of them by right clicking on the teleposer, bind it to yourself by right clicking on anything else, then slot it into the second teleposer and apply a redstone signal. If the focus is bound to teleposer A and +The Teleposer.6=placed in B, then teleposer B is triggered with redstone, everything above A will move to B, and everything above B will move to A(I hope this is clear enough description, it is hard to put into word the process. If you try it yourself, it should be clearer.). This means that if you want a two way transport, you can have two foci(One in each teleposer) and trigger the one you stand on, one have one focus and always trigger the same teleposer. +The Teleposer.7=In theory, we could build a "Transport Nexus" by having an array of teleposers bound to the same one(One A, multiple B's, triggering the B's to do the transport). What is great about these teleposers is that they don't just transport people, but any mobs or blocks in range as well. It even functions on complex blocks like furnaces and chests! With a little redstone logic, amazing things should be possible with this simple(-ish) system! +The Teleposer.8=With the completion of the final prototype, I should get some sleep... A new day, a new idea! The basic teleposition focus only transports a one meter cubed area above it, but if I improve the focus a bit in the altar it will be able to handle a three meter area! Not only that, but it can be further boosted by adding a weak blood shard so it works in a five meter area, then these new demonic shards that Bella has been gathering +The Teleposer.9=for a final upgrade to seven by seven by seven area. I should mention that the cost of each transport is based on how much is moved, and how far it is moved. It also has the quirk of being unable to transport people or mobs across dimentions. +Sigil of suppression.1= After a recent flood where Magus built a ritual right in the middle of the village to save a huge chunk of it, I've decided to try and replicate the effect on a smaller, and much more portable, scale. Thus, I've made the first version of the "Sigil of Suppression". What it does, in layman terms(You don't wont me to get into the back end details involving temporary storage in a pocket dimension) is create a bubble around you that removes any +Sigil of suppression.2=liquids, replacing it all as you leave. Using this sigil, I was able to take a leisurely stroll under the nearby lake. I am glad I remembered to bring my elemental affinity sigil however, as the early prototype fail on the way back, so I had a very soggy trip home... I "Think" I found the cause of the issue, and have patched it. +Superior capacity rune.1= Taking a break from the sigils I've been making over the last few months(How time flies...), I have shifted my attention to improving the runes we have available for our altar. After going over the design of the capacity rune, I have found room for "improvement". I have that in quotation marks because it only becomes greater then normal capacity runes if you have more then fourteen of them. You see, the "Rune of superior capacity" adds ten +Superior capacity rune.2=percent to the altars capacity, and this effect stacks multiplicatively(Layman terms: The more of the rune you have, the stronger the next rune will be) instead of the normal capacity runes static rate. Powerful, if a niche rune. +The rune of the orb.1= Considering the amount of LP we burn through on a daily basis running our sigils, powering our spells, fueling the rituals, and feeding our tools and armor, it is a miracle we don't run out of LP more often then we do. Even with our soul network topped off with a master orb, we're tapped dry within a week. Just upgrading our orbs has served us so far, but that has shown to be too unreliable and a huge investment with the altar... +The rune of the orb.2=Wait, we're always using our orbs to make runes to improve the altar, so why can't we make runes that let the altar improve the orb? It can't be a one way road, can it? Yes, if we tweak this here and shift pressure here... I'm rambling again, I must talk with the others about this! Yes, it works! By focusing the power of three blood orbs and using two demonic slates, we've created "The Rune of the Orb". This boost +The rune of the orb.3=the altars ability to feed an orb(Think of it like pressurizing air, more of it in the same amount of space), letting it add an additional two percent per rune(Additive rate, so more runes won't change how much it adds). With our master orbs, one rune is an additional twenty thousand LP. While that doesn't sound like much(To think, I use to be limited to only five thousand...), consider the number of orb runes one altar can have... +A field trip.1= After hearing the demands of the younger apprentices, we are leaving tomorrow for a quick tour of the magelands, and expect to be back by the end of this month. Talking with Magus, I agree that we've been pushing ourselves hard lately with work and research. A little rest during a vacation might be just the thing I need to gather ideas for future projects... It will also give me a chance to talk with other mages about setting up +A field trip.2=a teleposer network. It is a vacation, so a little work on side projects you normally don't have time for is normal right? Talking with Magus during the long hours on the road, a few details about the mage guild were covered on this horseback lecture. Largest of the "Nations", most of the tech focused nations won't touch this area due to the high levels of magic in the land, air, and water causing technology to become a bit +A field trip.3=more unpredictable(Read: Unstable and often highly explosive), and have instead left it in control of the mages. As a result of this, thousands of kilometers of land filled with river valleys, harsh deserts, frost and snow covered forests, fertile plains and countless other biomes have been untouched for us to expand into. To this day there are people who venture out into these untamed lands hunting fame and fortune clawing +A field trip.4=over mountains and through the ancient ruins that litter the area. However, the vast majority of settlements are close to the borders with the other nations, thriving off trade(Their gadgets might not function here, but the results are another mater. Most of the mining towns send out the harvested ores across the borders for processing). The last tally was done roughly five years ago, with the number of total +A field trip.5=settlements at around three hundred scattered thin across the mage guild. Of this, we have roughly seventy active mages and thirty classified as "Apprentices" to manage village needs and deal with problems as they arise. Generally one mage would managed half a dozen of the closest villages and any apprentices they take on comes from this area however, it was not uncommon for mages to offload work onto other local mages if +A field trip.6=they have not the time or expertise in the field and for them to take on students who seek them out as tutor. That's enough for tonight, my watch is almost over and I feel sleep calling me. I'll write down any more interesting details I learn tomorrow. Magus said we should reach another village tomorrow, and he knows an inn there that should take us in for the night(Just in time as well, I don't trust those clouds on +A field trip.7=the horizon). Today's trip was more of the same, ridding through a dense oak forest while Magus went over anything and everything about the area around us and the Mage guild in general. Mages seems to have a list of unwritten rules governing how to act, what to do, what to say... For example, it is recommend to live at least a mile and a half from the closest village. Far enough away that people won't bother you with trivial things and +A field trip.8=you keep a mysterious reputation with the people, but close enough to be convenient for buying what you need. Another example pertains to marriage: A mage is free to wed whoever they like(Even other mages), but the spouse is entitled to most decisions and any compromises favor the spouse. Being wed to a mage often causes problems for the spouse, often with relatives and friends, and is typically a huge adjustment. +A field trip.9=Doing anything to try and make it up to them is common, as the mage feels themselves a burden and cause for their loved one's strife. From what I've gathered and how Magus speaks about the topic, these are more general outcomes and human reaction to the same events that Magus has seen happen time and again instead of rules or traditions passed down from master to student. One final interesting fact is that most mages send their children to +A field trip.10=learn the art(If the child so chooses to take on magic, and the have the talent for it) with another mage, preferably one they have rarely or never met as to prevent any bias and favor. I was right about those clouds, and we have reached the small town of Salis soaked to the bone. We're all currently sitting by a fire in the Mundes inn letting our robes dry and bodies warm from the chilling rain(From the clinking outside, now +A field trip.11=hail). I plan on acquiring another books tomorrow, and writing any more facts I learn from this trip with Magus in it instead of spending the pages of this book(Already longer then I ever dreamed it would be). According to Magus, we should be able to meet another mage in two days time, a woman by the name of Athis who is skilled in botany and herbs(Any medicine made by her always trades for a fair few coins). +A field trip.12=On another note, what Magus said about about people being wary of mages is holding true. The common room has been divided into two parts since we got here: The side where we are, and everyone else who have gone a table or two away from us and keep glancing at us as if to make sure we don't do anything without giving them a chance to run. The owners of the inn, a small family known as the Eldritches, seem to be the only ones who don't +A field trip.13=seem to mind us. Their daughter, or at least someone the right age and look to be their daughter, happily walks up to us asking if we needed anything other then rooms while we rested. Vlad and Demir order food for us all, Magus inquired to the drinks available, while I have asked if she knew if the general store had any writing journals for sale. And now I'm at the point of writing things as they happen... I needs some sleep in a nice bed +A field trip.14=after all this riding(But it looks like Demir is more saddle sore then I am), and the inn keepers have giving us cheap logging in the attic with a few decent, if old mattresses in a warm room with a roof over our heads. We left the next morning after a short trip to the market(Where I managed to get a good deal on a fairly nice journal, and have already filled out a few pages on my watch last night), and now are almost at Athis's +A field trip.15=residence. We currently are taking a short rest to eat and have the horses cool off after a long trip before riding the last leg of the journey after dusk has set. I'll detail anything interesting that happens. Talking with Athis, who I have already detailed in the other book along with most of our conversation, I managed to steer the conversation to how often she needs to travel for herbs, and if she has ever been in a situation +A field trip.16=where she can't get access to anything she needs but another mage might have an abundance of. As a response, she handed me a list of everything she buys when ever possible because of how rare it is here and the versatility or uses of it. The list was ten centimeters thick. Seeing a chance to get another mage's opinion, I mentioned a recent discovery in the field of magical transportation see might be interested in seeing. At this +A field trip.17=point, she gave me a wary eye and said she still has a bag of purple chalk and a stack of waystones from the last person who said that. Inviting her outside for a demonstration using a few of the teleposers I had packed, I showed step by step the process and how simple it was to use.(It took her a moment to recover from the initial shock of teleporting, but now she takes it in her stride.) Going over a few more details inside with hot +A field trip.18=tea, I asked if she would be interested in us setting up a link in the area nearby for her to use as a means of transport. Frankly, I was nerves enough at this point that I thought see would just laugh at my new goal. Instead, she was almost begging me to set a few up around a few locations several hundred kilometers apart. At this point I felt comfortable to tell her about my grand plan for setting up one of these near every mage +A field trip.19=in the guild and at some important points, so the days of needing to travel day and night to reach another mage would be over. Not only was she on board with the idea, she even offered to help us set them up if it meant that it would be ready faster! We spent the next few hours talking about this late into the night, covering little details and about enlisting the help of other mages to set it up. +The key of binding.1= Well, this has been an interesting trip... We've been visiting every mage we pass, talking and showing off the boons of our blood magic. Most of them have been extremely accepting of our arts, and the ones that haven't been at least aren't opposed enough to get violent about the subject(However, all of them are still welcome to the idea of a transport network). We have noticed one problem on our trip, however: We can't +The key of binding.2=easily give people the things we've been working on, as they need LP to run it and it takes time to reach a point of being able to support the usage of them. We've gotten around this somewhat by binding the items we gave them to ourselves, but anything they make once we've left will be near worthless to them... THAT'S IT! I could make a device that mimics the binding of an item, copying a thread of our soul network to another device, so anyone +The key of binding.3=can craft something new and have us power it. I can use a weak blood shard to hold the soul network thread that it uses to pass on the link... Yes, I should be able to make this easily. I really should have slept after getting home, instead of going straight to building something... It took me three hours to think of using gold for the "Key of Binding". Regardless, it has been finished. All you need to do is right click with it to set +The key of binding.4=the original owner, then hand it off to the person you wish to use it. Then they right click with it, and it will bind the first thing it finds in their inventory without an owner to the person the key belongs to. While it's uses are limited, it is something you want to have around in case you ever need it. +The trials of a T5 altar.1= In other news, we've started talking about what we do now that we've started reaching the limit of our power once again. I've calculated the number of runes we would need, and have in fact already crafted all fifty two of them. We even have a few guesses on what to use for a blood orb, starting with these demonic blood shards... The problem now is the stabilizers we need. There is only one thing I've found that can handle the strain of the +The trials of a T5 altar.2=altar: The raw power of beacons. We need four bloody beacons. One is near impossible, four is... We need a miracle to get any farther. Magus says he has some plan, but I think even he is going to struggle with this. Talking with the others, I believe I should focus on setting up "The Nexus" instead of struggling with the limits of our master orbs. This is going to be a project that will take months... I've decided to limit the usage of +The trials of a T5 altar.3=the Nexus to mages, as public usage would tax my network night and day. I start tomorrow on this task, and plan on cleaning out some ruins about a kilometer to the east of us to set up the Nexus base. I already have a few dozen teleposition foci crafted, and enough teleposers to set up over a dozen locations. First on my list, Athis... I'll leave this book here, and will document anything that happens in my other book. Once I start +The trials of a T5 altar.4=research in blood magic, I will write in here again. +The price of power.1= Magus... Magus has gotten us a reservation to kill Withers. Not only that, but we each must kill one on our own. I said I wouldn't write in here again until research started again, but I felt this is significant enough to mention... We are so close to being able to upgrade the altar. If we live through this trial, that is. I have written the details of the last few days in my other book(It has gotten far more use then I ever +The price of power.2=expected), but we have them. Enough nether stars to finish our altar, enough to experiment with, enough to make being stuck in bed with this broken leg worth it all. I have been hard at work since my leg healed, ideas gushing out of me to the point I have almost stopped eating and sleeping(Thankfully, one of the others tend to drag me out occasionally). Time to document the fruits of my labor. +Demonic orb.1= Our assumption about demon blood shards was right, and after a long crafting process we have the Archmage orb. We had to spend several hours trying to fill this orb, and finally hit the cap at ten million LP, ten times the size of the master orb... We also have graduated up to the slate dubbed "Ethereal". I know this isn't much fan fair, but this has become a bit of an expected event. +The unspeakable power of the energy bazooka.1= First thing I created with this new orb was an improvement to the energy blaster, as I felt it just wasn't strong enough during the fight with the wither. Harnessing the power of a few reagents and a demonic blood shard, I have created the "Energy Bazooka"(Not a clue what a bazooka is, but Demir tells me they shoot big explosions). Costing twenty thousand LP a shot, it launches one main projectile that upon hitting something +The unspeakable power of the energy bazooka.2=explodes into twenty more smaller explosive projectiles to devastate other living things around it. I have tried tweaking it so that terrain isn't harmed, but there may be minor damage depending on what is hit. There is a "Slight" problem of recoil, but nothing we can't live with. +Acceleration runes.1= Moving my attention on to runes for our wonderful new altar, I had revelation as I noticed a speed rune next to a dislocation rune: Increasing how much LP is moved from the buffer is fine, but how about increasing how often it transfers LP? Using a few materials like buckets and an ethereal slate, I have transformed a normal speed rune into something far greater. Instead of effecting crafting speed, one rune will +Acceleration runes.2=lower the delay the altar has on moving the contents of the buffer by a twentieth of a second per rune. I have noticed a strange limitation, however: Any runes beyond nineteen seem to have so little effect it isn't noticeable anymore, so you can only have the altar transfer nineteen times a second. I will need to run some experimentation on the best ratios of acceleration to dislocation runes... +The Harvest goddess.1= Bella has dragged me with her to town so she can be sure I'm out of the lab for a while(I have noticed I'm a little pale, but I just assumed that was from all the sacrifices I've been making lately). As we ate two sandwiches at a bench on the edge of the village, I watched the farmers in the field slaving over the harvest while trying to outrun the storm just visible in the distance. Talking with Bella about ways to help +The Harvest goddess.2=them, I created the basic idea for the sigil now known as the "Harvest Goddess". It is to the "Reap of the Harvest Moon" what the "Sigil of the Green grove" is to the ritual of the green grove, performing a similar effect to the harvest moon around the user by summoning a little demonic imp(You can thank Bella for this part). As soon as we had a version ready, Bella ran out into the field with a green grove, haste, and magnetism sigil to +The Harvest goddess.3=quickly run through the field collecting the harvest behind her. Needless to say, the few farmers in the field were awe struck by this sight and a few of the newer ones thought she was a goddess sent to answer their prayers(And I liked the sound of it, so we now have a name for the sigil). +Solving a demon problem.1= A mage can never get a good rest without something happening... Magus has finally launched an operation to deal with the demon portal, and has asked Vlad, Demir, and myself to lead the siege team. He has cooked up some complicated plan that only he knows all the details, and in fact might be the only one who even has any idea if it might work(Quite a few of us felt lost when he gave the basic overview of the plan). One question asked at the +Solving a demon problem.2=meeting that felt quite memorable was "Wait, how are you able to replicate this portal?" Magus only smiled and asked him "At what point does science stop being science and starts being magic? It is the same principles and theories at work, just a different means of execution." For Magus, that seemed to answer everything. Gah, I need to focus on packing for the trip as we won't be back for a few weeks. I feel like I heading +Solving a demon problem.3=out for war, and I guess in a way we are... Alright, I did not expect to find a camp of demons when we warped to Venric's folly. I expected a hole in the fabric of space, I expected a few demons, but a little village... Not to mention the fact that I had to save a fairly inexperienced thaumaturge who hasn't dealt with demons before. He rushed in, thinking he would show off a bit. To his credit, he did manage to kill a few demons +Solving a demon problem.4=before the hoard took him down. I had to run in with a teleposer to save him, but we did discover something important: From the vanishing remains of the demons, I retreated two crystals. One was a shiny red we have named a "Life shard". The other a brilliant blue we have dubbed a "Soul shard". What is odd is that my bound armor seemed to react when I touched them, and I saw a few stray strands of soul strands between the demons +Solving a demon problem.5=and these shards. But that isn't what was really odd. I was spotted by one of the demons when I went to save the fool, and noticed two things very quickly: The demon had a connection to the portal with a few soul stands. The second thing was that it seemed to be... Vibrating? Closest word that comes to mind when I think of it. Shortly after that, two things happened: The demons started running towards us from every part of the +Solving a demon problem.6=village, and for a few hours after we left the camp seemed to be under a lockdown. The demons had doned armor, and were patrolling the area instead of building. These guards seemed a little stronger then the others, but tomarrow I plan on mounting an operation to collect more of these shards for research... +The T6 altar already.1= From what we have learned so far, these crystals seem to be ordinary crystals(Well, ordinary as anything from Tartarious can be here) filled with demonic aura and... changed by the travel through the portal. These demons have been using them as a sort of personal anchor, an extension of the main portal's influence. I have discovered that mixing these crystals together in a five to four ratio of life to soul shards forms a purple +The T6 altar already.2=block that is practically pulsating with demonic power. Since we may be here a while, I have started construction of a prototype blood altar that utilizes these new blocks for enough stability for a T6 to be possible. I have yet to try this, but if it works... Once again, a theory proved to work out. With the addition of four pillars capped in these crystal clusters, we are able to support another seventy six runes, nineteen +on each side of the altar. I have also tried the clusters out for making a blood orb, and the "Transcendent orb" was the result with a cap of thirty million LP. Sadly, I haven't had a chance to experament with this new altar or orb, so I haven't anything else to share yet. diff --git a/src/main/resources/assets/alchemicalwizardryBooks/books/book.txt b/src/main/resources/assets/alchemicalwizardryBooks/books/book.txt new file mode 100644 index 00000000..caeadc87 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardryBooks/books/book.txt @@ -0,0 +1,370 @@ +//TITLE A classic tragic backstory +My name is Tiberius. I was a kid when the demons came for my village during The Wars. They ransacked the houses and turned the shacks into splinters, wielding fire and water to blast the land asunder. I woke up to some travelling merchants that were passing by, equipping the warriors who were futily trying to drive off the demons that still clawed the village. +I was brought to a village nearby, where a magician named Magus helped tend to my wounds. The magic that he used was something that I had never seen before � it wasn�t Thaumaturgy, nor Alchemy, and it was definitely not Botany. He winked at me once he saw that my eyes were open, holding his finger to his lips. + +Fast-forward several years, and I have learned almost everything from Master Magus, being his third student ever to master his arts. Against his wishes, I have recorded my research and put several wards and spells on this book. So welcome, apprentice. I am known as The Architect, and I am a Blood Mage. + +It took several years of pestering before I managed to convince Magus to teach me. He kept on telling me that, �Magic that uses the life essence of living beings requires patience and preparation in order to master it. One false move, go a little past your natural endurance, and you may find yourself taking a nice vacation in Tartarus.� The thing was, I wanted to go there � I had some unfinished business with the demons. + +The process that Magus originally constructed required powerful artifacts that he constructed himself, but were rather lacking where teaching was concerned. After studying a bit of alchemy and the process of �Equivalent Exchange,� I managed to construct myself an altar that would transmute items inside of its basin into new powerful forms. The only issue was that it needed a worthy catalyst, and so with a prick of the finger I set the Blood Altar alight! + +//TITLE The Blood Altar +//ITEM AWWayofTime:Altar +//ITEM AWWayofTime:sacrificialKnife +To start any form of transmutation involving blood, you would need to construct a blood altar and a sacrificial knife, as well as have a solitary diamond in your possession. After placing the blood altar down, Magus advised me to be careful as I filled it slowly with my blood, and said that I would need to be really close to the altar (about a metre) for the knife to work. With about 2 buckets of blood in the altar, which Master Magus reminds me is about 10 hearts worth, I placed the diamond inside of the altar by activating it with the diamond in hand. + +//ITEM AWWayofTime:weakBloodOrb +The blood dissipated in a cloud of red swirls as I waited for the atoms of the diamond to shift and reform. There were a few moments where the particles turned gray, which meant that the altar was empty and I had to hurry to fill it. After the diamond burst in a shower of red particles, what finally sat in the altar was a Weak Blood Orb. + +//TITLE The Soul Network + +One thing that I initially didn�t understand was the overarching connection between the blood orb and myself. When I initially met Magus, I could see many sparkling strands branching off of him, flowing throughout his house and linking with intricate stones and runic drawings. I asked Magus about the strands, but he had no clue what I was talking about. It took three years of thorough research to finally find the answer, and when I brought my notes to him he was really impressed with what I have found. + +When you send power into the orb, the energy is transmitted from the strand connecting the orb and into the very soul of the person the orb is bound to. Similarly, and Magus managed to show this effect with several of his rituals, when you use something that drains energy it will drain the energy directly from the soul. The thing is that if you use an item whose owner has no energy left, the item will instead grab the requisite energy from the user of the item. Directly. From his or her life force. As such, the unit of measurement is called �Life Points,� or LP. I experimented with this, and one heart equals 200 LP. + +I have christened this system to be the �Soul Network,� and is used in all branches of Blood Magic indirectly. + +//TITLE Basics of sigils +//ITEM AWWayofTime:blankSlate +Magus is a master at rituals. His power in the intricate layering of stones and inks is unmatched. The problem is that these rituals are rather� static in nature. Sure, being able to call the bounty of the earth to the surface is all fine and dandy, but won�t exactly protect you when you are on fire. To this end, I decided to link my soul network to powerful items that I have created. To start, I decided to transmute a piece of smooth stone in the Blood Altar with just 1kLP to create a blank slate. +The first thing I did was to arrange the blank slate with some reflective glass and my weak blood orb. Pouring my power into the configuration created a Divination Sigil, which I could link to my network and see how much power that my soul network holds. What is more, holding the sigil to the Blood Altar flooded my mind with information, giving me the knowledge about its current tier, capacity, and even how much it was holding. +Happy with the sigil, I brought a fresh unbound one to Master Magus for him to use. When I took the divination sigil back in my hands and tried to use it to view his network, for some reason I could not gleam any information from him. I don�t really see why this is, considering that I used this same method for other people and I saw that they had no power at all, but to gleam actually � nothing from Magus is strange. + +//TITLE Training, and water sigil +//ITEM AWWayofTime:waterSigil +I�ve been training my body, lately. Master Magus told me that in order to extract most of my power, I have to get my mind, soul, and body into as perfect shape as possible. Even though my mind takes time to hone, and my soul requires methods I have yet mastered to strengthen, my body is something I can actively manage. No more cookies for me, apparently, since they have horrible saturation for the work I do. And it�s hard to grow cocoa right now, anyways. +The temperature is ridiculously high, and with it the humidity is pretty freaking low. Some bright spark of a thaumaturge got it into their head that it would be good to open up the Obelisk to the far north of the village, and because of it a large influx of taint spewed forth from the eldritch tomb. It looks like someone wasn�t focusing enough on their sanity training! Thankfully Master Magus decided to head out to the site up north with a few stones and a new vat of ink, saying over his shoulder that he had a new ritual that he�d like to test to fix the problem. + +In the meantime, I was tasked to create something to fix our water problem. I thought about perhaps cooling the environment around the village in order to condense the water in the air, or perhaps find a way to create rain � neither of which I would be able to accomplish, because I�m sure that either task would take more than the 5 kLP capacity I currently have with my blood orb. So, I had to think small. + +At my desk, I mixed some dirt into the spare water I had for experimentation and started to paint on one of the blank slates I recently created to layer a bit of a base. Once I was satisfied, I took a bunch of buckets (to be safe in case that what I did would fail) and arranged them around the damp slate and then took my orb from the chest nearby. I then tapped the orb onto the slate, and the water started to boil and swirl out of the surrounding buckets, rushing into the slate! After a quick, bright flash, the new sigil lay steaming on the table in a puddle of water. + +Thankfully the sigil was what I needed. I could link it to my network and place water wherever I wanted by simply tapping it on the ground. The water was pricy, requiring a full 100 LP for each bucket�s worth that I created in the world, but for an infinite supply of water, creeping upwards to 50 full buckets for my puny network was something that I desperately needed. It�s just a shame that it started to rain an hour after I created the sigil. + +//TITLE The Lava crystal +//ITEM AWWayofTime:lavaCrystal +There was an explosion in the lab today as I was trying to work out a few more artifacts. When I tried to infuse a few buckets of lava with my power, and used some glass to contain the effect, the assembly simply burst into flames and flew me across the workshop. I wasn�t really hurt, and thankfully my water sigil was used promptly to put out the fires, however it seemed that my experiment failed rather heartily. + +Apparently I needed just a little bit more time, however, since I got it to work a week after. By combining some glass and obsidian together with a few buckets of lava, and throwing in my blood orb and a diamond to hold it all together, the diamond was transmuted into a fiery crystal that seemed to� do nothing at all. + +I peeked out from behind the blast shield, since by then I learned that playing with lava was not the safest of hobbies, and gingerly linked the crystal to my network. As soon as the pact was completed, I felt a wave of heat emanate from the crystal, and promptly tossed it into a furnace before it could burn my fingers. I was unsuccessful on that front. The furnace immediately kindled, and the pork that was sitting in the top slot began to cook quickly. +Quickly feeling a wave of nausea, I checked my network out and found that I had nothing left to offer. Once I pulled the blasted thing out of the furnace and stuffed it into a chest, the nausea subsided. So this Lava Crystal could work in any sort of furnace and feed off of the owner�s network, but if the network was dry it would instead cause the owner to feel a hearty blast of nausea unless removed from the solid fuel-burning machine. Good to know, since now I know of a way to trade my services with the blacksmiths in the village. + +//TITLE Sigil of lava +//ITEM AWWayofTime:lavaSigil +Finally, the day that I have been waiting for the past 7 months has come. The �Hell�s Harvest Festival� is a day that the village celebrates the creation of the first portal to the Nether a century ago. It�s funny that when I ask the villagers why it is that we celebrate the formation of a portal to Hell, they simply laugh and say that I�ll see when I finally go in. +The portal was located in a vast stone cathedral, a three day�s walk from the village on foot. Magus said that he�d meet us there, because he had a few things that he needed to prepare before actually going over to the Nether, but I was curious as to how he�d make it there in time � knowing Master Magus, he�d spend a day or two reading up on a new theory for a ritual and forget himself in his works. + +When we entered the hall, however, Master Magus was there already talking to one of the guards of the unlit portal, stowing away a gem into his pocket. I knew something was up, because I could see a strand connecting the gem in his pocket to both himself and one that trailed off back to the village. Not wanting to be distracted, I pulled out my wand (Master Magus insists on all of his apprentices learning of another field of magic, and Thaumaturgy has proved itself useful) and set alight the portal as was the custom of the newest member to the harvest. + +It seems that the harvest, however, was not exactly a trade. I saw giant stone walls and vast pumps throughout the land, grabbing all of the lava from the great pool below. A large collection of bound pigmen walked by, led away by someone in a full set of shining steel armour. Huge machines that processed the lava were emblazoned by the brands of industrialization: Thermal Expansion, BuildCraft, Greg Tech, and many other labels dotted throughout the base of operations. So much for a festival � it seemed that the Conglomeration, the governing body that oversaw all of the villages in the land, saw it fit to turn a civilization into a circus. + +After accepting a few supplies from the farce, I walked back home by myself two days early. There were some things that I wanted to create, but wasting my time there would have been fruitless. Clearing my desk of debris charts of alchemical constructs, I set to work with a vat of magma cream that I brought with me, attempting to combine it with another slate. Casting my orb aside, I fished the lava crystal from my chest and combined it with the cream and some fresh buckets of lava � thankfully not from the Nether. Once the light faded, I picked up the new Lava Sigil that lay in front of me. +What this sigil does is it siphons energy and uses the properties of the lava crystal to super heat rock, creating a source of lava wherever the wielder touches the ground. So, infinite lava, and infinite fire hazards. Unfortunately, it takes about 1 kLP per single use, which is a lot for my network as it stands currently. It looks like I need more power, but seeing that Master Magus is currently enjoying himself at the festival, I�m going to have to find a way to boost the blood altar myself. + +//TITLE Blank runes +//ITEM AWWayofTime:AlchemicalWizardrybloodRune +Of course! Runes! Why didn�t I think of this earlier? The power of the altar itself comes from the structure of the components used to create it. The force of the diamond alone is not enough to create stronger materials through transmutation. What I need to do is construct several runes to extend the altar, and thus the altar�s power. The only thing that I could do on such short notice is to take several blank slates (I have about 16 left) and quite a bit more stone and combine them with my Weak Blood orb. + +//IMAGE 8 854 480 alchemicalwizardry:textures/misc/screenshots/altars/T2.png + +What came next was the hard part. After I made 8 runes for myself, I sat puzzling over the altar. �How could I extend this thing?� I asked myself. It took a few hours, but when I placed the 8 runes in the ground around the altar in a ring, I felt a strange reverberation in the air. Something felt like it awoke, as if the power in the surrounding environment doubled. Quickly, I grabbed my Divination Sigil and slapped it onto the altar, and focused into it to view the power of the altar. + +I was pleased to find out that the altar was finally at its second tier, which should open up many more transmutation recipes. The problem now, as I sank slowly into my bed to sleep after the long day, was to find out what I could now do. + +Although Magus was pleased with the upgraded altar, I was caught in a bind. I couldn�t seem to do anything with it that the previous altar could not do. The first thing I did was I placed one of my leftover blank slates into the basin, and it promptly consumed 2 kLP worth of essence as it reinforced the structure. Although this Reinforced Slate was much more durable, this process appeared to make the slate no longer work with creating both the lava and water sigils, as well as making it a waste to use in additional rune creation. + +//TITLE Speed runes +//ITEM AWWayofTime:speedRune +I can note, however, that when I combined one of the runes with a few more blank slates and some leftover sugar from the harvest it seemed to augment the altar even further. The sugar had to be laid in a configuration that mimicked a bow and arrow on top of the rune, and by doing so it created what I can dub a Speed Rune. What this rune appeared to do was increase the speed of the altar�s processes, both the transmutation rate as well as the speed that a bound orb will consume the essence from the altar, by an additive 20% per rune. This tier doesn�t seem perfect, however, since it seems that for the second tier only the four edge runes (not the corners) could be used as upgrade �slots� for the purpose of augmentation of the altar. + +//TITLE A shining green orb +//ITEM AWWayofTime:apprenticeBloodOrb +The �eureka� moment came when I accidentally dropped a few things on the floor of the lab. When I bent down to phish the items from the floor I noticed that one of the emeralds rolled right up to the altar, almost as if it longed to be inside of its basin. It occurred to me that if a simple diamond inside the altar created a weak blood orb, perhaps a much rarer gem would make a stronger version! Quickly fetching my knife from the table, I filled up the altar over the course of the day so that I could make sure I didn�t mess anything up, and then dropped the emerald into the altar. +The speed runes made sure that the transmutation took no time at all! Wow, those things work fast � I better make a note of removing the runes when I try to create more difficult items inside of the altar, because if I was not prepared it would have chewed through my supply in no time! After a few tantalizing moments waiting, the altar burst in a shower of particles and the new orb sat there, revolving on top of the altar. +Master Magus must have heard my shout of exclamation, because he hurried over from his side of the house and helped me to my feet. Not noticing the pain in my palm from earlier, I reached for the orb and sealed it to my network. Master Magus then helped me to fill up the orb inside of the altar, and when we were done that day I had a total of 25 kLP inside of my network. + +//TITLE The void sigil +//ITEM AWWayofTime:voidSigil +After resting the rest of the day at the insistence of Magus, I returned to work this morning full of inspiration. While I laid in bed half awake, the thought struck me that so far I had managed to use sigils to create fluid. So why not make one that can remove it? My first attempts with things like glass bottles and bowls failed with all of them working for a brief moment, then returning to their old forms. It was almost lunch time when the thought crossed me that I used buckets for the first two, so why not here? Half an hour, six buckets, a bit of twine and a reinforced slate later I had my first void sigil. + + +//TITLE Air sigil +//ITEM AWWayofTime:airSigil +While tending to our small farm a few days later, I noticed a bird land on our fence. I turned to face it as it flied off, and had a revelation as I watched how it flew. If I could use magic to create the gust of wind like that made by bird wings, I could fly through the air! After hastily finishing the days� chores, working out details in my head all the while, I rushed to my workstation to start work on what I have now dubbed the �Air Sigil�. Using feathers and a Ghast tear as ink on a reinforced slate, I formed a sigil that on use creates a rush of air behind where you face to propel you forward. Flight using this sigil is fast, if a little pricey and hard to control, not like the flight provided by Magus's thaumostatic harness. Also, landing is a bit of a problem as I learned the hard way... + +//TITLE Sigil of Sight +//ITEM AWWayofTime:seerSigil +I've grown a little annoyed at my divination sigil. While it is able to read the current tier and essence of a blood altar, that is ALL it can read. As a result, my current goal is to improve its design using my new blood orb. So far it is going well. The �Sigil of Sight� is able to read the buffers of the altar to give how much they store, as well as how far along a craft in the altar is and how fast it is using LP. The downside of this upgrade is that it loses the power to read the altar's tier or the users soul network, but so far this is an unavoidable loss. For now I'll settle with what it does now, and might try to improve it further later. + +//TITLE Advanced altar mechanics + +Even after all this time, I still don't fully understand the blood altar. Sure, I built the thing, but... It is almost like working directly with raw life essence has given it a bit of life of its own. After running a few experiments to try and make my life easier, I've noticed some odd behavior coming from it. + +First, I tried using some basic piping to extract life essence to store later to use for more pricey infusions. As it turns out, the altar doesn't like giving up its essence. I managed to get a bucket of LE out before it seemed to slow to a trickle feed, nothing more the 20LP a second. Further tests show that it has a �Buffer� tank that siphons off LP from the main tank, holding roughly 10% of the main tanks capacity. As I mentioned, it does this very slowly so piping is out of the question for now... + +A later test shows that it also doesn't like essence being piped in, as a similar restriction apples to imputing essence. I will defiantly need to find a way to improve this transfer rate... + +Another strange phenomenon about the altar is its �Hunger� for life. After the failure of the piping, I tried using a few regeneration potions from the local village to speed up the rate at which I recovered health. A normal or extended potion seemed fine, and were very effective for speeding up slate production. But a strengthened regeneration potion caused the altar to have a slight �Hum� about it, and I felt my energy being sapped by something. After talking with Magus about this, we have determined the altar senses the life flowing through us, and the potion makes the altars �Hunger� for this life create a sort of aura that causes you to lose energy akin to hunger. As a result of this, regeneration is still effective, but a sizable supply of food is needed for extended use to recover energy. + +//TITLE Sigil of the fast miner +//ITEM AWWayofTime:sigilOfTheFastMiner +I've decided to experiment with passive effects for sigils, since everything so far has been an active effect. While wondering through town looking for supplies, I noticed people cutting wood for a fire and some smashing stones to build a small fire pit. I keep coming back to how slow both of them were in my train of thought, then started going over ways to improve the tools. Then it hit me: Why improve the tools when you can improve the person? A few anatomy books and failed tests later, I hand the sigil of the Fast miner(Name pending) and two very tired arms. After activating the sigil, it speeds up muscle movements in the arms allowing you to break blocks far faster at a small LP cost every few seconds. I do need to keep reminding myself to turn it off when not in use, but the stinging pain of life essence being taken is always a quick reminder... + +//TITLE Soul Fray + +Today I pushed myself too far. I've gotten close a few times, but today was the first time I have passed out due to draining too much life essence. Magus was thankfully with me at the time, and moved me to a bed to recover. As I regained my senses, I noticed something odd about my soul network thread: They were thin and looked damaged. As I kept watching my threads, it seemed like they were slowly reforming and repairing themselves. I mentioned this to Magus, and we theorized that after coming so close to death my soul was still recovering from the shock. I made a sacrifice at the altar to test this, and it seems that this state effects how much life essence a heart is worth quite negatively with it only giving a tenth the normal amount. + +//TITLE Green grove +//ITEM AWWayofTime:growthSigil +Today Magus showed me his green grove ritual, a way to speed up crops. Unfortunately, it is very static and has a small range, limiting its uses. To amend this, I've been toying with the concepts behind the +ritual in an attempt to make it more portable. By creating an ink from oak saplings and sugarcane, then inscribing a rune on a reinforced slate I have created the sigil of the green grove. It seems a little slower and more expensive then the ritual form, but it can be carried on your person and acts like bonemeal when used on plants. While I had it active I could barely keep up with our farm, and by the end we needed to give a few of our neighbors some of the excess we didn't need. They all accepted it, but with varied degrees of reluctance. + +//TITLE Dagger of sacrifice +//ITEM AWWayofTime:daggerOfSacrifice +My work on sigils has slowed for now as I'm reaching the limits of what my little green orb can do after only two weeks. As a result, I have turned my attentions to other aspects such as runes to pass the time. Magus is currently out dealing with a large forest fire to the east of us, and the village is in a bit of a lull with nothing planed for several weeks. Right now my task is to slaughter a few chickens Magus brought home from the market to prepare on his return home, and it seems the perfect time to test an idea I've been thinking about for a while... I will not mark it here, just in case it is another false hope. + +Success! I've managed to perfect my idea for a new source of life essence. Before the only option was to cut ourselves to give our own life essence to the altar, but now we have a way to use other living things as a source. Unfortunately, it is a little gruesome and a bit �All or nothing� from them... Regardless, it works! + +...I have realized that, in my excitement, I may have forgotten to write down what it is. I call it �The Dagger of Sacrifice�, formed in a blood altar out of an iron sword and 3K LP. The dagger doesn't deal much in the way of damage. It doesn't need to, as its main purpose is to �Mark� a living thing for the altar which takes care of the rest by forcibly extracting their life essence all at once. Through my tests it seems that your common farm animal's life isn't worth nearly as much as a person, only giving 250LP regardless of where it comes from. While I set about cleaning the animals after the tests were done, a common zombie managed to sneak in the door I left open when bringing the chickens down here. As soon as I noticed it, reflexes that were being drilled in by Magus every morning kicked in and I managed to poke it with my dagger before it had a chance to hurt me. At first I thought nothing happened, then it fell to the floor as lifeless as it should have already been. I glanced at the altar, quickly noting that a zombie was worth 500LP. Looking over the fallen creature as it started crumbling, I noticed that some of the defenses Magus had set up took there toll on the zombie as it was burned and freshly cut in several areas... Seems that the amount of HP they have is irreverent to the altar, giving the same amount of LP regardless. + +As I finished preparing the meat to cook after disposing of the zombies ash(Which reminds me, I wanted to look up why this happens...), a very dark thought crossed my mind. The knife works by giving life to the altar. The dagger works by taking life forcibly from a target. What would happen if a human was marked by the dagger? I asked this to Magus, after showing him the dagger and telling him everything that happened. �In all honestly, I'm not sure. I have a theory, but I don't really feel like testing it...� I asked him to elaborate, so he told me the basics of it. It seemed that source of the life essence mattered with the dagger, since the chicken and zombie gave two different amounts, so depending on the person in question they would be split into one of three groups: Passive, Hostile, and Innocent. The passive would be like the chicken, only giving a little. The hostile would be the bandits, the thieves, the murderers. The ones who gave into evil, and now seek to hurt or steal from anyone. The unredeemed, and would probably be like the zombie. The final group were the innocents, anyone who doesn't fall into the first two groups. It was nothing but a guess, but we agreed that using the dagger on an Innocent villager would extract all of their life essence like ours. 2K LP, all at once... We also couldn't work out what would divide the passive from the rest, but it was only a theory so we put it to rest. + +//TITLE Runes of Sacrifice +//ITEM AWWayofTime:runeOfSelfSacrifice +Looking at these little speed runes, I have decided to see what else can I make. My goal isn't anything in particular, just improving it in some way. The speed rune was made with powdered sugar, so another type of powder should work... + +Redstone failed, gunpowder failed, glowstone... Glowstone worked. I currently have no idea what it does, all I know is it didn't fall to bits seconds after creating it so that is progress. The altar seems to accept it as a proper rune, so all that is left is to run a few tests in the morning. For now, I am tired and feel a bed calling me... + +I've run dozens of tests trying to find out what this new rune does, after two days of obsessing over this I finally noticed it. It slightly increases the amount of LP self sacrifice gives. When I said slight, I mean one rune increases LP gained by ten percent on an additive rate. For those who don't understand that, it basically adds an additional twenty LP per self sacrifice. If my theory is right, I should be able to make a similar rune for normal sacrifice... What else would the altar respond to? + +//ITEM AWWayofTime:runeOfSacrifice +Well, if there is anything thaumaturgy and magic in general has taught me, it is that gold is a very good metal for magic. By simply replacing the glowstone in the recipe with gold ingots, a sacrifice rune is formed. It has the same additional ten percent addition per rune per sacrifice, meaning the more LP of the mob sacrificed the more LP the runes adds. This has got me thinking... The altar was constructed with both diamond and gold. It seems to resonate with the diamond enough to make the first blood orb, and even a second, so why not try making one out of gold? I'll need to revisit this idea later as a test run showed some reaction to a block of solid gold(I didn't ask Magus where he got it, and he doesn't seem forthcoming about these matters), but the altar couldn't cope with the strain needed to shape the block. Before catastrophic failure happened, a few safety precautions Magus and I had built into the altar triggered, stopping the transmutation before... Well, neither of us are really sure what would happen. But Magus said he has dealt with matters of unstable and untested magic, and knew most of them end with a crater in the floor(Hence the safety precautions). + +It has been a few days since the experiment with the gold block. Magus and I have been discussing what to do now, as the altar is getting bigger then the basement. Magus has suggested moving it to some of the lower basement floors, but considering just how large it might be in the future... I finally got him to agree to building it behind his home, as long as I helped put up a few wards and spells to keep people away. Currently we're planning out the structure and needed runes for upgrading. The current altar only has eight runes, but what I have planned will more then triple that number to twenty eight. The current limitation we suffer is the strength of the altar itself, as it can only take power from runes adjacent to it. My plan is to use something the altar is naturally attuned to as a way to not only increase the range of this effect, but act as a counter balance and stabilizing it to prevent it from becoming uncontrollable. For this to work, the blocks in question must be above the altar and an equal distance apart. + +We've run several tests and calculations, and have a layout in mind for this upgrade. Four pillars topped with glowstone blocks, twenty runes in sections of five, built one block down and two out from the last set of runes. In theory this should provide a huge boost in power to the altar without risking our safety(Well, more then we normally risk it), but until we test full scale I can't be sure. For now, we have a lot of runes to make. After much debate we've decided to invest in the �Self sacrifice� runes, as having a steady supply of mobs will be tricky. But now I face the issue of making dozens of reinforced slates... I need to think on this. + +//TITLE The blood letters pack +It's so simple! I've discovered a way of obtaining LP for making slates that means I don't wait at the altar all day: The Blood letter's Backpack. Made with a modified leather chest-piece with a blank slate reinforced glass tank, it allows the wearer to gather LP by feeding it into the pack over time. Whenever the wearer has more then five hearts, the pack will drain their life and store it inside up to 10K LP to be dumped into an altar later. This pack does have two shortcomings, however. When the life essence is deposited into the altar, runes will have no bonus to the amount added. The second problem is that the altar will only accept LP from the pack when not performing a transmutation. Despite these limitations, it will prove quite valuable for simply allowing me to step away from the altar to do other tasks. + +This is a simple progress update, as it's been a few weeks since I last wrote in this journal. I've been making slow, but steady progress with assembling the slates needed for the runes and we're now halfway through. This isn't the only reason for the lack of entries, as I've been preoccupied with my research thorough thaumaturgy. An old friend of Magus has been visiting and happens to be a well versed thaumaturge, and he has been giving me pointers on how I could be doing better while Magus has been preoccupied in his library dealing with a mountain of paperwork. Now that Master Ridden has returned home, I hope to progress farther in making runes in the next few days. + +//TITLE And then there was five +Or not, as it seems Fate has other far more interesting plans for us. Today we had a knock on our door while I was making the last of the runes, and after opening it was greeted by three apparent orphans. The two boys in the front looked like they were brothers, or at least close relatives. The girl hiding behind them on the other hand had a very different hair and eye color, so relation was unlikely at best. All of them were covered in dirt, clothing ripped, torn, and patched with various levels of skill. The one on the left had an old sword with a chipped blade on his side, was slightly thinner and taller then the his brother, had a few deep scars that looked recent, long and messy dark brown hair, and was looking at me with a kind poker face. The brother looked more muscled, and was staring at me with a very analytical eyes and a similar poker face, his hair was slightly shorter and lighter then his brother. From what I could see of the girl, she had a simple dress on that was almost caked in dirt and dried mud. The fabric near her elbows was becoming thread bare, and a large rip near the bottom of the dress exposed some of her right leg. Her hair was a light blond, almost pale white color, but the most shocking feature was her eyes... I haven't seen haunted eyes like that in years, and last time it was in a mirror. From the looks of them, all of them hadn't ate anything in days and seemed to have everything they own on their bodies or in the simple packs on their backs. + +I asked them if there was anything they needed, to which the elder brother said they were looking for master Magus. I called Magus to the door, visitors being a rare thing as it stands with ones who ask for him by name and not clearly mages being rarer still. Five minutes later we all sat in the main room, eating simple sandwiches I had prepared for us all at the request of Magus. Needless to say, this day was not going as expected. Magus spent the next few minutes practically interrogating the elder brother , asking questions on both of our minds. As it turns out the two brothers, Vlad and Demier, use to be caravan traders, eldest a alchemist with basic knowledge of potion brewing, younger with enough mana and training already to cast basic spells. The girl on the other hand had a story all her own. From what the brothers had managed to gather, her village was raided like my own was and she was evidently the sole survivor. What shocked me was when they said she was found wandering the ashs, demons having left hours before without so much as a scratch on her body. Vlad was with the traders when they found her, and he was forced to leave them if he wanted to help the girl named Bella. + +Their story seemed to win Magus over, as he told them he would try to do what he can for them.. Not long after that, Magus asked me to help him do some shopping for our new guests. On the way to the village, Magus asked me what I thought of the three. �I can't say I believe all their story, but I also don't think their lying. Did you notice the girls eyes? Haven�t see a look like that since...�. Magus finished for me with �Your own?�. I nodded at the dark memories of that time. We continued going over the details of their story, but we agreed that just leaving them in the cold wasn't an option worth considering. We decided to at least try to keep our recent endeavors into blood magic a secret from them, but when push comes to shove I think we might have to let them in on the secret. Magus let out a long sigh. �It's been years since I had to juggle this many apprentices at once. I'm going to need your help training them. But something tell me that we're going to be learning as much from them as they will from us...� I asked him why he felt that way, and he said it was just a gut feeling. I must say I had a similar feeling. Things like this don't happen without reason, and of all mages to come to they stopped at our door, something far easier said then done. + +An hour later we returned home, both our arms heavy with fabrics, food, and other necessities that we will need to take care of the new apprentices. I watched in amazement as the three ate, trying to make up for days with little food all at once. After that, Magus and I laid the three on various chairs and couches to rest, the strain of travel catching up with them. While Magus dug around looking for a few of his old things that we'd soon need, I started creating some new clothing from enchanted fabric for the three to replace their current worn and ratty clothing. Now that that is done, I should try to get some sleep. Something is telling me tomorrow is going to be quite busy. + +The Early this morning Magus and I started carving out the earth for the three new bedrooms, since the old ones Magus use to have had since been converted into a storage closet, a alchemy lab, and small study. It didn't take nearly as long as I expected with Magus using a few spells to clear away earth while I went behind using an equal trade foci to transmute it into stone brick before gravity caught on. Once that was done, Magus raised a few walls to separate the space into three rooms and a hallway. Only after that was done did I notice the three children had awoken, and were watching us as we worked. Magus told them that he had some spare furniture in some storerooms they could use, but sadly only knew of one bed. It didn't take long for them to decide Bella got the bed, the brothers would make do with a pillow and a blanket on the floor. + +After that we spent the rest of the day hunting for then moving furniture to their rooms, building little work areas and libraries for each of them. The following day was more of the same, with the evening filled with helping them find books to read from the grand library. Vlad grabbed as many alchemy books as possible, Demir took a few books on spell casting, and Bella took a Lexica botanica to read through. Later this evening, after the three had retired to their rooms, I sat in the main room with Magus, arms and legs aching from the heavy lifting of the last two days. I told Magus how I thought their rooms should be almost finished, and how I spent the last hour before they retired just answering seemingly endless questions. �I'm sure. I've gone through the same more then once, when I have apprentices new to magic. You were the same, I recall.� I opened my mouth to protest, but closed it as I thought back to those days. I decided I probably was as bad as them, and left it at that. + +It's been just over a week, and the three have settled in nicely. They join Magus and I in morning exorcising, have started studying like true scholars, and have calmed the hungry nodes in their stomachs(Well, Vlad and Bella have. Demir on the other hand is another matter, but I feel he will always be like that.) Unfortunately, like true scholars and mages they've stumbled into places we didn't want them to go. Vlad has created a chemistry set that uses life essence from a blood orb as a fuel source, Demir has turned an old table into a way to use life essence to cast powerful spells, and Bella... She's left me questioning what I know about demons, after taming one and using a blood orb to bind it to her. All three of them have stumbled blindly into blood magic, and now I don't think we'll be able to stop them. Magus and I have agreed to give them a choice in whether they are blood mages or not, but I've seen the light in their eyes... I can't imagine any of them saying no. To seal their dedication to the art, we will have them make blood orbs of their own to use. + +//TITLE The next step: Tier three +//IMAGE 8 854 480 alchemicalwizardry:textures/misc/screenshots/altars/T3.png +Even with all the chaos of the last week I've managed to finish the altar construction, and it has been more successful then I predicted. With full access to twenty eight runes, each heart is now worth over seven hundred LP. I've already started prepping to try again with the gold block, having a few instant healing potions at hand. I got a brief glimpse with my sigil of sight, and this transmutation will take twenty five thousand LP to finish, over double what the altar can hold! Writing this down does give me an idea, however.... I'll need to look into it further once I have finished making this. + +//ITEM AWWayofTime:magicianBloodOrb + +It was close, but I finished the orb today. I was down to the last of my three potions and barely had the strength left to hold the knife, but I pulled through and finished my shiny new blood orb! I've already used it to craft a few things I had made before, and extra lava and air sigil, and it handles it all with such ease! Now that this is finished, I have a small list of ideas to go through... + +To start off the process, I want a stronger slate. As it stands the reinforced type is cracking under the strain I'm starting to place on it. Well, I got a new slate type when I last upgraded the altar... Let's see if it works again. It does! A reinforced slate in a tier three altar with around five thousand LP makes a new slate... I'll call it an imbued slate for now, and come up with a better name later. + +//TITLE New runes +//ITEM AWWayofTime:AlchemicalWizardrybloodRune:1 +First up to the drawing board: Rune of Capacity. The basic idea is simply to add more room to the altar, so a greater amount of LP can be stored at once to make bulk crafting or difficult crafts easier. Each rune adds 1K to the altar's main tank capacity, but what is interesting is that the �Buffer� tanks expend as well to a lesser degree. From a few trial tests(My back is starting to hurt from moving runes all day), the buffer tanks are always ten percent of the main tanks size. This will be something to keep in mind later. + +After helping patch a hole in the wall caused by Demir accidentally unleashing a spell, then helping Vlad dispose of a few failed alchemical �Experiments�, I finally have an hour to myself to work on my ideas for runes. After the success of the last documented attempt, I've been on a bit of a failure streak. I've have runes fail to do anything, crumble to dust, blow up, and one attempt turned into cheese(I asked Magus about this, and said this isn't the first time he's seen that happen to a magical experiment. However he is just as stumped as I am over why it is always cheese, of all things). Thankfully, I finally found something that doesn't need a blast shield to use or starts growing mold after a while. + +//ITEM AWWayofTime:AlchemicalWizardrybloodRune:2 + +Named the dislocation rune, it's only function is to increase the rate the life essence flows into and out of the buffers. Each rune increased the transfer rate by twenty percent per rune, and this effect stack manipulatively. That sounds great, until you realize the first rune only raises the transfer rate by four LP a second. Needless to say, your going to need around a dozen of these runes before you have any noticeable impact on the transfer rate. While these runes make it possible to automate the creation of slates by storing the life essence outside the altar, you're going to be sacrificing speed, capacity, and generation efficiency for this. + +//TITLE Sigil of Magnetism +//ITEM AWWayofTime:sigilOfMagnetism +It's been a few weeks since I last made any headway with my blood magic research, needing to help with the tutoring of the Vlad, Demir and Bella along with my normal duties as a mage. I've had to leave twice this month in order to sort out some mess or another, whether is be a helping with a pack of wild wolves or a bad harvest. Today, however, I managed to get some inspiration for a new sigil. When I was in the market buy more food, I noticed two children playing with a rock that was slightly magnetic. They were just running around, seeing what it would stick too and cheering when it did, or seeing how close they could push it to something before it pulled itself closer... That is what sparked my idea: A sigil that acts as a magnet, pulling items off the ground closer to you. In theory I could rig the magic on it to apply a similar effect to all items and not just metallic ones... + +Three hours later, and my sigil is finished. It needs a great deal of mass in the form of four iron blocks, along with the classic gold plating infused into an imbued slate(Drat, I never did work on a better name). This sigil needs to be toggled to activate, and while active will draw all nearby items to the user if they have room for it. Simple, but very effective.... + +//TITLE The Phantom Bridge +//ITEM AWWayofTime:sigilOfTheBridge +I've been asked to visit a small town to settle a few complaints that have been voiced lately by them, and am currently surprised that a closer bridge isn't one of them. I've had to walk three miles to cross this river, and now must walk another two tomorrow to reach them. If only I didn't need a bridge, or had thought to grab my air sigil(I still have a bruise from the last landing I had with it, so I wasn't keen on using it again so soon.) Wait... If if I had a bridge that went with me? Better yet, what if I had a bridge that formed under my feet as I walked? Yes, that would be amazing... + +I'm back home after dealing with a feud over who really owned a cow(Answer: Neither of them, it wondered into town and they both thought it was one of their own), and have set out my work station to try and capitalize on my idea. I'd want the sigil to place blocks that are phantasmal, only there temporarily before fading into nothing after I leave. For that I'd need a special material... Soul sand might work... Add in a little stone for structuring around an imbued state, then use the orb... Done! Now then, for a test run... Drat, I left the auto-writing quill running again. + +It works better then I hoped! The sigil creates a small five by five platform under me, staying at the same elevation as I walk through the air. Not only that, but I've tweaked it so that holding shift lowers the platform by one under you, and the blocks it makes can be easily broken for a quick decent. Not only that, but it will only spawn the blocks if you are on the ground, jumping or flying will not cause the bridge to reform until you touch solid ground, unless you hold shift forcing it to form under you. And for one final convenience touch, right clicking a phantom block with a block replaces it with that block, making roofs and platforms far easier to build. That should be enough for one night, I'll dub this sigil �The Phantom Bridge� and call it a night. + +//TITLE Sigil of holding +//ITEM AWWayofTime:sigilOfHolding +Vlad asked me to help him today, requesting my assistance learning the sigils. Part way through he asked if it was ever burdensome having so many on me at once... And I told him it was. Now with a little of his help I've created the sigil of holding, and it... Well, it holds other sigils. Shift right clicking with it while another sigil is in your inventory will cause it to absorb that sigil, taking all of it's powers and allowing you to swap between them with a shift right click. Unfortunately, it can't hold that many sigils(Only four) and not every sigil wants be become a part of it. Also, I had to ask Master Magus for help removing sigils from it as it refused to let them go. For this task he created the ritual of unbinding, a rather grand looking ritual for such a simple task I must say. + +//TITLE Elemental affinity +//ITEM AWWayofTime:sigilOfElementalAffinity +Demir hurt himself again today with a fire spell that backfired(Well, it worked perfectly if setting the ground around him on fire was the intention). In hopes of stopping further injuries, I have infused the powers of the water, lava, and air sigil into an imbued slate. This seems let the sigil act as protective aura around the user, shielding them from drowning, burning, or falling damage at a high over time LP cost. Since I asked Demir to use it he hasn't burned or bruised himself, but did pass out once from a lack of LP to fuel it. Sometimes solving one problem only makes more... But he has been learning, and I've been amazed at what his spells could do. Recently he made a long range teleportation spell and a flight spell not unlike the air sigil, but far faster. + +//TITLE Recreating ritual stones +//CRAFTING AWWayofTime:ritualStone +//CRAFTING AWWayofTime:masterStone +After a few days of nothing, I turned my attention to the construction of Master Magus's ritual stones. Looking them over, I might be able to replicate their usage and features using reinforced slates and obsidian... + +Master stone, more complicated then the average ritual stone might be possible if I use my magician�s blood orb and four ritual stones to handle the complex nature of it, along with a little more obsidian... Yes, yes it should be possible to recreate them without sacrificing any usage of them. After asking him how he originally made the elemental scribing tools, I believe I can also replicate the manufacturing of them in the blood altar... But it looks like the dusk inks are too complex for this altar to handle, creating an ink closer to dark gray then midnight black... Perhaps I'll have the power to form them later, for now these four will work. + +//TITLE Shining a Blood Lamp +//ITEM AWWayofTime:itemBloodLightSigil +I had a flash of inspiration today (Quite literally, as watching a few town guards light a replacement torch nearly blinded me from the sudden light). They spend so much on coal and charcoal to fuel those things... What if I had a simple replacement? A near invisible light source that never goes out, can be made almost endlessly, and can easily be carried on your person? Never again would you need to place a torch to light a room, and they can ruin a rooms look(Not to mention the fire hazard they pose, ruining the look even more. �Charred mess� is never in style.). + +Harnessing the power of glowstone by running a �Current� of LP through it, I can create a sigil that fires a projectile that upon landing forms a stable light source par with that of torch. The only sign of its existence is the light it gives off and faint red particles. While it uses a small amount of LP, the advantage over carrying stacks of torches is enough to justify it. + +//TITLE Bound armor +Today Magus gave us a lecture on armors, going over the practical applications(Protection from large pointy sticks shoved in your direction and holding magic to improve the abilities of the wearer), typical construction of armor, and notable armors through the ages (And the very fatal flaws that their owners eventually discovered, much to their short lived dismay). Seeing and reading all this, I feel it is time I take my own try at this art using blood magic. Testing a wide array of materials and structures, I discovered a process to make an almost indestructible metal using a casing filled with life essence with glass hardened with diamonds and reinforced with bright red blood shards(More on their properties later) Magus showed me a while back (Making the prototypes of this armor took longer then you would believe). The process needs the soul of a demon bound to it, but this seems to be a small price to pay. + +//CRAFTING AWWayofTime:emptySocket +//CRAFTING AWWayofTime:armourForge + +To start, you need to make a �Soul armor forge�. This block summons the demon soul and controls the transformation of the �Socket� blocks into proper armor. By placing the filled socket blocks around the soul armor forge in roughly the shape of the armor piece you want with the forge in a gap, you set what it makes. Right clicking the forge will then finish the process, creating the armor piece and binding the demon to the shards inside the armor. You will need to bind the armor to yourself, allowing the armor to drain your network to repair any damage it takes(Another benefit of using blood shards in the creation). After donning the armor(Making a few adjustments, still refining the creation process), I asked Magus to help test just how resistant this armor really is. Several nasty bruises later, we have decided this armor shields the wearer from ninety percent of damage from mundane damage sources. What is interesting is that it also blocks roughly eighty percent of magical damage, meaning many armor piercing methods are far weaker. The metal also doesn't seem to hold enchantments, and the demons inside reacts quite negatively to our attempts to do so. + +Using the ritual of unbinding, we are able to deconstruct the armor back into the component sockets and anything that was inside them. I mention this because we seem to be able to �Augment� the armor before creation by adding a combination of sigils, blood shard, and an orb. The sigil added to the armor piece(You can add anything to the socket by right clicking with the item in hand) determines the effect, and adds a passive cost to wearing the armor piece. The blood shard lets you add an upgrade, the weak shards we have at our disposal only allow one upgrade but in theory a stronger shard should allow more to be added. Finally, the orb seems to lower the cost of the upgrade. Every sigil seems to have something to do with the normal effect of the sigil, either giving you a passive bonus or having the effect of the sigil happen automatically around you. A few examples are a water sigil making you immune to drowning, the fast miner always active, and a green grove sigil acts around you. + +//TITLE Sanguine armor +//ITEM AWWayofTime:sanguineRobe +I've managed to use my new found knowledge of armors and experience making bound armor to try and improve thaumium armor using blood magic. By throwing goggles of reviling or thumium chestplate, leggings, or boots the ritual transform the armor into a �Sanguine� version, with a small vis discount and protection par that of pure diamond. What is really interesting is that this armor can be augmented with runic shielding, and then socketed into bound armor in the same fashion as a sigil to pass on the runic shielding, with the bonus that adding the sanguine helm to the bound helm well allow the wearer to see things like aura nodes as if you had goggles on. I should note that you can only socket a sanguine armor piece into a same armor type(Helm in the helm, boots in the boots...), and that any vis discount is lost when you do this. + +//TITLE Suppressing the soul +//ITEM AWWayofTime:armourInhibitor +Having the armors special effects all the time has become a little bothersome. To deal with this I have managed to create an �Armor Inhibitor� to repress the special effects it offers in the cases they are more bothersome then helpful. Unfortunately, it is a bit all or nothing in this regard. + +//TITLE The ritual diviner +//ITEM AWWayofTime:itemRitualDiviner +It's coming up to the three year anniversary of Magus taking my on as an apprentice. Time seems to have flown by while I've been engrossed in research on applications of blood magic and working with Magus... I should make a gift for Magus to as a thank you for these last few years. Considering the complex nature of his rituals, an aid to building them might just be the perfect gift... + +Ugh... Making a way to build rituals easier proved to be quite the task(And it reminds me of the rule of conservation of effort...), but I finally have it ready in time for the anniversary. While it isn't cheap to craft(Costing the four elemental inks, four diamonds and an emerald), I've gone to pains to make it easy to use. Shift right clicking will cycle through a preset list of rituals, and shift right clicking on a block with also rotate the direction the ritual will face(For anything like the ritual of speed, where that matters). Shift left clicking will go through this list in reverse, for those times you accidentally go past the one you want. By normal right clicking on a master ritual stone the diviner will take stones out of your inventory, place then in the world and ink them to build the set ritual. To make it clear it is working, it emits green particle effects whenever it places a block successfully. However, it can only place a block in an empty space. Anything at all in the way will stop the process until the obstruction has been removed. It is a small annoyance, but nothing major enough to risk breaking the diviner(Again). + +Magus adores his gift, having rituals faster and easier to build is the one thing he could actually use(That he doesn't already have). The fact it makes anyone who uses rituals lives easier is a just a bonus at this point. As it turns out, he got me a gift as well: A pair of ichorium wand caps, the one thing I had been dreaming about for a long time... + +//TITLE Blood shards +//ITEM AWWayofTime:weakBloodShard +Reading through my older entries for inspiration on things to do with our current power(I believe we have started reaching the limit, struggling to stretch what we have as far as it will go) I noticed that I �Might� have forgotten about covering the blood shards like I said I would a few months ago... I'd best start from the top. + +Blood shards, as Magus has likely stated already, are fragments left behind after vanquishing a hostile mob with a demonic weapon(The Bound sword or Energy Blaster). Upon close inspection, I see small strands that looks shockingly like that of our soul networks... Well, in theory anything with a �Soul� could have a network, but this is a surprise nonetheless. Because of this, the small shards contain a vast pool of energy that our magics should be able to tap into. A rather unfortunate first experiment involving stone showed that this energy can be wielded to create or transform matter(I believe several others have come across similar principles to convert energy into matter using science). I say unfortunate because I was stuck inside the lab's supply closet for a few hours to hide from the rapidly expanding stone as the released energy of the shard grew the stone to thirty two times it's former size, filling the rooms and pushing out the open door and into the hallway. (Further crafting of blood stone was done outside after that...) But regardless, the blood shards potential energy and connection to the soul network is how we manged to form bound armor so easily. + +Thinking about it... Blood shards might be the answer to our power problems. The last time we needed an upgrade, we used something related to the altar... Perhaps using something related to the soul network is the next step? + +//TITLE The life of a Mage +Once more I must make a progress update, as daily life as taken up most of my time these last few weeks. Magus has started offloading some of his work onto us, dealing with small problems and formal matters, bandits and demons, and general mage work. I have been able to do a little work on the altar or blood magic in general over the last few months because of this. Thankfully, we've burned though most of the grunt work that has piled up and I now have some time to conduct our research. Magus and I have spent the last week doing the calculations for upgrading the altar, determining that bloodstone should work for the capstone, and now it is just a matter of seeing how many runes we can get away with adding without nasty side effects or it all just blowing up(The other three have placed bets on this, I believe). + +//IMAGE 8 854 480 alchemicalwizardry:textures/misc/screenshots/altars/T4.png + +After another few weeks of testing, balancing, and error we have finished the altar upgrade. This new tier adds twenty eight more runes to the altar's structure(Seven on each side, for a grand total of fifty six), and four pillars capped with large bloodstone brick(This was the best material we could find that doesn't expire or fall apart. Or, in one memorable case, actively try to kill us). With these additional runes we are projected to be making roughly one thousand three hundred LP for every heart sacrificed, a hefty improvement from our seven hundred from before. Unfortunately more work has come in for us, so once we have the altar built it will be some time before we can focus on the hunt for the material for the orb. Current plan is to start with precious materials like before, and work from there. Ah, innovation... Ten percent work, fifteen percent knowledge, five percent patience, seventy percent trying random things to see what happens. + +More work then expected flooded in at once, and we have been struggling to keep up with it all. Vlad has been acting as a healer and doctor trying to deal with a plague that has going around (Caused by a witch-in-training using the wrong vial in a love potion), and has managed to keep it from running wild. Demir has been clearing out known bandit camps, and has enjoyed a chance to test out the spells we've helped him build(Only in the mage guild are bandits considered an endangered species. This is in part due to the average intelligence level of said bandits, and thinking that an area where there are people who, sometimes quite literally, shoot fire out of their hands, mouths, and other places(Mostly the apprentice mages, as a joke or party trick that has often gone very wrong) is a great place to set up shop.). Bella meanwhile has been dealing with the demons that have been wondering in, the mage guild acting as a sort of beacon to them due to the thinness of the fabric of space here caused by countless magical experiments, both successful and not. Magus and I have been going through a huge pile of letters(Seriously, where are they all coming from, and how do I not notice the pile building up until it flows off the table?) from local villages and mages, ranging from simple questions about an issue or problem to requests for assistance in matters ranging from theft to flooding. We've been coordinating these issues, mapping out journeys to deal with as many as possible on one trip. + +As a reference point for how long it has taken us to deal with it all, dust has gathered on this book since the last time I wrote. Thankfully we've sorted out the letters and referenced the villagers to mages who are closer to them(Much to said mages chagrin), so it should be a while until this is an issue again... Thankfully all this time has left me with a few ideas for future projects. + +//TITLE The masters of T4 altars +//ITEM AWWayofTime:masterBloodOrb +The others have tried countless gems and metals trying to create a new blood orb, all of them either did nothing or created a flawed orb(Cracked or chipped, extremely fragile or incomplete). But last night I had an idea from a dream... The weak blood shards were once part of a soul network, so what would happen if we tried to reforge it into a whole orb? It is better then any other idea we've had, so I might as well try... + +Success! While we did burn through several instant health flasks, we now have half a dozen new blood orbs. While we haven't named them yet, they are a true master piece... A Master blood orb, that name has a nice ring to it... I'm getting side tracked again, but I must remember to suggest this name to the others(It at least is better then the temporary name of �Shiny yellow blood orb�). With this new found power, I might be able to bring to life some of the ideas that have been just out of reach up to this point. + +The first interesting property of these new orbs has been shown in our bound armor. While lesser orbs simply lower the cost, this orb is able to negate it entirely! A simple upgrade, but a very useful one... + +Another altar tier, another slate tier. Dubbed �Demonic� after the insignia that has formed on it's surface, we should be able to put this to some good use... I've also noticed that a demonic slate can be used with a weak blood shard and master orb to �Grow� the shard making four more. + +Going over my earlier successful experiments, I might be able to tweak a few concepts used to achieve a new result. I'm starting with the fast miner, and if boosting my arms was this useful then what would happen if I augment my legs? Using cookies, sugar, and some of the normal materials I have created a new sigil. Time for a test run... Two hours(And two very sore legs) later, I've concluded the tests. The �Sigil of Haste� boosts the users leg muscles, allowing you to both run faster and jump higher then normal. The best part? It seems to stack with the effect of jump boost and speed(Which Vlad was kind enough to brew a potion for testing). Now then, I need a rest after all this... + +//TITLE The sigil of whirlwinds +//ITEM AWWayofTime:sigilOfWind +Continuing with my thought process of �Reworking the old�, I have used a master orb, demonic slate, two ghast tears, and feathers to reform an air sigil. The �Whirlwind sigil� changes the core property of the air sigil to have the winds not effect the user by propelling them, but instead creates a bubble of wind around them pushing away many forms of projectiles. I should note that not all forms of projectiles can be pushed back by the winds, and it has a tendency to effect your own shots. It isn't perfect, but it is useful enough to have around in a pinch. + +//TITLE The sigil of compression +//ITEM AWWayofTime:itemCompressionSigil +After hearing the local miners complain about always having to stop work because they've run out of space in their packs, I've built �The Sigil of �Compression�. While active, the sigil will check your inventory for anything that can be compressed into a �Storage� block(A two by two or three by three recipe of that item that can then be crafted back into the item. An example is redstone into redstone block.) and squeezes it together for you. Simple, but extremely effective... I should note I added a few special cases to the sigil, such as glowstone dust to glowstone and a restriction to only compress cobblestone if you have more then a stack. + +//TITLE The Ender severance +Bloody endermen... Magus sent me out to try and stock up on ender pearls, but the pests keep warping away from me only to pop up later(And almost always when I don't want them too). It is just after dawn, and I've only managed to bring back six pearls... But maybe that is enough. I recall seeing some research notes on endermen and how they are able to teleport somewhere in the library. It is only an idea, but it might be perfect for this task... + +Eureka! After reading through the notes, I worked out how endermen connect to The End as a power source for their teleportation. Using a few ender pearls and eyes of ender, I've completed a sigil that acts as a sort of �Signal blocker�. In layman's terms, it disrupts the connection to The End and renders them incapable of any teleportation. Not only that, but it also prevents many forms of magic that relay in similar methods, such as Demir's spells and the barbaric(But nevertheless effective) act of throwing an ender pearl. From the light, I'd say it is almost sunset. Time for some well deserved payback... + +//TITLE The Teleposer +After my research into the basics of teleportation, a thought struck me: As it stands we don't have an established transportation network for mages to use, instead using the long and winding roads or other means of land travel. Sure, a witch might have a few way stones or a broom and a spell caster has a convenient recall spell, but we don't have a dedicated transportation system. Considering how much Magus and I travel to deal with small matters, and how often mages visit each other it is a surprise no-one has built something like this sooner! + +After talking with Magus about this, it turns out something like this has been tried before. The main failing point each time was the limited number of people able to use the method established. (A thaumaturge rarely knows how a waystone works and so on.) This has prompted me to create a means of teleportation that, once properly set up, almost anyone can use if they know how to push a button. Further research into ender pearls is required... + +After close analysis, I've decided that my first priority should be the improvement of the base ender pearl. As it stands, they are a little too fragile and random for reliable long term transportation. By placing a pearl inside a T4 altar I have been able to refine it into a focus, stronger and more predictable then the base pearl. I am currently in the middle of creating a mechanism to hold and operate the more complicated bits of the process. My materials for this is mainly gold(A metal that hasn't shown any side effects to the ender energies used), two ender pearls(One input, one output), and the focus itself to handle the conversion. + +I've managed to finish building two of the �Transportation of matter across two relative positions devices�, or teleposers for short. How they work is simple(-ish): To perform a teleport you need two teleporsers. Next, bind a teleposistion focus to one of them by right clicking on the teleposer, bind it to yourself by right clicking on anything else, then slot it into the second teleposer and apply a redstone signal. If the focus is bound to teleposer A and placed in B, then teleposer B is triggered with redstone, everything above A will move to B, and everything above B will move to A(I hope this is clear enough description, it is hard to put into word the process. If you try it yourself, it should be clearer.). This means that if you want a two way transport, you can have two foci(One in each teleposer) and trigger the one you stand on, one have one focus and always trigger the same teleposer. In theory, we could build a �Transport Nexus� by having an array of teleposers bound to the same one(One A, multiple B's, triggering the B's to do the transport). + +What is great about these teleposers is that they don't just transport people, but any mobs or blocks in range as well. It even functions on complex blocks like furnaces and chests! With a little redstone logic, amazing things should be possible with this simple(-ish) system! With the completion of the final prototype, I should get some sleep... + +A new day, a new idea! The basic teleposition focus only transports a one meter cubed area above it, but if I improve the focus a bit in the altar it will be able to handle a three meter area! Not only that, but it can be further boosted by adding a weak blood shard so it works in a five meter area, then these new demonic shards that Bella has been gathering for a final upgrade to seven by seven by seven area. I should mention that the cost of each transport is based on how much is moved, and how far it is moved. It also has the quirk of being unable to transport people or mobs across dimentions. + +//TITLE Sigil of suppression +After a recent flood where Magus built a ritual right in the middle of the village to save a huge chunk of it, I've decided to try and replicate the effect on a smaller, and much more portable, scale. Thus, I've made the first version of the �Sigil of Suppression�. What it does, in layman terms(You don't wont me to get into the back end details involving temporary storage in a pocket dimension) is create a bubble around you that removes any liquids, replacing it all as you leave. Using this sigil, I was able to take a leisurely stroll under the nearby lake. I am glad I remembered to bring my elemental affinity sigil however, as the early prototype fail on the way back, so I had a very soggy trip home... I �Think� I found the cause of the issue, and have patched it. + +//TITLE Superior capacity rune +Taking a break from the sigils I've been making over the last few months(How time flies...), I have shifted my attention to improving the runes we have available for our altar. After going over the design of the capacity rune, I have found room for �improvement�. I have that in quotation marks because it only becomes greater then normal capacity runes if you have more then fourteen of them. You see, the �Rune of superior capacity� adds ten percent to the altars capacity, and this effect stacks multiplicatively(Layman terms: The more of the rune you have, the stronger the next rune will be) instead of the normal capacity runes static rate. Powerful, if a niche rune. + +//TITLE The rune of the orb +Considering the amount of LP we burn through on a daily basis running our sigils, powering our spells, fueling the rituals, and feeding our tools and armor, it is a miracle we don't run out of LP more often then we do. Even with our soul network topped off with a master orb, we're tapped dry within a week. Just upgrading our orbs has served us so far, but that has shown to be too unreliable and a huge investment with the altar... Wait, we're always using our orbs to make runes to improve the altar, so why can't we make runes that let the altar improve the orb? It can't be a one way road, can it? Yes, if we tweak this here and shift pressure here... I'm rambling again, I must talk with the others about this! + +Yes, it works! By focusing the power of three blood orbs and using two demonic slates, we've created �The Rune of the Orb�. This boost the altars ability to feed an orb(Think of it like pressurizing air, more of it in the same amount of space), letting it add an additional two percent per rune(Additive rate, so more runes won't change how much it adds). With our master orbs, one rune is an additional twenty thousand LP. While that doesn't sound like much(To think, I use to be limited to only five thousand...), consider the number of orb runes one altar can have... + +//TITLE A field trip +After hearing the demands of the younger apprentices, we are leaving tomorrow for a quick tour of the magelands, and expect to be back by the end of this month. Talking with Magus, I agree that we've been pushing ourselves hard lately with work and research. A little rest during a vacation might be just the thing I need to gather ideas for future projects... It will also give me a chance to talk with other mages about setting up a teleposer network. It is a vacation, so a little work on side projects you normally don't have time for is normal right? + +Talking with Magus during the long hours on the road, a few details about the mage guild were covered on this horseback lecture. Largest of the �Nations�, most of the tech focused nations won't touch this area due to the high levels of magic in the land, air, and water causing technology to become a bit more unpredictable(Read: Unstable and often highly explosive), and have instead left it in control of the mages. As a result of this, thousands of kilometers of land filled with river valleys, harsh deserts, frost and snow covered forests, fertile plains and countless other biomes have been untouched for us to expand into. To this day there are people who venture out into these untamed lands hunting fame and fortune clawing over mountains and through the ancient ruins that litter the area. However, the vast majority of settlements are close to the borders with the other nations, thriving off trade(Their gadgets might not function here, but the results are another mater. Most of the mining towns send out the harvested ores across the borders for processing). + +The last tally was done roughly five years ago, with the number of total settlements at around three hundred scattered thin across the mage guild. Of this, we have roughly seventy active mages and thirty classified as �Apprentices� to manage village needs and deal with problems as they arise. Generally one mage would managed half a dozen of the closest villages and any apprentices they take on comes from this area however, it was not uncommon for mages to offload work onto other local mages if they have not the time or expertise in the field and for them to take on students who seek them out as tutor. + +That's enough for tonight, my watch is almost over and I feel sleep calling me. I'll write down any more interesting details I learn tomorrow. + +Magus said we should reach another village tomorrow, and he knows an inn there that should take us in for the night(Just in time as well, I don't trust those clouds on the horizon). Today�s trip was more of the same, ridding through a dense oak forest while Magus went over anything and everything about the area around us and the Mage guild in general. Mages seems to have a list of unwritten rules governing how to act, what to do, what to say... For example, it is recommend to live at least a mile and a half from the closest village. Far enough away that people won't bother you with trivial things and you keep a mysterious reputation with the people, but close enough to be convenient for buying what you need. Another example pertains to marriage: A mage is free to wed whoever they like(Even other mages), but the spouse is entitled to most decisions and any compromises favor the spouse. Being wed to a mage often causes problems for the spouse, often with relatives and friends, and is typically a huge adjustment. Doing anything to try and make it up to them is common, as the mage feels themselves a burden and cause for their loved one's strife. From what I've gathered and how Magus speaks about the topic, these are more general outcomes and human reaction to the same events that Magus has seen happen time and again instead of rules or traditions passed down from master to student. One final interesting fact is that most mages send their children to learn the art(If the child so chooses to take on magic, and the have the talent for it) with another mage, preferably one they have rarely or never met as to prevent any bias and favor. + +I was right about those clouds, and we have reached the small town of Salis soaked to the bone. We're all currently sitting by a fire in the Mundes inn letting our robes dry and bodies warm from the chilling rain(From the clinking outside, now hail). I plan on acquiring another books tomorrow, and writing any more facts I learn from this trip with Magus in it instead of spending the pages of this book(Already longer then I ever dreamed it would be). According to Magus, we should be able to meet another mage in two days time, a woman by the name of Athis who is skilled in botany and herbs(Any medicine made by her always trades for a fair few coins). On another note, what Magus said about about people being wary of mages is holding true. The common room has been divided into two parts since we got here: The side where we are, and everyone else who have gone a table or two away from us and keep glancing at us as if to make sure we don't do anything without giving them a chance to run. The owners of the inn, a small family known as the Eldritches, seem to be the only ones who don't seem to mind us. Their daughter, or at least someone the right age and look to be their daughter, happily walks up to us asking if we needed anything other then rooms while we rested. Vlad and Demir order food for us all, Magus inquired to the drinks available, while I have asked if she knew if the general store had any writing journals for sale. And now I'm at the point of writing things as they happen... I needs some sleep in a nice bed after all this riding(But it looks like Demir is more saddle sore then I am), and the inn keepers have giving us cheap logging in the attic with a few decent, if old mattresses in a warm room with a roof over our heads. + +We left the next morning after a short trip to the market(Where I managed to get a good deal on a fairly nice journal, and have already filled out a few pages on my watch last night), and now are almost at Athis's residence. We currently are taking a short rest to eat and have the horses cool off after a long trip before riding the last leg of the journey after dusk has set. I'll detail anything interesting that happens. + +Talking with Athis, who I have already detailed in the other book along with most of our conversation, I managed to steer the conversation to how often she needs to travel for herbs, and if she has ever been in a situation where she can't get access to anything she needs but another mage might have an abundance of. As a response, she handed me a list of everything she buys when ever possible because of how rare it is here and the versatility or uses of it. The list was ten centimeters thick. Seeing a chance to get another mage's opinion, I mentioned a recent discovery in the field of magical transportation see might be interested in seeing. At this point, she gave me a wary eye and said she still has a bag of purple chalk and a stack of waystones from the last person who said that. Inviting her outside for a demonstration using a few of the teleposers I had packed, I showed step by step the process and how simple it was to use.(It took her a moment to recover from the initial shock of teleporting, but now she takes it in her stride.) Going over a few more details inside with hot tea, I asked if she would be interested in us setting up a link in the area nearby for her to use as a means of transport. Frankly, I was nerves enough at this point that I thought see would just laugh at my new goal. Instead, she was almost begging me to set a few up around a few locations several hundred kilometers apart. At this point I felt comfortable to tell her about my grand plan for setting up one of these near every mage in the guild and at some important points, so the days of needing to travel day and night to reach another mage would be over. Not only was she on board with the idea, she even offered to help us set them up if it meant that it would be ready faster! We spent the next few hours talking about this late into the night, covering little details and about enlisting the help of other mages to set it up. + +//TITLE The key of binding +Well, this has been an interesting trip... We've been visiting every mage we pass, talking and showing off the boons of our blood magic. Most of them have been extremely accepting of our arts, and the ones that haven't been at least aren't opposed enough to get violent about the subject(However, all of them are still welcome to the idea of a transport network). We have noticed one problem on our trip, however: We can't easily give people the things we've been working on, as they need LP to run it and it takes time to reach a point of being able to support the usage of them. We've gotten around this somewhat by binding the items we gave them to ourselves, but anything they make once we've left will be near worthless to them� THAT'S IT! I could make a device that mimics the binding of an item, copying a thread of our soul network to another device, so anyone can craft something new and have us power it. I can use a weak blood shard to hold the soul network thread that it uses to pass on the link... Yes, I should be able to make this easily. + +I really should have slept after getting home, instead of going straight to building something... It took me three hours to think of using gold for the �Key of Binding�. Regardless, it has been finished. All you need to do is right click with it to set the original owner, then hand it off to the person you wish to use it. Then they right click with it, and it will bind the first thing it finds in their inventory without an owner to the person the key belongs to. While it's uses are limited, it is something you want to have around in case you ever need it. + +//TITLE The trials of a T5 altar +In other news, we've started talking about what we do now that we've started reaching the limit of our power once again. I've calculated the number of runes we would need, and have in fact already crafted all fifty two of them. We even have a few guesses on what to use for a blood orb, starting with these demonic blood shards... The problem now is the stabilizers we need. There is only one thing I've found that can handle the strain of the altar: The raw power of beacons. We need four bloody beacons. One is near impossible, four is... We need a miracle to get any farther. Magus says he has some plan, but I think even he is going to struggle with this. Talking with the others, I believe I should focus on setting up �The Nexus� instead of struggling with the limits of our master orbs. This is going to be a project that will take months... I've decided to limit the usage of the Nexus to mages, as public usage would tax my network night and day. I start tomorrow on this task, and plan on cleaning out some ruins about a kilometer to the east of us to set up the Nexus base. I already have a few dozen teleposition foci crafted, and enough teleposers to set up over a dozen locations. First on my list, Athis... I'll leave this book here, and will document anything that happens in my other book. Once I start research in blood magic, I will write in here again. + +//TITLE The price of power +Magus... Magus has gotten us a reservation to kill Withers. Not only that, but we each must kill one on our own. I said I wouldn't write in here again until research started again, but I felt this is significant enough to mention... We are so close to being able to upgrade the altar. If we live through this trial, that is. + +I have written the details of the last few days in my other book(It has gotten far more use then I ever expected), but we have them. Enough nether stars to finish our altar, enough to experiment with, enough to make being stuck in bed with this broken leg worth it all. + +I have been hard at work since my leg healed, ideas gushing out of me to the point I have almost stopped eating and sleeping(Thankfully, one of the others tend to drag me out occasionally). Time to document the fruits of my labor. + +//TITLE Demonic orb +Our assumption about demon blood shards was right, and after a long crafting process we have the Archmage orb. We had to spend several hours trying to fill this orb, and finally hit the cap at ten million LP, ten times the size of the master orb... We also have graduated up to the slate dubbed �Ethereal�. I know this isn't much fan fair, but this has become a bit of an expected event. + +//TITLE The unspeakable power of the energy bazooka +First thing I created with this new orb was an improvement to the energy blaster, as I felt it just wasn't strong enough during the fight with the wither. Harnessing the power of a few reagents and a demonic blood shard, I have created the �Energy Bazooka�(Not a clue what a bazooka is, but Demir tells me they shoot big explosions). Costing twenty thousand LP a shot, it launches one main projectile that upon hitting something explodes into twenty more smaller explosive projectiles to devastate other living things around it. I have tried tweaking it so that terrain isn't harmed, but there may be minor damage depending on what is hit. There is a �Slight� problem of recoil, but nothing we can't live with. + +//TITLE Acceleration runes +Moving my attention on to runes for our wonderful new altar, I had revelation as I noticed a speed rune next to a dislocation rune: Increasing how much LP is moved from the buffer is fine, but how about increasing how often it transfers LP? Using a few materials like buckets and an ethereal slate, I have transformed a normal speed rune into something far greater. Instead of effecting crafting speed, one rune will lower the delay the altar has on moving the contents of the buffer by a twentieth of a second per rune. I have noticed a strange limitation, however: Any runes beyond nineteen seem to have so little effect it isn't noticeable anymore, so you can only have the altar transfer nineteen times a second. I will need to run some experimentation on the best ratios of acceleration to dislocation runes... +//TITLE The Harvest goddess +Bella has dragged me with her to town so she can be sure I'm out of the lab for a while(I have noticed I'm a little pale, but I just assumed that was from all the sacrifices I've been making lately). As we ate two sandwiches at a bench on the edge of the village, I watched the farmers in the field slaving over the harvest while trying to outrun the storm just visible in the distance. Talking with Bella about ways to help them, I created the basic idea for the sigil now known as the �Harvest Goddess�. It is to the �Reap of the Harvest Moon� what the �Sigil of the Green grove� is to the ritual of the green grove, performing a similar effect to the harvest moon around the user by summoning a little demonic imp(You can thank Bella for this part). As soon as we had a version ready, Bella ran out into the field with a green grove, haste, and magnetism sigil to quickly run through the field collecting the harvest behind her. Needless to say, the few farmers in the field were awe struck by this sight and a few of the newer ones thought she was a goddess sent to answer their prayers(And I liked the sound of it, so we now have a name for the sigil). + +//TITLE Solving a demon problem +A mage can never get a good rest without something happening... Magus has finally launched an operation to deal with the demon portal, and has asked Vlad, Demir, and myself to lead the siege team. He has cooked up some complicated plan that only he knows all the details, and in fact might be the only one who even has any idea if it might work(Quite a few of us felt lost when he gave the basic overview of the plan). One question asked at the meeting that felt quite memorable was �Wait, how are you able to replicate this portal?� Magus only smiled and asked him �At what point does science stop being science and starts being magic? It is the same principles and theories at work, just a different means of execution.� For Magus, that seemed to answer everything. Gah, I need to focus on packing for the trip as we won't be back for a few weeks. I feel like I heading out for war, and I guess in a way we are... + +Alright, I did not expect to find a camp of demons when we warped to Venric's folly. I expected a hole in the fabric of space, I expected a few demons, but a little village... Not to mention the fact that I had to save a fairly inexperienced thaumaturge who hasn't dealt with demons before. He rushed in, thinking he would show off a bit. To his credit, he did manage to kill a few demons before the hoard took him down. I had to run in with a teleposer to save him, but we did discover something important: From the vanishing remains of the demons, I retreated two crystals. One was a shiny red we have named a �Life shard�. The other a brilliant blue we have dubbed a �Soul shard�. What is odd is that my bound armor seemed to react when I touched them, and I saw a few stray strands of soul strands between the demons and these shards. But that isn't what was really odd. + +I was spotted by one of the demons when I went to save the fool, and noticed two things very quickly: The demon had a connection to the portal with a few soul stands. The second thing was that it seemed to be... Vibrating? Closest word that comes to mind when I think of it. Shortly after that, two things happened: The demons started running towards us from every part of the village, and for a few hours after we left the camp seemed to be under a lockdown. The demons had doned armor, and were patrolling the area instead of building. These guards seemed a little stronger then the others, but tomarrow I plan on mounting an operation to collect more of these shards for research... + +//TITLE The T6 altar already +From what we have learned so far, these crystals seem to be ordinary crystals(Well, ordinary as anything from Tartarious can be here) filled with demonic aura and... changed by the travel through the portal. These demons have been using them as a sort of personal anchor, an extension of the main portal's influence. I have discovered that mixing these crystals together in a five to four ratio of life to soul shards forms a purple block that is practically pulsating with demonic power. Since we may be here a while, I have started construction of a prototype blood altar that utilizes these new blocks for enough stability for a T6 to be possible. I have yet to try this, but if it works... + +Once again, a theory proved to work out. With the addition of four pillars capped in these crystal clusters, we are able to support another seventy six runes, nineteen on each side of the altar. I have also tried the clusters out for making a blood orb, and the �Transcendent orb� was the result with a cap of thirty million LP. Sadly, I haven't had a chance to experament with this new altar or orb, so I haven't anything else to share yet. diff --git a/src/main/resources/assets/alchemicalwizardryBooks/lang/en_US.lang b/src/main/resources/assets/alchemicalwizardryBooks/lang/en_US.lang new file mode 100644 index 00000000..73b24898 --- /dev/null +++ b/src/main/resources/assets/alchemicalwizardryBooks/lang/en_US.lang @@ -0,0 +1,414 @@ +--Entries-- +aw.entries.architect.intro=My name is Tiberius. I was a kid when the demons came for my village during The Wars. They ransacked the houses and turned the shacks into splinters, wielding fire and water to blast the land asunder. I woke up to some travelling merchants that were passing by, equipping the warriors who were futily trying to drive off the demons that still clawed the village. I was brought to a village nearby, where a magician named Magus helped tend to my wounds. The magic that he used was something that I had never seen before - it wasn't Thaumaturgy, nor Alchemy, and it was definitely not Botany. He winked at me once he saw that my eyes were open, holding his finger to his lips. Fast-forward several years, and I have learned almost everything from Master Magus, being his third student ever to master his arts. Against his wishes, I have recorded my research and put several wards and spells on this book. So welcome, apprentice. I am known as The Architect, and I am a Blood Mage. It took several years of pestering before I managed to convince Magus to teach me. He kept on telling me that, "Magic that uses the life essence of living beings requires patience and preparation in order to master it. One false move, go a little past your natural endurance, and you may find yourself taking a nice vacation in Tartarus." The thing was, I wanted to go there - I had some unfinished business with the demons. The process that Magus originally constructed required powerful artifacts that he constructed himself, but were rather lacking where teaching was concerned. After studying a bit of alchemy and the process of "Equivalent Exchange," I managed to construct myself an altar that would transmute items inside of its basin into new powerful forms. The only issue was that it needed a worthy catalyst, and so with a prick of the finger I set the Blood Altar alight! +aw.entries.architect.bloodAltar.1=To start any form of transmutation involving blood, you would need to construct a blood altar and a sacrificial knife, as well as have a solitary diamond in your possession. After placing the blood altar down, Magus advised me to be careful as I filled it slowly with my blood, and said that I would need to be really close to the altar (about a metre) for the knife to work. With about 2 buckets of blood in the altar, which Master Magus reminds me is about 10 hearts worth, I placed the diamond inside of the altar by activating it with the diamond in hand. +aw.entries.architect.bloodAltar.2=The blood dissipated in a cloud of red swirls as I waited for the atoms of the diamond to shift and reform. There were a few moments where the particles turned gray, which meant that the altar was empty and I had to hurry to fill it. After the diamond burst in a shower of red particles, what finally sat in the altar was a Weak Blood Orb. +aw.entries.architect.soulNetwork=One thing that I initially didn't understand was the overarching connection between the blood orb and myself. When I initially met Magus, I could see many sparkling strands branching off of him, flowing throughout his house and linking with intricate stones and runic drawings. I asked Magus about the strands, but he had no clue what I was talking about. It took three years of thorough research to finally find the answer, and when I brought my notes to him he was really impressed with what I have found. When you send power into the orb, the energy is transmitted from the strand connecting the orb and into the very soul of the person the orb is bound to. Similarly, and Magus managed to show this effect with several of his rituals, when you use something that drains energy it will drain the energy directly from the soul. The thing is that if you use an item whose owner has no energy left, the item will instead grab the requisite energy from the user of the item. Directly. From his or her life force. As such, the unit of measurement is called "Life Points," or LP. I experimented with this, and one heart equals 200 LP. I have christened this system to be the "Soul Network," and is used in all branches of Blood Magic indirectly. +aw.entries.architect.blankSlate=Magus is a master at rituals. His power in the intricate layering of stones and inks is unmatched. The problem is that these rituals are rather... static in nature. Sure, being able to call the bounty of the earth to the surface is all fine and dandy, but won't exactly protect you when you are on fire. To this end, I decided to link my soul network to powerful items that I have created. To start, I decided to transmute a piece of smooth stone in the Blood Altar with just 1kLP to create a blank slate. +aw.entries.architect.divination=The first thing I did was to arrange the blank slate with some reflective glass and my weak blood orb. Pouring my power into the configuration created a Divination Sigil, which I could link to my network and see how much power that my soul network holds. What is more, holding the sigil to the Blood Altar flooded my mind with information, giving me the knowledge about its current tier, capacity, and even how much it was holding. Happy with the sigil, I brought a fresh unbound one to Master Magus for him to use. When I took the divination sigil back in my hands and tried to use it to view his network, for some reason I could not gleam any information from him. I don't really see why this is, considering that I used this same method for other people and I saw that they had no power at all, but to gleam actually... nothing from Magus is strange. +aw.entries.architect.waterSigil.1=I've been training my body, lately. Master Magus told me that in order to extract most of my power, I have to get my mind, soul, and body into as perfect shape as possible. Even though my mind takes time to hone, and my soul requires methods I have yet mastered to strengthen, my body is something I can actively manage. No more cookies for me, apparently, since they have horrible saturation for the work I do. And it's hard to grow cocoa right now, anyways. The temperature is ridiculously high, and with it the humidity is pretty freaking low. Some bright spark of a thaumaturge got it into their head that it would be good to open up the Obelisk to the far north of the village, and because of it a large influx of taint spewed forth from the eldritch tomb. It looks like someone wasn't focusing enough on their sanity training! Thankfully Master Magus decided to head out to the site up north with a few stones and a new vat of ink, saying over his shoulder that he had a new ritual that he'd like to test to fix the problem. +aw.entries.architect.waterSigil.2=In the meantime, I was tasked to create something to fix our water problem. I thought about perhaps cooling the environment around the village in order to condense the water in the air, or perhaps find a way to create rain - neither of which I would be able to accomplish, because I'm sure that either task would take more than the 5 kLP capacity I currently have with my blood orb. So, I had to think small. At my desk, I mixed some dirt into the spare water I had for experimentation and started to paint on one of the blank slates I recently created to layer a bit of a base. Once I was satisfied, I took a bunch of buckets (to be safe in case that what I did would fail) and arranged them around the damp slate and then took my orb from the chest nearby. I then tapped the orb onto the slate, and the water started to boil and swirl out of the surrounding buckets, rushing into the slate! After a quick, bright flash, the new sigil lay steaming on the table in a puddle of water. Thankfully the sigil was what I needed. I could link it to my network and place water wherever I wanted by simply tapping it on the ground. The water was pricy, requiring a full 100 LP for each bucket's worth that I created in the world, but for an infinite supply of water, creeping upwards to 50 full buckets for my puny network was something that I desperately needed. It's just a shame that it started to rain an hour after I created the sigil. +aw.entries.architect.lavaCrystal=There was an explosion in the lab today as I was trying to work out a few more artifacts. When I tried to infuse a few buckets of lava with my power, and used some glass to contain the effect, the assembly simply burst into flames and flew me across the workshop. I wasn't really hurt, and thankfully my water sigil was used promptly to put out the fires, however it seemed that my experiment failed rather heartily. Apparently I needed just a little bit more time, however, since I got it to work a week after. By combining some glass and obsidian together with a few buckets of lava, and throwing in my blood orb and a diamond to hold it all together, the diamond was transmuted into a fiery crystal that seemed to... do nothing at all. I peeked out from behind the blast shield, since by then I learned that playing with lava was not the safest of hobbies, and gingerly linked the crystal to my network. As soon as the pact was completed, I felt a wave of heat emanate from the crystal, and promptly tossed it into a furnace before it could burn my fingers. I was unsuccessful on that front. The furnace immediately kindled, and the pork that was sitting in the top slot began to cook quickly. Quickly feeling a wave of nausea, I checked my network out and found that I had nothing left to offer. Once I pulled the blasted thing out of the furnace and stuffed it into a chest, the nausea subsided. So this Lava Crystal could work in any sort of furnace and feed off of the owner's network, but if the network was dry it would instead cause the owner to feel a hearty blast of nausea unless removed from the solid fuel-burning machine. Good to know, since now I know of a way to trade my services with the blacksmiths in the village. +aw.entries.architect.hellHarvest=Finally, the day that I have been waiting for the past 7 months has come. The "Hell's Harvest Festival" is a day that the village celebrates the creation of the first portal to the Nether a century ago. It's funny that when I ask the villagers why it is that we celebrate the formation of a portal to Hell, they simply laugh and say that I'll see when I finally go in. The portal was located in a vast stone cathedral, a three day's walk from the village on foot. Magus said that he'd meet us there, because he had a few things that he needed to prepare before actually going over to the Nether, but I was curious as to how he'd make it there in time - knowing Master Magus, he'd spend a day or two reading up on a new theory for a ritual and forget himself in his works. When we entered the hall, however, Master Magus was there already talking to one of the guards of the unlit portal, stowing away a gem into his pocket. I knew something was up, because I could see a strand connecting the gem in his pocket to both himself and one that trailed off back to the village. Not wanting to be distracted, I pulled out my wand (Master Magus insists on all of his apprentices learning of another field of magic, and Thaumaturgy has proved itself useful) and set alight the portal as was the custom of the newest member to the harvest. It seems that the harvest, however, was not exactly a trade. I saw giant stone walls and vast pumps throughout the land, grabbing all of the lava from the great pool below. A large collection of bound pigmen walked by, led away by someone in a full set of shining steel armour. Huge machines that processed the lava were emblazoned by the brands of industrialization: Thermal Expansion, BuildCraft, Greg Tech, and many other labels dotted throughout the base of operations. So much for a festival - it seemed that the Conglomeration, the governing body that oversaw all of the villages in the land, saw it fit to turn a civilization into a circus. +aw.entries.architect.lavaSigil=After accepting a few supplies from the farce, I walked back home by myself two days early. There were some things that I wanted to create, but wasting my time there would have been fruitless. Clearing my desk of debris charts of alchemical constructs, I set to work with a vat of magma cream that I brought with me, attempting to combine it with another slate. Casting my orb aside, I fished the lava crystal from my chest and combined it with the cream and some fresh buckets of lava - thankfully not from the Nether. Once the light faded, I picked up the new Lava Sigil that lay in front of me. What this sigil does is it siphons energy and uses the properties of the lava crystal to super heat rock, creating a source of lava wherever the wielder touches the ground. So, infinite lava, and infinite fire hazards. Unfortunately, it takes about 1 kLP per single use, which is a lot for my network as it stands currently. It looks like I need more power, but seeing that Master Magus is currently enjoying himself at the festival, I'm going to have to find a way to boost the blood altar myself. +aw.entries.architect.blankRunes.1=Of course! Runes! Why didn't I think of this earlier? The power of the altar itself comes from the structure of the components used to create it. The force of the diamond alone is not enough to create stronger materials through transmutation. What I need to do is construct several runes to extend the altar, and thus the altar's power. The only thing that I could do on such short notice is to take several blank slates (I have about 16 left) and quite a bit more stone and combine them with my Weak Blood orb. +aw.entries.architect.blankRunes.2=What came next was the hard part. After I made 8 runes for myself, I sat puzzling over the altar. "How could I extend this thing?" I asked myself. It took a few hours, but when I placed the 8 runes in the ground around the altar in a ring, I felt a strange reverberation in the air. Something felt like it awoke, as if the power in the surrounding environment doubled. Quickly, I grabbed my Divination Sigil and slapped it onto the altar, and focused into it to view the power of the altar. I was pleased to find out that the altar was finally at its second tier, which should open up many more transmutation recipes. The problem now, as I sank slowly into my bed to sleep after the long day, was to find out what I could now do. Although Magus was pleased with the upgraded altar, I was caught in a bind. I couldn't seem to do anything with it that the previous altar could not do. The first thing I did was I placed one of my leftover blank slates into the basin, and it promptly consumed 2 kLP worth of essence as it reinforced the structure. Although this Reinforced Slate was much more durable, this process appeared to make the slate no longer work with creating both the lava and water sigils, as well as making it a waste to use in additional rune creation. +aw.entries.architect.speedRunes=I can note, however, that when I combined one of the runes with a few more blank slates and some leftover sugar from the harvest it seemed to augment the altar even further. The sugar had to be laid in a configuration that mimicked a bow and arrow on top of the rune, and by doing so it created what I can dub a Speed Rune. What this rune appeared to do was increase the speed of the altar's processes, both the transmutation rate as well as the speed that a bound orb will consume the essence from the altar, by an additive 20% per rune. This tier doesn't seem perfect, however, since it seems that for the second tier only the four edge runes (not the corners) could be used as upgrade "slots" for the purpose of augmentation of the altar. +aw.entries.architect.apprenticeOrb=The "eureka" moment came when I accidentally dropped a few things on the floor of the lab. When I bent down to phish the items from the floor I noticed that one of the emeralds rolled right up to the altar, almost as if it longed to be inside of its basin. It occurred to me that if a simple diamond inside the altar created a weak blood orb, perhaps a much rarer gem would make a stronger version! Quickly fetching my knife from the table, I filled up the altar over the course of the day so that I could make sure I didn't mess anything up, and then dropped the emerald into the altar. The speed runes made sure that the transmutation took no time at all! Wow, those things work fast - I better make a note of removing the runes when I try to create more difficult items inside of the altar, because if I was not prepared it would have chewed through my supply in no time! After a few tantalizing moments waiting, the altar burst in a shower of particles and the new orb sat there, revolving on top of the altar. Master Magus must have heard my shout of exclamation, because he hurried over from his side of the house and helped me to my feet. Not noticing the pain in my palm from earlier, I reached for the orb and sealed it to my network. Master Magus then helped me to fill up the orb inside of the altar, and when we were done that day I had a total of 25 kLP inside of my network. +aw.entries.architect.voidSigil=After resting the rest of the day at the insistence of Magus, I returned to work this morning full of inspiration. While I laid in bed half awake, the thought struck me that so far I had managed to use sigils to create fluid. So why not make one that can remove it? My first attempts with things like glass bottles and bowls failed with all of them working for a brief moment, then returning to their old forms. It was almost lunch time when the thought crossed me that I used buckets for the first two, so why not here? Half an hour, six buckets, a bit of twine and a reinforced slate later I had my first void sigil. +aw.entries.architect.airSigil=While tending to our small farm a few days later, I noticed a bird land on our fence. I turned to face it as it flied off, and had a revelation as I watched how it flew. If I could use magic to create the gust of wind like that made by bird wings, I could fly through the air! After hastily finishing the days' chores, working out details in my head all the while, I rushed to my workstation to start work on what I have now dubbed the "Air Sigil". Using feathers and a Ghast tear as ink on a reinforced slate, I formed a sigil that on use creates a rush of air behind where you face to propel you forward. Flight using this sigil is fast, if a little pricey and hard to control, not like the flight provided by Magus's thaumostatic harness. Also, landing is a bit of a problem as I learned the hard way... +aw.entries.architect.sightSigil=I've grown a little annoyed at my divination sigil. While it is able to read the current tier and essence of a blood altar, that is ALL it can read. As a result, my current goal is to improve its design using my new blood orb. So far it is going well. The "Sigil of Sight" is able to read the buffers of the altar to give how much they store, as well as how far along a craft in the altar is and how fast it is using LP. The downside of this upgrade is that it loses the power to read the altar's tier or the users soul network, but so far this is an unavoidable loss. For now I'll settle with what it does now, and might try to improve it further later. +aw.entries.architect.advancedAltar=Even after all this time, I still don't fully understand the blood altar. Sure, I built the thing, but... It is almost like working directly with raw life essence has given it a bit of life of its own. After running a few experiments to try and make my life easier, I've noticed some odd behavior coming from it. First, I tried using some basic piping to extract life essence to store later to use for more pricey infusions. As it turns out, the altar doesn't like giving up its essence. I managed to get a bucket of LE out before it seemed to slow to a trickle feed, nothing more the 20LP a second. Further tests show that it has a "Buffer" tank that siphons off LP from the main tank, holding roughly 10% of the main tanks capacity. As I mentioned, it does this very slowly so piping is out of the question for now... A later test shows that it also doesn't like essence being piped in, as a similar restriction apples to imputing essence. I will defiantly need to find a way to improve this transfer rate... Another strange phenomenon about the altar is its "Hunger" for life. After the failure of the piping, I tried using a few regeneration potions from the local village to speed up the rate at which I recovered health. A normal or extended potion seemed fine, and were very effective for speeding up slate production. But a strengthened regeneration potion caused the altar to have a slight "Hum" about it, and I felt my energy being sapped by something. After talking with Magus about this, we have determined the altar senses the life flowing through us, and the potion makes the altars "Hunger" for this life create a sort of aura that causes you to lose energy akin to hunger. As a result of this, regeneration is still effective, but a sizable supply of food is needed for extended use to recover energy. +aw.entries.architect.fastMiner=I've decided to experiment with passive effects for sigils, since everything so far has been an active effect. While wondering through town looking for supplies, I noticed people cutting wood for a fire and some smashing stones to build a small fire pit. I keep coming back to how slow both of them were in my train of thought, then started going over ways to improve the tools. Then it hit me: Why improve the tools when you can improve the person? A few anatomy books and failed tests later, I hand the sigil of the Fast miner(Name pending) and two very tired arms. After activating the sigil, it speeds up muscle movements in the arms allowing you to break blocks far faster at a small LP cost every few seconds. I do need to keep reminding myself to turn it off when not in use, but the stinging pain of life essence being taken is always a quick reminder... +aw.entries.architect.soulFray=Today I pushed myself too far. I've gotten close a few times, but today was the first time I have passed out due to draining too much life essence. Magus was thankfully with me at the time, and moved me to a bed to recover. As I regained my senses, I noticed something odd about my soul network thread: They were thin and looked damaged. As I kept watching my threads, it seemed like they were slowly reforming and repairing themselves. I mentioned this to Magus, and we theorized that after coming so close to death my soul was still recovering from the shock. I made a sacrifice at the altar to test this, and it seems that this state effects how much life essence a heart is worth quite negatively with it only giving a tenth the normal amount. +aw.entries.architect.greenGrove=Today Magus showed me his green grove ritual, a way to speed up crops. Unfortunately, it is very static and has a small range, limiting its uses. To amend this, I've been toying with the concepts behind the ritual in an attempt to make it more portable. By creating an ink from oak saplings and sugarcane, then inscribing a rune on a reinforced slate I have created the sigil of the green grove. It seems a little slower and more expensive then the ritual form, but it can be carried on your person and acts like bonemeal when used on plants. While I had it active I could barely keep up with our farm, and by the end we needed to give a few of our neighbors some of the excess we didn't need. They all accepted it, but with varied degrees of reluctance. +aw.entries.architect.dagger=My work on sigils has slowed for now as I'm reaching the limits of what my little green orb can do after only two weeks. As a result, I have turned my attentions to other aspects such as runes to pass the time. Magus is currently out dealing with a large forest fire to the east of us, and the village is in a bit of a lull with nothing planed for several weeks. Right now my task is to slaughter a few chickens Magus brought home from the market to prepare on his return home, and it seems the perfect time to test an idea I've been thinking about for a while... I will not mark it here, just in case it is another false hope. Success! I've managed to perfect my idea for a new source of life essence. Before the only option was to cut ourselves to give our own life essence to the altar, but now we have a way to use other living things as a source. Unfortunately, it is a little gruesome and a bit "All or nothing" from them... Regardless, it works! ...I have realized that, in my excitement, I may have forgotten to write down what it is. I call it "The Dagger of Sacrifice", formed in a blood altar out of an iron sword and 3K LP. The dagger doesn't deal much in the way of damage. It doesn't need to, as its main purpose is to "Mark" a living thing for the altar which takes care of the rest by forcibly extracting their life essence all at once. Through my tests it seems that your common farm animal's life isn't worth nearly as much as a person, only giving 250LP regardless of where it comes from. While I set about cleaning the animals after the tests were done, a common zombie managed to sneak in the door I left open when bringing the chickens down here. As soon as I noticed it, reflexes that were being drilled in by Magus every morning kicked in and I managed to poke it with my dagger before it had a chance to hurt me. At first I thought nothing happened, then it fell to the floor as lifeless as it should have already been. I glanced at the altar, quickly noting that a zombie was worth 500LP. Looking over the fallen creature as it started crumbling, I noticed that some of the defenses Magus had set up took there toll on the zombie as it was burned and freshly cut in several areas... Seems that the amount of HP they have is irreverent to the altar, giving the same amount of LP regardless. As I finished preparing the meat to cook after disposing of the zombies ash(Which reminds me, I wanted to look up why this happens...), a very dark thought crossed my mind. The knife works by giving life to the altar. The dagger works by taking life forcibly from a target. What would happen if a human was marked by the dagger? I asked this to Magus, after showing him the dagger and telling him everything that happened. "In all honestly, I'm not sure. I have a theory, but I don't really feel like testing it..." I asked him to elaborate, so he told me the basics of it. It seemed that source of the life essence mattered with the dagger, since the chicken and zombie gave two different amounts, so depending on the person in question they would be split into one of three groups: Passive, Hostile, and Innocent. The passive would be like the chicken, only giving a little. The hostile would be the bandits, the thieves, the murderers. The ones who gave into evil, and now seek to hurt or steal from anyone. The unredeemed, and would probably be like the zombie. The final group were the innocents, anyone who doesn't fall into the first two groups. It was nothing but a guess, but we agreed that using the dagger on an Innocent villager would extract all of their life essence like ours. 2K LP, all at once... We also couldn't work out what would divide the passive from the rest, but it was only a theory so we put it to rest. +aw.entries.architect.sacrifice.1=Looking at these little speed runes, I have decided to see what else can I make. My goal isn't anything in particular, just improving it in some way. The speed rune was made with powdered sugar, so another type of powder should work... Redstone failed, gunpowder failed, glowstone... Glowstone worked. I currently have no idea what it does, all I know is it didn't fall to bits seconds after creating it so that is progress. The altar seems to accept it as a proper rune, so all that is left is to run a few tests in the morning. For now, I am tired and feel a bed calling me... I've run dozens of tests trying to find out what this new rune does, after two days of obsessing over this I finally noticed it. It slightly increases the amount of LP self sacrifice gives. When I said slight, I mean one rune increases LP gained by ten percent on an additive rate. For those who don't understand that, it basically adds an additional twenty LP per self sacrifice. If my theory is right, I should be able to make a similar rune for normal sacrifice... What else would the altar respond to? +aw.entries.architect.sacrifice.2=Well, if there is anything thaumaturgy and magic in general has taught me, it is that gold is a very good metal for magic. By simply replacing the glowstone in the recipe with gold ingots, a sacrifice rune is formed. It has the same additional ten percent addition per rune per sacrifice, meaning the more LP of the mob sacrificed the more LP the runes adds. This has got me thinking... The altar was constructed with both diamond and gold. It seems to resonate with the diamond enough to make the first blood orb, and even a second, so why not try making one out of gold? I'll need to revisit this idea later as a test run showed some reaction to a block of solid gold(I didn't ask Magus where he got it, and he doesn't seem forthcoming about these matters), but the altar couldn't cope with the strain needed to shape the block. Before catastrophic failure happened, a few safety precautions Magus and I had built into the altar triggered, stopping the transmutation before... Well, neither of us are really sure what would happen. But Magus said he has dealt with matters of unstable and untested magic, and knew most of them end with a crater in the floor(Hence the safety precautions). It has been a few days since the experiment with the gold block. Magus and I have been discussing what to do now, as the altar is getting bigger then the basement. Magus has suggested moving it to some of the lower basement floors, but considering just how large it might be in the future... I finally got him to agree to building it behind his home, as long as I helped put up a few wards and spells to keep people away. Currently we're planning out the structure and needed runes for upgrading. The current altar only has eight runes, but what I have planned will more then triple that number to twenty eight. The current limitation we suffer is the strength of the altar itself, as it can only take power from runes adjacent to it. My plan is to use something the altar is naturally attuned to as a way to not only increase the range of this effect, but act as a counter balance and stabilizing it to prevent it from becoming uncontrollable. For this to work, the blocks in question must be above the altar and an equal distance apart. We've run several tests and calculations, and have a layout in mind for this upgrade. Four pillars topped with glowstone blocks, twenty runes in sections of five, built one block down and two out from the last set of runes. In theory this should provide a huge boost in power to the altar without risking our safety(Well, more then we normally risk it), but until we test full scale I can't be sure. For now, we have a lot of runes to make. After much debate we've decided to invest in the "Self sacrifice" runes, as having a steady supply of mobs will be tricky. But now I face the issue of making dozens of reinforced slates... I need to think on this. +aw.entries.architect.bloodPack=It's so simple! I've discovered a way of obtaining LP for making slates that means I don't wait at the altar all day: The Blood letter's Backpack. Made with a modified leather chest-piece with a blank slate reinforced glass tank, it allows the wearer to gather LP by feeding it into the pack over time. Whenever the wearer has more than five hearts, the pack will drain their life and store it inside up to 10K LP to be dumped into an altar later. This pack does have two shortcomings, however. When the life essence is deposited into the altar, runes will have no bonus to the amount added. The second problem is that the altar will only accept LP from the pack when not performing a transmutation. Despite these limitations, it will prove quite valuable for simply allowing me to step away from the altar to do other tasks. This is a simple progress update, as it's been a few weeks since I last wrote in this journal. I've been making slow, but steady progress with assembling the slates needed for the runes and we're now halfway through. This isn't the only reason for the lack of entries, as I've been preoccupied with my research thorough thaumaturgy. An old friend of Magus has been visiting and happens to be a well versed thaumaturge, and he has been giving me pointers on how I could be doing better while Magus has been preoccupied in his library dealing with a mountain of paperwork. Now that Master Ridden has returned home, I hope to progress farther in making runes in the next few days. +aw.entries.architect.fivePeople=Or not, as it seems Fate has other far more interesting plans for us. Today we had a knock on our door while I was making the last of the runes, and after opening it was greeted by three apparent orphans. The two boys in the front looked like they were brothers, or at least close relatives. The girl hiding behind them on the other hand had a very different hair and eye color, so relation was unlikely at best. All of them were covered in dirt, clothing ripped, torn, and patched with various levels of skill. The one on the left had an old sword with a chipped blade on his side, was slightly thinner and taller then the his brother, had a few deep scars that looked recent, long and messy dark brown hair, and was looking at me with a kind poker face. The brother looked more muscled, and was staring at me with a very analytical eyes and a similar poker face, his hair was slightly shorter and lighter then his brother. From what I could see of the girl, she had a simple dress on that was almost caked in dirt and dried mud. The fabric near her elbows was becoming thread bare, and a large rip near the bottom of the dress exposed some of her right leg. Her hair was a light blond, almost pale white color, but the most shocking feature was her eyes... I haven't seen haunted eyes like that in years, and last time it was in a mirror. From the looks of them, all of them hadn't ate anything in days and seemed to have everything they own on their bodies or in the simple packs on their backs. I asked them if there was anything they needed, to which the elder brother said they were looking for master Magus. I called Magus to the door, visitors being a rare thing as it stands with ones who ask for him by name and not clearly mages being rarer still. Five minutes later we all sat in the main room, eating simple sandwiches I had prepared for us all at the request of Magus. Needless to say, this day was not going as expected. Magus spent the next few minutes practically interrogating the elder brother , asking questions on both of our minds. As it turns out the two brothers, Vlad and Demier, use to be caravan traders, eldest a alchemist with basic knowledge of potion brewing, younger with enough mana and training already to cast basic spells. The girl on the other hand had a story all her own. From what the brothers had managed to gather, her village was raided like my own was and she was evidently the sole survivor. What shocked me was when they said she was found wandering the ashs, demons having left hours before without so much as a scratch on her body. Vlad was with the traders when they found her, and he was forced to leave them if he wanted to help the girl named Bella. Their story seemed to win Magus over, as he told them he would try to do what he can for them.. Not long after that, Magus asked me to help him do some shopping for our new guests. On the way to the village, Magus asked me what I thought of the three. "I can't say I believe all their story, but I also don't think their lying. Did you notice the girls eyes? Haven't see a look like that since...". Magus finished for me with "Your own?". I nodded at the dark memories of that time. We continued going over the details of their story, but we agreed that just leaving them in the cold wasn't an option worth considering. We decided to at least try to keep our recent endeavors into blood magic a secret from them, but when push comes to shove I think we might have to let them in on the secret. Magus let out a long sigh. "It's been years since I had to juggle this many apprentices at once. I'm going to need your help training them. But something tell me that we're going to be learning as much from them as they will from us..." I asked him why he felt that way, and he said it was just a gut feeling. I must say I had a similar feeling. Things like this don't happen without reason, and of all mages to come to they stopped at our door, something far easier said then done. An hour later we returned home, both our arms heavy with fabrics, food, and other necessities that we will need to take care of the new apprentices. I watched in amazement as the three ate, trying to make up for days with little food all at once. After that, Magus and I laid the three on various chairs and couches to rest, the strain of travel catching up with them. While Magus dug around looking for a few of his old things that we'd soon need, I started creating some new clothing from enchanted fabric for the three to replace their current worn and ratty clothing. Now that that is done, I should try to get some sleep. Something is telling me tomorrow is going to be quite busy. The Early this morning Magus and I started carving out the earth for the three new bedrooms, since the old ones Magus use to have had since been converted into a storage closet, a alchemy lab, and small study. It didn't take nearly as long as I expected with Magus using a few spells to clear away earth while I went behind using an equal trade foci to transmute it into stone brick before gravity caught on. Once that was done, Magus raised a few walls to separate the space into three rooms and a hallway. Only after that was done did I notice the three children had awoken, and were watching us as we worked. Magus told them that he had some spare furniture in some storerooms they could use, but sadly only knew of one bed. It didn't take long for them to decide Bella got the bed, the brothers would make do with a pillow and a blanket on the floor. After that we spent the rest of the day hunting for then moving furniture to their rooms, building little work areas and libraries for each of them. The following day was more of the same, with the evening filled with helping them find books to read from the grand library. Vlad grabbed as many alchemy books as possible, Demir took a few books on spell casting, and Bella took a Lexica botanica to read through. Later this evening, after the three had retired to their rooms, I sat in the main room with Magus, arms and legs aching from the heavy lifting of the last two days. I told Magus how I thought their rooms should be almost finished, and how I spent the last hour before they retired just answering seemingly endless questions. "I'm sure. I've gone through the same more then once, when I have apprentices new to magic. You were the same, I recall." I opened my mouth to protest, but closed it as I thought back to those days. I decided I probably was as bad as them, and left it at that. It's been just over a week, and the three have settled in nicely. They join Magus and I in morning exorcising, have started studying like true scholars, and have calmed the hungry nodes in their stomachs(Well, Vlad and Bella have. Demir on the other hand is another matter, but I feel he will always be like that.) Unfortunately, like true scholars and mages they've stumbled into places we didn't want them to go. Vlad has created a chemistry set that uses life essence from a blood orb as a fuel source, Demir has turned an old table into a way to use life essence to cast powerful spells, and Bella... She's left me questioning what I know about demons, after taming one and using a blood orb to bind it to her. All three of them have stumbled blindly into blood magic, and now I don't think we'll be able to stop them. Magus and I have agreed to give them a choice in whether they are blood mages or not, but I've seen the light in their eyes... I can't imagine any of them saying no. To seal their dedication to the art, we will have them make blood orbs of their own to use. +aw.entries.architect.tier3=Even with all the chaos of the last week I've managed to finish the altar construction, and it has been more successful then I predicted. With full access to twenty eight runes, each heart is now worth over seven hundred LP. I've already started prepping to try again with the gold block, having a few instant healing potions at hand. I got a brief glimpse with my sigil of sight, and this transmutation will take twenty five thousand LP to finish, over double what the altar can hold! Writing this down does give me an idea, however.... I'll need to look into it further once I have finished making this. +aw.entries.architect.magicianOrb=It was close, but I finished the orb today. I was down to the last of my three potions and barely had the strength left to hold the knife, but I pulled through and finished my shiny new blood orb! I've already used it to craft a few things I had made before, and extra lava and air sigil, and it handles it all with such ease! Now that this is finished, I have a small list of ideas to go through... To start off the process, I want a stronger slate. As it stands the reinforced type is cracking under the strain I'm starting to place on it. Well, I got a new slate type when I last upgraded the altar... Let's see if it works again. It does! A reinforced slate in a tier three altar with around five thousand LP makes a new slate... I'll call it an imbued slate for now, and come up with a better name later. +aw.entries.architect.newRune.1=First up to the drawing board: Rune of Capacity. The basic idea is simply to add more room to the altar, so a greater amount of LP can be stored at once to make bulk crafting or difficult crafts easier. Each rune adds 1.5K to the altar's main tank capacity, but what is interesting is that the "Buffer" tanks expend as well to a lesser degree. From a few trial tests(My back is starting to hurt from moving runes all day), the buffer tanks are always ten percent of the main tanks size. This will be something to keep in mind later. After helping patch a hole in the wall caused by Demir accidentally unleashing a spell, then helping Vlad dispose of a few failed alchemical "Experiments", I finally have an hour to myself to work on my ideas for runes. After the success of the last documented attempt, I've been on a bit of a failure streak. I've have runes fail to do anything, crumble to dust, blow up, and one attempt turned into cheese(I asked Magus about this, and said this isn't the first time he's seen that happen to a magical experiment. However he is just as stumped as I am over why it is always cheese, of all things). Thankfully, I finally found something that doesn't need a blast shield to use or starts growing mold after a while. +aw.entries.architect.newRune.2=Named the dislocation rune, it's only function is to increase the rate the life essence flows into and out of the buffers. Each rune increased the transfer rate by twenty percent per rune, and this effect stack manipulatively. That sounds great, until you realize the first rune only raises the transfer rate by four LP a second. Needless to say, your going to need around a dozen of these runes before you have any noticeable impact on the transfer rate. While these runes make it possible to automate the creation of slates by storing the life essence outside the altar, you're going to be sacrificing speed, capacity, and generation efficiency for this. +aw.entries.architect.magnetism=It's been a few weeks since I last made any headway with my blood magic research, needing to help with the tutoring of Vlad, Demir and Bella along with my normal duties as a mage. I've had to leave twice this month in order to sort out some mess or another, whether is be a helping with a pack of wild wolves or a bad harvest. Today, however, I managed to get some inspiration for a new sigil. When I was in the market buy more food, I noticed two children playing with a rock that was slightly magnetic. They were just running around, seeing what it would stick to and cheering when it did, or seeing how close they could push it to something before it pulled itself closer... That is what sparked my idea: A sigil that acts as a magnet, pulling items off the ground closer to you. In theory I could rig the magic on it to apply a similar effect to all items and not just metallic ones... Three hours later, and my sigil is finished. It needs a great deal of mass in the form of four iron blocks, along with the classic gold plating infused into an imbued slate(Drat, I never did work on a better name). This sigil needs to be toggled to activate, and while active will draw all nearby items to the user if they have room for it. Simple, but very effective.... +aw.entries.architect.phantomBridge=I've been asked to visit a small town to settle a few complaints that have been voiced lately by them, and am currently surprised that a closer bridge isn't one of them. I've had to walk three miles to cross this river, and now must walk another two tomorrow to reach them. If only I didn't need a bridge, or had thought to grab my air sigil(I still have a bruise from the last landing I had with it, so I wasn't keen on using it again so soon.) Wait... If if I had a bridge that went with me? Better yet, what if I had a bridge that formed under my feet as I walked? Yes, that would be amazing... I'm back home after dealing with a feud over who really owned a cow(Answer: Neither of them, it wondered into town and they both thought it was one of their own), and have set out my work station to try and capitalize on my idea. I'd want the sigil to place blocks that are phantasmal, only there temporarily before fading into nothing after I leave. For that I'd need a special material... Soul sand might work... Add in a little stone for structuring around an imbued state, then use the orb... Done! Now then, for a test run... Drat, I left the auto-writing quill running again. It works better then I hoped! The sigil creates a small five by five platform under me, staying at the same elevation as I walk through the air. Not only that, but I've tweaked it so that holding shift lowers the platform by one under you, and the blocks it makes can be easily broken for a quick decent. Not only that, but it will only spawn the blocks if you are on the ground, jumping or flying will not cause the bridge to reform until you touch solid ground, unless you hold shift forcing it to form under you. And for one final convenience touch, right clicking a phantom block with a block replaces it with that block, making roofs and platforms far easier to build. That should be enough for one night, I'll dub this sigil "The Phantom Bridge" and call it a night. +aw.entries.architect.holding=Vlad asked me to help him today, requesting my assistance learning the sigils. Part way through he asked if it was ever burdensome having so many on me at once... And I told him it was. Now with a little of his help I've created the sigil of holding, and it... Well, it holds other sigils. Shift right clicking with it while another sigil is in your inventory will cause it to absorb that sigil, taking all of it's powers and allowing you to swap between them with a shift right click. Unfortunately, it can't hold that many sigils(Only four) and not every sigil wants be become a part of it. Also, I had to ask Master Magus for help removing sigils from it as it refused to let them go. For this task he created the ritual of unbinding, a rather grand looking ritual for such a simple task I must say. +aw.entries.architect.elementalAffinity=Demir hurt himself again today with a fire spell that backfired(Well, it worked perfectly if setting the ground around him on fire was the intention). In hopes of stopping further injuries, I have infused the powers of the water, lava, and air sigil into an imbued slate. This seems let the sigil act as protective aura around the user, shielding them from drowning, burning, or falling damage at a high over time LP cost. Since I asked Demir to use it he hasn't burned or bruised himself, but did pass out once from a lack of LP to fuel it. Sometimes solving one problem only makes more... But he has been learning, and I've been amazed at what his spells could do. Recently he made a long range teleportation spell and a flight spell not unlike the air sigil, but far faster. +aw.entries.architect.ritualStones=After a few days of nothing, I turned my attention to the construction of Master Magus's ritual stones. Looking them over, I might be able to replicate their usage and features using reinforced slates and obsidian... Master stone, more complicated then the average ritual stone might be possible if I use my magician's blood orb and four ritual stones to handle the complex nature of it, along with a little more obsidian... Yes, yes it should be possible to recreate them without sacrificing any usage of them. After asking him how he originally made the elemental scribing tools, I believe I can also replicate the manufacturing of them in the blood altar... But it looks like the dusk inks are too complex for this altar to handle, creating an ink closer to dark gray then midnight black... Perhaps I'll have the power to form them later, for now these four will work. +aw.entries.architect.bloodLamp=I had a flash of inspiration today (Quite literally, as watching a few town guards light a replacement torch nearly blinded me from the sudden light). They spend so much on coal and charcoal to fuel those things... What if I had a simple replacement? A near invisible light source that never goes out, can be made almost endlessly, and can easily be carried on your person? Never again would you need to place a torch to light a room, and they can ruin a rooms look(Not to mention the fire hazard they pose, ruining the look even more. "Charred mess" is never in style.). Harnessing the power of glowstone by running a "Current" of LP through it, I can create a sigil that fires a projectile that upon landing forms a stable light source par with that of torch. The only sign of its existence is the light it gives off and faint red particles. While it uses a small amount of LP, the advantage over carrying stacks of torches is enough to justify it. +aw.entries.architect.boundArmour.1=Today Magus gave us a lecture on armors, going over the practical applications(Protection from large pointy sticks shoved in your direction and holding magic to improve the abilities of the wearer), typical construction of armor, and notable armors through the ages (And the very fatal flaws that their owners eventually discovered, much to their short lived dismay). Seeing and reading all this, I feel it is time I take my own try at this art using blood magic. Testing a wide array of materials and structures, I discovered a process to make an almost indestructible metal using a casing filled with life essence with glass hardened with diamonds and reinforced with bright red blood shards(More on their properties later) Magus showed me a while back (Making the prototypes of this armor took longer then you would believe). The process needs the soul of a demon bound to it, but this seems to be a small price to pay. +aw.entries.architect.boundArmour.2=To start, you need to make a "Soul armor forge". This block summons the demon soul and controls the transformation of the "Socket" blocks into proper armor. By placing the filled socket blocks around the soul armor forge in roughly the shape of the armor piece you want with the forge in a gap, you set what it makes. Right clicking the forge will then finish the process, creating the armor piece and binding the demon to the shards inside the armor. You will need to bind the armor to yourself, allowing the armor to drain your network to repair any damage it takes(Another benefit of using blood shards in the creation). After donning the armor(Making a few adjustments, still refining the creation process), I asked Magus to help test just how resistant this armor really is. Several nasty bruises later, we have decided this armor shields the wearer from ninety percent of damage from mundane damage sources. What is interesting is that it also blocks roughly eighty percent of magical damage, meaning many armor piercing methods are far weaker. The metal also doesn't seem to hold enchantments, and the demons inside reacts quite negatively to our attempts to do so. Using the ritual of unbinding, we are able to deconstruct the armor back into the component sockets and anything that was inside them. I mention this because we seem to be able to "Augment" the armor before creation by adding a combination of sigils, blood shard, and an orb. The sigil added to the armor piece(You can add anything to the socket by right clicking with the item in hand) determines the effect, and adds a passive cost to wearing the armor piece. The blood shard lets you add an upgrade, the weak shards we have at our disposal only allow one upgrade but in theory a stronger shard should allow more to be added. Finally, the orb seems to lower the cost of the upgrade. Every sigil seems to have something to do with the normal effect of the sigil, either giving you a passive bonus or having the effect of the sigil happen automatically around you. A few examples are a water sigil making you immune to drowning, the fast miner always active, and a green grove sigil acts around you. +aw.entries.architect.sanguineArmour=I've managed to use my new found knowledge of armors and experience making bound armor to try and improve thaumium armor using blood magic. By throwing goggles of reviling or thumium chestplate, leggings, or boots the ritual transform the armor into a "Sanguine" version, with a small vis discount and protection par that of pure diamond. What is really interesting is that this armor can be augmented with runic shielding, and then socketed into bound armor in the same fashion as a sigil to pass on the runic shielding, with the bonus that adding the sanguine helm to the bound helm well allow the wearer to see things like aura nodes as if you had goggles on. I should note that you can only socket a sanguine armor piece into a same armor type(Helm in the helm, boots in the boots...), and that any vis discount is lost when you do this. +aw.entries.architect.soulSuppress=Having the armors special effects all the time has become a little bothersome. To deal with this I have managed to create an "Armor Inhibitor" to repress the special effects it offers in the cases they are more bothersome then helpful. Unfortunately, it is a bit all or nothing in this regard. +aw.entries.architect.ritualDiviner=It's coming up to the three year anniversary of Magus taking my on as an apprentice. Time seems to have flown by while I've been engrossed in research on applications of blood magic and working with Magus... I should make a gift for Magus to as a thank you for these last few years. Considering the complex nature of his rituals, an aid to building them might just be the perfect gift... Ugh... Making a way to build rituals easier proved to be quite the task(And it reminds me of the rule of conservation of effort...), but I finally have it ready in time for the anniversary. While it isn't cheap to craft(Costing the four elemental inks, four diamonds and an emerald), I've gone to pains to make it easy to use. Shift right clicking will cycle through a preset list of rituals, and shift right clicking on a block with also rotate the direction the ritual will face(For anything like the ritual of speed, where that matters). Shift left clicking will go through this list in reverse, for those times you accidentally go past the one you want. By normal right clicking on a master ritual stone the diviner will take stones out of your inventory, place then in the world and ink them to build the set ritual. To make it clear it is working, it emits green particle effects whenever it places a block successfully. However, it can only place a block in an empty space. Anything at all in the way will stop the process until the obstruction has been removed. It is a small annoyance, but nothing major enough to risk breaking the diviner(Again). Magus adores his gift, having rituals faster and easier to build is the one thing he could actually use(That he doesn't already have). The fact it makes anyone who uses rituals lives easier is a just a bonus at this point. As it turns out, he got me a gift as well: A pair of ichorium wand caps, the one thing I had been dreaming about for a long time... +aw.entries.architect.bloodShard=Reading through my older entries for inspiration on things to do with our current power(I believe we have started reaching the limit, struggling to stretch what we have as far as it will go) I noticed that I "Might" have forgotten about covering the blood shards like I said I would a few months ago... I'd best start from the top. Blood shards, as Magus has likely stated already, are fragments left behind after vanquishing a hostile mob with a demonic weapon(The Bound sword or Energy Blaster). Upon close inspection, I see small strands that looks shockingly like that of our soul networks... Well, in theory anything with a "Soul" could have a network, but this is a surprise nonetheless. Because of this, the small shards contain a vast pool of energy that our magics should be able to tap into. A rather unfortunate first experiment involving stone showed that this energy can be wielded to create or transform matter(I believe several others have come across similar principles to convert energy into matter using science). I say unfortunate because I was stuck inside the lab's supply closet for a few hours to hide from the rapidly expanding stone as the released energy of the shard grew the stone to thirty two times it's former size, filling the rooms and pushing out the open door and into the hallway. (Further crafting of blood stone was done outside after that...) But regardless, the blood shards potential energy and connection to the soul network is how we manged to form bound armor so easily. Thinking about it... Blood shards might be the answer to our power problems. The last time we needed an upgrade, we used something related to the altar... Perhaps using something related to the soul network is the next step? +aw.entries.architect.tier4Altar.1=Once more I must make a progress update, as daily life as taken up most of my time these last few weeks. Magus has started offloading some of his work onto us, dealing with small problems and formal matters, bandits and demons, and general mage work. I have been able to do a little work on the altar or blood magic in general over the last few months because of this. Thankfully, we've burned though most of the grunt work that has piled up and I now have some time to conduct our research. Magus and I have spent the last week doing the calculations for upgrading the altar, determining that bloodstone should work for the capstone, and now it is just a matter of seeing how many runes we can get away with adding without nasty side effects or it all just blowing up(The other three have placed bets on this, I believe). +aw.entries.architect.tier4Altar.2=After another few weeks of testing, balancing, and error we have finished the altar upgrade. This new tier adds twenty eight more runes to the altar's structure(Seven on each side, for a grand total of fifty six), and four pillars capped with large bloodstone brick(This was the best material we could find that doesn't expire or fall apart. Or, in one memorable case, actively try to kill us). With these additional runes we are projected to be making roughly one thousand three hundred LP for every heart sacrificed, a hefty improvement from our seven hundred from before. Unfortunately more work has come in for us, so once we have the altar built it will be some time before we can focus on the hunt for the material for the orb. Current plan is to start with precious materials like before, and work from there. Ah, innovation... Ten percent work, fifteen percent knowledge, five percent patience, seventy percent trying random things to see what happens. More work then expected flooded in at once, and we have been struggling to keep up with it all. Vlad has been acting as a healer and doctor trying to deal with a plague that has going around (Caused by a witch-in-training using the wrong vial in a love potion), and has managed to keep it from running wild. Demir has been clearing out known bandit camps, and has enjoyed a chance to test out the spells we've helped him build(Only in the mage guild are bandits considered an endangered species. This is in part due to the average intelligence level of said bandits, and thinking that an area where there are people who, sometimes quite literally, shoot fire out of their hands, mouths, and other places(Mostly the apprentice mages, as a joke or party trick that has often gone very wrong) is a great place to set up shop.). Bella meanwhile has been dealing with the demons that have been wondering in, the mage guild acting as a sort of beacon to them due to the thinness of the fabric of space here caused by countless magical experiments, both successful and not. Magus and I have been going through a huge pile of letters(Seriously, where are they all coming from, and how do I not notice the pile building up until it flows off the table?) from local villages and mages, ranging from simple questions about an issue or problem to requests for assistance in matters ranging from theft to flooding. We've been coordinating these issues, mapping out journeys to deal with as many as possible on one trip. As a reference point for how long it has taken us to deal with it all, dust has gathered on this book since the last time I wrote. Thankfully we've sorted out the letters and referenced the villagers to mages who are closer to them(Much to said mages chagrin), so it should be a while until this is an issue again... Thankfully all this time has left me with a few ideas for future projects. +aw.entries.architect.masterOrb=The others have tried countless gems and metals trying to create a new blood orb, all of them either did nothing or created a flawed orb(Cracked or chipped, extremely fragile or incomplete). But last night I had an idea from a dream... The weak blood shards were once part of a soul network, so what would happen if we tried to reforge it into a whole orb? It is better then any other idea we've had, so I might as well try... Success! While we did burn through several instant health flasks, we now have half a dozen new blood orbs. While we haven't named them yet, they are a true master piece... A Master blood orb, that name has a nice ring to it... I'm getting side tracked again, but I must remember to suggest this name to the others(It at least is better then the temporary name of "Shiny yellow blood orb"). With this new found power, I might be able to bring to life some of the ideas that have been just out of reach up to this point. The first interesting property of these new orbs has been shown in our bound armor. While lesser orbs simply lower the cost, this orb is able to negate it entirely! A simple upgrade, but a very useful one... Another altar tier, another slate tier. Dubbed "Demonic" after the insignia that has formed on it's surface, we should be able to put this to some good use... I've also noticed that a demonic slate can be used with a weak blood shard and master orb to "Grow" the shard making four more. Going over my earlier successful experiments, I might be able to tweak a few concepts used to achieve a new result. I'm starting with the fast miner, and if boosting my arms was this useful then what would happen if I augment my legs? Using cookies, sugar, and some of the normal materials I have created a new sigil. Time for a test run... Two hours(And two very sore legs) later, I've concluded the tests. The "Sigil of Haste" boosts the users leg muscles, allowing you to both run faster and jump higher then normal. The best part? It seems to stack with the effect of jump boost and speed(Which Vlad was kind enough to brew a potion for testing). Now then, I need a rest after all this... +aw.entries.architect.whirlwind=Continuing with my thought process of "Reworking the old", I have used a master orb, demonic slate, two ghast tears, and feathers to reform an air sigil. The "Whirlwind sigil" changes the core property of the air sigil to have the winds not effect the user by propelling them, but instead creates a bubble of wind around them pushing away many forms of projectiles. I should note that not all forms of projectiles can be pushed back by the winds, and it has a tendency to effect your own shots. It isn't perfect, but it is useful enough to have around in a pinch. +aw.entries.architect.compression=After hearing the local miners complain about always having to stop work because they've run out of space in their packs, I've built "The Sigil of "Compression". While active, the sigil will check your inventory for anything that can be compressed into a "Storage" block(A two by two or three by three recipe of that item that can then be crafted back into the item. An example is redstone into redstone block.) and squeezes it together for you. Simple, but extremely effective... I should note I added a few special cases to the sigil, such as glowstone dust to glowstone and a restriction to only compress cobblestone if you have more then a stack. +aw.entries.architect.severance=Bloody endermen... Magus sent me out to try and stock up on ender pearls, but the pests keep warping away from me only to pop up later(And almost always when I don't want them too). It is just after dawn, and I've only managed to bring back six pearls... But maybe that is enough. I recall seeing some research notes on endermen and how they are able to teleport somewhere in the library. It is only an idea, but it might be perfect for this task... Eureka! After reading through the notes, I worked out how endermen connect to The End as a power source for their teleportation. Using a few ender pearls and eyes of ender, I've completed a sigil that acts as a sort of "Signal blocker". In layman's terms, it disrupts the connection to The End and renders them incapable of any teleportation. Not only that, but it also prevents many forms of magic that relay in similar methods, such as Demir's spells and the barbaric(But nevertheless effective) act of throwing an ender pearl. From the light, I'd say it is almost sunset. Time for some well deserved payback... +aw.entries.architect.teleposer=After my research into the basics of teleportation, a thought struck me: As it stands we don't have an established transportation network for mages to use, instead using the long and winding roads or other means of land travel. Sure, a witch might have a few way stones or a broom and a spell caster has a convenient recall spell, but we don't have a dedicated transportation system. Considering how much Magus and I travel to deal with small matters, and how often mages visit each other it is a surprise no-one has built something like this sooner! After talking with Magus about this, it turns out something like this has been tried before. The main failing point each time was the limited number of people able to use the method established. (A thaumaturge rarely knows how a waystone works and so on.) This has prompted me to create a means of teleportation that, once properly set up, almost anyone can use if they know how to push a button. Further research into ender pearls is required... After close analysis, I've decided that my first priority should be the improvement of the base ender pearl. As it stands, they are a little too fragile and random for reliable long term transportation. By placing a pearl inside a T4 altar I have been able to refine it into a focus, stronger and more predictable then the base pearl. I am currently in the middle of creating a mechanism to hold and operate the more complicated bits of the process. My materials for this is mainly gold(A metal that hasn't shown any side effects to the ender energies used), two ender pearls(One input, one output), and the focus itself to handle the conversion. I've managed to finish building two of the "Transportation of matter across two relative positions devices", or teleposers for short. How they work is simple(-ish): To perform a teleport you need two teleporsers. Next, bind a teleposistion focus to one of them by right clicking on the teleposer, bind it to yourself by right clicking on anything else, then slot it into the second teleposer and apply a redstone signal. If the focus is bound to teleposer A and placed in B, then teleposer B is triggered with redstone, everything above A will move to B, and everything above B will move to A(I hope this is clear enough description, it is hard to put into word the process. If you try it yourself, it should be clearer.). This means that if you want a two way transport, you can have two foci(One in each teleposer) and trigger the one you stand on, one have one focus and always trigger the same teleposer. In theory, we could build a "Transport Nexus" by having an array of teleposers bound to the same one(One A, multiple B's, triggering the B's to do the transport). What is great about these teleposers is that they don't just transport people, but any mobs or blocks in range as well. It even functions on complex blocks like furnaces and chests! With a little redstone logic, amazing things should be possible with this simple(-ish) system! With the completion of the final prototype, I should get some sleep... A new day, a new idea! The basic teleposition focus only transports a one meter cubed area above it, but if I improve the focus a bit in the altar it will be able to handle a three meter area! Not only that, but it can be further boosted by adding a weak blood shard so it works in a five meter area, then these new demonic shards that Bella has been gathering for a final upgrade to seven by seven by seven area. I should mention that the cost of each transport is based on how much is moved, and how far it is moved. It also has the quirk of being unable to transport people or mobs across dimentions. +aw.entries.architect.suppression=After a recent flood where Magus built a ritual right in the middle of the village to save a huge chunk of it, I've decided to try and replicate the effect on a smaller, and much more portable, scale. Thus, I've made the first version of the "Sigil of Suppression". What it does, in layman terms(You don't wont me to get into the back end details involving temporary storage in a pocket dimension) is create a bubble around you that removes any liquids, replacing it all as you leave. Using this sigil, I was able to take a leisurely stroll under the nearby lake. I am glad I remembered to bring my elemental affinity sigil however, as the early prototype fail on the way back, so I had a very soggy trip home... I "Think" I found the cause of the issue, and have patched it. +aw.entries.architect.superiorCapacity=Taking a break from the sigils I've been making over the last few months(How time flies...), I have shifted my attention to improving the runes we have available for our altar. After going over the design of the capacity rune, I have found room for "improvement". I have that in quotation marks because it only becomes greater then normal capacity runes if you have more then fourteen of them. You see, the "Rune of superior capacity" adds ten percent to the altars capacity, and this effect stacks multiplicatively(Layman terms: The more of the rune you have, the stronger the next rune will be) instead of the normal capacity runes static rate. Powerful, if a niche rune. +aw.entries.architect.orbRune=Considering the amount of LP we burn through on a daily basis running our sigils, powering our spells, fueling the rituals, and feeding our tools and armor, it is a miracle we don't run out of LP more often then we do. Even with our soul network topped off with a master orb, we're tapped dry within a week. Just upgrading our orbs has served us so far, but that has shown to be too unreliable and a huge investment with the altar... Wait, we're always using our orbs to make runes to improve the altar, so why can't we make runes that let the altar improve the orb? It can't be a one way road, can it? Yes, if we tweak this here and shift pressure here... I'm rambling again, I must talk with the others about this! Yes, it works! By focusing the power of three blood orbs and using two demonic slates, we've created "The Rune of the Orb". This boost the altars ability to feed an orb(Think of it like pressurizing air, more of it in the same amount of space), letting it add an additional two percent per rune(Additive rate, so more runes won't change how much it adds). With our master orbs, one rune is an additional twenty thousand LP. While that doesn't sound like much(To think, I use to be limited to only five thousand...), consider the number of orb runes one altar can have... +aw.entries.architect.fieldTrip=After hearing the demands of the younger apprentices, we are leaving tomorrow for a quick tour of the magelands, and expect to be back by the end of this month. Talking with Magus, I agree that we've been pushing ourselves hard lately with work and research. A little rest during a vacation might be just the thing I need to gather ideas for future projects... It will also give me a chance to talk with other mages about setting up a teleposer network. It is a vacation, so a little work on side projects you normally don't have time for is normal right? Talking with Magus during the long hours on the road, a few details about the mage guild were covered on this horseback lecture. Largest of the "Nations", most of the tech focused nations won't touch this area due to the high levels of magic in the land, air, and water causing technology to become a bit more unpredictable(Read: Unstable and often highly explosive), and have instead left it in control of the mages. As a result of this, thousands of kilometers of land filled with river valleys, harsh deserts, frost and snow covered forests, fertile plains and countless other biomes have been untouched for us to expand into. To this day there are people who venture out into these untamed lands hunting fame and fortune clawing over mountains and through the ancient ruins that litter the area. However, the vast majority of settlements are close to the borders with the other nations, thriving off trade(Their gadgets might not function here, but the results are another mater. Most of the mining towns send out the harvested ores across the borders for processing). The last tally was done roughly five years ago, with the number of total settlements at around three hundred scattered thin across the mage guild. Of this, we have roughly seventy active mages and thirty classified as "Apprentices" to manage village needs and deal with problems as they arise. Generally one mage would managed half a dozen of the closest villages and any apprentices they take on comes from this area however, it was not uncommon for mages to offload work onto other local mages if they have not the time or expertise in the field and for them to take on students who seek them out as tutor. That's enough for tonight, my watch is almost over and I feel sleep calling me. I'll write down any more interesting details I learn tomorrow. Magus said we should reach another village tomorrow, and he knows an inn there that should take us in for the night(Just in time as well, I don't trust those clouds on the horizon). Today's trip was more of the same, ridding through a dense oak forest while Magus went over anything and everything about the area around us and the Mage guild in general. Mages seems to have a list of unwritten rules governing how to act, what to do, what to say... For example, it is recommend to live at least a mile and a half from the closest village. Far enough away that people won't bother you with trivial things and you keep a mysterious reputation with the people, but close enough to be convenient for buying what you need. Another example pertains to marriage: A mage is free to wed whoever they like(Even other mages), but the spouse is entitled to most decisions and any compromises favor the spouse. Being wed to a mage often causes problems for the spouse, often with relatives and friends, and is typically a huge adjustment. Doing anything to try and make it up to them is common, as the mage feels themselves a burden and cause for their loved one's strife. From what I've gathered and how Magus speaks about the topic, these are more general outcomes and human reaction to the same events that Magus has seen happen time and again instead of rules or traditions passed down from master to student. One final interesting fact is that most mages send their children to learn the art(If the child so chooses to take on magic, and the have the talent for it) with another mage, preferably one they have rarely or never met as to prevent any bias and favor. I was right about those clouds, and we have reached the small town of Salis soaked to the bone. We're all currently sitting by a fire in the Mundes inn letting our robes dry and bodies warm from the chilling rain(From the clinking outside, now hail). I plan on acquiring another books tomorrow, and writing any more facts I learn from this trip with Magus in it instead of spending the pages of this book(Already longer then I ever dreamed it would be). According to Magus, we should be able to meet another mage in two days time, a woman by the name of Athis who is skilled in botany and herbs(Any medicine made by her always trades for a fair few coins). On another note, what Magus said about about people being wary of mages is holding true. The common room has been divided into two parts since we got here: The side where we are, and everyone else who have gone a table or two away from us and keep glancing at us as if to make sure we don't do anything without giving them a chance to run. The owners of the inn, a small family known as the Eldritches, seem to be the only ones who don't seem to mind us. Their daughter, or at least someone the right age and look to be their daughter, happily walks up to us asking if we needed anything other then rooms while we rested. Vlad and Demir order food for us all, Magus inquired to the drinks available, while I have asked if she knew if the general store had any writing journals for sale. And now I'm at the point of writing things as they happen... I needs some sleep in a nice bed after all this riding(But it looks like Demir is more saddle sore then I am), and the inn keepers have giving us cheap logging in the attic with a few decent, if old mattresses in a warm room with a roof over our heads. We left the next morning after a short trip to the market(Where I managed to get a good deal on a fairly nice journal, and have already filled out a few pages on my watch last night), and now are almost at Athis's residence. We currently are taking a short rest to eat and have the horses cool off after a long trip before riding the last leg of the journey after dusk has set. I'll detail anything interesting that happens. Talking with Athis, who I have already detailed in the other book along with most of our conversation, I managed to steer the conversation to how often she needs to travel for herbs, and if she has ever been in a situation where she can't get access to anything she needs but another mage might have an abundance of. As a response, she handed me a list of everything she buys when ever possible because of how rare it is here and the versatility or uses of it. The list was ten centimeters thick. Seeing a chance to get another mage's opinion, I mentioned a recent discovery in the field of magical transportation see might be interested in seeing. At this point, she gave me a wary eye and said she still has a bag of purple chalk and a stack of waystones from the last person who said that. Inviting her outside for a demonstration using a few of the teleposers I had packed, I showed step by step the process and how simple it was to use.(It took her a moment to recover from the initial shock of teleporting, but now she takes it in her stride.) Going over a few more details inside with hot tea, I asked if she would be interested in us setting up a link in the area nearby for her to use as a means of transport. Frankly, I was nerves enough at this point that I thought see would just laugh at my new goal. Instead, she was almost begging me to set a few up around a few locations several hundred kilometers apart. At this point I felt comfortable to tell her about my grand plan for setting up one of these near every mage in the guild and at some important points, so the days of needing to travel day and night to reach another mage would be over. Not only was she on board with the idea, she even offered to help us set them up if it meant that it would be ready faster! We spent the next few hours talking about this late into the night, covering little details and about enlisting the help of other mages to set it up. +aw.entries.architect.bindingKey=Well, this has been an interesting trip... We've been visiting every mage we pass, talking and showing off the boons of our blood magic. Most of them have been extremely accepting of our arts, and the ones that haven't been at least aren't opposed enough to get violent about the subject(However, all of them are still welcome to the idea of a transport network). We have noticed one problem on our trip, however: We can't easily give people the things we've been working on, as they need LP to run it and it takes time to reach a point of being able to support the usage of them. We've gotten around this somewhat by binding the items we gave them to ourselves, but anything they make once we've left will be near worthless to them... THAT'S IT! I could make a device that mimics the binding of an item, copying a thread of our soul network to another device, so anyone can craft something new and have us power it. I can use a weak blood shard to hold the soul network thread that it uses to pass on the link... Yes, I should be able to make this easily. I really should have slept after getting home, instead of going straight to building something... It took me three hours to think of using gold for the "Key of Binding". Regardless, it has been finished. All you need to do is right click with it to set the original owner, then hand it off to the person you wish to use it. Then they right click with it, and it will bind the first thing it finds in their inventory without an owner to the person the key belongs to. While it's uses are limited, it is something you want to have around in case you ever need it. +aw.entries.architect.tier5Altar=In other news, we've started talking about what we do now that we've started reaching the limit of our power once again. I've calculated the number of runes we would need, and have in fact already crafted all fifty two of them. We even have a few guesses on what to use for a blood orb, starting with these demonic blood shards... The problem now is the stabilizers we need. There is only one thing I've found that can handle the strain of the altar: The raw power of beacons. We need four bloody beacons. One is near impossible, four is... We need a miracle to get any farther. Magus says he has some plan, but I think even he is going to struggle with this. Talking with the others, I believe I should focus on setting up "The Nexus" instead of struggling with the limits of our master orbs. This is going to be a project that will take months... I've decided to limit the usage of the Nexus to mages, as public usage would tax my network night and day. I start tomorrow on this task, and plan on cleaning out some ruins about a kilometer to the east of us to set up the Nexus base. I already have a few dozen teleposition foci crafted, and enough teleposers to set up over a dozen locations. First on my list, Athis... I'll leave this book here, and will document anything that happens in my other book. Once I start research in blood magic, I will write in here again. +aw.entries.architect.priceOfPower=Magus... Magus has gotten us a reservation to kill Withers. Not only that, but we each must kill one on our own. I said I wouldn't write in here again until research started again, but I felt this is significant enough to mention... We are so close to being able to upgrade the altar. If we live through this trial, that is. I have written the details of the last few days in my other book(It has gotten far more use then I ever expected), but we have them. Enough nether stars to finish our altar, enough to experiment with, enough to make being stuck in bed with this broken leg worth it all. I have been hard at work since my leg healed, ideas gushing out of me to the point I have almost stopped eating and sleeping(Thankfully, one of the others tend to drag me out occasionally). Time to document the fruits of my labor. +aw.entries.architect.demonicOrb=Our assumption about demon blood shards was right, and after a long crafting process we have the Archmage orb. We had to spend several hours trying to fill this orb, and finally hit the cap at ten million LP, ten times the size of the master orb... We also have graduated up to the slate dubbed "Ethereal". I know this isn't much fan fare, but this has become a bit of an expected event. +aw.entries.architect.energyBazooka=First thing I created with this new orb was an improvement to the energy blaster, as I felt it just wasn't strong enough during the fight with the wither. Harnessing the power of a few reagents and a demonic blood shard, I have created the "Energy Bazooka"(Not a clue what a bazooka is, but Demir tells me they shoot big explosions). Costing twenty thousand LP a shot, it launches one main projectile that upon hitting something explodes into twenty more smaller explosive projectiles to devastate other living things around it. I have tried tweaking it so that terrain isn't harmed, but there may be minor damage depending on what is hit. There is a "Slight" problem of recoil, but nothing we can't live with. +aw.entries.architect.accelerationRune=Moving my attention on to runes for our wonderful new altar, I had a revelation as I noticed a speed rune next to a dislocation rune: Increasing how much LP is moved from the buffer is fine, but how about increasing how often it transfers LP? Using a few materials like buckets and an ethereal slate, I have transformed a normal speed rune into something far greater. Instead of affecting crafting speed, one rune will lower the delay the altar has on moving the contents of the buffer by a twentieth of a second per rune. I have noticed a strange limitation, however: Any runes beyond nineteen seem to have so little effect it isn't noticeable anymore, so you can only have the altar transfer twenty times a second. I will need to run some experimentation on the best ratios of acceleration to dislocation runes, but I suspect that the capacity will also be a factor. +aw.entries.architect.harvest=Bella has dragged me with her to town so she can be sure I'm out of the lab for a while(I have noticed I'm a little pale, but I just assumed that was from all the sacrifices I've been making lately). As we ate two sandwiches at a bench on the edge of the village, I watched the farmers in the field slaving over the harvest while trying to outrun the storm just visible in the distance. Talking with Bella about ways to help them, I created the basic idea for the sigil now known as the "Harvest Goddess". It is to the "Reap of the Harvest Moon" what the "Sigil of the Green grove" is to the ritual of the green grove, performing a similar effect to the harvest moon around the user by summoning a little demonic imp(You can thank Bella for this part). As soon as we had a version ready, Bella ran out into the field with a green grove, haste, and magnetism sigil to quickly run through the field collecting the harvest behind her. Needless to say, the few farmers in the field were awe struck by this sight and a few of the newer ones thought she was a goddess sent to answer their prayers(And I liked the sound of it, so we now have a name for the sigil). +aw.entries.architect.demonProblem=A mage can never get a good rest without something happening... Magus has finally launched an operation to deal with the demon portal, and has asked Vlad, Demir, and myself to lead the siege team. He has cooked up some complicated plan that only he knows all the details, and in fact might be the only one who even has any idea if it might work (Quite a few of us felt lost when he gave the basic overview of the plan). One question asked at the meeting that felt quite memorable was "Wait, how are you able to replicate this portal?" Magus only smiled and asked him "At what point does science stop being science and starts being magic? It is the same principles and theories at work, just a different means of execution." For Magus, that seemed to answer everything. Gah, I need to focus on packing for the trip as we won't be back for a few weeks. I feel like I'm heading out for war, and I guess in a way we are... Alright, I did not expect to find a camp of demons when we warped to Venric's folly. I expected a hole in the fabric of space, I expected a few demons, but a little village... Not to mention the fact that I had to save a fairly inexperienced thaumaturge who hasn't dealt with demons before. He rushed in, thinking he would show off a bit. To his credit, he did manage to kill a few demons before the hoard took him down. I had to run in with a teleposer to save him, but we did discover something important: From the vanishing remains of the demons, I retreaved two crystals. One was a shiny red we have named a "Life shard". The other a brilliant blue we have dubbed a "Soul shard". What is odd is that my bound armor seemed to react when I touched them, and I saw a few stray strands of soul threads between the demons and these shards. But that isn't what was really odd. I was spotted by one of the demons when I went to save the fool, and noticed two things very quickly: The demon had a connection to the portal with a few soul stands. The second thing was that it seemed to be... Vibrating? Closest word that comes to mind when I think of it. Shortly after that, two things happened: The demons started running towards us from every part of the village, and for a few hours after we left the camp seemed to be under a lockdown. The demons had donned armor, and were patrolling the area instead of building. These guards seemed a little stronger then the others, but tomorrow I plan on mounting an operation to collect more of these shards for research... +aw.entries.architect.tier6Altar=From what we have learned so far, these crystals seem to be ordinary crystals (Well, ordinary as anything from Tartarous can be here) filled with demonic aura and... changed by the travel through the portal. These demons have been using them as a sort of personal anchor, an extension of the main portal's influence. I have discovered that mixing these crystals together in a five to four ratio of life to soul shards forms a purple block that is practically pulsating with demonic power. Since we may be here a while, I have started construction of a prototype blood altar that utilizes these new blocks for enough stability for a T6 to be possible. I have yet to try this, but if it works... Once again, a theory proved to work out. With the addition of four pillars capped in these crystal clusters, we are able to support another seventy six runes, nineteen on each side of the altar. I have also tried the clusters out for making a blood orb, and the "Transcendent orb" was the result with a cap of thirty million LP. Sadly, I haven't had a chance to experiment with this new altar or orb, so I haven't anything else to share yet. +aw.entries.architect.moreThanHuman=Magus and I have been looking into the oddity I noticed with the demon crystal and bound armour, and what we have reaped from it was far beyond what I had expected. I has assumed at first this would simply allow more sigils or other things slotted into our armour, but that was far from the truth. As it turns out, the demon soul in the armour was reacting to the crystals and was becoming more... Active? Present? Detached? All of these are accurate, but none of them are quite right. Regardless, strands of the demon's soul become... Loose? In my head this is makes sense, but on paper it just sounds odd. Let's start that again, no matter how odd it sounds. The strands of the demon soul became loose from the armour in some places, and I noticed them interacting with my own soul strands leading to the armour, twisting and tangling the strands. And as they touched my soul strands, I felt... Something. I can't put it into words, but I knew it is something to look into. Mentioning it to Magus, he made reference to tales of old arch mages making pacts with demons for a bit of the demon's power. With this train of thought in mind, we started the road that lead to what has recently born fruit: Project Omega. The concept was simple: Fuse the soul of the user and the demon in the armour, then see what results from it. The stories of what demonic power can do vary widely, so we honestly had no idea what to expect. What we got was the Omega state. Long story of testing short, we found that reagents made the perfect medium to hold our souls and that of a demon together, with as few repercussions as possible. What was interesting is that the reagent used seemed to... Colour(?) the demon soul, attuning it like those of the Demon invasion. Depending on the reagent used, the powers and abilities offered changed drastically. We gained power beyond anything expected, with the armour reshaping itself to suit it's new abilities. While there are too many to list by name, I'll cover a few general features. First, we haven't reached a point where the Omega state lasts forever. We use reagent to power the fusion, and to maintain this fusion it slowly burns through the reagent. While Magus has made a ritual to offset this, the range and the cost mean it is far from an ideal option. In order to ensure we aren't caught of guard by reagent running out mid battle without warning, I've managed to create a visual display in the helm(Located on the left side of the screen, next to the LP bar, or at least would be if you have a divination sigil slotted into your bound armour). We also found that the demonic power gave our armour it's own buffer of extra health, taking damage that normally would have pierced through armour and hurt us. I added another bar to represent this, underneath the other two bars. I should note that this "Reagent health" needs reagent to form, so the more damage it takes in for you the less Omega time you have. Depending on the reagent used for the process, we discovered that the area around us had an impact on us. We gained boons from each armour, with extra health and stronger strikes being common place among all of them. However, this weapon can cut both ways: While we gain boons in favourable areas, in hostile areas we would suffer debuffs and weaknesses. Water armour is great in an Ocean biome, not so hot in the Nether however. This is something to keep in mind before starting Omega: Don't pick one based on effects alone, but where you expect to be fighting. I should end this entry here for now, as we are still working on Project Omega. As of this time of writing, we have only managed to enter Omega using Terrea, Aquasallus, Incendium, and Aether. Any other reagent we've tried will need some fine tuning to have working, as we needed to customise the ritual for each of the four we have. We have also noted some odd behaviour from the armour when in use, trying to expend energy in odd ways. I plan on looking into this at a later date. + +aw.entries.rituals.intro=At the constant demands of my apprentices, I've started writing down my knowledge of blood magic. I've told them time and again that what we do is far too dangerous to write about, and in the wrong hands... I don't want to think of the consequences. But they have made one good point: if more people are going to learn blood magic, word of mouth is far too limited. But I'm getting sidetracked, back to what this is all about. Following their example, I will introduce myself. My name is Magus Arcana, and I am the founder of blood magic. I have lived a long life, studying more fields of magic then one could count. When I was younger I moved to the outskirts of a village to start my journeys into the arcane. After several decades of study, I realized there was one source of power few had ever touched: Blood. Many mages claimed that the use of blood in magic was taboo, yet gave no reason as to why. Eventually, my curiosity grew beyond my reluctance and I started experimenting with the art of blood magic. +aw.entries.rituals.weakRitual=My first breakthrough was with a simple device that used the power of whatever was above it as a template, along with a great deal of blood(25 hearts, or 5k LP if you go by the system one of my apprentices made years later) to perform small miracles. I must also note that at the start of each of the rituals lightning strikes the ritual stone setting it alight, as if the cost of activation wasn't deadly enough. After two weeks of meditation to strengthen my soul to the point where I could handle the strain of these rituals, I started experimenting with different templates to discover their effects. At that point, I only had the strength to test one template per day before I felt weak. I decided to start training my body and mind again like I did when I was younger, while using a few tricks I had learned over the years to help speed up the process.With some work I found that water creates a rainstorm with so much lightning that I couldn't sleep that night. A somewhat rare mineral block by the name of Lapis had the very interesting effect of turning day into night. Needless to say, everyone in the village was very confused when the sun suddenly vanished and they couldn't see anything. I was shocked when I found that a coal block summoned a zombie stronger than any other I've ever fought in the night. I also lost the coal block to fire from the lightning strike when I was dealing with said zombie. The final effect I found was with bedrock I found at the bottom of a local mine, hardening my skin temporarily. While I looked no different, I could shrug off a blow from an iron sword without a scratch. A bruise perhaps, but not a scratch. +aw.entries.rituals.rituals=I soon decided that those rituals were far too weak and costly, so I started working on a much larger version. By mixing my blood and a little bit of Mana with an item that was naturally attuned to an element(I found that magma cream worked for fire, a Lapis block for water, obsidian for earth, and a ghast tear for air) I created powerful scribing tools that used blood (100 LP's worth per use) as ink. I used stone fused with blood and obsidian to create stones strong enough to withstand more powerful rituals. It took me over two years to perfect the ritual stone. Trust me, you don't want to see what happened with some of the earlier tests. Let us just say they made the holes creepers leave look like potholes, and leave it at that. I also designed a "Master" stone to be what really controls the rituals, with the powerful dust called "Redstone" able to deactivate rituals and putting in a few safeguards so that if some fool tries to activate a ritual they don't have the strength or the blood to handle, it doesn't kill them outright. While I was able to weaken the pull that rituals carried on the user's life force to not cause any lasting harm, I could not quite get rid of the feeling of nausea and unease an unattended Ritual would cause. I eventually got tired of trying to stop it and marked it down as an occupational hazard. Once I had the stones, I realized that there needed to be a bridge between myself and the "Master" stone of the rituals. I found an old, red crystal in my attic that I bought months ago on the villages market. The trader claimed to have gotten it off the corpse of a demon after a brother of his killed it when it attacked their caravan. I don't know if his story was true, but I could tell it was magic. After shaping it a little, I found it made the perfect catalyst for linking my soul into the ritual stones. +aw.entries.rituals.waterRitual=Among the first rituals I made with these stones was the one I dubbed "The Ritual of Full Spring". I'll be the first to admit that, in terms of magic, it was nothing special. All it did was create an endless spring of water by using a few tricks from other magics and my soul as a fuel source. But when you are pioneering a new form of magic, you take what you can get. And it was cheap, 500 LP to start it and 25 LP for every bucket of water I got out of it. Luckily I made this ritual before the well outside my home dried up. +aw.entries.rituals.lavaRitual=The next ritual I created was "The Serenade of the Nether", where I tried to make something a bit more useful. I found that the ritual used a large activation cost of 20K LP, to link itself to the nether, then used a much smaller fee of 500 LP to pull a bucket worth of lava to the ritual. I am not sure what part of the nether it is getting the lava from, so it is probably best if we don't think about it too much. +aw.entries.rituals.groveRitual=The next ritual I made was the first I dared to show the villagers. After a horrible harvest due to bugs the villagers didn't have enough food to outlast the winter, and the last of the leaves were falling from the trees. We might have had a rocky relationship, but I wasn't just going to sit back and watch them die. Without enough herba essentia stockpiled to use lamps of growth, I quickly created what I now call the "Ritual of the Green Grove" to mimic its effects. After persuading two of the farmers to at least hear me out, I showed them the ritual and told them what it does. At first they thought I was trying to trick them, but instead of continuing my attempts at convincing them I planted a handful of seeds on the tilled soil I put atop the ritual. Within a minute the wheat was grown to maturity and both of the farmers were awestruck and speechless at what they had just seen. They ran back to the village, fistful of wheat in tow, returning within the hour with a dozen men, bringing their last batch of seeds and half a dozen carts. That evening pushed me to my limits, but we managed to get more than enough food to last the winter and live till the next harvest. And while only the two I first talked to thanked me in person, I knew that all of them were grateful for my help. +aw.entries.rituals.interdictionRitual=In my studies I heard of an item created by alchemists of yore called the "Interdiction torch". While replicating its effect was tricky, I eventually created the "Interdiction ritual" as a tribute to them. What it does is "Repel" any living thing that gets within its range. After realizing a small error, I changed it to where humans are the sole exception to its effect. I found being flung back by your own ritual has a tendency to make you want to tweak it. While I couldn't make it "free" like the alchemist's of yore, it only costs 1k LP to start and 10 LP per second while it is active. Rather cheap, all things considered. +aw.entries.rituals.containmentRitual=After experimenting with the effects of the interdiction ritual, I decided to try and reverse the polarity. It created a sort of "vacuum ritual", that I call "Ritual of containment". The cost is the same as the interdiction ritual, due to it using such a similar process. I found this ritual very useful for catching the odd wild rabbit when I wanted a nice dinner. Unfortunately, I caught as many creepers as I have rabbits with it. But a man can try, can't he? +aw.entries.rituals.bindingRitual=Over the years I've heard legends of a place called "Tartarus". Most other mages claim that the nether is what they are referring to, but I'm afraid the nether might just be the front yard while the real Tartarus is something we have never seen. To test my theory, I created a ritual to drag the soul of one of Tartarus's inhabitants to our world, then seal it inside an item. My research showed that few materials had the strength to withstand having a soul bound to them, much less a demon's soul, but I eventually found that diamond was the perfect material for the task. I activated the ritual (needing 5k LP), then dropped the diamond sword I had made years ago on the master ritual stone. Lightning flashed and struck each of the rituals pillars in turn as I quickly jumped to a better observing spot behind a large boulder. When I returned, the sword gleamed red like blood. Once I picked it up it turned into a shapeless goo, but by running a bit of my power through it the goo returned to its normal form. It was far sharper than any blade I had seen before, seemed nigh unbreakable, and as I was testing it on the common monsters that stalk the night I noticed something strange: As I killed them, I would find little red shards dropping form their bodies from time to time. It was rare, but a noticeable change. I made a note to investigate them later as I gathered them. Because of the ritual's function to bring a demon's soul for the sake of tying it to an item, I dubbed this the "Ritual of Binding." Shortly after this, I got my first apprentices in blood magic. Little farmer boys named Fenn and, his older brother, Way Chronos. I showed them whatever I could over five years, then they left to spread the word of blood magic to other mages. They still stop by from time to time, and I am always glad to show them what we have discovered while they were on their travels. +aw.entries.rituals.beastMode=When I was teaching Way and Fenn we experimented with binding the souls to various items. We found that along with the sword, diamond pickaxes, shovels, and axes could have souls bound to them. All of them needed LP to be used, and they had an interesting distinction to the sword. The seal on the tools could be opened temporarily, for less than the blink of an eye, to unleash a powerful effect. The terrain around the wielder will be destroyed, if the right tool is used (pick for stone, shovel for dirt, axe for wood. Do I really need to spell it out?). This uses a massive 10k LP per use, but the power seems worth the cost. Much later, when I had Tiberius as an apprentice, I did discover that an apprentice blood orb can be turned into the "Energy Blaster", a ranged weapon with the same ability to create blood shards as the bound sword. +aw.entries.rituals.unbindingRitual=The next ritual I created was an idea I had during the few years I taught Way and Fenn. The concept was a ritual that would remove souls from items, namely from the bound tools. Strangely, the souls seemed to become fond of their new homes and really don't want to leave those tools. While lesser souls bound to items as curses by necromancers and the like wither at this ritual's power, the souls of those who dwell in Tartarus seem far sturdier. It was over a decade later when Tiberius discovered that it was great at un-binding items from one and other. His first used it to recover a sigil from his sigil of holding (I still tell him to give it a better name, but I'm hardly one to talk about lazy naming), and again when he wanted to experiment with his sigils in bound armor. It seems it uses 30k LP, regardless of the number of items unbound from the original item dropped in. +aw.entries.rituals.jumpRitual=The next ritual I recall making is the "Ritual of the High Jump". It... well... it does exactly what is says on the tin. When activated, any entity on top of the master ritual stone will be flung strait up. After watching a cow use the ritual before me (I had to deal with a mess Fenn made, involving a bottle of ink, Way's hair, some dropped parchment, and a wobbly table. I returned to the ritual just in time to see the poor cow get airborne.), I added a secondary effect where anything that gets flung up can safely land back on the master ritual stone. On the bright side of that incident, we had fresh beef to cook for the next few days and a new batch of ink from some passing traders a week later. I almost forgot to add the cost, 1k LP for activation and around 15 lp per use. +aw.entries.rituals.duskInk=It was at this point that I realized that I was reaching the limits of what I could do with the four inks I had, and spent the remainder of my time teaching Way and Fenn to find a new type of ink. It took four years, but I found it. And it was worth every second. By mixing my blood and Mana with a coal block I created a scribing tool that turn blood into an ink so dark it seems to absorb light. I went on to call this new scribing tool "Dusk" as a result, and rituals far more powerful became possible. +aw.entries.rituals.magnetismRitual=The first ritual I made after creating that ink, strangely enough, didn't even need it. I had such a rush of new ideas that I didn't care if it used the dusk ink or not. Anyway, I based this ritual off of a small stone I saw the children of the village play with that had magnetic properties. By creating a ritual that mimics this attraction, I made the "Ritual of Magnetism" to pull ores out of the ground and place them in a three by three by three meter cube at the heart of the ritual. It seemed to pull from a seven by seven meter area centered on the master ritual stone, and I managed to tweak it to pull up almost any ore, metallic or not. I offered to help the miners in town with this, but they didn't want anything to do with my work. After realizing I forgot the cost again, I started leaving spaces at the end of these entries for them. This ritual has an activation cost of 5K, with 50 LP for every ore pulled up. +aw.entries.rituals.crusherRitual=To pair with the ritual of magnetism, I created the "Ritual of the Crusher." It will break any block in a three by three by three meter cube below the master ritual stone. Instead of having the crushed blocks fly off, I made the ritual push them up into an inventory above the master ritual stone. It doesn't really care where you want it, whether it be a simple chest or a barrel or something else. 2.5K activation cost, 7 LP per block broken. +aw.entries.rituals.speedRitual=As a variation of the "Ritual of the high Jump", I created the "Ritual of Speed". It was a simple task to modify an effect I already knew well to fling things at an angle instead of just up. What must be stated is that the direction, where the dusk ritual stone is, is the direction the ritual will send you, at a very rapid rate. You may want to have a way to slow down, as I discovered the hard way. 2k activation, 15LP per use. +aw.entries.rituals.shepherdRitual=Remembering the success of the ritual of the green grove, I wanted to test myself by creating a ritual that could transfer the effect from plants to animals. The "Ritual of the Shepherd" was just that. Any animal in the ritual's area of effect will grow at an alarming rate, what would take weeks just took an hour. After several tests, I concluded that if an animal took twenty minutes to grow from an infant to an adult, this ritual would cut that time down to three minutes flat. So far, I have found no side effects of using this process on animals, and I hope this remains the case as time goes on. 10K activation, 2LP every time it speeds up growth (about once every second). +aw.entries.rituals.darkMagic=The next ritual I created was one I'm not proud of. But after over three months of constant bandit attacks on the trade routes around the village I decided to take action, and anything I had at hand was far too merciful. They had earned a slow, painful end for all their crimes and I intended to deliver it. I created a ritual to use as a trap, laying it just off one of the largest trading routes, behind a thick group of trees. I then dressed as a merchant and bought a horse and cart to lure the bandits out. Like moths to a flame they came for me, riding on horses of their own. They expected me to either surrender or stop and put up a fight, so they only sent out two from their group behind the tree line. Once they saw I had no intention of stopping, they all gave chase, thinking I had something of great value, worth running from bandits for. I turned a tight corner into the tree line, the cart beginning to tip as I did, and went off the road to where I had set up the ritual overnight. By the time they saw it, it was too late for them. I stopped at the base of the ritual, knowing they couldn't get away in time. "What is this, where is your treasurer?" one of the first bandits there said. "I thought you had something, but now you stopped." I gave him a bitter laugh, he's more concerned about looting me than the reason why I brought them here. "I don't have any treasurer on me or in here, I came out here for you." By then all twenty of the bandits had arrived, some filled with blood lust, others full of greed. "Then why did you run? What is that thing anyway?" By now the head bandit was straining to keep ahold on his sword, so I kept him taking. "Oh, nothing much. Just a ritual built by a blood mage. I wanted to make sure and bring you here, just to test it out." Now all of them were pale, and their leader was having a hard time staying on his horse. "Blood magic? Are you the mage who built this? What are you trying to do to us?" He bellowed as he was trying to turn fear into anger. He was getting nervous now. Good to see the title "Mage" still sends a little fear into scum like him. "Nothing much. Well, to me anyway. To someone like you, who has cast aside his humanity for a quick bit of coin? A slow and painful death." At that point, most of the bandits were already lying on the ground while their horses started backing out of the clearing due to the panic and confusion. "Why... Why are you doing this?" The leader managed to spit out with his face in the dirt and far too weak to stand. "Because I have heard what you have done. How many you have killed for the few coins in their sacks. I know that you are slowly killing the village I call home, and while I am not someone who they like having around just outside their homes, I still feel obliged to help save them from any mortal danger they might face." At that point, none of them could move. After about five minutes, the last of their life essence had drained away. I tore the ritual apart, then went back to the village with all of the bandits' horses. I gave them and the cart to the "Mayor" of the village, if you'd call him that. He pulled me back into his office and asked where I got them from. I told him the truth, part of it anyways: "It seems like those bandits we've had for the last few months earned the ire of the wrong mage." He didn't ask any further questions, nor did he ever bring up the topic again. All I know is that I found a large pile of gifts from the village on my doorstep the next day, from fresh bread and milk to fine fabric. After a few rumors spread about what happened, we never has bandit troubles again. +aw.entries.rituals.knifeAndSufferingRitual.1=Years later when Tiberius created his blood altar I split that ritual into two versions, the "Well of Suffering" and the "Ritual of the Feathered Knife". Each needs a large activation cost of 50K LP, and I tweaked them so that they can fill a nearby blood altar with the essence they drain. Each has safeguards so that what happened with the bandits won't happen again. The well of suffering cannot affect humans, and will slowly kill everything inside its range. It will drain life one half a heart at a time at the cost of 2LP every time it steals essence, filling the linked altar with 10LP. I have tuned it to work with the altars sacrifice runes, so it is highly recommended to use them to boost the LP output of this ritual. +aw.entries.rituals.knifeAndSufferingRitual.2=The feathered knife on the other hand uses the life force of humans to fill the altar, but I have it set to stop when they start feeling weak, at about three hearts. Like the well, runes can boost its output of 100LP per half heart, but it needs self-sacrifice runes instead to boost its power. 20LP for every half heart drained. +aw.entries.rituals.regenerationRitual=Sometimes you find the idea for a ritual, and other times the ritual ideas find you. The ritual of regeneration was of the latter group. I was going about my daily business when I heard frantic knocking on my door, it is a rare thing for someone to come to my house willingly, let alone in such a panic. So I rushed to the door and found a few of the villagers standing there, one of them holding a boy of about ten in his arms. The boy was wounded badly, several deep cuts and dark bruises covered his body. There was enough blood on his clothes that I first thought them originally red. They told me that traders rushed him here from a nearby village that was under attack by demons, and that their healers couldn't do anything for him. After a quick glance, I told them to bring him inside, then sent them home. I did what I could to hold off infection and slow the bleeding, but nothing I had on such short notice could help more than just delaying the inevitable. But I couldn't let it rest at that; not having anything on hand was never an excuse for giving up. I hastily threw together a ritual, mixing concepts and taking risks to build it. Still untested, I brought the boy to the ritual. At first I thought nothing was happening, then after a minute I noticed his wounds starting to close and the bruises beginning to fade you can't imagine how glad I was that it worked. As I started gathering and preparing more medical supplies, I noticed the boy had opened his eyes. He was still quite dazed from the blood loss, and he was looking at the ritual with nothing less than awe. I caught his attention and gave him a light smile, holding a finger up to my lips as the universal sign for a secret. This was the first time someone, who wasn't one of my apprentices, got to see my lab, and there were quite a few thing here that I'd rather have the villagers not know about. At that point they had seen a few of my rituals, but they didn't know what fueled them. I then used a simple spell to send him back to sleep. I later found that my hastily assembled ritual had an unintended side effect: it didn't just work on humans: anything, from sheep to creepers, inside its area of effect will slowly be healed. I also discovered that it slots in easily with the well of suffering and the feathered knife. It needs 5K to activate, with 200LP every time it heals a human (It seems our lives are worth more than cows or creepers.), and 20LP when it heals anything else. I later learned that boy's name was Tiberius, and he grew curious about my work. For six years I held off his demands to train him. It was only after he mention seeing red threads coming from me and being attached to every ritual and item I had used blood magic to create, that I considered training him. It was only after he wrote down a theory and showed it to me that I finally said yes. I had him learn thaumaturgy as a cover up story for the villagers, and as a way to show him the difference between blood magic and other magics. First thing he started working on was an improved way to use blood alchemy, rather than learning the way I had been doing it for decades. I had to laugh to myself when he first told me that I had been so busy creating rituals that I never stopped long enough to think about ways to improve the other aspects of blood magic. So taking him under my wing was a good decision, even if he left me little choice. The blood altar we finally created was a much more efficient way to use blood alchemy, needing little in the way of magical prowess, unlike the way I had been doing it, while also being slightly cheaper in terms of blood use. We also created what he dubbed the "Blood orb", a vessel meant to mimic the soul while acting as an extension to it. After finishing the altar design it took him one week to build the altar and create the orb, granting him the same soul network capacity as two weeks of meditation. I might need to rethink the way I use blood magic, considering the leaps and bounds he is making with it. I might also be better off sticking with rituals and let him re-invent the wheel, since it seems like he is adding a few wheels of his own after I found him sleeping at his work desk drawing up a plan for a portable ritual. He soon created items he calls "Sigils" as a way to use similar power to rituals, but more portable and most are intended to be used on or around the caster. He quickly created a sigil meant to read the capacity of the bound user's soul, but when he tried to read mine I repelled his efforts. My way might have been harder, but it has given me a few tricks he might never learn. +aw.entries.rituals.harvestFestival=With Tiberius busy with his own work, I decided to challenge myself. I wanted to start creating rituals that pushed myself to the limits of what is possible with blood magic. Unfortunately, there was something baring my attempts to create these rituals: My activation crystal. It was barely able to conduct the Life essence required to activate rituals like regeneration, adding any more than that and I might lose more than just the crystal. I wanted to start researching a way to improve my crystal, but my duties to the village came first. We had a small drought to deal with, a small taint problem to the north, and the Hell's harvest festival was coming up, and so I had to meet with the other Conglomeration members to give updates on my work. I had grown to detest some of the work they do, but I still remain with them as their oldest member and as the last conglomeration founder still alive. Not that I had much choice when I joined, it was ether sit through a somewhat dull meeting every year and earn some gold for not causing trouble over the last year or let them destroy each other in an all-out war for the nether and its resources. There are still days when I wish that I went for the latter option. I asked Tiberius to help the villagers while I deal with the taint. On my way to the taint site it started to rain, so that might have made Tiberius's life a little easier. The festival came quickly, and I did my part in the opening ceremony and watched as Tiberius lit the portal. Never understood why we go through all the hassle of lighting the portal every year to then close it three days later. Regardless, we all entered the nether to see the others, already at work. I wandered off to greet people and answer a few questions, leaving Tiberius to fend for himself. I glanced back at one point to see him with a face that could only be described as pure disgust. Apparently he feels the same way I do about what the nether has become. I still remember the early days when I first opened the nether portals, back when the pigmen roamed wild and free, and death was around every corner. Those days seem like a dream now, after everything the Conglomeration has done to industrialize the nether to maximize their profit margins. Later that day I decided to visit the small building I own here and sleep at during these festivals. I found a note on my bed from Tiberius saying that he had some work he wanted to do, so he went home early. Can't blame him, I would have left myself if I had the choice. I went to this year's meeting spot late in the evening, when fewer people walked the paths cut into the netherrack. I attended the festival every year, so most people were used to seeing me here and I even got a few greetings from passersby. I walked towards the huge building carved into the netherrack with "Thermal expansion: Powering the world!" inscribed on the front of an otherwise purely white tower. I walked through the clear glass doors, then started my way towards the elevator. A tall skinny man stood inside the metallic box, and said "Greetings sir, where would you like to go?" as I walked inside the elevator. I had never seen him before, so I already knew what would happen next. "I need to go the thirty fifth floor. I have a meeting to attend to." I recall saying to him. "I'm sorry sir, but I can't do that. Only V.I.P's are allowed on that floor." I sighed as he was beginning to try my patience. "I know that, look up the name "Magus Arcana" in your little terminal over there." At first he seemed reluctant to even check, but once he saw I wasn't leaving till he at least looked at the terminal he turned and quickly hit a few keys. After about five seconds of reading the data that came up he quickly spun back to face me, his face a few shades paler. "I'm so sorry sir, I didn't know that..." I quickly cut off his stutter at that point. "No need to worry, I'm used to this by now. If we can start heading up now I might even give you a tip." After that he closed the doors to the elevator, pulled a key out of his pocket and stuck it into a small hole in the wall. A piece of the wall slid open and I saw the scanner that was hidden behind it, then he brought his eye up to it and asked me to do the same. Once it had scanned both our eyes it gave a small chime to let us know we did everything correctly, like it had the last time I had been there. I gave the man three gold coins, a generous tip to a king, let alone him. He could feed himself for a few months off that alone, and he might need to after today. They rarely keep their jobs if any of the board members didn't like them. I still heard him thanking me until after I entered the meeting hall, everyone else was already there. I knew almost everyone present, with only one new face at the seat of GregTech Intergalactical. They almost always had a new guy attend each year, so I assumed the Gregtech company was as cutthroat and brutal as rumors said. "Now that everyone is here, shall we get started?" Iza Lemming, daughter of thermal expansions founder asked once I took my seat. The new guy jumped up and started yelling once she said that "Wait, who's he? I don't recall ever seeing him before!" "Calm down, Frank. He is the guy we've been telling you about for the last half hour." Iza said. I couldn't help but crack a smile as she held up her reputation for not having any time for idiots. "Wait... He is the guy who lit the first nether portals? He is one of the founders?" I could tell he was confused, and I couldn't blame him. The fact that it was me who lit the portals a century ago is one of my best keep secrets, and the fact that I'm on this conglomeration's board is something only a handful of people outside this room know. While in truth I didn't discover the nether, I was the one who popularized it by creating portals in many major cities. "Yes, that is him," Iza said as I sat next to her "Now that you're up to speed will you take your seat so we can get started?" He took his seat again, but his gaze never left me. I looked around the table at everyone, noticing once again that for another year none of the other Conglomeration members bothered to show up in person, aside from Iza who owned the building we all sat in, opting instead to send representatives on their behalf. This year's meeting went on like every other years'. Trade requests and action requests were announced and Iza requested permission for two wither summons to start up a nether star generator. Frank demanded trade from me for iron and iridium, claiming that I owned a huge mine full of both. After ten minutes of trying to calmly tell him I owned no such mine, Iza told him to sit back down and drop the request or leave the room. He returned to his seat quickly, but I still saw the steam coming from his hairpiece that had come lose in his fury. No one bothered to tell him about it. On a quick note: I was telling him the truth, I own no such mine. I sold it a few years back, and only get a small cut of anything mined. But he didn't need to know that. The other requests went much faster, with Industrial Craft asking for some of Minefactory's rubber supply after a bad harvest, Mechanism requesting use of an ender quarry, and forestry asking for permission to search my lands for their precious bees. I gave them permission, as long as they sent a few traders through with a few of their products like honey and waxes. Then we moved on to general business of who earned how much, how far in the black they are, who now runs what. I sat quietly through all of it, making mental notes of all this information. As we were about to move on to the final topic, Frank decided to interrupt. "Wait, we haven't heard from Magus yet. Please, tell us what it is that you do? I honestly never heard a thing about you until today, and I see no reason why you own such a large area of land. I am even more curious about why you're the only magic user here. Please, enlighten me." He had a cocky grin on his face, like he had just asked questions I had never heard before. I gave him a very unamused response. "I'm sure you have heard of me, just not by name. My name is more in rumors and legends than in newspapers, and I honestly prefer it that way. As for what I do with my time, I spend it looking into legends and myths, old tomes and texts for information about new or lost forms of magic. You have huge R & D departments, I have a few friends who share their research and knowledge with me, and apprentices that always find new ways to use old things. As for why I'm the only magic user here and why I govern such a large area of land, the answer is simple: The mages never split up. While you technology users divided your land among over a dozen companies, the mages never did. We're happy governing ourselves, and we have never needed corporations or rulers to tell us what to do and what not to do. If you put the land together that all of you own, then compare it to what I have, you'll see that I have less than a third of that. Not my fault you split, and because I don't really "rule" my area they have no one to divide from. Does that answer all your questions?" He looked like I just popped his favorite balloon, so I guess he assumed to have me pinned. "But....but... That still doesn't answer why you haven't been at war with each other! I know there are many kinds of mages, so there is bound to be some in-fighting." I smiled, he used a question everyone like him has. "You're right. There are many kinds of magic, and there are small battles from time to time. But all the mages know that this is the only place where they can practice magic freely, in broad daylight. When the world is against us, we can set aside our differences to work together. Is that enough of an answer for you?" He apparently ran out of questions, as he grumbled to himself then waved to have the meeting move on. An hour later most of the representatives had left, first and foremost Frank. Only Iza, John.W. Tema from Extra Utilities, Prince Muse from the power suit empire, and myself remained to chat informally. Iza had decided to talk to me for a bit, as it was customary for the host to be the last to leave. "So, what did you think of Frank?" She asked, a light grin on her face. Nice to see running a company like this hasn't gotten rid of her humor. "Well, I don't think he likes me. I have no idea why." She gave a quick snort, trying hard to hide it. "It's how men like him are. He knew all kinds of information about all of us when he got here. That fact that he knew absolutely nothing about you was driving him nuts. He first thought it was a mistake when he noticed the number of chairs, and asked to have one taken outside. Let's just say I'll be happy when he is replaced, and I won't miss him at all." "Let's see...is he the fourth or the fifth to try and ask me questions they think I won't answer..." I said almost to myself, trying to remember. "Neither. He was the sixth, if my memory severs me," John said, Muse having left the room while we were talking. "I think you're right, the last one was about five years ago. Rodger, wasn't it?" I chuckled as I remembered him. "He demanded to see my papers, and thought we were trying to trick him. He never did believe that I own the largest chunk of the world. " "Well, you less "Own" it and more guard it. You tend to let the people own themselves, for better or worse." John said, taking a seat closer to Iza and me. "True. And it works for the better more often than not. Besides, I never could see myself in one of those big buildings you are both so fond of. Too flashy for my taste, I prefer to blend in, not stand out." I told them. "That's why you live like a hermit." Iza said, before leaning back in her chair. "I admit, I envy you at times, Magus. You can walk amongst your people and they will give you little more than a wave. If I try to do that, an army of news reporters track my every move in the hopes I slip up. It's exhausting at times." John gave a small sigh "I can agree with you there. Everyone I work with wants my job. I keep telling them that they really don't." We chatted like this for another hour, both of them letting their hair down as they talked about what's been going on with their lives. We left, Iza to the pent house on the top floor and John joined me on a short walk as I returned to my home in the nether. "I must say Magus, I always enjoy the end of these meetings when we can put business aside and actually talk for a change. Paper work is all well and good, but it is nothing compared to having a nice chat with you. I grow sick of all these "Yes Men" who only want to tell us what I want to hear till the ship starts sinking." "Having a real conversation with you and a few of the others is why I stay on the board. Everything else grows worse every year, but the afterward is still worth it all. How's your wife doing anyway?" He gave a quick chuckle before saying, "You know, I've been on that board for the last ten years. You're the only one who ever bothered to ask about my family. She's doing just fine, caring for our daughter while I'm out this weekend." "Well, we only have to work today. Since we already wrapped up business you might want to spend the next few days with them. If anyone asks I'll tell them you had something more important to do." He placed a hand on my shoulder. "Thanks, I might hold you to that. It has been a while since I gave her a nice surprise. I'll see you next year." He said as he started walking to a hotel. "Feel free to visit my home any time, I'm sure your daughter will enjoy a nice vacation." I told him as he left. He gave me a nod and a grin, before turning back to the path, almost running into a lamp post. The next two days went by much faster. I greeted people, helped a few fellow mages with questions. Apparently Way and Fenn had already started spreading the word, a few asked how my new research project was going. A few other Conglomeration members stopped by my small home, wanting to chat. I didn't see Frank again after he left the meeting, so I assumed he went back home. After the festival was over, I did my normal part in the ceremony by watching them close the portal again and not demanding that they leave it open. I returned to my home to find that Tiberius had been busy while I was out. He had created runes to augment his altar. When I asked him what purpose they had, he said the altar could make a few things that were not possible before, but that was about it. The "Blood Runes" he created looked a little plain, but I didn't voice my concern. As I fell asleep that night I realized how much they look like my ritual stones. Perhaps painting them might give them more power, like they do in my rituals? I was right, as Tiberius soon discovered accidentally. He managed to create runes on the stone using sugar, which made his altar work a little faster. We also noticed that the altar only had enough power to draw effects from the four runes closest to it. Perhaps we need to create something to "Boost" the altar's range... Three days later I heard a weak shout and raced to find Tiberius. He had collapsed at his altar, young fool, after getting far too close to his limit. I helped him stand, then looked to see what it was that pushed him so far: an emerald green blood orb. I gave Tiberius a hand in filling it, and his soul network to 25K LP. He was making quick progress, but I hoped he would be a bit more careful in the future. Life went on like this for the next year and a half. Tiberius had made several new sigils that gave him a simple form of flight, boosted the speed he worked, helped plants grow, and could remove liquids. We had started work on building a new blood altar behind my home, finding that glowstone worked well enough to boost the altar past the four upgrade slot limit we had reached and that the basement wasn't going to hold a bigger altar. We had gone the extra mile to create runes that boosted how much LP we received from our sacrifices, using the same effect glowstone dust has on the altar. Then one day when I was helping Tiberius create the last few runes, there was a knock on the door. +aw.entries.rituals.thenThereWereFive=Tiberius went to get the door, and I thought it was just one of the blacksmiths asking to use one of the lava crystals he had started renting out. About thirty seconds after he left, he called back. "Master, there are some people here to see you. They're asking for you by name." It was rare enough that we got visitors, let alone ones that want to speak with me and knew my name. I walked to greet whoever was at the door and found three children. One had dark brown hair, a ragged shirt and patchwork pants, an old and somewhat rusted short sword, and looked to be the eldest of the group at fifteen. The second looked enough like the first to be his brother, but not twins as his hair was lighter and he was a little taller. The third was a pale haired girl, so blood relation was probably ruled out. Her hair was long and a little matted, she looked to be the youngest at about thirteen, the dress she had on looked a little too small for her, was falling apart at the seams and it looked like she was trying to hide behind the other two. All three of them were painfully thin, dirty, and the eldest looked like he had a few fresh scars from at least three days ago. "You must be Magus." The dark haired boy said as I walked up. "We've come a long way to meet you. May we come in?" I couldn't turn down anyone who needs help like these three did, so I told them to leave their boots at the door and have a seat. Long tale short: I now had three more apprentices. Within a week all of them became blood mages after unintentionally finding three new branches of blood magic. Vlad started working with alchemy, both making potions and mixing items to create new items. Demir started working with spells, and has already created a powerful framework for conducting his power. Bella on the other hand has shown us that demons are much more than mindless creatures, and is working out how to form pacts with demons and bring them to our world, body and soul. +aw.entries.rituals.alchemyRitual=I created two more rituals since they have gotten here, one was "The Ballad of Alchemy". It was a way to help Vlad with the creation of large amounts alchemy products, as he mentioned how time consuming creating everything he needed was. After a little work, I had this ritual ready for use. After activation, it needs a little extra set up to work: On one side of the master ritual stone you need to place the alchemical chemistry set, and on the opposite side you need to place an inventory (a chest, or anything else really. Could be a furnace for all the ritual knows or cares.) Then the remaining two sides are "Input" sides, where the ritual will search any inventory for items. On top of the master stone you must place a blood altar with an item inside to act as a "Focus". The ritual will then pull items out of the input sides and place them inside the chemistry set, then any item it finds in the output slot, or any item not needed in the crafting (such as empty buckets) and places them inside the output inventory. Once I showed this to Vlad he nearly passed out, then hugged me. To say he was happy is an understatement. 20K activation, and 10 LP every time it moves an item. +aw.entries.rituals.domeRitual=The second ritual I created was the ritual of the dome. What it does is simple, it removes any fluid block in its radius of ten blocks. But it doesn't just remove the fluid, it stores it in a small pocket of space so that when it is deactivated any blocks it removed will return. Maintaining this effect does have a small LP cost every tick. While the range seems small at first, I am sure that I will be able to find a way to extend it. Placing stuff underneath the ritual appears to have no effect, so I should ask Vlad or Tiberius to look into it. Activation cost of 10K, with a small passive drain. Hmm, to think this ritual came about when I had to deal with a small flood... That brings us up to present day. I am still trying to strengthen the activation crystal, while all my students are busy with their own tasks. I will write again once I have something worth writing about happens. +aw.entries.rituals.awakenedCrystal=After a little over three years with having Vlad, Demir, and Bella as apprentices, they have helped me awaken the true potential of my activation crystal. After helping Bella create a way to summon demons, she showed me an item a special demon called an "Elemental" drops: The demon blood shard. I already knew that the activation crystal seemed to be attracted to blood shards, but what we have been harvesting off common monsters of the night turn to dust when I try using them on the crystal. But this... this blood shard has a slight demonic aura to it, and it seems like it wants to merge with my activation crystal. After some work with Vlad, we used a few of his more potent alchemical reagents to bind the demon blood shard to my activation crystal, "awakening" the true potential of it. I have yet to try and build any new rituals, but that will soon change. +aw.entries.rituals.featheredEarthRitual=The first ritual I created is "Ritual of the feathered earth". It has a huge LP cost of 100K, but any fall damage within a 30 block horizontal range or a 20 block vertical range is negated because the ritual turns the ground soft. The ritual needs no further cost after activation due to the semi-permanent nature of softening the ground. I was trying to make a ritual to let me fly, but this seems useful as well. +aw.entries.rituals.gaiaRitual=The next ritual was based off an old magic ritual that required three royal goat sacrifices. I have managed to replicate the effect using blood magic, and have named it the "Ritual of Gaia's Transformation." The basics are this: By sacrificing items and 1M LP to Gaia, you can change the climate (or biome, as some call it) of the area around the ritual. Unfortunately, Gaia will only take items off arcane plinths around the master ritual stone, but nothing else about this ritual is cheap so why should this be? The rituals area of effect must be defined by using blood stone bricks (either the larger or normal, and has a range of 21 blocks) and it only effects places with a definable path to the master ritual stone. Simply put: If you placed a water block on top of the master ritual stone, then placed more water blocks where the water flowed until the water stopped flowing, where there is water is where the ritual will effect. The ritual assumes first of all that you have a humidity of 0.5 and a temperature of 0.5. It will then consume the items that you have placed and modify the humidity and temperature accordingly. It also starts with assuming that a range of 0.1 is acceptable in both directions. If the ritual cannot find a biome that is registered in the list, it will simply set the biome to a "plains" biome, with a biome ID of 1. The items that can modify these parameters are as follows: Sand: humidity - 0.1 Sandstone: humidity - 0.2 Netherrack: humidity - 0.4 Lapis: humidity + 0.1 Water bucket: humidity + 0.2 Lapis block: humidity + 0.4 Coal: temperature + 0.1 Coal block: temperature + 0.2 Lava bucket: temperature + 0.4 Snow ball: temperature - 0.1 Snow block: temperature - 0.2 Ice block: temperature - 0.4. It is a tricky ritual to use, but the local bee keepers are thrilled by the possibilities. A tundra at the heart of a dessert, mushroom biomes anywhere, or even tweaking the Nets biomes so living there is possible. +aw.entries.rituals.condorRitual=After three month worth of work (Tiberius says I'm obsessive about rituals, and I have little ground to say otherwise. I worked on building this ritual for three days strait, without eating or sleeping.), The Reverence of the Condor (named after a legendary Thaumaturge's sword) allows anyone in a ten block horizontal range (from bedrock to skies limit, only horizontal distance matters.) will be able to fly freely. This ritual needs 1M LP to activate, but has no passive cost at all. Since adding this ritual to a new basement layer, I have found it to be useful. Caution mast be taken however, as this ritual does little for fall damage. It is recommended to use this with the ritual of feathered earth for best effect if you are planning to stray from its area of influence. +aw.entries.rituals.meteorRitual=After reading an interesting book on where ores come from, I built "The Mark of the Falling Tower." It uses a process similar to the ritual of magnetism, but instead of pulling them out of the earth in drags a meteor out of space and pulls it toward the master ritual stone. (Note: The meteors summoned by the ritual often come in with a powerful blast. This is unavoidable, as we are dragging in huge chunks of rock at very high speeds.) This process is not cheap, needing 1M LP to activate, then a "Template" item sacrificed by dropping it on the master ritual stone to help the ritual find a meteor. The item dropped will influence the meteor it finds, but there will always be some randomness to the process. Here is what I have discovered with some experimentation (Note, this might differ from person to person. I can only give you a reference point for what you might get and tell you what they need.): A stone block summons a huge meteor filled with lots of stone, while also having ores often found close to the surface of the world scattered about. Common things to find are: Coal, apatite, and iron. An iron block summons a meteor filled with metals like iron, gold, copper, tin, lead and silver. It also has very little stone, and some lapis and redstone mixed in with the metals. A diamond calls down a meteor that is often filled with gems (diamond, emeralds, amber) and other rare items like cinnabar. Finally a nether star calls down a meteor filled with very rare or tricky to get ores like nether quarts, diamonds and emeralds (more than what the diamond summons), sunstone, moonstone, certus quartz, and the always rare iridium. (Gregtech has become a lot friendlier since I discovered this ritual, for some reason). I should repeat that your location in the universe influences what the meteors come with. The ore amounts, meteor size, and even what ores do spawn have been known to change, from some having metals I've never heard of to other iron block summons having only iron, gold, lapis and redstone. It is almost as if someone can tweak these factors to their heart's content... No, nothing more than my paranoia. +aw.entries.rituals.expulsionRitual=The next ritual I have created with my wonderful new activation crystal was one I'm rather proud of. Every few years someone gets it in their head I'm the incarnation of evil and then raise up a mob to try and kill me. Since I knew it was time for it to happen again (always just after the first harvest, when the farmers are planting more seeds. This is around the time it happens, like clockwork.), I created the aura of expulsion. What it does is simple: It creates a field in a square 25 block radius that will check for anyone who isn't the activator. If it finds someone who isn't the activator, it will "Expel" them by randomly teleporting them away. This ritual has an activation cost of 1M LP, with a 1K fee every time it expels someone. I should note that if someone lands inside the field of another aura of expulsion they will be teleported again and again until they land outside the field or the ritual owner's network becomes dry. You have no idea how entertaining it was to sit on my porch and watch as the mob suddenly realized that they were heading in the wrong direction when they started marching toward my home. It took them an hour, but they finally figured out that they couldn't get close to my home. Afterward I got to hear all the silly reasons why they wanted to kill me this time. Also, I have added a check to the ritual for an inventory above the master ritual stone. If it finds a blood orb bound to someone inside, then they become "Whitelisted" from the effect of the ritual. +aw.entries.rituals.costOfProgress.1=Well, I write this with both good news and bad news: The good news is that we now have a lead on what my students need for their next tier of blood altar. The bad news is that what they need is very hard to get: Beacons. Four, to be exact. Nether stars are an extremely rare resource that very few have access to, so building this seemed impossible to them. I told them that I might be able to pull a few strings, but it will take time. For now they are working on building the upgrade runes they will need, then I will tell them to try and perfect what they can do with their master blood orbs. Thankfully, the next Hell harvest is in less than a month so I can start the plan I have been thinking up soon. But it will take at least a year to accomplish, so we have time to kill... I have just returned from the Conglomeration meeting, and my plan is now in action. You see, the host for the next meeting is the Mage guild, and as the host I have the authority to make a request: That all the Conglomeration members show up, in person. It has been what, thirty years since I have met most of them? Regardless, I gave each of the representatives a letter to deliver to the Conglomeration board members that said "As the host of next year's meeting, I have two requests. The first is that we hold the meeting near my home instead of in the nether, as I really don't have anywhere large enough to host there. The second is that all Conglomeration members show up in person. Don't bother bringing servants, but you may bring friends (give those poor souls you send in your place all the time a thank you. They deserve one.), and family members. Room and board should not be a problem, as I will gladly provide both. Don't send people in your place like most of you do, as I will not allow any substitutions. "If you attend this meeting, guests or no guests, I have prepared little gifts for each of you as a thank you. Inside this envelope you will find a card with what I am offering. You may find my offer beyond believe, but I can assure you that I have everything offered and more. Consider this a little incentive to come, as I know most of you spend the Hell's harvest working instead of enjoying a small vacation. If you wish to attend, simply send a reply letter to me in whatever manner you see fit. I look forward to seeing you all again." The gift I offered depended on who got the letter. To Gregorius Tech IV (he doesn't trust anyone else to run his company, so every time he feels like he can't run the business anymore he makes a clone of himself, then moves all his memories to the clone.), I offered a stack of raw iridium ore. To Iza Lemming I offered a few resonant ender cells (fully charged, of course. I have more than magic tools in my basements.). I could list them all, but then this book will drag on longer than it already has. I told my apprentices that I should be getting a few letters soon, and a week later I started getting the letters in a wide variety of ways. Gregorius opened a hole in space to have an intern hand deliver it, Queen Muse sent a power armored messenger with her letter soaring over the tree tops. Lucas Jaguar sent one of his personal trains in, one that built a track as it went and removed it automatically. I could go on, but I think you get the idea. When Tiberius asked what was going on, I told him I would be having a few guest over in a few months and these were their answers to my invitation. All of the letters said yes, so I must have gotten their attention. For the nine months after the Hell's harvest festival, I learned all I could from my apprentices. I wanted to use Tiberius's artifacts, so he showed me every sigil he has made and helped me upgrade the bound armor he gave me. Vlad showed me the secrets (in exchange for a few secrets of my own) of his potions, and the power he could bring out of what used to be so simple. Demir gave me spell components, and showed me how to build a spell structures. Bella helped me summon and tame a demon similar to Sinferrius (the "Fallen Angel" breed), who was named Thanatos. We found that the two of us shared a thirst for knowledge, and he started helping me with research in my library. When there was only three months until the next Hell's harvest festival, I opened the "Conglomeration Hall." +aw.entries.rituals.costOfProgress.2=The Hall is where I have stored most of the Technology I acquired over the years, from trades with the other board members or deals with more shady groups. Every innovation and project that any of the world's companies have ever made can be found here, from redstone furnaces to industrial grinders, power armor upgrades to quantum armor, and coal coke ovens to mass fabricators. Most of the time I never use this place, but it works as a fine testing ground for applications of my magic. After doing the ritualistic "Dance of the Mage" to call up from the ground then open the gates to The Hall, I noticed that all of my apprentices were standing behind me slack jawed. "What... What did you just do?" Demir finally asked. "I opened the door to this old place. We need to do some cleaning if we're going to have guests here. Dust gets everywhere and... Well, what are you waiting for, come in and help me!" It took all of us the first two months to clean the place (all ninety-five floors), and we spent the final month taking care of all the last minute touches such as making a large order for food from the great meat and produce alliance (Queen Pam, Harvey Growth, and Larry Iguana are the main representative for the Conglomeration, but there are many smaller colonies that make up their territories). Shortly after making sure everything was in working order, all the dust was cleaned out of the place, all the beds had clean sheets, and many other tasks were done was it time for the Hell's harvest festival, I asked my apprentice's to watch the place while I lead the other members here, and to greet them when they arrive. I think at that point Demir still thought this was some sort of prank, as there isn't any mention of the mage guild having a representative in any history books (and I've made sure it stayed that way. Any who have tried find their books missing, pages torn out, and critique for believing some legend is fact.). We went through the normal procedure, a merchant that had just moved in to town lighting the portal. After milling about the place for an hour, I met all my guests at Fire Grove Park (tourist spot, if you can believe it) and set about escorting them to my home as orderly as possible (which wasn't very). Thankfully, almost everyone was in commoner clothing as I had requested so no one realized all of the leaders of the world were walking past them. After just half an hour, we were all in the carriages I rented (I told the merchant it was a family reunion. He never asked if it was my family.), and on our way to my home. In total there was a little over a hundred and fifty people here, so I'm glad they took up my offer for guests. Once all of the carriages arrived, and I had asked the drivers to return a few days later, I set about greeting everyone and showing them around. It took most of the day, but everyone started relaxing and enjoying a nice vacation. We all came together again for dinner, and as we enjoyed meals cooked by a local family run restaurant that I always hired for large meeting like this I moved from table to table, greeting guests personally and answering questions. As the hour grew late all the Conglomeration members joined me in a small room for the meeting. "Well Magus, I had no idea you owned a place like this!" Raylind Diyo said as he came in. "I might have paid you a visit sooner if I did." Raylind said as he took his seat, smile on his face. I saw he brought both his wife and daughter here, so that might be why he is in such a good mood. "This place is better than any hotel or amusement park I've even been in!" Carrin Calclavia, the fifteen year old owner, head of research for Modular Force Fields, and daughter of the former owner Count Calclavia said while spinning in her chair. "Seems like a waste of my time," Gregorius said. "Oh, don't be such a spoil sport Greg. Most of us have forgotten what not working every minute of our lives is like, and I for one remember why I liked not working when I was younger!" Jason Algorithm of Applied Energetics said as he took his seat next to Greg. Greg gave him a cold glare for a few seconds, then his expression broke as he said, "Alright, I'll admit I have enjoyed not worrying about paper work for the last few hours." "Now that Greg has almost smiled, let's go to Magus for more miracles," Carrin said, mischievous grin on her face. "Well, everyone is here, so we may start. Any news to share?" The news this year was a little more lively than normal, a few had started "Re-inventing the wheel" to use their technologies in new ways, while a few others had started work on new projects. Then we moved on to the normal trade requests and protocol stage, where it was business as usual. Until it was my turn. "Before we move on, I have to request a few wither summons and kills." I told them. "Ah, you need nether stars? I still have a few spare, so you can use them." Jason said. "No, I only need a few stars. It is the killing of the Wither I'm more interested in. Call it a test for my students, who I'm sure most of you have met earlier today." Raylind started brushing his chin with one finger, before saying "Really, you want to have those kids kill a Wither? Seems like a bad idea to me..." I smiled at this "Don't worry about them, they can handle themselves. It's the withers you should be worried about." "Besides..." Carrin said "All of them are older than me. So I would not call them kids. And they're more mature than a few of you in here..." I had seen Carrin and Bella talking earlier, so it isn't a surprise she is defending them. And Carrin loves getting gabs in when she can, so this was the best of both for her. "We're getting off topic. How many wither summons are you requesting, and how many do you plan to have done by hand?" Iza Lemming said, trying to help poor Raylind. "Thirty summons, and thirty manual kills." This drew a gasp from everyone, including Greg. "Thirty... All at once?" Doland Tema, son of the founder R.W. Tema asked. "No. one for each my students, six for myself, and twenty as a finally. As I said, thirty," I told him. "Might I ask what you need that many nether stars for?" Greg asked, eyebrow raised slightly. "As I told you, this is a test for my students and myself. We really need only four stars, but I'd like to test the limits of the new form of magic we've been working on. And if you don't mind, Doland, I'd like to use Hell's Fridge for all of the Withers." He looked at me for a few seconds before saying "Well, it would be a shame to kill all these withers without making a show of it. Alright, you helped build the place anyway so I have no reason to deny you. Hell's Fridge is yours to use. And I approve the Wither summon request." One by one everyone approved the request, some more warily then others. Everyone here knew what nether stars can do, so someone with thirty of them� Even in my KAMI days I didn't ask for that many at once. The meeting ended shortly after that, but I asked Greg to stay as I had to talk with him privately. After everyone else had left, I created a few protective wards to keep what was said secret to any eavesdroppers. "What do you need to talk about?" Greg asked, more curious than anything else. "I know we're both tired, so I'll get right to the point: I know all about your little "Project New Gate."" This seemed to shock him briefly, so I said "Oh, you and I both know your company can't keep secrets. It would have gotten out sooner if I didn't pull a few strings to keep it under wraps." Greg gave me a hard look for a few seconds, then sighed. "Alright, how much do you know?" "Everything." I told him. "I know you opened up a gateway to Tartarus, and then you started using robots to mine the place for new materials. But that didn't quite go to plan and demons overran the facility, then started getting out and roaming the land. That was about twenty years ago." Greg slumped his shoulders, knowing I had every detail about one of his darker secrets. "So what now? You're going to tell the others? Try to bankrupt me or black mail me?" He said, voice filled with regret. "No, as this wasn't your fault. You couldn't have ever known something like this would happen, from what I've heard and seen. It was an accident that has gotten way out of hand, to the point where you can't clean it up, and your pride has stopped you from asking for help. I know your company caused this problem, and for the last twenty years you've been trying to fix it. So now here is what's going to happen: You are going to talk to all of my students and tell them everything you know. Tomorrow we tell the other board members. Then, once my students tests are over with, you'll send me all the data from your research notes on New Gate. Tartarus is a place filled with both demons and magic, so I should have a better chance of opening a stable portal that I can enter Tartarus and close your portal from that side while you close your own portal in this dimension." He gave a cynical chuckle. "You make it sound so simple. What do you stand to gain from helping me? I take it there is something you want me to do for your help." I interlocked my fingers, then smiled. "I'll stop the demons coming into the mage guild, so that is enough. But you're right, there is one thing I need you to do. But I'll only tell you in front of the other board members tomorrow. It won't cost you a penny, but the price I will ask my be more then your willing to pay. Now then, I need you to go through my first request: Talking to my students about this mess you've made." I called in Tiberius and the others, each of them surprised that I wanted them to speak with Greg. Greg did what I asked and told them everything he knew, then I did the same. Both Tiberius and Bella took the news hard, discovering that I had known for the last few years where the demons had come from and who was responsible. "Why didn't you tell us sooner?" Tiberius yelled at one point. "I had cursed his name for the past few years, now you're telling me it isn't his fault?" I had enough of being the kind father at that point, so as the strict teacher I said, "Remember when you made your first dangerous level infusion?" That fazed him for a moment as he remembered the disaster that was. "You tried to make it without having enough essentia, then ran around the altar trying to fix it while losing items left and right. Remember how I simply sat in the next room and let it happen, then gave you a hand cleaning up?" Tiberius nodded without saying a word. "That is what has happened with Greg. The infusion has gotten out of control, so now it is time to help him clean it up. I gave you enough time to realize the infusion was out of your control, and you realized it in time and stopped the infusion. I gave Greg time to realize he needs a mage's help to fix this mess, and now he is willing to at lease consider my help. That is why I never told you, to give him a chance to fix it on his own." After I told Greg to leave and get some sleep, I told my students the truth: I had only discovered most of the details in the last few years, and had started looking deeper into it after Bella had met Sinferrius. The next morning the board members came together after breakfast. Greg fulfilled the request I had yesterday of telling the other members, then came the hard request. "I need you to ask me for help." I said to Greg. He looked puzzled, saying "But I thought you were going to help me already." "No, I can help you, but I will only do it if you swallow your pride and admit you need my help. As I told you, this request might be a price you aren't willing to pay while not costing you a penny." Greg stood up, and with the look of a man who has been utterly defeated said "Magus, will you help me close the portal to Tartarus?" I stood as well, placing a hand on his shoulder and told him "All you had to do was ask." After that we moved onto the topic of the withers I needed to kill. It would be hosted in the nether in one month's time, and all the other members had already decided to cancel whatever they had planned for that day. It is a rare occasion that Hell's Freezer is used, let alone by a few "Representatives of the Mage Guild". They would make the announcements to their lands, and it was to be considered a "Holiday" for everyone so they may watch. Hell's Freezer has a set of stands for an audience to watch it like some sport (which, in all honesty, that is what it has become), with a set reserved for each of the countries that make up the Conglomeration. Most of them have the seats sold to the highest bidders, but a few offer seats to anyone who comes for no charge (like the Mage Guild) or to close friends and family (Raylind Diyo does this, yet he still fills every seat with only friends and family). After the meeting was over, I went to the village and bought a few things from some traders (Tiberius needed more mana beans and wispy essence, while Bella wanted me to look for flowers to add to her garden), and while I was there I traded rumors with the group. I told them that all the Conglomeration members are supposed to be in the Mage Guild's land (They laughed at this, thinking it a joke.) and told them that I heard someone from the Mage Guild was going to use Hell's Freeze in a month's time. In exchange they told me of the local conspiracies on where the demons are coming from (Current believe is that a few miners unleashed them by digging too deep into the earth. I'll let them keep guessing, for Greg's sake.), and word of a war outside the Conglomeration's land (They mentioned a women with black hair and mismatched eyes was leading the conglomeration's defense. Good to hear she's having fun, but I hope she comes home soon.) As quickly as they came, the board members left. I thought my hand was going to fall off after all the handshakes, and I nearly fell over from some pats on the back. It has been a few hours since the portal was closed, and on the trip back I told the others about the deal I had made for the nether stars we needed. Each of them would fight one on one with a Wither to claim its star. Then, after my own brawl with six so I can clear away the rust of time, we would join to fight twenty together. When they asked if it was possible to kill twenty withers at once, I assured them we could do it. I didn't say that the most ever fought in Hell's Freezer was ten withers against three people and two of them died in the fight, as that would worry them a bit too much. That brings us up to now: I'm preparing myself and my students for the fight, teaching them what I know about killing withers (I have claimed my fair share of nether stars back in my KAMI days) and helping them craft all the items needed for their fights. Tiberius plans to use a combination of his sigils and thaumaturgy to kill them. Vlad is brewing a few potions to give him an edge (I've seen what his best potions do. He can handle it without any problems.), while he is using a few of the sigils he made with Tiberius and some spells from Demir. Demir is going all out with spells, from both blood magic and Ars Magica (I have helped him make a few of my favorites, and Vlad has made him mana potions to keep him going in the fight.) Bella is going to use her demon friends to help while she uses some of the witchcraft I've taught her (she has enough infusion of light power to protect her, and I know Sinferrius would never let Bella take so much as a scratch from some Wither). As for myself, I have been brushing the dust off my old bag of tricks. We will see if they are enough to get me through. If there is another page to this book, you'll know I lived through it. We killed all thirty withers. Vlad, Tiberius, and Demir are injured, but will make a full recovery in a few weeks' time (My regeneration ritual has helped them while their bodies do most of the work.). Bella and I came out with only cuts and bruises, so we have been helping the boys until they have healed. I've had to lock Vlad out of his lab so he will rest, and Tiberius is reading every book I can find for him. Demir meanwhile has ate enough to feed a cow, and yet the boy hasn't gained a pound. Aside from our light wounds, we managed to get all thirty nether stars (the old record was put to shame) and I am waiting for everyone to be fully healed before we put together the altar. The battle to gain said nether stars was hard, but amazingly brief. Each of my students used their respective field of blood magic to kill the withers, and my own Withers took less a minute to kill. Then we faced the twenty together. We used every branch of blood magic to take them down, with Vlad healing and buffing us, Tiberius defending us, Bella using her demons as support, and Demir and I dealing damage. It was a hard battle that lasted less than five minutes, but all of our soul networks were strained by the end of it. Currently, I have just begun researching and experimenting with ways to open a gate to Tartarus using the data Greg has sent me. From simply skimming these notes, I can tell that I will need the help of all my apprentices to build this. I will create rituals as I find time and inspiration, but this gate will most likely fill my days. Until then, I will start scattering copies of this book and the ones my apprentices have made. While I have seen that I have gone off on tangents about things other than rituals, I feel like I should keep it. Reading the books of my other apprentice's, I can see I'm not alone. +aw.entries.rituals.zephyrRitual=I must admit I have become lax in my updating of this book. Since the last time I have managed to sit down and start documenting, I have been experimenting with the "Reagent system" my colleagues have created as well as forming new rituals. I have not yet finished the portal, but I believe I have come up with a plan on how to build it.... But that is something for later. Starting with the rituals, I have had a few interesting ideas... There was the Call of the Zephyr, a ritual with the purpose of retrieving items off the ground and depositing them into any inventory above the master ritual stone. It does not just call the items through three dimensional space, but use a few new tricks to transport the items quickly and even through solid matter. +aw.entries.rituals.harvestRitual=Next up was the reap of the harvest moon. What it does it quite simple: It can harvest plants within a 9x9 area centered on the master ritual stone. However, I have needed to configure the ritual for any plants I need it to harvest. A few plants, such as wheat and carrots, I have already adapted the ritual to but I know of several crops that it can't function with this ritual. Later on they might work, but for now if it doesn't work then it might never work. +aw.entries.rituals.eternalSoulRitual=I have tried to improve the feathered knife ritual, but managed to achieve a strange but useful result christened Cry of the Eternal Soul : A way to convert LP from the soul network into liquid LP. It was designed to be constructed underneath a blood altar, and will link to the first one it finds. Afterword, it will drain the soul network of the activator and only if he is in range to fill the altar. This does have a few nuances, however: While inside it's range, the activator is extremely weak to the point of being near death. The conversion rate is rather poor at a two LP spent for each point of liquid added(One is added to the altar, and one used to create it). The altar also seems to consider this the same as a pipe adding LP, so any input is throttled by the buffer. As a result, any altar used will need to be built with usage of the ritual in mind. +aw.entries.rituals.ellipsoidRitual=As a means to aid in construction, I created the ritual "Focus of the ellipsoid". This ritual checks an inventory above the master ritual stone, and after my recent redesign the ritual will check an inventory directly below the master ritual stone to find blocks to construct the sphere(I couldn't get the ritual to function with the inventory any lower. This could be worked around with hoppers, teleposing the inventory, or just having something that doesn't care. I personally went with a simple setup of teleposers, redstone, a few rituals as a cobble stone production, and a hand full of demons. The demons wondered in over night, and I couldn't get them to leave.). It checks the first three slots of the inventory above it, the forms a dome with the dimensions based on the values. First slot is the X-radius, second is y, third is z. This ritual does have a cost per block, so large spheroids will cost far more then small ones. From initial tests, this seems to work well in conjunction with a ritual of the dome for underwater construction. +aw.entries.rituals.evaporationRitual=Speaking of the dome, another ritual was constructed to work with it: Song of evaporation. Basically, this one time use ritual will remove the remnants the dome ritual creates from fluid blocks that allow then to reform. In other words, when the dome ritual is removed the fluids will not return if you use this. Simple, but extremely effective. +aw.entries.rituals.sacrosanctityRitual=As a form of protection, we have created the Ward of Sacrosanctity as a way to deal with the hourds of monsters that form in our world. While I don't feel like going into Dust theory, this ritual blocks mobs from forming inside it's range(Thirty two blocks from the master ritual stone) regardless of light levels. Keep in mind it has a passive cost to run, so make sure you have a soul network strong enough to handle this. +aw.entries.rituals.evilRitual=And on the flip side of this coin, I created the Veil of Evil. It is effectively a way to increase mob spawning(Again, using the principles of Dust theory), and allows them to form regardless of light levels. Once again, it has a passive running cost to a shut off switch is in order. +aw.entries.rituals.stomachRitual=I have had many nights spent researching interrupted by the annoyance known as "Hunger". As ad hawk solution, I have built "Requiem of the satiated stomach". Much extracting food from an inventory above it, anyone inside it's range will fill satisfied. However, it does not actually fill your stomach with food(This turns out to be quite painful), but instead lowers the rate at which you consume food. Effectively, it adds the saturation of the food to anyone in range(So beef would be far more effective then bread). +aw.entries.rituals.reagentEffects.1=I mentioned a reagent system earlier, so I might as well give a brief explanation of it. Using the raw alchemical energy contained inside one of the reagents, they have discovered a way to augment my rituals. The results of this have been interesting, from improving old effects to adding completely new ones. However, these improvements are not free: The costs and if it is active or passive drains depends on the ritual and effect in question. I will try to document the effects, but the costs will be left for the readers to discover(I can't very well tell you everything, now can I? An old man needs to get his entertainment where he can.) +aw.entries.rituals.reagentEffects.2=The full spring has more effects then the average ritual, with Aquasalus letting it hydrate farmland in a four block radius from the master ritual stone. Offensa allows it to function as a weapon, thickening water vapor in the air to the point it is like drowning(By default it leaves the activator immune to this effect), but if it is paired with reductus it will ignore any humans. Crystallos allows it to freeze water, functioning as an ice generator. Finally, sactus allows it to have more control over where it places the water to the point of filling a tank placed over the master ritual stone. +aw.entries.rituals.reagentEffects.3=The serenade has only three effects, with offencia, reductus, and sanctus functioning in the same way as full spring. Main difference is that instead of causing them to drown, it gives them a more... Explosive result. +aw.entries.rituals.reagentEffects.4=The green grove is simpler in it's effects: Terrae and orbis terrae cause crops to grow even faster then normal(Orbis is slightly faster, but the effects do stack). Aquasalus allows it to till and hydrate any farmland above it, but only the three by three so it isn't as effective as a full spring. Virtus extends the range it speeds up growth to a nine by nine above the ritual, but this doesn't allow it to hydrate that far. +aw.entries.rituals.reagentEffects.5=Interdiction has two strange effects. With aether, items become influenced by the ritual as well. Magicalus removes the safety I put on the ritual so that humans are effected. +aw.entries.rituals.reagentEffects.6=Containment becomes more effective at keeping things in with reagent. Crepitous allows it to supress the natural destructive nature of the creeper, while magicales prevents teleportation for mobs inside. Aether has been just a simple extension on range. +aw.entries.rituals.reagentEffects.7=A ritual of unbinding powered with sanctus allows the breaking of a blood pact, so it can be reforged with another person. +aw.entries.rituals.reagentEffects.8=High jump has general effect improvement, with aether allowing it to fling you higher and terrae increasing the range of fall damage protection. +aw.entries.rituals.reagentEffects.9=Speed ritual has some interesting possibilities when upgraded with reagent, with sanctus and tenebrae allowing it to act as a form of animal sorting. Sanctus limits the effect to baby animals, tenebrae limits it to adults. Aether sends you farther, terrae limits the vertical distance it will launch you. Finally, reductus shields you against any fall damage temporarily for a safe landing. +aw.entries.rituals.reagentEffects.10=Magnetism has purely utilitarian upgrades, with terrae and orbis terrae increasing it's range while potentia improves running speed. +aw.entries.rituals.reagentEffects.11=Crusher has a few more interesting effects, with orbis terrae, potentia, and virtus adding fortune effect. Crystalus adds a silk tough effect(This can be mixed with a full spring for an ice farm), and incendium turns cobblestone into netherrack(Vlad mentioned an idea on autonomous incendium creation with this). +aw.entries.rituals.reagentEffects.12=Shepherd's effects seem to make it better for animal breeding, virtus allowing for animals to... How to put this tactfully... It triggers the urge to reproduce. Reductus on the other hand lowers the natural time between breeding cycles. +aw.entries.rituals.reagentEffects.13=Feathered knife has a few interesting effects to improve utility. Sanctus increases the amount of life force it leaves you with, so you aren't as weak inside it's range. Reductus lowers the range, to allow you to allow you to only be inside the range when only a few blocks from the master ritual stone(Testing shows that it is around the edges of a T5 altar). Magicales limits the draining only to the activator, so your guests don't make an unwilling donation. Potentia has the simple effect of increasing running speed. +aw.entries.rituals.reagentEffects.14=Reductus limits the regeneration ritual to humans, virtus allows it to heal even faster, with praesidum increasing the range. +aw.entries.rituals.reagentEffects.15=The effects on the feathered earth ritual are standard: Aether is vertical range, terrae and orbis terrae is horizontal range. +aw.entries.rituals.reagentEffects.16=Reverance of the condor has only two effects, with aether allowing it's effect to persist a bit longer after leaving it's area of influence and reductus limiting the flight only to the activator. +aw.entries.rituals.reagentEffects.17=Mark of the falling tower has quite a few unique effects, with terrae and orbis terrae buffing the average radius of the meteors(But these effects doing seems to stack with each other), crystalos summons a meteor with ice instead of stone, tennebrea has obsidian instead of stone, and incendium has a variety of nether materials. +aw.entries.rituals.reagentEffects.18=Ballad of alchemy only has a speed buff from potentia, no matter what I try recursive crafting seems impossible... +aw.entries.rituals.reagentEffects.19=Aura of expulsion seems to have two normal buffs, as virtus increases the distance something can be teleported and potentia the range of influence. Tennebrae has the interesting effect of allowing the ritual to teleport entities other then humans. +aw.entries.rituals.reagentEffects.20=Dome of suppression only has two range increases from aether and aquasalus. +aw.entries.rituals.reagentEffects.21=Call of the Zephyr with reductus adds a delay to when it picks up an item/ This has shown some interesting uses in automation... +aw.entries.rituals.reagentEffects.22=Cry of the eternal soul with sanctus leaves you with a bit more life, so you aren't knocking on deaths door. +aw.entries.rituals.reagentEffects.23=Well of Suffering, after a few tweaks on my end, is now able to accept three reagents. Potentia extends the range it has vertically, simple enough to understand. Tennebrea improves the efficiency of the process, allowing you to gain double the normal amount of LP from health then normal. Finnally, Offencia has the ritual damage mobs twice in quick succession, harvesting life essence faster and killing mobs faster. +aw.entries.rituals.reagentEffects.24=Rhythm of the Beating Anvil only has two reagent effect available as it stands. Potentia raises the rate of crafting from five times a second to twenty times a second. Virtus allows it to use the output chest as a fourth input. +aw.entries.rituals.reagentEffects.25=Blood of the New Moon only has one effect, we terra replacing moved blocks with dirt instead of leaving a hole. +aw.entries.rituals.conclaveOfMages=With my experimentation into reagents, I think I have the final piece of the puzzle I have needed to build the portal. I may need to call the conclave of the Mage guild for help executing my plan... The conclave has agreed to my plan, and we have set out on the road to Venric's folly, a somewhat natural prison to contain any demons that our portal spawns so they aren't as dangerous to people. Once we fortify the area, create a base of operations on the walls to view the demons progress from a safe distance, then set up a Nexus link here we will be ready to open the portal. Despite all the hardship it may cause, we will-No, we must open it. To many innocent lives have been lost to stop now. +aw.entries.rituals.forbiddenParadise=It is the eve of Forbidden Paradise, as the other mages have started calling it. The ritual is built and ready, I simply await the final hour before beginning. To pass the time, I will document the theories in place behind... the ritual I have yet to name. We've been so busy the last few weeks I haven't had a chance to give it a proper name! Well then, that will need to be addressed... I feel Bella should christen it. The work is done here, so I shale hold a small ceremony for the naming before sending off the others to a safe distance away. +aw.entries.rituals.convocationRitual=Convocation of the Damned... As fitting a name as any. Well I promised theories, so I'd best get started. The basic construction of the ritual is an improvement on the ritual of binding utilizing dusk runes and requires a far larger footprint to build(Around a hundred and twenty eight ritual stones are needed, I recall). The ritual then needs three investments; Fifteen million LP to start the process, eight full belljars of assorted reagents must be routed into the master ritual stone in any order(The ritual is designed to have them on the pillars, and in fact does not like working without them. The reagents needed are Incendium(Fire), Aquasalus(Water), Terrae(Earth), Aether(Wind), Sanctus(Holy), Tennebrae(Shadow), Magicales(Arcane), and Potentia(Energy)). Since Vlad's reagents have proven successful in summoning demons with Bella's little setup, this applies more power from the raw reagent on a much larger scale from the ritual in addition to the jumpstart LP offers. The final part requires the portal to be "Set" from a sacrifice. Using a blood altar placed above the master ritual stone and a demon, you set the portal by sacrificing said demon with a dagger of sacrifice after all the reagent has been consumed. If all the steps have been completed correctly, then the portal should complete and a link to Tartarius forged. After that... Well, I have theories but only time will tell if they are more then that. It is time to get some sleep, we have a long day head of us tomorrow... It has been a long day, but all of space hasn't collapsed in on itself after our efforts today. Always a good start, at least. The siege team has returned from a successful mission. An interesting side effect of how the portals work cause all demons who have entered via that portal to vanish, returning to their home since the portal acted as their "Anchor" here. But that isn't the big news. What happened after we opened the portal was something none of us expected: The demons started colonizing. They have been building homes, gathering resources, laying down roads... They have been building a proper encampment. The others have a few tales of their own about the demons, as I was out of commission for most of the day(Activating the ritual took far more out of me then I thought. I will need to start organizing our future plans now that this... Invasion has begun. +aw.entries.rituals.longHaul=It has been a little over a week, we've managed to make several improvements to our equipment using some of the shards retreated from the demons, and said demons have shown no sign of leaving any time soon. Since it was my plan to open the portal, I have volunteered to stay here and watch over the invasion and make sure the demons don't get out of check. Already a teleposer link to my homestead has been created for myself and my apprentices to use, and we have started work an a new home here and Venric's folly. But if I must build a new home here, even a temporary one, I should work on getting a few basic amenities to help ease our lives here while we see how this invasion pans out. +aw.entries.rituals.phantomHandsRitual=My first task was to create a ritual to help deal with all these chests we have laying around, as it is getting to be a nightmare finding things after the fledgling thaumaturge Soaryn paid a visit. Having a ritual take instruction, however, was a little harder then expected. After several experiments, I have discovered a relatively simple method to achieve this using chests(Same rules as most inventories with rituals. Doesn't care what it is, from a chest to a furnace. I will be using chests as an example, as that is easiest.) To begin, I need to cover the logistic foci that allow you to give instruction to the demonic force behind the ritual(Only thing smart enough to handle this task). Adjacent to the master ritual stone can be up to four chests, and these hold the "Input focuses" the ritual checks to know what to pull from and how to pull from it. In laymen terms, you right click on the side of whatever you want the ritual to pull out of and it will follow all the normal rules for extraction for whatever side you clicked on. The output foci need to be placed in chests located at the four nooks in the V's of ritual stones and roughly two blocks away from the master ritual stone. They follow the same rules for marking, right clicking on the side you want the ritual to send items to and following item input rules for the block. However, there is one addition: If you shift click on an inventory, it will not only mark it as a destination but save the item total of the inventory. If the focus has a saved total, it will keep the bound location stacked with that amount for each of it's set items. Note: You don't need the final destination to hold all the items for total binding, you can use a second inventory as a middle man to set the total and then bind the focus to the new inventory without changing the total(Make sure you don't shift right click on the new inventory with the focus as that would reset the amount). Should you wish to remove the item limit, shift right click on an inventory without anything inside. There are a few variations of the output focus, each with subtle differences that impact operation. The red "Default" focus is the standard focus, has no special properties to it. It will ignore the NBT of items, and will check the "Metadata". The blue "ModID" focus instead of checking exact items will instead check the origin and classification of the item and will send anything that matches this. For "Origins and Classifications", I mean anything made my the Industrial craft corporation will be sent to the same location but anything made by their splinter corporations like nuclear control or advanced solar panels will be sent to different locations. The rules behind what belongs to what are archaic at best, but the scribes and scholars at NEI and WAILA keep exact records of these things so seeking their help may be needed if you don't want to rely on trial and error. The dark green "Metadata" focus isn't as exact with metadata, allowing items such as dye and colored glass to have all the subtypes and variations sent to the same location without needed to specify every single one. This also applies to damaged armour, weapons, and tools. The Yellow "NBT" focus is very exact with what it sends, keeping track of the tiny hidden differences such as how much Vis a wand has, what setting a ritual diviner is on, where a spell crystal is bound, ext... It also checks meta data, so keep that in mind. Finally, the purple "Global" focus needs you to set any item to send(What it is doesn't matter), and afterword when the ritual reaches this task it will send anything it possibly can. This is useful as a last resort location for anything you don't want to have sit in a source location but you have not set anything for the ritual to do with it and don't want it to clog up the system. Now then, the ritual itself. As I stated, it will check the adjacent for where to pull items out, what are the source locations. The output foci set where to send any items from the sources, what is the limit on what to send, and all the rules on what it should be sending. To specify this, you need to place one or more output foci in one of the chests to tell it where to send it and how to look at the items, then one or more items after it to specify what it is to be looking for. If the ritual finds another routing focus after the last item in a "Command chain", it will create a now chain following all the same creation rules as the first and acting independently of it. I should note that the ritual will work sequentially, sending all possible items to the first focus location it can while still following all the set rules, then move on to the next focus and doing the same. Additional quirks of using more then one output foci in the same chain: If more then one of the foci have a item limit set, the limits will add together so having four foci with sixteen set as the limit as sixty four. Also, the ritual has some logic for sending items in a chain: For all foci types bar one it will act as "OR", meaning it can send items if any of them match and will go to the first match. The NBT focus, however, acts as an "AND" and the ritual will only send items if they match both the current focus and the NBT focus rules. +aw.entries.rituals.anvilRitual=With a way to move items around at hand, it is the next logical step to have a way to refine items automatically without needing to spend hours at a workbench crafting. Cue the creation of "Rhythm of the Beating Anvil", and I must say I'm rather proud of how it turned out. The ritual will look two blocks above the master ritual stone for up to nine inventories, and will use the items it finds in each inventory to try and form a recipe, then pull out of the three input inventories one block down and two out from the master ritual stone and next to the earth ritual stone to form the item and finally push the crafted item into the output chest(It's side is marked by a water ritual stone next to where the inventory goes). For shaped recipes, it will use the output location to determine where is the "Bottom" of the crafting grid is located, and will form recipes using that as a reference point. Now then, how you set a recipe is simple: In the first slot of each used inventory, place any item the recipe needs or leave it empty if the recipe doesn't need anything there(Like the middle for a furnace or chest). Place the used items in the inputs locations, and the ritual will craft up to a stack of the output before stopping. The ritual will then check the second inventory slot of each inventory for a recipe, try to craft it, then repeat for the third, then fourth, then fifth... You get the idea. The more inventory slots you have, the more recipes one ritual can handle. A tip for use: Normally chests don't like having more then one side by side, due to the parts used to merge to chests getting in the way. However, this does not apply if you alternate normal chests and trapped chests. While it will be added post script to the reagent effects, I should mention the effect of Virtus to this ritual as it is rather useful: It will allow the ritual to use the output chest as another input chest. While that doesn't sound useful, it actually allows for reciprocating crafting(An example of this is imputing logs, the ritual turning the logs into planks, planks into sticks, planks and sticks into signs, planks into chests, ect...). +aw.entries.rituals.dawnInk=This "Demon invasion" as we've come to call it has born some interesting fruit, one of which was a gift from Tiberius in the form of a new ink for my rituals. He has requested that I aid him in construction of a sort of "Chamber" and a ritual to power it, but is keeping some of the important details from me for what he says will be a "Big reveal" and would "Spoil the fun". +aw.entries.rituals.symmetryRitual=After a few weeks of design and testing, we have finished the ritual Tiberius wanted in order to achieve what he and the others have dubbed "The Omega state". I'll cover the ritual side of the process, and allow the others to go over the details of it's functions. For this ritual to function, it needs a sealed space in order to fill with reagent like a gas cloud. This reagent is then absorbed by the armour as the ritual merges the souls of the activator and the demon inside the activators bound armour. The problem is containing and controlling this gaseous reagent, as it likes to leak out of the chamber and the ritual can have difficulty "Pushing" the reagent into the armour. To address this, we created Glyphs. But I'm getting ahead of myself. First, I should cover how the ritual determines what is a "Sealed" chamber as it has safe guards to prevent reagent loss. The reagent gas is let lose above the master ritual stone, so the ritual starts checking there. It then starts expanding from there, searching for ways out in every direction, and if it can't get five blocks away from the master ritual stone(This isn't random, beyond five blocks away in any direction and the ritual has difficulty moving all the reagent. Think of it like compressing a gas, it always tries to move down the path of least resistance. To compress it, you need prevent it from being able to escape.) I have also noticed that the reagent, after being released into the chamber, collects on the walls of the chamber instead of staying in the air like tiny low hanging fog. The more surface area, the thinner the fog becomes and the more stable it is, and more stable fog means better value the ritual gets on the conversion process between reagent in the jars and the reagent in the armour, so the more time you have in the Omega state. No matter how you cut it, this chamber is meant to contain reagent for long stretches of time. The more stable the reagent fog is, the more time the ritual has to work and the less reagent wasted. Now then, I mentioned Glyphs earlier. After seeing the chamber in action, Tiberius created a few blocks called "Glyphs" to optimise and add to the champers use. First, the Glyph of Rigid stability was created to further stabilise the reagent fog, being worth roughly double the amount per square meter of space then a normal block. But that's not all he made with the Glyphs, as he discovered an interesting way to bolster the power of the demon using two new Glyphs for a system that resulted in something like enchanting. He mentioned two values, and had created Glyphs for each of them. First was "Enchantability", and it's is buffed by Glyph of the Adept Enchanter. The second value was "Arcane power" with Glyph of Arcane Potential, and functioned like the levels used in normal enchanting. To put how the two values work in layman's terms, Arcane power effects what enchantments are possible to receive, while Enchantability effects the odds of getting a good result. Since this process doesn't use normal enchanting(As the demons in our bound armour react negatively to such methods normally. This process circumvents this limitation by being more demonic in nature and this more... Tolerable to the demons.), it doesn't follow all the normal enchanting rules. For example, after much testing we were able to achieve the equivalent of protection six, fire protection four, and blast protection seven on a single piece of armour so some independent enchants can coexist. And normal power restriction also don't hold ground here, as seen by getting blast protection seven... More testing must be done, but you can see how this has potential. However, I should mention that a chamber can't be entirely enchantment blocks, as the Reagent reacts negatively to the magic used in them. While the reagent must touch the blocks to activate them, any fog that forms on them will destabilise severely causing less time in Omega. I have put in a safety to make sure it can not trigger the process if the stability is below zero, as that would be closer to a bomb then a fog at that point. I believe all the information you need to know before starting has been covered, so we will cover the actual ritual activation. The ritual is a flat platform with four holes, and in these holes you place the belljars of reagent to be used. This ritual doesn't use reagent in the normal fashion, so you don't need to route them into the master ritual stone like normal. With your awakened crystal, activate the ritual with your awakened crystal like normal. After the fifteen million LP fee is paid, it will look for belljars in the four holes for the thirty two thousand reagent cost. Once both are ready, it will check for the activator wearing bound armour and if present it will kick start the process. Within seconds, the transformation happens and you will enter the Omega state. +aw.entries.rituals.stallingRitual=After watching the others toy around with Omega, I realised how limiting the fact that Omega burns reagent to maintain the form can be. With this in mind, I have created a ritual to strengthen the bond between the two souls and remove the passive reagent cost of maintaining Omega. Named "Duet of the Fused Souls", it is able to replace the reagent cost with a high LP cost(Tiberius says it needs five thousand a second to run, far more then most setups can handle. At best, this ritual holds off the inevitable unless you have an extreme generation rate, and even then you will will have a crippled net gain.). You will still lose reagent to replenished your demonic resistance, so long term combat even in range of the ritual will eventually burn through your reagent supply. I should mention that this ritual doesn't have enough power on it's own it work, you need to build it around a tier four beacon. Once it is in place, the ritual can use it as a power source and will allow it to have an active range of roughly double that of the beacon. +aw.entries.rituals.newMoonRitual=Feeling unsatisfied with Focus of the Ellipsoid, I recently restructured the ritual to slightly change it's effect. In doing so, I found inspiration and created my new work "Blood of the new moon". In essence, it moves a small planetoid of blocks from an assigned distance below it to a mirrored distance above it. Magic behind it is slightly more complicated then that, but you aren't here for spell theory 101. To operate the ritual it is fairly simple: Above the master ritual stone needs to be an inventory to give the ritual instructions. The first slot sets the radius of the sphere, but is limited to a maximum thirty two. The second slot defines how far below it looks for blocks and above the sphere is created, with the distance defined being where the centre of the sphere is. As a bit of a safely precaution, the distance must be at least three blocks greater then the radius to prevent harm to the ritual. I should note that if there is an obstruction in the destination, instead of the two blocks being swapped the ritual will "Skip" that area. A final foot note: If this ritual is fed terra reagent, instead of leaving a hole where it pulls blocks it will instead create a block of dirt. A nice option to prevent clean up of a huge hole under a new sky base. + +aw.entries.demons.ashes=My name is Bella Highborn, and I am a blood mage. One month ago, the village I called home was attacked by demons in the night. I can't remember much of the attack, but I recall so many screams of pain echoing inside my head. It took me a few minutes after covering my ears to realize that the screams I kept hearing were not coming from the people. Shortly after the attack started, I ran from my burning home to try and hide in a small alley, behind a large waste basket the butcher dumped his scraps in. At one point I thought I was dead as a demon with long limbs, a gaping maw, and huge teeth lumbered into the ally. It looked strait at me, it's nose flaring as it did so, its blurry eyes looking down at me. It then piked up the basket I was hiding behind, ate everything inside, threw it over his shoulder onto a burning building, and then, left me without a scratch. Several other demons found me that night, and all of them had the same blurry eyes and all of them left me alone. At some point I managed to cry myself to sleep. The next day I awoke in the same little corner, the smell of death strong in the air. I wandered among the remains of the village, finding the burnt and frost covered bodies of my former friends everywhere, all while asking myself why I was spared when they weren't. After several hours, I finally heard a sound other than the crackling of embers from all the old buildings: Voices. Human voices. I looked around to see a small group of men wandering through the ashes. A few of them were bickering about something, occasionally pointing in my direction. At the distance I was at, I could barely make out the words "Girl", "Demons", and "Caravan". I had started to wander closer to them, a little afraid to get too close. Suddenly, one of them broke off from the group and took a few steps in my direction. After a few more quick words to the others, he turned to start walking towards me.As he got closer he started asking me simple questions. like if I was injured and if I could walk. I was still to upset to give him more of an answer than nodding or shaking my head. And then he said full of regret : "I can't do anything for the dead and I can't give you back your old home, but I can try to give you a new one. Care to take a risk and come with me?"his voice softened and he looked at me with his light green eyes. I thought of everything that had happened in the last few hours. Everything I ever knew was ripped away from me. I had no home. No family. No distant relatives. No chance to keep living here. I gave him a timid nod, then took the hand he offered me. I soon found myself walking down the only road that lead away from my village with the green eyed man, who told me his name was Vlad, and his brother Demir. We walked till my feet started hurting and then some, till dusk, when they set up camp. They asked for my name, and what happened the night before. I shook my head as memories of all the screaming came back. They then asked if I knew any magic, to which I shook my head again. I knew very little of magic, despite living so close to the mage guild's boarders. I then turned to look at my former home, now a few miles behind us. I silently said my last goodbye to the life I once knew, then fell asleep thinking of what may lie ahead of me. My dreams were filled with nightmares with scenes from the last night, and a hundred voices crying out for help. But all that still walked through the village were the demons. We walked for the next three weeks, with Vlad and Demir selling what little they had on them to fund our trip. Several times they mentioned a man I had never heard of : "Magus Arcana". Vlad spoke highly of him, while Demir didn't seem as impressed. We traveled almost all the time we where awake, and when my feet hurt so bad that I couldn't walk anymore either Vlad or Demir would take me piggyback. One evening I asked them why they are doing so much for me, both put on a weak smile and said "We know what it's like to lose both your home and your family. We lived in the streets for a few months before the Merry Lamb took us in. We didn't want you to go through what we did." For the first week I had that same nightmare every night. The second week it was every other night. By the time we reach a village named Lurric, they had almost stopped. I went with Demir to buy some supplies, and when we regrouped with Vlad he had a grin on his face. "We're almost there. You were right Demir, this is the town where he lives." After a few minutes of walking, we stood at a stone brick home. We had only one of those in my old home, and that belonged to barracks of the guardsmen. As we walked up to the door, I found myself hiding behind the brothers. I had heard some of the legends about the man who lived here on our trip, and anyone in there right mind would be nervous knocking on his door. After a brief chat Vlad had with two men, we were let inside. I thought I should be scared, but both of them seemed so nice that it was hard not to feel at home here. But as I stepped inside, I started hearing whispers. At first they were only a few, but as I sat down the whispers grew a little louder and more frequent. Soon after that I was distracted by my belly reminding me I haven't eaten since yesterday morning, and the fact that there were sandwiches on the table for us. As I ate, I tried to listen for the whispers, but they were still so faint that I couldn't make out what was said. Giving that up, I started paying attention to what the others where talking about . Unfortunately, I was a little late. Magus had already started getting up, while Tiberius was taking away the trays that once held sandwiches. After a few minutes, both Magus and Tiberius left to take care of something in the village leaving us to settle down a bit. "They're an odd bunch." Demir said soon after they left, starting to look around the room we were in. "They can say the same about us." Vlad said, and I couldn't help but smile at his deadpan humor. After an hour of milling about the place, gawking at all there was to see, Magus and Tiberius returned. We ate a large dinner Magus brought, then they showed us where we would spend the night. Magus lead me to his room, telling me that I could sleep here for the night while he would take the couch we had sat on earlier. Once we got inside, he closed the door as I took a seat on the surprisingly hard bed. "Now then, I have heard a few rumors about you Bella." He sat down next to me on the bed before continuing: "Mind if I ask what happened to you?" I hadn't told Vlad and Demir yet, but I finally had the strength to speak about what happened. After I finished the story of the attack, I told him of my nightmares and hearing countless voices crying out for help but there only being demons around me. Magus simply nodded, then said "I believe you. Your tale seems a little far fetched, but I can tell you speak the truth. I advise you to keep this story to yourself, but telling Tiberius or the other two should be fine. I'll need to think about this..." He said as he moved to get up. "Wait," I called out before he left. "Don't I get to ask you a question now?" He seemed a little puzzled, but said "Go ahead, ask away." "Do you know what is causing these whispers I'm hearing? I started hearing them as I came inside your home, and they seem to be coming from below us." He told me he heard no such whispers, but offered to help me find the source. After showing me the door that lead to a staircase, we went down two floors till I could more clearly hear the voices. It seemed like idle chatter, and the voices lead me to a box inside a store room that held several bright red blobs. As I opened the box Magus asked "Are these the source of the voices your hearing?" I nodded before asking "Should I try talking to them?" Magus pondered this for a moment, before saying "No, not yet. You still need to get settled in, and there are countless other preparations to be done. We can return to this later, when we have more time. For now, let's see what Tiberius is doing with the others." He lead me back out to the stairway, and I noticed him locking the door to that floor before he joined me up stairs. +aw.entries.demons.tamedDemon=A few days later, I was learning Botania magic from Magus. He showed me the garden he kept near his home, then we went through the names of all the flowers there. Just as we were getting to the more magical flowers and their uses, I started hearing a voice from my nightmares. There was only one voice saying the same two words, and it was slowly growing louder. "Bella, what's wrong? You're turning pale!" Magus said when he noticed me freezing. I stood up, and looked towards the origin of the voice. Then I saw it in the distance. A demon. Just one, wondering seemingly aimlessly. Magus saw it as well, he told me to stay still while he dealt with it. But I couldn't do that, I couldn't let him hurt something so lost and confused. Like it was. Like I was a few short weeks ago. I started running towards the demon, and saw it was one of the more human looking ones, with small wings on its back. It turned to me as I drew closer, and I saw it had the same blurry eyes all the other demons had. It didn't try to attack me, or really even move when it saw me. All I could hear was "Help me", over and over again. "Bella, back away from that!" Magus yelled as he followed, but I could barely hear him over the voice ringing inside my head. Then something compelled me to reach out and touch the demon, some inner instinct that had been dormant for all my life. Magus was close to us as I touched its hand, and I felt this surge of power race from me into the demon. Suddenly, it's eyes lost the blurriness and he seemed to be "Awake" now. And very confused. Suddenly, Magus was at my side and was trying to pull me away from the demon. Meanwhile, the demon was trying to work out what was going on. "Calm down, both of you!" I yelled, and Magus and the demon did just that as they started staring at me. "Magus, notice how the demon isn't trying to kill us right now. I don't think he was in control of his own body til just a few seconds ago." The demon nodded, before attempting to talk in a way Magus could under stand. "I... was trapped inside my head. I could see everything that happened, yet I had no power over my actions." Magus was still very wary of the demon, but asked how he got here. "I am not here by choice. I remember finding a strange metal thing in my home, being pulled violently towards the metal thing, then waking up in this strange place. I soon realized that I had no control of my actions, and have been wandering ever since. That is, until my brethren here freed me." "Brethren? I am afraid I am human, not demon." I said, confused by this claim. "Really? Your aura looks demon to me. I could tell that even before you freed me. As for him..." The demon turned to Magus. "Yours is like nothing I have ever seen before. It is a strange color, and is far larger than that of any humans I have seen." "Really, you can tell all of that just by our auras? Fascinating..." Magus said, the last of his wariness was trumped by his scholarly nature. "Well, I have always been better at reading them then many of my kin. But that can be saved for another time. Humans, I must ask you for your help. I can not stay here, your kind will hunt me every day I live for the crimes my kin and I had no say in. I must ask you to kill me." "Why? ", I asked:"Can't you try to hide or.." Magus put one hand on my shoulder. "No, he may be killed, but won't die. Supposedly, if a demon is killed in our world they return to their home in Tartarus. I assume that is why you wish us to kill you?" "Yes, that is true. But I can't ask you to do this for nothing... I sense something nearby that may be of assistance. Will you take me to your home?" He asked. Magus was more curious than cautious at that point, and lead the demon(Who we learned went by the name of Sinferrous) and me back. As we all walked inside Magus said "Vlad, Demir, Tiberius! We have a guest here." All three came out of the work room, and all three paled as they saw Sinferrous. "Greetings." he said as the others arrived. "Magus.... why is there a demon in our home?" Tiberius said, growing pale. Magus quickly told them what had happened and what we learned. "Now then Sinferrous, can you lead us to the thing you sensed?" After leading us down stairs, Sinferrous went strait for a strange red orb that was near my brothers work station. "This will do. Using this, I can make a pact between us. For your help freeing me, I will make the pact now. But my kin may not always be as willing, and you may need to defeat them before they will form a pact. Now then Bella, give me this orb." He handed me the orb, then I handed it back to him. As soon as it touched him, the orb vanished into a red mist. "The pact is done, and I am now at your command Mistress. Now, I request that you send me home." "Wait." I asked him. "If we send you to Tartarus how will we ever see you again?" "Simple. When my kind are killed in this world, we can leave behind a "Summoning Crystal". If you use this crystal, we will return to aid you. Because we made this pact, anytime I die in this world I will leave behind a crystal so you may summon me again." We all went outside to send Sinferrous home. Magus had volunteered to do the dirty work, and our new demon friend stood ready. "Before I do this, I have one final question." Magus asked. "You said there was some sort of metal contraption that forced you here. Did you see any symbols anywhere on it that might help us work out who created it?" Sinferrous nodded. "There was one symbol that seemed dominant... Here, let me see if I can copy it..." He began to draw in the dirt, and we saw something, that we never expected: The letters "GT" inside the picture of a gear. "Greg tech..." Magus mumbled, narrowing his eyes. Magus sent Sinferrous home, and it seems Tiberius needed some time to think. "His goal in life, getting revenge against the demons who destroyed his home, was just torn apart." Magus told me that evening. "Give him time to piece together a new goal. He'll recover, I can guaranty you that." The next day Magus and Tiberius told us about blood magic, where the orb I used just yesterday came from, how it was made, and all the risks of trying to make something like it required. They then asked us all a simple question: Would we like to be blood mages? If I said yes, Magus and Tiberius would help me with taming demons. If I said no, they would still teach me other forms of magic. There was no choice, I needed to discover more about this strange power I had. If that meant I had to become a blood mage, then I would become a blood mage. After Vlad, Demir, and myself passed a "First Test" of creating a weak blood orb, the same type of orb used to form a pack with Sinferrous, the three of us were blood mages. Tiberius gave all of us books like his own, and asked us to document our finding in it. So that brings us up to today, I will try to write down anything that happens with either my work as a blood mage or my life with the others. For now, I must get some sleep... +aw.entries.demons.future=My last entry was a week ago, and since then I have learned a much from Sinferrous. Apparently they have three main groupings of inhabitants inside Tartarius: Lesser demons that act as workers, guards, and servants for the second group called the greater demons. This was similar to peasants and nobles here, but the third group was something all together new: Elementals. Having so much demonic energy in one area causes strange things to pop up, entities of pure demonic power mixed with one of six elements. To the demons who live there they are little more then wildlife, but to us they are extremely hostile and dangerous beings. From what I could gather, each Elemental had several abilities that were common among them while also having a power unique to their element. All of them could fly, cast buffs on themselves to reflect damage, and they cast a strange effect that nullifies some powers of souls. He couldn't tell me much about the unique effects, but warned me getting in a fight with one unprepared would mean death. I noticed Tiberius growing less and less wary of Sinferrous as time went on, but I feel like he wont ever forget what happened to his home regardless of if they had a choice or not. My last entry was a month ago, and this is more of a progress update then an entry. Magus, Tiberius, Sinferrous, and myself have started building a way to form a temporary "Gate" to Tartarios to challenge demons, but we've ran into a few complications. Magus and Tiberius have already started work on upgrading the altar again, so we might be able to start summoning demons soon. In other news, the training Magus has everyone go through keeps getting harder and harder every week. But considering I would have ruled off what we do daily now as to much for me a month ago, we've made progress. It's been a little over two years since I last wrote in this. Finding what material the altar needs as an amplifier takes much longer then I had anticipated. Thankfully, we discovered a recently that the weak blood shards Magus had collected years ago mixed with stone to create a large amount of blood red blocks we have dubbed "Blood stone". The altar has responded well to the stone, so we have created pillars around the altar and are now searching for the item needed to create a blood orb of a higher quality. I've been binding my time helping the local area with demon problems, and Magus even lets me go out on my own to track them. I've formed pacts with almost a dozen now, and my brothers have always been glad to see what new friends I make on my trips... It seems so natural to call Vlad and Demir my brothers now, but I can't recall when I started referring to them as that. After everything we have been through, it feels like not calling them that is a little insulting. We have become so close in our time with Magus and Tiberius that "Family" is the only word I know for it. A little over two years ago they were nothing but strangers who saved a little girl from a village already burnt to the ground, and now look at where we are. Life is strange, that's for sure.... In other news, Magus has started teaching me witchery, as the botanie had grown to limited. +aw.entries.demons.knight=It has been another year and a few months, but we finally found the item needed for the blood orb: The very weak blood shards we had been using for everything else these days. At no point had it crossed our minds that it might be used for this as well, but we found a few new items in the search so not all is lost. One we made the first "Master" blood orb, Magus invited all of us to the finest meal house in Lurric as a treat. We all dressed in the common cloths we keep for when we wanted to blend in, and we went done to a small family ran business that had some of the best food for miles. We all ate our fill, which for Demir is easier said then done, and as we walked home we passed a man in unadorned armor who was sitting in the street like he had been thrown out of somewhere. He looked at us when we walked by, but he quickly tried to stand up when he saw me. "YOU!!.." he bellowed in a slightly slurred voice that made we think my guess about him being thrown out wasn't far off the mark. "You're that girl I've heard so much about... That one from the demon thing... ATTACK, you're from that attack! I've come here to claim the life of the demon girl as retribution for what happened to that poor village!" He started preaching, before realizing we had already started walking away. "Don't you run from me... You can never outrun the justice that will deliver my blade!" He cried as he charged at us, drawing his sword as he did so. Unfortunately for him, his assault was easily dodged by the simple act of stepping to the left. He ran past us, then tripped on a rock and fell to the ground. As he struggled to stand, he said to the others "Don't you dare try to help her! I will slay you as well if you attempt to do that!" Magus smiled and said to him "We wouldn't dream of it, sir. After all, she doesn't need our help to deal with a senseless fool like you." Magus dropped the smile and turned to me. "Alright, now is as good a time as any to put your training to work. I give you permission to deal with him as you see fit." By now the man had stood, and was starting another charge at me. Instead of stepping to the side like last time, I ducked under his sword, then grabbed him by one of the exposed straps on his armor. Once I had a good grip, I turned to the small crowd of people watching. "Any one here mind if I toss him in the slosh pit?" The slosh pit was the name of the depression behind a few of the building where water gathers when it rains, and for a few days after word it is nothing but a muddy pit. Nobody objected, and a few even offered to give me a hand chucking him. I told them I could handle it myself, then proceeded to drag the fool around a few of the buildings, all while he demanded to know what was going on. The crowd cheered when I finally got him to the edge of the pit, grabbed one of his arms, then flung him face first into the slosh pit. We all returned to our home without any mud on our clothing, but the same can't be said for his armor. I'll note if I ever see that man again. It's been two weeks, so I'd say he left town after waking up in a mud pit. +aw.entries.demons.demonShard=With the help of Sinferrous and my other demon friends I have finished building the summoning area. The smaller pillars need to be in just the right points for complete balance, so it is tricky to build the ritual area. But after a few failed attempts and some help from Vlad, we have the ritual area we needed. Today, by accident, we discovered how to summon elementals. I'll write more about them once I know more, but they are as hard to kill as Sinferrous warned. We also found after killing it they can drop a strange blue blood shard we have dubbed a "Demon" blood shard. It's been a week, and each of us has earned a demon blood shard. Magus has used his to empower his activation crystal, and the rest of us are saving them to create blood orbs(I still wonder how Magus gets by without any blood orb). +aw.entries.demons.demonSummoning=Something odd happened today: Magus asked me to show him how to tame a demon using my summoning area. He asked me to go over everything, from the basics of how it works to the taming itself. I write here what I can remember telling him. Alright, in the center we have a arcane plinth to help form then anchor a "Gateway" to Tartarius. The plinth needs a blood orb on it to act as a "Beacon" for the demons, but only a master blood orb has the strength to pierce the barriers between worlds. But the plinth alone isn't strong enough to keep the gateway stable, and we can't make a "Universal" portal. We have pedestals around the plinth to help keep the portal stable by sacrificing items, but this has the side effect of "Locking" the portal to one type of demon. So if you use the same "Recipe" five times, you get the same type of demon five times. Some of the demons need more then the six at the bottom to keep it stable long enough to bring one in, so there can be a second or third ring if need be. Once the portal has formed after the last item is placed on the pillars, items will be consumed one by one to keep the portal stable while the demon is pulled in. Once the last item has been consumed, the demon will be summoned on top of the plinth. The demon will be confused, and will see you bringing it to the overworld as some form of a challenge. Then it will try and kill you. If you beat the demon, it will drop a crystal to summon it back to the overworld(And it won't try to kill you this time). By giving it a weak blood orb you form a "Pack", to make the demon follow any commands you give it. Unfortunately the most powerful things we can summon, the elementals, aren't willing to serve anything due to their inherent chaotic nature of how they are formed. +aw.entries.demons.keysGate.1=Here I will add any recipes we discover that can summon a demon, but at the request of Sinferrous, I will not describe the demons in any way. It will be a mystery till it is too late to go back. Note: Some of these recipes might need more then the first ring of pedestals, so if that is the case the first set of items will go in the first ring, the second in the second.... You get the idea. Remember that the arcane plinth needs at least a master blood orb to work as a beacon. +aw.entries.demons.keysGate.2=Fallen Angel: Santus | Sanctus | Sanctus | Aether | Terrae | Tennebrae +aw.entries.demons.keysGate.3=Lower Guardian: Cobblestone | Cobblestone | Terrae | Tennebrae | Iron ingot | Gold nugget +aw.entries.demons.keysGate.4=Small earth golem: Clay | Terrae | Terrae +aw.entries.demons.keysGate.5=Ice demon: Crystallos | Crystallos | Crystallos | Aquasalus | Sanctus | Terrae +aw.entries.demons.keysGate.6=Boulder fist: Terrae | Sanctus | Tennebrae | Bone | Steak | Steak +aw.entries.demons.keysGate.7=Shade: Tennebrae | Tennebrae | Tennebrae | Aether | Glass bottle | Glass block +aw.entries.demons.keysGate.8=Bile demon: (Poisonous Potato | Tennebrae | Terrae | Raw porkchop | Raw beef | Egg) - (Crepitous | Crepitous | Terrae | Iron block | Iron block | diamond) +aw.entries.demons.keysGate.9=Winged fire demon: (Aether | Incendium | Incendium | Incendium | Tennebrae | Netherrack) - (Diamond | Gold block | Magicales | Magicales | Firecharge | Coal block) +aw.entries.demons.keysGate.10=We later found that placing a full ring(6) of certain alchemical elements(Earth, Air, Fire, Water, Light, Shadow) will summon an elemental of the respective type. And they are the only way to get demon blood shards. +aw.entries.demons.futurePlans=That is what we have so far. We are working on trying out a stronger blood orb, but Magus keeps telling us that what we need to upgrade the altar is extremely hard to get. To bind my time I have started talking with Sinferrous about "Greater Demons". We have decided that our next goal is to start summoning them, but there auras are so strong that the gate way our master blood orb can form is far to weak. We will need something better, and so we have reach square one again of needed the stronger orb. Well, the Hell's harvest festival is soon so I will write if anything comes up. Strangely, Magus mentioned having replies from people he is inviting coming soon. Well I had no idea what was coming with the Hell's harvest. Magus calls up the doorway from the ground to a giant building full of technology, something extremely rare in the mage guild. Most people come here to get away from all the technology of the other lands, to get back to basics and make there own way in life. Yet what I saw down there was beyond even my wildest dreams. Tech that was only spoken of in hush tones, machines that aren't even available to privet businesses, let alone the public! Magus had mentioned once before that he worked on the conglomeration's members board, but this... I thought he meant that he was a grunt worker, or some administer or mangers. But he is on THE board, where all the worlds leaders meet... And Magus told us they will be meeting here this year since he is the host. I always thought Magus had secrets, but reality seems to go beyond my wildest dreams. Magus asked us to help prepare "The Hall" as he referred to it as. After a few months of hard work, the Hell's harvest is only a few days away. Magus started calling in favors for help, and the boys started talking about just who would be coming. Only now have I realized that I'm going to meet with some of the most powerful people in the world! Magus gave us a few books on every member, so we would know something about each of them. Sadly, the books he gave us didn't include pictures so we had no idea what they would look like. I'll write again after the festival is over.I have meet so many people the last few days, from so many places and from countless walks of life. I became friends with a woman by the name of Iza Lemming, and another girl about my age by the name of Carrin Calclavia. For such amazing people, they seem so... normal. Another man I met Magus keep referring to as "Greg". As it turns out, Greg owns Gregtech, and he is the reason the demons are running ramped like they are. Strangely, I don't hate him. By all rights I should hate him for everything he has done, all the people who have died to the demons... But I don't. From what both Magus and Greg have told me, he did the same thing I did: Opened up a portal to Tartarius without knowing what would come out. The real difference was that I had a demon to help me build the portal, and he had to do it from scratch. Without the help of a demon, the portal he opened was unstable and drove any demon to walk through it mad, and they lost control of themselves. He had no idea that would happen, that that could happen. I can't bring myself to blame him for something he could have never predicted. In other news, Magus has gotten us the nether stars we need for our next altar upgrade. The bad news is we must kill the withers to claim them. Thirty withers, to be exact. I have mastered witchcraft, botanie, and have learned what I can of blood magic from my brothers and Magus. But will it be enough to kill one of those... things? I asked Sinferrous this one night, and he told me that he no idea what a "Wither" was, but if I needed to fight one that he was willing to stand by my side, as would any of the other demons I had a pact with. With all of them by my side, I might stand a chance. We beat the withers. All of them. I... was terrified of it from the moment I saw it. I had three skulls for heads, and it made unnatural sounds as it started warming up. Then the attacks it used, launching flying blue and black skulls, were devastating in the blast and the "Withering" effect they leave behind if you get hit. Thankfully, the "Freezer" we fought them in was completely blast proof(Warded octuple compressed cobblestone) so falling into holes was not a problem. After an eternity compressed into an hour, we had beat all thirty withers. My brothers are all injured, so I need to go change a few bandages. I'll write again when I get a chance. Now that my brothers have fully healed, life almost seems to have gone back to normal. Well, as normal as it will ever be in a house full of mages. I've started experimenting with nether stars in my efforts to summon greater demons, but I still haven't managed one. In other news, the number of demon attacks has been getting smaller as of late. Magus said this might be the calm before the storm, and asked me to start leaving the mage guild to help with demon attacks in the other lands. Most people are happy to have my help, but others... Lets say I rarely sleep in the inns and leave it at that. +aw.entries.demons.demonInvasion=Magus has sent out a call for all free mages, with little in the way of context for why. Even I don't know what this is about... He did say there would be a in a little over a week a picnic, however. But knowing him, he has something up his sleeve. The conclave of mages was held today, with some... Interesting results. Fifty people in total showed up, from all ways of magic and life. We met on a hill under the shade of a grove of trees about a mile from here, many of the mages brought there own meals for the picnic. After ten minutes faffing about with people getting settled, Magus called the conclave to order. "I'm sure you all have ideas on why I called you here, and I know Jarico was running lots... So I might as well sate your curiosity. I finally have a plan on how we can deal with the incursion of demons. For the last few years they have been a hazard, an endless army we have fought off. The two things that have complicated our efforts: The fact we didn't know where they have been coming from, and the side effects of closing the portal. Thankfully, I have managed to address both issues." At this point Magus unrolled a map with a few hand drawn markings, which everyone crowded around. "This circled area here is the location of the portal they are getting in, A secret gregtech research lab in the middle of a forest. I have gained permission to mount an excursion to close this portal, but it sadly isn't that simple. The portal is unstable, and has been slowly damaging the fabric of space here."At this point one of the others interrupted with "But if it is slow, how bad could it be?" Magus responded with "Very. This portal has been left open for the better part of the last three decades, and the damage keeps getting worse and worse. As it stands, closing the portal might cause more harm then good as strange as that may seem." A different mage, one a bit older , a little wiser, and a lot more cranky then the first interrupted this time. "If that is the case, why have you called us here? I assume you intend to do more then waste our time." Magus smiled at this, replying "Yes, I think you will be interested in my discovery. To prevent a spacial fracture from occurring, we will need to jump through a few hoops, as it were. You see, closing the portal won't cause any issues. It is the removal of the connection between our and their world that ends with all the nasty side effects. Now, I few of you might think the portal and the connection are one in the same. That isn't the case, instead the portal is the entrance and exit while the actual connection is the road they lead too. So we should be able to close the portal here, then open a new portal here..." Magus pointed to a second circled location on the map, far into the mage guild in mostly unpopulated land. "...before the connection collapses in on itself. If we can pull that off, then the new stable portal will not only allow the connection to remain but will ease the burden that the old one is causing. Over time, the strain on space should dissipate and we can close the portal for good. Any questions?" A female mage was the quickest, asking "Wait, if we are opening another of those portals then wont demons be able to come out of it as well?" "Yes, but they won't be in pain as they are now. While they can flow in, we will be able to choose where we open the portal." An older mage, who looked to be going for the classic white beard but could only manage a gray patchy fuzz said "So that is why you circled Venric's folly. Place is a canyon with steep walls a hundred and fifty meters high. There are less then half a dozen valleys in or out of there." Magus smiled, saying "Right, the area should function as a prison. We send one group to terraform and secure the area, while a second siege the research lab to close the old portal. The tricky part comes in the fact that we have roughly a five minute time limit between closing the portal and opening the new one. We must open the new one after the old has closed so a new connection isn't formed, but wait too long and the connection collapses in itself." Magus started assigning people to each group, with a fairly even split by then end. Magus and I would be with the terraforming group(Magus to open the portal, and myself because of my strange affinity with demons.) while the other three aid is the siege. Apparently closing that portal should be as simple as shutting off the generators for the lab and thus cutting all power to the portal. Because it sounds simple, it will be nothing of the sort. The demonic aura of the area seems to mess with some forms of magic, as an experiment we ran a few weeks ago showed. We shired this discovery when someone asked why Magus didn't just drop a meteor on it. "We tried that. Three times, in fact. All of them ended in different, strange ways." Answered Magus. Tiberius tacked on "First one was pushed away, and landed a mile from the target.", followed by Demir with "Second turned into blue cheese."(This got a few worried looks from some of the more experienced mages. Things turning into cheese was bad, but normally it was cheddar or jack. Blue was almost unheard of.) I added that the third was teleported away, and we still haven't found it. Vlad couldn't help but add "On an unrelated note, we haven't heard from the Redpower institute in a while." The general plan was for the group to brute force their way into the lab, locate the generators, then set up a foothold inside at the generators to rest at while waiting for the predetermined time. The terraforming group was to travel to Venric's folly and close off any entrances and exits, level some ground and change the biomes inside the depression in preparation for the ritual to open the portal. Most forms of communication would either not work, be too slow, or be unavailable to one or both parties so Magus opted for a simple time based system. This entire operation would take around two weeks; group one would need three days to prepair for the siege, a little over a week to get to the lab, then the remainder would be to entering to building, finding the generators, then holding off the demons by building a foothold to wait in. Group two on the other hand would have only a day to gather everything they could carry on their backs then regroup at Ank to ride the wagons for a ten day trip to the canyon to start working. After that, we need to build the ritual and hope to time it right... Then move on from there. Once the new stable portal is open, all bets are off as to what might happen next. The other mages have left to ready their things, and we leave for Ank in the morning. It has been a rough and bumpy week and a bit, but we have arrived at Venric's folly(I asked about the name on the way here. Apparently there is a legend about how the area was formed involving a mage named Venric and a large magical explosion. No one knows if it is true, but knowing mages I'd say it was possible.) The next few days are going to be filled with us working our magic on this area, smoothing out the walls to a near vertical surface and sealing off any and all possible exits to keep them in and fool-hearty travelers out. After that, we clear out an area near the heart of the canyon to build the ritual. Magus has requested I find a feral demon, something not to difficult all things considered, then bring it back to the ritual location. I'll try to write again when the ritual has been finished. It is the day before we open the portal, and Magus has brought us all together around the wicked looking structure he has built. "Tomorrow the peace ends and begins!" He cried when the mages had started gathering. "For the common man outside these walls, we will have brought peace and security to their lives, with the threat of demons ransacking their homes gone. For us however, we will have created a lot of bloody work. We will need people to keep an eye on these demons, examine the walls, and make sure nothing gets in or out. We will create a schedule, but that will come later as I know we are all weary. But this is not why I have called you here, as it is far more dire that a heinous error is corrected! I forgot to name this ritual behind me, with everything that has happened lately. Bella, can you come up here?" I walked up quickly, eyes of the fellow mages following me. "Bella, I give the honor of naming this ritual to you." In the space of seconds, it felt like I ran through thousands of possibilities. I finally settled on a name that seemed most appropriate. "Let us call it the Convocation of the Damned." +aw.entries.demons.observations=It has been a few days since we opened the portal, and I have noticed a few interesting things about the demons that have come out. First, they are already bound in service of other demons so they won't be willing to serve us. Second, these demons are just the grunts, the weaklings, the dime a dozen henchmen. Considering that they have proved to be strong enough to dispatch a skilled mage with ease... I worry about facing the higher ranking demons. And According to Sinferious, these grunts can come in one of five types: Fire(The ones we got, a portal seems to lock on to a set type), ice, earth, wind, and normal/untyped. Each one has some advantages and disadvantages over the others, so we will need to prepare based on what comes out of the portal. + +aw.entries.spells.demonGirl=My life use to be simple. Get up at dawn, move with the caravan, keep an eye out for bandits, fight any that show up, do any odd jobs that needed doing, go to bed. For about ten years my daily routine was just this, with a few days a year where this cycle was broken. Living with traders was a hard life, but it wasn't bad. I gave up this life when my brother, Vlad, decided to take care of Bella, and I was given the choice of staying with the Merry Lamp or leaving with my brother. Wasn't much of a choice, really. He knows more details than I do, but soon after he found her the three of us were walking to the home of someone called "Magus Arcana". After we set up camp I asked my brother if he knew where we're going. I quickly learned that we didn't have much to go on. My brother had heard a few rumors, but nothing really concrete. With only the general direction of "To the lands of the mage guild!" we set off. So our adventure began, if a little out of the blue. My name is Demir Highborn, and I am a blood mage. I have since earned the title of "The Battle Mage" to go with my brots "The Alchemist", my teacs "The Ritual Master", my friend Tiberius' "The Architect" and my adoptive sister Bellas "The Demon Kin". But I am getting ahead of myself, back to the beginning of our little "Journey". About two days after leaving the caravan, we stopped at a small town to get my brother a sword (We only had enough spare money for one) while I went to sell a few gems. While at the market I noticed two men in mage's robes, so if anyone was going to know where to find Magus here it would be them. I walked up to a vendor near them, neither of the two noticing me walk past them while they chatted. I traded the gems for a fair bit of coin, then asked the merchant in a voice a little louder then normal, "While I'm here, have you heard any rumors of a man called "Magus Arcana"? I have some business with him." The merchant chuckled and told me that he was nothing but legends told to kids to calm them down. Thankfully, he wasn't the one I was asking. Out of the corner of my eye I saw both of the robed men glance at me, then quickly turn back. They never would have made it as traders. I thanked him for his time, then started walking out of the market, down a narrow path under a few oak trees that had very few people. As I walked away, I noticed both of the robed men following me, just as I planed. I slowly walked down the narrow path, giving the pair more than enough time to catch up with me. "Hey," one of them said as they drew close to me. I turned around, acting surprised that they had stopped me. "Why hello there. ' Didn't see you walk up." I told them, a simple trick to fool even mages that could tell when you're lying. While it was true that I didn't "see" them, I still knew fully well that they were coming. The one on the right nodded, reading that I told them the truth. "We heard you asking about Magus, what business do you have with him?" The one one the left asked me. "Well, that is a little complicated. I need to find him so that he might teach my brother and I. I already know a little about magic, but people willing to teach for little to no coin are few and far between these days." The one on the right nodded again, then said "That is far too true. My brother Way and I were once apprentices to Magus, and he refused every coin we tried to give him. If you want to find Magus, head north east to a village called Lurric at the heart of these lands. We can't give exact directions, but I'm sure this is better then what you had. But fair warning, he tends to be reluctant to teach just anyone who comes knocking." I thanked them both, and they told me to say hello to their old teacher. Returning to the well, where my brother said to meet up, I found both Bella and Vlad waiting for me. "What took so long? You normally don't take this long to make a sell.", my brother asked. I told him what I found out. "I got more then coin this time. I got a name: Lurric. That is where Magus is suppose to be living, and we should find it if we head north east." About three weeks of walking later, we arrived at Lurric. It was as lackluster as the rumors said, with very few signs that a mage lived around here. Vlad found one such sign while Bella and I went to find some antiseptic for the wounds he had gotten when a skeleton caught us off guard. He meet us with a grin on his face, then pointed us to a cobble stone path out of the village. After walking for about a quarter of a mile, we finally saw the fabled stone house of the great mage Magus Arcana. To say it didn't look like the house a mage would live in was an understatement. The outside was simple, with nothing really standing out that screamed "Magic!", so I became very skeptical of just how great he is if he lives in a place like this. It was smaller than the homes of some of the local lords, let alone most of the nobles. We walked up to the simple wooden door, the only possessions we had left were the clothes on our backs, Vlad's brewing stand, a few odd items that Vlad had collected over the years that we couldn't sell, and the sword we had bought a few weeks ago that had saved our lives more than once. I wouldn't have let us in, let alone take us under his wing and teach magic. We looked more like street urchins then potential mages, in all honesty. When we walked up to the door, Vlad asked us both if we were ready. I told him I was, and Bella (Who had hidden behind me and Vlad) gave him a quick nod. With our blessing, Vlad knocked on the door sharply. After almost a minute the door opened, and a tall man answered us. Vlad talked to him, asking if Magus was here. Another minute later and a slightly taller man greeted us. I let Vlad do all the talking, watching as the man first seemed puzzled, then curious, and as he let us in he had a face of amusement. I forget most of what happened after that, mostly due to the fact that Magus had the other man make sandwiches. By the time I had finished my second sandwich, they were done talking. Magus and the other man left us, and I began talking with my brother. An hour later, Magus and his apprentice Tiberius (Vlad had filled me in on what happened while I was eating. I was almost hurt when he said that he wasn't surprised that I was more interested in the food than the man who gave us said food.) returned, gifts in hand. While Tiberius barely managed to bring in a large roll of fabric, Magus came in arms loaded with more food. Once again, what happened next is a blur. The next thing I remember clearly was Magus and Tiberius creating new rooms for the house using their magic. No wonder it looked so normal from the outside, most of the building was under ground. With three new rooms and a hallway built, each of us had a room to call our own. This was odd for Vlad and I, as we had always shared one room (Normally with other people as well). Once we bathed and changed into the clothing Magus had made out of "Enchanted fabric", each robe dyed to a different color. Vlads green, mine red, and Bella asked for purple. Once we were all changed, we met for breakfast. It was a simple meal of waffles, syrup, milk, and eggs. While we ate, Magus asked a question: "Out of curiosity, do any of you have last names?" Vlad and I told him no. "We didn't need them as traders. The leaders always told us names got in the way of a sell." I said, before finishing the last of the eggs. He then turned to Bella, "What about you?" She also said no. "We... We got last names when we turned eighteen or took up a profession. Even so, everyone went by first names." Magus began to scratch his chin before saying "Well, most people around here have last names. Would you mind if I gave you one? You can't take Arcana, that name only brings trouble. So how about "Highborn"?" All three of us thought it over, then one by one we nodded with approval. Magus began to grin, saying "Very well, henceforth you shall be know as Vlad, Demir, and Bella Highborn." We spent the rest of the day and the next filling out our rooms. Magus provided furniture, supplies, and countless other thing to help us feel at home. Unfortunately, I had no idea what a home was suppose to look like, so my room ended up looking a little barren. I asked Magus if I could move a strange table I found in one of the storage rooms into mine. He told me I could, and offered me a hand moving it. It was a plain wooden table with a red cloth on top, a few strange symbols were faded in the cloth and in the wood. As I touched the table I felt something strange in the heart of the table: a strange power that wanted to escape the table. I told Magus about it, and he was curious as well. "That is... Odd. I bought this a few years ago, intending to work out what it does. Feel free to take a crack at it yourself. Let's move it to the main workroom instead of your room then, alright?" We soon had it at one of the half dozen work spaces that doted the large room. This particular space was close to a white structure with an empty basin on top of it. +aw.entries.spells.spellTable.1=It took me three days, but after looking into a few books I discovered gaining access to the power inside the table was going to be both easy and tricky. to get it out of the table I needed some sort of "Bridge", but I discovered there were two problems: Finding something that works as a bridge, and what happens next. I had no idea what would happen when the power was released. As far as I knew, it might be nothing or it might unleash hell on earth. I hoped it was somewhere in between. I quite literally stumbled over the answer to the first problem. At one point when I was walking out the back door to the strange structure so I could get a little air I tripped over the leg of a table, knocking off a small box that popped open to reveal a small red crystal sphere. The box had the label "Failed attempt" written on the lid, and it also had a very sharp edge that I quickly cut my thumb on. As I picked up the sphere with my cut hand, I felt a strange sensation as I touched the crystal with my bloody thumb. Then the crystal started vibrating. It was soft at first, and as I carried it down to the work room it grew stronger and stronger. It suddenly stopped when the crystal touched the table, and it seemed to flash briefly when this happened. So one half of the task was done, finding the bridge between the world and the table. My next goal was to see what happens when that power is released. With the permission and assistance of Magus, I went out a few hundred meters to conduct the test. With a simple nod from Magus, I began trying to tap into the crystals power. At first, nothing happened. Then I felt a burst of arcane energy, that then did nothing. "How odd..." Magus said as we walked home, defeated. "I felt the magic of the crystal as well, but it was almost without any form. There might be a way to shape it, so don't give up." While Magus left to help the others, I returned to the work room. Then I noticed something odd: The table was a few inches closer to the white structure(Which I later learned was a blood altar). On nothing but a hunch I used the crystal again. Once more the arcane energy went out, doing nothing. But I watched the table while this happened, and as I thought it seemed to move a little closer to the altar. With a quick push from me the table sat next to the altar, and the runes seemed to brighten a bit. I rested my hand on the table, and felt the power moving from the table into the altar as if it was seeking something. Going with my gut once more, I started searching for an item to use as a "Focus". After a few minutes I dropped a set of flint and steel in the altar, then went back outside to try again with Magus watching from just outside the door. After taping into the crystals, I felt a wave of warm air around me. It seems a focus is not enough, so I returned to search for something to refine the tables power even more. After an hour I found a few old skulls and heads of several monsters. After placing a skeleton skull on the table, I felt the table hum with power briefly. It was nearing dark, so with the last few lights of the day I tried the crystals power one last time. Magus watched near me as I tapped into the crystals power, and felt myself get a little weaker as a ball of fire shot out of the crystal. +aw.entries.spells.spellTable.2=After showing Magus and the others my setup, both Magus and Tiberius seemed surprised to see that it needed the altar. After I showed them the crystal I had found, Magus and Tiberius asked me to hold off on experimenting with this further for a few days. Two days later I found out why. I don't feel like putting down all the details, so a quick summary: Each of us had unknowingly discovered new branches of "Blood Magic". Blood magic was a new form of magic that he and Tiberius had been trying to create and prefect for quite some time. Everything we had done so far had connected into blood magic in ways both of them had never expected. If we wanted to continue with the work we had been doing, my spells, my brots alchemy, and Bella's demon taming we would need to become blood mages like them. They went over the risks involved, told us that death was a real possibility, and that if we didn't want to go into blood magic we didn't have to. We quickly gave them our answer: We've already started on the path, so we can't really turn back now. We then went through the first test of any blood mage: The creation of a weak blood orb. All of our palms were tender at the end of the day, but we were now blood mages. +aw.entries.spells.simpleEffects.1=I discovered that the spells the table created used LP, and for the next month I searched for items to act as foci. Here is the list that I have discovered so far, but I don't want to write all the details, so anyone reading this will need to experiment on their own. As Magus says "Life is nothing without a few mysteries." +aw.entries.spells.simpleEffects.2=Flint and Steel acts as, surprise surprise, foci for fire . As a result, most of the spells it creates will leave you or something else with a few nasty burns. +aw.entries.spells.simpleEffects.3=Ice blocks seem to make the effects far chillier, slowing what the projectiles hit and forming ice. +aw.entries.spells.simpleEffects.4=TNT as a foci is quite... Explosive. All of the effects, in one way or another, end with a bang. +aw.entries.spells.simpleEffects.5=Ghast Tears let it control wind, pushing entities around. +aw.entries.spells.simpleEffects.6=Glowstone Dust governs the weather, allowing lightning and such to happen. +aw.entries.spells.simpleEffects.7=Bucket of Water has to do with the control of water, strangely. Expect drowning and water, not necessarily in that order. +aw.entries.spells.simpleEffects.8=Obsidian has the energy attune to stone, for some... Interesting effects. +aw.entries.spells.simpleEffects.9=Ender Pearls allow teleportation, for both you and others. +aw.entries.spells.simpleEffects.10=Apprentice Blood Orb create some strange combat effects that have little rhyme or reason from my experience. +aw.entries.spells.simpleEffects.11=Something else that is interesting about the table is that it does not need to be re-bound to the crystal. If you change the foci or the paradigm the spell will change as well the next time you use the crystal. I also found four "Paradigms" to use with the spells. Skeleton heads imprinted a ranged attack to the energy of the spell, the wither skeleton skull made the spell more suited for close combat, the zombie turned the spell defensive, and the creeper head gave the spell more environmental impact. I should also note that Magus shared with me crafting recipes for turning wither skeleton skulls into heads of the other mobs. Seems a bit pricy, but when you have no other choice... +aw.entries.spells.tableAndSkulls.1=I asked Tiberius how he made the spell crystal, and he told me that while trying to create a new blood orb he stumbled across it. All it needed was a piece of glass in a blood altar, using 1k LP to transform the glass into the crystal. +aw.entries.spells.tableAndSkulls.2=We managed to recreate the powers and effects of the "Spell Table" using blood magic. Amazing what you can do with items laying around Magus's home... +aw.entries.spells.timePasses=This brings us up to today, when Tiberius brought us books so we could write all our work down, if we wished. It has taken a few hours, but here we are. Currently I am working with my brother to create a much more advanced form of the spell system, and will add any information I learn to this book when I have time. Has it really been three years since we came to this place? My life before coming to Magus seems like a distant memory now, and my days have become filled with training and work that I have fallen in love with. Since I last wrote here so much has happened... My sister Bella has come out of her shell, freely walking amongst the villagers in the market without cowering behind us. She has become more outgoing, helping Magus deal with demon attacks and cutting the number of deaths every year substantially. She has formed pacts with over a dozen demons, while working with Magus and my brother to create a way to "Pull" demons into our world, body and soul. My brother Vlad has been busy with his alchemy, creating new potions that have powerful effects but more often then not taste like tree bark mixed with dirt. Alongside that he has been helping me create the components I need for my spell constructs. I needed materials that conduct large amounts of magical and elemental energy, and he has been the only reason I've gotten so far. And no, I'm not writing that just because he is sitting next to me, though it would be a lie to say that hasn't been a factor. +aw.entries.spells.complexSpellBasics.1=Anyway, back to what we're here to write about. We have discovered a way to use the items known as "Blood Shards" and my brots alchemical reagents to create a new way to form spells using blood magic. It uses four components: Paradigms, Effects, Modifiers, and Enhancements. The main improvement of this system over the old one is the ability to "Chain" spell effects together. Before I cover how to create the spells, I should go over the parts. +aw.entries.spells.complexSpellBasics.2=The paradigms act as the starting point for the spells, and define what the spell will target. There is only one "Output" side to these blocks, and it is on the side with five points(It will be hard to miss it), and the output side can be rotated with a simple right click. We have currently created four different paradigm versions: Projectile, melee, self, and tool. While the names feel self explanatory, I'd best talk about them anyway. +aw.entries.spells.complexSpellBasics.3=Projectile: Makes the spell ranged, and will trigger on impact with anything. +aw.entries.spells.complexSpellBasics.4=Melee: Short range spell, normally the target must be within one to two blocks for the effect to work. +aw.entries.spells.complexSpellBasics.5=Self: Targets the caster, or the area immediately surrounding the caster. +aw.entries.spells.complexSpellBasics.6=Tool: Creates an alchemical manifestation of the spell from the crystal in the shape of a mace. Depending on what is in the spell, it can change what this mace does, from being a weapon or a digging tool or "Crushing" any block it breaks. +aw.entries.spells.complexSpellBasics.7=Next we have the effect blocks, and these are what give the paradigms some kick. Unlike the paradigms, theses have both an input and an output. An effect blocks input is always the five pointed non-colored side, while the output is the side with the colored ends(The color depends on the effect block). We currently have the effect blocks for fire, earth, wind, and ice. The effects of these blocks are heavily influenced by the modifiers that come after it, but spells can function with only a paradigm and one effect. +aw.entries.spells.complexSpellBasics.8=Modifiers change what the last effect in the chain before them does. So, if you had a fire, ice, wind chain then placed an offensive modifier, the wind would take an offensive effect while the others remain default. The current modifiers are: Default, Offensive, Defensive, and Environmental. +aw.entries.spells.complexSpellBasics.9=Default makes the effect act as if you left it without a modifier. Useful for spells where you want to guaranty its effect. +aw.entries.spells.complexSpellBasics.10=Offensive makes the spell more combat oriented. Doesn't mean the spell will deal damage, but it might help in combat. +aw.entries.spells.complexSpellBasics.11=Defensive has shown to change effect to protect the user. This comes in several forms, from creating shields and cloaking the user to slowing an opponent. +aw.entries.spells.complexSpellBasics.12=Environmental does what the name says: It makes spell effects have bigger impact on the world, from setting fires at the targets feet to carving out large chunks of land. +aw.entries.spells.complexSpellBasics.13=Finally we have enhancements. Enhancements improve the spell without major changes to the effect. The enhancements are: Power, Cost, and Potency. Like most other spell blocks, plain is in and colored is out. What should also be covered are the frames that hold enhancements. There are three types of frames, each stronger then the last. Your cheap and basic unstable frame can only withstand one per type(You may have one power, one cost, and one potency. If you try to add two unstable power enhancements one will not be able to improve the spell, and actually might blow up damaging the blocks around it). While you may only have one unstable per type, you may have two standard and three reinforced for a grand total of three enhancements of any type(If you want to save on the resources needed for these enhancements, try having one of each in the chain, placed in the order of weakest to strongest. While an unstable can only handle its own power, a standard can handle its own and that of a unstable, with a reinforced able to channel all three without failing). As I write this down I realize it is a little confusing, but with a little practice it becomes simple. +aw.entries.spells.complexSpellBasics.14=Power boosts the, well, power of the spell. If you had a spell that did damage and gave the target a potion effect, the spell would do more damage or make the potion effect stronger. +aw.entries.spells.complexSpellBasics.15=Cost lowers the cost of the spell effect. Doesn't get much simpler then this, yet will always be useful as the cost of these spells can get quite hefty after you chain a few effects. +aw.entries.spells.complexSpellBasics.16=Potency increases the potency of the spell. What this means differs from spell to spell, but with our damage/potion effect example it might make the effect last longer or be stronger. +aw.entries.spells.complexSpellBasics.17=This covers all the parts of a spell, but there is still one block remaining: The conduit. It doesn't add anything to the spell, but it allows you to have the parts of the spell farther apart. The input and output is dictated by the dots on the respective side. Four small dots is the input, one large dot is the output. Now then, how do you create a spell? First, pick your paradigm. Then, create a complex spell crystal to bind to the paradigm(Crafting recipes will be on the following pages for convenience) and make sure the crystal is also bound to an owner. Then, place and connect an effect block to the paradigm(Change outputs with right click, inputs with sneak right click. Do note that one side can't be both the input and the output.) Now the spell will work, but it might not do what you want. You can alter the spells effect by placing down and connecting a modifier. Still doesn't mean the spell will work as expected, but you can at least nudge it in the right direction. Finally you can add enhancements to boost the spell, but they might make the effect cost more(Unless you add cost enhancements), There are three tiers of enhancements, and a spell effect can one tier one... You know what, I went over this in the modifiers section. Look there for more information. But you don't need to stop on one effect, you can chain to another effect and another effect and another.... The possibilities are as endless as your soul network will allow. A few final notes: Every spell will do something. Some need other effects to really flourish while others work best on there own. The cost of the spell will always be the sum of all the effects and their enhancements multiplied by the complexity factor. So you can create massive spells with several effects at once, but watch your soul network as you use it. Just a warning. +aw.entries.spells.crafting= +aw.entries.spells.complexSpellEffects.1=And now Vlad is requesting I mention the effects of the spell... This might take a few pages, but I guess it is worth doing. +aw.entries.spells.complexSpellEffects.2=Self paradigm effects are always interesting... A default fire effect causes the user to burst into flames, while an offensive effect cloaks you in fire to ignite attackers and nearby entities. Defensive forms a puddle of magma at your feet(Useful if you can't be hurt by fire, but the thing trying to kill you can). Finally for fire, environmental causes you to superheat an area causing fires and things to change(Sand to glass, cobble to stone). +aw.entries.spells.complexSpellEffects.3=Earth is a bit less...Wild in it's effects for self. Default raises the ground bellow you up to your feet, forming a platform to stand on and I have found it helpful for when you suddenly don't know where the ground has gone(Happened once when testing a wind spell). Offensive creates an impact at your feet that crushes blocks, cobblestone to gravel, gravel to sand... Defensive effect is a powerful combat option with a catch: You become much heartier, able to take far more damage then normal at the cost of movement. Environmental creates a quick shock wave that weakens near by entities. +aw.entries.spells.complexSpellEffects.4=Ice has been a fun one to use. Default creates a small pillar under you that pushes you up, allowing for quick vertical movement. Offensive causes entities around you to become lethargic, moving slower. Defensive is a bit more interesting, allowing you to slow entities and freeze water using a cloak of ice(You can easily use this to walk on water). When water isn't available, you can create a bridge of ice using environmental ice. +aw.entries.spells.complexSpellEffects.5=Wind has turned out to be quite practical in it's uses, from my tests. Default hs the useful effect of creating a brief burst of wind that puts out fires on the user and protects the user from sudden downward momentum that can cause quick yet extreamly messy death. Offensive mimics the effects of an air sigil, launching you forward. Defensive causes near by entities to have a strong downward wind limit movement. Finally, environmental causes a large high pressure area to form around the user, that then moves to the low pressure area(Everywhere else). This has the side effect of taking entities with it in the sudden gust of air that is formed. +aw.entries.spells.complexSpellEffects.6=On to melee effects, for those who like close range combat. Starting off with fire again, this effect as default causes spontaneous combustion for near by entities. The always entertaining offensive effect causes the target to gain an effect called "Fire fuse". This effect does nothing until it expires, at which point the entity explodes. The explosion not only damages the entity, but causes it to to launch in the air while the explosion damages near by entities. Defensive allows you to wall off areas with fire, stopping things from passing unless the brave the flames. Environmental causes it to form a short range projectile that evaporates any water nearby. +aw.entries.spells.complexSpellEffects.7=Earth melee has a few of the old effects in a new form. Default destabilizes blocks, causing them to fall akin to sand. Offensive has the same smashing effect from earlier in projectile form. Defensive forms a wall by raising a chunk of the ground up. Environmental on the other hand is able to remove the stone from an ore, leaving a fair amount of dust to process into ingots. +aw.entries.spells.complexSpellEffects.8=Ice allows some useful combat options, starting with a default effect that allows the target to lose the tolerance to pain that happens after a blow effectively allowing you to apply more damage in less time. Offensive rockets the target into the air akin the the self ice effect from earlier. Defensive forms a wall of ice to protect you from damage. While Environmental... Well, it is odd. It unleashes an omnidirectional volley of snow balls at the target. +aw.entries.spells.complexSpellEffects.9=Wind is very combat flow oriented, with default pulling entities towards the user, offensive away from the user, and defensive in the air. Environmental is more utility, as it pulls items on the ground toward the users. +aw.entries.spells.complexSpellEffects.10=Projectile spells share many of the effects of other types with a few all their own. A default fire allows the attack to unleash a torrent of fire when it hits something. Offensive creates flowing lava in the air under the target, but is tricky to use without the aid of other spell effects. Defensive smelts blocks, while environmental evaporates water. +aw.entries.spells.complexSpellEffects.11=Earth projectiles are mainly focused on mining, with default disintegrating all matter it comes in contact with. Offensive forms a hole under an entity it hits(It will normally only dig the hole in mundane blocks like dirt and cobblestone). Defensive smashes blocks in the same manor stated before, while environmental mines blocks in an area around the projectile. +aw.entries.spells.complexSpellEffects.12=Ice has a lot of classic effects, with default being an ice plume on impact, Offensive slowing targets, defensive freezing water and making snow, and environmental just freezing water in an area around the projectile. +aw.entries.spells.complexSpellEffects.13=Wind has a few interesting effects, with default sending mobs flying, offencive giving "Heavy heart" to ground entities, defensive letting blocks mined by the spell drop as if mined by a silk touch pickaxe, and environmental pulling items to the user. +aw.entries.spells.complexSpellEffects.14=Tool spells seem to be a mix of utility and combat, with many of the effects allowing it to function as a set tool type. Starting with earth, default acts as a pickaxe, offensive as a way to remove mundane blocks, defensive a shovel, and environmental gives it the power to mine multiple blocks. I know I sound like I'm rushing through these, but they sort of say what they do on the tin. +aw.entries.spells.complexSpellEffects.15=Fire has a few powerful effects, with default smelting anything mined(Cobble to smooth stone, sand to glass...), offensive acting like the enchantment fire aspect, defensive increases the time the spell stays in tool form, and environmental lets it turn stone into lava. +aw.entries.spells.complexSpellEffects.16=Ice is more combat centered, with default letting blows it deals slow entities, offensive giving it a few sharp points for more damage, defensive unleashes a torrent of cold air when the tool is summoned that creates snow and slows mobs. The environmental effect is a black sheep, allowing the tool to function as if it has silk touch. +aw.entries.spells.complexSpellEffects.17=Wind has effects that are just... Useful. Default allows it to function as an axe, offensive gives it some extra punch to throw mobs back after being hit, defensive weighed them down, and finally environmental pulls items closer to the user. +aw.entries.spells.offTopic=Tiberius has informed me that this book will update as I add to it, so if we ever create more blocks for the advanced spells, you'll know when I do. For now, this is the end. And yet it might be your beginning. I'll go off topic for a bit, because today something happened that I never thought possible: I killed a wither(You know, big black flying skeletal death monster that wants to kill everything? One of those.) Not only did I kill one, but I also helped kill twenty more. Magus said that the most killed at once before this was ten by three people, so we crushed the record. We needed a few nether stars to upgrade our altar, but nether stars are near impossible to get. Unless you work on the conglomeration board like Magus that is.(He runs the largest country in the world, apparently. I know, I can hardly believe it either.) After inviting every single world leader for a holiday weekend(Of which they actually treated like a holiday trip), Magus managed to get us a reservation in a battle arena to kill thirty withers. To say I was shocked is an understatement. But, by some miracle, we managed to not only kill all of the withers(And all of us lived to tell about it). Sadly, I'm stuck in bed with a busted leg(Wither skull nailed me when I was casting a spell.), so I've taken this as an opportunity to try new kinds of food(Magus knows how to cook like any five star chief). I'd keep writing, but I smell the roasted chicken coming down the stairs now... Vlad has finally found a more stable recipe for the more advanced spell parts for the augments. While he has been able to create them before, the new orbs we have allow them not to fall apart four out of five times. A slight improvement, I'm sure you may agree. With this, the reinforced spell augments are much more reliable. Well, the last few days have been interesting. We have managed to open a hole in the fabric of space to let in an invading army of demons, but it was to stop another portal letting in other demons so it is all fine. Sorry, but I had to comment on how ridicules that sounded when I first heard Magus's plan. But it isn't as bad as it sounds, since we opened the second portal we had control over where the demons come out and can prevent them from running wild. Absurd sounding, I know, but when you deal with holes in space leading to demonic realms things are rarely ever simple. Or when a mage has any involvement, for that matter. +aw.entries.spells.demonicPower=Gah, look at me! I opened this musty old book to mention the new augments Vlad and Tiberius had created using the spoils of this "War", and ended up ranting about how strange and wonderful life as a mage can be. Right, Vlad managed to make a few parts better using these life and soul shards we've been collecting. Not much else to it, really. Sure, Vlad might say how he had to create new laws of alchemy to explain this process, but he does that on a daily basis anyway. + +aw.entries.alchemy.fatedMeeting=My name is Vlad Highborn, and I am a Blood Mage. I have studied the intricate workings of alchemy and the process of "Equivalent Exchange," which governs all aspects of magic. Basically, you cannot create something from nothing, although many have tried when searching for a particular stone. That obviously didn't end well, because people are clamoring for a fake variant even today. Of course simply saying that I am an alchemist isn't enough, because one of the main things I do is study Blood Magic with The Ritual Master and The Architect, both of whom have achieved those titles by their own merits. Magus and Tiberius have been busy recording their own works over the years, although I don't think Magus has everything written down in a book - I have yet to find any actual proof. Demir and myself were working with a trading company named the "Merry Lamb," which operated throughout the entire lands travelling from place to place, selling our wares from horseback and buying whatever was of value. We didn't have last names, we didn't need them - the only thing that was of worth to the caravan company was how much of a profit you were able to obtain, and last names only got in the way of a sell. When we weren't busy with the various villages, trying to part with our gleaming swords and precious gems, all that was left for us was to read the many books that we obtained in the light through the canvas of the caravan. That was how I fell in love with Alchemy in the early days. One of the members of the trading caravan I worked with was an alchemist, who created simple potions and poisons for both medical use and profit. He taught me many things while he worked with us, but I quickly learned that he only knew the basics of what could be done. This void of knowledge led me to collect several alchemical tomes from the merchants of the passing villages, where I heard of a powerful mage that lived on the outskirts of a small village. At times I fantasized of meeting him, perhaps even learning from him alchemy like nothing I could ever dream of. But every rumor made me think he was more myth then man, filled with outrageous stories of his skill and power that no one else has ever came close too. Paired with the fact that no one had ever seen him almost killed the last of my dreams. I was reading the latest book in my collection, one that I bought from a hermit alchemist in the last village who kept muttering about turnips, when I noticed a flickering that didn't match the light of the candle that I had in the caravan. I looked out of the back of the caravan as it slowed to a crawl, all of the traders were looking at the same thing: a trail of dark smoke rising from behind the trees and blowing in the harsh wind. The head of the caravan quickly dispatched a group containing one person of each profession, which included myself as the now only alchemist, and we headed towards where the village used to stand. A massacre. I saw the smoke and ashes of the buildings, charred and even frozen flesh littering the ground. I swallowed heavily, looking around me for hope that I wouldn't lose my supper, and overheard someone speaking the obvious, "It must have been demons! No mage would use both ice and fire to attack a village." "Hell, no self-respecting mage would attack a village in the dead of night. They still honour that code from the medieval era." We readied our weapons, myself relegated to medic duty, but there was hardly any use because demons rarely stayed for more than an hour after they're done. "Hey," Nick shouted, a new member to our group, "there's someone here!" We all looked around and saw a little girl, possibly about age twelve, wondering through the ashes and looking both lost and dazed. "The demons leave no survivors, boy," the leader of our group said. "It is a bad omen to find her here, alive and alone. Hell," he laughed bitterly, starting to walk away, "that may not even be a ' - could be another demon for all we know." The thought stirred me, not of what she could be but that someone could leave a lost child by herself. "Fine," I said, after arguing the point for several minutes, "if you won't take her, I will leave the Merry Lamb." I can't fully remember the argument because of how much time passed before I could finally write it down. What I do remember is that the head of the caravan was quite startled at my proclamation, but finally agreed to send a carrier to fetch both my brother as well as my belongings, and to give me a good deal on some supplies. "I won't try to talk you out of it, since I know how you get when your mind is set. But if I may ask, why are you so intent on trying to help her?" I turned around to start walking towards the girl, who was watching us blankly. Not surprising, considering we are probably the first people she had seen today. Living, at least. After walking the few paces that put me between the girl and the caravan, I turned to the leader and said what I was holding onto for the past few years. "I know what it is like, to not have any home to call my own. I'm hoping that this is not a bad omen, but is rather a sign of fate." Unfortunately it might have been a little preemptive of me to throw away my whole livelihood and wayward home to help a single lost girl. Demir wasn't exactly happy having to pick up everything that he had to head out on an adventure and neither of us were expecting, but I couldn't really blame him. Demir was attuned to several forms of magic, being the resident wizard-in-training of our group. Thankful for the little spark of mana that he managed to cultivate over the years, he kindled a fire for the three of us once we managed to walk off the rest of the night. Her name was Bella, with light blonde hair and blue eyes. When we asked her what happened that night, she simply shook her head and tucked her knees under her chin. Demir and I looked at each other, and we knew that no form of magic that we knew would heal her of the wounds that she had in her mind. When we tried to ask her if she knew of any magic herself, considering that we neared the boarder to the Mage's Guild's land, she shook her head again and looked sullenly back towards the village that she came from, now miles behind us. Demir finally asked the question that I was thinking myself - it seemed that he always had the uncanny ability to read my thoughts, or at least my mood at any given moment. "So, which way is it to this 'Magus Arcana?'" It was a long and difficult trek towards the village that the Mage was rumoured to live in. Three long, blistering weeks. It is actually quite amazing how a distance can be so hard to traverse on foot without a caravan, pulling our dwindling belongings with us as we continued onwards towards our goal. When we reached a village we would do the same thing: we would go to the local market at daybreak and sell whatever books and gems that we could, grab our allotment of food for the next leg of the journey, and ask in the tavern if anyone has heard of rumours of the great mage Magus. It seemed that with each village our supplies were getting less prosperous, dwindling until all that was left was a few worthless rocks that no one was keen on buying. Thankfully it seemed that we were getting close, since the rumours were becoming more and more substantial, until it became a reality. Passing by a blacksmith's shop, I noticed that the furnace was burning a lot more brightly than if it was filled with lava, and I peered into the slot for the fuel. What appeared to be there was a crystal made of lava, pulsating slowly as if it received a beat from a heart nearby. I asked the blacksmith about it, and he told me about an apprentice who made it, who didn't appear to have a name in the blacksmith's memory - if I were to hazard a guess, I'd say that he was more afraid of the apprentice than he let on. Grabbing Demir, who bought some antiseptic for a few wounds we received from a stray skeleton the previous night, and Bella, we finally headed towards the outskirts of the village we were looking for. The home wasn't hard to find, there was a simple cobble stone path leading away from the village to a lone stone house. Considering the fact that there can't be that many homes out here like this, this was the place or whoever does live here can give us directions to the right one. We walked up to the surprisingly simple wooden door, and I turned to the other two. "Are you ready?" I asked them, more for my sake then theirs. Bella simply nodded, barely speaking more then a few sentences a day since we left three weeks ago. Demir put his hand on my shoulder saying "This is the place, right? Let's not just stand here like a bunch of geese." Gathering myself, I knocked three times on the door. At first, I feared we had the wrong house. Then I feared we had the right house, but no one was home.... Before my mind could think of another scenario, I heard the sounds of a door being opened and someone walking on stone. The door swung inwards with a light squeak from the hinges, reveling someone of about eighteen wearing long robes. "Hello, how may I help you?" He asked after quickly looking us over, and I assumed this is the apprentice the blacksmith mentioned. "We're looking for the great mage Magus Arcana, is he here?" The man looked at all of us, then turned his head yelling "Master, there is someone here to see you. They're asking for you by name." We soon heard a door open again, and a man who looked to be in his late thirty's appeared behind the apprentice. I saw him briefly look the three of us over, raising his eyebrow as he did so. "You must be Magus. We've come a long way to meet you. May we come in?" He seemed to think this over for a few seconds, then sighed saying "Alright, you may come in. Leave your boots at the door, then follow me to the main room. Tiberius, can you make a quick lunch for the five of us?" The apprentice nodded, then left around a corner to the right while Magus lead us left to a large room with a few chairs, a simple couch, a plain wooden table, and an unlit fireplace with a strange red rock on the bottom. He gestured for the three of us to take a seat on the couch, which we gladly accepted. We had been on our feet for the last three weeks, so a chance to sit in a cool room was a nice change of pace. As Tiberius brought out a tray with several sandwiches on it to set on the table, I looked around the room to see what was on the walls. Stone tablets with strange symbols, brightly colored wands and stave's adorned the walls like kings use old swords, and a small book shelf was set above the fire place holding a variety of books in a few languages. I recognized "The theory of equivalent exchange" by Pahimar, the book that sparked the search for that certain stone. I noticed that while I had been gawking at the walls, everyone else had started eating. I grabbed the remaining sandwich, a simple pork and cheese with a strange sauce that I didn't recognized but immediately loved. "So..." Magus said as we finished the last few crumbs of the meal. "..what brings you to me?" Demir gave me a sideways glance, my que to start talking. "Well, I heard stories of what how much you know. I wanted to learn alchemy, so I came here. I know of only one other alchemist, the one who taught me the basics." He frowned, pinning his glare on me. "I looks like you three traveled a long way to get here, and you were unprepared for a long journey. So I'll ask again, what made you come to me?" He knew we didn't have as much of a choice as I was trying to let on, so there was no point in lying. "My brother and I lived with traders. About three weeks ago we came across a village that was attacked by demons, with there being only one survivor." Magus glanced over at Bella, who was eating a second sandwich Tiberius had brought for us. "Yes, Bella was that survivor. That other traders wanted to leave her for dead, but I couldn't bring myself to do that. So I was forced to go threw with a plan I had been preparing for the last few years, trying to find you, early. I had originally planned to come here alone, and had just enough money to get one person here. We barely scraped by with three, getting here with the last few gems I had to trade." Magus nodded, a intense look on his face. "And what were you planing to do if I was not here, or you never found me, or if I was a myth like many people think I am? Or did you even have a plan?" I sighed at his questions, he really pinned me down and read me like a book. "I had a back up plan, if a bad one. If worse came to worse I planed on trying to find a village that needs an alchemist to brew potions. I still have all the equipment in my bag, one of the few thing I couldn't bring myself to sell. I know how much the traders made off my work, I could feed the three of us with it, if only just barely." Magus nodded as if I gave the right answer. "Now then, what of your brother and your friend Bella? What had you planned to do with them if you found me?" "Well, my brother has a little mana, enough to create sparks strong enough to light fires. As for Bella, she doesn't know if she as any talent for magic." Magus's gaze shifted over to Demir, then Bella, then returned to me. "And if your brother or Bella didn't have enough talent for me to teach them?" I sighed once again. He was asking all the right questions. "I would shift to plan B. I'm not leaving my brother or Bella, not after all we have been threw, and not for the teachings of a heartless mage." He gave me a hard stair for a few seconds, then a wide grin grew on his face as he said "Right answer. Alright, I'll see what I can do. I should be able to teach something to you three, and I doubt anyone else around here is going to take her in. Rumors of the blond haired demon girl have beat you here." Magus made a few arrangements for us, having Demir and I stay in Tiberius's room while Bella took Magus's. When I asked where he would be sleeping, Magus said he kept the old couch around for more then one reason. When I started to protest he said that this was only temporary and that the three of us would have our own rooms tomorrow. When I asked how, all he did was smile and say "You'll see." While the three of us got accustomed to our new home, Magus and Tiberius went out for a few things. "Well, there an odd bunch." Demir said shortly after they left. "Don't laugh, they can say the same about us." I told him. This comment earned a rare smile from Bella, who had slowly started coming out of her shell. Magus and Teberius returned a little over an hour later, Magus caring a huge amount of food while Tiberius had a large roll of uncut fabric. Magus brought the food to the main room we sat at before, its intoxicating smell had caused both my brother and Bella to start drooling. I would criticize them if I wasn't doing the same thing. "Even after lunch you three looked half starved." Magus said as he set down loafs of fresh bread, cheese, and dried meat slices. "So we got you something, though we didn't have many options on short notice. Consider it a welcoming gift, along with some new clothes we'll make. But those can come later, for now you can dig in!" We ate like wilder beasts, tearing apart the bread, clawing for the meat, and making sure to get every last crumb of the cheese. I had no idea just how hungry I was till I saw all that food, and by the end of it I was amazed at how long it had been since I ate like this. Three weeks ago? No, a few month ago. When the traders were celebrating a huge trade with a large and wealthy village. The leader has so happy that he almost spent half the money he earn off the deal on the party. Almost. After a nice long night of sleep, we all awoke to the sounds of Magus and Tiberius carving out a large chunk of the dirt on the other side of a wall. I was fascinated by how they were doing it: Magus cast a spell to remove the dirt, then Tiberius replaced the dirt with stone bricks using a strange looking wand. At first I wondered where all the dirt was going and stone was coming from, then I noticed a few strange bags at the side of Magus and Tiberius. Once the main size was laid out, Magus asked Tiberius for the bag he had. With it in hand, Magus raised one arm to have walls raise out of the ground with it. Then Tiberius grabbed a few strange flying flames to light up the hallways, and candles for the rooms. "Alright, we're done. You three now have rooms to call your own. I'll have to do some work, but we might be able to get a few beds here as well. I only have one spare, so you three can decide who get's it for now. "Bella." my brother and I said in unison. "Alright. Tiberius, can you give me a hand moving it to her room? Also, your rooms have a small work area. If you need more space, you can use the main basement area or let us know. We'll see what we can do. For now, you three can pick which room you want, then move unpack your things there." The next two days went by fast, Magus helped make our rooms homes and assisted us in finding fields of magic to study(He had over a dozen tomes on alchemy inside is huge library, so I quickly felt at home with my nose in a book). While he attended to Demir and Bella, I started diging into the tomes. After cross referencing several of the books, I noticed that very few ever tried to improve upon the first brewing stand. Of the few who did, none succeeded in making potions larger then one dose. After briefly talking with Magus and Tiberius, they encouraged me to try and improve the design and gave me a space in the main workroom to do my testing. +aw.entries.alchemy.firstSteps=I knew I needed to try and reinforce the stand, as it was far to fragile to mix more then one item at a time. I tried iron, gold, stone, and several other material. They ether were far to weak, incompatible with the stand, or unruly with my attempts to shape them. It was when I tried to use obsidian, something that was compatible with the stand, strong enough to withstand the strain of the alchemy process. My only problem was fusing the obsidian with the stand. While I pondered my options, I felt my hand brush against a strange red orb that had been sitting next to my work space. Once I did so, the obsidian seemed to spring to life, wrapping around and shaping the stand into something far greater. I called down Magus and Tiberius to see what just happened. When Magus asked how I did what many others failed at, I told him the truth. "I'm not sure. I was thinking of how to do just this, when I accidentally touched something on that table and then the obsidian sprang to life." "You touched something and the obsidian seemed to come to life? What did you..." Magus said, then stopped dead as he looked at the other table. "Was it that orb?" He asked hastily. "I think so. After I touched it, this happened. It looks like what I created had a slot shaped like that orb."I told him, and Magus looked shaken. "Tiberius, we're going to need to talk about this. For now Vlad, can you hold off on testing what that device does?" "Alright." I told him, a little confused. "But I think I should name it. How does "The Alchemical chemistry set" sound?" Magus put on a weak smile "That seems fitting. It seems to be much more then a simple brewing stand. I recall Demir saying you had a few alchemical items that an adventure sold to the traders in your possession. Perhaps you can try to work out what they do, or what they're made of." Trying what Magus suggested, I started experimenting with the strange alchemy items I collected in my time with the traders. In total, I had two small red orbs, one larger red item that seems like a better version of the red orb, three small blue orbs, and two blue items that seem like they're between the small orbs and the large ones. Using a small alchemy lab Magus brought me to, I started breaking down anything I had spares of. Taking one of the blue orbs and grinding it in a mortar and pedestal, I found it was made of three redstone, and two items I had never seen before. One was acting as a "Binding" agent, while the other was some sort of liquid catalyst. After a few hours of work, I had a few formulas for the items, but I still needed to recreate them. Normal mixing wasn't working, as it seems like there was some other factor that merged them in the first place that I am missing. I'll write the formulas here when I find out what I'm missing, so until then I start grinding up the other items. Alright, after about three days worth of work I now have discovered that my original assumption that the larger red and blue reagents were stronger, more "Condensed" versions of the small orbs was correct. After a bit of work I am starting to think there is some sort of link between the alchemical chemistry set and these reagents. The chemistry set has five "Input" slots and one "Output" slot, and many of the items here need just five items... I will need to ask Magus about trying this with the orb that formed the set inside. Well, I am apparently now a blood mage. Magus and Tiberius told us details about some of the items we had been finding around our new home, from the weak blood orb that help create the alchemical chemistry set(Which Bella later used to tame her new demon friend. After everything I have heard about them, he is remarkably civil.) to the altar behind the house and in the basement. I was given the choice of continuing to study blood magic and use my new chemistry set(And taking all the risks that come with it), or studying other forms of alchemy. I went with the risky option, simply because I would be blazing a new form of magic. I now have a weak blood orb to call my own, and I will start trying to experiment with creating some of the reagents I have discovered in the last few days. +aw.entries.alchemy.chemistrySet.1=Hmm. It seems that the "Simple Catalyst" is the only alchemy reagent I could make with a weak blood orb. Once I had the recipe(Two parts redstone, one part glowstone, one part sugar, and one part gunpowder. Mixing these together should make one simple catalyst), I place one of each item in the outer five slots of the chemistry set. This alone is not enough to create a simple catalyst, you need to have a blood orb bound to you in the "Orb" slot to supply LP for the process(The simple catalyst only needs 200LP, so it is fairly cheap). Tiberius mentioned he had already made a stronger blood orb, so I might ask him for help making my own. I'll log any recipes I find. With a bit of work, I have managed to create the other component of the tiny dark blue orb(The small light blue orb still eludes me. I might need to look into a stronger blood orb, but that will need to come later.) The "Binding Agent" seems to have a few uses in both crafting and the other experiment I have been running with potions(More on that later). The weak binding agent needs only two simple catalysts and a piece of clay to form(Along with 1K LP). I say weak because I feel I can improve it with some of the reagents I have been creating. For now, I should go over what I've made in the past month. With the help of Magus, I have managed to make "Alchemical elemental reagents". These reagents represent various elements found in the world that always play a major role in both magic and alchemy. I will make a quick list of each element and its recipes, and will try to create these entry's as close to what I find in all the alchemy books I have read. Also I should note that they all need 500LP as a catalyst to make. +aw.entries.alchemy.chemistrySet.2=Incendium: Holding the power of fire and the nether, incendium need items often attributed to fire and are a part of the nether. Due to this, it is very hot and it has left me with a few small burns from my time handling it. +aw.entries.alchemy.chemistrySet.3=Aether: A reagent holding the power of wind, I have had to make sure it doesn't float away with every breeze. Made with items that seem to always be used as in reference with the wind(Ghast tears and feathers) that I bound to glowstone dust and a simple catalyst to give it some physical form. +aw.entries.alchemy.chemistrySet.4=Sanctus: Closest thing to powered light I could make, it seems to hold strange properties that I still can't understand. It needed a little gold, glowstone dust, and glass I had ground up in the chemistry set to make, but it seems worth the cost. +aw.entries.alchemy.chemistrySet.5=Crepitous: Chaos and destruction in physical form, I named it after the creepers that gave me the idea(And the gunpowder) for it. Made with one simple catalyst, two cobble stone, and two gunpowder. +aw.entries.alchemy.chemistrySet.6=Crystallos: A fine, cold powder that sends chills down my spine every time I touch it. Made with two parts ice(I need to find a better way to get this, The village doesn't have much in stock, and I burn through most of it trying to get the formula right), two parts snow(Full blocks, not balls or sheets), and the standard simple catalyst. +aw.entries.alchemy.chemistrySet.7=Terrae: A hard, grainy powder that has the power of the earth. Composed of two parts obsidian, one part dirt, one part sand, and mixed together in a simple catalyst. +aw.entries.alchemy.chemistrySet.8=Aquasalus: A reagent that seems to shift between powder and liquid on a whim, it represents the force of water in alchemy. Made by mixing three parts water(the amount in water bottles seems perfect), a ink sack(I didn't ask Magus why he has a huge stock pile of these in his storeroom, and he doesn't seem the type to mention it on a whim), and a simple catalyst. +aw.entries.alchemy.chemistrySet.9=Tennebrae: If sanctus is solid light, tennebrae is hardened shadow. Black as night and seems to dim everything around it, this reagent has potential to be powerful is used correctly. Made with obsidian, two pieces of coal, a ball of clay, and a simple catalyst. +aw.entries.alchemy.chemistrySet.10=Magicales: Raw alchemical power seems to pulse in this dust, and I feel like I have only glimpsed the true potential of this reagent, and I both fear and adore it. Made by mixing one part redstone, one part gunpowder, and two parts glowstone in a simple catalyst. +aw.entries.alchemy.incense.1=>A note, this is an entry written several years after the others before and after this. After talking to the others, I am adding this here as a post script to aid others who read this for the simple reason of "We would have loved to have this when we were starting out". This will, however, mention people and items that might be foreign to you for now. Roll with it, it will all make sense later.< +aw.entries.alchemy.incense.2=I have found something... Well, unexpected to say the least. The self proclaimed hedge mage Athis stopped by our still in construction homestead in Venric's folly to visit Tiberious. Apparently in one of the letters he wrote her he mentioned being unable to relax after working on watching the demons running around and building various things he and Magus decide we need here(Isn't this meant to be a temporary base of operations?). Well, she came by with a small pouch of wood ash incense and a little brazier to help him with this, but what this provided was far more valuable than simple scented air. I joined Tiberious and Athis for the first use of the incense, and to her credit I started feeling relaxed breathing in the sweet scents it let off. Part way through I got up to visit the blood altar, being my turn in the roster to top out out communal soul network. After performing a sacrifice like normal, something odd happened: There was more LP in the altar then there should be, by a fair margin. Several sacrifices later, I couldn't get it to happen again, so I went in to mention it to Tiberious(While it might have been a simple miscalculation, we must always look deeper into it. This philosophy was passed down to us by Magus, and has saved us time, lead us to great discoveries like this, and at times has resulted in a lot of cheese.). He performed his own sacrifice in the altar, and again there was more LP then there should be. Long story, involving investigations into the local flora, positions of stars, and phase of the moon, short we discovered it was the incense of all things causing the discrepancy. As it turns out, being under the effects of this simple wood ash was resulting in a greater exchange of raw life essence for a given amount of blood, akin to how self sacrifice runes work. After some experimentation, we have a basic calculation for the process and method for the most profit. You must sit in range of the improved brazier I have designed after giving it wood ash until white particles are emitted(You can do the sacrifice before this, but you won't get the full effect). You then must sacrifice almost all of your blood in one quick burst(This is achieved by holding right click for several seconds, then releasing), after this Lp will be added to the altar based on the number of hearts sacrificed, plus the bonus of the self sacrifice runes in the altar, then this total is multiplied by the effect of highest quality incense you are under. An example: If you sacrifice nine hearts into an altar without any self sacrifice runes while under the full effect of wood ash, you would add 2160 LP to the altar instead of the normal 1800. This process isn't without issues, however, as this rapid expenditure of blood weakens you for a time, with an effect not unlike soul fray. +aw.entries.alchemy.incense.3=Now then, I mentioned "Highest quality incense" before. Well, after the revelation that mundane wood ash would offer a sizeable boon to LP creation, I descended into my lab to perfect the process by creating better incense. After three days, ten pots of coffee, and one nap I emerged with four new incenses: Byrrus, Livens, Viridis, and Purpura for bonuses to LP creation of 60%, 120%, 200%, 300% respectively, compared to the 20% of wood ash. There is a minor issue, however: You can't just make and use the strongest one and be done with it. You see, these are designed to be used with each other and wood ash in a sort of chain. Once you reach the peak of wood ash, Byrrus can start taking effect, once you are at it's peak Livens can start, and so on. I should also note that while the LP gains they offer are improved, the relative scents they can let off vary from par with the wood ash to as foul as a compost pile. Sacrifices must be made, and a few foul fumes is worth the gains. I should note that you can speed up the process by which you are effected by increasing the volume of vapours inhaled. In laymans terms, the more braziers active with the same incense around you the faster the effect can take hold. +aw.entries.alchemy.potions=That is it for the reagents, for now. The other use for the alchemical chemistry set I have found is the creation of potions unlike anything anything I have ever seen. While not big on taste(But really, has there ever been a potion that isn't hard to swallow?), the potions it makes are more... refined. Using a single flask(Made in a T2 blood altar with2K and a glass bottle, the first being made by accident when I dropped the bottle in the lab after tripping on a table leg that had been moved), a potion ingredient, and a binding agent I can turn the solution in the flask(A mixture of nether wart, redstone, and glowstone dust) into a potion that has eight uses or "Swigs" instead of the normal one per bottle. Another interesting power of these new potions is that the red and blue alchemy items I had acquired from the adventures(Who in turn got from some chest in a dungeon) can be used to "Augment" the potions by mixing them in with more of potions ingredient. The red ones I have dubbed "Power catalysts", making the potions effect much more potent at the cost of shortening the effect. The blue ones I have started calling "Lengthening catalysts", as they make the potions last much longer then normal. On another note, I have started trying to make a better binding catalyst after an idea came to me from a mishap in the lab. I had tried to make a slowness potion(We had a few villagers that had been pestering us, so I wanted to get rid of them without hurting them), but after adding in the sugar powered I tried mixing in a fermented spider eye. Trying to add it in with a weak binding catalyst, I noticed that instead of mixing with the speed potion it was forming it's own section the same color of a weakness potion. Then the flask exploded. If my theory holds true, these potions can hold more then one effect, but the solution destabilizes when an effect is added. Should the potion fully destabilize, it will cause a small explosion that shatters the flask and damages anyone close to it with the glass shards. If I can help keep the potion stable, I might have found a secret of alchemy countless mages have sought but never found.... +aw.entries.alchemy.reagentRevolution.1=I have been experimenting with what I can make with this new blood orb, a gift from Tiberius for my help with his sigils. Using this orb I have finally been able to recreate the power and lengthening catalyst. Sadly, I can only make the mundane versions of each, but one step at a time. I haven't actually made many new items for my potions and alchemy(Well, compared to the shift from weak to apprentice orbs) but everything I have found is extremely useful with my potions. Then there is what I've been making for my brother, but I wrote most of the uses of them in his book. I'll add the recipes here anyway, for completeness sake. +aw.entries.alchemy.reagentRevolution.2=The first step towards these new reagents was to make a better form of catalyst. Surprisingly, this was the easy part. By mixing in a netherwart and bonemeal into two simple catalysts, I could create two "Strengthened catalyst" with which to create new reagents and enhance old ones. +aw.entries.alchemy.reagentRevolution.3=Shortly after this discovery, I managed to make a reagent I have dubbed "Offensa" by mixing in two arrows, a flint, and a strengthened catalyst into an incendium. While the original reagents represented elements, these new reagents seem to represent ideas and concepts(With "War and battle" being given to offensa). +aw.entries.alchemy.reagentRevolution.4=More tinkering gave birth to Praesidium, which seems to represent "Defense and protection" and is created by mixing tennibrae into strengthened catalyst, iron ingot(Ground into a powder at the set), redstone dust, and a cobweb(This may or may not have fallen into the set when Bella was doing some cleaning, ending with this happy accident). +aw.entries.alchemy.reagentRevolution.5=By strengthening terrae with the better catalyst, sand, gun powder, and a netherrack chunks(Luckily, we still have some from the last hell harvest festival but I must remember to buy more in a few months), I have created orbis terrae. Where terrae seems to be the element of earth, orbis terrae is the environment itself, encompassing above and below ground from the dessert to the nether. +aw.entries.alchemy.reagentRevolution.6=After a few days of nothing, I managed to form a powder now called "Virtus" from two parts redstone, one part coal, and one part gun powder mixed into a strengthened catalyst. From what I can tell, this is the raw manifestation of power(Fitting, this reagent is hard to control and a few of our uses of it have backfired horribly). It holds in it a great deal of potential energy, but releasing it(And then controlling it) has proven to be very difficult. +aw.entries.alchemy.reagentRevolution.7=This next one is a little odd. Late one night in the lab I had been mixing things together to see the results, and something caused me to mix a gold ingot powdered in the stand, soul sand from our nether wart farm, redstone dust, and a carrot of all things in the strengthened catalyst. When I awoke the next day, I found three things: A reagent called reductus(The aspect of reduce and diminish), a large mess in the lab, and that this wasn't the strangest things I had mixed together. Since then I have started brewing pots of coffee before I begin working late in an attempt to stay lucid. +aw.entries.alchemy.reagentRevolution.8=The final reagent that I have created is called "Potentia", due to the energy that causes it to crackle and pop on its own(Note: As my brother accidentally discovered, this powder does have some electrical properties to it that caused his hair to stand on end when he was working with it). Created with two chunks of lapis lazuli, glowstone dust, a piece of nether quartz, and a strengthened catalyst, this powder is similar to virtus. The difference is that while virtus is raw power, potentia is energy. Ironically, virtus is the more stable of the two, only giving off energy in large bursts while potentia seems to give off a little at all times. +aw.entries.alchemy.newPotions=After a few weeks worth of work, I finally managed to upgrade the binding agent and have made one that lets me make more advanced potions with more then one effect. Unfortunately, it doesn't work every time. For the first effect it works every time, like the weak binding agent. For the second effect, it only works four times out of ten(On average). Then the third effects works only sixteen times out a hundred(Again, on average.) It also needs 1.5K LP to make the binding agent when mixing a weak binding agent, a sanctus and a crystallos. With how rare some of the ingredients of my potions are, I decided to create a "Filling agent" that replaces the solution in the potion flask so that I can get more uses out of them. I have noticed that potions with more then one effect require stronger filling agents, as every effect in the potion cuts down how effective the agent is. The weak filling agent is made with a simple catalyst, a pile of redstone and glowstone dust, and a piece of nether wart. The weak filling agent can then be upgraded with a terrae and 1K LP into a "Standard" filling agent. +aw.entries.alchemy.soulSand=I managed to find a new use for the weak blood shards that the others have been gathering. Since the shards are technically part of a "Soul", I tried mixing it in with a bucket of water and sand using my chemistry set to get a fairly close replication of an uncommon nether resource, soul sand. While not identical, it can serve the same purpose as the normal one found in the nether. +aw.entries.alchemy.timeGoesBy=It just occurred to me, it has been over three years since I came to Magus's doorstep with my brother and sister. I've gotten so use to living here, and the daily routine seems like something I've done all my life. Strange, I never thought I'd settle down. Five years ago, I'd have never considered leaving the caravan. I have barely left my lab in the last month, aside from when Magus, my brother or sister drag me out by the back of my robe. Normally I would go out willingly, but we recently finished our altar upgrade and have created the "Master Blood orbs". As is customary, this new orb has given me the boost in power needed to create more alchemy items for both general use and my potions. As a result, progress has been coming in leaps and bounds with something new almost every other day. After many late nights and early mornings, theses are the fruits of my labor. +aw.entries.alchemy.catalysts=I managed to improve the catalyst even further by mixing in a gold nugget and the fragments of a bone into the strengthened catalyst, making it into a much more concentrated form, hence the name "Concentrated catalyst". With it, I have been able to infuse the imbued slates created in the blood altar with alchemical power, making it stronger then normal and able to construct devices to hold alchemical and magical energy. On the potion items, I can finally make all the forms of the power and lengthening catalysts, filling agents. By merging two of a catalyst with a standard binding agent you can make the standard form of said catalyst, and then you can create the greater form of the catalyst by fusing two of the standard with a reagent(Incendium for power and Aquasalus for lengthening). Adding these to a potion is the same process as the mundane, place the potion and the ingredient in the stand with the catalyst of choice. Note: You don't need to teir up from normal to the greatest, you can jump strait to the greatest effect by mixing in a greater catalyst. Adding a better catalyst to an old potion does nothing for the effect, and is the same as if you added it to a potion that never had a catalyst added. The greater filling agent is able to resort six charges to a one effect potion, and is made by adding aquasalus and magicalus to a standard filling agent. The remainder of my time has been spent brewing potions. Bella has almost finished the demon summoning area, and I have been creating a few reagents for that and brewing potions to buff myself during the fights. Bella has mentioned a beast called an "Elemental", and it has me slightly worried. A few new bruises later, and I now have a demon blood shard to call my own. I also have one procured by Magus to improve his ritual activation crystal with, and I will need to use a few reagents to merge the blood shard with the crystal, and some experimentation will be needed to find out what... +aw.entries.alchemy.activationCrystal=A few tries later, and the binding of the demonic power to the crystal works with Aquasalus, Incendium, and Aether. In theory a nether star can be used in place of a demon blood shard, but considering how hard those are to get a hold of... Magus has been thrilled with his new crystal, and I have started work on a new project with Tiberius as a surprise for Magus. His rituals as they stand are good, but I have had an idea to make them even better... I'm having a hard time sleeping tonight, so I might as well go over our idea and hope Magus doesn't read this. As it stands, the rituals only use life essence to run and are often "One trick ponies". What I proposed to Tiberius is this: What would happen if one of the rituals was charged with alchemical power, costing reagent to give it new or stronger effects? We might get nothing, or something amazing. Time will tell which it is. +aw.entries.alchemy.reagentSystem.1=It has taken the last two months, but we have the ground work for testing our idea done. The results so far have been even better then expected. We only have tested the full spring ritual and have discovered quite a few effects, but I'll let Magus cover those. +aw.entries.alchemy.reagentSystem.2=Instead, I'll write how the reagent system works. You first need an alchamic calcinator, then place a blood orb into it to act as a power source. After that, reagents can be placed by hand or fed into the calcinator to turn into pure alchemical energy, the type based on the reagent fed in. Once it has a solid reagent, it will use LP to turn one reagent into 1000AR(Alchemy Reagent) which is then moved into the 2000AR "Buffer" of the calcinator. Once in the buffer, the reagent slowly starts being moved into the main tank which can then be siphoned out. +aw.entries.alchemy.reagentSystem.3=Now then, to move it out of the main tank you need to have somewhere for it to go. To this extent, you have three options: A crystal belljar, a alchemic relay, or a master ritual stone. How you need to link it is simple: Create a alchemic router, then Shift right click with it on the calcinator to select the reagent type for it to transport(A note for blocks with more then one tank and more then one reagent type: Shift right clicking again on the block will swap between the available reagents inside the block.), then normal right click on the block with the router to bind it to the block. After that, right click on the destination(Needs to be within a few blocks, the range isn't that large). If it has worked, you should see reagent "Flowing" to the destination from the source(In this case the calcinator). We have tweaked it to where you can't see reagent moving with the naked eye, you need to have a tool(Like the Alchemic router) in hand to see this effect. You can also use a divination sigil on the belljars, relays, calcinator, and master ritual stone to read how much reagent the device holds. This process of binding can be applied to all the other blocks so I shouldn't need to cover it further, but I should note that these blocks can only accept and send reagent to so many locations at once. For example, the belljar can only accept reagent from one location, and send it to one location. I must also reiterate that if you have a relay set to send aether to destination A and Tennibrae to destination B, aether can never traval to B and vicversa for Tennibrea. New connections must be made for each reagent type, and we could not get a "Colorless" version of a connection to function. +aw.entries.alchemy.reagentSystem.4=Getting more into detail about the blocks and items of our new system, I'll cover the bell jar first. Created out of mundane glass and wood slaps, then filled with a concentrated catalyst solution to contain the alchemical energy in a stable enough environment to allow you to move the jar without losing any energy inside. While it can hold only one type of reagent and is restricted to one source and one destination, it functions as a portable form of "Bulk storage"(Able to hold 16000AR). An option for more storage is to link a few belljars together, but I feel this is a far from perfect answer to the problem of mass storage of reagent.... I will need to talk with Tiberius and Magus about this later. Regardless, Tiberius managed to incorporate a bit of redstone interaction into the design of the jar. Based on the amount of reagent inside the jar, it outputs a redstone signal(15 when full, 0 when empty, and so on). With a bit of work, you can use this for automated systems. +aw.entries.alchemy.reagentSystem.5=The "Alchemy Relay" acts as a small buffer(Two tanks that can hold two reagent each), and can be used to merge and divide a transport line of reagent energy. Each relay can have limitless sources, and four destinations. With the creative use of relays, you can create a large power network for transporting reagent. Tiberius has worked his magic on this device as well, and tweaked it to not send reagent when a redstone signal is applied(It also spins slightly slower to represent this). +aw.entries.alchemy.reagentSystem.6=To assist with the use of this system, we have three items to manage these devices. The Alchemic Router is used to bind the destinations of set reagents for all devices. The Alchemic Segmenter is used to partition tanks to a set reagent. All you need to do is set the reagent type the same way you would the router, then right click the device you want to partition a tank for that reagent type. One tank will be set for that type per right click, and if you exceed the maximum number of available tanks it will reset all tanks partitioned tanks to the default "First come first served". I should also note that if you set a relay to accept sanctus, offensa and vistus, the two available tanks will distributed to whichever reagents that get there first. The final item is the alchemic cleanser, and its use is simple but very useful: It resets all destinations. All locations the device is set to send reagent are cleared, so you can easily bind the device to new locations. +aw.entries.alchemy.reagentSystem.7=Now, we have made a few minor alterations to the "Master ritual stone" to enable our system to function. Its recipe and normal uses have remained the same, but it now has three internal tanks that each hold 1000AR. If the ritual has any reagent, it will display an "Alchemy Ring" above the master ritual stone as a sign that it has been augmented. Then depending on the ritual and the effect in question, it will use an amount of reagent to perform a new effect or augment an old one. An example of this is the full spring fulled with aquasalus will convert earth into farmland then hydrate it in a nine by nine around the master ritual stone, but if the full spring is given crystallus it will freeze all water source blocks around it. This all is paired with the base effect of the rituals, so the full spring can still function as an endless water source. This is all I can think of to write down about our new system. Tiberius and I plan to show it to the others tomorrow, so I need to get some rest. We showed our new system to Magus and my siblings today, and to say they loved it was an understatement. We had decided to be a little flashy with the show, building a full spring next to a small pond that had formed from the recent rainfall. After a bit of work hiding the relays and the belljar, Tiberius hid out of sight while I showed the others to the demonstration. I asked Magus to activate the ritual, keeping a close eye to see if he focused on anything in particular, but he quickly and effortlessly activated the ritual without pausing for a moment. After he returned to my side, I yelled for Tiberius to throw the switch. In an instant the reagent flowed to the ritual, and as the alchemy circle formed in the air the water created by the ritual and that of the pond quickly froze over. I heard gasps from both of my siblings, and I noticed Magus's eyes widen for just a moment(His equivalent of a jaw hanging slack) before he composed himself. Afterword we went over the details for them of how it works for the other, explaining the minor modifications we had made to the basic master ritual stone design and such. +aw.entries.alchemy.magusSecret=It has been a week since we ironed out most of the kinks with the reagent system, and Magus brought all of us together around the dinner table to go over the next few months. He said that he could get us something he felt would be needed to upgrade the altar to teir five, but it would take a little over a year to get them. He also mentioned that we should be getting a few messages after this years Hell harvest festival, which I thought was a little odd. "A little odd" doesn't begin to describe what has been happening the last few days. It seems most of us have put research on the side while we watch some of the "Replies" come in. They have come in via air drop, mechanized mail carriers, train and countless other ways that always seem stranger then the last. Tiberius managed to ask Magus what this was all about and he simply replied that he invited a few guests over, and these were the replies they had sent. When pressed for more details, he just said they wouldn't be coming for a few months, so we should start mastering what we can do with our blood orbs. We then started showing each other the little details of the branches of blood magic we had created and had been perfecting. In the last few months I have befriended a few demons with the help of my sister, created a few spell crystals and help construct a large complex spell with my brother, and then forged armor and sigils with Tiberius. Then it came time to teach the other alchemy and potion brewing.... I was reluctant to give out my secrets to brewing potions, even to them. I had told no one of the recipes for these brews, brewing potions for the others myself when they needed them. I almost wanted to tell the others no, but then Magus made me an offer. "I understand how you want to keep the secrets of your brews hidden, so how about we make a trade of knowledge instead?" he asked me when I was contemplating this matter. He offered me details about himself, somethings that wasn't common knowledge and even gave me permission to write everything down. Considering how little I knew of him, even after all these years, I quickly took him up on this offer. The very next day I had everyone in my personal lab, showing then the details and reciting the recipes for some of the most potent effect I had found then demonstrating there uses. I was done showing them everything shortly before dinner, so while we ate in the common room Magus told us his story. I'll jot as much of it as I can recall here, for you to enjoy as well. "So it is time to tell my story... I always hate doing this. So many questions that I really don't have answers for, and frankly it is a long bloody story. But a deal is a deal, and you all deserve to hear it. I have only told a handful of people this, all of them were either mages or Conglomeration members. You will so count among this number... I was born in the middle of the Talus kingdom, before all these corporations were founded and started forming their own governments. Back then gods and kings dictated law, and wars were fought on the battle field and not in markets shares and advertisement campaigns. My family was small, all I had was a mother who did all she could at home and a father who worked at the royal library. I ended up spending many hours in that library, both helping my father with his work and studying the countless tomes that adorned those shelves. At an early age I discovered a hidden treasure trove in those shelves: Books on magic. At the time magic wasn't well known, and most regarded it as nothing but myths created by fools. Because of this, theses books stayed lost and forgotten on these shelves until I came along. While other boys were learning the right way to hold a sword or a pickaxe, I spent my time studying the arcane. At the end of my first year there, I had already created a basic fireball spell and a thaumanonicon. I managed to keep my activates in magic hidden from everyone, my parents include, until I had come of age and needed to find a profession. It was then that I told them of what I had been working on all those years, showing them some of the smaller tricks I had perfected. To say they were shocked is an understatement, so I felt it best to leave their little world in the kingdom and set out to find a new home to practice magic without needing to be as secretive. That is how I came to Lurric, and it has been my home ever since then. The early days were hard, as I really didn't have the funds to live off of let alone support my research. I managed to get by helping the locals, merchants with book keeping and identifying some of the more obscure relics and "Treasures" they had for sale, farmers with stock and management, and even as a cook when times were really dark for me. But this only lasted a year or two, then I had the infrastructure in place to support myself with a little extra to live on. Amazing how much traders are willing to spend floating balls of flame and purple metal.... Skipping ahead a few years through the dull portion, I had begun to master a few forms of magic like thaumurgy and botany. My name had started to spread to the other nearby villages, and people asking for favors and knowledge started popping up at my door like they do now. At the time I never asked for gifts or compensation, but I didn't turn down food or books if they were offered. Traders started traveling to Lurric more and more, hoping to acquire a few goods that only I could provide at the time in exchange for gold, jewels, and rare books. Those who brought the third I gave the best deals. Still, life went on like this for a few more years with books starting to pile up in my library, more then enough gold to pay for my more "Exotic" materials, and never having a day of rest for the full decade I had first lived here. That peace was shattered the day a man by the name of Gareth broke down my door. He came in, adorned in full iron armor and long sword in hand, to challenge me to a dual to the death. It took more then a few sleep spells to knock him out of his rage, at which point I restrained him to a reclined chair I had in the back that I used when treating wounded. When he finally awoke, I started interrogating him. Well, interrogate isn't quite the right word for it.... Honestly, I just asked him a few questions. Once I saw that he had calmed down, I untied him and offered food. Did I mention the sounds his stomach made while he was unconscious? They were strong enough to rattled the chair. After eating a whole bread loaf and a large part of the stew I had been preparing before he arrived, we sat in this very room to talk like civil beings over why he decided to break down my door. His story is about as ludicrous as mine is. He was one of fifty seven immortal beings who walked the earth. He told me what details about he could, but he seemed unsure about it as well. What he did tell me was that the gift of immortality comes with a few boons aside from the obvious, and what they are differ from person to person. He said his gift was that of prophecy, and he recently had a vision of the future where I and people I influence would play a major role. As a result, he came here to challenge me to a dual to the death. I then asked him if that wasn't a bit unfair, him being immortal and all. He, in the most serious tone possible, said that it was completely fair: While an immortal can not be killed normally, there are set way that it can happen. One way is by a one on one dual to the death, with immortality wagered as the prize. They really don't have much choice in this, as it is like natural magic: The mere act of it the dual happening is enough for the "Wager" to take place. If both parties exert their full strength, then the killing blow is enough to complete the wager and transfer the gift. We talked for the next few hours, and I learned quite a few interesting facts. He had no idea who the other fifty six immortals were, and he frankly had no way to tell them apart from normal humans. He also mentioned that he could still be injured outside of the dual, but he would not fall to mortal wounds and heal at an accelerated rate. Not much of one however, as he mentioned breaking a leg once and it taking over a month to fully heal. Another note was how short a time he had been immortal, he had gained it about two decades ago. While to you that seems like a long time, he said the one he killed was alive for over a century. We finally ended that night with an agreement: In one weeks time he would return to my home, where we would share a fine meal, then have our dual the next morning. He wanted to get strait to the dual, but I had the meal as a non-negotiable point that he finally caved on. I spent the next week preparing for the battle, arming myself with the most potent spells and artifacts at my disposal from several schools of magic. In a flash that week went by, then Gareth once again sat with me to eat at my table. I gave him a bed to sleep in that night, then at dawn we both walked to the hill just behind this house where Bella's garden currently lays. Of all things about Gareth, our battle was one things I barely remember. Once we reached the top of the hill, we both brew our blades and turned to each other. After that, I only remember flashes and out of order scenes. It felt like it was over in only a few minutes, but it might have been hours and was one of the most brutal fights I have ever been a part of . His agility was far greater then I expected, dodging my swings and spells with ease. Unfortunately for him I was still a force to be reckoned with back then. I never let up on my spells, casting fire, ice and lightning one after another using my foci then teleporting around with a few spells. In the end, he died when he dropped his sword in reflex to the heat my flame spell had left on it and I capitalized on this. By this point we both felt taxed by the fight, and he could barely avoid my slowest attacks. The final blow I dealt was out of mercy, a quick end for his suffering that I had caused. I watched as Gareth grinned at me like he knew this would be how he died, then he closed his eyes as his body turned into sand carried away in the wind. I feel to my side after that, strength sapped and mana depleted, to awake a few hours later. I felt a new strength in my body when I got up, slight but still there. All in all, suddenly having immortality was rather lack-luster, but that was how it happened." At this point I was shocked into silence at his words. Not what he said, but how he said them: Little feeling or emphasis. It was like he just said that he gained a new scar or it started to rain. He has been more emotional over the acquisition of a rare book then immortality. Glancing at the others, I could tell they were mulling over this information as well. After a few minutes, my brother spoke up to start the questions. "So... Did your life change much after that?" Demir asked Magus, before taking a bite out of a sandwich he seem to have created from thin air. "Not really. Life as an immortal was just the same as life as a mortal. More researching, more learning, more magic.". "Have you met any more immortals since then?" Bella asked. "Two, and I happen to be related to both of them." "Related?" asked Tiberius with curiosity, "I never knew you had any relatives." "Well, they never came up. One of them is my brother, who started studying the Myst a few decades ago and hasn't been heard from since. I expect he will pop by any time he feels homesick for a few days, then drop out of touch again." "And the other immortal?" Bella asked with interest. "The other is my wife." Once again we all went into stunned silence, Tiberius and Demir slack-jawed. "You're married! Since when?" Bella asked after a moment. "Few centuries ago. We met when a small war was being fought with a necromancer, and she was the one leading the forces. Of course, most people at the time didn't know her real gender. She tried hard to keep it hidden, so the troops wouldn't think of her any differently. I was brought in to help deal with the "Undead army" details of the whole thing, and that had me working with her. One thing lead to another, and we were married a few months after the war was over. Currently she works as a commander of the Conglomeration's defense force, so she is rarely has time to come home." The questions continued for the next half hour, ranging from "Did you really open the first nether portals" to "Why are you on the Conglomeration board?". Magus took all are questions with the air of a man who has done this all before. When the questions were over, all the others started retiring to their rooms while I stopped by the library to look up something. The Talus kingdom fell almost a millennium ago. Wow... It has been a few months since I last wrote in this book. I've met more people in the last few weeks then I have in the last few years, many of them from lands I have never set foot in! Kings and queens, rulers and underlords, CEO's and owners from every nation. Then there was the fight with the withers... I'm not sure what to say about all that. I sort of walked in there, chugged a few potions then let the years of training with Magus take over. By the time the adrenalin rush was over for me, we had killed all of the withers and I was barely aware of a dull pain in my leg. Magus has used a spell to restrict my movement so I won't leave this bed while my broken leg heals since I "May" have tried to sneak into my lab once or twice to get to work. For now I must be content with my notebook and what Magus brings me from his library to past the days... +aw.entries.alchemy.simpleCreations=I've only had a little time at my chemistry set, so I haven't had much time to experiment with my new orb. All my tests trying to make new reagents failed, and I so far have only managed to make two new runic slates for my brother(But we have been trying to find new uses for them). The normal runic slate is a simple upgrade to the old cracked slates by infusing terrae into them. The final slate, dubbed imbued, is two runic slates bound together with magicales, incendium, and aquasalus. These days I've been working with the other on a few secret projects, so I have needed to keep up with and research all kinds of strange subjects. I also always seem to need to make more reagents, as our experiments burn through them rather quickly... I will write more when I have the time. + +guide.BloodMagic.entryName.architect.intro=A Classic Tragic Back-story +guide.BloodMagic.entryName.architect.bloodAltar=The Blood Altar +guide.BloodMagic.entryName.architect.soulNetwork=The Soul Network +guide.BloodMagic.entryName.architect.blankSlate=Basics of Sigils +guide.BloodMagic.entryName.architect.divination=The Divination Sigil +guide.BloodMagic.entryName.architect.waterSigil=Training, and a Water Sigil +guide.BloodMagic.entryName.architect.lavaCrystal=The Lava Crystal +guide.BloodMagic.entryName.architect.hellHarvest=Hell's Harvest Festival +guide.BloodMagic.entryName.architect.lavaSigil=The Lava Sigil +guide.BloodMagic.entryName.architect.blankRunes=Blank Runes - the Step to Tier 2 +guide.BloodMagic.entryName.architect.speedRunes=Speed Runes +guide.BloodMagic.entryName.architect.apprenticeOrb=The Apprentice Blood Orb +guide.BloodMagic.entryName.architect.voidSigil=The Void Sigil +guide.BloodMagic.entryName.architect.airSigil=Air Sigil +guide.BloodMagic.entryName.architect.sightSigil=Sigil of Sight +guide.BloodMagic.entryName.architect.advancedAltar=Advanced Altar Mechanics +guide.BloodMagic.entryName.architect.fastMiner=Sigil of the Fast Miner +guide.BloodMagic.entryName.architect.soulFray=Soul Fray +guide.BloodMagic.entryName.architect.greenGrove=Sigil of the Green Grove +guide.BloodMagic.entryName.architect.dagger=Dagger of Sacrifice +guide.BloodMagic.entryName.architect.sacrifice=Runes of Sacrifice +guide.BloodMagic.entryName.architect.bloodPack=The Blood Letter's Pack +guide.BloodMagic.entryName.architect.fivePeople=And Then there was Five +guide.BloodMagic.entryName.architect.tier3=The Next Step: Tier 3 +guide.BloodMagic.entryName.architect.magicianOrb=The Magician's Blood Orb +guide.BloodMagic.entryName.architect.newRune=New Runes +guide.BloodMagic.entryName.architect.magnetism=Sigil of Magnetism +guide.BloodMagic.entryName.architect.phantomBridge=The Phantom Bridge +guide.BloodMagic.entryName.architect.holding=Sigil of Holding +guide.BloodMagic.entryName.architect.elementalAffinity=Sigil of Elemental Affinity +guide.BloodMagic.entryName.architect.ritualStones=Recreating Ritual Stones +guide.BloodMagic.entryName.architect.bloodLamp=Shining a Blood Lamp +guide.BloodMagic.entryName.architect.boundArmour=Bound Armour +guide.BloodMagic.entryName.architect.sanguineArmour=Sanguine Robes +guide.BloodMagic.entryName.architect.soulSuppress=Suppressing the Soul +guide.BloodMagic.entryName.architect.ritualDiviner=The Ritual Diviner +guide.BloodMagic.entryName.architect.bloodShard=Blood Shards +guide.BloodMagic.entryName.architect.tier4Altar=The Life of a Mage - Tier 4 +guide.BloodMagic.entryName.architect.masterOrb=The Masters of the Tier 4 Altar +guide.BloodMagic.entryName.architect.whirlwind=Sigil of the Whirlwind +guide.BloodMagic.entryName.architect.compression=Sigil of Compression +guide.BloodMagic.entryName.architect.severance=Sigil of Ender Severance +guide.BloodMagic.entryName.architect.teleposer=The Teleposer +guide.BloodMagic.entryName.architect.suppression=Sigil of Suppression +guide.BloodMagic.entryName.architect.superiorCapacity=Rune of Superior Capacity +guide.BloodMagic.entryName.architect.orbRune=Rune of the Orb +guide.BloodMagic.entryName.architect.fieldTrip=A Field Trip +guide.BloodMagic.entryName.architect.bindingKey=The Key of Binding +guide.BloodMagic.entryName.architect.tier5Altar=The Trials of a Tier 5 Altar +guide.BloodMagic.entryName.architect.priceOfPower=The Price of Power +guide.BloodMagic.entryName.architect.demonicOrb=The Archmage's Orb +guide.BloodMagic.entryName.architect.energyBazooka=Power of the Energy Bazooka +guide.BloodMagic.entryName.architect.accelerationRune=Acceleration Runes +guide.BloodMagic.entryName.architect.harvest=The Harvest Godess +guide.BloodMagic.entryName.architect.demonProblem=Solving a Demon Problem +guide.BloodMagic.entryName.architect.tier6Altar=Tier 6 Already +guide.BloodMagic.entryName.architect.moreThanHuman=More Than Human: Project Omega + +guide.BloodMagic.entryName.rituals.intro=Introduction +guide.BloodMagic.entryName.rituals.weakRitual=Weak Rituals +guide.BloodMagic.entryName.rituals.rituals=Rituals +guide.BloodMagic.entryName.rituals.waterRitual=Ritual of the Full Spring +guide.BloodMagic.entryName.rituals.lavaRitual=Serenade of the Nether +guide.BloodMagic.entryName.rituals.groveRitual=Ritual of the Green Grove +guide.BloodMagic.entryName.rituals.interdictionRitual=Ritual of Interdiction +guide.BloodMagic.entryName.rituals.containmentRitual=Ritual of Containment +guide.BloodMagic.entryName.rituals.bindingRitual=Ritual of Binding +guide.BloodMagic.entryName.rituals.beastMode=Beast Mode +guide.BloodMagic.entryName.rituals.unbindingRitual=Ritual of Unbinding +guide.BloodMagic.entryName.rituals.jumpRitual=Ritual of the High Jump +guide.BloodMagic.entryName.rituals.duskInk=Dusk Ink +guide.BloodMagic.entryName.rituals.magnetismRitual=Ritual of Magnetism +guide.BloodMagic.entryName.rituals.crusherRitual=Ritual of the Crusher +guide.BloodMagic.entryName.rituals.speedRitual=Ritual of Speed +guide.BloodMagic.entryName.rituals.shepherdRitual=Ritual of the Shepherd +guide.BloodMagic.entryName.rituals.darkMagic=Dark Side of Magic +guide.BloodMagic.entryName.rituals.knifeAndSufferingRitual=Feathered Knife and Well of Suffering +guide.BloodMagic.entryName.rituals.regenerationRitual=Ritual of Regeneration +guide.BloodMagic.entryName.rituals.harvestFestival=The Hell's Harvest Festival +guide.BloodMagic.entryName.rituals.thenThereWereFive=And Then there were Five +guide.BloodMagic.entryName.rituals.alchemyRitual=The Ballad of Alchemy +guide.BloodMagic.entryName.rituals.domeRitual=Dome of Suppression +guide.BloodMagic.entryName.rituals.awakenedCrystal=Awakened Activation Crystal +guide.BloodMagic.entryName.rituals.featheredEarthRitual=Ritual of the Feathered Earth +guide.BloodMagic.entryName.rituals.gaiaRitual=Gaia's Transformation +guide.BloodMagic.entryName.rituals.condorRitual=Reverence of the Condor +guide.BloodMagic.entryName.rituals.meteorRitual=Mark of the Fallen Tower +guide.BloodMagic.entryName.rituals.expulsionRitual=Aura of Expulsion +guide.BloodMagic.entryName.rituals.costOfProgress=The Cost of Progress +guide.BloodMagic.entryName.rituals.zephyrRitual=Call of the Zephyr +guide.BloodMagic.entryName.rituals.harvestRitual=Reap of the Harvest Moon +guide.BloodMagic.entryName.rituals.eternalSoulRitual=Cry of the Eternal Soul +guide.BloodMagic.entryName.rituals.ellipsoidRitual=Focus of the Ellipsoid +guide.BloodMagic.entryName.rituals.evaporationRitual=Song of Evaporation +guide.BloodMagic.entryName.rituals.sacrosanctityRitual=Ward of Sacrosanctity +guide.BloodMagic.entryName.rituals.evilRitual=Veil of Evil +guide.BloodMagic.entryName.rituals.stomachRitual=Requiem of the Satiated Stomach +guide.BloodMagic.entryName.rituals.reagentEffects=The Effects of Reagents +guide.BloodMagic.entryName.rituals.conclaveOfMages=The Conclave of Mages +guide.BloodMagic.entryName.rituals.forbiddenParadise=Forbidden Paradise +guide.BloodMagic.entryName.rituals.convocationRitual=Convocation of the Damned +guide.BloodMagic.entryName.rituals.longHaul=The Long Haul +guide.BloodMagic.entryName.rituals.phantomHandsRitual=Orchestra of the Phantom Hands +guide.BloodMagic.entryName.rituals.anvilRitual=Rhythm of the Beating Anvil +guide.BloodMagic.entryName.rituals.dawnInk=Dawn Ink +guide.BloodMagic.entryName.rituals.symmetryRitual=Symmetry of the Omega +guide.BloodMagic.entryName.rituals.stallingRitual=Duet of the Fused Souls +guide.BloodMagic.entryName.rituals.newMoonRitual=Blood of the New Moon + +guide.BloodMagic.entryName.demons.ashes=The Girl From the Ashes +guide.BloodMagic.entryName.demons.tamedDemon=The First Tamed Demon +guide.BloodMagic.entryName.demons.future=A Glimps into the Future +guide.BloodMagic.entryName.demons.knight=A Wandering Knight +guide.BloodMagic.entryName.demons.demonShard=Pale Blue Demonic Shard +guide.BloodMagic.entryName.demons.demonSummoning=Demon Summoning and Taming +guide.BloodMagic.entryName.demons.keysGate=The Keys to the Gate +guide.BloodMagic.entryName.demons.futurePlans=Future Plans +guide.BloodMagic.entryName.demons.demonInvasion=The Demon Invasion +guide.BloodMagic.entryName.demons.observations=Observations of the Demons + +guide.BloodMagic.entryName.spells.demonGirl=Wandering and Demon Girls +guide.BloodMagic.entryName.spells.spellTable=Spell Table Top Games +guide.BloodMagic.entryName.spells.simpleEffects=Spell Effects for Beginners +guide.BloodMagic.entryName.spells.tableAndSkulls=To Make a Table and Skulls +guide.BloodMagic.entryName.spells.timePasses=And so Time Passes +guide.BloodMagic.entryName.spells.complexSpellBasics=Complex Spells, the Basics +guide.BloodMagic.entryName.spells.crafting=Vlad's Guide to Crafting +guide.BloodMagic.entryName.spells.complexSpellEffects=Effects of Complex Spells +guide.BloodMagic.entryName.spells.offTopic=Off topic, This is my Life +guide.BloodMagic.entryName.spells.demonicPower=Demonic Power Unleashed + +guide.BloodMagic.entryName.alchemy.fatedMeeting=A Fated Meeting +guide.BloodMagic.entryName.alchemy.firstSteps=First Steps of Alchemy +guide.BloodMagic.entryName.alchemy.chemistrySet=Uses of the Chemistry Set +guide.BloodMagic.entryName.alchemy.incense=Incense Inside +guide.BloodMagic.entryName.alchemy.potions=The Power of Potions +guide.BloodMagic.entryName.alchemy.reagentRevolution=Reagent Revolution +guide.BloodMagic.entryName.alchemy.newPotions=New Potion Improvements +guide.BloodMagic.entryName.alchemy.soulSand=Soul Sand +guide.BloodMagic.entryName.alchemy.timeGoesBy=As Time goes By +guide.BloodMagic.entryName.alchemy.catalysts=Upgrading the Catalysts +guide.BloodMagic.entryName.alchemy.activationCrystal=Activation Crystal Upgrade +guide.BloodMagic.entryName.alchemy.reagentSystem=The Reagent System +guide.BloodMagic.entryName.alchemy.magusSecret=Magus's Secret +guide.BloodMagic.entryName.alchemy.simpleCreations=Simple-ish Creations + +guide.BloodMagic.category.architect=The Architect +guide.BloodMagic.category.rituals=The Ritual Master +guide.BloodMagic.category.demons=The Demon Kin +guide.BloodMagic.category.spells=The Battle Mage +guide.BloodMagic.category.alchemy=The Alchemist + +guide.BloodMagic.welcomeMessage= +guide.BloodMagic.book.title=Sanguine Scientiem +guide.BloodMagic.book.name=Sanguine Scientiem +guide.BloodMagic.authorName= + diff --git a/src/main/resources/assets/forge/lang/en_US.lang b/src/main/resources/assets/forge/lang/en_US.lang new file mode 100644 index 00000000..2f9368d4 --- /dev/null +++ b/src/main/resources/assets/forge/lang/en_US.lang @@ -0,0 +1,5 @@ +commands.forge.usage=Use /forge <subcommand>. Subcommands are tps, track +commands.forge.usage.tracking=Use /forge track <type> <duration>. Valid types are te (Tile Entities). Duration is < 60. +commands.forge.tps.summary=%s : Mean tick time: %d ms. Mean TPS: %d + +commands.forge.tracking.te.enabled=Tile Entity tracking enabled for %d seconds. \ No newline at end of file diff --git a/src/main/resources/assets/forge/lang/es_ES.lang b/src/main/resources/assets/forge/lang/es_ES.lang new file mode 100644 index 00000000..de2e5178 --- /dev/null +++ b/src/main/resources/assets/forge/lang/es_ES.lang @@ -0,0 +1,212 @@ +#Block Localization +tile.bloodAltar.name=Altar de Sangre +tile.bloodRune.blank.name=Runa de Sangre +tile.bloodRune.fill.name=Runa de Capacidad Aumentada +tile.bloodRune.empty.name=Runa de Dislocación +tile.bloodRune.orb.name=Runa del Orbe +tile.bloodRune.betterCapacity.name=Runa de Capacidad Superior +tile.speedRune.name=Runa de Velocidad +tile.efficiencyRune.name=Runa de Eficiencia +tile.runeOfSacrifice.name=Runa de Sacrificio +tile.runeOfSelfSacrifice.name=Runa de Auto-Sacrificio +tile.ritualStone.name=Piedra Ritual +tile.blockMasterStone.name=Piedra Ritual Maestra +tile.bloodSocket.name=Cuenca Llena +tile.imperfectRitualStone.name=Piedra Ritual Imperfecta +tile.armourForge.name=Forja de la Armadura del Alma +tile.emptySocket.name=Cuenca Vacía +tile.bloodStoneBrick.name=Ladrillo de Piedra de Sangre +tile.largeBloodStoneBrick.name=Ladrillo de Piedra de Sangre Grande +tile.blockWritingTable.name=Set de Química Alquímica +tile.blockHomHeart.name=Mesa de Hechizos +tile.bloodPedestal.name=Pedestal Arcano +tile.bloodPlinth.name=Plinto Arcano +tile.bloodTeleposer.name=Teleposador +tile.blockConduit.name=Conductor de Hechizos +tile.blockSpellParadigm.projectile.name=Generador de Partículas +tile.blockSpellParadigm.self.name=Auto-Aumentador +tile.blockSpellParadigm.melee.name=Agregador de Tumultos +tile.blockSpellParadigm.tool.name=Forjador de Herramientas +tile.blockSpellEnhancement.power1.name=Fortalecedor de Hechizos Inestables +tile.blockSpellEnhancement.power2.name=Fortalecedor de Hechizos Estándar +tile.blockSpellEnhancement.power3.name=Fortalecedor de Hechizos Reforzado +tile.blockSpellEnhancement.power4.name=Fortalecedor de Hechizos Imbuido +tile.blockSpellEnhancement.power5.name=Fortalecedor de Hechizos Demoníaco +tile.blockSpellEnhancement.cost1.name=Debilitador de Hechizos Inestable +tile.blockSpellEnhancement.cost2.name=Debilitador de Hechizos Estándar +tile.blockSpellEnhancement.cost3.name=Debilitador de Hechizos Reforzado +tile.blockSpellEnhancement.cost4.name=Debilitador de Hechizos Imbuido +tile.blockSpellEnhancement.cost5.name=Debilitador de Hechizos Demoníaco +tile.blockSpellEnhancement.potency1.name=Aumentador de Hechizos Inestable +tile.blockSpellEnhancement.potency2.name=Aumentador de Hechizos Estándar +tile.blockSpellEnhancement.potency3.name=Aumentador de Hechizos Reforzado +tile.blockSpellEnhancement.potency4.name=Aumentador de Hechizos Imbuido +tile.blockSpellEnhancement.potency5.name=Aumentador de Hechizos Demoníaco +tile.blockSpellModifier.default.name=Modificador de Hechizos por Defecto +tile.blockSpellModifier.offensive.name=Modificador de Hechizos Ofensivos +tile.blockSpellModifier.defensive.name=Modificador de Hechizos Defensivos +tile.blockSpellModifier.environmental.name=Modificador de Hechizos Ambientales +tile.blockSpellEffect.fire.name=Crisol de Fuego +tile.blockSpellEffect.ice.name=Creador de Hielo +tile.blockSpellEffect.wind.name=Generador de Viento +tile.blockSpellEffect.earth.name=Formador de Tierra +tile.alchemicCalcinator.name=Calcinador Alquímico +tile.crystalBelljar.name=Campana de Cristal +tile.blockReagentConduit.name=Relé Alquímico +tile.lifeEssenceFluidBlock.name=Esencia Vital + +#Item Localization +item.weakBloodOrb.name=Orbe de Sangre de Débil +item.apprenticeBloodOrb.name=Orbe de Sangre de Aprendiz +item.magicianBloodOrb.name=Orbe de Sangre de Mago +item.masterBloodOrb.name=Orbe de Sangre de Maestro +item.archmageBloodOrb.name=Orbe de Sangre de Archimago +item.energyBlast.name=Dinamitador de Energía +item.energySword.name=Hoja Vinculada +item.lavaCrystal.name=Cristal de Lava +item.waterSigil.name=Sello de Agua +item.lavaSigil.name=Sello de Lava +item.voidSigil.name=Sello del Vacío +item.blankSlate.name=Pizarra en Blanco +item.reinforcedSlate.name=Pizarra Reforzada +item.sacrificialDagger.name=Cuchillo de Sacrificios +item.daggerOfSacrifice.name=Daga de Sacrificio +item.airSigil.name=Sello de Aire +item.sigilOfTheFastMiner.name=Sello del Minero Rápido +item.sigilOfElementalAffinity.name=Sello de Afinidad Elemental +item.sigilOfHaste.name=Sello de Rapidez +item.sigilOfHolding.name=Sello de Propiedad +item.divinationSigil.name=Sello de Adivinación +item.waterScribeTool.name=Herramienta de Inscripción Elemental: Agua +item.fireScribeTool.name=Herramienta de Inscripción Elemental: Fuego +item.earthScribeTool.name=Herramienta de Inscripción Elemental: Tierra +item.airScribeTool.name=Herramienta de Inscripción Elemental: Aire +item.duskScribeTool.name=Herramienta de Inscripción Elemental: Crepúsculo +item.activationCrystalWeak.name=Cristal de Activación Débil +item.activationCrystalAwakened.name=Cristal de Activación Despertado +item.boundPickaxe.name=Pico Vinculado +item.boundAxe.name=Hacha Vinculada +item.boundShovel.name=Pala Vinculada +item.boundHelmet.name=Casco Vinculado +item.boundPlate.name=Pechera Vinculada +item.boundLeggings.name=Pantalones Vinculados +item.boundBoots.name=Botas Vinculadas +item.weakBloodShard.name=Esquirla de Sangre Débil +item.growthSigil.name=Sello de la Pequeña Arboleda +item.blankSpell.name=Cristal Desvinculado +item.alchemyFlask.name=Frasco de Poción +item.standardBindingAgent.name=Agente Vinculante Estándar +item.mundanePowerCatalyst.name=Catalizador de Poder Mundano +item.averagePowerCatalyst.name=Catalizador de Poder Medio +item.greaterPowerCatalyst.name=Catalizador de Poder Grandioso +item.mundaneLengtheningCatalyst.name=Catalizador de Alargamiento Mundano +item.averageLengtheningCatalyst.name=Catalizador de Alargamiento Medio +item.greaterLengtheningCatalyst.name=Catalizador de Alargamiento Grandioso +item.incendium.name=Incendium +item.magicales.name=Magicales +item.sanctus.name=Sanctus +item.aether.name=Aether +item.simpleCatalyst.name=Catalizador Simple +item.crepitous.name=Crepitous +item.crystallos.name=Crystallos +item.terrae.name=Terrae +item.aquasalus.name=Aquasalus +item.tennebrae.name=Tenebrae +item.demonBloodShard.name=Esquirla de Sangre de Demonio +item.sigilOfWind.name=Sello del Torbellino +item.telepositionFocus.name=Centro de Teleposición +item.enhancedTelepositionFocus.name=Centro de Teleposición Mejorado +item.reinforcedTelepositionFocus.name=Centro de Teleposición Reforzado +item.demonicTelepositionFocus.name=Centro de Teleposición Demoníaco +item.imbuedSlate.name=Pizarra Imbuida +item.demonicSlate.name=Pizarra Demoníaca +item.sigilOfTheBridge.name=Sello de Conexión Fantasma +item.armourInhibitor.name=Inhibidor de Armadura +item.cheatyItem.name=Orbe de Ensayo +item.weakFillingAgent.name=Agente Sustancioso Débil +item.standardFillingAgent.name=Centro de Teleposición Estándar +item.enhancedFillingAgent.name=Centro de Teleposición Mejorado +item.weakBindingAgent.name=Agente Vinculante Débil +item.ritualDiviner.name=Adivinador Ritual +item.sigilOfMagnetism.name=Sello de Magnetismo +item.itemDiabloKey.name=Llave de Vinculación +item.energyBazooka.name=Bazooka de Energía +item.bloodLightSigil.name=Sello de la Lámpara de Sangre +item.itemComplexSpellCrystal.name=Cristal de Hechizos Complejo +item.itemSigilOfSupression.name=Sello de Supresión +item.itemSigilOfEnderSeverance.name=Sello de Ruptura de Ender +item.bucketLife.name=Cubo de Vida +item.bloodMagicBaseItem.QuartzRod.name=Vara de Cuarzo +item.bloodMagicBaseItem.EmptyCore.name=Núcleo Vacío +item.bloodMagicBaseItem.MagicalesCable.name=Cable Magicales +item.bloodMagicBaseItem.WoodBrace.name=Puntal de Madera +item.bloodMagicBaseItem.StoneBrace.name=Puntal de Piedra +item.bloodMagicBaseItem.ProjectileCore.name=Núcleo de Proyectil +item.bloodMagicBaseItem.SelfCore.name=Auto-núcleo +item.bloodMagicBaseItem.MeleeCore.name=Núcleo de Tumulto +item.bloodMagicBaseItem.ToolCore.name=Núcleo de Herramienta +item.bloodMagicBaseItem.ParadigmBackPlate.name=Lámina Paradigma +item.bloodMagicBaseItem.OutputCable.name=Cable de Hechizos de Salida +item.bloodMagicBaseItem.InputCable.name=Cable de Hechizos de Entrada +item.bloodMagicBaseItem.FlameCore.name=Núcleo Ígneo +item.bloodMagicBaseItem.IcyCore.name=Núcleo Helado +item.bloodMagicBaseItem.GustCore.name=Núcleo Borrascoso +item.bloodMagicBaseItem.EarthenCore.name=Núcleo Terroso +item.bloodMagicBaseItem.CrackedRunicPlate.name=Placa Rúnica Resquebrajada +item.bloodMagicBaseItem.RunicPlate.name=Placa Rúnica +item.bloodMagicBaseItem.ScribedRunicPlate.name=Placa Rúnica Imbuida +item.bloodMagicBaseItem.DefaultCore.name=Núcleo Descalibrado +item.bloodMagicBaseItem.OffensiveCore.name=Núcleo Ofensivo +item.bloodMagicBaseItem.DefensiveCore.name=Núcleo Defensivo +item.bloodMagicBaseItem.EnvironmentalCore.name=Núcleo Ambiental +item.bloodMagicBaseItem.PowerCore.name=Núcleo de Poder +item.bloodMagicBaseItem.CostCore.name=Núcleo de Reducción +item.bloodMagicBaseItem.PotencyCore.name=Núcleo de Potencial +item.bloodMagicBaseItem.ObsidianBrace.name=Puntal de Obsidiana +item.bloodMagicAlchemyItem.Offensa.name=Offensa +item.bloodMagicAlchemyItem.Praesidium.name=Praesidium +item.bloodMagicAlchemyItem.OrbisTerrae.name=Orbis Terrae +item.bloodMagicAlchemyItem.StrengthenedCatalyst.name=Catalizador Fortalecido +item.bloodMagicAlchemyItem.ConcentratedCatalyst.name=Catalizador Concentrado +item.bloodMagicAlchemyItem.FracturedBone.name=Hueso Fracturado +item.bloodMagicAlchemyItem.Virtus.name=Virtus +item.bloodMagicAlchemyItem.Reductus.name=Reductus +item.bloodMagicAlchemyItem.Potentia.name=Potentia +item.sanguineHelmet.name=Yelmo Sanguíneo +item.itemSeerSigil.name=Sello de la Vista +item.itemFluidSigil.name=Sello del Fluido +item.multiTool.name=Maza Dinámica +item.itemCombinationalCatalyst.name=Catalizador Combinativo +item.sanguineRobe.name=Ropajes Sanguíneos +item.sanguinePants.name=Pantalones Sanguíneos +item.sanguineBoots.name=Botas Sanguíneas +item.itemAttunedCrystal.name=Direccionador Alquímico +item.itemTankSegmenter.name=Segmentador Alquímico +item.destinationClearer.name=Limpiador Alquímico +item.demonPlacer.name=Cristal de Demonio + +#Creative Tab +itemGroup.tabBloodMagic=Blood Magic + +#Extra Strings +bm.string.consume=Uso +bm.string.drain=Drenaje +bm.string.tier=Tier +bm.string.crafting.orb.shaped=Fabricación con forma de Orbe +bm.string.crafting.orb.shapeless=Fabricación sin forma de Orbe + +#Entities +entity.AWWayofTime.EarthElemental.name=Elemental de Tierra +entity.AWWayofTime.FireElemental.name=Elemental de Fuego +entity.AWWayofTime.HolyElemental.name=Elemental Sagrado +entity.AWWayofTime.ShadeElemental.name=Elemental Sombrío +entity.AWWayofTime.WaterElemental.name=Elemental de Agua +entity.AWWayofTime.AirElemental.name=Elemental de Aire +entity.AWWayofTime.Shade.name=Sombra +entity.AWWayofTime.BoulderFist.name=Puño Rocoso +entity.AWWayofTime.IceDemon.name=Demonio de Hielo +entity.AWWayofTime.SmallEarthGolem.name=Gólem de Tierra Pequeño +entity.AWWayofTime.WingedFireDemon.name=Demonio de Fuego Alado +entity.AWWayofTime.BileDemon.name=Demonio Malhumorado +entity.AWWayofTime.LowerGuardian.name=Guardián Inferior +entity.AWWayofTime.FallenAngel.name=Ángel Caído diff --git a/src/main/resources/assets/forge/lang/fr_FR.lang b/src/main/resources/assets/forge/lang/fr_FR.lang new file mode 100644 index 00000000..bd01daa9 --- /dev/null +++ b/src/main/resources/assets/forge/lang/fr_FR.lang @@ -0,0 +1,5 @@ +commands.forge.usage=Utilisez /forge <sous-commande>. Les sous-commandes sont tps, track +commands.forge.usage.tracking=Utilisez /forge track <type> <durée>. Les types valides sont te (Tile Entities). La durée doit être inférieur à 60. +commands.forge.tps.summary=%s : Duré de tick : %d ms. TPS moyen : %d + +commands.forge.tracking.te.enabled=Trackage des Tile Entity activé pour %d secondes. \ No newline at end of file From 6f66d81d450d7a68446edab6dee09ecdf96be744 Mon Sep 17 00:00:00 2001 From: WayofTime <wtime@live.ca> Date: Fri, 31 Jul 2015 12:15:46 -0400 Subject: [PATCH 33/33] Fixed the gradles too. --- build.gradle | 8 ++++---- build.properties | 11 ++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index 9be2f8af..35d2e817 100644 --- a/build.gradle +++ b/build.gradle @@ -51,12 +51,12 @@ repositories { } dependencies { - compile "codechicken:CodeChickenLib:" + config.mc_version + "-" + config.cclib_version + ":dev" + compile "codechicken:CodeChickenLib:1.7.10-1.1.1.99:dev" compile "codechicken:CodeChickenCore:" + config.mc_version + "-" + config.ccc_version + ":dev" compile "codechicken:NotEnoughItems:" + config.mc_version + "-" + config.nei_version + ":dev" -// compile name: 'MineTweaker3', version: config.minetweaker_version, ext: 'jar' -// compile "codechicken:ForgeMultipart:1.7.10-1.1.0.314:dev" -// compile "info.amerifrance.guideapi:Guide-API:" + config.mc_version + "-" + config.guideapi_version + ":deobf" + compile name: 'MineTweaker3', version: config.minetweaker_version, ext: 'jar' + compile "codechicken:ForgeMultipart:1.7.10-1.1.0.314:dev" + compile "info.amerifrance.guideapi:Guide-API:" + config.mc_version + "-" + config.guideapi_version + ":deobf" } minecraft { diff --git a/build.properties b/build.properties index a40914e6..2498a91e 100644 --- a/build.properties +++ b/build.properties @@ -1,12 +1,13 @@ +# +#Mon Jul 20 20:59:46 EDT 2015 mod_name=BloodMagic -forge_version=11.14.3.1499 -cclib_version=1.1.2.133 -ccc_version=1.0.5.36 -nei_version=1.0.5.104 +forge_version=10.13.4.1448-1.7.10 +ccc_version=1.0.4.29 +nei_version=1.0.3.64 //=Dependency Information guideapi_version=1.0.1-20 package_group=com.wayoftime.bloodmagic mod_version=1.3.3 minetweaker_version=Dev-1.7.10-3.0.9B build_number=12 -mc_version=1.8 +mc_version=1.7.10